@dudko.dev/agent-web 0.0.51 → 0.0.52
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 +1 -1
- package/dist/agent-web.js +167 -167
- package/dist/agent-web.js.map +1 -1
- package/dist/{chunk-EUJWS42C.js → chunk-QWOKTI62.js} +3 -2
- package/dist/chunk-QWOKTI62.js.map +1 -0
- package/dist/fit-reference-worker.d.cts +1 -1
- package/dist/fit-reference-worker.d.ts +1 -1
- package/dist/index.cjs +232 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -2
- package/dist/index.d.ts +50 -2
- package/dist/index.js +232 -13
- package/dist/index.js.map +1 -1
- package/dist/{media-fit-worker-CFK2z8LF.d.cts → media-fit-worker-Do1qzteo.d.cts} +12 -2
- package/dist/{media-fit-worker-CFK2z8LF.d.ts → media-fit-worker-Do1qzteo.d.ts} +12 -2
- package/dist/{sandbox-X6T4ZOEQ.js → sandbox-QNEDQZTA.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-EUJWS42C.js.map +0 -1
- /package/dist/{sandbox-X6T4ZOEQ.js.map → sandbox-QNEDQZTA.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1088,7 +1088,7 @@ Details: [Several tabs](docs/capabilities.md#several-tabs) ·
|
|
|
1088
1088
|
| `mcpSkills` | `{ consent: 'once-per-skill' }` | experimental: when a person is asked (`toolApproval.onRequest`, a request with `skill`) before an MCP server's skill enters the model's context, for servers whose `skills: { consent }` does not say - `'once-per-skill'`, `'ask'` (every run) or `'never'` - see [MCP skills](#mcp-skills-experimental-a-servers-instructions-as-skills) |
|
|
1089
1089
|
| `egress` | off | what the **model** may fetch (`web_fetch`): `true` = any public host over https, or `{ allow, deny, protocols, allowPrivateNetwork, fetch, ... }`; a browser can't pin DNS, so prefer an `allow` list — see [Egress](docs/capabilities.md#egress-what-the-model-may-fetch) |
|
|
1090
1090
|
| `search` | off | the model may **search the web** (`web_search`: a short list of title / url / snippet): `{ engine: fn }` - a search engine of yours, any API (it may answer `{ results, usage }`: a search through a model is charged as phase `'search'`) - or `{ provider: 'google', credentialRef, model, baseURL, maxResults, allowPrivateNetwork, readOnly, fetch }` - Google Search through Gemini grounding: one extra `generateContent` call per search on a Gemini key (default model `gemini-2.5-flash-lite`), which **spends model tokens** (`usage` phase `'search'`) and returns **Google redirect links**, not the pages' URLs. No key ships with the library and none is written in the config (`credentialRef` names it in `credentials`); the request reaches only that API; with `egress`, results the model could not fetch are left out. Recipes for Tavily / Brave / SearXNG as an `engine`, the free-tier models and what the redirect links mean — see [Search](docs/capabilities.md#search-finding-the-page-to-fetch) |
|
|
1091
|
-
| `media` | off | image generation, speech and transcription as tools, each mounted only when its model is set: `{ imageModel, imageInputs, fitReference, fitTimeoutMs, speechModel, transcriptionModel, maxCalls, timeoutMs, files, folder, voice, speechFormat, transcribeAttachments }`. A model is an AI SDK image / speech / transcription model object or a `ProviderModelSpec` (key by `credentialRef`). Generated files go to the virtual file system and the model gets a path, never the
|
|
1091
|
+
| `media` | off | image generation, speech and transcription as tools, each mounted only when its model is set: `{ imageModel, imageInputs, fitReference, fitTimeoutMs, viewGenerated, speechModel, transcriptionModel, maxCalls, timeoutMs, files, folder, voice, speechFormat, transcribeAttachments }`. A model is an AI SDK image / speech / transcription model object or a `ProviderModelSpec` (key by `credentialRef`). Generated files go to the virtual file system and the model gets a path - and, with `viewGenerated` (on by default where the executor's model reads pictures and its adapter carries a picture in a tool result: Gemini, Claude, OpenAI's Responses API, xAI, DeepSeek - never Chat Completions or an OpenAI-compatible endpoint), the picture `generate_image` made ONCE, in the next request only, at most 1568 px / 3.75 MiB (a larger one as `fitReference`'s copy or not at all; ~1 100-1 600 tokens), never in an event, the result, a checkpoint or memory; `generate_image({ prompt, images? })` sends up to 4 reference pictures of the workspace (the person's photo, "like this") to an image model that takes them (`imageInputs`, else the model's own `supportsFileInputs`) - checked by their bytes and capped (4096 px, 8 MiB each, 12 MiB together); one that takes none makes the picture from the text and the result says so; a picture over those bounds is refused - or, with `fitReference`, sent as a smaller copy (the workspace file stays the original): `fitReferenceInWorker(() => new Worker(new URL('@dudko.dev/agent-web/fit-reference-worker', import.meta.url), { type: 'module' }))` runs the ready `fitReferenceImage` (the browser's `createImageBitmap` + `OffscreenCanvas`; JPEG for photos, PNG kept when it fits) in a Web Worker, so the page never waits on an encode; only an original within 50 MiB / 200 MP (read from its header) is ever handed over, the copy is checked again, the result lists it in `references.fitted`, and `fitTimeoutMs` (30 000) bounds each call; attached audio is transcribed to text; calls are counted in `usage.mediaCalls` (and the other media fields) and capped per run — see [Media](docs/capabilities.md#media-images-speech-and-transcription) |
|
|
1092
1092
|
| `decisionModel` | off | a **decision model** - answers a closed question with one option and a probability instead of writing text: `{ providerType: 'google', model: 'gemini-decision-1', credentialRef }` (the key stays in `credentials`; the request reaches only that API) or an object with `decide(question, { abortSignal })`. Where it is confident it replaces the replanner's continue / finish call and a pipeline node's route call; never consulted for tool approval or egress — see [Decision models](docs/capabilities.md#decision-models) |
|
|
1093
1093
|
| `decision` | `{}` | `{ confidenceThreshold, timeoutMs, replan, route }` (defaults 0.8, 5000 ms, on, on): below the threshold, on an error, a timeout or an answer that is not an option, the ordinary model call runs unchanged |
|
|
1094
1094
|
| `askUser` | off | the **model** may ask the person ONE closed question with buttons instead of guessing (the built-in `ask_user`: a question, 2-6 options, optionally `multiple` or `allowOther`): `{ onQuestion(req, { signal }), timeoutMs, maxPerRun }`. `onQuestion` answers `{ choice: [label] }`, `{ other: text }` or `{ declined: true }`; without it there is no tool (`true` / `{}` = the handler comes later, e.g. from `useAgent`). At most `maxPerRun` (3) per run, helpers and subagents included; each waits `timeoutMs` (300000; the step's limit stops meanwhile), a stop ends the wait. Events `user.question-asked` / `user.question-answered` (the labels picked, never the person's own words). The question and options are the model's text, cleaned: render them as plain text. See [Asking the user](docs/capabilities.md#asking-the-user-a-question-with-choices) |
|