@dudko.dev/agent-web 0.0.41 → 0.0.43

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/dist/mcp.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { OAuthClientProvider, FetchLike, StreamableHTTPReconnectionOptions, OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens, OAuthDiscoveryState } from '@modelcontextprotocol/client';
2
2
  export { UnauthorizedError } from '@modelcontextprotocol/client';
3
3
  import { ToolSet } from 'ai';
4
- import { H as McpElicitationHandler, J as McpElicitationOptions, y as McpAppResource, z as McpAppVisibility, K as McpAppDownloadResource, g as McpAppToolResult } from './elicitation-BA1knkdA.cjs';
4
+ import { O as McpElicitationHandler, P as McpElicitationOptions, D as McpAppResource, E as McpAppVisibility, Q as McpAppDownloadResource, h as McpAppToolResult } from './elicitation-DS-84_bF.cjs';
5
5
  import { McpSkillsSetting, VaultOptions } from './index.cjs';
6
- export { h as MCP_APPS_EXTENSION, L as MCP_APP_DEFAULT_VISIBILITY, N as MCP_APP_MAX_DOMAINS, O as MCP_APP_MAX_DOWNLOAD_BYTES, i as MCP_APP_MAX_HTML_CHARS, j as MCP_APP_MAX_RESULT_CHARS, k as MCP_APP_MIME_TYPE, P as MCP_ELICITATION_MAX_PER_RUN, Q as MCP_ELICITATION_MAX_PER_TOOL_CALL, R as MCP_ELICITATION_TIMEOUT_MS, w as McpAppCsp, x as McpAppPermissions, S as McpAppResourceError, T as McpAppToolMeta, U as McpAppsMode, W as McpElicitationContent, X as McpElicitationContext, A as McpElicitationFieldSchema, f as McpElicitationReason, Y as McpElicitationRequest, Z as McpElicitationResult, e as McpElicitationSchema, _ as isMcpAppMimeType, $ as isMcpAppUri, a0 as mcpAppCspOf, a1 as mcpAppDownloadOf, D as mcpAppOrigin, a2 as mcpAppPermissionsOf, a3 as mcpAppResourceOf, a4 as mcpAppToolMeta, a5 as mcpAppToolResultOf, a6 as mcpAppsModeOf, a7 as normalizeMcpElicitationSchema, a8 as validateMcpElicitationContent } from './elicitation-BA1knkdA.cjs';
6
+ export { i as MCP_APPS_EXTENSION, R as MCP_APP_DEFAULT_VISIBILITY, T as MCP_APP_MAX_DOMAINS, U as MCP_APP_MAX_DOWNLOAD_BYTES, j as MCP_APP_MAX_HTML_CHARS, k as MCP_APP_MAX_RESULT_CHARS, l as MCP_APP_MIME_TYPE, W as MCP_ELICITATION_MAX_PER_RUN, X as MCP_ELICITATION_MAX_PER_TOOL_CALL, Y as MCP_ELICITATION_TIMEOUT_MS, B as McpAppCsp, C as McpAppPermissions, Z as McpAppResourceError, _ as McpAppToolMeta, $ as McpAppsMode, a0 as McpElicitationContent, a1 as McpElicitationContext, F as McpElicitationFieldSchema, g as McpElicitationReason, a2 as McpElicitationRequest, a3 as McpElicitationResult, f as McpElicitationSchema, a4 as isMcpAppMimeType, a5 as isMcpAppUri, a6 as mcpAppCspOf, a7 as mcpAppDownloadOf, J as mcpAppOrigin, a8 as mcpAppPermissionsOf, a9 as mcpAppResourceOf, aa as mcpAppToolMeta, ab as mcpAppToolResultOf, ac as mcpAppsModeOf, ad as normalizeMcpElicitationSchema, ae as validateMcpElicitationContent } from './elicitation-DS-84_bF.cjs';
7
7
 
8
8
  /**
9
9
  * What the MCP connectors of the two agent packages share: how a server's `instructions` reach a
@@ -126,9 +126,12 @@ interface McpHttpServerConfig {
126
126
  * it. The skills come with the server's tools (each mounted tool carries them, like the
127
127
  * server's instructions), so merging `tools` into the agent's config is all a host does. Their
128
128
  * text is third-party - knowledge only, never policy; see the README, "MCP skills".
129
- * `true`, or `{ consent }`: when a person is asked before one of its skills enters the model's
130
- * context - `'once-per-skill'` (default, or the agent's `mcpSkills.consent`), `'ask'` (every
131
- * run) or `'never'` (a server you vetted).
129
+ * `true`, or `{ consent, dynamic }`: `consent` is when a person is asked before one of its
130
+ * skills enters the model's context - `'once-per-skill'` (default, or the agent's
131
+ * `mcpSkills.consent`), `'ask'` (every run) or `'never'` (a server you vetted); `dynamic: true`
132
+ * also takes its GENERATED skills (`"resources": "dynamic"`, no checksums - declined by
133
+ * default), each read whole into a snapshot in memory before anyone is asked, approved and used
134
+ * as that copy only (README, "MCP skills").
132
135
  */
133
136
  skills?: McpSkillsSetting;
134
137
  /**
@@ -263,7 +266,10 @@ interface ConnectMcpOptions {
263
266
  * callback fires as for a notice, since a change in the gap was not announced.
264
267
  * On a server with `skills: true` it also fires for a resource list change
265
268
  * (`notifications/resources/list_changed`): that is how a change of its
266
- * skills is announced, and `refreshServer` lists them again.
269
+ * skills is announced, and `refreshServer` lists them again. It fires too,
270
+ * once per loaded skill, when a directory read (`resources/directory/read`,
271
+ * a server that declared `directoryRead`) shows that a skill changed on the
272
+ * server since it was loaded.
267
273
  */
268
274
  onToolsChanged?: (server: string) => void;
269
275
  /**
package/dist/mcp.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { OAuthClientProvider, FetchLike, StreamableHTTPReconnectionOptions, OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens, OAuthDiscoveryState } from '@modelcontextprotocol/client';
2
2
  export { UnauthorizedError } from '@modelcontextprotocol/client';
3
3
  import { ToolSet } from 'ai';
4
- import { H as McpElicitationHandler, J as McpElicitationOptions, y as McpAppResource, z as McpAppVisibility, K as McpAppDownloadResource, g as McpAppToolResult } from './elicitation-BA1knkdA.js';
4
+ import { O as McpElicitationHandler, P as McpElicitationOptions, D as McpAppResource, E as McpAppVisibility, Q as McpAppDownloadResource, h as McpAppToolResult } from './elicitation-DS-84_bF.js';
5
5
  import { McpSkillsSetting, VaultOptions } from './index.js';
6
- export { h as MCP_APPS_EXTENSION, L as MCP_APP_DEFAULT_VISIBILITY, N as MCP_APP_MAX_DOMAINS, O as MCP_APP_MAX_DOWNLOAD_BYTES, i as MCP_APP_MAX_HTML_CHARS, j as MCP_APP_MAX_RESULT_CHARS, k as MCP_APP_MIME_TYPE, P as MCP_ELICITATION_MAX_PER_RUN, Q as MCP_ELICITATION_MAX_PER_TOOL_CALL, R as MCP_ELICITATION_TIMEOUT_MS, w as McpAppCsp, x as McpAppPermissions, S as McpAppResourceError, T as McpAppToolMeta, U as McpAppsMode, W as McpElicitationContent, X as McpElicitationContext, A as McpElicitationFieldSchema, f as McpElicitationReason, Y as McpElicitationRequest, Z as McpElicitationResult, e as McpElicitationSchema, _ as isMcpAppMimeType, $ as isMcpAppUri, a0 as mcpAppCspOf, a1 as mcpAppDownloadOf, D as mcpAppOrigin, a2 as mcpAppPermissionsOf, a3 as mcpAppResourceOf, a4 as mcpAppToolMeta, a5 as mcpAppToolResultOf, a6 as mcpAppsModeOf, a7 as normalizeMcpElicitationSchema, a8 as validateMcpElicitationContent } from './elicitation-BA1knkdA.js';
6
+ export { i as MCP_APPS_EXTENSION, R as MCP_APP_DEFAULT_VISIBILITY, T as MCP_APP_MAX_DOMAINS, U as MCP_APP_MAX_DOWNLOAD_BYTES, j as MCP_APP_MAX_HTML_CHARS, k as MCP_APP_MAX_RESULT_CHARS, l as MCP_APP_MIME_TYPE, W as MCP_ELICITATION_MAX_PER_RUN, X as MCP_ELICITATION_MAX_PER_TOOL_CALL, Y as MCP_ELICITATION_TIMEOUT_MS, B as McpAppCsp, C as McpAppPermissions, Z as McpAppResourceError, _ as McpAppToolMeta, $ as McpAppsMode, a0 as McpElicitationContent, a1 as McpElicitationContext, F as McpElicitationFieldSchema, g as McpElicitationReason, a2 as McpElicitationRequest, a3 as McpElicitationResult, f as McpElicitationSchema, a4 as isMcpAppMimeType, a5 as isMcpAppUri, a6 as mcpAppCspOf, a7 as mcpAppDownloadOf, J as mcpAppOrigin, a8 as mcpAppPermissionsOf, a9 as mcpAppResourceOf, aa as mcpAppToolMeta, ab as mcpAppToolResultOf, ac as mcpAppsModeOf, ad as normalizeMcpElicitationSchema, ae as validateMcpElicitationContent } from './elicitation-DS-84_bF.js';
7
7
 
8
8
  /**
9
9
  * What the MCP connectors of the two agent packages share: how a server's `instructions` reach a
@@ -126,9 +126,12 @@ interface McpHttpServerConfig {
126
126
  * it. The skills come with the server's tools (each mounted tool carries them, like the
127
127
  * server's instructions), so merging `tools` into the agent's config is all a host does. Their
128
128
  * text is third-party - knowledge only, never policy; see the README, "MCP skills".
129
- * `true`, or `{ consent }`: when a person is asked before one of its skills enters the model's
130
- * context - `'once-per-skill'` (default, or the agent's `mcpSkills.consent`), `'ask'` (every
131
- * run) or `'never'` (a server you vetted).
129
+ * `true`, or `{ consent, dynamic }`: `consent` is when a person is asked before one of its
130
+ * skills enters the model's context - `'once-per-skill'` (default, or the agent's
131
+ * `mcpSkills.consent`), `'ask'` (every run) or `'never'` (a server you vetted); `dynamic: true`
132
+ * also takes its GENERATED skills (`"resources": "dynamic"`, no checksums - declined by
133
+ * default), each read whole into a snapshot in memory before anyone is asked, approved and used
134
+ * as that copy only (README, "MCP skills").
132
135
  */
133
136
  skills?: McpSkillsSetting;
134
137
  /**
@@ -263,7 +266,10 @@ interface ConnectMcpOptions {
263
266
  * callback fires as for a notice, since a change in the gap was not announced.
264
267
  * On a server with `skills: true` it also fires for a resource list change
265
268
  * (`notifications/resources/list_changed`): that is how a change of its
266
- * skills is announced, and `refreshServer` lists them again.
269
+ * skills is announced, and `refreshServer` lists them again. It fires too,
270
+ * once per loaded skill, when a directory read (`resources/directory/read`,
271
+ * a server that declared `directoryRead`) shows that a skill changed on the
272
+ * server since it was loaded.
267
273
  */
268
274
  onToolsChanged?: (server: string) => void;
269
275
  /**
package/dist/mcp.js CHANGED
@@ -35,13 +35,13 @@ import {
35
35
  outputSchemaNote,
36
36
  renderMcpInstructions,
37
37
  withStructuredContent
38
- } from "./chunk-4FBTBE74.js";
38
+ } from "./chunk-2MLHZ6LQ.js";
39
39
  import {
40
40
  MCP_SKILLS_EXTENSION,
41
41
  createMcpSkillCatalog,
42
42
  markMcpSkills,
43
43
  mcpSkillsSettingOf
44
- } from "./chunk-YUA2BHRM.js";
44
+ } from "./chunk-ZSZSSJS4.js";
45
45
 
46
46
  // src/mcp/http.ts
47
47
  import {
@@ -1796,11 +1796,16 @@ var connectAndList = async (name, cfg, opts, log, probe, onClient, onListener, e
1796
1796
  log("info", `[mcp] ${name}: the server does not offer skills (${MCP_SKILLS_EXTENSION})`);
1797
1797
  } else {
1798
1798
  const { SkillsClient } = await import("@modelcontextprotocol/client/ext/skills");
1799
+ const notify = opts.onToolsChanged;
1799
1800
  skills = createMcpSkillCatalog(
1800
1801
  name,
1801
1802
  new SkillsClient(client, { skipInvalid: true }),
1802
1803
  (level, message) => log(level, message),
1803
- skillsSetting.consent ? { consent: skillsSetting.consent } : {}
1804
+ {
1805
+ ...skillsSetting.consent ? { consent: skillsSetting.consent } : {},
1806
+ ...skillsSetting.dynamic ? { dynamic: true } : {},
1807
+ ...notify ? { onChanged: () => notify(name) } : {}
1808
+ }
1804
1809
  );
1805
1810
  await skills.refresh();
1806
1811
  }