@zackbart/connecta 0.33.0 → 0.34.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/CHANGELOG.md +35 -0
- package/README.md +99 -128
- package/SECURITY.md +1 -1
- package/bin/version.mjs +1 -1
- package/dist/activity.d.ts +3 -0
- package/dist/branding.d.ts +7 -0
- package/dist/branding.js +76 -9
- package/dist/catalog-service.js +15 -1
- package/dist/config-value-sources.js +6 -1
- package/dist/config.d.ts +13 -2
- package/dist/config.js +36 -2
- package/dist/connector-caller.js +2 -1
- package/dist/describe-config.d.ts +3 -1
- package/dist/describe-config.js +1 -0
- package/dist/execute.js +1 -11
- package/dist/fix-prompt.js +2 -2
- package/dist/index.js +1 -0
- package/dist/membership.d.ts +2 -0
- package/dist/oauth-callback-outcome.js +2 -2
- package/dist/operator-ui/agents.d.ts +1 -1
- package/dist/operator-ui/agents.js +16 -16
- package/dist/operator-ui/config-summary.js +562 -0
- package/dist/operator-ui/connection-map.js +375 -0
- package/dist/operator-ui/endpoints.js +44 -15
- package/dist/operator-ui/fix-prompts.js +1 -1
- package/dist/operator-ui/generated.js +4 -4
- package/dist/operator-ui/member-page.js +13 -28
- package/dist/operator-ui/overview.js +134 -0
- package/dist/operator-ui/view.d.ts +27 -22
- package/dist/operator-ui/view.js +104 -88
- package/dist/page-styles.js +5 -3
- package/dist/providers/_shared/google/workspace.d.ts +6 -4
- package/dist/providers/_shared/google/workspace.js +6 -2
- package/dist/providers/ccb/index.js +1 -1
- package/dist/providers/docs/index.js +1 -1
- package/dist/providers/docs/skill.generated.js +2 -2
- package/dist/providers/drive/index.js +1 -1
- package/dist/providers/drive/skill.generated.js +2 -2
- package/dist/providers/forms/index.js +1 -1
- package/dist/providers/forms/skill.generated.js +2 -2
- package/dist/providers/gmail/index.js +1 -1
- package/dist/providers/gmail/skill.generated.js +2 -2
- package/dist/providers/mixpanel/skill.generated.js +3 -3
- package/dist/providers/notion/skill.generated.js +1 -1
- package/dist/providers/overflow/index.js +1 -1
- package/dist/providers/overflow/skill.generated.js +2 -2
- package/dist/providers/planning-center/index.js +1 -1
- package/dist/providers/planning-center/skill.generated.js +4 -4
- package/dist/providers/revenuecat/skill.generated.js +2 -2
- package/dist/providers/sheets/index.js +1 -1
- package/dist/providers/sheets/skill.generated.js +2 -2
- package/dist/providers/slides/index.js +1 -1
- package/dist/providers/slides/skill.generated.js +2 -2
- package/dist/providers/tithely/index.js +1 -1
- package/dist/providers/vercel/index.js +1 -1
- package/dist/providers/vercel/skill.generated.js +1 -1
- package/dist/registry.js +15 -0
- package/dist/routes/mcp.js +20 -13
- package/dist/routes/oauth.js +2 -2
- package/dist/skills.js +10 -0
- package/dist/storage/sql.js +5 -1
- package/dist/types.d.ts +18 -7
- package/dist/ui.js +9 -4
- package/dist/usage-guide.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/README.md +2 -2
- package/documentation/architecture.md +18 -13
- package/documentation/auth.md +183 -67
- package/documentation/code-mode.md +23 -5
- package/documentation/deploying.md +5 -1
- package/documentation/integrating.md +9 -6
- package/documentation/meta-tools.md +36 -22
- package/documentation/migration-0.33.md +21 -13
- package/documentation/migration-0.34.md +67 -0
- package/documentation/operator-tests.md +46 -20
- package/documentation/operator-ui.md +294 -104
- package/examples/worker/AGENTS.md +15 -9
- package/examples/worker/README.md +41 -14
- package/examples/worker/src/connecta.config.ts +5 -4
- package/examples/worker/wrangler.jsonc +1 -1
- package/package.json +19 -19
- package/templates/node/AGENTS.md +13 -7
- package/templates/node/README.md +14 -11
- package/templates/node/package.json +1 -1
- package/templates/node/src/connecta.config.ts +2 -2
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* One MCP endpoint aggregating a downstream remote MCP and an HTTP API, guarded
|
|
5
5
|
* by Cloudflare Access. It needs three resources and nothing else: one D1
|
|
6
6
|
* database (CONNECTA_DB) holding every piece of state, the Worker Loader
|
|
7
|
-
* binding (LOADER) behind execute_code, and
|
|
8
|
-
*
|
|
7
|
+
* binding (LOADER) behind execute_code, and two secrets: DOWNSTREAM_TOKEN for
|
|
8
|
+
* the example Notion connector and CREDENTIAL_ENCRYPTION_KEY sealing
|
|
9
|
+
* credentials in that database. Access
|
|
9
10
|
* admits the request before this Worker runs and supplies trusted human
|
|
10
11
|
* identity through ctx.access. Machines use stored cta_ tokens inside connecta.
|
|
11
12
|
*
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
*
|
|
17
18
|
* Setup (this example has no package.json of its own — it self-references the
|
|
18
19
|
* installed `@zackbart/connecta` package):
|
|
19
|
-
* 1. `
|
|
20
|
+
* 1. `pnpm install` in the connecta repository root (../../ from here) so the
|
|
20
21
|
* package import and wrangler resolve. A copy in its own repository
|
|
21
22
|
* installs `@zackbart/connecta @cloudflare/codemode` instead. Codemode is
|
|
22
23
|
* an optional peer.
|
|
@@ -90,7 +91,7 @@ export default defineConfig((env: Env) => {
|
|
|
90
91
|
// alone is refused everywhere.
|
|
91
92
|
auth: [cloudflareAccessAuth()],
|
|
92
93
|
// Machine clients are agents declared here by name, each with one cta_
|
|
93
|
-
// token.
|
|
94
|
+
// token. A signed-in maintainer issues, rotates, and revokes it
|
|
94
95
|
// in the operator UI; removing a name stops its token on the next request.
|
|
95
96
|
agents: ["ci"],
|
|
96
97
|
// Always installed over the same D1 storage. An agent with no issued token
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"CONNECTA_MAINTAINERS": "operator@example.com",
|
|
19
19
|
},
|
|
20
20
|
|
|
21
|
-
// Local-only Access identity. Remove this block to exercise the
|
|
21
|
+
// Local-only Access identity (Wrangler 4.123.0 or later). Remove this block to exercise the
|
|
22
22
|
// unauthenticated path in `wrangler dev`; production identity comes from the
|
|
23
23
|
// Worker-level Access application, not from this file.
|
|
24
24
|
"access": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zackbart/connecta",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "One MCP to rule them all — a single MCP endpoint aggregating many downstream connectors behind a code-first surface of six meta-tools.",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=22.13.0"
|
|
10
10
|
},
|
|
11
|
+
"packageManager": "pnpm@12.4.2",
|
|
11
12
|
"publishConfig": {
|
|
12
13
|
"access": "public"
|
|
13
14
|
},
|
|
@@ -187,20 +188,20 @@
|
|
|
187
188
|
"build:operator-ui": "node scripts/build-operator-ui.mjs",
|
|
188
189
|
"check:operator-ui": "node scripts/build-operator-ui.mjs --check",
|
|
189
190
|
"check:clerk-sdk": "node scripts/build-clerk-sdk.mjs --check",
|
|
190
|
-
"build": "
|
|
191
|
+
"build": "pnpm run providers:generate && pnpm run clean && tsc -p tsconfig.build.json && node scripts/prune-declarations.mjs",
|
|
191
192
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.operator-ui.json --noEmit",
|
|
192
193
|
"test": "vitest run",
|
|
193
194
|
"test:browser:install": "playwright install chromium",
|
|
194
195
|
"test:browser": "playwright test",
|
|
195
196
|
"test:browser:snapshots": "node scripts/update-operator-snapshots.mjs",
|
|
196
|
-
"pretest:browser:snapshots": "
|
|
197
|
+
"pretest:browser:snapshots": "pnpm run build:operator-ui",
|
|
197
198
|
"test:node": "vitest run --project node",
|
|
198
199
|
"test:workers": "vitest run --project workers",
|
|
199
200
|
"check:docs": "node scripts/check-doc-links.mjs",
|
|
200
201
|
"check:lint": "oxlint -D correctness --report-unused-disable-directives .",
|
|
201
202
|
"check:unused": "knip --include dependencies,unlisted,exports,nsExports,types,nsTypes",
|
|
202
203
|
"check:examples": "tsc -p tsconfig.template.node.json && tsc -p tsconfig.examples.worker.json",
|
|
203
|
-
"check:security": "
|
|
204
|
+
"check:security": "pnpm audit --prod --audit-level moderate",
|
|
204
205
|
"check:package": "node scripts/check-package.mjs",
|
|
205
206
|
"check:declarations": "node scripts/check-declarations.mjs --dist .",
|
|
206
207
|
"check:bundle": "node scripts/bundle-size.mjs",
|
|
@@ -211,23 +212,23 @@
|
|
|
211
212
|
"eval:smoke": "tsx eval/run-smoke.ts",
|
|
212
213
|
"eval:perf": "tsx eval/run-perf.ts",
|
|
213
214
|
"eval:report": "tsx eval/report.ts",
|
|
214
|
-
"check:core": "
|
|
215
|
+
"check:core": "pnpm run format:check && pnpm run check:providers-generated && pnpm run check:docs && pnpm run check:changes && pnpm run check:operator-ui && pnpm run check:clerk-sdk && pnpm run check:lint && pnpm run check:unused && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run check:declarations && pnpm run check:bundle && pnpm run check:examples",
|
|
215
216
|
"check:fast": "node scripts/check-fast.mjs",
|
|
216
|
-
"check": "
|
|
217
|
-
"release:check": "
|
|
218
|
-
"prepack": "
|
|
217
|
+
"check": "pnpm run check:core && pnpm run test:browser",
|
|
218
|
+
"release:check": "pnpm run check && pnpm run check:security && pnpm run check:package",
|
|
219
|
+
"prepack": "pnpm run check",
|
|
219
220
|
"check:changes": "node scripts/changelog.mjs --check && node scripts/check-node-suites.mjs && node --test scripts/changelog.test.mjs",
|
|
220
221
|
"changelog:assemble": "node scripts/changelog.mjs",
|
|
221
222
|
"providers:generate": "tsx scripts/generate-providers.mjs",
|
|
222
223
|
"check:providers-generated": "tsx scripts/generate-providers.mjs --check",
|
|
223
|
-
"prebuild": "node scripts/generate-version.mjs &&
|
|
224
|
-
"pretest": "node scripts/generate-version.mjs &&
|
|
225
|
-
"pretest:node": "node scripts/generate-version.mjs &&
|
|
226
|
-
"pretest:workers": "node scripts/generate-version.mjs &&
|
|
227
|
-
"pretest:browser": "
|
|
228
|
-
"pretypecheck": "node scripts/generate-version.mjs &&
|
|
229
|
-
"precheck:bundle": "
|
|
230
|
-
"precheck:fast": "
|
|
224
|
+
"prebuild": "node scripts/generate-version.mjs && pnpm run build:operator-ui",
|
|
225
|
+
"pretest": "node scripts/generate-version.mjs && pnpm run build:operator-ui",
|
|
226
|
+
"pretest:node": "node scripts/generate-version.mjs && pnpm run build:operator-ui",
|
|
227
|
+
"pretest:workers": "node scripts/generate-version.mjs && pnpm run build:operator-ui",
|
|
228
|
+
"pretest:browser": "pnpm run build:operator-ui",
|
|
229
|
+
"pretypecheck": "node scripts/generate-version.mjs && pnpm run build:operator-ui",
|
|
230
|
+
"precheck:bundle": "pnpm run build:operator-ui",
|
|
231
|
+
"precheck:fast": "pnpm run check:operator-ui",
|
|
231
232
|
"eval:regrade": "tsx eval/regrade.ts",
|
|
232
233
|
"eval:compare": "tsx eval/compare.ts",
|
|
233
234
|
"format": "oxfmt --write .",
|
|
@@ -263,8 +264,8 @@
|
|
|
263
264
|
"@cloudflare/codemode": "^0.5.0",
|
|
264
265
|
"@cloudflare/vitest-pool-workers": "^0.18.8",
|
|
265
266
|
"@cloudflare/workers-types": "^4.20250101.0 || ^5.0.0",
|
|
266
|
-
"@fontsource-variable/
|
|
267
|
-
"@fontsource-variable/
|
|
267
|
+
"@fontsource-variable/hanken-grotesk": "^5.3.0",
|
|
268
|
+
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
|
268
269
|
"@playwright/test": "^1.62.0",
|
|
269
270
|
"@radix-ui/react-dialog": "^1.2.0",
|
|
270
271
|
"@radix-ui/react-slot": "^1.4.0",
|
|
@@ -273,7 +274,6 @@
|
|
|
273
274
|
"@tailwindcss/oxide": "^4.3.3",
|
|
274
275
|
"@tanstack/react-query": "^5.104.1",
|
|
275
276
|
"@tanstack/react-router": "^1.170.41",
|
|
276
|
-
"@tanstack/react-table": "^8.21.3",
|
|
277
277
|
"@types/node": "^22.0.0",
|
|
278
278
|
"@types/react": "^19.3.0",
|
|
279
279
|
"@types/react-dom": "^19.3.0",
|
package/templates/node/AGENTS.md
CHANGED
|
@@ -42,13 +42,19 @@ tokens, upgrading, and diagnosis with `connecta doctor` to their procedures.
|
|
|
42
42
|
- Organize agent pools by connecta's agent pool layout:
|
|
43
43
|
`node_modules/@zackbart/connecta/documentation/auth.md#organizing-an-agents-pools`
|
|
44
44
|
([online](https://github.com/zackbart/connecta/blob/main/documentation/auth.md#organizing-an-agents-pools)).
|
|
45
|
-
Each agent keeps one Connecta connection whose
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
Each agent keeps one Connecta connection whose harness, never the model,
|
|
46
|
+
picks the pool per turn. Tiers are nested pools of shared connectors with
|
|
47
|
+
no `owner`, each spreading the tool list below. Recommended names are
|
|
48
|
+
`<agent>` for the lowest and `<agent>-<tier>` above it; any named pool,
|
|
49
|
+
including an existing `team` or `leadership` pool, may be a tier if all its
|
|
50
|
+
human members are cleared for it. A chat gets the most capable tier everyone
|
|
51
|
+
present is cleared for, and the lowest when anyone present is unknown.
|
|
52
|
+
`<agent>-<user>` (that user's highest tier plus their own connector ids,
|
|
53
|
+
`owner` set to their Workspace address) is used only in a one-on-one with
|
|
54
|
+
that user. List only cleared people in a tier, and never another person in
|
|
55
|
+
a `<agent>-<user>` pool: its per-user connectors act as that user for every
|
|
56
|
+
member. Never add a second Connecta connection or mount downstream tools
|
|
57
|
+
directly.
|
|
52
58
|
- Brand the operator UI in `operatorUi({ branding })`: product and owner names,
|
|
53
59
|
description, favicon, and `theme` (`accent`, `radius`, `fontFamily`,
|
|
54
60
|
`monoFamily`, `colorScheme`). Ask the deployment's owner for their brand
|
package/templates/node/README.md
CHANGED
|
@@ -55,6 +55,8 @@ npm start
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
The local commands read the process environment; they do not load `.env`.
|
|
58
|
+
To run them with the values in `.env`, export it into the shell first:
|
|
59
|
+
`set -a; . ./.env; set +a`.
|
|
58
60
|
Compose reads `.env` for the container commands below. Keep the returned
|
|
59
61
|
secret in a client secret store and out of source control and logs. A
|
|
60
62
|
rotation cannot recover an old secret; only the hash persists. An agent has no
|
|
@@ -118,9 +120,9 @@ server, then copy the old file into the database once, before the first start:
|
|
|
118
120
|
npx connecta migrate-state .connecta-state.json .connecta.sqlite
|
|
119
121
|
```
|
|
120
122
|
|
|
121
|
-
In the container,
|
|
122
|
-
|
|
123
|
-
/data/connecta.sqlite`. It copies every live entry with its expiry, keeps any
|
|
123
|
+
In the container, mount the old file and import it into the volume:
|
|
124
|
+
`docker compose run --rm -v "$PWD/.connecta-state.json:/import/state.json:ro"
|
|
125
|
+
connecta npx connecta migrate-state /import/state.json /data/connecta.sqlite`. It copies every live entry with its expiry, keeps any
|
|
124
126
|
key the database already holds, and never changes the old file; delete that
|
|
125
127
|
once the deployment is verified. The 0.28 activity log
|
|
126
128
|
(`.connecta-activity.jsonl`) is not imported; history starts fresh.
|
|
@@ -139,9 +141,9 @@ off. `.env.example` lists each one, and `npm run typecheck` checks every module
|
|
|
139
141
|
whether or not it is switched on.
|
|
140
142
|
|
|
141
143
|
The template explicitly enables `ui: operatorUi()` from
|
|
142
|
-
`@zackbart/connecta/ui`. Open `http://localhost:8787/` and
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
`@zackbart/connecta/ui`. Open `http://localhost:8787/` and sign in with
|
|
145
|
+
Clerk as a maintainer to inspect Connections and manage connections. Agent
|
|
146
|
+
`cta_` tokens are refused by every human route, the operator UI included. Omit that option and import for an API-only
|
|
145
147
|
server. OAuth callbacks remain in core even with no UI.
|
|
146
148
|
|
|
147
149
|
The page labels each tool as a read or write and each endpoint as writable or
|
|
@@ -215,13 +217,13 @@ Keep this key outside the database. Losing it makes saved values unreadable;
|
|
|
215
217
|
upgrades must reuse it. The shipped `time` connector declares no credential
|
|
216
218
|
slot. Add `credential: { label: "API token" }` to an `api()` connector and read
|
|
217
219
|
it through `await ctx.credential?.get()`, or use a Notion
|
|
218
|
-
connector with `auth: { type: "token" }`, which declares its own slot.
|
|
219
|
-
|
|
220
|
+
connector with `auth: { type: "token" }`, which declares its own slot. Maintainers manage the slot on that
|
|
221
|
+
connector's Connection tab (`/connectors/<id>`); there is no separate Credentials tab.
|
|
220
222
|
|
|
221
223
|
In 0.25.0, this vault also seals downstream OAuth tokens on their first read.
|
|
222
224
|
That is a one-way state migration for those tokens: rolling back to 0.24.x
|
|
223
225
|
requires authorizing each OAuth connector again. See the
|
|
224
|
-
[0.25.0 changelog](
|
|
226
|
+
[0.25.0 changelog](https://github.com/zackbart/connecta/blob/main/CHANGELOG.md#0250--2026-09-23) before upgrading a
|
|
225
227
|
deployment with existing OAuth connections.
|
|
226
228
|
|
|
227
229
|
A saved replacement takes effect on the next call. Connecta tests credentials
|
|
@@ -273,10 +275,11 @@ from `CONNECTA_TOKEN`; it never accepts the secret as a command-line argument.
|
|
|
273
275
|
Remote URLs must use HTTPS.
|
|
274
276
|
|
|
275
277
|
A fully-wired deployment reports exactly the same line as a bare one —
|
|
276
|
-
connector count,
|
|
278
|
+
connector count, the executor, the tool count, the negotiated MCP version, and
|
|
279
|
+
the package version:
|
|
277
280
|
|
|
278
281
|
```text
|
|
279
|
-
Connecta doctor passed: 1 connector(s), QuickJS executed, prescribed
|
|
282
|
+
Connecta doctor passed: 1 connector(s), QuickJS executed, prescribed 6-tool surface, MCP <version>, package <version>.
|
|
280
283
|
```
|
|
281
284
|
|
|
282
285
|
`QuickJS` is this deployment's sandbox, reported by the deployment itself —
|
|
@@ -92,8 +92,8 @@ export default defineConfig((env: Env) => {
|
|
|
92
92
|
// /mcp/<name>, and "agent:<name>" for a declared agent at /agent/<name>.
|
|
93
93
|
// A member connects their own account on the pool's personal connectors.
|
|
94
94
|
// `npm run doctor` checks /agent/local-machine with its token. The starter
|
|
95
|
-
// pool is the agent's base pool (shared connectors, no
|
|
96
|
-
// the agent as the agent pool layout requires.
|
|
95
|
+
// pool is the agent's base pool, its lowest tier (shared connectors, no
|
|
96
|
+
// owner), named after the agent as the agent pool layout requires.
|
|
97
97
|
pools: { "local-machine": { tools: ["time"], members: ["agent:local-machine"] } },
|
|
98
98
|
// Machine clients are agents declared here by name, each with one cta_
|
|
99
99
|
// token. Issue or rotate one locally with
|