@dudko.dev/agent-web 0.0.1 → 0.0.3
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 +41 -1
- package/dist/agent-web.js +177 -0
- package/dist/agent-web.js.map +1 -0
- package/dist/index.cjs +186 -95
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -7
- package/dist/index.d.ts +38 -7
- package/dist/index.js +186 -95
- package/dist/index.js.map +1 -1
- package/dist/mcp.cjs +71 -44
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.d.cts +5 -1
- package/dist/mcp.d.ts +5 -1
- package/dist/mcp.js +71 -44
- package/dist/mcp.js.map +1 -1
- package/package.json +56 -15
package/README.md
CHANGED
|
@@ -16,6 +16,12 @@ agent — with host-defined **tools**, optional **MCP**, **system prompts**,
|
|
|
16
16
|
**IndexedDB** storage, and an **encrypted token vault**. UI-agnostic: it streams
|
|
17
17
|
typed events; you render them however you like.
|
|
18
18
|
|
|
19
|
+
[](https://www.npmjs.com/package/@dudko.dev/agent-web)
|
|
20
|
+
[](https://www.npmjs.com/package/@dudko.dev/agent-web)
|
|
21
|
+
[](https://www.npmjs.com/package/@dudko.dev/agent-web)
|
|
22
|
+

|
|
23
|
+

|
|
24
|
+
|
|
19
25
|
> Browser sibling of the Node package
|
|
20
26
|
> [`@dudko.dev/agent`](https://www.npmjs.com/package/@dudko.dev/agent).
|
|
21
27
|
|
|
@@ -37,6 +43,37 @@ npm install @browser-ai/web-llm @mlc-ai/web-llm
|
|
|
37
43
|
npm install @modelcontextprotocol/sdk
|
|
38
44
|
```
|
|
39
45
|
|
|
46
|
+
### CDN / standalone bundle (no build step)
|
|
47
|
+
|
|
48
|
+
`dist/agent-web.js` is a **self-contained ESM bundle** of the core — `ai`,
|
|
49
|
+
`zod` and `idb` are baked in. It ships in the npm package (so it's on every
|
|
50
|
+
CDN) and is attached to each
|
|
51
|
+
[GitHub release](https://github.com/dudko-dev/agent-web/releases) as
|
|
52
|
+
`agent-web-<version>.min.js`:
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<script type="module">
|
|
56
|
+
import { createAgent, defineTool } from 'https://cdn.jsdelivr.net/npm/@dudko.dev/agent-web/dist/agent-web.js'
|
|
57
|
+
// or: https://unpkg.com/@dudko.dev/agent-web/dist/agent-web.js
|
|
58
|
+
</script>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Bundler users can also opt into it via the `@dudko.dev/agent-web/bundle`
|
|
62
|
+
subpath. Optional provider peers stay external even in the bundle; in a
|
|
63
|
+
bundler-less page, map the ones you use with an import map (the runtime
|
|
64
|
+
`import()` respects it) — direct `LanguageModel`s and `gateway` specs need no
|
|
65
|
+
import map at all:
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<script type="importmap">
|
|
69
|
+
{
|
|
70
|
+
"imports": {
|
|
71
|
+
"@ai-sdk/openai": "https://cdn.jsdelivr.net/npm/@ai-sdk/openai/+esm"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
40
77
|
## Quick start — cloud model, bring-your-own-key
|
|
41
78
|
|
|
42
79
|
Keys are stored **encrypted at rest** (WebCrypto, IndexedDB) and referenced by
|
|
@@ -155,10 +192,11 @@ enters your core bundle.
|
|
|
155
192
|
| `planner` / `synthesizer` | = `model` | per-stage model overrides (inherit base provider/creds if partial) |
|
|
156
193
|
| `credentials` | — | a `CredentialStore` for `credentialRef` keys |
|
|
157
194
|
| `tools` | `{}` | host tools (`defineTool`) |
|
|
195
|
+
| `availableTools` / `excludedTools` | — | whitelist / blacklist of tool names mounted from `tools` |
|
|
158
196
|
| `toolMode` | `'auto'` | `native` \| `prompted` \| `auto` (cloud→native, local→prompted) |
|
|
159
197
|
| `systemPrompt` | — | prepended to every phase |
|
|
160
198
|
| `describeState` | — | serialize world state into prompt context |
|
|
161
|
-
| `memory` | — | `ContextStore` (`IndexedDBStore` / `MemoryStore`) |
|
|
199
|
+
| `memory` | — | `ContextStore` (`IndexedDBStore` / `MemoryStore`); recent turns are read back into the planner prompt |
|
|
162
200
|
| `maxIterations` / `maxStepsPerTask` / `maxRevisions` | 8 / 4 / 2 | loop caps |
|
|
163
201
|
| `chatTimeoutMs` | 120000 | per-call watchdog |
|
|
164
202
|
| `replan` / `synthesize` | `true` | toggle phases |
|
|
@@ -170,6 +208,8 @@ enters your core bundle.
|
|
|
170
208
|
- [docs/providers.md](docs/providers.md) — every provider, CORS & direct-vs-proxy.
|
|
171
209
|
- [docs/security.md](docs/security.md) — the token vault & its threat model.
|
|
172
210
|
- [docs/tasks.md](docs/tasks.md) — status & roadmap.
|
|
211
|
+
- [`@dudko.dev/agent`](https://www.npmjs.com/package/@dudko.dev/agent) — the
|
|
212
|
+
Node/server sibling (stdio MCP, persistence/resume, OpenTelemetry, CLI).
|
|
173
213
|
|
|
174
214
|
## License
|
|
175
215
|
|