@every-app/sdk 0.3.0-rc.11 → 0.3.0-rc.13
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 +6 -4
- package/dist/cloudflare/worker.d.ts +1 -1
- package/dist/cloudflare/worker.d.ts.map +1 -1
- package/dist/cloudflare/worker.js +1 -2
- package/dist/internal/aiDefault.d.ts +32 -76
- package/dist/internal/aiDefault.d.ts.map +1 -1
- package/dist/internal/aiDefault.js +41 -144
- package/dist/internal/appSettings.d.ts +26 -19
- package/dist/internal/appSettings.d.ts.map +1 -1
- package/dist/internal/appSettings.js +24 -31
- package/dist/internal/capabilities.d.ts +21 -8
- package/dist/internal/capabilities.d.ts.map +1 -1
- package/dist/internal/capabilities.js +2 -2
- package/dist/internal/catalog/commerce.js +1 -1
- package/dist/internal/gatewaySettings.d.ts +6 -16
- package/dist/internal/gatewaySettings.d.ts.map +1 -1
- package/dist/internal/gatewaySettings.js +5 -23
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -0
- package/dist/internal/mcpOAuth.d.ts +210 -0
- package/dist/internal/mcpOAuth.d.ts.map +1 -0
- package/dist/internal/mcpOAuth.js +735 -0
- package/dist/internal/oauthBuiltIns.d.ts +1 -1
- package/dist/internal/oauthBuiltIns.js +1 -1
- package/dist/internal/oauthSpec.d.ts +1 -1
- package/dist/internal/oauthSpec.d.ts.map +1 -1
- package/dist/internal/oauthSpec.js +51 -1
- package/dist/internal/protocol.d.ts +5 -24
- package/dist/internal/protocol.d.ts.map +1 -1
- package/dist/internal/protocol.js +0 -19
- package/dist/internal/providerRegistry.d.ts +4 -3
- package/dist/internal/providerRegistry.d.ts.map +1 -1
- package/dist/internal/providerRegistry.js +11 -3
- package/dist/internal/remoteMcp.d.ts +162 -47
- package/dist/internal/remoteMcp.d.ts.map +1 -1
- package/dist/internal/remoteMcp.js +261 -124
- package/dist/internal/tools.d.ts +11 -7
- package/dist/internal/tools.d.ts.map +1 -1
- package/dist/internal/tools.js +8 -8
- package/dist/manifest.d.ts +9 -25
- package/dist/manifest.d.ts.map +1 -1
- package/dist/server/ai.d.ts +1 -93
- package/dist/server/ai.d.ts.map +1 -1
- package/dist/server/ai.js +17 -111
- package/dist/server/attribution.d.ts +1 -1
- package/dist/server/context.d.ts +12 -14
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/context.js +23 -25
- package/dist/server/everyApp.d.ts +4 -23
- package/dist/server/everyApp.d.ts.map +1 -1
- package/dist/server/everyApp.js +13 -46
- package/dist/server/gatewayFetch.d.ts +1 -1
- package/dist/server/gatewayFetch.js +1 -1
- package/dist/server/index.d.ts +3 -7
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -7
- package/dist/server/integrationFetch.d.ts +1 -1
- package/dist/server/refusal.d.ts +0 -9
- package/dist/server/refusal.d.ts.map +1 -1
- package/dist/server/refusal.js +0 -22
- package/dist/server/tools.d.ts +11 -8
- package/dist/server/tools.d.ts.map +1 -1
- package/dist/server/tools.js +10 -4
- package/dist/server/toolsEndpoint.d.ts +2 -3
- package/dist/server/toolsEndpoint.d.ts.map +1 -1
- package/dist/server/toolsEndpoint.js +6 -11
- package/dist/testing/index.d.ts +2 -3
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2 -6
- package/package.json +1 -1
- package/dist/server/aiBinding.d.ts +0 -68
- package/dist/server/aiBinding.d.ts.map +0 -1
- package/dist/server/aiBinding.js +0 -294
- package/dist/server/emailBinding.d.ts +0 -72
- package/dist/server/emailBinding.d.ts.map +0 -1
- package/dist/server/emailBinding.js +0 -124
- package/dist/server/fromMcpTools.d.ts +0 -89
- package/dist/server/fromMcpTools.d.ts.map +0 -1
- package/dist/server/fromMcpTools.js +0 -192
|
@@ -94,7 +94,7 @@ export declare const BUILT_IN_OAUTH_SPECS: {
|
|
|
94
94
|
readonly id: "team_id";
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
|
-
readonly hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list.";
|
|
97
|
+
readonly hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list. The Gateway takes its Client ID and Client Secret, not a bot token (xoxb-).";
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
export type BuiltInOAuthId = keyof typeof BUILT_IN_OAUTH_SPECS;
|
|
@@ -117,6 +117,6 @@ export const BUILT_IN_OAUTH_SPECS = {
|
|
|
117
117
|
id: "team_id",
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
|
-
hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list.",
|
|
120
|
+
hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list. The Gateway takes its Client ID and Client Secret, not a bot token (xoxb-).",
|
|
121
121
|
},
|
|
122
122
|
};
|
|
@@ -22,7 +22,7 @@ export interface SpecProblem {
|
|
|
22
22
|
message: string;
|
|
23
23
|
}
|
|
24
24
|
/** The fields of `auth` when its kind is `oauth2-user`. */
|
|
25
|
-
export declare const OAUTH_AUTH_FIELDS: readonly ["kind", "authorizeUrl", "tokenUrl", "revokeUrl", "revokeMethod", "clientId", "clientSecret", "inject", "pkce", "scopeSeparator", "scopePrefix", "authorizeParams", "tokenHeaders", "identity", "tolerated"];
|
|
25
|
+
export declare const OAUTH_AUTH_FIELDS: readonly ["kind", "authorizeUrl", "tokenUrl", "revokeUrl", "revokeMethod", "clientId", "clientSecret", "inject", "pkce", "scopeSeparator", "scopePrefix", "authorizeParams", "tokenHeaders", "identity", "tolerated", "resource", "issuer"];
|
|
26
26
|
/**
|
|
27
27
|
* Fields an `oauth2-user` spec had before scopes moved to each app's
|
|
28
28
|
* `everyapp.config.ts`, each with what to write instead: refused with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauthSpec.d.ts","sourceRoot":"","sources":["../../src/internal/oauthSpec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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AC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAC5D,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAClB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YACvB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;SACrC,CAAC;QACF,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACxC,CAAC;IACF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,aAAa,GAClB,qBAAqB,CAuDvB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,qBAAqB,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2DzB"}
|
|
@@ -47,6 +47,8 @@ export const OAUTH_AUTH_FIELDS = [
|
|
|
47
47
|
"tokenHeaders",
|
|
48
48
|
"identity",
|
|
49
49
|
"tolerated",
|
|
50
|
+
"resource",
|
|
51
|
+
"issuer",
|
|
50
52
|
];
|
|
51
53
|
/**
|
|
52
54
|
* Fields an `oauth2-user` spec had before scopes moved to each app's
|
|
@@ -110,7 +112,9 @@ function endpoint(value, path, problems, { query }) {
|
|
|
110
112
|
parsed.hash) {
|
|
111
113
|
problems.push({
|
|
112
114
|
path,
|
|
113
|
-
message:
|
|
115
|
+
message: parsed.port
|
|
116
|
+
? `must be an https URL on the default port (${parsed.port} is not: the Gateway's OAuth requests go to port 443 only), with no credentials or fragment`
|
|
117
|
+
: "must be an https URL with no port, credentials or fragment",
|
|
114
118
|
});
|
|
115
119
|
return undefined;
|
|
116
120
|
}
|
|
@@ -120,6 +124,42 @@ function endpoint(value, path, problems, { query }) {
|
|
|
120
124
|
}
|
|
121
125
|
return { url, host: parsed.hostname.toLowerCase() };
|
|
122
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* An https URL that names something rather than being fetched (an RFC
|
|
129
|
+
* 8707 resource, an RFC 8414 issuer): a port is allowed, credentials and a
|
|
130
|
+
* fragment are not, and an issuer takes no query either.
|
|
131
|
+
*/
|
|
132
|
+
function identifierUrl(value, path, problems, { query }) {
|
|
133
|
+
if (value === undefined)
|
|
134
|
+
return undefined;
|
|
135
|
+
const url = printable(value, path, problems, 2048);
|
|
136
|
+
if (url === undefined)
|
|
137
|
+
return undefined;
|
|
138
|
+
let parsed;
|
|
139
|
+
try {
|
|
140
|
+
parsed = new URL(url);
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
problems.push({ path, message: "must be an https URL" });
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
if (parsed.protocol !== "https:" ||
|
|
147
|
+
parsed.username ||
|
|
148
|
+
parsed.password ||
|
|
149
|
+
parsed.hash ||
|
|
150
|
+
url.includes("#")) {
|
|
151
|
+
problems.push({
|
|
152
|
+
path,
|
|
153
|
+
message: "must be an https URL with no credentials or fragment",
|
|
154
|
+
});
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
if (!query && parsed.search) {
|
|
158
|
+
problems.push({ path, message: "may not carry a query string" });
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
return url;
|
|
162
|
+
}
|
|
123
163
|
function settingName(value, path, problems) {
|
|
124
164
|
if (typeof value !== "string" || !/^[A-Z][A-Z0-9_]{2,63}$/.test(value)) {
|
|
125
165
|
problems.push({
|
|
@@ -345,6 +385,12 @@ export function parseOAuthUserSpec(input, common, problems) {
|
|
|
345
385
|
});
|
|
346
386
|
const parsedIdentity = identity(auth["identity"], common.hosts, problems);
|
|
347
387
|
const tolerated = scopeList(auth["tolerated"], "auth.tolerated", problems);
|
|
388
|
+
const resource = identifierUrl(auth["resource"], "auth.resource", problems, {
|
|
389
|
+
query: true,
|
|
390
|
+
});
|
|
391
|
+
const issuer = identifierUrl(auth["issuer"], "auth.issuer", problems, {
|
|
392
|
+
query: false,
|
|
393
|
+
});
|
|
348
394
|
if (!authorize ||
|
|
349
395
|
!token ||
|
|
350
396
|
clientId === undefined ||
|
|
@@ -371,6 +417,8 @@ export function parseOAuthUserSpec(input, common, problems) {
|
|
|
371
417
|
: { identity: parsedIdentity.identity }),
|
|
372
418
|
identityScopes: parsedIdentity?.scopes ?? [],
|
|
373
419
|
tolerated: tolerated ?? [],
|
|
420
|
+
...(resource === undefined ? {} : { resource }),
|
|
421
|
+
...(issuer === undefined ? {} : { issuer }),
|
|
374
422
|
};
|
|
375
423
|
const capability = oauthCapabilityOf(common, {
|
|
376
424
|
clientId,
|
|
@@ -510,6 +558,8 @@ export function oauthSpecOf(id, capability) {
|
|
|
510
558
|
...(flow.tolerated.length === 0
|
|
511
559
|
? {}
|
|
512
560
|
: { tolerated: [...flow.tolerated] }),
|
|
561
|
+
...(flow.resource === undefined ? {} : { resource: flow.resource }),
|
|
562
|
+
...(flow.issuer === undefined ? {} : { issuer: flow.issuer }),
|
|
513
563
|
},
|
|
514
564
|
...(capability.hint === undefined ? {} : { hint: capability.hint }),
|
|
515
565
|
...(capability.example === undefined
|
|
@@ -102,19 +102,11 @@ export declare const LINKED_DEV_NONCE_ENV = "EVERYAPP_LINKED_DEV_NONCE";
|
|
|
102
102
|
export declare const LINKED_DEV_HEADER = "x-everyapp-linked-dev";
|
|
103
103
|
/** Where the gateway-lite serves the forwarder, under the app's own host. */
|
|
104
104
|
export declare const LINKED_DEV_FORWARD_PATH = "/__everyapp/gateway";
|
|
105
|
-
export type IdentityChannel = "web" | "api" | "mcp"
|
|
106
|
-
/**
|
|
107
|
-
* The channels a tool call arrives on: `mcp` for an AI client's MCP
|
|
108
|
-
* connection, `agent` for an agent principal the Gateway runs a call for.
|
|
109
|
-
* Only the ToolBus mints either with a `tc` claim.
|
|
110
|
-
*/
|
|
111
|
-
export declare const TOOL_CALL_CHANNELS: readonly IdentityChannel[];
|
|
112
|
-
/** `act.sub` of an agent principal: `agent:<agt_id>`; `sub` stays its sponsor. */
|
|
113
|
-
export declare const AGENT_ACTOR_PREFIX = "agent:";
|
|
105
|
+
export type IdentityChannel = "web" | "api" | "mcp";
|
|
114
106
|
export type IdentityTokenType = "user" | "public" | "system";
|
|
115
107
|
/** What a system token may open. One purpose per token. */
|
|
116
108
|
export type SystemTokenPurpose = "tools.list" | "events.deliver";
|
|
117
|
-
/** The actor on whose behalf the request is made (user, MCP client
|
|
109
|
+
/** The actor on whose behalf the request is made (user, MCP client). */
|
|
118
110
|
export interface IdentityActor {
|
|
119
111
|
sub: string;
|
|
120
112
|
}
|
|
@@ -141,16 +133,6 @@ export declare function toOrgRole(role: unknown): OrgRole;
|
|
|
141
133
|
export declare function isAdmin(user: {
|
|
142
134
|
orgRole: OrgRole | string;
|
|
143
135
|
}): boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Whether an agent principal made this call: `chan: "agent"` with
|
|
146
|
-
* `act.sub` `agent:<agt_id>`. `user.id` is still the sponsoring member (the
|
|
147
|
-
* person accountable for the agent), so key rows by it as for anyone;
|
|
148
|
-
* `user.actor.sub` names the agent.
|
|
149
|
-
*/
|
|
150
|
-
export declare function isAgentCall(user: {
|
|
151
|
-
channel: IdentityChannel;
|
|
152
|
-
actor: IdentityActor;
|
|
153
|
-
}): boolean;
|
|
154
136
|
export interface EveryAppUser {
|
|
155
137
|
/** User id (the `sub` claim). */
|
|
156
138
|
id: string;
|
|
@@ -167,15 +149,14 @@ export interface EveryAppUser {
|
|
|
167
149
|
channel: IdentityChannel;
|
|
168
150
|
/**
|
|
169
151
|
* The acting principal: the user id, the credential acting for them
|
|
170
|
-
* (`pat:<id>`, `oauth:<id>`, `access:<email>`)
|
|
171
|
-
* (`agent:<agt_id>`, on `channel: "agent"`; {@link isAgentCall}).
|
|
152
|
+
* (`pat:<id>`, `oauth:<id>`, `access:<email>`).
|
|
172
153
|
*/
|
|
173
154
|
actor: IdentityActor;
|
|
174
155
|
scopes: string[];
|
|
175
156
|
jti: string;
|
|
176
157
|
/**
|
|
177
|
-
* Set only on a tool call (`channel: "mcp"`
|
|
178
|
-
*
|
|
158
|
+
* Set only on a tool call (`channel: "mcp"`): the one call this
|
|
159
|
+
* identity was minted for.
|
|
179
160
|
*/
|
|
180
161
|
toolCall?: ToolCallClaim;
|
|
181
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/internal/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,YAAY,UAAU,CAAC;AACpC,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,kCAAkC,CAAC;AAC1D,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,kFAAkF;A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;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yFAAyF;AACzF,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAU5D;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA8BjB"}
|
|
@@ -101,14 +101,6 @@ export const LINKED_DEV_NONCE_ENV = "EVERYAPP_LINKED_DEV_NONCE";
|
|
|
101
101
|
export const LINKED_DEV_HEADER = "x-everyapp-linked-dev";
|
|
102
102
|
/** Where the gateway-lite serves the forwarder, under the app's own host. */
|
|
103
103
|
export const LINKED_DEV_FORWARD_PATH = "/__everyapp/gateway";
|
|
104
|
-
/**
|
|
105
|
-
* The channels a tool call arrives on: `mcp` for an AI client's MCP
|
|
106
|
-
* connection, `agent` for an agent principal the Gateway runs a call for.
|
|
107
|
-
* Only the ToolBus mints either with a `tc` claim.
|
|
108
|
-
*/
|
|
109
|
-
export const TOOL_CALL_CHANNELS = ["mcp", "agent"];
|
|
110
|
-
/** `act.sub` of an agent principal: `agent:<agt_id>`; `sub` stays its sponsor. */
|
|
111
|
-
export const AGENT_ACTOR_PREFIX = "agent:";
|
|
112
104
|
/** `role` as an {@link OrgRole}: `owner` and `admin` as they are, anything else `member`. */
|
|
113
105
|
export function toOrgRole(role) {
|
|
114
106
|
return role === "owner" || role === "admin" ? role : "member";
|
|
@@ -117,17 +109,6 @@ export function toOrgRole(role) {
|
|
|
117
109
|
export function isAdmin(user) {
|
|
118
110
|
return user.orgRole === "owner" || user.orgRole === "admin";
|
|
119
111
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Whether an agent principal made this call: `chan: "agent"` with
|
|
122
|
-
* `act.sub` `agent:<agt_id>`. `user.id` is still the sponsoring member (the
|
|
123
|
-
* person accountable for the agent), so key rows by it as for anyone;
|
|
124
|
-
* `user.actor.sub` names the agent.
|
|
125
|
-
*/
|
|
126
|
-
export function isAgentCall(user) {
|
|
127
|
-
return (user.channel === "agent" &&
|
|
128
|
-
user.actor.sub.startsWith(AGENT_ACTOR_PREFIX) &&
|
|
129
|
-
user.actor.sub.length > AGENT_ACTOR_PREFIX.length);
|
|
130
|
-
}
|
|
131
112
|
export class ProtocolClaimsError extends Error {
|
|
132
113
|
constructor(message) {
|
|
133
114
|
super(message);
|
|
@@ -45,9 +45,10 @@ export interface ProviderRow {
|
|
|
45
45
|
* replacing a row's hosts or auth changes the key and the value it held
|
|
46
46
|
* is no longer read until the operator sets it again. For an OAuth
|
|
47
47
|
* provider the client is bound to its authorize, token and revoke URLs,
|
|
48
|
-
* its API hosts, where the client goes on the token request
|
|
49
|
-
*
|
|
50
|
-
* re-points `tokenUrl`
|
|
48
|
+
* its API hosts, where the client goes on the token request, its client
|
|
49
|
+
* setting names, and its `resource` and `issuer` when it has them
|
|
50
|
+
* (`oauth.client-bound-to-endpoints`): an admin who re-points `tokenUrl`
|
|
51
|
+
* has to paste the secret again.
|
|
51
52
|
*/
|
|
52
53
|
export declare function providerBindingKey(capability: RegistrableCapability): string;
|
|
53
54
|
/** One registered row as `provider list` and `provider show` report it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerRegistry.d.ts","sourceRoot":"","sources":["../../src/internal/providerRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,IAAI,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED
|
|
1
|
+
{"version":3,"file":"providerRegistry.d.ts","sourceRoot":"","sources":["../../src/internal/providerRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,IAAI,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAkC5E;AAoBD,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,qBAAqB,CAAC;IAClC,uEAAuE;IACvE,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GACtB,uBAAuB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,CAAC;AAE5B,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM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,MAAM,GAAG,IAAI,CAYf;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAC/B,MAAM,GAAG,IAAI,CAwBf;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE;IACP,oCAAoC;IACpC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CAC9C,GACA,UAAU,GAAG,IAAI,CAuBnB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAqB5E;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE;IACP,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CAC9C,GAEC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,qBAAqB,CAAA;CAAE,GAC/C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAyCrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,SAAS,WAAW,EAAO,EACjC,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAqElB;AAED,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,EAAE,gBAAqC,CAAC"}
|
|
@@ -30,9 +30,10 @@ import { describeSpecProblems, parseProviderSpec, PROVIDER_ID, } from "./provide
|
|
|
30
30
|
* replacing a row's hosts or auth changes the key and the value it held
|
|
31
31
|
* is no longer read until the operator sets it again. For an OAuth
|
|
32
32
|
* provider the client is bound to its authorize, token and revoke URLs,
|
|
33
|
-
* its API hosts, where the client goes on the token request
|
|
34
|
-
*
|
|
35
|
-
* re-points `tokenUrl`
|
|
33
|
+
* its API hosts, where the client goes on the token request, its client
|
|
34
|
+
* setting names, and its `resource` and `issuer` when it has them
|
|
35
|
+
* (`oauth.client-bound-to-endpoints`): an admin who re-points `tokenUrl`
|
|
36
|
+
* has to paste the secret again.
|
|
36
37
|
*/
|
|
37
38
|
export function providerBindingKey(capability) {
|
|
38
39
|
if (capability.mode === "ai") {
|
|
@@ -54,6 +55,13 @@ export function providerBindingKey(capability) {
|
|
|
54
55
|
clientId: capability.secrets.clientId,
|
|
55
56
|
clientSecret: capability.secrets.clientSecret ?? null,
|
|
56
57
|
hosts: [...capability.api].sort(),
|
|
58
|
+
// Only when present, so a row without them keeps the key it was bound to.
|
|
59
|
+
...(capability.flow?.resource === undefined
|
|
60
|
+
? {}
|
|
61
|
+
: { resource: capability.flow.resource }),
|
|
62
|
+
...(capability.flow?.issuer === undefined
|
|
63
|
+
? {}
|
|
64
|
+
: { issuer: capability.flow.issuer }),
|
|
57
65
|
});
|
|
58
66
|
}
|
|
59
67
|
return JSON.stringify({
|
|
@@ -1,34 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remote MCP apps: any remote MCP server registered on a gateway by URL
|
|
3
|
+
* (`everyapp mcp add <url>`, Admin → Apps → Add app → "Add an MCP server",
|
|
4
|
+
* `everyapp_mcp_add`), served to members' AI clients as an MCP app of the
|
|
5
|
+
* Gateway's own, like a built-in provider app (./providerApps.ts) but with
|
|
6
|
+
* its tools read from the server and each call forwarded to it
|
|
7
|
+
* (docs/design/2026-10-mcp-by-url.md, docs/design/2026-11-mcp-apps-auth.md).
|
|
8
|
+
*
|
|
9
|
+
* The registration record is the app row's manifest: `id`, `name`,
|
|
10
|
+
* `description` and a `remote` block ({@link RemoteMcpBlock}): the one URL
|
|
11
|
+
* the Gateway ever fetches, its credential ({@link RemoteMcpAuth}: none, or
|
|
12
|
+
* a provider of the registry, whose key or OAuth connection the Gateway
|
|
13
|
+
* holds and binds to the provider's hosts), how a tool's risk is decided
|
|
14
|
+
* when the server's annotations don't say, the operator's per-tool
|
|
15
|
+
* overrides, and a revision the writers bump so the Gateway re-lists the
|
|
16
|
+
* tools on first use after a change. An app with a provider also lists it
|
|
17
|
+
* under `capabilities` ({@link remoteMcpAppManifest}), so the settings
|
|
18
|
+
* model treats its key or client as any app's.
|
|
19
|
+
*
|
|
20
|
+
* A credential the registrar gives at `mcp add` becomes a provider row of
|
|
21
|
+
* the app's own, `<appId>-mcp` ({@link remoteMcpProviderId}; the specs are
|
|
22
|
+
* built in ./mcpOAuth.ts): an API-key row for a static value
|
|
23
|
+
* (`<APPID>_MCP_TOKEN`), a discovered `oauth2-user` row for OAuth
|
|
24
|
+
* (`<APPID>_MCP_CLIENT_ID`, `_SECRET`).
|
|
25
|
+
*
|
|
26
|
+
* Everything here is pure and shared by the CLI, the perimeter's registry
|
|
27
|
+
* rules, the Gateway (which serves the row and validates again at every
|
|
28
|
+
* fetch) and the settings model (./appSettings.ts), so the rules cannot
|
|
29
|
+
* drift: what the URL may be, what the credential may be, how a server's
|
|
30
|
+
* tool names become the ToolBus's, and what risk a tool gets.
|
|
31
|
+
*/
|
|
32
|
+
import { type Capability, type CapabilitySettings } from "./capabilities.js";
|
|
1
33
|
import { type ToolRisk } from "./tools.js";
|
|
2
|
-
|
|
34
|
+
/** The kinds a stored `remote.auth` block may have. */
|
|
35
|
+
export declare const REMOTE_MCP_AUTH_KINDS: readonly ["none", "provider"];
|
|
3
36
|
export type RemoteMcpAuthKind = (typeof REMOTE_MCP_AUTH_KINDS)[number];
|
|
4
37
|
/**
|
|
5
|
-
* How the Gateway authenticates to the server
|
|
6
|
-
* the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
38
|
+
* How the Gateway authenticates to the server: nothing, or a provider of
|
|
39
|
+
* the registry (a catalog entry such as `elevenlabs`, a registered row, or
|
|
40
|
+
* the row `everyapp mcp add` synthesizes for the app,
|
|
41
|
+
* {@link remoteMcpProviderId}). The credential lives with the provider and
|
|
42
|
+
* is bound to its hosts (`providers.value-bound-to-hosts`); the block only
|
|
43
|
+
* names it. With an OAuth provider each member connects their own
|
|
44
|
+
* account in the app.
|
|
9
45
|
*/
|
|
10
46
|
export type RemoteMcpAuth = {
|
|
11
47
|
kind: "none";
|
|
12
|
-
}
|
|
13
|
-
/** `Authorization: Bearer <value>`. */
|
|
14
|
-
| {
|
|
15
|
-
kind: "bearer";
|
|
16
|
-
secret: string;
|
|
17
|
-
}
|
|
18
|
-
/** `<header>: <prefix><value>`. */
|
|
19
|
-
| {
|
|
20
|
-
kind: "header";
|
|
21
|
-
secret: string;
|
|
22
|
-
header: string;
|
|
23
|
-
prefix?: string;
|
|
24
|
-
}
|
|
25
|
-
/** The value is `user:password`; sent as `Authorization: Basic <base64>`. */
|
|
26
|
-
| {
|
|
27
|
-
kind: "basic";
|
|
28
|
-
secret: string;
|
|
29
48
|
} | {
|
|
30
|
-
kind: "
|
|
49
|
+
kind: "provider";
|
|
50
|
+
provider: string;
|
|
31
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* What the registrar may ask for at `mcp add` (`--auth`): none, a static
|
|
54
|
+
* credential the add turns into a synthesized API-key provider row, or
|
|
55
|
+
* OAuth, a discovered `oauth2-user` row (./mcpOAuth.ts).
|
|
56
|
+
*/
|
|
57
|
+
export declare const REMOTE_MCP_CREDENTIAL_KINDS: readonly ["none", "bearer", "header", "query", "basic", "oauth"];
|
|
58
|
+
export type RemoteMcpCredentialKind = (typeof REMOTE_MCP_CREDENTIAL_KINDS)[number];
|
|
59
|
+
/** The static credential kinds: one value, placed as the synthesized row's `auth` says. */
|
|
60
|
+
export type RemoteMcpStaticKind = Exclude<RemoteMcpCredentialKind, "none" | "oauth">;
|
|
61
|
+
/** Why an old registration (`bearer`, `header`, `basic`, `oauth` with a `secret`) no longer parses. */
|
|
62
|
+
export declare const REMOTE_MCP_AUTH_PREDATES = "this registration predates provider credentials; remove it and add it again";
|
|
32
63
|
/**
|
|
33
64
|
* How a tool's risk is decided for the app. `annotations`: from the
|
|
34
65
|
* server's hints ({@link remoteToolRisk}); `read` or `write`: every tool,
|
|
@@ -57,13 +88,55 @@ export interface RemoteMcpManifest {
|
|
|
57
88
|
name: string;
|
|
58
89
|
description: string;
|
|
59
90
|
remote: RemoteMcpBlock;
|
|
91
|
+
/** The provider the app's credential is, listed as a deployed app lists one ({@link remoteMcpAppManifest}). */
|
|
92
|
+
capabilities?: Record<string, RemoteMcpCapabilityEntry>;
|
|
60
93
|
}
|
|
61
94
|
/** The manifest fields the Gateway reads, as a stored manifest has them. */
|
|
62
95
|
export interface RemoteMcpManifestLike {
|
|
63
96
|
readonly remote?: unknown;
|
|
64
97
|
}
|
|
65
|
-
/**
|
|
66
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Why `header` can't carry a remote MCP server's static credential, or
|
|
100
|
+
* null when it can: an HTTP header name the MCP transport and the Gateway
|
|
101
|
+
* don't set themselves.
|
|
102
|
+
*/
|
|
103
|
+
export declare function remoteMcpHeaderProblem(header: unknown): string | null;
|
|
104
|
+
/**
|
|
105
|
+
* The provider row `everyapp mcp add` writes for an app's own credential:
|
|
106
|
+
* `<appId>-mcp` (`treg` → `treg-mcp`), its settings `TREG_MCP_*`.
|
|
107
|
+
*/
|
|
108
|
+
export declare function remoteMcpProviderId(appId: string): string;
|
|
109
|
+
/** Whether `providerId` is `appId`'s synthesized row ({@link remoteMcpProviderId}). */
|
|
110
|
+
export declare function isRemoteMcpProviderIdOf(providerId: string, appId: string): boolean;
|
|
111
|
+
/** The static credential's setting on the synthesized row: `treg` → `TREG_MCP_TOKEN`. */
|
|
112
|
+
export declare function remoteMcpTokenSetting(appId: string): string;
|
|
113
|
+
/** The OAuth client id's setting on the synthesized row: `treg` → `TREG_MCP_CLIENT_ID`. */
|
|
114
|
+
export declare function remoteMcpClientIdSetting(appId: string): string;
|
|
115
|
+
/** The OAuth client secret's setting on the synthesized row: `treg` → `TREG_MCP_CLIENT_SECRET`. */
|
|
116
|
+
export declare function remoteMcpClientSecretSetting(appId: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* The redirect URI of an app's synthesized OAuth row, what a server's
|
|
119
|
+
* client is registered with: `<gateway origin>/connect/<appId>-mcp/callback`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function remoteMcpRedirectUri(gatewayUrl: string, appId: string): string;
|
|
122
|
+
/** Where the Gateway serves its OAuth client metadata documents (public, bypassed behind Access). */
|
|
123
|
+
export declare const REMOTE_MCP_CLIENT_METADATA_PREFIX = "/oauth-clients/";
|
|
124
|
+
/**
|
|
125
|
+
* The Gateway's client id at a server that takes OAuth client ID metadata
|
|
126
|
+
* documents (CIMD) instead of registration: the URL of the document that
|
|
127
|
+
* describes the client, `<gateway origin>/oauth-clients/<appId>-mcp`.
|
|
128
|
+
* Null for a Gateway that isn't on https (a local one): an authorization
|
|
129
|
+
* server fetches the document, and only from https.
|
|
130
|
+
*/
|
|
131
|
+
export declare function remoteMcpClientMetadataUrl(gatewayUrl: string, appId: string): string | null;
|
|
132
|
+
/**
|
|
133
|
+
* The hosts a provider sends its credential to, the hosts an MCP URL
|
|
134
|
+
* using it must be on: an API-key provider's `hosts` (and its host
|
|
135
|
+
* setting's value, given `settings`), an OAuth provider's API hosts. Null
|
|
136
|
+
* for a provider a remote MCP app can't use: an AI provider, a service,
|
|
137
|
+
* or an OAuth client the Gateway runs no flow for.
|
|
138
|
+
*/
|
|
139
|
+
export declare function remoteMcpProviderHosts(capability: Capability, settings?: CapabilitySettings): string[] | null;
|
|
67
140
|
/** Whether `id` can be a remote MCP app's id (kebab-case, at most 32, not reserved, not a built-in's). */
|
|
68
141
|
export declare function remoteMcpIdProblem(id: string): string | null;
|
|
69
142
|
/**
|
|
@@ -88,14 +161,25 @@ export declare function reservedUpstreamHosts(): string[];
|
|
|
88
161
|
* `https:` (or `http:` and loopback hosts only while the Gateway itself
|
|
89
162
|
* runs on `http://`, local dev), a host name rather than an address, no
|
|
90
163
|
* credentials or fragment in it, not the Gateway's own origin or one of
|
|
91
|
-
* its app hosts, and not a provider whose key the Gateway holds
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
164
|
+
* its app hosts, and not a provider whose key the Gateway holds
|
|
165
|
+
* ({@link reservedUpstreamHosts}) unless the app names that provider:
|
|
166
|
+
* `providerHosts` are the hosts of the provider the app's credential is
|
|
167
|
+
* (never an app's own synthesized row), and a reserved host among them is
|
|
168
|
+
* allowed (`mcp add https://api.elevenlabs.io/v1/mcp --provider
|
|
169
|
+
* elevenlabs`). The Gateway's own origin, its app domains and IPs stay
|
|
170
|
+
* refused always. The Gateway checks the stored URL again before every
|
|
171
|
+
* fetch, so a row edited by hand is refused the same way.
|
|
172
|
+
*/
|
|
173
|
+
export declare function remoteMcpUrlProblem(url: string, env: RemoteMcpUrlEnv, options?: {
|
|
174
|
+
providerHosts?: readonly string[];
|
|
175
|
+
}): string | null;
|
|
176
|
+
/**
|
|
177
|
+
* The auth block's problem, or the block as typed: `{ kind: "none" }`,
|
|
178
|
+
* or `{ kind: "provider", provider }` naming a provider id. A
|
|
179
|
+
* block of the kinds before provider credentials (`bearer`, `header`,
|
|
180
|
+
* `basic`, `oauth`) is refused with {@link REMOTE_MCP_AUTH_PREDATES}: such
|
|
181
|
+
* a row serves nothing and reads as needing setup.
|
|
182
|
+
*/
|
|
99
183
|
export declare function parseRemoteMcpAuth(raw: unknown): {
|
|
100
184
|
ok: true;
|
|
101
185
|
auth: RemoteMcpAuth;
|
|
@@ -103,6 +187,8 @@ export declare function parseRemoteMcpAuth(raw: unknown): {
|
|
|
103
187
|
ok: false;
|
|
104
188
|
problem: string;
|
|
105
189
|
};
|
|
190
|
+
/** The provider the block names, or null for `none`. */
|
|
191
|
+
export declare function remoteMcpProviderOf(auth: RemoteMcpAuth): string | null;
|
|
106
192
|
/**
|
|
107
193
|
* The `remote` block of a stored manifest, checked field by field (a row
|
|
108
194
|
* edited by hand must not make the Gateway send a credential anywhere the
|
|
@@ -123,10 +209,14 @@ export declare function parseRemoteMcpBlock(raw: unknown): {
|
|
|
123
209
|
* as needing setup, see app-setup).
|
|
124
210
|
*/
|
|
125
211
|
export declare function remoteMcpOf(manifest: unknown): RemoteMcpBlock | null;
|
|
212
|
+
/**
|
|
213
|
+
* Why a stored manifest's `remote` block can't be read, or null when it
|
|
214
|
+
* can or there is none: {@link REMOTE_MCP_AUTH_PREDATES} for a block from
|
|
215
|
+
* before provider credentials.
|
|
216
|
+
*/
|
|
217
|
+
export declare function remoteMcpBlockProblem(manifest: unknown): string | null;
|
|
126
218
|
/** Whether a stored manifest declares a remote MCP server at all (well-formed or not). */
|
|
127
219
|
export declare function hasRemoteMcpBlock(manifest: unknown): boolean;
|
|
128
|
-
/** The credential's setting name the block declares, if its kind takes one. */
|
|
129
|
-
export declare function remoteMcpSecretOf(auth: RemoteMcpAuth): string | null;
|
|
130
220
|
/**
|
|
131
221
|
* A description for a row that gave none: the server's origin, read as a
|
|
132
222
|
* sentence. The origin only: a path or query may carry something the
|
|
@@ -143,23 +233,46 @@ export declare function remoteMcpDefaultDescription(name: string, url: string):
|
|
|
143
233
|
export declare function remoteToolOverride(block: Pick<RemoteMcpBlock, "tools">, upstreamName: string): RemoteMcpToolOverride | undefined;
|
|
144
234
|
/** Whether a server's tool name can travel in an HTTP header (`Mcp-Name`): visible ASCII, bounded. */
|
|
145
235
|
export declare function isHeaderSafeToolName(name: string): boolean;
|
|
146
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* The entry a remote MCP app's manifest lists its provider under
|
|
238
|
+
* (`capabilities`), as a deployed app lists one: `{ access, why }` for an
|
|
239
|
+
* API-key provider, `{ scopes, why }` for an OAuth one.
|
|
240
|
+
*/
|
|
241
|
+
export type RemoteMcpCapabilityEntry = {
|
|
242
|
+
access: "read";
|
|
243
|
+
why: string;
|
|
244
|
+
} | {
|
|
245
|
+
scopes: string[];
|
|
246
|
+
why: string;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* The manifest a remote MCP app's row stores, from what the registrar
|
|
250
|
+
* gave. An app with a provider credential lists the provider under
|
|
251
|
+
* `capabilities` like a deployed app that uses it, so the settings model
|
|
252
|
+
* (./appSettings.ts) asks for its key or client, `secret list` names it
|
|
253
|
+
* and the connect flow asks for its scopes: nothing about a remote app's
|
|
254
|
+
* credential is special there. `providerCapability` is the provider as
|
|
255
|
+
* the registry resolves it (the synthesized row's, before it is written);
|
|
256
|
+
* for an OAuth provider the entry lists `scopes`, the server's own scope
|
|
257
|
+
* strings the connect asks for (discovery's, or none: the server decides).
|
|
258
|
+
*/
|
|
147
259
|
export declare function remoteMcpAppManifest(input: {
|
|
148
260
|
id: string;
|
|
149
261
|
name?: string | null;
|
|
150
262
|
description?: string | null;
|
|
151
263
|
remote: RemoteMcpBlock;
|
|
264
|
+
providerCapability?: Capability | null;
|
|
265
|
+
/** An OAuth provider's scopes the connect asks for. */
|
|
266
|
+
scopes?: readonly string[] | null;
|
|
152
267
|
}): RemoteMcpManifest;
|
|
153
268
|
/** How a tool got its risk: the server's hint, the app's default, the operator's override, or the fallback. */
|
|
154
269
|
export type RemoteToolRiskSource = "hint" | "app" | "override" | "default";
|
|
155
270
|
/**
|
|
156
271
|
* A tool's risk for the Gateway. An override wins; then the app's `read`
|
|
157
|
-
* or `write` default; then the server's hints
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* default for `destructiveHint` is not followed: it would hide every
|
|
162
|
-
* unhinted tool.
|
|
272
|
+
* or `write` default; then the server's hints: an explicit `readOnlyHint:
|
|
273
|
+
* true` is `read`, and anything else, a missing hint included, is `write`.
|
|
274
|
+
* A write tool keeps the server's `destructiveHint`, so clients still ask
|
|
275
|
+
* before calling it.
|
|
163
276
|
*/
|
|
164
277
|
export declare function remoteToolRisk(hints: {
|
|
165
278
|
readOnlyHint?: unknown;
|
|
@@ -179,10 +292,12 @@ export declare function remoteToolEnabled(block: Pick<RemoteMcpBlock, "tools">,
|
|
|
179
292
|
*/
|
|
180
293
|
export declare function normalizeRemoteToolName(name: string): string | null;
|
|
181
294
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
295
|
+
* Plain words for how the app authenticates, for lists and dialogs. With
|
|
296
|
+
* the provider's capability as the registry resolves it: "bearer token",
|
|
297
|
+
* "header X-Api-Key", "query parameter key", "user and password" (an
|
|
298
|
+
* API-key provider; "<kind>, <provider>'s key" when the provider isn't
|
|
299
|
+
* the app's own synthesized row), or "OAuth, each member connects" (an
|
|
300
|
+
* OAuth provider). Without it, the provider's id.
|
|
184
301
|
*/
|
|
185
|
-
export declare function
|
|
186
|
-
/** Plain words for an auth kind, for lists and dialogs. */
|
|
187
|
-
export declare function remoteMcpAuthLabel(auth: RemoteMcpAuth): string;
|
|
302
|
+
export declare function remoteMcpAuthLabel(auth: RemoteMcpAuth, capability?: Capability | null): string;
|
|
188
303
|
//# sourceMappingURL=remoteMcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteMcp.d.ts","sourceRoot":"","sources":["../../src/internal/remoteMcp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remoteMcp.d.ts","sourceRoot":"","sources":["../../src/internal/remoteMcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAiC,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,+BAAgC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM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