@zackbart/connecta 0.23.0 → 0.24.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 +5 -0
- package/CHANGELOG.md +53 -0
- package/README.md +18 -10
- package/dist/activity-friction.d.ts +3 -0
- package/dist/activity-friction.js +19 -0
- package/dist/activity.d.ts +11 -2
- package/dist/activity.js +15 -19
- package/dist/auth/downstream-oauth.d.ts +2 -1
- package/dist/auth/downstream-oauth.js +10 -1
- package/dist/branding.d.ts +67 -0
- package/dist/branding.js +176 -0
- package/dist/connectors/remote-mcp.js +3 -5
- package/dist/credential-contract.d.ts +24 -0
- package/dist/credential-contract.js +1 -0
- package/dist/credential-rules.d.ts +85 -0
- package/dist/credential-rules.js +107 -0
- package/dist/credentials.d.ts +4 -100
- package/dist/credentials.js +3 -107
- package/dist/execute.d.ts +6 -0
- package/dist/execute.js +17 -7
- package/dist/index.d.ts +35 -56
- package/dist/index.js +34 -58
- package/dist/invocation.js +19 -4
- package/dist/meta-tools.d.ts +4 -0
- package/dist/meta-tools.js +8 -4
- package/dist/module-contracts.d.ts +19 -0
- package/dist/module-contracts.js +1 -0
- package/dist/operator-ui/generated.js +2 -2
- package/dist/operator-ui/model.d.ts +6 -3
- package/dist/operator-ui/view.d.ts +2 -18
- package/dist/operator-ui/view.js +3 -20
- package/dist/registry.d.ts +4 -1
- package/dist/registry.js +4 -6
- package/dist/routes/activity.js +1 -1
- package/dist/routes/credentials.js +5 -2
- package/dist/routes/mcp.js +13 -3
- package/dist/routes/oauth-management.d.ts +2 -0
- package/dist/routes/oauth-management.js +108 -0
- package/dist/routes/oauth.d.ts +0 -1
- package/dist/routes/oauth.js +21 -121
- package/dist/routes/shared.d.ts +23 -17
- package/dist/routes/shared.js +48 -44
- package/dist/routes/ui.js +36 -33
- package/dist/server.js +6 -26
- package/dist/types.d.ts +2 -0
- package/dist/ui.d.ts +15 -70
- package/dist/ui.js +176 -317
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/architecture.md +26 -17
- package/documentation/auth.md +61 -106
- package/documentation/cloudflare.md +1 -1
- package/documentation/code-mode.md +2 -2
- package/documentation/connectors.md +1 -1
- package/documentation/linear.md +1 -1
- package/documentation/meta-tools.md +6 -4
- package/documentation/mixpanel.md +1 -1
- package/documentation/notion.md +2 -2
- package/documentation/operations.md +14 -14
- package/documentation/operator-ui.md +82 -104
- package/documentation/optional-modules-upgrade.md +243 -0
- package/documentation/provider-conventions.md +5 -3
- package/documentation/revenuecat.md +1 -1
- package/documentation/storage-and-credentials.md +59 -40
- package/documentation/stripe.md +1 -1
- package/documentation/upgrading.md +33 -4
- package/ethos.md +22 -30
- package/examples/worker/AGENTS.md +3 -1
- package/examples/worker/README.md +68 -84
- package/examples/worker/src/d1-activity.ts +1 -1
- package/examples/worker/src/index.ts +11 -6
- package/package.json +17 -1
- package/templates/node/AGENTS.md +8 -6
- package/templates/node/README.md +56 -67
- package/templates/node/package.json +1 -1
- package/templates/node/src/file-activity.ts +1 -1
- package/templates/node/src/index.ts +11 -12
- package/dist/access-tokens.d.ts +0 -31
- package/dist/access-tokens.js +0 -236
- package/dist/routes/access-tokens.d.ts +0 -6
- package/dist/routes/access-tokens.js +0 -83
|
@@ -17,6 +17,21 @@ the release notes broke, and prove it with `connecta doctor`.
|
|
|
17
17
|
Work on a branch. Every step below is reversible until you delete the old
|
|
18
18
|
lockfile, and you want the diff reviewable by whoever owns this deployment.
|
|
19
19
|
|
|
20
|
+
## 0.24.0 optional modules
|
|
21
|
+
|
|
22
|
+
UI, encrypted credentials, activity history, and configured bearer auth now use
|
|
23
|
+
explicit module imports. Core keeps the same seven tools and enforcement.
|
|
24
|
+
Connecta-issued tokens are removed. Shared and personal auth management require
|
|
25
|
+
separate explicit permissions, both denied by default; visibility alone grants
|
|
26
|
+
neither. `activityAccess` replaces `operatorAccess` for global history reads.
|
|
27
|
+
|
|
28
|
+
Follow the [optional-module migration](./optional-modules-upgrade.md) before
|
|
29
|
+
upgrading. It includes the complete before-and-after configuration, team Worker
|
|
30
|
+
and personal Node permission examples, issued-token client migration, disabling
|
|
31
|
+
features, and verification. Preserve existing connector ids, identity namespaces,
|
|
32
|
+
storage, and encryption key. Vault and OAuth records need no format migration;
|
|
33
|
+
old issued-token records remain inert rather than being deleted automatically.
|
|
34
|
+
|
|
20
35
|
## 0.23.0 program API pruning
|
|
21
36
|
|
|
22
37
|
This update removes MCP Apps rendering, connector shortcut globals,
|
|
@@ -102,7 +117,7 @@ exist so far:
|
|
|
102
117
|
| --- | --- | --- |
|
|
103
118
|
| **pre-template** | before 0.10.2 | no `connecta init` existed; hand-written, or copied from the retired `examples/node` |
|
|
104
119
|
| **A** | 0.10.2 – 0.15.1 | `.env.example`, `.gitignore`, `AGENTS.md`, `CLAUDE.md`, `README.md`, `package.json`, `src/index.ts`, `tsconfig.json` |
|
|
105
|
-
| **B** | 0.16.0 – 0.
|
|
120
|
+
| **B** | 0.16.0 – 0.24.1 | adds `.dockerignore`, `Dockerfile`, `docker-compose.yml`, and `src/file-activity.ts`; `src/index.ts` grows the four commented operator blocks; `.env.example` ships `CONNECTA_TOKEN=` empty |
|
|
106
121
|
|
|
107
122
|
Generation A is a decade in template years and identifying it precisely does
|
|
108
123
|
not matter, because you are about to reconstruct it exactly rather than guess
|
|
@@ -151,7 +166,7 @@ know what to preserve, once to know what to re-verify at the end.
|
|
|
151
166
|
### Bump the pin and install
|
|
152
167
|
|
|
153
168
|
```sh
|
|
154
|
-
npm pkg set dependencies.@zackbart/connecta=0.
|
|
169
|
+
npm pkg set dependencies.@zackbart/connecta=0.24.0
|
|
155
170
|
npm install
|
|
156
171
|
```
|
|
157
172
|
|
|
@@ -175,7 +190,7 @@ Generate the *current* template beside the base you already made, into the same
|
|
|
175
190
|
`$SCRATCH`:
|
|
176
191
|
|
|
177
192
|
```sh
|
|
178
|
-
(cd "$SCRATCH" && npx @zackbart/connecta@0.
|
|
193
|
+
(cd "$SCRATCH" && npx @zackbart/connecta@0.24.1 init current)
|
|
179
194
|
```
|
|
180
195
|
|
|
181
196
|
You now have a three-way merge with a real base: `$SCRATCH/base` is what this
|
|
@@ -231,7 +246,7 @@ A deployment older than 0.10.2 has no base to diff against. Do not try to
|
|
|
231
246
|
manufacture one. Instead:
|
|
232
247
|
|
|
233
248
|
1. `SCRATCH=$(mktemp -d)`, then
|
|
234
|
-
`(cd "$SCRATCH" && npx @zackbart/connecta@0.
|
|
249
|
+
`(cd "$SCRATCH" && npx @zackbart/connecta@0.24.1 init current)` — there is no
|
|
235
250
|
`base` leg here, only the current template to read from.
|
|
236
251
|
2. Copy `$SCRATCH/current` into the deployment file by file, **skipping
|
|
237
252
|
`src/index.ts`**.
|
|
@@ -252,6 +267,16 @@ first, so cross them bottom-up: start at the oldest one still above this
|
|
|
252
267
|
deployment's pin and work back up the page, because each boundary assumes the
|
|
253
268
|
older ones are already done.
|
|
254
269
|
|
|
270
|
+
### 0.23.0 → 0.24.1
|
|
271
|
+
|
|
272
|
+
Use the [optional-module migration](./optional-modules-upgrade.md) to select
|
|
273
|
+
modules, grant auth-management permissions, and migrate issued-token clients.
|
|
274
|
+
Preserve storage, encryption keys, and identity namespaces. 0.24.1 adds two
|
|
275
|
+
optional settings, `execute.maxHostCalls` and `execute.hostCallTimeoutMs`, for
|
|
276
|
+
deployments whose providers legitimately run past the 20-call and 15-second
|
|
277
|
+
`execute_code` defaults, and one bounded `warn` log line per failed connector
|
|
278
|
+
call; neither needs migration.
|
|
279
|
+
|
|
255
280
|
### 0.22.3 → 0.23.0
|
|
256
281
|
|
|
257
282
|
Migrate stored programs and custom connector routes using the
|
|
@@ -637,6 +662,10 @@ the migration map:
|
|
|
637
662
|
|
|
638
663
|
| Option | Removed in | Do |
|
|
639
664
|
| --- | --- | --- |
|
|
665
|
+
| `accessTokens` | 0.24.0 | migrate issued-token clients to provider OAuth or configured bearer auth; old records become inert |
|
|
666
|
+
| `credentials` | 0.24.0 | `vault: encryptedCredentialVault(storage, encryptionKey)` from `/credentials` |
|
|
667
|
+
| `branding` | 0.24.0 | `ui: operatorUi({ branding })` from `/ui` |
|
|
668
|
+
| `identity.operatorAccess` | 0.24.0 | `identity.activityAccess`; grant shared and personal auth management separately |
|
|
640
669
|
| `toolkits`, `unscoped` | 0.8.1 (#178) | delete; deploy one instance per audience |
|
|
641
670
|
| `credentials.health`, `credentialHealth` | 0.8.1 (#179) | delete; credentials fail at use |
|
|
642
671
|
| `surface` | 0.11.0 (#273) | delete; there is one seven-tool surface |
|
package/ethos.md
CHANGED
|
@@ -4,38 +4,25 @@ Connecta’s scope, refusals, and invariants. Contradictions require a design de
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
- **One MCP endpoint
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- **Safe by default.** Only tools explicitly annotated read-only run without
|
|
19
|
-
crossing `call_destructive_tool`, where the host can ask a human. Approval is
|
|
20
|
-
the host's job; connecta makes the question visible.
|
|
21
|
-
- **One fetch-native core, two runtimes.** Web APIs only in the core; Node
|
|
22
|
-
touches live behind explicit subpaths. Cloudflare Worker or Docker, your pick.
|
|
23
|
-
- **Observable, actionable only over authentication material.** Operator pages
|
|
24
|
-
show status and payload-free activity and may rotate credentials, issue
|
|
25
|
-
tokens, and run OAuth. Declared capability they cannot touch.
|
|
7
|
+
- **One MCP endpoint.** Agents reach configured connectors through JavaScript
|
|
8
|
+
and seven meta-tools. Every deployment requires an executor.
|
|
9
|
+
- **Config-as-code.** One tenant and connector set; identities receive
|
|
10
|
+
config-derived views. Maintained providers, `remoteMcp()`, and `api()` obey
|
|
11
|
+
the same connector contract.
|
|
12
|
+
- **Safe by default.** Only explicitly read-only tools run inside a program.
|
|
13
|
+
Others cross `call_destructive_tool`; the host owns human approval.
|
|
14
|
+
- **One fetch-native core.** Web APIs support Node and Workers. Platform code
|
|
15
|
+
and optional features use explicit subpath imports.
|
|
16
|
+
- **Human auth management.** Optional pages show status and payload-free history.
|
|
17
|
+
Explicit permissions allow credential changes and OAuth. Capabilities stay in code.
|
|
26
18
|
|
|
27
19
|
## What this isn't
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **Not stateful.** No protocol sessions, no server push; scope resolves per
|
|
35
|
-
request.
|
|
36
|
-
- **Not a nanny.** Credentials fail loudly at use; nothing probes one.
|
|
37
|
-
- **Not a promise to strangers — yet.** Breaking changes are cheap; the version
|
|
38
|
-
number signals change, not stability.
|
|
21
|
+
No runtime registration, admin-editable capabilities, policy engine, approvals,
|
|
22
|
+
or pauses. No schema ingestion, accounts, groups, protocol sessions, or server
|
|
23
|
+
push. Inbound providers own identity; personal state remains within one tenant.
|
|
24
|
+
Credentials fail at use, without background probes. Breaking changes remain
|
|
25
|
+
acceptable; version numbers signal change, not stability.
|
|
39
26
|
|
|
40
27
|
## Decisions
|
|
41
28
|
|
|
@@ -48,6 +35,9 @@ subsystem guides and the CHANGELOG.
|
|
|
48
35
|
| Multi-tenancy / account model | refused | one deployment per tenant; inbound auth owns identity |
|
|
49
36
|
| Policy engine, approvals, pauses | refused | the host asks the human; connecta only annotates |
|
|
50
37
|
| Runtime connector registration | refused | config-as-code is the security model |
|
|
38
|
+
| Optional deployment modules | accepted | explicit imports and typed config slots select UI, activity history, credential vault, and inbound auth; discovery, execution, invocation, and enforcement stay in core |
|
|
39
|
+
| Generic plugin lifecycle or marketplace | refused | modules organize deployment code; runtime installation and discovery add no required behavior |
|
|
40
|
+
| Connecta-issued access tokens | removed | inbound identity providers own client authentication; configured bearer auth remains an optional adapter |
|
|
51
41
|
| Provider registry / marketplace | refused | prebuilt connections are imports; discovery happens in docs ([#297](https://github.com/zackbart/connecta/issues/297)) |
|
|
52
42
|
| Expanded Notion page create/update options | refused | different workflows, not missing fields; use `api()` ([#408](https://github.com/zackbart/connecta/issues/408)) |
|
|
53
43
|
| Protocol sessions & server push | refused | stateless per request |
|
|
@@ -97,7 +87,9 @@ requires a design decision.
|
|
|
97
87
|
- **Credentials never leave the host.** Encrypted at rest, readable only by the owning connector and, for personal auth, its owning principal; rendered by nothing.
|
|
98
88
|
- **Import-graph purity.** Nothing reachable from the root entry imports a `node:` builtin.
|
|
99
89
|
- **The published surface is a boundary.** Heavyweight or platform-bound code goes behind an optional-peer subpath.
|
|
100
|
-
- **Human routes manage auth, never capability.**
|
|
90
|
+
- **Human routes manage auth, never capability.** Visibility grants use, not credential administration. Shared and personal auth mutations require separate config-derived permissions, both denied by default. Activity has its own read permission.
|
|
91
|
+
- **Omitted modules do no work.** Core imports no UI bundle, encrypted vault implementation, activity implementation, or bearer adapter. OAuth callbacks remain available without UI.
|
|
92
|
+
- **Status reads do not start authorization.** OAuth starts through an explicit authorized action; loading the UI never creates a consent flow.
|
|
101
93
|
- **Structural mistakes throw at construction.** Booting into the wrong shape is worse than not booting.
|
|
102
94
|
|
|
103
95
|
Connecta simplifies [executor](https://github.com/UsefulSoftwareCo/executor).
|
|
@@ -34,7 +34,9 @@ This repository is deployment configuration, not a copy of Connecta itself.
|
|
|
34
34
|
- Prefer `api()` when the agent must see an exact reviewed capability set;
|
|
35
35
|
`remoteMcp()` follows the downstream server's evolving tool catalog.
|
|
36
36
|
- Use Access service credentials for `connecta doctor` and unattended clients.
|
|
37
|
-
A
|
|
37
|
+
A configured Connecta bearer cannot cross the Access edge alone. Connecta-issued
|
|
38
|
+
tokens are removed. UI, vault, and activity use explicit optional imports;
|
|
39
|
+
auth changes require code-derived shared or personal management permissions.
|
|
38
40
|
- Run the repository's `npm run check:examples` after configuration changes.
|
|
39
41
|
After deployment, connect both Claude and ChatGPT to `<PUBLIC_URL>/mcp` and
|
|
40
42
|
complete their browser authorization flows before calling setup complete.
|
|
@@ -120,96 +120,80 @@ discover the skew in production ([#376](https://github.com/zackbart/connecta/iss
|
|
|
120
120
|
no Clerk import, secret, package, or fallback provider. Docker deployments keep
|
|
121
121
|
the Clerk path in the Node template.
|
|
122
122
|
|
|
123
|
-
Then point an MCP client at `<PUBLIC_URL>/mcp
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
`CREDENTIAL_ENCRYPTION_KEY` secret before a value reaches it. Generate one with:
|
|
123
|
+
Then point an MCP client at `<PUBLIC_URL>/mcp`. The example explicitly enables
|
|
124
|
+
`ui: operatorUi()`; open `<PUBLIC_URL>/` for Connections and each connection's
|
|
125
|
+
authentication controls. There is no separate Credentials or Tokens tab.
|
|
126
|
+
|
|
127
|
+
## Select optional modules
|
|
128
|
+
|
|
129
|
+
`cloudflareAccessAuth()` reads trusted identity after Access admits the Worker
|
|
130
|
+
request. Humans may use their code-derived connector view; service identities
|
|
131
|
+
can use MCP but cannot manage personal or shared auth as an interactive human.
|
|
132
|
+
Keep users, groups, and admission in Access. Connector visibility and management
|
|
133
|
+
permissions belong in `src/index.ts`.
|
|
134
|
+
|
|
135
|
+
`identity.connectorAccess` selects discoverable and callable connectors.
|
|
136
|
+
`credentialAdministration` separately allows shared credential and OAuth
|
|
137
|
+
management, while `personalConnection` allows a human to connect their own
|
|
138
|
+
account. Both management permissions default to none. Grant the intended
|
|
139
|
+
owner's shared permissions explicitly, and grant users personal permissions
|
|
140
|
+
only for connectors configured with `authScope: "personal"`. Static headers
|
|
141
|
+
remain deployment configuration. `activityAccess` governs global history reads.
|
|
142
|
+
See [inbound identity](../../documentation/auth.md#principals-visibility-and-operators).
|
|
143
|
+
|
|
144
|
+
### UI and encrypted credentials
|
|
145
|
+
|
|
146
|
+
Import `operatorUi` from `@zackbart/connecta/ui` and set `ui: operatorUi()`.
|
|
147
|
+
Branding belongs in `operatorUi({ branding })`. Omit the import and option to
|
|
148
|
+
serve no UI routes; OAuth callbacks still work in core for authorized
|
|
149
|
+
interactive MCP callers.
|
|
150
|
+
|
|
151
|
+
Import `encryptedCredentialVault` from `@zackbart/connecta/credentials` and set
|
|
152
|
+
`vault: encryptedCredentialVault(storage, env.CREDENTIAL_ENCRYPTION_KEY)` when
|
|
153
|
+
the secret is configured. Keep this base64 32-byte key in Worker secrets:
|
|
155
154
|
|
|
156
155
|
```sh
|
|
157
156
|
node -e "console.log(crypto.randomBytes(32).toString('base64'))"
|
|
158
157
|
```
|
|
159
158
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
**Activity** is the commented block in `src/index.ts` and the commented
|
|
188
|
-
`d1_databases` binding in `wrangler.jsonc`; the section below creates the
|
|
189
|
-
database and applies the schema.
|
|
190
|
-
|
|
191
|
-
None of these change what agents can reach. Operator routes manage the
|
|
192
|
-
authentication material behind capabilities `src/index.ts` already declares —
|
|
193
|
-
never the connector set, the tool catalog, or its annotations.
|
|
194
|
-
|
|
195
|
-
`connecta doctor` reports the same line here as for a deployment with none of
|
|
196
|
-
this on: connector count, executor, seven tools. The executor it names is this
|
|
197
|
-
one — `DynamicWorkerExecutor executed`, not the Node template's QuickJS, which
|
|
198
|
-
is what doctor used to claim everywhere
|
|
199
|
-
([#368](https://github.com/zackbart/connecta/issues/368)). Against Access it
|
|
200
|
-
carries `CF_ACCESS_CLIENT_ID` and `CF_ACCESS_CLIENT_SECRET`, and the service
|
|
201
|
-
identity learns the model-facing surface rather than deployment topology:
|
|
159
|
+
Reuse the same key and KV namespace during upgrades. Without the secret, omit
|
|
160
|
+
the vault; declared credential slots remain unmanageable. Keep the key outside
|
|
161
|
+
KV because it protects a copied namespace. Credential replacement takes effect
|
|
162
|
+
on the next call without redeploying; no liveness probe runs in the background.
|
|
163
|
+
|
|
164
|
+
The shipped Notion connector uses a deployment-owned static header and echo
|
|
165
|
+
needs no secret. To exercise vault controls, declare a `credential` slot on an
|
|
166
|
+
`api()` connector or use a provider such as `notion()` that declares its own.
|
|
167
|
+
Authorized users manage that slot inside the connection. Configuring a vault
|
|
168
|
+
does not create credentials or permissions by itself.
|
|
169
|
+
|
|
170
|
+
### Client authentication and activity
|
|
171
|
+
|
|
172
|
+
Interactive MCP clients use Access Managed OAuth. Unattended clients use Access
|
|
173
|
+
service tokens when needed. Connecta-issued `cta_` tokens and their management
|
|
174
|
+
routes are removed; a configured Connecta bearer cannot cross the Access edge
|
|
175
|
+
alone. See the [migration guide](../../documentation/upgrading.md#0240-optional-modules)
|
|
176
|
+
if an older deployment still issues tokens.
|
|
177
|
+
|
|
178
|
+
Activity uses `activityHistory({ store: d1ActivityStore(env.ACTIVITY_DB) })`
|
|
179
|
+
from `@zackbart/connecta/activity`. Enable the database and bindings described
|
|
180
|
+
below. Omit the module and store wiring to record no history and show no
|
|
181
|
+
Activity tab. Diagnostics remain independent; `logger: "silent"` suppresses
|
|
182
|
+
them explicitly.
|
|
183
|
+
|
|
184
|
+
Verify MCP health and the exact seven tools with:
|
|
202
185
|
|
|
203
186
|
```sh
|
|
204
187
|
CF_ACCESS_CLIENT_ID=… CF_ACCESS_CLIENT_SECRET=… \
|
|
205
188
|
npx connecta doctor --url "$PUBLIC_URL"
|
|
206
189
|
```
|
|
207
190
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
191
|
+
Doctor reports the configured `DynamicWorkerExecutor`, not a presumed Node
|
|
192
|
+
executor. Verify the UI separately as a human: check visible connections,
|
|
193
|
+
explicit shared and personal auth permissions, and Activity only when enabled.
|
|
194
|
+
The configured list loads before live connector checks; a slow provider must
|
|
195
|
+
not prevent other connections from appearing. All capability and access changes
|
|
196
|
+
still require a deployment-code change.
|
|
213
197
|
|
|
214
198
|
## Code mode
|
|
215
199
|
|
|
@@ -295,19 +279,19 @@ To enable it:
|
|
|
295
279
|
the failure and returns the tool result unharmed — so the symptom is not an
|
|
296
280
|
error your agent sees, it is an activity log that quietly stops recording.
|
|
297
281
|
|
|
298
|
-
3. In `src/index.ts`,
|
|
299
|
-
field on `Env`, and the `activity`
|
|
300
|
-
that together read:
|
|
282
|
+
3. In `src/index.ts`, enable the `activityHistory` and `d1ActivityStore` imports,
|
|
283
|
+
the `ACTIVITY_DB` field on `Env`, and the `activity` option:
|
|
301
284
|
|
|
302
285
|
```ts
|
|
286
|
+
import { activityHistory } from "@zackbart/connecta/activity";
|
|
303
287
|
import { d1ActivityStore } from "./d1-activity.js";
|
|
304
288
|
|
|
305
289
|
createConnecta({
|
|
306
290
|
// …
|
|
307
|
-
activity: {
|
|
291
|
+
activity: activityHistory({
|
|
308
292
|
store: d1ActivityStore(env.ACTIVITY_DB),
|
|
309
293
|
deploymentId: "production",
|
|
310
|
-
},
|
|
294
|
+
}),
|
|
311
295
|
});
|
|
312
296
|
```
|
|
313
297
|
|
|
@@ -2,7 +2,7 @@ import type {
|
|
|
2
2
|
ActivityPage,
|
|
3
3
|
ActivityStore,
|
|
4
4
|
} from "@zackbart/connecta";
|
|
5
|
-
import { InvalidActivityCursorError } from "@zackbart/connecta";
|
|
5
|
+
import { InvalidActivityCursorError } from "@zackbart/connecta/activity";
|
|
6
6
|
import {
|
|
7
7
|
activityEventToRow,
|
|
8
8
|
activityRowToEvent,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { operatorUi } from "@zackbart/connecta/ui";
|
|
2
|
+
// import { activityHistory } from "@zackbart/connecta/activity";
|
|
3
|
+
import { encryptedCredentialVault } from "@zackbart/connecta/credentials";
|
|
1
4
|
/**
|
|
2
5
|
* connecta on Cloudflare Workers.
|
|
3
6
|
*
|
|
@@ -63,9 +66,10 @@ interface Env {
|
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
function build(env: Env) {
|
|
69
|
+
const storage = cloudflareKvStorage(env.CONNECTA_KV);
|
|
66
70
|
return createConnecta({
|
|
67
71
|
publicUrl: env.PUBLIC_URL,
|
|
68
|
-
storage
|
|
72
|
+
storage,
|
|
69
73
|
executor: new DynamicWorkerExecutor({ loader: env.LOADER }),
|
|
70
74
|
auth: [
|
|
71
75
|
// Access owns admission policy. A human identity may use MCP and the
|
|
@@ -83,7 +87,7 @@ function build(env: Env) {
|
|
|
83
87
|
// principal?.id === "ACCESS_USER_UUID"
|
|
84
88
|
// ? ["notion", "echo"]
|
|
85
89
|
// : ["echo"],
|
|
86
|
-
//
|
|
90
|
+
// activityAccess: ({ id }) => id === "ACCESS_USER_UUID",
|
|
87
91
|
// },
|
|
88
92
|
// Connectors that declare a `credential` slot become editable by every
|
|
89
93
|
// signed-in human who can see that connector at /credentials, encrypted
|
|
@@ -98,19 +102,20 @@ function build(env: Env) {
|
|
|
98
102
|
// ready and the page empty. Declare a slot (see the commented shape on
|
|
99
103
|
// `echo`, or use a provider connector like `notion()`, which declares its
|
|
100
104
|
// own) and the page appears on the next load.
|
|
101
|
-
|
|
105
|
+
vault: encryptedCredentialVault(storage, env.CREDENTIAL_ENCRYPTION_KEY),
|
|
102
106
|
// Eligible human operators can create named, revocable MCP Bearer tokens
|
|
103
107
|
// at /tokens. Under Worker-level Access those tokens are a rollback tool,
|
|
104
108
|
// not standalone edge credentials: Access still runs before connecta.
|
|
105
|
-
|
|
109
|
+
ui: operatorUi(),
|
|
110
|
+
identity: { credentialAdministration: () => "all", personalConnection: () => "all" },
|
|
106
111
|
// Payload-free activity at /activity, off until a database exists to hold
|
|
107
112
|
// it. Uncomment the `d1_databases` binding in wrangler.jsonc, apply the
|
|
108
113
|
// schema in README.md § "Activity history", then these three lines and the
|
|
109
114
|
// import above.
|
|
110
|
-
// activity: {
|
|
115
|
+
// activity: activityHistory({
|
|
111
116
|
// store: d1ActivityStore(env.ACTIVITY_DB),
|
|
112
117
|
// deploymentId: "production",
|
|
113
|
-
// },
|
|
118
|
+
// }),
|
|
114
119
|
connectors: [
|
|
115
120
|
remoteMcp("notion", {
|
|
116
121
|
url: "https://mcp.notion.com/mcp",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zackbart/connecta",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.1",
|
|
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 seven meta-tools.",
|
|
@@ -94,6 +94,22 @@
|
|
|
94
94
|
"./providers/vercel": {
|
|
95
95
|
"types": "./dist/providers/vercel.d.ts",
|
|
96
96
|
"import": "./dist/providers/vercel.js"
|
|
97
|
+
},
|
|
98
|
+
"./ui": {
|
|
99
|
+
"types": "./dist/ui.d.ts",
|
|
100
|
+
"import": "./dist/ui.js"
|
|
101
|
+
},
|
|
102
|
+
"./credentials": {
|
|
103
|
+
"types": "./dist/credentials.d.ts",
|
|
104
|
+
"import": "./dist/credentials.js"
|
|
105
|
+
},
|
|
106
|
+
"./activity": {
|
|
107
|
+
"types": "./dist/activity.d.ts",
|
|
108
|
+
"import": "./dist/activity.js"
|
|
109
|
+
},
|
|
110
|
+
"./auth/bearer": {
|
|
111
|
+
"types": "./dist/auth/bearer.d.ts",
|
|
112
|
+
"import": "./dist/auth/bearer.js"
|
|
97
113
|
}
|
|
98
114
|
},
|
|
99
115
|
"scripts": {
|
package/templates/node/AGENTS.md
CHANGED
|
@@ -12,12 +12,14 @@ This repository is deployment configuration, not a copy of Connecta itself.
|
|
|
12
12
|
Do not copy or modify Connecta package internals here.
|
|
13
13
|
- Prefer `api()` when the agent must see an exact reviewed capability surface;
|
|
14
14
|
`remoteMcp()` follows the downstream server's evolving tool catalog.
|
|
15
|
-
- The
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
- The UI, encrypted credential vault, and activity history use explicit module
|
|
16
|
+
imports and typed `ui`, `vault`, and `activity` options in `src/index.ts`.
|
|
17
|
+
Follow README "Select optional modules". Auth management requires explicit
|
|
18
|
+
`credentialAdministration` or `personalConnection` permissions; visibility
|
|
19
|
+
alone never grants it. Configured bearer auth is a client option, not a human
|
|
20
|
+
management identity. Connecta-issued access tokens are removed.
|
|
21
|
+
`src/file-activity.ts` remains the deployment-owned history store.
|
|
22
|
+
|
|
21
23
|
- Run `npm run typecheck` after configuration changes. With the server running,
|
|
22
24
|
run `CONNECTA_TOKEN=... npm run doctor` before calling setup complete.
|
|
23
25
|
- `Dockerfile` and `docker-compose.yml` containerize *this* source; they are
|