@dudko.dev/agent-web-react 0.0.30 → 0.0.31
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 +18 -3
- package/dist/{elicitation-CcZe5-EK.d.cts → elicitation-DbW6QKxS.d.cts} +4 -2
- package/dist/{elicitation-CcZe5-EK.d.ts → elicitation-DbW6QKxS.d.ts} +4 -2
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp.cjs +9 -2
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.d.cts +9 -6
- package/dist/mcp.d.ts +9 -6
- package/dist/mcp.js +9 -2
- package/dist/mcp.js.map +1 -1
- package/dist/styles.css +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -472,7 +472,7 @@ Options:
|
|
|
472
472
|
| `connect({ url, name, headers })` | the endpoint, the tool prefix (`"<name>__<tool>"`, default `mcp`), static headers |
|
|
473
473
|
| `connect({ oauth })` | `true`, or `{ redirectUrl, scope, clientName, clientMetadataUrl, registration }` (`McpOAuthOptions`) - each overrides the hook-level value for this server; `registration` is below |
|
|
474
474
|
| `connect({ protocol })` | the MCP protocol revisions this connection may use: `'legacy'` (the 2025 revisions), `'auto'` (2026-07-28 when the server offers it, the 2025 ones otherwise) or `'modern'` (2026-07-28 only). Left out, nothing is passed and the core speaks the 2025 revisions, exactly as before. Kept across the OAuth redirect. See [the protocol revision](#the-protocol-revision) |
|
|
475
|
-
| `connect({ skills })` | **experimental**: load the skills the server serves (the MCP Skills extension) into the agent's skills catalog, as `<server>/<skill>`. They come with `tools` - nothing else to wire. Needs `protocol: 'auto'` or `'modern'`. `true`, or `{ consent: 'once-per-skill' \| 'ask' \| 'never' }` (when a person is asked before one of its skills enters the agent's context; `McpSkillsSetting`, `mcpSkillsSettingOf`). Off (left out) by default. Kept across the OAuth redirect. See [MCP skills](#mcp-skills-experimental) |
|
|
475
|
+
| `connect({ skills })` | **experimental**: load the skills the server serves (the MCP Skills extension) into the agent's skills catalog, as `<server>/<skill>`. They come with `tools` - nothing else to wire. Needs `protocol: 'auto'` or `'modern'`. `true`, or `{ consent: 'once-per-skill' \| 'ask' \| 'never', dynamic?: boolean }` (`consent`: when a person is asked before one of its skills enters the agent's context; `dynamic: true`: its generated skills too, no checksums - see [MCP skills](#mcp-skills-experimental); `McpSkillsSetting`, `mcpSkillsSettingOf`). Off (left out) by default. Kept across the OAuth redirect. See [MCP skills](#mcp-skills-experimental) |
|
|
476
476
|
|
|
477
477
|
**`clientMetadataUrl` (CIMD).** Instead of registering itself with every authorization server, an
|
|
478
478
|
app can publish one JSON document that describes it and use that document's URL as its
|
|
@@ -537,7 +537,8 @@ Two notes:
|
|
|
537
537
|
OAuth `registration` choice this package's chat and hooks use, on top of model
|
|
538
538
|
tiers, dynamic subagents, media and decision models, pipelines, the learning
|
|
539
539
|
notebook, the virtual file system, attachments, consent, tool search, subagents,
|
|
540
|
-
steering and context editing.
|
|
540
|
+
steering and context editing. `skills: { dynamic: true }` needs a core 0.0.42 or
|
|
541
|
+
later: an older one declines those skills.
|
|
541
542
|
|
|
542
543
|
## Several MCP servers — `useMcpServers`
|
|
543
544
|
|
|
@@ -554,7 +555,7 @@ const config = { model, tools: { ...myTools, ...mcp.tools } } // "<name>__<tool>
|
|
|
554
555
|
`elicitation`) plus `persist`, `storageKey`, `autoConnect` and `connectTimeoutMs`, and returns
|
|
555
556
|
`{ servers, tools, catalog, protocols, connectedCount, pendingElicitations, answerElicitation, … }`.
|
|
556
557
|
A server may be added with its own `protocol` (`add({ name, url, protocol: 'auto' })`),
|
|
557
|
-
`skills: true` or `{ consent }` ([MCP skills](#mcp-skills-experimental); `servers[i].skills`) and `apps: false`
|
|
558
|
+
`skills: true` or `{ consent, dynamic }` ([MCP skills](#mcp-skills-experimental); `servers[i].skills`) and `apps: false`
|
|
558
559
|
(that server's [MCP Apps](#mcp-apps--a-servers-interface-in-the-chat) off while the others' are
|
|
559
560
|
shown; `servers[i].apps`), all remembered with the list; `servers[i].protocolMode` is what it was added with and
|
|
560
561
|
`servers[i].protocol` (`{ version, era }`) what was negotiated while it is connected - `protocols`
|
|
@@ -583,6 +584,9 @@ await mcp.add({ name: 'docs', url, protocol: 'auto', skills: true })
|
|
|
583
584
|
// the agent's catalog now has docs/<skill> entries; mcp.servers[0].skills === true
|
|
584
585
|
// a server you vetted: its skills load without asking
|
|
585
586
|
await mcp.add({ name: 'ours', url: ourUrl, protocol: 'auto', skills: { consent: 'never' } })
|
|
587
|
+
// a server you trust with its GENERATED skills (no checksums): each is read whole, and the
|
|
588
|
+
// person approves that copy
|
|
589
|
+
await mcp.add({ name: 'gen', url: genUrl, protocol: 'auto', skills: { dynamic: true } })
|
|
586
590
|
```
|
|
587
591
|
|
|
588
592
|
A server may serve **skills** (the `io.modelcontextprotocol/skills` extension, Beta): instruction
|
|
@@ -615,6 +619,17 @@ skill inside another one (nested) is asked about on its own. The agent may also
|
|
|
615
619
|
server names by its address (`skill://…/SKILL.md`, in its instructions or a skill), from that
|
|
616
620
|
server only - the card says so (`skill.byUri`).
|
|
617
621
|
|
|
622
|
+
**Generated skills** (`"resources": "dynamic"`: the server publishes no checksums) are declined
|
|
623
|
+
unless the server was added with `skills: { dynamic: true }` (remembered with the list; there is
|
|
624
|
+
no switch for every server). Then, before the person is asked, the core reads the whole skill -
|
|
625
|
+
its `SKILL.md` and, if the server can list directories, every file in them, within the
|
|
626
|
+
specification's limits (512 files, 16 MiB) - computes the digests itself and keeps that copy in
|
|
627
|
+
memory: the card shows its size and files, says so in one line (`skill.dynamic`;
|
|
628
|
+
`skillConsentDynamic`: "This server publishes no checksums for this skill: you approve the copy
|
|
629
|
+
the agent just read, and only that copy is used."), and the agent is given that copy only, never
|
|
630
|
+
a later read. A server that cannot list its files gives `SKILL.md` alone (`skill.noFileListing`,
|
|
631
|
+
`skillConsentNoFileListing`). Nothing of the copy is stored.
|
|
632
|
+
|
|
618
633
|
### The protocol revision
|
|
619
634
|
|
|
620
635
|
```tsx
|
|
@@ -672,11 +672,13 @@ interface McpHttpServerConfig {
|
|
|
672
672
|
* EXPERIMENTAL: load the server's skills (the `io.modelcontextprotocol/skills` extension) into
|
|
673
673
|
* the agent's catalog, as `<server>/<skill>` (cores with MCP skills; an older one ignores the
|
|
674
674
|
* field). Needs `protocol: 'auto'` or `'modern'`. The hooks set it only for a server that was
|
|
675
|
-
* given `skills` (`true`, or `{ consent }` - a core with skill consent; an older one
|
|
676
|
-
* object as off).
|
|
675
|
+
* given `skills` (`true`, or `{ consent, dynamic }` - a core with skill consent; an older one
|
|
676
|
+
* reads any object as off). `dynamic: true` also takes the server's generated skills (a core
|
|
677
|
+
* with snapshots of them; an older one ignores it and declines them).
|
|
677
678
|
*/
|
|
678
679
|
skills?: true | {
|
|
679
680
|
consent?: 'ask' | 'once-per-skill' | 'never';
|
|
681
|
+
dynamic?: boolean;
|
|
680
682
|
};
|
|
681
683
|
/**
|
|
682
684
|
* MCP Apps for this server alone, over the connection's `apps` (cores with per-server apps;
|
|
@@ -672,11 +672,13 @@ interface McpHttpServerConfig {
|
|
|
672
672
|
* EXPERIMENTAL: load the server's skills (the `io.modelcontextprotocol/skills` extension) into
|
|
673
673
|
* the agent's catalog, as `<server>/<skill>` (cores with MCP skills; an older one ignores the
|
|
674
674
|
* field). Needs `protocol: 'auto'` or `'modern'`. The hooks set it only for a server that was
|
|
675
|
-
* given `skills` (`true`, or `{ consent }` - a core with skill consent; an older one
|
|
676
|
-
* object as off).
|
|
675
|
+
* given `skills` (`true`, or `{ consent, dynamic }` - a core with skill consent; an older one
|
|
676
|
+
* reads any object as off). `dynamic: true` also takes the server's generated skills (a core
|
|
677
|
+
* with snapshots of them; an older one ignores it and declines them).
|
|
677
678
|
*/
|
|
678
679
|
skills?: true | {
|
|
679
680
|
consent?: 'ask' | 'once-per-skill' | 'never';
|
|
681
|
+
dynamic?: boolean;
|
|
680
682
|
};
|
|
681
683
|
/**
|
|
682
684
|
* MCP Apps for this server alone, over the connection's `apps` (cores with per-server apps;
|
package/dist/index.cjs
CHANGED
|
@@ -2401,6 +2401,8 @@ var defaultLabels = {
|
|
|
2401
2401
|
skillConsentSize: (bytes, files) => `SKILL.md ${kb(bytes)}${files ? ` \xB7 ${plural(files, "more file", "more files")}` : ""}`,
|
|
2402
2402
|
skillConsentByUri: "Not in the server\u2019s list: the agent asked for it by its address.",
|
|
2403
2403
|
skillConsentNested: (enclosing) => `It sits inside the skill \u201C${enclosing}\u201D: allowing that one did not allow this one.`,
|
|
2404
|
+
skillConsentDynamic: "This server publishes no checksums for this skill: you approve the copy the agent just read, and only that copy is used.",
|
|
2405
|
+
skillConsentNoFileListing: "The server cannot list this skill\u2019s files: that copy is its SKILL.md alone.",
|
|
2404
2406
|
skillConsentPreview: "Show what the agent would read",
|
|
2405
2407
|
skillConsentFiles: (paths, more) => `Its files, read as text and never run: ${paths}${more ? ` and ${more} more` : ""}`,
|
|
2406
2408
|
skillConsentNote: (server, consent) => `Instructions written by the server \u201C${server}\u201D, not by you. They reach the agent only if you allow it${consent === "ask" ? ", and you are asked again in every task that loads them." : " - you are asked again if the server changes them."} They cannot change the agent\u2019s rules or approvals.`,
|
|
@@ -7271,6 +7273,8 @@ var SkillConsentCard = ({
|
|
|
7271
7273
|
] }),
|
|
7272
7274
|
skill.byUri && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "awr-approval__from", children: L.skillConsentByUri }),
|
|
7273
7275
|
skill.nestedIn && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "awr-approval__from awr-approval__nested", children: L.skillConsentNested(skill.nestedIn) }),
|
|
7276
|
+
skill.dynamic && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "awr-approval__from awr-approval__dynamic", children: L.skillConsentDynamic }),
|
|
7277
|
+
skill.dynamic && skill.noFileListing && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "awr-approval__from", children: L.skillConsentNoFileListing }),
|
|
7274
7278
|
showPreview && skill.body !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("details", { className: "awr-approval__preview", children: [
|
|
7275
7279
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("summary", { children: L.skillConsentPreview }),
|
|
7276
7280
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "awr-approval__quote awr-approval__body", children: skill.body }),
|