@zackbart/connecta 0.24.3 → 0.25.0
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 +58 -30
- package/CHANGELOG.md +317 -1
- package/README.md +5 -6
- package/dist/advertised-schema.js +53 -0
- package/dist/auth/downstream-oauth.js +490 -106
- package/dist/branding.d.ts +31 -2
- package/dist/branding.js +116 -8
- package/dist/call-admission.js +139 -113
- package/dist/catalog-service.js +141 -105
- package/dist/catalog.js +258 -33
- package/dist/concurrency.js +24 -23
- package/dist/connector-scope.js +6 -37
- package/dist/connectors/api.d.ts +3 -3
- package/dist/connectors/api.js +10 -2
- package/dist/connectors/guarded-fetch.js +34 -4
- package/dist/connectors/remote-mcp.d.ts +6 -5
- package/dist/connectors/remote-mcp.js +325 -245
- package/dist/credential-contract.d.ts +9 -0
- package/dist/credential-rules.js +2 -2
- package/dist/credentials.d.ts +6 -1
- package/dist/credentials.js +45 -3
- package/dist/errors.d.ts +11 -3
- package/dist/errors.js +2 -1
- package/dist/execute.js +363 -257
- package/dist/executor-admission.js +67 -50
- package/dist/executors/quickjs-runtime.js +4 -2
- package/dist/executors/quickjs.js +251 -210
- package/dist/fix-prompt.js +37 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.js +63 -21
- package/dist/invocation.js +324 -285
- package/dist/meta-tools.js +304 -114
- package/dist/oauth-callback-outcome.js +94 -0
- package/dist/oauth-sealing.js +29 -0
- package/dist/operator-ui/fix-prompts.js +87 -0
- package/dist/operator-ui/generated.js +2 -2
- package/dist/operator-ui/model.d.ts +46 -1
- package/dist/operator-ui/setup-commands.js +53 -0
- package/dist/operator-ui/view.js +109 -2
- package/dist/program-source.js +205 -0
- package/dist/providers/cloudflare.d.ts +14 -2
- package/dist/providers/cloudflare.js +107 -16
- package/dist/providers/linear.d.ts +26 -4
- package/dist/providers/linear.js +19 -4
- package/dist/providers/mixpanel.d.ts +16 -3
- package/dist/providers/mixpanel.js +13 -2
- package/dist/providers/notion.d.ts +8 -1
- package/dist/providers/notion.js +85 -12
- package/dist/providers/revenuecat.d.ts +30 -4
- package/dist/providers/revenuecat.js +70 -5
- package/dist/providers/stripe.d.ts +10 -3
- package/dist/providers/stripe.js +30 -4
- package/dist/providers/vercel.js +12 -2
- package/dist/registry.d.ts +13 -5
- package/dist/registry.js +317 -258
- package/dist/routes/activity.js +120 -137
- package/dist/routes/credentials.js +174 -163
- package/dist/routes/mcp.js +129 -70
- package/dist/routes/oauth-management.js +60 -71
- package/dist/routes/oauth.js +44 -16
- package/dist/routes/operator.js +82 -0
- package/dist/routes/shared.d.ts +2 -0
- package/dist/routes/ui-data.js +210 -0
- package/dist/routes/ui.js +64 -32
- package/dist/runtime/admission.js +43 -0
- package/dist/runtime/call-admission.js +67 -0
- package/dist/runtime/connector-scope.js +72 -0
- package/dist/runtime/run.js +174 -0
- package/dist/runtime/services.js +130 -0
- package/dist/runtime/storage.js +66 -0
- package/dist/server.js +111 -89
- package/dist/skills.js +1 -1
- package/dist/storage/file.js +39 -2
- package/dist/storage/memory.js +28 -16
- package/dist/timeout.js +17 -47
- package/dist/types.d.ts +64 -7
- package/dist/ui.d.ts +16 -2
- package/dist/ui.js +68 -176
- package/dist/url-safety.js +157 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/architecture.md +368 -182
- package/documentation/auth.md +277 -176
- package/documentation/code-mode.md +479 -329
- package/documentation/meta-tools.md +494 -417
- package/ethos.md +44 -47
- package/examples/worker/AGENTS.md +2 -1
- package/examples/worker/README.md +62 -14
- package/examples/worker/src/d1-storage.ts +116 -0
- package/examples/worker/src/index.ts +18 -21
- package/examples/worker/wrangler.jsonc +16 -4
- package/package.json +11 -4
- package/templates/node/.env.example +3 -3
- package/templates/node/AGENTS.md +5 -4
- package/templates/node/README.md +2 -1
- package/templates/node/package.json +1 -1
- package/templates/node/src/index.ts +23 -22
- package/dist/auth/downstream-oauth.d.ts +0 -200
- package/dist/catalog-fingerprint.d.ts +0 -19
- package/dist/catalog-limits.d.ts +0 -9
- package/dist/catalog-service.d.ts +0 -263
- package/dist/catalog.d.ts +0 -87
- package/dist/concurrency.d.ts +0 -3
- package/dist/connectors/guarded-fetch.d.ts +0 -92
- package/dist/credential-rules.d.ts +0 -85
- package/dist/execute.d.ts +0 -154
- package/dist/executor-result.d.ts +0 -10
- package/dist/executors/quickjs-child.d.ts +0 -1
- package/dist/executors/quickjs-protocol.d.ts +0 -67
- package/dist/favicon.d.ts +0 -1
- package/dist/identity.d.ts +0 -4
- package/dist/invocation.d.ts +0 -74
- package/dist/mcp-result.d.ts +0 -8
- package/dist/meta-tools.d.ts +0 -129
- package/dist/operator-ui/generated.d.ts +0 -2
- package/dist/operator-ui/view.d.ts +0 -151
- package/dist/result-shapes.d.ts +0 -13
- package/dist/retired-toolkits.d.ts +0 -2
- package/dist/routes/activity.d.ts +0 -2
- package/dist/routes/credentials.d.ts +0 -2
- package/dist/routes/mcp.d.ts +0 -10
- package/dist/routes/oauth-management.d.ts +0 -2
- package/dist/routes/oauth.d.ts +0 -2
- package/dist/routes/ui.d.ts +0 -2
- package/dist/server.d.ts +0 -9
- package/dist/skills.d.ts +0 -44
- package/dist/timeout.d.ts +0 -21
- package/dist/tool-safety.d.ts +0 -9
- package/documentation/call-admission.md +0 -158
- package/documentation/cloudflare.md +0 -471
- package/documentation/connector-guides.md +0 -176
- package/documentation/connectors.md +0 -431
- package/documentation/linear.md +0 -193
- package/documentation/mixpanel.md +0 -160
- package/documentation/notion.md +0 -308
- package/documentation/operations.md +0 -359
- package/documentation/operator-ui.md +0 -135
- package/documentation/optional-modules-upgrade.md +0 -243
- package/documentation/provider-conventions.md +0 -729
- package/documentation/request-admission.md +0 -204
- package/documentation/revenuecat.md +0 -305
- package/documentation/storage-and-credentials.md +0 -254
- package/documentation/stripe.md +0 -262
- package/documentation/upgrading.md +0 -768
- package/documentation/vercel.md +0 -241
package/dist/providers/vercel.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* No `@vercel/sdk` on purpose — not a dependency and not an optional peer.
|
|
3
|
+
* Direct fetch keeps the root Workers-safe, avoids shipping the SDK's generated
|
|
4
|
+
* model graph, and lets the reviewed named operations and the REST hatches share
|
|
5
|
+
* one guarded transport. The trade is API drift, handled explicitly rather than
|
|
6
|
+
* by the SDK's version bumps: `scripts/drift/vercel-endpoints.json` records the
|
|
7
|
+
* method, versioned path, spec revision, and request/response digest for every
|
|
8
|
+
* fixed endpoint, and `npm run providers:check -- --provider vercel` compares
|
|
9
|
+
* those rows with Vercel's published OpenAPI document at
|
|
10
|
+
* https://openapi.vercel.sh/ without needing a credential.
|
|
11
|
+
*/
|
|
2
12
|
import { api, defined } from "../connectors/api.js";
|
|
3
13
|
import { remoteMcp } from "../connectors/remote-mcp.js";
|
|
4
14
|
import { vettedCatalog, withVettedCatalog } from "../catalog-drift.js";
|
|
@@ -128,7 +138,7 @@ function vercelTransport(baseUrl) {
|
|
|
128
138
|
authenticate: async (ctx) => {
|
|
129
139
|
const token = (await ctx.credential?.get())?.trim();
|
|
130
140
|
if (!token) {
|
|
131
|
-
throw new ConnectorCallError("auth_required", "No Vercel access token is configured for this connector.
|
|
141
|
+
throw new ConnectorCallError("auth_required", "No Vercel access token is configured for this connector. Call authorize_connector for recovery options. When available, an operator can add the token in this connection in the operator UI.");
|
|
132
142
|
}
|
|
133
143
|
return { Authorization: `Bearer ${token}` };
|
|
134
144
|
},
|
package/dist/registry.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export interface RegistryOptions {
|
|
|
58
58
|
/**
|
|
59
59
|
* Cap on inline result size before truncation + get_result paging. Must be a
|
|
60
60
|
* whole number of bytes >= 1; anything else warns at startup and falls back
|
|
61
|
-
* to the default
|
|
61
|
+
* to the default 24_000.
|
|
62
62
|
*/
|
|
63
63
|
maxResultBytes?: number | undefined;
|
|
64
64
|
results?: {
|
|
@@ -107,8 +107,8 @@ export interface RegistryView {
|
|
|
107
107
|
signal?: AbortSignal;
|
|
108
108
|
}): Promise<CallAdmissionPermit>;
|
|
109
109
|
resultsStorage(): KVStorage;
|
|
110
|
-
/** Reserve runtime-wide capacity before writing a paging envelope. */
|
|
111
|
-
stashResult(key: string,
|
|
110
|
+
/** Reserve runtime-wide capacity before writing a paging envelope's chunks. */
|
|
111
|
+
stashResult(key: string, chunks: readonly string[], ttlSeconds: number): Promise<boolean>;
|
|
112
112
|
/** Local declared-vs-stored credential mismatch, with no downstream I/O. */
|
|
113
113
|
credentialDriftFor(id: string): Promise<string | undefined>;
|
|
114
114
|
/** Value-free shape learned from successful calls, never a provider declaration. */
|
|
@@ -240,8 +240,16 @@ export declare class Registry implements RegistryView {
|
|
|
240
240
|
private observeCatalogDrift;
|
|
241
241
|
/** Reject queued/future downstream admission; active permits release safely. */
|
|
242
242
|
closeCallAdmission(): void;
|
|
243
|
-
/**
|
|
244
|
-
|
|
243
|
+
/**
|
|
244
|
+
* Reserve capacity and write one ASCII paging envelope in this runtime.
|
|
245
|
+
*
|
|
246
|
+
* `chunks[0]` lands on `<prefix><key>` and `chunks[n]` on `<prefix><key>#<n>`
|
|
247
|
+
* — the layout get_result reads back, so a page fetches only the chunks it
|
|
248
|
+
* covers instead of the whole stored result (issue #540). Chunking is a
|
|
249
|
+
* read-cost decision, not a capacity one: however many keys an envelope
|
|
250
|
+
* occupies, it is one stash entry charged its total ASCII length.
|
|
251
|
+
*/
|
|
252
|
+
stashResult(key: string, chunks: readonly string[], ttlSeconds: number, prefix?: string): Promise<boolean>;
|
|
245
253
|
/**
|
|
246
254
|
* Storage namespaced to the meta-tool result store (`results:` prefix), kept
|
|
247
255
|
* separate from any connector's `conn:<id>:` namespace. Backs get_result.
|