@zackbart/connecta 0.16.0 → 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.
@@ -0,0 +1,454 @@
1
+ # Upgrading an existing deployment
2
+
3
+ For the agent working *inside* a generated deployment rather than inside this
4
+ repository. You did not create this project, you cannot re-run `connecta init`
5
+ over it, and the thing you are holding is two files' worth of the owner's
6
+ intent wrapped in eight files of template that has moved on without it.
7
+
8
+ The shape of the job is fixed by two facts. A deployment is
9
+ [config-as-code](../ethos.md): `src/index.ts` is the product, everything around
10
+ it is scaffolding. And `connecta init` **refuses to merge into an existing
11
+ path** — deliberately, because an initializer that overwrites is an initializer
12
+ that eventually overwrites a connector set. So an upgrade is not a re-init. It
13
+ is: read what you have, bump the pin, reconcile the scaffolding against the
14
+ current template with the deployment's own generation as the base, migrate what
15
+ the release notes broke, and prove it with `connecta doctor`.
16
+
17
+ Work on a branch. Every step below is reversible until you delete the old
18
+ lockfile, and you want the diff reviewable by whoever owns this deployment.
19
+
20
+ ## Read what you have first
21
+
22
+ Three questions, in order. Answer all three before editing anything — the
23
+ second and third are what stop you from "restoring" a file the owner changed on
24
+ purpose.
25
+
26
+ ### 1. What version is it pinned to
27
+
28
+ ```sh
29
+ node -p "require('./package.json').dependencies['@zackbart/connecta']"
30
+ ```
31
+
32
+ `init` writes that pin as an **exact** version, never a range, because the
33
+ generated deployment and the package are separate release units
34
+ ([operations](./operations.md#deployment-as-a-release-unit)). So the pin is
35
+ also a fact about history: it is the version of the CLI that generated this
36
+ project, unless someone has bumped it since — which `package-lock.json` will
37
+ tell you.
38
+
39
+ ```sh
40
+ node -p "require('./package-lock.json').packages['node_modules/@zackbart/connecta'].version"
41
+ ```
42
+
43
+ Pin and lockfile agreeing means nobody has touched the dependency by hand. They
44
+ disagreeing is the first thing to reconcile, and the lockfile is usually the
45
+ truth about what has actually been running.
46
+
47
+ A deployment with no `@zackbart/connecta` entry at all, or one carrying a range
48
+ (`^0.14.0`), was not produced by `connecta init` — treat it as the pre-template
49
+ case below.
50
+
51
+ ### 2. Which template generation it came from
52
+
53
+ The pin answers this, and the file layout corroborates it. Two generations
54
+ exist so far:
55
+
56
+ | Generation | Versions | Layout |
57
+ | --- | --- | --- |
58
+ | **pre-template** | before 0.10.2 | no `connecta init` existed; hand-written, or copied from the retired `examples/node` |
59
+ | **A** | 0.10.2 – 0.15.1 | `.env.example`, `.gitignore`, `AGENTS.md`, `CLAUDE.md`, `README.md`, `package.json`, `src/index.ts`, `tsconfig.json` |
60
+ | **B** | 0.16.0 – 0.16.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 |
61
+
62
+ Generation A is a decade in template years and identifying it precisely does
63
+ not matter, because you are about to reconstruct it exactly rather than guess
64
+ at it. What matters is the boundary: a project with no `Dockerfile` is a
65
+ generation A project, and the whole container story is a change it has never
66
+ seen.
67
+
68
+ ### 3. What this deployment changed
69
+
70
+ Regenerate the deployment's *own* starting point and diff against it. `init`
71
+ pins from the CLI package's version, so an old CLI reproduces its own
72
+ generation byte for byte:
73
+
74
+ ```sh
75
+ SCRATCH=$(mktemp -d) # keep this shell
76
+ (cd "$SCRATCH" && npx @zackbart/connecta@0.15.1 init base) # ← the pin from step 1
77
+ ```
78
+
79
+ `$SCRATCH` is the one scratch path for the whole upgrade — the reconcile step
80
+ below generates the current template into it too, and every later command
81
+ resolves against it. Run the rest from the deployment root:
82
+
83
+ ```sh
84
+ diff -ru "$SCRATCH/base" . --exclude node_modules --exclude package-lock.json
85
+ ```
86
+
87
+ Everything that differs is deployment-owned and survives this upgrade
88
+ unconditionally. Everything identical is scaffolding you may replace without
89
+ asking. Expect the interesting half to be:
90
+
91
+ - **`src/index.ts`** — the connector set, `auth`, `storage`, `publicUrl`, and
92
+ whichever operator blocks were uncommented. This file is never overwritten,
93
+ only edited.
94
+ - **`package.json`** — extra dependencies (`@clerk/backend` if operator
95
+ sign-in is on, provider SDKs the owner added, anything a handler imports)
96
+ and extra scripts.
97
+ - **`.env.example` / deployment docs** — variables the owner's connectors read.
98
+ - Whole files that are not in any generation: extra `src/*.ts` modules behind
99
+ `api()` handlers, CI workflows, infrastructure.
100
+
101
+ Write the list down before you touch anything. You will use it twice: once to
102
+ know what to preserve, once to know what to re-verify at the end.
103
+
104
+ ## The upgrade
105
+
106
+ ### Bump the pin and install
107
+
108
+ ```sh
109
+ npm pkg set dependencies.@zackbart/connecta=0.16.1
110
+ npm install
111
+ ```
112
+
113
+ Exact, not a range. The reason `init` pins exactly applies just as much on the
114
+ way up: a deployment whose connector safety classifications can move under it
115
+ during an unrelated `npm install` is not reviewable.
116
+
117
+ `quickjs-emscripten` is a direct dependency of the generated project and an
118
+ optional peer of the package (`^0.32.0`), so npm will tell you if the pin the
119
+ template ships has fallen out of range. Match the template's pin rather than
120
+ inventing one. If operator sign-in is enabled, `@clerk/backend` (`^3.12.0`) is
121
+ the other optional peer — also a direct dependency of the deployment, because
122
+ optional peers never install with core.
123
+
124
+ Do not run the build yet. Reconcile first, so a single typecheck answers for
125
+ both the new package and the new scaffolding.
126
+
127
+ ### Reconcile the scaffolding
128
+
129
+ Generate the *current* template beside the base you already made, into the same
130
+ `$SCRATCH`:
131
+
132
+ ```sh
133
+ (cd "$SCRATCH" && npx @zackbart/connecta@0.16.1 init current)
134
+ ```
135
+
136
+ You now have a three-way merge with a real base: `$SCRATCH/base` is what this
137
+ deployment started as, `$SCRATCH/current` is what `init` produces today, and the
138
+ deployment is the third leg. For every file:
139
+
140
+ | base vs current | deployment vs base | Do |
141
+ | --- | --- | --- |
142
+ | unchanged | unchanged | nothing |
143
+ | unchanged | changed | keep the deployment's version |
144
+ | changed | unchanged | take `$SCRATCH/current`'s version |
145
+ | changed | changed | merge by hand — this is the only file class that needs judgment |
146
+
147
+ `diff3` or `git merge-file` will do the mechanical part. From the deployment
148
+ root, with the deployment's file first, the base second, and the current
149
+ template third:
150
+
151
+ ```sh
152
+ git merge-file -p src/index.ts "$SCRATCH/base/src/index.ts" \
153
+ "$SCRATCH/current/src/index.ts" > "$SCRATCH/merged-index.ts"
154
+ ```
155
+
156
+ New files in `$SCRATCH/current` that exist in neither base nor deployment are
157
+ pure additions — copy them in. For generation A that is the entire container story
158
+ (`Dockerfile`, `docker-compose.yml`, `.dockerignore`) plus
159
+ `src/file-activity.ts`.
160
+
161
+ Two things are worth knowing before you accept the merge:
162
+
163
+ - **`.env.example` is not decoration.** The 0.16.0 template ships
164
+ `CONNECTA_TOKEN=` **empty** on purpose: both Compose and `src/index.ts`
165
+ refuse to start until an operator sets it, where the old `replace-me` value
166
+ started a healthy, port-published deployment whose bearer token was a string
167
+ published in a public repository. Take the empty value. Adding the
168
+ deployment's own variables underneath is the merge; restoring a placeholder
169
+ bearer is not.
170
+ - **`src/index.ts` is a merge, not a takeover.** What you are adopting from
171
+ `$SCRATCH/current` is the environment reading (`PUBLIC_URL`, `CONNECTA_STATE_FILE`,
172
+ treating empty as unset — that is what lets one source serve both `npm start`
173
+ and the container) and the commented operator blocks. What you are keeping is
174
+ every connector, every credential slot, every handler, and every operator
175
+ block this deployment had already uncommented. If a block is live here and
176
+ commented in the current template, live wins.
177
+
178
+ `AGENTS.md` (and the `CLAUDE.md` symlink beside it) is the deployment's
179
+ instruction file for the next agent. Take the current one, then re-append
180
+ whatever the owner added — it is usually the only "template" file with real
181
+ local content in it.
182
+
183
+ ### The pre-template case
184
+
185
+ A deployment older than 0.10.2 has no base to diff against. Do not try to
186
+ manufacture one. Instead:
187
+
188
+ 1. `SCRATCH=$(mktemp -d)`, then
189
+ `(cd "$SCRATCH" && npx @zackbart/connecta@0.16.1 init current)` — there is no
190
+ `base` leg here, only the current template to read from.
191
+ 2. Copy `$SCRATCH/current` into the deployment file by file, **skipping
192
+ `src/index.ts`**.
193
+ 3. Port the deployment's existing configuration into the new `src/index.ts` by
194
+ hand, one connector at a time, reading each version boundary below as you
195
+ go.
196
+
197
+ It is more work and it is honest work: a project of that vintage predates the
198
+ executor requirement, the seven-tool surface, and the `api()` construction
199
+ contract, so it needs a read anyway.
200
+
201
+ ## Version boundaries
202
+
203
+ Only what breaks an existing deployment is listed. Everything else in
204
+ [`CHANGELOG.md`](../CHANGELOG.md) is additive, and a boundary absent from this
205
+ list is a boundary you can cross with a version bump. The sections run newest
206
+ first, so cross them bottom-up: start at the oldest one still above this
207
+ deployment's pin and work back up the page, because each boundary assumes the
208
+ older ones are already done.
209
+
210
+ ### 0.16.0 → 0.16.1
211
+
212
+ Nothing throws, and a Node deployment crosses this on the version bump alone.
213
+ The one thing that can stop the upgrade is npm, and only on a Worker:
214
+ `@cloudflare/codemode` is now a declared optional peer at `^0.4.4 || ^0.5.0`,
215
+ so a `package.json` holding it below that range fails `npm install` with an
216
+ `ERESOLVE` conflict instead of installing. Move the pin into the range this
217
+ release is tested against. Separately, `cloudflare()` no longer names
218
+ `list_zone_settings` — read one setting with `get_zone_setting`, write one with
219
+ `update_zone_setting` — and Cloudflare's 404 now arrives as `not_found` rather
220
+ than `connector_call_failed`, which matters only to a program that branches on
221
+ the code.
222
+
223
+ ### 0.15.x → 0.16.0
224
+
225
+ The largest one, and it fails loudly. Every item here throws at construction or
226
+ fails a specific call; none of it degrades quietly.
227
+
228
+ **`api()` enforces its construction contract.** Every hand-written tool now
229
+ needs three things, checked when the connector is built:
230
+
231
+ - a non-empty `description` — it is what an agent reads to choose the tool;
232
+ - an explicit boolean `annotations.readOnlyHint` — `true` for a read, `false`
233
+ for work that must cross `call_destructive_tool`;
234
+ - an `inputSchema`, if it ships one, that the validator can actually compile.
235
+
236
+ The throw names the failing address (`connectorId.toolName`), so this is a
237
+ mechanical walk through `src/index.ts`. The one judgment call is the
238
+ classification, and the safe answer is written down for you: **a tool that used
239
+ to ship unannotated becomes `readOnlyHint: false`**, because unannotated
240
+ already routed through `call_destructive_tool`. That is the routing it had.
241
+ Writing `true` onto a tool you have not read is not an upgrade, it is a
242
+ capability change.
243
+
244
+ Connecta infers the classification from nothing — not a name, not a verb, not
245
+ an HTTP method, not the other annotations. There is no flag that restores the
246
+ old forgiving behavior.
247
+
248
+ **`ApiOptions.strictValidation` is gone.** Delete it. Fail-closed schema
249
+ handling is the only behavior left, so the option had nothing to switch. A
250
+ schema that only reveals itself as unenforceable on first use — an unresolvable
251
+ `$ref`, say — now fails that call as non-retryable `invalid_args` instead of
252
+ forwarding raw arguments to the handler. `validateArgs: false` still exists and
253
+ still means what it said: opting out of enforcement, not out of the schema
254
+ being real.
255
+
256
+ **`linear()` requires `access`.** Construction throws naming both options.
257
+ `access: "read-write"` preserves an existing deployment's behavior exactly;
258
+ `"read-only"` binds the connector to Linear's read-only endpoint, whose token
259
+ cannot reach the write APIs at all. There is no default because neither guess
260
+ is safe — one hands out writes nobody asked for, the other breaks a writing
261
+ deployment at Linear, at runtime, where no agent can repair it
262
+ ([linear](./linear.md)).
263
+
264
+ **`mixpanel()` declares no call-admission budget.** The old hardcoded 600
265
+ calls/hour transcribed a limit Mixpanel meters *per user*, which a per-runtime
266
+ counter cannot approximate in either direction. Nothing throws — the ceiling is
267
+ simply absent. If this deployment was relying on it, pass `callAdmission`
268
+ explicitly ([call admission](./call-admission.md)). The default title also now
269
+ carries the region (`Mixpanel (us)`), and an unknown `region` throws.
270
+
271
+ **Three Cloudflare tools are gone; the connection ships 52.** `set_r2_cors`,
272
+ `delete_r2_cors`, and `get_r2_metrics`. Grep the deployment — and any prompt,
273
+ skill, or runbook around it — for those names. No capability is lost:
274
+ `get_r2_cors` still reads a bucket's policy, CORS writes go through
275
+ `cloudflare_api_mutate` at
276
+ `PUT`/`DELETE /accounts/{accountId}/r2/buckets/{bucketName}/cors`, and metrics
277
+ through `cloudflare_api_get` at `/accounts/{accountId}/r2/metrics`
278
+ ([cloudflare](./cloudflare.md)).
279
+
280
+ **`cloudflare()` checks an overridden `baseUrl` at construction.** A
281
+ non-loopback plain-http origin, URL-embedded credentials, or a query or
282
+ fragment now throws where the option is written rather than on the first call.
283
+ A deployment pointing Cloudflare at an http proxy must move it to https or bind
284
+ it to loopback. The default base is unaffected, so a deployment that never set
285
+ `baseUrl` reads nothing here.
286
+
287
+ **Cloudflare and Notion refuse redirects and bound their reads.** Both now send
288
+ `redirect: "manual"`; a 3xx fails as non-retryable `connector_call_failed`
289
+ rather than re-sending the connector's credential to whatever origin `Location`
290
+ names. Both also cap the response they will read — 8 MiB for Cloudflare, 4 MiB
291
+ for Notion — checked against a declared `Content-Length` and again while the
292
+ body streams. Visible only to a deployment that was pulling something enormous
293
+ through a tool call, such as a `cloudflare_api_get` on a large R2 object. These
294
+ are ceilings on absurdity; anything near them was already past whatever
295
+ `maxResultBytes` the deployment set.
296
+
297
+ **The shipped defaults fail closed.** Covered under `.env.example` above, and
298
+ repeated here because it is the item most likely to be "fixed" backwards: an
299
+ empty `CONNECTA_TOKEN` that refuses to boot is the intended state of a fresh
300
+ `.env.example`, not a regression.
301
+
302
+ ### 0.13.x → 0.14.x
303
+
304
+ No API breaks. One behavior change worth knowing: vetted annotations on a
305
+ prebuilt connection no longer argue with an explicit downstream annotation in
306
+ either direction, so a name the downstream explicitly marks `readOnlyHint:
307
+ true` that no release has classified is now callable from `execute_code`
308
+ instead of failing closed onto the approval path. Silence on an unclassified
309
+ name still means not read-only. The one branch that still outranks the
310
+ downstream is a name a release reviewed and filed destructive.
311
+
312
+ ### 0.12.x → 0.13.0
313
+
314
+ No API breaks; text changed under existing deployments. Served tool
315
+ descriptions and the MCP `instructions` string were rewritten, and `skills({})`
316
+ now summarizes a connector guide from its first body line rather than its
317
+ heading — a guide opening `# Acme` that listed as "Acme" now lists as the
318
+ sentence beneath it. If this deployment's connectors carry usage guides, read
319
+ their first lines ([connector guides](./connector-guides.md)).
320
+
321
+ ### 0.10.x → 0.11.0
322
+
323
+ The executor boundary. **Every deployment must configure an executor** and
324
+ serves exactly seven tools; construction refuses to boot without one. On Node
325
+ that is `quickJsExecutor()` from `@zackbart/connecta/quickjs`; on Workers,
326
+ `new DynamicWorkerExecutor({ loader: env.LOADER })` from
327
+ `@cloudflare/codemode` plus its paid-plan Worker Loader binding.
328
+
329
+ The top-level `list_connectors`, `describe_tools`, and `batch_call`
330
+ registrations are gone. Their equivalents live inside `execute_code` as
331
+ `connecta.search`, `connecta.describe`, and `connecta.batch`
332
+ ([code mode](./code-mode.md)). Anything outside the deployment that called
333
+ those three by name — a client config, a prompt, a script — is what actually
334
+ breaks here; the deployment file itself only has to gain the executor and drop
335
+ `surface`.
336
+
337
+ ### 0.6.x → 0.7.0
338
+
339
+ Only a pre-template deployment is still down here; every generation A project
340
+ was born above this line. Three breaks, and the config one is in the table
341
+ below.
342
+
343
+ **A connector implementing `finishAuth` without `verifyState` can no longer
344
+ complete OAuth** (#62). The callback refuses with the same opaque 400 as every
345
+ other refusal, exchanges no code, and logs one operator-grade line naming the
346
+ connector and the missing hook. `verifyState` is optional in the type system and
347
+ required in practice wherever `finishAuth` is present, so nothing throws at
348
+ construction — the flow simply stops completing, which is the one item in this
349
+ guide you find by reading rather than by building. It reaches hand-written
350
+ connectors only: the shipped `remoteMcp` OAuth provider has always implemented
351
+ it. The old behavior was exchanging an authorization code with no CSRF guard at
352
+ all, so this is not a hook to stub out with `() => true`.
353
+
354
+ **`/`, `/credentials`, and `/activity` are core-owned routes** (#57). They
355
+ previously fell through to connector `handleRequest` and then to a 404, so a
356
+ connector that served any of the three is now shadowed without warning. `GET /`
357
+ returns the operator shell where 0.6.1 returned 404, and a non-GET on those
358
+ routes or on `/ui` returns 405 instead of falling through. Move such a handler
359
+ to a path the core does not own: `handleRequest` still runs for everything the
360
+ built-in routes miss, so it can add a route and never shadow one
361
+ ([architecture](./architecture.md)).
362
+
363
+ ### Removed options that throw
364
+
365
+ These fail at construction with their migration named rather than falling back
366
+ to a default, because silently ignoring a removed option is how a deployment
367
+ ends up running a policy its config file says it has:
368
+
369
+ | Option | Removed in | Do |
370
+ | --- | --- | --- |
371
+ | `toolkits`, `unscoped` | 0.8.1 (#178) | delete; deploy one instance per audience |
372
+ | `credentials.health`, `credentialHealth` | 0.8.1 (#179) | delete; credentials fail at use |
373
+ | `surface` | 0.11.0 (#273) | delete; there is one seven-tool surface |
374
+ | `calls.maxBatchResultBytes` | 0.11.0 (#273) | delete; program batching is bounded by `execute_code`'s own limits |
375
+ | flat v0.6 config paths | 0.7.0 | move into their groups — one complete migration error lists them ([operations](./operations.md#configuration)) |
376
+
377
+ ## Verify
378
+
379
+ In order, and do not skip the last one — the first three prove the package
380
+ works, not that this deployment does.
381
+
382
+ ```sh
383
+ npm run typecheck # ships with the template
384
+ CONNECTA_TOKEN=dev-token npm start # in one shell
385
+ CONNECTA_TOKEN=dev-token npm run doctor # in another
386
+ ```
387
+
388
+ `connecta doctor` is the gate. It asserts `/health` reports ok, that
389
+ `tools/list` is exactly the seven prescribed names — `authorize_connector`,
390
+ `call_destructive_tool`, `call_tool`, `execute_code`, `get_result`,
391
+ `search_tools`, `skills` — and that `execute_code` actually runs a program in
392
+ the sandbox. It names the executor the deployment reports rather than assuming
393
+ one: `QuickJS executed` on the Node template, `DynamicWorkerExecutor executed`
394
+ on a Worker. It also *reports* catalog drift without failing on it; drifted
395
+ counts here are a maintainer's next task, not a failed upgrade.
396
+
397
+ Then exercise this deployment's own connectors, which doctor knows nothing
398
+ about — it holds a bearer, and a client key does not get to learn a
399
+ deployment's configuration topology. One program covers discovery and a call:
400
+
401
+ ```js
402
+ // execute_code — an empty query browses the catalog
403
+ async () => {
404
+ const page = await connecta.search({ query: "", limit: 100 });
405
+ return {
406
+ total: page.total,
407
+ connectors: [...new Set(page.tools.map((t) => t.address.split(".")[0]))],
408
+ };
409
+ };
410
+ ```
411
+
412
+ Walk the list from the inventory you wrote down: every connector the owner
413
+ configured should appear, every credential slot should still be listed at
414
+ `/credentials`, and at least one real read per connector should return data.
415
+ A connector whose catalog is empty after an upgrade is usually a credential
416
+ that did not survive a state-file path change, not a broken release.
417
+
418
+ If the container half is now in play, `cp .env.example .env`, set
419
+ `CONNECTA_TOKEN`, and `docker compose up -d --build`, then point doctor at it.
420
+ Commit the `package-lock.json` that `npm install` wrote on the host — that is
421
+ what puts the image build on the reproducible `npm ci` path instead of
422
+ resolving the pin again inside a layer.
423
+
424
+ ## What not to do
425
+
426
+ Five refusals. Each one is somebody's plausible shortcut, and each one produces
427
+ a deployment that is quieter and wrong.
428
+
429
+ - **Do not re-init over the top.** `connecta init` refuses to merge into an
430
+ existing path and that refusal is load-bearing. Working around it — into a
431
+ scratch directory and then `cp -r` over the deployment, or by deleting the
432
+ project and regenerating — is how a connector set becomes a `time` connector.
433
+ Scratch directories are for reading and diffing, never for copying wholesale.
434
+ - **Do not weaken a fail-closed default to get green.** `readOnlyHint: true` on
435
+ a tool you have not read, a restored `CONNECTA_TOKEN=replace-me`,
436
+ `validateArgs: false` to silence a schema that will not compile, an
437
+ annotation "corrected" to match what the downstream claims: all of these turn
438
+ a construction error into a running deployment with a wider blast radius than
439
+ it had yesterday. The construction throw is the feature. Fix the input.
440
+ - **Do not pin back.** A deployment that boots on 0.15.1 and throws on 0.16.0
441
+ is a deployment telling you which line to fix, with the address in the error
442
+ message. Reverting the pin keeps the same defect and buries the report.
443
+ - **Do not copy Connecta internals into the deployment.** If something the
444
+ deployment needs is not exported, that is a package issue to file, not a file
445
+ to vendor. A deployment that carries a copy of a provider cannot be upgraded
446
+ by anyone, including you, next time.
447
+ - **Do not add a second project shape.** No alternate entrypoint, no second
448
+ container recipe, no parallel configuration path beside `src/index.ts`. There
449
+ are exactly two deployment shapes — [`templates/node/`](../templates/node/)
450
+ and the Worker example — and a third that is a diff away from one of them is
451
+ a shape this repository has already deleted once.
452
+
453
+ When something here disagrees with [`ethos.md`](../ethos.md), the ethos wins
454
+ and this guide is what needs fixing.
package/ethos.md CHANGED
@@ -84,7 +84,7 @@ proposing one without a new argument is not.
84
84
  | Operator boundary reworded: authentication material, never declared capability | accepted | supersedes "observable, never administrable", which had stopped describing the surface: operator routes already rotate credentials, issue and revoke access tokens, and drive downstream OAuth, each under its own accepted row, and the owner has decided the surface stays actionable — so the boundary now says what is actually true, that operator routes may manage authentication material for capabilities declared in deployment configuration and may not change the connector set, the declared tool catalog or annotations, requested OAuth scopes, admission policy, authorization rules, or caller tool scope; the claim is deliberately about *declared* capability, and twice so, because replacing an API token with a broader-scoped one widens downstream reach and no browser page can honestly promise otherwise, and because a remote MCP server's catalog is discovered rather than declared — connecta declares the connector, its credential slot, and its admission policy, while the tools that server serves are its own answer, so storing a credential or finishing an OAuth flow can legitimately take an `mcp()` connector from no tools to N, which is discovery arriving, not an operator editing the deployment ([#338](https://github.com/zackbart/connecta/issues/338)) |
85
85
  | Structured result surface | accepted | canonical `structuredContent` plus complete compact `content`; summary-only text is gated on host-forwarding evidence ([#191](https://github.com/zackbart/connecta/issues/191)) |
86
86
  | Code mode (`execute_code`) | accepted | the primary read, discovery, and composition surface: smaller serialized definitions, far smaller results once composition and projection happen before the model sees them, and a cold-start model that read the interface without help ([exploration](./documentation/code-first-exploration.md), [#224](https://github.com/zackbart/connecta/issues/224)) |
87
- | Code-first as the default; the eval gate retired | accepted | owner decision, 2026-07-30: one operator, no deploy-time flip; [`eval/code-first-gate`](./eval/code-first-gate/README.md) survives as measurement, but nothing waits on its verdict ([#222](https://github.com/zackbart/connecta/issues/222), [#224](https://github.com/zackbart/connecta/issues/224)) |
87
+ | Code-first as the default; the eval gate retired | accepted | owner decision, 2026-07-30: one operator, no deploy-time flip; [`eval/code-first-gate`](https://github.com/zackbart/connecta/blob/main/eval/code-first-gate/README.md) survives as measurement, but nothing waits on its verdict ([#222](https://github.com/zackbart/connecta/issues/222), [#224](https://github.com/zackbart/connecta/issues/224)) |
88
88
  | Surface consolidation to seven tools | accepted | `list_connectors`, `describe_tools`, and `batch_call` fold into the program surface, deleting the routing choice between direct calls, batches, discovery, and execution; `call_tool` stays because a simple call is not cheaper through code ([#224](https://github.com/zackbart/connecta/issues/224)) |
89
89
  | Classic (executor-free) surface | removed | supersedes its provisional retention under [#224](https://github.com/zackbart/connecta/issues/224) — an executor is mandatory, and a deployment without one refuses to boot rather than serving a fallback shape ([#273](https://github.com/zackbart/connecta/issues/273)) |
90
90
  | Connector shortcut namespaces in programs | accepted | sugar over canonical addressing, kept but frozen — every expansion invents a collision class `<connectorId>.<toolName>` already solved ([#223](https://github.com/zackbart/connecta/issues/223)) |
@@ -60,9 +60,15 @@ things, because two of them are not part of connecta and never install with it:
60
60
  npm install @zackbart/connecta @cloudflare/codemode @clerk/backend
61
61
  ```
62
62
 
63
- `@cloudflare/codemode` is the executor behind `execute_code`, and
64
- `@clerk/backend` is the optional peer behind `@zackbart/connecta/auth/clerk` —
65
- which `src/index.ts` imports at the top level, so wrangler must resolve it at
63
+ Both are optional peers of `@zackbart/connecta` declared in its manifest,
64
+ never installed with it, and each carrying the range this release supports.
65
+ `@cloudflare/codemode` is the executor behind `execute_code`, published as
66
+ `^0.4.4 || ^0.5.0`: install a version inside that and npm stays quiet, install
67
+ one outside and npm says so at install time instead of leaving a Worker to
68
+ discover the skew in production ([#376](https://github.com/zackbart/connecta/issues/376)).
69
+
70
+ `@clerk/backend` is the peer behind `@zackbart/connecta/auth/clerk`, which
71
+ `src/index.ts` imports at the top level, so wrangler must resolve it at
66
72
  build time. Miss it and the build stops at
67
73
  `Could not resolve "@clerk/backend"`, which is a missing peer rather than a
68
74
  broken example. Drop `clerkAuth` from `auth` if this deployment has no operator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zackbart/connecta",
3
- "version": "0.16.0",
3
+ "version": "0.16.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.",
@@ -46,6 +46,7 @@
46
46
  "types": "./dist/index.d.ts",
47
47
  "import": "./dist/index.js"
48
48
  },
49
+ "./package.json": "./package.json",
49
50
  "./node": {
50
51
  "types": "./dist/node.d.ts",
51
52
  "import": "./dist/node.js"
@@ -115,19 +116,23 @@
115
116
  },
116
117
  "peerDependencies": {
117
118
  "@clerk/backend": "^3.12.0",
119
+ "@cloudflare/codemode": "^0.4.4 || ^0.5.0",
118
120
  "quickjs-emscripten": "^0.32.0"
119
121
  },
120
122
  "peerDependenciesMeta": {
121
123
  "@clerk/backend": {
122
124
  "optional": true
123
125
  },
126
+ "@cloudflare/codemode": {
127
+ "optional": true
128
+ },
124
129
  "quickjs-emscripten": {
125
130
  "optional": true
126
131
  }
127
132
  },
128
133
  "devDependencies": {
129
134
  "@clerk/backend": "^3.12.0",
130
- "@cloudflare/codemode": "^0.4.4",
135
+ "@cloudflare/codemode": "^0.5.0",
131
136
  "@cloudflare/vitest-pool-workers": "^0.18.8",
132
137
  "@cloudflare/workers-types": "^4.20250101.0 || ^5.0.0",
133
138
  "@playwright/test": "^1.62.0",
@@ -23,6 +23,11 @@ This repository is deployment configuration, not a copy of Connecta itself.
23
23
  - `Dockerfile` and `docker-compose.yml` containerize *this* source; they are
24
24
  the same deployment, not a second one. Configuration belongs in `.env` and
25
25
  `src/index.ts`, never in a divergent container entrypoint.
26
+ - Moving this deployment to a newer Connecta is its own procedure, and it is
27
+ not a re-`init` — `connecta init` refuses to merge into an existing path on
28
+ purpose. Follow
29
+ [the upgrade guide](https://github.com/zackbart/connecta/blob/main/documentation/upgrading.md),
30
+ which also ships at `node_modules/@zackbart/connecta/documentation/upgrading.md`.
26
31
 
27
32
  Do not add alternate entrypoints, policy layers, generated connector catalogs,
28
33
  or runtime connector registration. Keep the deployment small enough to review
@@ -12,7 +12,7 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@zackbart/connecta": "0.16.0",
15
+ "@zackbart/connecta": "0.16.1",
16
16
  "quickjs-emscripten": "0.32.0"
17
17
  },
18
18
  "devDependencies": {