@zackbart/connecta 0.15.1 → 0.16.1
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/AGENTS.md +40 -20
- package/CHANGELOG.md +653 -0
- package/README.md +25 -5
- package/bin/connecta.mjs +44 -3
- package/dist/access-tokens.d.ts +0 -1
- package/dist/access-tokens.js +0 -1
- package/dist/activity.d.ts +50 -2
- package/dist/activity.js +34 -1
- package/dist/apps-shell.d.ts +0 -1
- package/dist/apps-shell.js +0 -1
- package/dist/auth/bearer.d.ts +0 -1
- package/dist/auth/bearer.js +0 -1
- package/dist/auth/clerk.d.ts +0 -1
- package/dist/auth/clerk.js +45 -9
- package/dist/auth/downstream-oauth.d.ts +0 -1
- package/dist/auth/downstream-oauth.js +0 -1
- package/dist/call-admission.d.ts +0 -1
- package/dist/call-admission.js +0 -1
- package/dist/catalog-drift.d.ts +99 -0
- package/dist/catalog-drift.js +251 -0
- package/dist/catalog-fingerprint.d.ts +0 -1
- package/dist/catalog-fingerprint.js +0 -1
- package/dist/catalog-limits.d.ts +0 -1
- package/dist/catalog-limits.js +0 -1
- package/dist/catalog-service.d.ts +0 -1
- package/dist/catalog-service.js +41 -5
- package/dist/catalog.d.ts +11 -1
- package/dist/catalog.js +20 -1
- package/dist/concurrency.d.ts +0 -1
- package/dist/concurrency.js +0 -1
- package/dist/connector-scope.d.ts +0 -1
- package/dist/connector-scope.js +0 -1
- package/dist/connectors/api.d.ts +29 -21
- package/dist/connectors/api.js +45 -19
- package/dist/connectors/guarded-fetch.d.ts +106 -0
- package/dist/connectors/guarded-fetch.js +289 -0
- package/dist/connectors/remote-mcp.d.ts +0 -1
- package/dist/connectors/remote-mcp.js +0 -1
- package/dist/credentials.d.ts +0 -1
- package/dist/credentials.js +0 -1
- package/dist/errors.d.ts +30 -3
- package/dist/errors.js +1 -1
- package/dist/execute.d.ts +0 -1
- package/dist/execute.js +0 -1
- package/dist/executor-admission.d.ts +11 -1
- package/dist/executor-admission.js +28 -1
- package/dist/executor-result.d.ts +0 -1
- package/dist/executor-result.js +0 -1
- package/dist/executors/quickjs-child.d.ts +0 -1
- package/dist/executors/quickjs-child.js +0 -1
- package/dist/executors/quickjs-protocol.d.ts +0 -1
- package/dist/executors/quickjs-protocol.js +0 -1
- package/dist/executors/quickjs-runtime.d.ts +0 -1
- package/dist/executors/quickjs-runtime.js +0 -1
- package/dist/executors/quickjs.d.ts +0 -1
- package/dist/executors/quickjs.js +2 -1
- package/dist/favicon.d.ts +0 -1
- package/dist/favicon.js +0 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +24 -7
- package/dist/invocation.d.ts +0 -1
- package/dist/invocation.js +0 -1
- package/dist/json-schema.d.ts +0 -1
- package/dist/json-schema.js +0 -1
- package/dist/mcp-result.d.ts +0 -1
- package/dist/mcp-result.js +0 -1
- package/dist/meta-tools.d.ts +0 -1
- package/dist/meta-tools.js +0 -1
- package/dist/node.d.ts +0 -1
- package/dist/node.js +0 -1
- package/dist/operator-ui/generated.d.ts +2 -3
- package/dist/operator-ui/generated.js +3 -4
- package/dist/operator-ui/model.d.ts +10 -1
- package/dist/operator-ui/model.js +0 -1
- package/dist/operator-ui/view.d.ts +167 -0
- package/dist/operator-ui/view.js +270 -0
- package/dist/providers/cloudflare.d.ts +0 -1
- package/dist/providers/cloudflare.js +261 -299
- package/dist/providers/linear.d.ts +26 -5
- package/dist/providers/linear.js +32 -61
- package/dist/providers/mixpanel.d.ts +35 -4
- package/dist/providers/mixpanel.js +53 -79
- package/dist/providers/notion.d.ts +0 -1
- package/dist/providers/notion.js +87 -42
- package/dist/providers/stripe.d.ts +13 -1
- package/dist/providers/stripe.js +31 -60
- package/dist/registry.d.ts +34 -2
- package/dist/registry.js +85 -5
- package/dist/retired-toolkits.d.ts +0 -1
- package/dist/retired-toolkits.js +0 -1
- package/dist/routes/access-tokens.d.ts +0 -1
- package/dist/routes/access-tokens.js +0 -1
- package/dist/routes/activity.d.ts +0 -1
- package/dist/routes/activity.js +0 -1
- package/dist/routes/credentials.d.ts +0 -1
- package/dist/routes/credentials.js +0 -1
- package/dist/routes/mcp.d.ts +0 -1
- package/dist/routes/mcp.js +0 -1
- package/dist/routes/oauth.d.ts +0 -1
- package/dist/routes/oauth.js +0 -1
- package/dist/routes/shared.d.ts +2 -1
- package/dist/routes/shared.js +0 -1
- package/dist/routes/ui.d.ts +0 -1
- package/dist/routes/ui.js +0 -1
- package/dist/server.d.ts +0 -1
- package/dist/server.js +11 -1
- package/dist/skills.d.ts +0 -1
- package/dist/skills.js +0 -1
- package/dist/storage/file.d.ts +0 -1
- package/dist/storage/file.js +0 -1
- package/dist/storage/memory.d.ts +0 -1
- package/dist/storage/memory.js +0 -1
- package/dist/timeout.d.ts +0 -1
- package/dist/timeout.js +0 -1
- package/dist/tool-safety.d.ts +0 -1
- package/dist/tool-safety.js +0 -1
- package/dist/types.d.ts +45 -1
- package/dist/types.js +0 -1
- package/dist/ui.d.ts +0 -1
- package/dist/ui.js +13 -137
- package/dist/validate.d.ts +13 -15
- package/dist/validate.js +24 -11
- package/dist/version.d.ts +1 -2
- package/dist/version.js +1 -2
- package/documentation/architecture.md +186 -5
- package/documentation/auth.md +11 -0
- package/documentation/call-admission.md +142 -6
- package/documentation/cloudflare.md +92 -10
- package/documentation/code-first-exploration.md +2 -2
- package/documentation/code-mode.md +14 -14
- package/documentation/connector-guides.md +172 -5
- package/documentation/connectors.md +89 -0
- package/documentation/linear.md +20 -2
- package/documentation/mcp-ui-design.md +2 -2
- package/documentation/meta-tools.md +7 -1
- package/documentation/mixpanel.md +42 -9
- package/documentation/notion.md +23 -2
- package/documentation/operations.md +325 -5
- package/documentation/operator-ui.md +120 -5
- package/documentation/provider-audit.md +160 -0
- package/documentation/provider-conventions.md +667 -0
- package/documentation/request-admission.md +167 -5
- package/documentation/rich-output-design.md +1 -2
- package/documentation/stripe.md +15 -0
- package/documentation/upgrading.md +454 -0
- package/ethos.md +14 -9
- package/examples/worker/README.md +102 -12
- package/examples/worker/src/index.ts +46 -1
- package/examples/worker/wrangler.jsonc +14 -1
- package/package.json +10 -6
- package/templates/node/.dockerignore +10 -0
- package/templates/node/.env.example +40 -3
- package/templates/node/AGENTS.md +16 -1
- package/templates/node/Dockerfile +49 -0
- package/templates/node/README.md +117 -2
- package/templates/node/docker-compose.yml +39 -0
- package/templates/node/package.json +1 -1
- package/templates/node/src/file-activity.ts +182 -0
- package/templates/node/src/index.ts +80 -4
- package/assets/connecta-clay-hero.png +0 -0
- package/dist/access-tokens.d.ts.map +0 -1
- package/dist/access-tokens.js.map +0 -1
- package/dist/activity.d.ts.map +0 -1
- package/dist/activity.js.map +0 -1
- package/dist/apps-shell.d.ts.map +0 -1
- package/dist/apps-shell.js.map +0 -1
- package/dist/auth/bearer.d.ts.map +0 -1
- package/dist/auth/bearer.js.map +0 -1
- package/dist/auth/clerk.d.ts.map +0 -1
- package/dist/auth/clerk.js.map +0 -1
- package/dist/auth/downstream-oauth.d.ts.map +0 -1
- package/dist/auth/downstream-oauth.js.map +0 -1
- package/dist/call-admission.d.ts.map +0 -1
- package/dist/call-admission.js.map +0 -1
- package/dist/catalog-fingerprint.d.ts.map +0 -1
- package/dist/catalog-fingerprint.js.map +0 -1
- package/dist/catalog-limits.d.ts.map +0 -1
- package/dist/catalog-limits.js.map +0 -1
- package/dist/catalog-service.d.ts.map +0 -1
- package/dist/catalog-service.js.map +0 -1
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/concurrency.d.ts.map +0 -1
- package/dist/concurrency.js.map +0 -1
- package/dist/connector-scope.d.ts.map +0 -1
- package/dist/connector-scope.js.map +0 -1
- package/dist/connectors/api.d.ts.map +0 -1
- package/dist/connectors/api.js.map +0 -1
- package/dist/connectors/remote-mcp.d.ts.map +0 -1
- package/dist/connectors/remote-mcp.js.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/execute.d.ts.map +0 -1
- package/dist/execute.js.map +0 -1
- package/dist/executor-admission.d.ts.map +0 -1
- package/dist/executor-admission.js.map +0 -1
- package/dist/executor-result.d.ts.map +0 -1
- package/dist/executor-result.js.map +0 -1
- package/dist/executors/quickjs-child.d.ts.map +0 -1
- package/dist/executors/quickjs-child.js.map +0 -1
- package/dist/executors/quickjs-protocol.d.ts.map +0 -1
- package/dist/executors/quickjs-protocol.js.map +0 -1
- package/dist/executors/quickjs-runtime.d.ts.map +0 -1
- package/dist/executors/quickjs-runtime.js.map +0 -1
- package/dist/executors/quickjs.d.ts.map +0 -1
- package/dist/executors/quickjs.js.map +0 -1
- package/dist/favicon.d.ts.map +0 -1
- package/dist/favicon.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invocation.d.ts.map +0 -1
- package/dist/invocation.js.map +0 -1
- package/dist/json-schema.d.ts.map +0 -1
- package/dist/json-schema.js.map +0 -1
- package/dist/mcp-result.d.ts.map +0 -1
- package/dist/mcp-result.js.map +0 -1
- package/dist/meta-tools.d.ts.map +0 -1
- package/dist/meta-tools.js.map +0 -1
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js.map +0 -1
- package/dist/operator-ui/generated.d.ts.map +0 -1
- package/dist/operator-ui/generated.js.map +0 -1
- package/dist/operator-ui/model.d.ts.map +0 -1
- package/dist/operator-ui/model.js.map +0 -1
- package/dist/providers/cloudflare.d.ts.map +0 -1
- package/dist/providers/cloudflare.js.map +0 -1
- package/dist/providers/linear.d.ts.map +0 -1
- package/dist/providers/linear.js.map +0 -1
- package/dist/providers/mixpanel.d.ts.map +0 -1
- package/dist/providers/mixpanel.js.map +0 -1
- package/dist/providers/notion.d.ts.map +0 -1
- package/dist/providers/notion.js.map +0 -1
- package/dist/providers/stripe.d.ts.map +0 -1
- package/dist/providers/stripe.js.map +0 -1
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js.map +0 -1
- package/dist/retired-toolkits.d.ts.map +0 -1
- package/dist/retired-toolkits.js.map +0 -1
- package/dist/routes/access-tokens.d.ts.map +0 -1
- package/dist/routes/access-tokens.js.map +0 -1
- package/dist/routes/activity.d.ts.map +0 -1
- package/dist/routes/activity.js.map +0 -1
- package/dist/routes/credentials.d.ts.map +0 -1
- package/dist/routes/credentials.js.map +0 -1
- package/dist/routes/mcp.d.ts.map +0 -1
- package/dist/routes/mcp.js.map +0 -1
- package/dist/routes/oauth.d.ts.map +0 -1
- package/dist/routes/oauth.js.map +0 -1
- package/dist/routes/shared.d.ts.map +0 -1
- package/dist/routes/shared.js.map +0 -1
- package/dist/routes/ui.d.ts.map +0 -1
- package/dist/routes/ui.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/skills.d.ts.map +0 -1
- package/dist/skills.js.map +0 -1
- package/dist/storage/file.d.ts.map +0 -1
- package/dist/storage/file.js.map +0 -1
- package/dist/storage/memory.d.ts.map +0 -1
- package/dist/storage/memory.js.map +0 -1
- package/dist/timeout.d.ts.map +0 -1
- package/dist/timeout.js.map +0 -1
- package/dist/tool-safety.d.ts.map +0 -1
- package/dist/tool-safety.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/ui.d.ts.map +0 -1
- package/dist/ui.js.map +0 -1
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
- package/examples/node/README.md +0 -52
- package/examples/node/src/index.ts +0 -71
- package/src/access-tokens.ts +0 -289
- package/src/activity.ts +0 -234
- package/src/apps-shell.ts +0 -370
- package/src/auth/bearer.ts +0 -61
- package/src/auth/clerk.ts +0 -553
- package/src/auth/downstream-oauth.ts +0 -575
- package/src/call-admission.ts +0 -521
- package/src/catalog-fingerprint.ts +0 -52
- package/src/catalog-limits.ts +0 -11
- package/src/catalog-service.ts +0 -1153
- package/src/catalog.ts +0 -790
- package/src/concurrency.ts +0 -39
- package/src/connector-scope.ts +0 -66
- package/src/connectors/api.ts +0 -159
- package/src/connectors/remote-mcp.ts +0 -1090
- package/src/credentials.ts +0 -428
- package/src/errors.ts +0 -364
- package/src/execute.ts +0 -1406
- package/src/executor-admission.ts +0 -328
- package/src/executor-result.ts +0 -107
- package/src/executors/quickjs-child.ts +0 -172
- package/src/executors/quickjs-protocol.ts +0 -99
- package/src/executors/quickjs-runtime.ts +0 -470
- package/src/executors/quickjs.ts +0 -776
- package/src/favicon.ts +0 -53
- package/src/index.ts +0 -666
- package/src/invocation.ts +0 -655
- package/src/json-schema.ts +0 -11
- package/src/mcp-result.ts +0 -43
- package/src/meta-tools.ts +0 -1607
- package/src/node.ts +0 -206
- package/src/operator-ui/browser.css +0 -423
- package/src/operator-ui/browser.ts +0 -1281
- package/src/operator-ui/generated.ts +0 -4
- package/src/operator-ui/model.ts +0 -111
- package/src/providers/cloudflare.ts +0 -3999
- package/src/providers/linear.ts +0 -302
- package/src/providers/mixpanel.ts +0 -229
- package/src/providers/notion.ts +0 -1879
- package/src/providers/stripe.ts +0 -307
- package/src/registry.ts +0 -1085
- package/src/retired-toolkits.ts +0 -14
- package/src/routes/access-tokens.ts +0 -115
- package/src/routes/activity.ts +0 -215
- package/src/routes/credentials.ts +0 -254
- package/src/routes/mcp.ts +0 -429
- package/src/routes/oauth.ts +0 -322
- package/src/routes/shared.ts +0 -247
- package/src/routes/ui.ts +0 -152
- package/src/server.ts +0 -195
- package/src/skills.ts +0 -271
- package/src/storage/file.ts +0 -123
- package/src/storage/memory.ts +0 -44
- package/src/timeout.ts +0 -84
- package/src/tool-safety.ts +0 -15
- package/src/types.ts +0 -523
- package/src/ui.ts +0 -744
- package/src/validate.ts +0 -387
- package/src/version.ts +0 -7
package/dist/providers/stripe.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { remoteMcp, } from "../connectors/remote-mcp.js";
|
|
2
|
+
import { vettedCatalog, withVettedCatalog } from "../catalog-drift.js";
|
|
2
3
|
/** Stripe publishes one hosted MCP endpoint; the credential selects the mode. */
|
|
3
4
|
export const STRIPE_MCP_ENDPOINT = "https://mcp.stripe.com/";
|
|
4
5
|
/**
|
|
@@ -66,60 +67,21 @@ const WRITE_TOOLS = new Map([
|
|
|
66
67
|
["send_stripe_mcp_feedback", "additive"],
|
|
67
68
|
]);
|
|
68
69
|
/**
|
|
69
|
-
*
|
|
70
|
+
* The manifest this release reviewed: both lists in one place, which is what
|
|
71
|
+
* makes the classification the connector applies and the drift check that runs
|
|
72
|
+
* beside it the same fact (P13). No schema digests yet — no release has read
|
|
73
|
+
* Stripe's live schemas and written them down, and an invented digest would
|
|
74
|
+
* report a change that never happened. `npm run drift:check -- --record` reads
|
|
75
|
+
* them from a live account and prints the block to paste in
|
|
76
|
+
* ([#351](https://github.com/zackbart/connecta/issues/351)).
|
|
70
77
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* `readOnlyHint: false` on an allowlisted read name is the downstream telling
|
|
74
|
-
* us this release's allowlist is stale; `readOnlyHint: true` on a name no
|
|
75
|
-
* release has classified says the same thing from the other side. The single
|
|
76
|
-
* place a vetted verdict still overrides the downstream is a name this release
|
|
77
|
-
* reviewed and filed destructive: there connecta knows what the tool does, and
|
|
78
|
-
* a claim to the contrary is a downstream bug rather than news
|
|
79
|
-
* ([#310](https://github.com/zackbart/connecta/issues/310),
|
|
80
|
-
* [#315](https://github.com/zackbart/connecta/issues/315)).
|
|
78
|
+
* Exported because the maintainer-run check compares against this manifest and
|
|
79
|
+
* *names* what moved, which the runtime check deliberately cannot.
|
|
81
80
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
downstream.readOnlyHint === false) {
|
|
87
|
-
return definition;
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
...definition,
|
|
91
|
-
annotations: {
|
|
92
|
-
...downstream,
|
|
93
|
-
readOnlyHint: true,
|
|
94
|
-
destructiveHint: downstream.destructiveHint ?? false,
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
if (WRITE_TOOLS.get(definition.name) === "destructive") {
|
|
99
|
-
return {
|
|
100
|
-
...definition,
|
|
101
|
-
annotations: {
|
|
102
|
-
...downstream,
|
|
103
|
-
readOnlyHint: false,
|
|
104
|
-
destructiveHint: true,
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
// Maintained additive writes and tools this release has never seen land here
|
|
109
|
-
// alike. Fill-in only: a silent tool is not read-only, so drift still fails
|
|
110
|
-
// closed onto `call_destructive_tool`, and neither population gets a
|
|
111
|
-
// `destructiveHint` it has not earned. A tool that arrives explicitly
|
|
112
|
-
// read-only keeps that annotation — on a name no release has reviewed, the
|
|
113
|
-
// downstream's own word is the only evidence there is, and rewriting it
|
|
114
|
-
// would be an overrule rather than a fill-in.
|
|
115
|
-
return {
|
|
116
|
-
...definition,
|
|
117
|
-
annotations: {
|
|
118
|
-
...downstream,
|
|
119
|
-
readOnlyHint: downstream.readOnlyHint ?? false,
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
}
|
|
81
|
+
export const STRIPE_VETTED_CATALOG = vettedCatalog({
|
|
82
|
+
reads: READ_ONLY_TOOLS,
|
|
83
|
+
writes: WRITE_TOOLS,
|
|
84
|
+
});
|
|
123
85
|
/** Stripe key prefixes carry their own mode; only a clear reading counts. */
|
|
124
86
|
const LIVE_KEY = /\b(?:sk|rk|pk)_live_/;
|
|
125
87
|
const TEST_KEY = /\b(?:sk|rk|pk)_test_/;
|
|
@@ -189,11 +151,14 @@ ${copy.warning}
|
|
|
189
151
|
- Prefer a dedicated tool when one covers the task: \`get_stripe_account_info\` for which account this is, \`get_balance_summary\` for balances, \`create_refund\` for refunds, \`stripe_report\` for reports. One call instead of three, and a refund named \`create_refund\` reads far more clearly in the approval a human sees than the same refund buried in \`stripe_api_write\` arguments.
|
|
190
152
|
- \`stripe_api_write\` carries the blast radius of the entire write API — every POST, PATCH, PUT, and DELETE, from a customer edit to a subscription cancellation. State the method and path explicitly; expect approval on every call.
|
|
191
153
|
- Lists are cursor-paginated: \`limit\` defaults to 10 and caps at 100, \`starting_after\` and \`ending_before\` take an object id and are mutually exclusive, and \`has_more\` says whether to continue. Page inside \`execute_code\` and reduce before returning.
|
|
154
|
+
- Resolve ids before acting; never guess one. Stripe ids are typed prefixes — \`cus_\` customer, \`sub_\` subscription, \`ch_\` charge, \`pi_\` payment intent, \`in_\` invoice, \`acct_\` account — and a plausible-looking id belongs to a different object or to nobody. Find the object with \`stripe_api_search\` (or a list endpoint through \`stripe_api_read\`) and carry the \`id\` it returned into the write.
|
|
155
|
+
- This account's tool list is not a fixed set. Stripe gates parts of its MCP catalog by account, integration, and beta enrollment, so search this connector for what it actually exposes rather than assuming a documented tool is here.
|
|
192
156
|
- Amounts are integers in the currency's minor unit: \`1099\` is 10.99 USD, and zero-decimal currencies like JPY take \`10\` for 10 JPY. Never send a decimal.
|
|
193
157
|
- Send an \`Idempotency-Key\` on every write you might retry, if the tool accepts it, and reuse the same key for the retry. A retry with a fresh key is a second charge, not a second attempt.
|
|
194
158
|
- Stripe answers a rate limit with \`429\` and a \`Stripe-Rate-Limited-Reason\` header; back off on that rather than retrying immediately. This account's documented ceiling is ${rate} requests per second, and any single endpoint is capped at 25 per second regardless of mode, so paging one list is the real constraint.
|
|
195
159
|
- Use \`search_stripe_documentation\` when the shape of an object or a flow is unclear; it is a read and costs nothing but a call.
|
|
196
160
|
- Treat every create, update, delete, refund, and report run as a write. Connecta routes the maintained write catalog through \`call_destructive_tool\`; newly added tools also fail closed until classified.
|
|
161
|
+
- An \`auth_required\` failure means this connector's Stripe authorization is missing or expired: run \`authorize_connector\` for this connector id, then retry the same call unchanged. A rejected argument or a plan restriction comes back in Stripe's own words instead — read it rather than re-authorizing.
|
|
197
162
|
${accountInstructions
|
|
198
163
|
? `\n## Account instructions\n\n${accountInstructions}\n`
|
|
199
164
|
: ""}`;
|
|
@@ -218,16 +183,22 @@ export function stripe(id, options) {
|
|
|
218
183
|
auth,
|
|
219
184
|
requireHttps: true,
|
|
220
185
|
callAdmission: STRIPE_ADMISSION[mode],
|
|
221
|
-
usageGuide:
|
|
186
|
+
usageGuide: {
|
|
187
|
+
content: usageGuide(mode, purpose, options.instructions),
|
|
188
|
+
// Explicit rather than derived: production versus sandbox is the fact an
|
|
189
|
+
// agent must not get wrong, and the derived summary would be the
|
|
190
|
+
// "Mode: … Account purpose: …" line with the operator's prose eating the
|
|
191
|
+
// budget ([#342](https://github.com/zackbart/connecta/issues/342)).
|
|
192
|
+
summary: mode === "production"
|
|
193
|
+
? "PRODUCTION: writes move real money. Generic api tools, id prefixes, minor units, idempotency."
|
|
194
|
+
: "Sandbox: test data only, never live figures. Generic api tools, id prefixes, minor units.",
|
|
195
|
+
// Not `required`. The four generic tools are the routing decision, and
|
|
196
|
+
// the mode warning already rides the title and description; a guide
|
|
197
|
+
// forced into every call would pay for the same paragraph repeatedly.
|
|
198
|
+
},
|
|
222
199
|
...(options.maxResultBytes !== undefined
|
|
223
200
|
? { maxResultBytes: options.maxResultBytes }
|
|
224
201
|
: {}),
|
|
225
202
|
});
|
|
226
|
-
return
|
|
227
|
-
...connector,
|
|
228
|
-
async listTools(ctx) {
|
|
229
|
-
return (await connector.listTools(ctx)).map(vettedSafety);
|
|
230
|
-
},
|
|
231
|
-
};
|
|
203
|
+
return withVettedCatalog(connector, STRIPE_VETTED_CATALOG);
|
|
232
204
|
}
|
|
233
|
-
//# sourceMappingURL=stripe.js.map
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connector, ConnectorContext, ConnectorStatus, KVStorage, Logger, ToolDef } from "./types.js";
|
|
1
|
+
import type { CatalogDriftReport, Connector, ConnectorContext, ConnectorStatus, KVStorage, Logger, ToolDef } from "./types.js";
|
|
2
|
+
import { type CatalogDriftActivityContext } from "./activity.js";
|
|
2
3
|
import { type CredentialVault } from "./credentials.js";
|
|
3
4
|
import { type CallAdmissionPermit, type ConnectorCallAdmissionSnapshot } from "./call-admission.js";
|
|
4
5
|
/**
|
|
@@ -61,6 +62,12 @@ export interface RegistryOptions {
|
|
|
61
62
|
* to the default 50_000.
|
|
62
63
|
*/
|
|
63
64
|
maxResultBytes?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Where payload-free catalog-drift observations go. Present only when the
|
|
67
|
+
* deployment configured an activity store; drift is reported through
|
|
68
|
+
* connector status either way.
|
|
69
|
+
*/
|
|
70
|
+
catalogDriftActivity?: Omit<CatalogDriftActivityContext, "logger">;
|
|
64
71
|
}
|
|
65
72
|
export type ConnectorOperationOptions = Pick<ConnectorContext, "signal" | "timeoutMs">;
|
|
66
73
|
/**
|
|
@@ -121,6 +128,8 @@ export declare class Registry implements RegistryView {
|
|
|
121
128
|
private readonly requestCatalogLoads;
|
|
122
129
|
/** Deployment-wide observations — every call, whatever view made it. */
|
|
123
130
|
private readonly health;
|
|
131
|
+
/** Last drift counts reported to activity, per connector, in this runtime. */
|
|
132
|
+
private readonly reportedDrift;
|
|
124
133
|
private readonly ttlMs;
|
|
125
134
|
private readonly staleMs;
|
|
126
135
|
private readonly persistToolCatalog;
|
|
@@ -152,6 +161,30 @@ export declare class Registry implements RegistryView {
|
|
|
152
161
|
}): Promise<CallAdmissionPermit>;
|
|
153
162
|
/** Payload-free aggregate state for the open health endpoint. */
|
|
154
163
|
callAdmissionSnapshot(): Record<string, ConnectorCallAdmissionSnapshot>;
|
|
164
|
+
/**
|
|
165
|
+
* Payload-free drift counts for the open health endpoint, so `connecta
|
|
166
|
+
* doctor` can report a stale allowlist without asking any downstream
|
|
167
|
+
* anything. Only connectors that ship a vetted manifest *and* have already
|
|
168
|
+
* served a refresh *in this runtime* appear — a process or isolate that has
|
|
169
|
+
* answered no catalog request yet honestly reports nothing, and drift is not
|
|
170
|
+
* persisted the way the catalog itself is.
|
|
171
|
+
*
|
|
172
|
+
* Every report is rebuilt by {@link boundedCatalogDrift} on the way out:
|
|
173
|
+
* `Connector.catalogDrift()` is the open plugin seam, and this snapshot is
|
|
174
|
+
* serialized into an unauthenticated response.
|
|
175
|
+
*/
|
|
176
|
+
catalogDriftSnapshot(): Record<string, CatalogDriftReport>;
|
|
177
|
+
/**
|
|
178
|
+
* Turn the observation a refresh just took into at most one activity event.
|
|
179
|
+
*
|
|
180
|
+
* Emitted on change rather than on every refresh: an identical report every
|
|
181
|
+
* TTL is a heartbeat, not news, and the current counts are already on
|
|
182
|
+
* connector status. A first observation that is clean is not an event
|
|
183
|
+
* either — nothing moved — but a later return to clean is, because "the
|
|
184
|
+
* drift is gone" is exactly what an operator watching the timeline is
|
|
185
|
+
* waiting for.
|
|
186
|
+
*/
|
|
187
|
+
private observeCatalogDrift;
|
|
155
188
|
/** Reject queued/future downstream admission; active permits release safely. */
|
|
156
189
|
closeCallAdmission(): void;
|
|
157
190
|
/**
|
|
@@ -216,4 +249,3 @@ export declare class Registry implements RegistryView {
|
|
|
216
249
|
/** Drop both in-memory and persisted tool catalogs. */
|
|
217
250
|
invalidateStored(id: string): Promise<void>;
|
|
218
251
|
}
|
|
219
|
-
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { recordCatalogDriftActivity, } from "./activity.js";
|
|
1
2
|
import { storedCredentialShape, } from "./credentials.js";
|
|
2
3
|
import { ConnectorCallError } from "./errors.js";
|
|
3
4
|
import { ConnectorCallAdmissionController, } from "./call-admission.js";
|
|
5
|
+
import { boundedCatalogDrift } from "./catalog-drift.js";
|
|
4
6
|
import { fingerprintSerializedCatalog, snapshotCatalog, } from "./catalog-fingerprint.js";
|
|
5
7
|
import { MAX_CATALOG_CHUNK_BYTES, MAX_CATALOG_TOOLS, MAX_SERIALIZED_CATALOG_BYTES, } from "./catalog-limits.js";
|
|
6
8
|
import { mapSettledWithConcurrency } from "./concurrency.js";
|
|
@@ -122,6 +124,8 @@ export class Registry {
|
|
|
122
124
|
requestCatalogLoads = new WeakMap();
|
|
123
125
|
/** Deployment-wide observations — every call, whatever view made it. */
|
|
124
126
|
health = new HealthLog();
|
|
127
|
+
/** Last drift counts reported to activity, per connector, in this runtime. */
|
|
128
|
+
reportedDrift = new Map();
|
|
125
129
|
ttlMs;
|
|
126
130
|
staleMs;
|
|
127
131
|
persistToolCatalog;
|
|
@@ -247,6 +251,68 @@ export class Registry {
|
|
|
247
251
|
admission.snapshot(),
|
|
248
252
|
]));
|
|
249
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Payload-free drift counts for the open health endpoint, so `connecta
|
|
256
|
+
* doctor` can report a stale allowlist without asking any downstream
|
|
257
|
+
* anything. Only connectors that ship a vetted manifest *and* have already
|
|
258
|
+
* served a refresh *in this runtime* appear — a process or isolate that has
|
|
259
|
+
* answered no catalog request yet honestly reports nothing, and drift is not
|
|
260
|
+
* persisted the way the catalog itself is.
|
|
261
|
+
*
|
|
262
|
+
* Every report is rebuilt by {@link boundedCatalogDrift} on the way out:
|
|
263
|
+
* `Connector.catalogDrift()` is the open plugin seam, and this snapshot is
|
|
264
|
+
* serialized into an unauthenticated response.
|
|
265
|
+
*/
|
|
266
|
+
catalogDriftSnapshot() {
|
|
267
|
+
const snapshot = {};
|
|
268
|
+
for (const connector of this.connectors.values()) {
|
|
269
|
+
const report = boundedCatalogDrift(connector.catalogDrift?.());
|
|
270
|
+
if (report)
|
|
271
|
+
snapshot[connector.id] = report;
|
|
272
|
+
}
|
|
273
|
+
return snapshot;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Turn the observation a refresh just took into at most one activity event.
|
|
277
|
+
*
|
|
278
|
+
* Emitted on change rather than on every refresh: an identical report every
|
|
279
|
+
* TTL is a heartbeat, not news, and the current counts are already on
|
|
280
|
+
* connector status. A first observation that is clean is not an event
|
|
281
|
+
* either — nothing moved — but a later return to clean is, because "the
|
|
282
|
+
* drift is gone" is exactly what an operator watching the timeline is
|
|
283
|
+
* waiting for.
|
|
284
|
+
*/
|
|
285
|
+
observeCatalogDrift(connector) {
|
|
286
|
+
const report = boundedCatalogDrift(connector.catalogDrift?.());
|
|
287
|
+
if (!report)
|
|
288
|
+
return;
|
|
289
|
+
const previous = this.reportedDrift.get(connector.id);
|
|
290
|
+
// Bounded counts, so a seam returning NaN cannot make every refresh look
|
|
291
|
+
// like a change and emit an event per refresh forever.
|
|
292
|
+
const counts = {
|
|
293
|
+
unclassifiedTools: report.unclassifiedTools,
|
|
294
|
+
unservedTools: report.unservedTools,
|
|
295
|
+
annotationConflicts: report.annotationConflicts,
|
|
296
|
+
schemaChanges: report.schemaChanges,
|
|
297
|
+
};
|
|
298
|
+
const unchanged = previous !== undefined &&
|
|
299
|
+
previous.unclassifiedTools === counts.unclassifiedTools &&
|
|
300
|
+
previous.unservedTools === counts.unservedTools &&
|
|
301
|
+
previous.annotationConflicts === counts.annotationConflicts &&
|
|
302
|
+
previous.schemaChanges === counts.schemaChanges;
|
|
303
|
+
if (unchanged)
|
|
304
|
+
return;
|
|
305
|
+
const clean = counts.unclassifiedTools === 0 &&
|
|
306
|
+
counts.unservedTools === 0 &&
|
|
307
|
+
counts.annotationConflicts === 0 &&
|
|
308
|
+
counts.schemaChanges === 0;
|
|
309
|
+
this.reportedDrift.set(connector.id, counts);
|
|
310
|
+
if (previous === undefined && clean)
|
|
311
|
+
return;
|
|
312
|
+
recordCatalogDriftActivity(this.opts.catalogDriftActivity
|
|
313
|
+
? { ...this.opts.catalogDriftActivity, logger: this.opts.logger }
|
|
314
|
+
: undefined, { connectorId: connector.id, ...counts });
|
|
315
|
+
}
|
|
250
316
|
/** Reject queued/future downstream admission; active permits release safely. */
|
|
251
317
|
closeCallAdmission() {
|
|
252
318
|
for (const admission of this.callAdmission.values())
|
|
@@ -535,6 +601,10 @@ export class Registry {
|
|
|
535
601
|
return connector.staticTools;
|
|
536
602
|
const generation = this.catalogGeneration(id);
|
|
537
603
|
const tools = await connector.listTools(this.contextFor(id, baseUrl, requestScope, callOptions));
|
|
604
|
+
// The listing a maintained proxy just served is also the only catalog
|
|
605
|
+
// comparison connecta ever makes. It rides this refresh whether or not the
|
|
606
|
+
// result reaches a cache, because what drifted drifted.
|
|
607
|
+
this.observeCatalogDrift(connector);
|
|
538
608
|
// The caller that began this refresh may still use its result, but a
|
|
539
609
|
// credential/OAuth change that landed while listTools was in flight means
|
|
540
610
|
// the listing must not enter either shared cache layer.
|
|
@@ -719,20 +789,31 @@ export class Registry {
|
|
|
719
789
|
if (!connector)
|
|
720
790
|
return { state: "error", message: "Unknown connector" };
|
|
721
791
|
const ctx = this.contextFor(id, baseUrl, requestScope, callOptions);
|
|
792
|
+
// Whatever the state turns out to be, it carries the drift the last
|
|
793
|
+
// refresh saw. Reading it is a lookup, not a probe: a connector that has
|
|
794
|
+
// listed nothing yet reports nothing, and status never lists on its own to
|
|
795
|
+
// make the field appear.
|
|
796
|
+
// The report is rebuilt rather than spread through: what the seam returned
|
|
797
|
+
// is third-party output, and status is read by the operator UI and copied
|
|
798
|
+
// into responses.
|
|
799
|
+
const withDrift = (status) => {
|
|
800
|
+
const report = boundedCatalogDrift(connector.catalogDrift?.());
|
|
801
|
+
return report ? { ...status, catalogDrift: report } : status;
|
|
802
|
+
};
|
|
722
803
|
if (connector.status) {
|
|
723
804
|
try {
|
|
724
|
-
return await connector.status(ctx);
|
|
805
|
+
return withDrift(await connector.status(ctx));
|
|
725
806
|
}
|
|
726
807
|
catch (err) {
|
|
727
|
-
return { state: "error", message: msg(err) };
|
|
808
|
+
return withDrift({ state: "error", message: msg(err) });
|
|
728
809
|
}
|
|
729
810
|
}
|
|
730
811
|
try {
|
|
731
812
|
await this.getTools(id, baseUrl, requestScope, callOptions);
|
|
732
|
-
return { state: "ok" };
|
|
813
|
+
return withDrift({ state: "ok" });
|
|
733
814
|
}
|
|
734
815
|
catch (err) {
|
|
735
|
-
return { state: "error", message: msg(err) };
|
|
816
|
+
return withDrift({ state: "error", message: msg(err) });
|
|
736
817
|
}
|
|
737
818
|
}
|
|
738
819
|
markCatalogInvalid(id) {
|
|
@@ -763,4 +844,3 @@ export class Registry {
|
|
|
763
844
|
await this.deleteStoredCatalog(id);
|
|
764
845
|
}
|
|
765
846
|
}
|
|
766
|
-
//# sourceMappingURL=registry.js.map
|
package/dist/retired-toolkits.js
CHANGED
|
@@ -6,4 +6,3 @@ export function assertNoRetiredToolkitOptions(source, options) {
|
|
|
6
6
|
throw new Error(`${source} options \`toolkits\` and \`unscoped\` were removed in issue ` +
|
|
7
7
|
"#178. Deploy one connecta instance per audience instead; see ethos.md.");
|
|
8
8
|
}
|
|
9
|
-
//# sourceMappingURL=retired-toolkits.js.map
|
package/dist/routes/activity.js
CHANGED
package/dist/routes/mcp.d.ts
CHANGED
package/dist/routes/mcp.js
CHANGED
package/dist/routes/oauth.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { type RouteContext } from "./shared.js";
|
|
2
2
|
export declare function routeOAuthManagement(context: RouteContext): Promise<Response | null>;
|
|
3
3
|
export declare function routeOAuthCallback(context: RouteContext): Promise<Response | null>;
|
|
4
|
-
//# sourceMappingURL=oauth.d.ts.map
|
package/dist/routes/oauth.js
CHANGED
package/dist/routes/shared.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export interface ServerOptions {
|
|
|
28
28
|
maxEmittedBlocks?: number;
|
|
29
29
|
/** Required sandbox backing the execute_code meta-tool. */
|
|
30
30
|
executor: Executor;
|
|
31
|
+
/** Sanitized identity of the configured sandbox, when it has one. */
|
|
32
|
+
executorName?: string;
|
|
31
33
|
/** Global FIFO boundary for all non-preflight `/mcp` requests. */
|
|
32
34
|
requestAdmission: AdmissionController;
|
|
33
35
|
/** Encrypted connector-credential storage backing the Credentials page. */
|
|
@@ -80,4 +82,3 @@ export declare function authorizeUiAdmin(request: Request, baseUrl: string, auth
|
|
|
80
82
|
}>;
|
|
81
83
|
export declare function isSameOrigin(request: Request, baseUrl: string): boolean;
|
|
82
84
|
export declare function withSecurityHeaders(response: Response, requestUrl: URL, path: string): Response;
|
|
83
|
-
//# sourceMappingURL=shared.d.ts.map
|
package/dist/routes/shared.js
CHANGED
package/dist/routes/ui.d.ts
CHANGED
package/dist/routes/ui.js
CHANGED
|
@@ -121,4 +121,3 @@ export async function routeUi(context) {
|
|
|
121
121
|
eligibleClerkOperator ? opts.credentialVault : undefined, Boolean(opts.activity?.list), credentialManagement, defer, eligibleClerkOperator, opts.discoveryConcurrency, accessTokenManagement);
|
|
122
122
|
return privateJson(data);
|
|
123
123
|
}
|
|
124
|
-
//# sourceMappingURL=ui.js.map
|
package/dist/server.d.ts
CHANGED
|
@@ -8,4 +8,3 @@ export type { ServerOptions } from "./routes/shared.js";
|
|
|
8
8
|
* wrapper is applied to every response.
|
|
9
9
|
*/
|
|
10
10
|
export declare function createFetchHandler(opts: ServerOptions): (request: Request, runtimeContext?: RuntimeExecutionContext) => Promise<Response>;
|
|
11
|
-
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.js
CHANGED
|
@@ -103,6 +103,17 @@ export function createFetchHandler(opts) {
|
|
|
103
103
|
status: "ok",
|
|
104
104
|
connectors: registry.listConnectors().length,
|
|
105
105
|
server: opts.serverInfo,
|
|
106
|
+
// Which sandbox, not how it is tuned: `connecta doctor` reports the
|
|
107
|
+
// executor it just exercised rather than assuming one, and a
|
|
108
|
+
// deployment whose executor identifies as nothing omits the key
|
|
109
|
+
// instead of inviting a guess (#368).
|
|
110
|
+
...(opts.executorName !== undefined
|
|
111
|
+
? { executor: { name: opts.executorName } }
|
|
112
|
+
: {}),
|
|
113
|
+
// Counts only, from refreshes that already happened — the endpoint
|
|
114
|
+
// asks no downstream anything, and `connecta doctor` reads it to
|
|
115
|
+
// report a stale allowlist without a probe of its own (#343).
|
|
116
|
+
catalogDrift: registry.catalogDriftSnapshot(),
|
|
106
117
|
admission: {
|
|
107
118
|
policy: "global-fifo",
|
|
108
119
|
requests: opts.requestAdmission.snapshot(),
|
|
@@ -158,4 +169,3 @@ export function createFetchHandler(opts) {
|
|
|
158
169
|
return withSecurityHeaders(await route(), url, path);
|
|
159
170
|
};
|
|
160
171
|
}
|
|
161
|
-
//# sourceMappingURL=server.js.map
|
package/dist/skills.d.ts
CHANGED
package/dist/skills.js
CHANGED
package/dist/storage/file.d.ts
CHANGED
package/dist/storage/file.js
CHANGED
package/dist/storage/memory.d.ts
CHANGED
package/dist/storage/memory.js
CHANGED
package/dist/timeout.d.ts
CHANGED
|
@@ -18,4 +18,3 @@ export declare function withTimeout<T>(promise: Promise<T>, ms: number, label: s
|
|
|
18
18
|
* any in-flight work that honors the signal.
|
|
19
19
|
*/
|
|
20
20
|
export declare function withAbortableTimeout<T>(operation: (signal: AbortSignal) => Promise<T>, ms: number, label: string): Promise<T>;
|
|
21
|
-
//# sourceMappingURL=timeout.d.ts.map
|
package/dist/timeout.js
CHANGED
package/dist/tool-safety.d.ts
CHANGED
package/dist/tool-safety.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -159,11 +159,40 @@ export interface ConnectorContext {
|
|
|
159
159
|
timeoutMs?: number;
|
|
160
160
|
}
|
|
161
161
|
type ConnectorStatusState = "ok" | "auth_required" | "error";
|
|
162
|
+
/**
|
|
163
|
+
* How far a downstream catalog has moved away from the manifest a release
|
|
164
|
+
* reviewed. Four numbers and nothing else: names, schemas, and prose stay out
|
|
165
|
+
* of every surface this rides on, so a drift report can never become a payload
|
|
166
|
+
* ([#343](https://github.com/zackbart/connecta/issues/343)).
|
|
167
|
+
*/
|
|
168
|
+
export interface CatalogDriftCounts {
|
|
169
|
+
/** Live tools no release classified. Each one fails closed at call time. */
|
|
170
|
+
unclassifiedTools: number;
|
|
171
|
+
/** Classified names this catalog no longer serves — plan gating included. */
|
|
172
|
+
unservedTools: number;
|
|
173
|
+
/** Explicit downstream annotations that contradict a vetted verdict. */
|
|
174
|
+
annotationConflicts: number;
|
|
175
|
+
/** Tools whose reviewed schema digest no longer matches what arrived. */
|
|
176
|
+
schemaChanges: number;
|
|
177
|
+
}
|
|
178
|
+
/** One drift observation, taken while serving a catalog refresh. */
|
|
179
|
+
export interface CatalogDriftReport extends CatalogDriftCounts {
|
|
180
|
+
/** When the observation was taken; never when a probe was scheduled. */
|
|
181
|
+
observedAt: string;
|
|
182
|
+
}
|
|
162
183
|
export interface ConnectorStatus {
|
|
163
184
|
state: ConnectorStatusState;
|
|
164
185
|
/** When state === "auth_required", the URL the operator should open. */
|
|
165
186
|
authorizationUrl?: string;
|
|
166
187
|
message?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Drift observed the last time this connector served a catalog refresh *in
|
|
190
|
+
* this runtime*. Absent until one has happened — status reports what a
|
|
191
|
+
* refresh saw, and never asks a downstream a question of its own. The
|
|
192
|
+
* observation is not persisted the way the catalog is, so absence means this
|
|
193
|
+
* isolate or process has seen nothing, not that nothing drifted.
|
|
194
|
+
*/
|
|
195
|
+
catalogDrift?: CatalogDriftReport;
|
|
167
196
|
}
|
|
168
197
|
/** The whole plugin contract — the one open seam. */
|
|
169
198
|
export interface Connector {
|
|
@@ -212,6 +241,15 @@ export interface Connector {
|
|
|
212
241
|
* fetched lazily over the network and are not known at construction time.
|
|
213
242
|
*/
|
|
214
243
|
staticTools?: ToolDef[];
|
|
244
|
+
/**
|
|
245
|
+
* Optional: the drift this connector saw the last time it listed tools,
|
|
246
|
+
* or undefined when it has not listed any yet. Implemented by maintained
|
|
247
|
+
* hosted-MCP proxies, which compare the live catalog with the manifest a
|
|
248
|
+
* release reviewed *while* serving a refresh the deployment already asked
|
|
249
|
+
* for. It is a getter over an observation, never a probe: calling it makes
|
|
250
|
+
* no request, touches no credential, and returns counts only.
|
|
251
|
+
*/
|
|
252
|
+
catalogDrift?(): CatalogDriftReport | undefined;
|
|
215
253
|
listTools(ctx: ConnectorContext): Promise<ToolDef[]>;
|
|
216
254
|
callTool(name: string, args: unknown, ctx: ConnectorContext): Promise<unknown>;
|
|
217
255
|
/**
|
|
@@ -313,6 +351,13 @@ export interface ExecutorProvider {
|
|
|
313
351
|
* NEVER back this with an unsandboxed eval — the code is untrusted.
|
|
314
352
|
*/
|
|
315
353
|
export interface Executor {
|
|
354
|
+
/**
|
|
355
|
+
* What `/health` and `connecta doctor` call this sandbox. Optional, and
|
|
356
|
+
* sanitized and bounded before it is reported. A class-shaped executor gets
|
|
357
|
+
* its constructor name for free, but that is runtime metadata a bundler may
|
|
358
|
+
* rewrite; set this to say the same thing minification-proof.
|
|
359
|
+
*/
|
|
360
|
+
readonly name?: string;
|
|
316
361
|
execute(code: string, providers: ExecutorProvider[]): Promise<ExecuteResult>;
|
|
317
362
|
/** Release runtime resources. Node's built-in pool implements this. */
|
|
318
363
|
close?(): void | Promise<void>;
|
|
@@ -465,4 +510,3 @@ export interface InboundAuth {
|
|
|
465
510
|
authorize(request: Request, baseUrl: string): AuthResult | Promise<AuthResult>;
|
|
466
511
|
}
|
|
467
512
|
export {};
|
|
468
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.js
CHANGED
package/dist/ui.d.ts
CHANGED
|
@@ -115,4 +115,3 @@ export declare function buildUiData(registry: Registry, baseUrl: string, serverI
|
|
|
115
115
|
* and activity data arrives only through the authenticated `/ui/*` APIs.
|
|
116
116
|
*/
|
|
117
117
|
export declare function renderUiHtml(uiAuth?: UiAuthConfig, mcpUrl?: string, branding?: ConnectaBranding, nonce?: string, page?: OperatorPage): string;
|
|
118
|
-
//# sourceMappingURL=ui.d.ts.map
|