@dudko.dev/agent-web 0.0.5 → 0.0.7
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 +13 -1
- package/dist/agent-web.js +69 -61
- package/dist/agent-web.js.map +1 -1
- package/dist/index.cjs +107 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -43
- package/dist/index.d.ts +76 -43
- package/dist/index.js +106 -29
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -25,6 +25,11 @@ typed events; you render them however you like.
|
|
|
25
25
|
> Browser sibling of the Node package
|
|
26
26
|
> [`@dudko.dev/agent`](https://www.npmjs.com/package/@dudko.dev/agent).
|
|
27
27
|
|
|
28
|
+
> **Using React?** [`@dudko.dev/agent-web-react`](https://www.npmjs.com/package/@dudko.dev/agent-web-react)
|
|
29
|
+
> wraps this core in a `useAgent` hook, an `<AgentProvider>` context and drop-in
|
|
30
|
+
> UI components — try the **[live demo](https://dudko-dev.github.io/agent-web-react/)**
|
|
31
|
+
> ([source](https://github.com/dudko-dev/agent-web-react)).
|
|
32
|
+
|
|
28
33
|
## Install
|
|
29
34
|
|
|
30
35
|
```bash
|
|
@@ -160,7 +165,9 @@ const { object } = await generateStructured(
|
|
|
160
165
|
{ prompt: 'Suggest a title and tags for this article: …' },
|
|
161
166
|
)
|
|
162
167
|
|
|
163
|
-
//
|
|
168
|
+
// Tool-calling with feedback (native or prompted), normalized result. In both
|
|
169
|
+
// modes the model sees its tool results and can keep going, up to `maxSteps`
|
|
170
|
+
// rounds (default 4; prompted models get the results as a TOOL RESULTS turn):
|
|
164
171
|
const { text: reply, toolCalls } = await runToolLoop(model, {
|
|
165
172
|
mode: 'native',
|
|
166
173
|
prompt: 'Add a title',
|
|
@@ -200,6 +207,7 @@ enters your core bundle.
|
|
|
200
207
|
| `maxIterations` / `maxStepsPerTask` / `maxRevisions` | 8 / 4 / 2 | loop caps |
|
|
201
208
|
| `chatTimeoutMs` | 120000 | per-call watchdog |
|
|
202
209
|
| `replan` / `synthesize` | `true` | toggle phases |
|
|
210
|
+
| `replanAfter` | `'failure'` | replan trigger: `'failure'` \| `'always'` \| `(stepResult) => boolean \| Promise<boolean>` |
|
|
203
211
|
| `compressAfterChars` | 12000 | summarize old history past this size |
|
|
204
212
|
|
|
205
213
|
## Docs
|
|
@@ -208,6 +216,10 @@ enters your core bundle.
|
|
|
208
216
|
- [docs/providers.md](docs/providers.md) — every provider, CORS & direct-vs-proxy.
|
|
209
217
|
- [docs/security.md](docs/security.md) — the token vault & its threat model.
|
|
210
218
|
- [docs/tasks.md](docs/tasks.md) — status & roadmap.
|
|
219
|
+
- [`@dudko.dev/agent-web-react`](https://www.npmjs.com/package/@dudko.dev/agent-web-react) —
|
|
220
|
+
React bindings (`useAgent`, `<AgentProvider>`, pre-styled components) ·
|
|
221
|
+
[live demo](https://dudko-dev.github.io/agent-web-react/) ·
|
|
222
|
+
[source](https://github.com/dudko-dev/agent-web-react).
|
|
211
223
|
- [`@dudko.dev/agent`](https://www.npmjs.com/package/@dudko.dev/agent) — the
|
|
212
224
|
Node/server sibling (stdio MCP, persistence/resume, OpenTelemetry, CLI).
|
|
213
225
|
|