@agent-native/core 0.145.3 → 0.145.5
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/corpus/README.md +1 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +10 -8
- package/corpus/templates/assets/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/calendar/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +8 -3
- package/corpus/templates/clips/app/components/editor/waveform.tsx +2 -1
- package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
- package/corpus/templates/clips/app/global.css +9 -0
- package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +22 -1
- package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +10 -11
- package/corpus/templates/design/actions/view-screen.ts +1 -0
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +14 -1
- package/corpus/templates/design/changelog/2026-08-07-cmd-c-now-copies-selected-text-in-the-agent-panel-instead-of.md +6 -0
- package/corpus/templates/design/changelog/2026-08-07-real-time-voice-can-now-read-the-current-selection-and-edit-.md +6 -0
- package/corpus/templates/design/server/lib/reprompt-action-guard.ts +7 -3
- package/corpus/templates/mail/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/plan/server/lib/plan-framework-tools.ts +11 -0
- package/corpus/templates/plan/server/plugins/00-mcp.ts +25 -68
- package/corpus/templates/plan/server/plugins/agent-chat.ts +8 -2
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/framework-tools.d.ts +33 -1
- package/dist/framework-tools.js +88 -4
- package/dist/mcp/build-server.d.ts +15 -0
- package/dist/mcp/build-server.js +94 -30
- package/dist/mcp/oauth-client-metadata.js +6 -2
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +6 -6
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts +3 -18
- package/dist/server/action-discovery.js +9 -65
- package/dist/server/agent-chat/action-filters-a2a.d.ts +14 -2
- package/dist/server/agent-chat/action-filters-a2a.js +1 -1
- package/dist/server/agent-chat/mcp-options.d.ts +106 -0
- package/dist/server/agent-chat/mcp-options.js +50 -0
- package/dist/server/agent-chat/plugin-options.d.ts +17 -26
- package/dist/server/agent-chat-plugin.js +21 -11
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +7 -0
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/realtime-voice.d.ts +2 -1
- package/dist/server/realtime-voice.js +38 -56
- package/dist/server/short-lived-token.d.ts +43 -0
- package/dist/server/short-lived-token.js +74 -0
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +2 -2
package/dist/framework-tools.js
CHANGED
|
@@ -88,6 +88,88 @@ export function resolveFrameworkTools(input) {
|
|
|
88
88
|
isEnabled: (group) => !disabledGroups.has(group),
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Which `frameworkTools` switch owns each framework action kit.
|
|
93
|
+
*
|
|
94
|
+
* This map is the authority. `ActionEntry.frameworkGroup` is an optional
|
|
95
|
+
* pre-resolved copy of the same answer, not a requirement: it is stamped only
|
|
96
|
+
* by `mergeCoreSharingActions`, which runs against the ungated `httpActions`
|
|
97
|
+
* registry, so for a year every app loading core kits through
|
|
98
|
+
* `loadActionsFromStaticRegistry` or its own actions directory carried
|
|
99
|
+
* untagged entries and silently ignored eight of the `frameworkTools`
|
|
100
|
+
* switches. Resolve by name and the switch works no matter how the action was
|
|
101
|
+
* registered.
|
|
102
|
+
*
|
|
103
|
+
* Membership does two jobs: one filter subtracts a whole kit from every agent
|
|
104
|
+
* tool surface at once (the plugin spreads these registries at thirteen
|
|
105
|
+
* composition sites), and it keeps these ~45 schemas out of the DEFAULT
|
|
106
|
+
* first-request tool list. They stay reachable through `tool-search`.
|
|
107
|
+
*
|
|
108
|
+
* Anything absent from this map is always-on and must be listed in
|
|
109
|
+
* `ALWAYS_ON_CORE_ACTIONS` instead. `action-discovery.spec.ts` fails when a new
|
|
110
|
+
* core action appears in neither, so "always-on" stays a decision someone made
|
|
111
|
+
* rather than the default that happens when a map goes un-updated.
|
|
112
|
+
*/
|
|
113
|
+
export const CORE_ACTION_GROUPS = {
|
|
114
|
+
"share-resource": "sharing",
|
|
115
|
+
"unshare-resource": "sharing",
|
|
116
|
+
"list-resource-shares": "sharing",
|
|
117
|
+
"set-resource-visibility": "sharing",
|
|
118
|
+
"create-agent-resource-link": "sharing",
|
|
119
|
+
"get-feature-flags": "featureFlags",
|
|
120
|
+
"list-feature-flags": "featureFlags",
|
|
121
|
+
"set-feature-flag": "featureFlags",
|
|
122
|
+
"list-recurring-jobs": "automation",
|
|
123
|
+
"manage-recurring-job": "automation",
|
|
124
|
+
"run-automation-now": "automation",
|
|
125
|
+
"list-automation-runs": "automation",
|
|
126
|
+
"list-automations": "automation",
|
|
127
|
+
"manage-automation": "automation",
|
|
128
|
+
"context-manifest-get": "contextXray",
|
|
129
|
+
"context-preview-get": "contextXray",
|
|
130
|
+
"context-pin": "contextXray",
|
|
131
|
+
"context-evict": "contextXray",
|
|
132
|
+
"context-restore": "contextXray",
|
|
133
|
+
"context-report": "contextXray",
|
|
134
|
+
"get-localization-preference": "localization",
|
|
135
|
+
"set-localization-preference": "localization",
|
|
136
|
+
// Profile, credentials, and appearance share one switch: an app that hides
|
|
137
|
+
// its profile surface from the agent hides password management with it.
|
|
138
|
+
"get-user-profile": "userProfile",
|
|
139
|
+
"update-user-profile": "userProfile",
|
|
140
|
+
"get-auth-methods": "userProfile",
|
|
141
|
+
"set-password": "userProfile",
|
|
142
|
+
"change-password": "userProfile",
|
|
143
|
+
"change-appearance": "userProfile",
|
|
144
|
+
"list-audit-events": "audit",
|
|
145
|
+
"get-audit-event": "audit",
|
|
146
|
+
"export-audit-events": "audit",
|
|
147
|
+
"create-resource-version": "history",
|
|
148
|
+
"list-resource-versions": "history",
|
|
149
|
+
"get-resource-version": "history",
|
|
150
|
+
"restore-resource-version": "history",
|
|
151
|
+
"list-resource-history": "history",
|
|
152
|
+
"list-review-comments": "review",
|
|
153
|
+
"create-review-comment": "review",
|
|
154
|
+
"reply-review-comment": "review",
|
|
155
|
+
"resolve-review-thread": "review",
|
|
156
|
+
"delete-review-comment": "review",
|
|
157
|
+
"consume-review-feedback": "review",
|
|
158
|
+
"get-review-feedback": "review",
|
|
159
|
+
"set-review-status": "review",
|
|
160
|
+
"send-review-thread-to-agent": "review",
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Which group owns an action, by name first and tag second.
|
|
164
|
+
*
|
|
165
|
+
* Name first because the name is present on every registration path, while the
|
|
166
|
+
* tag is stamped on exactly one — an app is not less entitled to its
|
|
167
|
+
* `frameworkTools` switches because it loaded core kits from a generated
|
|
168
|
+
* registry instead of `autoDiscoverActions`.
|
|
169
|
+
*/
|
|
170
|
+
export function resolveFrameworkGroup(name, entry) {
|
|
171
|
+
return entry?.frameworkGroup ?? CORE_ACTION_GROUPS[name];
|
|
172
|
+
}
|
|
91
173
|
/**
|
|
92
174
|
* Drop every action belonging to a disabled group. Returns the input untouched
|
|
93
175
|
* when nothing is disabled so the default path allocates nothing.
|
|
@@ -95,12 +177,14 @@ export function resolveFrameworkTools(input) {
|
|
|
95
177
|
export function filterFrameworkToolGroups(actions, disabledGroups) {
|
|
96
178
|
if (disabledGroups.size === 0)
|
|
97
179
|
return actions;
|
|
98
|
-
return Object.fromEntries(Object.entries(actions).filter(([, entry]) =>
|
|
99
|
-
|
|
180
|
+
return Object.fromEntries(Object.entries(actions).filter(([name, entry]) => {
|
|
181
|
+
const group = resolveFrameworkGroup(name, entry);
|
|
182
|
+
return group === undefined || !disabledGroups.has(group);
|
|
183
|
+
}));
|
|
100
184
|
}
|
|
101
185
|
/** True for actions the framework contributes rather than the app's own. */
|
|
102
|
-
export function isFrameworkGroupedAction(entry) {
|
|
103
|
-
return entry
|
|
186
|
+
export function isFrameworkGroupedAction(name, entry) {
|
|
187
|
+
return resolveFrameworkGroup(name, entry) !== undefined;
|
|
104
188
|
}
|
|
105
189
|
/**
|
|
106
190
|
* Whether a group is live, for prompt builders that only receive the disabled
|
|
@@ -71,6 +71,21 @@ export interface MCPConfig {
|
|
|
71
71
|
* a constrained / locked-down mount.
|
|
72
72
|
*/
|
|
73
73
|
builtinCrossAppTools?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* `"app"` serves exactly the app's own tool registry, flat: every action the
|
|
76
|
+
* in-app agent holds, and nothing the in-app agent does not — no cross-app
|
|
77
|
+
* builtins, no `ask-agent`, no `tool-search`, and no compact/connector
|
|
78
|
+
* trimming. `connectorCatalog`, the compact default, and the
|
|
79
|
+
* `--full-catalog` / `AGENT_NATIVE_MCP_FULL_CATALOG` opt-ins are all inert
|
|
80
|
+
* on this mode; `externalAgents.denyActions` and the OAuth scope filter
|
|
81
|
+
* still apply, because both are explicit removals rather than tiering.
|
|
82
|
+
*
|
|
83
|
+
* The dev-open surface split is deliberately NOT bypassed: an
|
|
84
|
+
* unauthenticated loopback probe still gets `actions`, not
|
|
85
|
+
* `productionActions`. Parity is with the app's agent for a real
|
|
86
|
+
* authenticated caller, not an escalation for anonymous ones.
|
|
87
|
+
*/
|
|
88
|
+
catalogMode?: "app";
|
|
74
89
|
/**
|
|
75
90
|
* Curated allow-list of action names served to **external connector** clients
|
|
76
91
|
* on a hosted multi-tenant deployment.
|
package/dist/mcp/build-server.js
CHANGED
|
@@ -142,6 +142,41 @@ function isActionVisibleForOAuthScope(entry, scopes) {
|
|
|
142
142
|
const required = entry.readOnly === true ? "mcp:read" : "mcp:write";
|
|
143
143
|
return hasMcpOAuthScope(scopes, required);
|
|
144
144
|
}
|
|
145
|
+
/** Mirrors `TOOL_SEARCH_ACTION_NAME`; not imported, because `agent/tool-search.ts`
|
|
146
|
+
* reaches Node-only request context and this module must stay bundleable. */
|
|
147
|
+
const TOOL_SEARCH_TOOL_NAME = "tool-search";
|
|
148
|
+
function withoutToolSearch(actions) {
|
|
149
|
+
if (!(TOOL_SEARCH_TOOL_NAME in actions))
|
|
150
|
+
return actions;
|
|
151
|
+
return Object.fromEntries(Object.entries(actions).filter(([name]) => name !== TOOL_SEARCH_TOOL_NAME));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Re-point `tool-search` at the surface this caller can actually reach.
|
|
155
|
+
*
|
|
156
|
+
* The registry's own entry closes over the app's *whole* action registry, but
|
|
157
|
+
* `tools/call` accepts only the advertised set — so unscoped it answers with
|
|
158
|
+
* names that come straight back as "Unknown tool", and its `callable` field
|
|
159
|
+
* reports plan-mode availability, not that gate. Every template that noticed
|
|
160
|
+
* worked around it by hand-rolling a narrowed copy; scoping it here is what
|
|
161
|
+
* makes the trimmed catalog honest without one.
|
|
162
|
+
*/
|
|
163
|
+
function scopeToolSearchToAdvertised(advertised) {
|
|
164
|
+
const entry = advertised[TOOL_SEARCH_TOOL_NAME];
|
|
165
|
+
if (!entry)
|
|
166
|
+
return advertised;
|
|
167
|
+
return {
|
|
168
|
+
...advertised,
|
|
169
|
+
[TOOL_SEARCH_TOOL_NAME]: {
|
|
170
|
+
...entry,
|
|
171
|
+
// Imported lazily: `agent/tool-search.ts` pulls Node-only request
|
|
172
|
+
// context, and this module has to stay bundleable for serverless.
|
|
173
|
+
run: async (args) => {
|
|
174
|
+
const { searchToolRegistry } = await import("../agent/tool-search.js");
|
|
175
|
+
return searchToolRegistry(advertised, args ?? {});
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
145
180
|
const COMPACT_MCP_APP_CATALOG_BUILTINS = new Set([
|
|
146
181
|
"list_apps",
|
|
147
182
|
"open_app",
|
|
@@ -149,9 +184,10 @@ const COMPACT_MCP_APP_CATALOG_BUILTINS = new Set([
|
|
|
149
184
|
"ask_app_status",
|
|
150
185
|
"create_embed_session",
|
|
151
186
|
// `tool-search` MUST stay in every compact/connector surface: it is how a
|
|
152
|
-
// compacted client discovers
|
|
153
|
-
//
|
|
154
|
-
|
|
187
|
+
// compacted client discovers any action on demand, which is what makes
|
|
188
|
+
// "small catalog by default" non-opaque. Discovery is not permission — a
|
|
189
|
+
// searched name still has to be in the advertised set to be callable.
|
|
190
|
+
TOOL_SEARCH_TOOL_NAME,
|
|
155
191
|
]);
|
|
156
192
|
function isActionAdvertisedInCompactMcpAppCatalog(name, entry, config) {
|
|
157
193
|
if (COMPACT_MCP_APP_CATALOG_BUILTINS.has(name))
|
|
@@ -1115,16 +1151,36 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
|
|
|
1115
1151
|
const baseActions = useFullSurface && config.productionActions
|
|
1116
1152
|
? config.productionActions
|
|
1117
1153
|
: config.actions;
|
|
1118
|
-
const
|
|
1154
|
+
const appCatalog = config.catalogMode === "app";
|
|
1155
|
+
// The app catalog IS a full flat catalog, so the `--full-catalog` opt-ins
|
|
1156
|
+
// have nothing left to escalate — collapsing them here keeps every tier gate
|
|
1157
|
+
// below reading one flag instead of testing `appCatalog` a fifth time.
|
|
1158
|
+
const fullCatalogRequested = !appCatalog && explicitlyRequestsFullMcpCatalog(requestMeta);
|
|
1159
|
+
// `tool-search` earns its place only on a *trimmed* catalog, where it is how
|
|
1160
|
+
// a client reaches an action that was not listed. On a flat catalog — app
|
|
1161
|
+
// mode or the `--full-catalog` opt-in — every tool is already in `tools/list`
|
|
1162
|
+
// beside it, so it can only ever describe its own neighbours while spending
|
|
1163
|
+
// a tool slot and a round trip to do it.
|
|
1164
|
+
const flatCatalog = appCatalog || fullCatalogRequested;
|
|
1165
|
+
// `catalogMode: "app"` asks for parity with the in-app agent, so the cross-app
|
|
1166
|
+
// builtins the MCP layer adds on its own come back off too.
|
|
1167
|
+
const mergedActions = appCatalog
|
|
1168
|
+
? baseActions
|
|
1169
|
+
: mergeBuiltinTools(config, baseActions, requestMeta);
|
|
1170
|
+
// Strip from `actions`, not just the advertised set: on the full-catalog tier
|
|
1171
|
+
// `actions` IS the callable surface, so filtering only the listing would
|
|
1172
|
+
// leave `tool-search` callable but invisible.
|
|
1173
|
+
const actions = flatCatalog
|
|
1174
|
+
? withoutToolSearch(mergedActions)
|
|
1175
|
+
: mergedActions;
|
|
1119
1176
|
const visibleActions = Object.fromEntries(Object.entries(actions).filter(([, entry]) => isActionVisibleForOAuthScope(entry, effectiveIdentity?.oauthScopes)));
|
|
1120
|
-
const fullCatalogRequested = explicitlyRequestsFullMcpCatalog(requestMeta);
|
|
1121
1177
|
// Compact/connector is the DEFAULT for every caller — hosted connectors,
|
|
1122
1178
|
// code clients (Claude Code / Cursor / Codex), and the local CLI alike. The
|
|
1123
1179
|
// full ~105-tool catalog is served only on the explicit opt-in above, so a
|
|
1124
1180
|
// host can never dump every action schema into one giant tool card. The
|
|
1125
1181
|
// `mcp:apps` scope still lands on this compact MCP-Apps surface; with no
|
|
1126
1182
|
// opt-in, everyone else does too.
|
|
1127
|
-
const compactMcpAppCatalog = !fullCatalogRequested;
|
|
1183
|
+
const compactMcpAppCatalog = !appCatalog && !fullCatalogRequested;
|
|
1128
1184
|
const advertisedActionsBeforeConnector = compactMcpAppCatalog
|
|
1129
1185
|
? Object.fromEntries(Object.entries(visibleActions).filter(([name, entry]) => isActionAdvertisedInCompactMcpAppCatalog(name, entry, config)))
|
|
1130
1186
|
: visibleActions;
|
|
@@ -1140,28 +1196,32 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
|
|
|
1140
1196
|
// authenticated reads from `externalAgents.authenticatedReads: "auto"`.
|
|
1141
1197
|
// This stays compact by default and keeps db-exec / seed-* / extension /
|
|
1142
1198
|
// browser-session footguns off the external surface.
|
|
1143
|
-
const connectorCatalogActive =
|
|
1199
|
+
const connectorCatalogActive = !appCatalog &&
|
|
1200
|
+
(connectorNames.size > 0 || automaticConnectorPolicyActive) &&
|
|
1144
1201
|
!fullCatalogRequested;
|
|
1145
1202
|
// When the connector catalog is active, filter directly from visibleActions
|
|
1146
1203
|
// rather than advertisedActionsBeforeConnector. This ensures the connector
|
|
1147
1204
|
// tier is an independent, template-declared surface that doesn't accidentally
|
|
1148
1205
|
// narrow to just the compact-catalog builtins when shouldUseCompactMcpCatalogByDefault
|
|
1149
1206
|
// would have activated the compact catalog for the same caller.
|
|
1150
|
-
const
|
|
1151
|
-
? Object.fromEntries(Object.entries(visibleActions).filter(([name
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1207
|
+
const advertisedActionsBeforeToolSearchScope = appCatalog
|
|
1208
|
+
? Object.fromEntries(Object.entries(visibleActions).filter(([name]) => !denyNames.has(name)))
|
|
1209
|
+
: connectorCatalogActive
|
|
1210
|
+
? Object.fromEntries(Object.entries(visibleActions).filter(([name, entry]) => {
|
|
1211
|
+
if (denyNames.has(name))
|
|
1212
|
+
return false;
|
|
1213
|
+
if (COMPACT_MCP_APP_CATALOG_BUILTINS.has(name))
|
|
1214
|
+
return true;
|
|
1215
|
+
if (!connectorNames.has(name))
|
|
1216
|
+
return false;
|
|
1217
|
+
if (externalAgentWritesAreAskAppOnly(config) &&
|
|
1218
|
+
entry.readOnly !== true) {
|
|
1219
|
+
return false;
|
|
1220
|
+
}
|
|
1155
1221
|
return true;
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
entry.readOnly !== true) {
|
|
1160
|
-
return false;
|
|
1161
|
-
}
|
|
1162
|
-
return true;
|
|
1163
|
-
}))
|
|
1164
|
-
: advertisedActionsBeforeConnector;
|
|
1222
|
+
}))
|
|
1223
|
+
: advertisedActionsBeforeConnector;
|
|
1224
|
+
const advertisedActions = scopeToolSearchToAdvertised(advertisedActionsBeforeToolSearchScope);
|
|
1165
1225
|
if (fullCatalogRequested) {
|
|
1166
1226
|
warnFullCatalogServed(Object.keys(advertisedActions).length);
|
|
1167
1227
|
}
|
|
@@ -1389,8 +1449,10 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
|
|
|
1389
1449
|
annotations,
|
|
1390
1450
|
};
|
|
1391
1451
|
}));
|
|
1392
|
-
|
|
1393
|
-
|
|
1452
|
+
// `ask-agent` is the legacy full-catalog meta-tool; `ask_app` is the
|
|
1453
|
+
// builtin every other tier carries. Gate on the one flag that means
|
|
1454
|
+
// "this caller opted all the way in".
|
|
1455
|
+
if (fullCatalogRequested &&
|
|
1394
1456
|
config.askAgent &&
|
|
1395
1457
|
hasMcpOAuthScope(effectiveIdentity?.oauthScopes, "mcp:write")) {
|
|
1396
1458
|
tools.push({
|
|
@@ -1436,7 +1498,7 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
|
|
|
1436
1498
|
return withCallerContext(async () => {
|
|
1437
1499
|
const { name, arguments: args } = request.params;
|
|
1438
1500
|
if (name === "ask-agent" && config.askAgent) {
|
|
1439
|
-
if (
|
|
1501
|
+
if (!fullCatalogRequested) {
|
|
1440
1502
|
return {
|
|
1441
1503
|
content: [{ type: "text", text: `Unknown tool: ${name}` }],
|
|
1442
1504
|
isError: true,
|
|
@@ -1483,12 +1545,14 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
|
|
|
1483
1545
|
};
|
|
1484
1546
|
}
|
|
1485
1547
|
}
|
|
1486
|
-
//
|
|
1487
|
-
//
|
|
1488
|
-
//
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1548
|
+
// Every tier except the explicit full-catalog opt-in treats the
|
|
1549
|
+
// advertised set as the authoritative callable surface: a name that
|
|
1550
|
+
// was not listed is rejected, not merely hidden. Deriving this from
|
|
1551
|
+
// the one opt-in flag rather than re-testing each tier is what keeps a
|
|
1552
|
+
// newly added tier from silently defaulting to "everything callable".
|
|
1553
|
+
const callableActions = fullCatalogRequested
|
|
1554
|
+
? actions
|
|
1555
|
+
: advertisedActions;
|
|
1492
1556
|
const entry = callableActions[name];
|
|
1493
1557
|
if (!entry) {
|
|
1494
1558
|
return {
|
|
@@ -170,12 +170,16 @@ function validateClientMetadataDocument(clientId, value) {
|
|
|
170
170
|
if (tokenEndpointAuthMethod !== "none") {
|
|
171
171
|
throw new Error("Only public Client ID Metadata clients are supported");
|
|
172
172
|
}
|
|
173
|
+
// A grant type we do not support is not a reason to reject the document —
|
|
174
|
+
// clients advertise grants they use elsewhere (Claude.ai's CIMD document
|
|
175
|
+
// lists "urn:ietf:params:oauth:grant-type:jwt-bearer" next to the two we
|
|
176
|
+
// support). The token endpoint independently honors only
|
|
177
|
+
// "authorization_code"/"refresh_token" no matter what this list says.
|
|
173
178
|
const grantTypes = parseStringArray(document.grant_types);
|
|
174
179
|
if ((document.grant_types !== undefined &&
|
|
175
180
|
(!Array.isArray(document.grant_types) ||
|
|
176
181
|
grantTypes.length !== document.grant_types.length)) ||
|
|
177
|
-
grantTypes.length > 10
|
|
178
|
-
!grantTypes.every((grant) => grant === "authorization_code" || grant === "refresh_token")) {
|
|
182
|
+
grantTypes.length > 10) {
|
|
179
183
|
throw new Error("Client metadata document grant_types are unsupported");
|
|
180
184
|
}
|
|
181
185
|
const responseTypes = parseStringArray(document.response_types);
|
|
@@ -137,13 +137,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
137
137
|
inputSchema: {
|
|
138
138
|
type: string;
|
|
139
139
|
properties: {
|
|
140
|
+
count?: undefined;
|
|
140
141
|
query?: undefined;
|
|
141
142
|
minutes?: undefined;
|
|
142
143
|
limit?: undefined;
|
|
143
144
|
clientHint?: undefined;
|
|
144
145
|
timestamp?: undefined;
|
|
145
146
|
chapterId?: undefined;
|
|
146
|
-
count?: undefined;
|
|
147
147
|
startAt?: undefined;
|
|
148
148
|
endAt?: undefined;
|
|
149
149
|
reason?: undefined;
|
|
@@ -159,6 +159,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
159
159
|
inputSchema: {
|
|
160
160
|
type: string;
|
|
161
161
|
properties: {
|
|
162
|
+
count?: undefined;
|
|
162
163
|
query: {
|
|
163
164
|
type: string;
|
|
164
165
|
description: string;
|
|
@@ -174,7 +175,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
174
175
|
clientHint?: undefined;
|
|
175
176
|
timestamp?: undefined;
|
|
176
177
|
chapterId?: undefined;
|
|
177
|
-
count?: undefined;
|
|
178
178
|
startAt?: undefined;
|
|
179
179
|
endAt?: undefined;
|
|
180
180
|
reason?: undefined;
|
|
@@ -190,6 +190,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
190
190
|
inputSchema: {
|
|
191
191
|
type: string;
|
|
192
192
|
properties: {
|
|
193
|
+
count?: undefined;
|
|
193
194
|
minutes: {
|
|
194
195
|
type: string;
|
|
195
196
|
description: string;
|
|
@@ -199,7 +200,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
199
200
|
clientHint?: undefined;
|
|
200
201
|
timestamp?: undefined;
|
|
201
202
|
chapterId?: undefined;
|
|
202
|
-
count?: undefined;
|
|
203
203
|
startAt?: undefined;
|
|
204
204
|
endAt?: undefined;
|
|
205
205
|
reason?: undefined;
|
|
@@ -216,6 +216,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
216
216
|
type: string;
|
|
217
217
|
required: string[];
|
|
218
218
|
properties: {
|
|
219
|
+
count?: undefined;
|
|
219
220
|
query: {
|
|
220
221
|
type: string;
|
|
221
222
|
description: string;
|
|
@@ -234,7 +235,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
234
235
|
};
|
|
235
236
|
timestamp?: undefined;
|
|
236
237
|
chapterId?: undefined;
|
|
237
|
-
count?: undefined;
|
|
238
238
|
startAt?: undefined;
|
|
239
239
|
endAt?: undefined;
|
|
240
240
|
reason?: undefined;
|
|
@@ -250,6 +250,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
250
250
|
type: string;
|
|
251
251
|
required: string[];
|
|
252
252
|
properties: {
|
|
253
|
+
count?: undefined;
|
|
253
254
|
query?: undefined;
|
|
254
255
|
minutes?: undefined;
|
|
255
256
|
limit?: undefined;
|
|
@@ -263,7 +264,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
263
264
|
description: string;
|
|
264
265
|
};
|
|
265
266
|
chapterId?: undefined;
|
|
266
|
-
count?: undefined;
|
|
267
267
|
startAt?: undefined;
|
|
268
268
|
endAt?: undefined;
|
|
269
269
|
includeMicrophone?: undefined;
|
|
@@ -314,13 +314,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
314
314
|
type: string;
|
|
315
315
|
required: string[];
|
|
316
316
|
properties: {
|
|
317
|
+
count?: undefined;
|
|
317
318
|
query?: undefined;
|
|
318
319
|
minutes?: undefined;
|
|
319
320
|
limit?: undefined;
|
|
320
321
|
clientHint?: undefined;
|
|
321
322
|
timestamp?: undefined;
|
|
322
323
|
chapterId?: undefined;
|
|
323
|
-
count?: undefined;
|
|
324
324
|
startAt: {
|
|
325
325
|
type: string;
|
|
326
326
|
description: string;
|
|
@@ -349,13 +349,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
349
349
|
type: string;
|
|
350
350
|
required: string[];
|
|
351
351
|
properties: {
|
|
352
|
+
count?: undefined;
|
|
352
353
|
query?: undefined;
|
|
353
354
|
minutes?: undefined;
|
|
354
355
|
limit?: undefined;
|
|
355
356
|
clientHint?: undefined;
|
|
356
357
|
timestamp?: undefined;
|
|
357
358
|
chapterId?: undefined;
|
|
358
|
-
count?: undefined;
|
|
359
359
|
startAt?: undefined;
|
|
360
360
|
endAt?: undefined;
|
|
361
361
|
reason?: undefined;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
|
|
14
14
|
count: number;
|
|
15
15
|
updated?: undefined;
|
|
16
|
-
error?: undefined;
|
|
17
16
|
ok?: undefined;
|
|
17
|
+
error?: undefined;
|
|
18
18
|
} | {
|
|
19
19
|
count?: undefined;
|
|
20
20
|
updated: number;
|
|
21
|
-
error?: undefined;
|
|
22
21
|
ok?: undefined;
|
|
22
|
+
error?: undefined;
|
|
23
23
|
} | {
|
|
24
24
|
count?: undefined;
|
|
25
25
|
updated?: undefined;
|
|
@@ -41,16 +41,16 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
41
41
|
thumbsUpRate: number;
|
|
42
42
|
avgEvalScore: number;
|
|
43
43
|
} | {
|
|
44
|
+
error?: undefined;
|
|
44
45
|
summary: import("./types.js").TraceSummary;
|
|
45
46
|
spans: import("./types.js").TraceSpan[];
|
|
46
47
|
id?: undefined;
|
|
47
|
-
error?: undefined;
|
|
48
48
|
ok?: undefined;
|
|
49
49
|
} | {
|
|
50
|
+
error?: undefined;
|
|
50
51
|
summary?: undefined;
|
|
51
52
|
spans?: undefined;
|
|
52
53
|
id: string;
|
|
53
|
-
error?: undefined;
|
|
54
54
|
ok?: undefined;
|
|
55
55
|
} | {
|
|
56
56
|
summary?: undefined;
|
|
@@ -59,9 +59,9 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
59
59
|
error: any;
|
|
60
60
|
ok?: undefined;
|
|
61
61
|
} | {
|
|
62
|
+
error?: undefined;
|
|
62
63
|
summary?: undefined;
|
|
63
64
|
spans?: undefined;
|
|
64
65
|
id?: undefined;
|
|
65
|
-
error?: undefined;
|
|
66
66
|
ok: boolean;
|
|
67
67
|
}>>;
|
|
@@ -75,7 +75,6 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
-
message?: undefined;
|
|
79
78
|
deleted?: undefined;
|
|
80
79
|
found?: undefined;
|
|
81
80
|
providers: {
|
|
@@ -92,8 +91,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
92
91
|
registered?: undefined;
|
|
93
92
|
id?: undefined;
|
|
94
93
|
label?: undefined;
|
|
95
|
-
} | {
|
|
96
94
|
message?: undefined;
|
|
95
|
+
} | {
|
|
97
96
|
deleted?: undefined;
|
|
98
97
|
providers?: undefined;
|
|
99
98
|
count?: undefined;
|
|
@@ -102,8 +101,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
102
101
|
registered?: undefined;
|
|
103
102
|
id?: undefined;
|
|
104
103
|
label?: undefined;
|
|
105
|
-
} | {
|
|
106
104
|
message?: undefined;
|
|
105
|
+
} | {
|
|
107
106
|
deleted?: undefined;
|
|
108
107
|
providers?: undefined;
|
|
109
108
|
count?: undefined;
|
|
@@ -112,8 +111,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
112
111
|
id: string;
|
|
113
112
|
registered?: undefined;
|
|
114
113
|
label?: undefined;
|
|
115
|
-
} | {
|
|
116
114
|
message?: undefined;
|
|
115
|
+
} | {
|
|
117
116
|
found?: undefined;
|
|
118
117
|
providers?: undefined;
|
|
119
118
|
count?: undefined;
|
|
@@ -122,6 +121,7 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
122
121
|
id: string;
|
|
123
122
|
registered?: undefined;
|
|
124
123
|
label?: undefined;
|
|
124
|
+
message?: undefined;
|
|
125
125
|
} | {
|
|
126
126
|
deleted?: undefined;
|
|
127
127
|
found?: undefined;
|
|
@@ -311,9 +311,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
-
deleted?: undefined;
|
|
315
314
|
id?: undefined;
|
|
316
315
|
provider?: undefined;
|
|
316
|
+
deleted?: undefined;
|
|
317
317
|
found?: undefined;
|
|
318
318
|
providers: {
|
|
319
319
|
id: string;
|
|
@@ -329,9 +329,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
329
329
|
label?: undefined;
|
|
330
330
|
message?: undefined;
|
|
331
331
|
} | {
|
|
332
|
+
id?: undefined;
|
|
332
333
|
deleted?: undefined;
|
|
333
334
|
count?: undefined;
|
|
334
|
-
id?: undefined;
|
|
335
335
|
providers?: undefined;
|
|
336
336
|
found: boolean;
|
|
337
337
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
@@ -339,9 +339,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
339
339
|
label?: undefined;
|
|
340
340
|
message?: undefined;
|
|
341
341
|
} | {
|
|
342
|
+
provider?: undefined;
|
|
342
343
|
deleted?: undefined;
|
|
343
344
|
count?: undefined;
|
|
344
|
-
provider?: undefined;
|
|
345
345
|
providers?: undefined;
|
|
346
346
|
found: boolean;
|
|
347
347
|
id: string;
|
|
@@ -349,9 +349,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
349
349
|
label?: undefined;
|
|
350
350
|
message?: undefined;
|
|
351
351
|
} | {
|
|
352
|
-
count?: undefined;
|
|
353
352
|
provider?: undefined;
|
|
354
353
|
found?: undefined;
|
|
354
|
+
count?: undefined;
|
|
355
355
|
providers?: undefined;
|
|
356
356
|
deleted: boolean;
|
|
357
357
|
id: string;
|
|
@@ -359,10 +359,10 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
359
359
|
label?: undefined;
|
|
360
360
|
message?: undefined;
|
|
361
361
|
} | {
|
|
362
|
-
deleted?: undefined;
|
|
363
|
-
count?: undefined;
|
|
364
362
|
provider?: undefined;
|
|
363
|
+
deleted?: undefined;
|
|
365
364
|
found?: undefined;
|
|
365
|
+
count?: undefined;
|
|
366
366
|
providers?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
|
|
|
34
34
|
/** POST /_agent-native/secrets/:key — write a secret. */
|
|
35
35
|
export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
36
36
|
error: string;
|
|
37
|
-
ok?: undefined;
|
|
38
37
|
status?: undefined;
|
|
38
|
+
ok?: undefined;
|
|
39
39
|
} | {
|
|
40
|
-
error?: undefined;
|
|
41
40
|
ok: boolean;
|
|
42
41
|
status: string;
|
|
42
|
+
error?: undefined;
|
|
43
43
|
} | {
|
|
44
|
-
ok?: undefined;
|
|
45
44
|
error: string;
|
|
46
45
|
removed?: undefined;
|
|
46
|
+
ok?: undefined;
|
|
47
47
|
} | {
|
|
48
|
-
error?: undefined;
|
|
49
48
|
ok: boolean;
|
|
50
49
|
removed: boolean;
|
|
50
|
+
error?: undefined;
|
|
51
51
|
}>>;
|
|
52
52
|
/**
|
|
53
53
|
* POST /_agent-native/secrets/:key/test — validate an optional candidate value
|
|
54
54
|
* or the current stored value without changing anything.
|
|
55
55
|
*/
|
|
56
56
|
export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
57
|
-
ok?: undefined;
|
|
58
57
|
error: string;
|
|
59
58
|
note?: undefined;
|
|
59
|
+
ok?: undefined;
|
|
60
60
|
} | {
|
|
61
|
-
error?: undefined;
|
|
62
61
|
ok: boolean;
|
|
63
62
|
note?: undefined;
|
|
64
|
-
} | {
|
|
65
63
|
error?: undefined;
|
|
64
|
+
} | {
|
|
66
65
|
ok: boolean;
|
|
67
66
|
note: string;
|
|
67
|
+
error?: undefined;
|
|
68
68
|
} | {
|
|
69
69
|
note?: undefined;
|
|
70
70
|
ok: boolean;
|
|
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
|
|
|
95
95
|
export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
|
|
96
96
|
error: string;
|
|
97
97
|
} | {
|
|
98
|
-
error?: undefined;
|
|
99
98
|
ok: boolean;
|
|
100
99
|
key: string;
|
|
101
|
-
} | {
|
|
102
100
|
error?: undefined;
|
|
101
|
+
} | {
|
|
103
102
|
ok: boolean;
|
|
104
103
|
removed: boolean;
|
|
104
|
+
error?: undefined;
|
|
105
105
|
}>>;
|