@dudko.dev/agent-web-react 0.0.24 → 0.0.26
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 +20 -16
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @dudko.dev/agent-web-react
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@dudko.dev/agent-web-react)
|
|
4
|
+
[](https://www.npmjs.com/package/@dudko.dev/agent-web-react)
|
|
5
|
+
[](https://github.com/dudko-dev/agents/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/dudko-dev/agents/commits/main/packages/agent-web-react)
|
|
7
|
+
[](https://github.com/dudko-dev/agents/releases)
|
|
8
|
+
|
|
9
|
+
**[agent.dudko.dev](https://agent.dudko.dev)** · [live demo](https://agent.dudko.dev/demo/) · [source](https://github.com/dudko-dev/agents/tree/main/packages/agent-web-react)
|
|
10
|
+
|
|
3
11
|
React bindings for [`@dudko.dev/agent-web`](https://www.npmjs.com/package/@dudko.dev/agent-web) —
|
|
4
12
|
the headless, universal **in-browser LLM agent**. Drop the agent into any React
|
|
5
13
|
app with a single hook and (optionally) a set of pre-styled components:
|
|
@@ -33,12 +41,7 @@ app with a single hook and (optionally) a set of pre-styled components:
|
|
|
33
41
|
- 🎛️ **Headless-first** — the event→UI logic is a pure, exported reducer
|
|
34
42
|
(`agentStateReducer`); the components are optional sugar on top.
|
|
35
43
|
|
|
36
|
-
[
|
|
37
|
-
[](https://www.npmjs.com/package/@dudko.dev/agent-web-react)
|
|
38
|
-
[](https://www.npmjs.com/package/@dudko.dev/agent-web-react)
|
|
39
|
-

|
|
40
|
-
|
|
41
|
-
> **▶︎ [Live demo](https://dudko-dev.github.io/agent-web-react/)** — three agents:
|
|
44
|
+
> **▶︎ [Live demo](https://agent.dudko.dev/demo/)** — three agents:
|
|
42
45
|
> one edits a sticky-notes board, one drives any number of MCP servers (plus a
|
|
43
46
|
> 185-tool mock catalogue to show tool search), and one plays chess against you
|
|
44
47
|
> — your move triggers it, analyst subagents run in Web Workers. Cloud BYOK or
|
|
@@ -418,7 +421,7 @@ Servers connect in parallel, each with its own deadline; paginated tool lists
|
|
|
418
421
|
are read to the end; tools a server marks read-only skip the "ask before
|
|
419
422
|
changes" prompt. With hundreds of tools the core switches to **tool search**
|
|
420
423
|
(a compact catalogue + `find_tools`) above `toolSearchThreshold` — see the
|
|
421
|
-
core's [capabilities doc](https://github.com/dudko-dev/
|
|
424
|
+
core's [capabilities doc](https://github.com/dudko-dev/agents/blob/main/packages/agent-web/docs/capabilities.md).
|
|
422
425
|
|
|
423
426
|
## Components
|
|
424
427
|
|
|
@@ -482,13 +485,13 @@ from one place.
|
|
|
482
485
|
> from a browser origin. Google (Gemini), openai-compatible and the gateway are
|
|
483
486
|
> the reliable direct paths; Anthropic works (a required header is injected);
|
|
484
487
|
> OpenAI/xAI/DeepSeek usually need a proxy. See the core's
|
|
485
|
-
> [providers doc](https://github.com/dudko-dev/
|
|
488
|
+
> [providers doc](https://github.com/dudko-dev/agents/blob/main/packages/agent-web/docs/providers.md).
|
|
486
489
|
> Ship only the **user's own** key to the browser — shared/app keys belong
|
|
487
490
|
> behind a proxy or the gateway.
|
|
488
491
|
|
|
489
492
|
## Browser tests
|
|
490
493
|
|
|
491
|
-
`
|
|
494
|
+
`pnpm nx test:e2e @dudko.dev/agent-web-react` (from the monorepo root) builds the demo and drives it in Chromium:
|
|
492
495
|
|
|
493
496
|
- MCP: connecting to one and to several servers, the full OAuth redirect
|
|
494
497
|
round-trip (authorize → come back with a code → connected), reconnecting
|
|
@@ -511,17 +514,18 @@ render, a real navigation away and back, and IndexedDB.
|
|
|
511
514
|
|
|
512
515
|
## Demo & deployment
|
|
513
516
|
|
|
514
|
-
The
|
|
515
|
-
[
|
|
516
|
-
|
|
517
|
+
The demo app (Vite + React) lives in
|
|
518
|
+
[`apps/demo`](https://github.com/dudko-dev/agents/tree/main/apps/demo) of the monorepo. To run it
|
|
519
|
+
locally, from the repo root:
|
|
517
520
|
|
|
518
521
|
```bash
|
|
519
|
-
|
|
520
|
-
|
|
522
|
+
pnpm install
|
|
523
|
+
pnpm nx build @dudko.dev/agent-web-react # build the library (and the core) into dist/
|
|
524
|
+
pnpm --filter demo dev
|
|
521
525
|
```
|
|
522
526
|
|
|
523
|
-
The demo aliases `@dudko.dev/agent-web-react` to
|
|
524
|
-
|
|
527
|
+
The demo aliases `@dudko.dev/agent-web-react` to this package's built `dist`, so rebuild the
|
|
528
|
+
library after changing its source.
|
|
525
529
|
|
|
526
530
|
## License
|
|
527
531
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudko.dev/agent-web-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "React bindings for @dudko.dev/agent-web: a headless useAgent hook, an AgentProvider context, and optional pre-styled components (chat panel, plan/step view, BYOK key form, WebLLM load bar) that connect the in-browser LLM agent to any React site. UI you can drop in — or a headless reducer you can build your own around.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -41,16 +41,6 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsup",
|
|
46
|
-
"typecheck": "tsc --noEmit",
|
|
47
|
-
"format": "prettier --write \"src/**/*.{ts,tsx,css}\" \"tests/**/*.ts\"",
|
|
48
|
-
"format:check": "prettier --check \"src/**/*.{ts,tsx,css}\" \"tests/**/*.ts\"",
|
|
49
|
-
"test": "node --test --experimental-strip-types --disable-warning=ExperimentalWarning tests/*.test.ts",
|
|
50
|
-
"prepublishOnly": "npm run typecheck && npm test && npm run build",
|
|
51
|
-
"pretest": "npm run build",
|
|
52
|
-
"test:e2e": "playwright test"
|
|
53
|
-
},
|
|
54
44
|
"keywords": [
|
|
55
45
|
"agent",
|
|
56
46
|
"ai-agent",
|
|
@@ -87,16 +77,17 @@
|
|
|
87
77
|
"license": "MIT",
|
|
88
78
|
"repository": {
|
|
89
79
|
"type": "git",
|
|
90
|
-
"url": "git+https://github.com/dudko-dev/
|
|
80
|
+
"url": "git+https://github.com/dudko-dev/agents.git",
|
|
81
|
+
"directory": "packages/agent-web-react"
|
|
91
82
|
},
|
|
92
|
-
"homepage": "https://dudko
|
|
83
|
+
"homepage": "https://agent.dudko.dev",
|
|
93
84
|
"bugs": {
|
|
94
|
-
"url": "https://github.com/dudko-dev/
|
|
85
|
+
"url": "https://github.com/dudko-dev/agents/issues"
|
|
95
86
|
},
|
|
96
87
|
"funding": [
|
|
97
88
|
{
|
|
98
89
|
"type": "individual",
|
|
99
|
-
"url": "
|
|
90
|
+
"url": "https://dudko.dev/donate"
|
|
100
91
|
},
|
|
101
92
|
{
|
|
102
93
|
"type": "buymeacoffee",
|
|
@@ -120,7 +111,6 @@
|
|
|
120
111
|
"react-dom": ">=18"
|
|
121
112
|
},
|
|
122
113
|
"devDependencies": {
|
|
123
|
-
"@dudko.dev/agent-web": "^0.0.33",
|
|
124
114
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
125
115
|
"@playwright/test": "^1.65.1",
|
|
126
116
|
"@types/node": "^22.9.0",
|
|
@@ -130,6 +120,16 @@
|
|
|
130
120
|
"react": "^19.3.1",
|
|
131
121
|
"react-dom": "^19.3.1",
|
|
132
122
|
"tsup": "^9.0.0",
|
|
133
|
-
"typescript": "^6.0.3"
|
|
123
|
+
"typescript": "^6.0.3",
|
|
124
|
+
"zod": "^4.6.7",
|
|
125
|
+
"@dudko.dev/agent-web": "0.0.36"
|
|
126
|
+
},
|
|
127
|
+
"scripts": {
|
|
128
|
+
"build": "tsup",
|
|
129
|
+
"typecheck": "tsc --noEmit",
|
|
130
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,css}\" \"tests/**/*.ts\"",
|
|
131
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,css}\" \"tests/**/*.ts\"",
|
|
132
|
+
"test": "node --test --experimental-strip-types --disable-warning=ExperimentalWarning tests/*.test.ts",
|
|
133
|
+
"test:e2e": "playwright test"
|
|
134
134
|
}
|
|
135
|
-
}
|
|
135
|
+
}
|