@tanstack-ai-browser/prompt-api 0.0.0-stage → 0.2.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +96 -2
  3. package/dist/adapter.d.ts +160 -0
  4. package/dist/adapter.d.ts.map +1 -0
  5. package/dist/adapter.js +413 -0
  6. package/dist/index.d.ts +11 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +7 -0
  9. package/dist/limit.d.ts +119 -0
  10. package/dist/limit.d.ts.map +1 -0
  11. package/dist/limit.js +203 -0
  12. package/dist/messages.d.ts +20 -0
  13. package/dist/messages.d.ts.map +1 -0
  14. package/dist/messages.js +95 -0
  15. package/dist/model-meta.d.ts +21 -0
  16. package/dist/model-meta.d.ts.map +1 -0
  17. package/dist/model-meta.js +18 -0
  18. package/dist/model.d.ts +28 -0
  19. package/dist/model.d.ts.map +1 -0
  20. package/dist/model.js +53 -0
  21. package/dist/reasoning.d.ts +42 -0
  22. package/dist/reasoning.d.ts.map +1 -0
  23. package/dist/reasoning.js +113 -0
  24. package/dist/sessions.d.ts +48 -0
  25. package/dist/sessions.d.ts.map +1 -0
  26. package/dist/sessions.js +275 -0
  27. package/dist/shared-load.d.ts +48 -0
  28. package/dist/shared-load.d.ts.map +1 -0
  29. package/dist/shared-load.js +103 -0
  30. package/dist/store.d.ts +8 -0
  31. package/dist/store.d.ts.map +1 -0
  32. package/dist/store.js +17 -0
  33. package/dist/tools.d.ts +50 -0
  34. package/dist/tools.d.ts.map +1 -0
  35. package/dist/tools.js +314 -0
  36. package/dist/types.d.ts +81 -0
  37. package/dist/types.d.ts.map +1 -0
  38. package/dist/types.js +13 -0
  39. package/package.json +59 -3
  40. package/src/adapter.test.ts +571 -0
  41. package/src/adapter.ts +521 -0
  42. package/src/index.ts +13 -0
  43. package/src/messages.ts +102 -0
  44. package/src/model-meta.ts +35 -0
  45. package/src/model.ts +75 -0
  46. package/src/tools.test.ts +129 -0
  47. package/src/tools.ts +311 -0
  48. package/src/types.ts +110 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 daveycodez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,97 @@
1
- # Temporary Holding Version
1
+ # @tanstack-ai-browser/prompt-api
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A [TanStack AI](https://tanstack.com/ai) adapter for the browser's built-in language model, through the [Prompt API](https://developer.chrome.com/docs/ai/prompt-api) (`LanguageModel`): Gemini Nano in Chrome, Phi-4-mini in Edge. The browser downloads the model once for every site and runs it on the device; the page downloads nothing and nothing leaves the device.
4
+
5
+ ```sh
6
+ npm install @tanstack-ai-browser/prompt-api @tanstack/ai
7
+ ```
8
+
9
+ ```ts
10
+ import { chat } from "@tanstack/ai"
11
+ import { promptApiText } from "@tanstack-ai-browser/prompt-api"
12
+
13
+ const adapter = promptApiText()
14
+ if ((await adapter.availability()) !== "unavailable") {
15
+ const stream = chat({ adapter, messages, threadId, tools })
16
+ }
17
+ ```
18
+
19
+ The root has `promptApiText(config?)` (or `promptApiText("text", config?)`: the model is whichever the browser has, so naming it is optional), `PromptApiTextAdapter` and the types `PromptApiConfig`, `PromptApiTextModelOptions`, `Availability` and `DownloadProgressCallback`. It also has the catalog: `PROMPT_API_CHAT_MODELS` (one model, `"text"`: whichever the browser provides) and `PROMPT_API_MODEL_META`, with the types `PromptApiChatModel` and `PromptApiModelMeta`.
20
+
21
+ The Prompt API is in desktop Chrome and Edge (tested in Chrome 156, where web pages have it without flags), on devices with enough memory, GPU and disk (Chrome asks for 22 GB free and either a GPU with more than 4 GB or 16 GB of RAM). It isn't in Web Workers, and a cross-origin iframe needs `allow="language-model"`.
22
+
23
+ ## The model
24
+
25
+ - `adapter.availability()` is the browser's own `LanguageModel.availability()` for the adapter's `languages` and `inputs`: `"available"`, `"downloadable"`, `"downloading"` or `"unavailable"` (no Prompt API, or the device can't run it). Give the adapter `inputs: ["image"]` or `["audio"]` if users send them (audio needs a GPU).
26
+ - `adapter.availableInputModalities()` resolves to the kinds of input the browser's model takes here (`"text"`, `"image"`, `"audio"`): each kind `LanguageModel.availability()` doesn't call `"unavailable"` for the adapter's `languages`, asked one kind at a time. `inputModalities` lists what the Prompt API can take; this says what this device can, so offer attachments by it. Empty where there's no model.
27
+ - `adapter.create({ onDownloadProgress?, signal? }?)` downloads the model if it isn't on the device and starts it, with the download's progress, 0 to 1, then 1 once it's ready (the config's `onDownloadProgress` hears it too). Chrome wants a click on the page before it downloads, so call it from the click that turns the model on. `chat()` doesn't need it: its first session does the same. Aborting `signal` aborts the browser's `create()`.
28
+ - `onContextOverflow` in the config is called when a thread's session overflows its context window (the session's `contextoverflow` event); Chrome then drops the oldest messages after the system prompt.
29
+ - `adapter.contextUsage(threadId?)` and `adapter.contextWindow(threadId?)` resolve to the tokens a thread's session holds (the system prompt, the tools and the conversation so far) and the tokens it can hold: the session's own `contextUsage` and `contextWindow`. The thread is `chat()`'s `threadId` (or its `promptCache.key`); left out, the thread used last. `undefined` where the thread keeps no session (see Sessions).
30
+ - Token usage: the Prompt API reports none, so the adapter derives it from the session's own counts and sends it with a reply's end (`RUN_FINISHED`, and a structured answer's `usage`). The prompt's tokens are what the session held before the prompt plus the new messages as the session measures them (`measureContextUsage`); what a thread's kept session held is reported as cached, since it doesn't read it again. The reply's are its text measured the same way, less an empty message's count (the turn markers a session counts around any message), so a step that stops at a tool call is counted too. In Chrome 157 that count equals the number of pieces the reply streams in. Where the browser can't measure, no usage is sent.
31
+ - `adapter.destroy()` closes every thread's session (see Sessions); the browser keeps the model.
32
+
33
+ `languages` (`["en"]` by default) tells the model which languages to expect in and out; Chrome's model takes `en`, `es`, `ja`, `de` and `fr`. `modelOptions` takes what a session takes, with Chrome's names: `samplingMode` (`"most-predictable"` to `"most-creative"`; on web pages only in Chrome's Sampling Parameters origin trial), and `temperature` and `topK` (extensions only). The Prompt API has no output cap, nucleus sampling, penalties or stop sequences, so `modelOptions` has none. The model doesn't reason, so `chat()` offers no `reasoning` option for it, and a `reasoning` request is ignored.
34
+
35
+ ## Sessions
36
+
37
+ Each thread (`chat()`'s `threadId`) keeps a session, created with the system prompt (and the tools, see below) as its initial prompt. A step prompts it with only the messages it doesn't hold yet: the user's next message, or a tool's result. If the conversation doesn't go on from what the session holds (an edited or regenerated message, a new system prompt or tool list, other sampling settings), the session is closed and a new one reads the whole conversation. A step stopped at a tool call isn't in the session (Chrome drops a stopped turn whole), so the next step sends it along with the result. Structured output prompts the same session.
38
+
39
+ A session holds its conversation in the model's memory, about 100 MB for 6,000 tokens in Chrome 156, and only `destroy()` frees it (a session that's just dropped keeps it for a while). So four threads keep a session at most, and the least recently used one closes first.
40
+
41
+ ## Tool calls
42
+
43
+ Pass tools to `chat({ tools })` as with any adapter; `chat()` runs them. The Prompt API's own tool use doesn't work on web pages yet (in Chrome 156 a session that expects tool calls fails to start, and `tools` alone are never called), so tools go by prompt. The tools are added to the system prompt as JSON, with how to call them:
44
+
45
+ ````
46
+ You are a helpful AI assistant with access to tools.
47
+
48
+ # Available Tools
49
+ [
50
+ {
51
+ "name": "get_weather",
52
+ "description": "Weather for a city",
53
+ "parameters": { …the tool's input schema… }
54
+ }
55
+ ]
56
+
57
+ # Tool Calling Instructions
58
+ Only request one tool call at a time. Wait for tool results before asking for another tool.
59
+
60
+ To call a tool, output JSON in this exact format inside a ```tool_call code fence:
61
+
62
+ ```tool_call
63
+ {"name": "tool_name", "arguments": {"param1": "value1", "param2": "value2"}}
64
+ ```
65
+
66
+ Tool responses will be provided in ```tool_result fences. Each line contains JSON like:
67
+ ```tool_result
68
+ {"id": "call_123", "name": "tool_name", "result": {...}, "error": false}
69
+ ```
70
+ Use the `result` payload (and treat `error` as a boolean flag) when continuing the conversation.
71
+
72
+ Important:
73
+ - Use exact tool and parameter names from the schema above
74
+ - Arguments must be a valid JSON object matching the tool's parameters
75
+ - You can include brief reasoning before or after the tool call
76
+ - If no tool is needed, respond directly without tool_call fences
77
+ ````
78
+
79
+ The reply streams as text until a ```` ```tool_call ```` fence starts (```` ```tool-call ````, `<tool_call>…</tool_call>`, `<|tool_call>…<tool_call|>`, `<|tool_call_start|>…<|tool_call_end|>` and a Python-style `[name(key="value")]` work too); the fence is held back, and the first fence that closes with a call in it ends the reply: the generation stops (text after the fence, in the piece that closed it, is shown after the call), and the step ends with `TOOL_CALL_START`, `TOOL_CALL_ARGS`, `TOOL_CALL_END` and `RUN_FINISHED` `finishReason: "tool_calls"`. One call per step. A call reads `name` and `arguments` (or `parameters`), as an object or a JSON string; Python-style calls and `call:name{key:value}` are read too. A fence without a call is shown as text and the reply goes on, as does an unclosed fence at the end of the reply; other code fences are text.
80
+
81
+ The call is emitted as written: `chat()` checks the tool's name and arguments, and reports a bad call back to the model as the tool's result. The step stopped at the call isn't in the thread's session (Chrome drops a stopped turn), so the next step sends the call along with its result.
82
+
83
+ In later steps the model sees its earlier calls as the same fences and the results as a user message with a ```` ```tool_result ```` fence, one line per result: `{"id", "name", "result", "error"}`, where `result` is the tool's JSON output (or its text, or the error message) and `error` is a boolean. `toolChoice: "none"` leaves the tools out; the Prompt API can't force a tool, so `"required"` and a named tool work like `"auto"`.
84
+
85
+ ## Structured output
86
+
87
+ `chat({ outputSchema })` prompts the thread's session once under the Prompt API's `responseConstraint`, with the schema as given; the result is parsed as JSON and `chat()` validates it. A schema Chrome can't enforce fails with Chrome's error.
88
+
89
+ ## Images and audio
90
+
91
+ User messages can carry images and audio (TanStack AI's `image` and `audio` parts, as base64 data or a URL); they're loaded into Blobs, and the session is created expecting them. A URL from another site needs CORS. The model can't write images or audio, and it can't read video or documents.
92
+
93
+ ## Errors and aborts
94
+
95
+ A failure ends the stream with `RUN_ERROR` carrying the error's own message (the Prompt API's `DOMException`s: `NotAllowedError` when Chrome wants a click before the download, `QuotaExceededError` for a conversation too long for the model…). Aborting the request (`abortController` or `request.signal`) stops the generation and ends the stream with `RUN_ERROR` (`code: "aborted"`); the thread keeps its session. No token usage is reported.
96
+
97
+ **Status:** early (0.0.x); the API may change, and so does the Prompt API. See the [repository README](https://github.com/daveycodez/tanstack-ai-browser#readme).
@@ -0,0 +1,160 @@
1
+ import type { AdapterYieldChunk, TextOptions } from "@tanstack/ai";
2
+ import { BaseTextAdapter } from "@tanstack/ai/adapters";
3
+ import type { StructuredOutputOptions, StructuredOutputResult } from "@tanstack/ai/adapters";
4
+ import type { Availability, MediaInput } from "./model.js";
5
+ import type { PromptApiChatModel } from "./model-meta.js";
6
+ import type { DownloadProgressCallback, SamplingMode } from "./types.js";
7
+ export type PromptApiConfig = {
8
+ /**
9
+ * Languages the conversation is in, input and output: ["en"] by default.
10
+ * Chrome's model takes "en", "es", "ja", "de" and "fr", and checks its
11
+ * safety filters for the output language.
12
+ */
13
+ languages?: ReadonlyArray<string>;
14
+ /**
15
+ * Kinds of input besides text the conversation will have ("image",
16
+ * "audio"), for `availability()`: images need more of the device, audio a
17
+ * GPU. Text only by default. Sessions expect what each conversation has.
18
+ */
19
+ inputs?: ReadonlyArray<MediaInput>;
20
+ /**
21
+ * The browser's download of its model, 0 to 1, when a call starts it; then
22
+ * 1 once a session has started. To download ahead of time, see `create`.
23
+ */
24
+ onDownloadProgress?: DownloadProgressCallback;
25
+ /**
26
+ * Called when a thread's session overflows its context window (the
27
+ * session's `contextoverflow` event): Chrome then drops the oldest
28
+ * messages after the system prompt to make room.
29
+ */
30
+ onContextOverflow?: (event: Event) => void;
31
+ };
32
+ /** Per-call `modelOptions`: the session's sampling. */
33
+ export type PromptApiTextModelOptions = {
34
+ /**
35
+ * Sampling preset, "most-predictable" to "most-creative" ("balanced" by
36
+ * default). Chrome takes it on web pages only in its Sampling Parameters
37
+ * origin trial.
38
+ */
39
+ samplingMode?: SamplingMode;
40
+ /** Raw sampling, for extensions (web pages ignore it). Chrome refuses it together with `samplingMode`. */
41
+ temperature?: number;
42
+ topK?: number;
43
+ };
44
+ type MetadataByModality = {
45
+ text: unknown;
46
+ image: unknown;
47
+ audio: unknown;
48
+ video: unknown;
49
+ document: unknown;
50
+ };
51
+ export declare class PromptApiTextAdapter extends BaseTextAdapter<PromptApiChatModel, PromptApiTextModelOptions, readonly ["text", "image", "audio"], MetadataByModality> {
52
+ readonly kind: "text";
53
+ readonly name: "prompt-api";
54
+ readonly provider: "prompt-api";
55
+ readonly api: "prompt-api";
56
+ readonly inputModalities: readonly ["text", "image", "audio"];
57
+ private readonly languages;
58
+ private readonly inputs;
59
+ private readonly onDownloadProgress;
60
+ private readonly onContextOverflow;
61
+ /** Each thread's session, least recently used first. */
62
+ private readonly kept;
63
+ constructor(config: PromptApiConfig, model: PromptApiChatModel);
64
+ /**
65
+ * The browser's own `LanguageModel.availability()` for this adapter's
66
+ * `languages` and `inputs`: "available" (on the device), "downloadable"
67
+ * or "downloading" (it downloads when a session starts, or at `create`),
68
+ * or "unavailable" (no Prompt API, or the device can't run it).
69
+ */
70
+ availability(): Promise<Availability>;
71
+ /**
72
+ * The kinds of input the browser's model takes here, of the
73
+ * `inputModalities` the Prompt API has: each kind the browser's
74
+ * `LanguageModel.availability()` doesn't call "unavailable" for this
75
+ * adapter's `languages` (images need more of the device, audio a GPU).
76
+ * Empty where there's no model. Sessions expect what each conversation has.
77
+ */
78
+ availableInputModalities(): Promise<Array<"text" | MediaInput>>;
79
+ /**
80
+ * Downloads the browser's model if it isn't on the device and starts it,
81
+ * with the download's progress, 0 to 1, then 1 once it's ready. Resolves
82
+ * to this adapter; rejects if it can't start (fine to leave unawaited).
83
+ * `chat()` doesn't need it, but the browser asks for a click on the page
84
+ * before a download: call it from the click that turns the model on.
85
+ * Aborting `signal` aborts the browser's `create()`.
86
+ */
87
+ create(options?: {
88
+ onDownloadProgress?: DownloadProgressCallback;
89
+ signal?: AbortSignal;
90
+ }): Promise<this>;
91
+ /**
92
+ * Tokens a thread's session holds (the session's `contextUsage`): the
93
+ * system prompt, the tools and the conversation so far. The thread is
94
+ * `chat()`'s `threadId` (or its `promptCache.key`); left out, the thread
95
+ * used last. Undefined where the thread keeps no session.
96
+ */
97
+ contextUsage(threadId?: string): Promise<number | undefined>;
98
+ /**
99
+ * Tokens a thread's session can hold (the session's `contextWindow`), for
100
+ * the thread as `contextUsage` takes it. Undefined where the thread keeps
101
+ * no session.
102
+ */
103
+ contextWindow(threadId?: string): Promise<number | undefined>;
104
+ /** A thread's kept session, or the last used thread's; undefined if there's none, or it failed to start. */
105
+ private keptSession;
106
+ /** Closes every thread's session. The browser keeps the model. */
107
+ destroy(): Promise<void>;
108
+ /** Keeps a thread's session, closing the least recently used past the limit. */
109
+ private keep;
110
+ /** Closes a thread's session, unless a step is using it. */
111
+ private drop;
112
+ /** A session for this call, holding the system prompt, that reports an overflow. */
113
+ private session;
114
+ /**
115
+ * The step's session and the messages to prompt it with: the thread's
116
+ * kept session if the conversation goes on from what it holds (only the
117
+ * new messages), else a new one with the whole conversation. The session
118
+ * is reserved before anything is awaited, so a second step on a busy
119
+ * thread gets a session of its own (`kept` undefined), closed after it.
120
+ * Threads go by `promptCache.key`; retention "none" keeps no session.
121
+ */
122
+ private begin;
123
+ /** Frees a step's session: a kept one stays for the thread unless the step failed. */
124
+ private end;
125
+ /**
126
+ * A step's token counts, which the Prompt API doesn't report, from the
127
+ * session's own: the tokens it held before the prompt, the prompt as the
128
+ * session measures it, and the reply measured the same way, less an empty
129
+ * message's tokens (the turn markers the session counts around any
130
+ * message). What a kept session held is cached: it isn't read again. A
131
+ * new session read what it holds (the system prompt) in this step.
132
+ * Nothing where the browser can't measure.
133
+ */
134
+ private usage;
135
+ chatStream(options: TextOptions<PromptApiTextModelOptions>): AsyncIterable<AdapterYieldChunk>;
136
+ /**
137
+ * A JSON answer for `chat({ outputSchema })`: the thread's session
138
+ * answers the conversation under the Prompt API's `responseConstraint`,
139
+ * which holds the model to the schema as given. `chat()` validates the
140
+ * result.
141
+ */
142
+ structuredOutput(options: StructuredOutputOptions<PromptApiTextModelOptions>): Promise<StructuredOutputResult<unknown>>;
143
+ }
144
+ /**
145
+ * A TanStack AI text adapter for the browser's built-in model, through the
146
+ * Prompt API: Gemini Nano in Chrome, Phi-4-mini in Edge. The model is
147
+ * whichever the browser has ("text", as other Prompt API libraries name it), so naming it is optional.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const adapter = promptApiText()
152
+ * if ((await adapter.availability()) !== "unavailable") {
153
+ * chat({ adapter, messages, tools })
154
+ * }
155
+ * ```
156
+ */
157
+ export declare function promptApiText(config?: PromptApiConfig): PromptApiTextAdapter;
158
+ export declare function promptApiText(model: PromptApiChatModel, config?: PromptApiConfig): PromptApiTextAdapter;
159
+ export {};
160
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAg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