Skip to content

v0.43.0

Choose a tag to compare

@angel-ip angel-ip released this 12 Oct 15:34
· 163 commits to main since this release
6b9aa17

v0.43.0

Ask is a Task: the model fills a small spec, the page finds the relation, and oracles check it before anything runs. Models can run in the page. Breaking: see What to change.

Highlights

  • Tasks (@kanzo-tech/ai/task). defineTask declares what a model may answer and which oracles check it. runTask asks for it, sends the oracles' diagnostics back for a repair, and answers a Proposal: accepted, with its diagnostics, or with a Decision for the person. propose asks for several at once and keeps those the oracles accept. verify checks a value no model wrote. A Task can declare a grammar instead of an output schema when its artefact is text in a language. useTask is a screen's list of proposals. See /docs/ai/tasks.
  • Ask runs in the chat as a Task. useAskChat({ model, engine, graph, types, selection }): each question is one run of ask, its answer is the same answer part AnswerCard draws, and the reply is written from the rows, not by the model. When two relations answer a question equally, the chat asks which, numbered. askOffers gives the questions to start from, each one checked.
  • Chips on an answer. AskChips draws what an answer was read as: what is counted, what a chart is by, each condition. Each chip opens the values it can hold instead, checked by Ask's oracles. Taking one (askEdit) re-reads the answer with no model call.
  • A page chip reaches an answer as it reaches a tile. A chip published on another relation narrows the answer through the key both reach.
  • resolveRelation (@kanzo-tech/mosaic) computes the relation a question needs: the shortest path that covers its fields and reaches the page's chips. It answers that relation, the tied ones (ambiguous), or what nothing reaches (unreachable).
  • A model in the page (@kanzo-tech/llm/local). localModel("Qwen3-4B-q4f16_1-MLC", { worker, onProgress }) runs on WebGPU through WebLLM, an optional peer only this subpath reaches. Without WebGPU a call fails as ai/unavailable. A call can hold the model to a grammar with providerOptions: { kanzo: { grammar } }.

What to change

  • useAgentChat(dataAgent(…)) → useAskChat({ model, engine, graph, types, selection }). types is each type alone: readAnswerRelations(coordinator, graph, answerRelationsOf(graph, { hops: 0 })).
  • dataSuggestions → askOffers (a promise, not a stream).
  • dataAgent, dataInstructions, DataAgentOptions, DataSuggestionsOptions, DataTools and the context: { tokens, reserve } option are gone.
  • Chat's suggestions/suggesting → proposals/proposing. ChatSkeleton's suggestions → proposals.
  • suggest() and SuggestOptions are gone. Questions to start from are a Task's, through propose.
  • AiError's ai/context code, and its tokens and budget data, are gone from @kanzo-tech/llm.

Every @kanzo-tech/* is published at 0.43.0; move them together (they pin each other exactly).