@kehto/paja 0.30.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -164,7 +164,7 @@ The focused host regression runs in Chromium and Firefox after `pnpm build`:
164
164
  connections: pick a provider preset (OpenAI, Anthropic, Google Gemini, OpenRouter,
165
165
  Groq, Mistral, DeepSeek, xAI, Together, Fireworks, Perplexity, Azure OpenAI, or local
166
166
  Ollama, LM Studio, llama.cpp and vLLM servers), enter the model and an optional API
167
- key, and choose whether to remember the key. Remembered keys are encrypted with
167
+ key, tick the capabilities the model supports (images, JSON output, and **Tool calling** with optional **Required tool choice** and **Named tool choice**) and choose whether to remember the key. Remembered keys are encrypted with
168
168
  AES-GCM under a PBKDF2-SHA-256 key derived from a vault password you create (at
169
169
  least 12 characters); otherwise the key lasts for the page session only. Keys are
170
170
  sent solely to the connection's base URL (HTTPS, or HTTP on loopback) and never to
@@ -172,8 +172,8 @@ napplets or the message log. The `llm` interface is advertised whenever the pane
172
172
  present; it shows `⚠ llm` until a connection exists. A napplet's `select()` then
173
173
  offers to open the panel and answers `unsupported` until you add one; with
174
174
  connections, a chooser lists the compatible ones. Every `generate()` shows a consent
175
- dialog naming the napplet, route, model and disclosed counts before any prompt
176
- text leaves the browser. See [Language models](https://github.com/kehto/web/blob/main/docs/llm.md).
175
+ dialog naming the napplet, route, model, disclosed counts, any tool definitions offered and the number of tool results being sent before any prompt
176
+ text leaves the browser. Paja relays tool calls to the napplet and never runs one. See [Language models](https://github.com/kehto/web/blob/main/docs/llm.md).
177
177
 
178
178
  Other domains are equally capability-bound. Relay, outbox, and count require
179
179
  live relays; count uses NIP-45 `COUNT` without downloading events. Storage
@@ -213,7 +213,7 @@ outside this behavior.
213
213
  [NAP-IDENTITY at `6461e4b37c29dc09a20dff35d9515889c4433874`](https://github.com/napplet/naps/blob/6461e4b37c29dc09a20dff35d9515889c4433874/naps/NAP-IDENTITY.md)
214
214
  is byte-identical to the recorded `napplet/naps` master document for this phase.
215
215
  Pinned [NAP-OUTBOX at `4589a8f9a16d8aa29b3740e2b3b0cdca11e0976e`](https://github.com/napplet/naps/blob/4589a8f9a16d8aa29b3740e2b3b0cdca11e0976e/naps/NAP-OUTBOX.md)
216
- together with installed `@napplet/nap@0.32.0` types is the PoC contract because
216
+ together with the installed `@napplet/nap` NAP-OUTBOX types (0.37.0 for host packages) is the PoC contract because
217
217
  current master has no NAP-OUTBOX path. Paja therefore makes no current-master
218
218
  OUTBOX conformance claim. Blossom upload behavior targets pinned
219
219
  [NAP-UPLOAD at `a7cc17463cbf5d9cb87884b31071bc4fc826034c`](https://github.com/napplet/naps/blob/a7cc17463cbf5d9cb87884b31071bc4fc826034c/naps/NAP-UPLOAD.md).
@@ -602,7 +602,7 @@ This non-normative guidance defers to the living [NAP-GAMEPAD](https://github.co
602
602
 
603
603
  ## LLM integration
604
604
 
605
- This non-normative guidance defers to the living [NAP-LLM](https://github.com/napplet/naps/pull/134) (checked at `3e10939`). Services export `createLlmService`, `LlmServiceError`, the provider mappers and `LLM_PROVIDER_PRESETS`; shell exports `getShellDomainState` and the `LlmHooks` adapter field; acl exports `llm:generate`. The runtime routes `llm.*` to one registered service and answers every sanctioned request with exactly one `llm.<op>.result`, shaping missing-service and ACL failures as `{ code: 'unsupported' }`. Hosts implement `LlmConnectionHost`; the service enforces schema, handle ownership, a per-window live-handle bound (`maxHandlesPerWindow`), consent before submission, duplicate ids, cancellation and deadline races, ordered deltas and safe errors, and passes `select`/`authorize` a `{ signal }` that withdraws stale prompts. `createHttpLlmProvider({ stream: true })` streams provider output into `llm.delta`. Advertisement stays binary on the wire while hosts report a third `unconfigured` state until the user adds a connection. See [Language models](https://github.com/kehto/web/blob/main/docs/llm.md).
605
+ This non-normative guidance defers to the living [NAP-LLM](https://github.com/napplet/naps/pull/134) (checked at `5e93bdf`). Services export `createLlmService`, `LlmServiceError`, the provider mappers and `LLM_PROVIDER_PRESETS`; shell exports `getShellDomainState` and the `LlmHooks` adapter field; acl exports `llm:generate`. The runtime routes `llm.*` to one registered service and answers every sanctioned request with exactly one `llm.<op>.result`, shaping missing-service and ACL failures as `{ code: 'unsupported' }`. Hosts implement `LlmConnectionHost`; the service enforces schema, handle ownership, a per-window live-handle bound (`maxHandlesPerWindow`), consent before submission, duplicate ids, cancellation and deadline races, ordered deltas and safe errors, and passes `select`/`authorize` a `{ signal }` that withdraws stale prompts. `createHttpLlmProvider({ stream: true })` streams provider output into `llm.delta` as block start/delta/end events. Results carry `content` parts (text, thinking and tool calls); tool calls and results are validated and relayed, and Kehto never executes one. Advertisement stays binary on the wire while hosts report a third `unconfigured` state until the user adds a connection. See [Language models](https://github.com/kehto/web/blob/main/docs/llm.md).
606
606
 
607
607
  ## NIP-5D runtime pointers
608
608