@zackbart/connecta 0.37.1 → 0.38.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.
Files changed (168) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +2 -2
  3. package/bin/connecta.mjs +1 -39
  4. package/bin/version.mjs +1 -1
  5. package/dist/access-tokens.js +2 -4
  6. package/dist/agent-identity.js +1 -1
  7. package/dist/auth/clerk-sdk/generated.js +2 -1
  8. package/dist/auth/downstream-oauth.js +19 -153
  9. package/dist/auth/downstream-revocation.js +1 -1
  10. package/dist/auth/oauth-grant.js +11 -0
  11. package/dist/auth/oauth-token-response.js +1 -1
  12. package/dist/auth/vercel-agent.js +2 -1
  13. package/dist/auth-elicitation.js +2 -2
  14. package/dist/branding.d.ts +1 -15
  15. package/dist/branding.js +2 -2
  16. package/dist/bytes.js +42 -0
  17. package/dist/call-admission-context.js +2 -5
  18. package/dist/call-recovery.js +0 -3
  19. package/dist/catalog-fingerprint.js +2 -18
  20. package/dist/catalog-service.js +1 -1
  21. package/dist/config-defaults.d.ts +1 -0
  22. package/dist/config-defaults.js +1 -0
  23. package/dist/config-schema.d.ts +1 -1
  24. package/dist/config-schema.js +6 -2
  25. package/dist/config.d.ts +41 -14
  26. package/dist/config.js +21 -71
  27. package/dist/connectors/api-connector.js +4 -3
  28. package/dist/connectors/guarded-fetch.d.ts +0 -6
  29. package/dist/connectors/guarded-fetch.js +1 -11
  30. package/dist/connectors/remote-mcp.js +10 -43
  31. package/dist/connectors/resource-uri.js +0 -4
  32. package/dist/d1.d.ts +0 -89
  33. package/dist/d1.js +0 -34
  34. package/dist/downstream-input.js +2 -2
  35. package/dist/execute.js +22 -13
  36. package/dist/executor-result.js +2 -1
  37. package/dist/executors/quickjs-runtime.js +2 -25
  38. package/dist/executors/quickjs.js +1 -1
  39. package/dist/guest-runtime.js +5 -3
  40. package/dist/guest-types.d.ts +5 -5
  41. package/dist/http/client.js +1 -1
  42. package/dist/http/errors.js +2 -2
  43. package/dist/http/json-schema.js +1 -1
  44. package/dist/http/node-transport.js +0 -1
  45. package/dist/http/oauth.js +1 -1
  46. package/dist/http/paging.js +6 -9
  47. package/dist/http/provider.js +1 -1
  48. package/dist/http/safety.js +1 -1
  49. package/dist/http/services.js +1 -8
  50. package/dist/http/tools.js +1 -7
  51. package/dist/http/vendor.js +7 -7
  52. package/dist/identity.js +2 -6
  53. package/dist/invocation-auth.js +2 -1
  54. package/dist/meta-tools.js +27 -27
  55. package/dist/native-tools.js +2 -1
  56. package/dist/oauth-handoff.js +2 -2
  57. package/dist/operation-vocabulary.js +1 -1
  58. package/dist/operator-record.js +1 -49
  59. package/dist/operator-ui/contract.d.ts +2 -2
  60. package/dist/operator-ui/generated.js +3 -3
  61. package/dist/program-writes.js +3 -8
  62. package/dist/provider-call.js +0 -7
  63. package/dist/provider.d.ts +1 -1
  64. package/dist/providers/_shared/google/kit.js +1 -6
  65. package/dist/providers/_shared/google/service-account.js +1 -3
  66. package/dist/providers/_shared/google/workspace.d.ts +1 -1
  67. package/dist/providers/_shared/guide.js +3 -0
  68. package/dist/providers/_shared/json.js +12 -0
  69. package/dist/providers/_shared/rest/compact-index.js +1 -1
  70. package/dist/providers/_shared/rest/kit.js +1 -3
  71. package/dist/providers/_shared/rest/operation-index.js +1 -3
  72. package/dist/providers/_shared/rest/value-safety.js +26 -28
  73. package/dist/providers/breeze/api.js +2 -7
  74. package/dist/providers/breeze/index.js +4 -2
  75. package/dist/providers/breeze/tools.js +3 -4
  76. package/dist/providers/ccb/api.js +1 -6
  77. package/dist/providers/ccb/index.js +2 -1
  78. package/dist/providers/ccb/tools.js +1 -6
  79. package/dist/providers/cloudflare/api.js +2 -2
  80. package/dist/providers/cloudflare/index.js +2 -1
  81. package/dist/providers/cloudflare/safety.js +3 -3
  82. package/dist/providers/docs/tools.js +2 -10
  83. package/dist/providers/drive/tools.js +12 -25
  84. package/dist/providers/forms/tools.js +1 -9
  85. package/dist/providers/gmail/tools.js +5 -21
  86. package/dist/providers/overflow/api.js +1 -3
  87. package/dist/providers/overflow/index.js +2 -1
  88. package/dist/providers/overflow/tools.js +3 -7
  89. package/dist/providers/planning-center/api.js +2 -1
  90. package/dist/providers/planning-center/lib/constants.d.ts +1 -1
  91. package/dist/providers/planning-center/lib/json-api.js +1 -9
  92. package/dist/providers/planning-center/tools.js +2 -1
  93. package/dist/providers/sheets/tools.js +1 -9
  94. package/dist/providers/slides/tools.js +4 -13
  95. package/dist/providers/stripe/index.js +2 -1
  96. package/dist/providers/stripe/safety.js +2 -2
  97. package/dist/providers/tithely/api.js +2 -7
  98. package/dist/providers/tithely/index.js +3 -2
  99. package/dist/providers/tithely/tools.js +7 -5
  100. package/dist/providers/vercel/api.js +1 -6
  101. package/dist/providers/vercel/lib/pin.js +1 -1
  102. package/dist/providers/vercel/safety.js +1 -1
  103. package/dist/providers/vercel/tools.js +2 -1
  104. package/dist/redaction-marker.js +2 -2
  105. package/dist/registry.d.ts +1 -1
  106. package/dist/registry.js +5 -7
  107. package/dist/request-principal.js +1 -1
  108. package/dist/request-state.js +2 -2
  109. package/dist/routes/access-tokens.js +1 -1
  110. package/dist/routes/activity-disclosure.js +1 -1
  111. package/dist/routes/connect.js +2 -2
  112. package/dist/routes/credentials.js +1 -1
  113. package/dist/routes/mcp.js +4 -3
  114. package/dist/routes/oauth-management.js +1 -1
  115. package/dist/routes/operator.js +4 -3
  116. package/dist/routes/shared.d.ts +8 -8
  117. package/dist/routes/shared.js +9 -9
  118. package/dist/routes/ui-config.js +1 -1
  119. package/dist/routes/ui.js +1 -1
  120. package/dist/runtime/call-admission.js +1 -1
  121. package/dist/runtime/call.js +1 -1
  122. package/dist/runtime/settlement.js +1 -1
  123. package/dist/runtime/shared-read.js +2 -15
  124. package/dist/sent-secrets.d.ts +1 -2
  125. package/dist/sent-secrets.js +3 -8
  126. package/dist/server.js +4 -4
  127. package/dist/skills.js +8 -35
  128. package/dist/sqlite.d.ts +0 -19
  129. package/dist/sqlite.js +2 -83
  130. package/dist/storage/keys.js +16 -125
  131. package/dist/storage/sql-native.js +0 -101
  132. package/dist/storage/sql.d.ts +1 -24
  133. package/dist/storage/sql.js +1 -12
  134. package/dist/tool-error.js +4 -0
  135. package/dist/url-safety.js +0 -4
  136. package/dist/usage-guide.js +2 -2
  137. package/dist/version.d.ts +1 -1
  138. package/dist/version.js +1 -1
  139. package/dist/worker.js +1 -1
  140. package/documentation/README.md +6 -42
  141. package/documentation/architecture.md +86 -496
  142. package/documentation/auth.md +12 -25
  143. package/documentation/code-mode.md +90 -66
  144. package/documentation/deploying.md +19 -40
  145. package/documentation/integrating.md +4 -19
  146. package/documentation/meta-tools.md +6 -6
  147. package/documentation/migration-0.33.md +5 -5
  148. package/documentation/migration-0.34.md +2 -4
  149. package/documentation/migration-retired-layouts.md +74 -0
  150. package/documentation/operator-tests.md +19 -119
  151. package/documentation/operator-ui.md +3 -4
  152. package/documentation/provider-auth-migration.md +4 -10
  153. package/documentation/provider-migration-0.29.md +4 -15
  154. package/examples/worker/AGENTS.md +4 -6
  155. package/examples/worker/README.md +20 -115
  156. package/guides/connecting-agents.md +7 -30
  157. package/guides/how-it-works.md +2 -2
  158. package/guides/safety-and-trust.md +4 -1
  159. package/package.json +19 -19
  160. package/templates/node/README.md +9 -26
  161. package/templates/node/package.json +1 -1
  162. package/dist/auth/oauth-v2-migration.js +0 -135
  163. package/dist/provider-call-facts.d.ts +0 -115
  164. package/dist/provider-call.d.ts +0 -112
  165. package/dist/storage/d1-copy.js +0 -255
  166. package/dist/storage/sql-schema.d.ts +0 -6
  167. package/examples/worker/kv-to-d1.wrangler.jsonc +0 -26
  168. package/examples/worker/scripts/copy-kv-to-d1.mjs +0 -162
@@ -1286,16 +1286,13 @@ connector](#downstream-oauth-on-api) stores no client. A vault without the
1286
1286
  optional `seal`/`open` members keeps the body plaintext with a startup
1287
1287
  warning; no vault, plaintext as always.
1288
1288
 
1289
- **From 0.28 (layout 2).** The first read of an owner's grant that finds no
1290
- record reads layout 2 once: the active generation's issuer-stamped client,
1291
- tokens, and discovery (sealed values open under their old keys), kept only
1292
- when every credential carries a stamp and the stamps agree with each other
1293
- and with discovery. It writes them as the grant record by compare-and-set,
1294
- then deletes every layout-2 key, cleanup lineage included. A disconnected
1295
- connector stays disconnected; a cancelled request migrates nothing. Grants
1296
- from before issuer binding (v0.8.1 and earlier) and pending consents are not
1297
- carried, so those connectors need Connect again. Rolling back past this
1298
- release finds no layout-2 grant and needs consent.
1289
+ **Pre-layout-3 grants.** The layout-2 migration and historical-key cleanup
1290
+ are removed. An owner with only old keys is treated as unauthorized; a warning
1291
+ names the unsupported layout and the need to Connect again or migrate on
1292
+ 0.37.1. The check inspects key names only, never old credential values, and
1293
+ leaves them untouched. Existing layout-3 records remain readable even with an
1294
+ obsolete cleanup marker. Complete every owner's grant migration on 0.37.1
1295
+ before upgrading, or reconnect afterward; follow [Retired layout migrations](./migration-retired-layouts.md).
1299
1296
 
1300
1297
  ## Starting, restarting, and disconnecting
1301
1298
 
@@ -1397,12 +1394,8 @@ exchange. Both built-in `finishAuth` adapters require `callbackParams` with a
1397
1394
  nonempty `state`, even with PKCE disabled or after a separate `verifyState` call.
1398
1395
  A missing state is refused before discovery, registration, or token dispatch.
1399
1396
 
1400
- Layout-2 migration commits `cleanupPending` in the new grant before deleting
1401
- historical keys. Every later grant read retries deletion, then clears the
1402
- marker by CAS only when deletion succeeds. Restart preserves this obligation.
1403
- Disconnect commits a tombstone with the marker and always removes historical
1404
- keys for the connector and owner, including when a modern grant already exists.
1405
- A crash during cleanup cannot restore the disconnected grant.
1397
+ Disconnect commits a layout-3 tombstone. Restart and Disconnect never read or
1398
+ restore historical layout-2 keys.
1406
1399
 
1407
1400
  Disconnect first removes the grant and fences its epoch with CAS. When that
1408
1401
  removed grant's saved authorization-server metadata advertises a revocation
@@ -1434,7 +1427,7 @@ lease's `claimed` to `dispatched` CAS and a separate fingerprint CAS at
1434
1427
  `oauth:refresh-spent:<sha256(refresh_token)>`. The latter must succeed before
1435
1428
  any HTTP request leaves. Connector and owner storage namespaces partition both
1436
1429
  records. Spent records have **no TTL**, contain no token, and are never deleted
1437
- by completion, failure, migration cleanup, Restart, Disconnect, or epoch sweeps.
1430
+ by completion, failure, Restart, Disconnect, or epoch sweeps.
1438
1431
  Copy these durable records during storage migration.
1439
1432
 
1440
1433
  Each fingerprint record names its dispatch epoch, holder, and resolution state:
@@ -1981,8 +1974,8 @@ anything, so SDK hook order cannot mix servers or cross a reset.
1981
1974
 
1982
1975
  Management follows `maintainers` and pool `members`; no resolver configures it. The former `identity.credentialAdministration`,
1983
1976
  `identity.personalConnection`, `identity.accessTokenManagement`, and
1984
- `identity.activityAccess` each fail construction naming their replacement,
1985
- and so does the `identity` section itself, even empty.
1977
+ `identity.activityAccess` fail construction as unknown options under `identity`,
1978
+ including an empty `identity` section.
1986
1979
 
1987
1980
  | Action | Who may |
1988
1981
  | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -3127,10 +3120,6 @@ The encoding lattice is exactly this, and anything outside it is out of scope:
3127
3120
  lattice, so redaction is not a defense against a downstream that reshapes a
3128
3121
  value on purpose.
3129
3122
 
3130
- `test/sent-secret-output-boundary.test.ts` holds the evidence, including its
3131
- `review round 3`, `review round 4` and `review round 5` blocks for these limits;
3132
- `test/writeonly-wire-redaction.node.test.ts` runs the QuickJS guest cases.
3133
-
3134
3123
  ### Source and tests
3135
3124
 
3136
3125
  [Decision 0007](https://github.com/zackbart/connecta/blob/main/decisions/0007-agent-pool-layout.md)
@@ -3153,8 +3142,6 @@ Downstream OAuth implementation and evidence are in
3153
3142
  [downstream-oauth.ts](https://github.com/zackbart/connecta/blob/main/src/auth/downstream-oauth.ts),
3154
3143
  [static-oauth.ts](https://github.com/zackbart/connecta/blob/main/src/auth/static-oauth.ts),
3155
3144
  [OAuth connect tests](https://github.com/zackbart/connecta/blob/main/test/oauth-connect.test.ts),
3156
- [callback fencing](https://github.com/zackbart/connecta/blob/main/test/oauth-callback-fencing.test.ts),
3157
- [refresh leases](https://github.com/zackbart/connecta/blob/main/test/oauth-refresh-lease.test.ts),
3158
3145
  and [API OAuth tests](https://github.com/zackbart/connecta/blob/main/test/api-oauth.test.ts).
3159
3146
  Use the test pointers within each section for narrower failure cases.
3160
3147
 
@@ -113,7 +113,8 @@ Connecta passes exactly one provider, named `connecta`. An executor must:
113
113
 
114
114
  1. **Expose each provider as a guest global** whose properties are its `fns`,
115
115
  called with the program's arguments and awaited. Connecta supplies `search`,
116
- `describe`, `call`, `read`, `result`, `skill`, and `emit`.
116
+ `describe`, `call`, `read`, `result`, `skill`, and `emit`; the prelude also
117
+ binds the guest's `skills` alias to `skill`.
117
118
  2. **Evaluate `prelude` after the provider globals exist and before the
118
119
  program.** It is trusted host code that installs the immutable namespace
119
120
  and waits for emission acknowledgements. Capture runner intrinsics first;
@@ -202,7 +203,8 @@ belonged to shortcut dispatch and stay retired; nothing reuses those ids.
202
203
 
203
204
  ## The surface
204
205
 
205
- Seven functions: `search`, `describe`, `call`, `read`, `result`, `skill`, and `emit`.
206
+ Seven functions: `search`, `describe`, `call`, `read`, `result`, `skill`, and `emit`,
207
+ plus `skills`, an undeclared alias bound to the same host function as `skill`.
206
208
  All return awaitable values; emission also works without `await`. The namespace
207
209
  has no inherited members. Unknown properties are undefined, and calling them
208
210
  fails as a guest `TypeError`. The host also dispatches only own members of `fns`.
@@ -413,7 +415,11 @@ The `get_result` meta-tool is removed.
413
415
  top-level `skills`, within the admitted connector view. It reads the registry
414
416
  behind native `skills/get` and `resources/read`, including opted-in downstream
415
417
  skills. It returns
416
- `{ name, format: "text", text }`; an unknown name is `not_found`.
418
+ `{ name, format: "text", text }`; an unknown name is `not_found`. It also
419
+ accepts the top-level tool's `{ name }` object, and `connecta.skills` is an
420
+ undeclared alias of `connecta.skill` with the same host-call accounting, because
421
+ models copy the `skills` tool's shape into programs. Any other argument is
422
+ `invalid_args`, with a message naming `connecta.skill("usage")`.
417
423
 
418
424
  ### Parallel calls
419
425
 
@@ -673,11 +679,26 @@ fields. Program-authored projection saved bytes; host heuristics could drop
673
679
  deliberately returned fields. Helpers need [#222](https://github.com/zackbart/connecta/issues/222)
674
680
  evidence that programs fail to project.
675
681
 
676
- **R2.** The boundary is 24,000 serialized characters (~6k tokens), shared with
677
- emitted text. An oversized return is stashed as compact JSON through the same
682
+ **R2.** The boundary is `execute.maxResultChars` serialized characters, shared
683
+ with emitted text: 24,000 (~6k tokens) by default, configurable from 4,000 to
684
+ 1,000,000. Raise it when agents need large results whole and the model's
685
+ context can afford them, since every paging round trip costs a model step.
686
+ The response carries a return twice (text content and `structuredContent`),
687
+ and Connecta has no response-size limit of its own, so the client's limits
688
+ apply; `admission.requests.maxBodyBytes` bounds request bodies only. Claude Code,
689
+ for one, passes at most 50,000 characters of text and can reject a larger result
690
+ with no content (see [truncated direct-call results](./meta-tools.md#truncated-direct-call-results)),
691
+ so keep the cap below what every client of the deployment accepts. Redaction scans the whole envelope once, so its cost grows with the cap.
692
+ The cap does not change stash paging: pages still obey the stashed call's
693
+ `maxResultBytes` and the 32 KiB bridge ceiling.
694
+ An oversized return is stashed as compact JSON through the same
678
695
  result store as direct calls. The returned notice carries `truncated`, `resultId`,
679
696
  `totalBytes`, `hint`, `nextOffset: 0`, and an executable `nextAction` that pages
680
- with `connecta.result`. It also retains `totalChars` and a bounded `preview`.
697
+ with `connecta.result`. Its page size is `floor((maxResultChars - 1024) / 6)`
698
+ bytes, so a page fits the next program's return even when every byte escapes to
699
+ six characters (3,829 bytes by default), at most the stashed call's
700
+ `maxResultBytes` and the 32 KiB bridge ceiling; direct-call notices use the same
701
+ size. It also retains `totalChars` and a bounded `preview`.
681
702
  The recovery action and hint precede the preview, so clients that spill results
682
703
  after the first 2,000 characters retain the handle and the instruction.
683
704
  Small returns pass through unchanged; Connecta does not select fields.
@@ -790,8 +811,8 @@ a successful result, appended to `content` after the JSON envelope, which gains
790
811
  response (`R6`). `structuredContent` stays the envelope alone — emission is
791
812
  presentation, not a second data channel.
792
813
 
793
- **M3.** Text emission shares `R2`'s 24,000 serialized-character cap, less 512
794
- characters reserved for the envelope (23,488 for emitted text). Its
814
+ **M3.** Text emission shares `R2`'s `execute.maxResultChars` cap, less 512
815
+ characters reserved for the envelope (23,488 for emitted text by default). Its
795
816
  serialized block size reduces the return budget, and oversized text fails with
796
817
  `result_too_large`. Image/audio blocks use the separate transport budget and
797
818
  reach the model as real MCP media content, including when `emit` is not awaited.
@@ -881,7 +902,11 @@ operations when a pending storage response arrives. An in-process caller receive
881
902
 
882
903
  Programs and direct calls use the same invocation deadline and stages. A call's
883
904
  `timeoutMs` wins, then `calls.defaultTimeoutMs`, then `execute.hostCallTimeoutMs`
884
- (default 15,000). A guest may request a longer individual call, but the sandbox
905
+ (default 15,000). `connecta.result`, `connecta.skill` and `connecta.read` always
906
+ use `execute.hostCallTimeoutMs`. The `execute_code` description advertises the
907
+ `connecta.call` default as `<n>s/host call`, or, when `calls.defaultTimeoutMs`
908
+ differs, both deadlines, for example `25s/call (15s result/skill/read)`.
909
+ A guest may request a longer individual call, but the sandbox
885
910
  and request ceilings still bound the whole run. Timeout details are agent-facing;
886
911
  operator records retain only checked classifications and numeric facts.
887
912
  Result processing, including stash reservation, uses the same remaining call
@@ -913,17 +938,17 @@ deadline past the ceiling means raising the ceiling too.
913
938
  **L4.** Per-execution bounds that are contract, identical in both executors
914
939
  because connecta enforces them above the sandbox:
915
940
 
916
- | Bound | Value |
917
- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
918
- | Host calls per execution, shared by every guest call except `emit` | 20 by default, `execute.maxHostCalls` |
919
- | Writes per run on a writable endpoint, on top of the host calls they also spend (`W10`) | 10 by default, `execute.maxWrites` |
920
- | Deadline per host call | 15 s, `execute.hostCallTimeoutMs`; one deadline covers catalog resolution, admission, the connector call, and result processing |
921
- | Discovery page | ≤ 100 tools, ≤ 256,000 serialized bytes |
922
- | `describe` addresses | ≤ 100 |
923
- | `describe` nearby suggestions | ≤ 3 canonical addresses per failed entry |
924
- | Caller text echoed by `describe` recovery | ≤ 512 UTF-8 bytes per field, plus `…` |
925
- | Result | 24,000 serialized characters |
926
- | Logs presented to the model | 4,000 characters |
941
+ | Bound | Value |
942
+ | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
943
+ | Host calls per execution, shared by every guest call except `emit` | 20 by default, `execute.maxHostCalls` |
944
+ | Writes per run on a writable endpoint, on top of the host calls they also spend (`W10`) | 10 by default, `execute.maxWrites` |
945
+ | Deadline per host call | `connecta.call`: its `timeoutMs`, else `calls.defaultTimeoutMs`, else `execute.hostCallTimeoutMs` (15 s); `result`, `skill` and `read`: `execute.hostCallTimeoutMs`. One deadline covers catalog resolution, admission, the connector call, and result processing |
946
+ | Discovery page | ≤ 100 tools, ≤ 256,000 serialized bytes |
947
+ | `describe` addresses | ≤ 100 |
948
+ | `describe` nearby suggestions | ≤ 3 canonical addresses per failed entry |
949
+ | Caller text echoed by `describe` recovery | ≤ 512 UTF-8 bytes per field, plus `…` |
950
+ | Result | 24,000 serialized characters by default, `execute.maxResultChars` (4,000–1,000,000) |
951
+ | Logs presented to the model | 4,000 characters |
927
952
 
928
953
  For any tool whose output declares `page`, continue while `page.hasMore` is true.
929
954
  When approaching the program's host-call limit, return `page.nextCursor` before
@@ -1286,50 +1311,49 @@ Titles name clauses; executor-independent clauses run in both arms.
1286
1311
  `test/codemode-compat.test.ts` pins upstream shape compatibility, minified upstream
1287
1312
  rejection, and branded adapter acceptance across module copies.
1288
1313
 
1289
- | Clauses | Test |
1290
- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1291
- | `P1`, `P5` | both guest-contract executors (TypeScript syntax, trailing terminators, wrapper recovery), `test/program-source.test.ts` (which semicolons and wrappers are recovered), `test/quickjs-executor.node.test.ts` (`normalizeCode`) |
1292
- | `P2`, `X5` | `test/guest-api-contract.test.ts` (Dynamic globals plus loader-only filesystem, HTTP, environment, egress, DNS, and local `data:` boundaries), `test/guest-api-contract-quickjs.node.test.ts` (exact absent globals and blocked imports), `test/quickjs-child-stderr.node.test.ts` (a child-process environment holding only `TZ=UTC`), `test/deployment-shapes.node.test.ts` (loader-only Worker construction) |
1293
- | `P3`, `X9` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` |
1294
- | `P4` | `test/guest-api-contract.test.ts` (no cross-run leakage), `test/execute.test.ts` (one catalog load per connector per execution) |
1295
- | `A1`, `A2` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (canonical addressing), `test/server.test.ts` (bounded live connector inventory) |
1296
- | `S1`, `S1a`, `S2` | `test/guest-api-contract.test.ts` (flat page, connector guides, schema keys, unfiltered browse), `test/execute.test.ts` (guide pagination/partial/no-match behavior and `$ref`/`allOf`), `test/meta-tools-search.test.ts` (mixed complete/partial ranking, stable pagination, the two safety classes), `test/typescript-signatures.test.ts` (the TypeScript format over provider and pathological schemas, search/describe parity, observed labeling), `test/typescript-signatures-parse.node.test.ts` (every rendering parses) |
1297
- | `S3` | `test/guest-api-contract.test.ts` (typed uncaught bound), `test/execute.test.ts` (count limits, fan-out bound) |
1298
- | `S4` | both guest-contract executors (ordered mixed describe results with unknown-address, unknown-tool suggestion, and catalog-failure details), `test/meta-tools-search.test.ts` (top-level routing, no-suggestion, catalog-failure, and hostile-input bounds) |
1299
- | `S5`, `S6` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (`unwrapMcpResult`, fail-closed annotations, activity parity) |
1300
- | `S7` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (parallel calls and shared admission) |
1301
- | `S8`, `E1`, `X11` | both guest-contract executors (caught call, discovery, utility, removed-function, and forgery cases; typed promise rejections), `test/quickjs-executor.node.test.ts` (oversized messages, private transport, forged outcomes) |
1302
- | `S9` | `test/result-shapes.test.ts` (value exclusion, bounds, merging, LRU and time expiry, runtime isolation, read-only admission, declared precedence, definition invalidation, unwrapped MCP results, discovery provenance, copy isolation, failure isolation) |
1303
- | `S10` | `test/resource-read.test.ts` (qualified routing, whole-connector grants, personal credentials, redaction, admission, timeout, cancellation and downstream MCP reads), both guest-contract executors (successful resource reads and caught/uncaught typed failures) |
1304
- | `E2`, `E8` | `test/guest-api-contract.test.ts` (code → `retryable`, caught, parallel, and uncaught validation recovery, a conflict's bounded `current`), `test/meta-tools-call.test.ts` (direct, destructive, provider fallback), `test/validate.test.ts` (bounded payload-free findings), `test/errors.test.ts` |
1305
- | `E3`, `E4` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (`auth_required`, destructive reroute), `test/identity-write-journey.node.test.ts` (read-only refusals before validation or dispatch, actual QuickJS) |
1306
- | `E5` | `test/guest-api-contract.test.ts` (execution-failure channel, in-flight `cancelled`), `test/execute.test.ts` (admission), `test/executor-admission.test.ts`, `test/quickjs-executor.node.test.ts` (mid-run shutdown) |
1307
- | `E6`, `X8` | `test/guest-api-contract.test.ts` (unknown and inherited members, retained error identities), `test/quickjs-executor.node.test.ts` |
1308
- | `E7` | `test/guest-api-contract.test.ts` (refusals about a `503`-named connector), `test/errors.test.ts` |
1309
- | `R1`, `R2`, `R3`, `R4` | `test/guest-api-contract.test.ts` and `test/guest-api-contract-quickjs.node.test.ts` (small pass-through, shared return paging and unavailable fallback, no repeated writes, live authority), `test/program-result-cases.ts` (reconstruction, redaction, notice survives a 2,000-character spill) |
1310
- | `M6`, `M9` | verdicts; `R2`'s guard, `M1`'s strict typing, and `M2`'s collect-then-deliver are their enforcement |
1311
- | `R5` | `test/guest-api-contract.test.ts`, `test/quickjs-log-limits.node.test.ts` |
1312
- | `R6`–`R8` | `test/guest-api-contract.test.ts` (normal result keys), `test/execute.test.ts` (opt-in operation aggregates, failure paths, payload exclusion) |
1313
- | `Y1`, `Y2`, `Y3` | `test/guest-api-contract.test.ts` (one attempt per call, retryable flags by code) |
1314
- | `Y4` | `test/meta-tools-call.test.ts`, `test/call-admission.test.ts` (one attempt, retry hints, caller reissue) |
1315
- | `L1`, `L2` | `test/guest-api-contract.test.ts` (in-flight call fails `cancelled`), `test/execute.test.ts` (cancels outstanding host calls, discovery included, and refuses discovery after the run; a cancelled wedged executor, or one whose `acquire()` ignores the signal, returns promptly and releases its lease) |
1316
- | `L3`, `X1` | `test/guest-api-contract.test.ts` (short-deadline executors), `test/execute.test.ts` (the watchdog ends a never-settling executor, frees the default pool, spares a slow run, and falls back from an unusable value) |
1317
- | `L4`, `L8` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (shared discovery/call budgets and terminal catch-and-continue loops and queued-write cancellation on both executors), `test/worker-budget-response.node.test.ts` (native handle disposal and admission recovery across completed HTTP responses) |
1318
- | `L5`, `L7`, `X2` | `test/quickjs-executor.node.test.ts` (CPU, heap), `test/execute.test.ts` and `test/executor-admission.test.ts` (bounded admission and queue), `test/executor-requests.test.ts` (queued handoffs and refusal shape across separate workerd requests), `test/request-context.node.test.ts` (queued and QuickJS host-call request context) |
1319
- | `L6`, `X10` | `test/guest-api-contract-quickjs.node.test.ts` and `test/guest-api-contract.test.ts` (whole oversized reads and one-write pageable handles), `test/sqlite-storage.node.test.ts` and `test/kv-to-d1.test.ts` (SQL stash and native D1 fault probes), `test/quickjs-executor.node.test.ts` (bridge and IPC bounds for arguments and result; the address in the over-bound message), `test/quickjs-child-stderr.node.test.ts` (outer reply serialization failure settles the call) |
1320
- | `V1`–`V4` | `test/guest-api-contract.test.ts` (dispatched calls, every refusal class including an address no connector owns, the friction each derives, no event for the execution itself), `test/activity.test.ts` (the shared code → friction table, the identity clamp, the one-attempt floor), `test/browser/operator-ui.spec.ts` (identity changes), `test/sql-storage-contract.ts`, run by `test/sqlite-storage.node.test.ts` (historical activity rows still round-trip) |
1321
- | `V5`, `W9` | `test/program-writes.test.ts` (unawaited program drain, failed-program accounting), `test/identity-write-journey.node.test.ts` (committed ambiguity, reconciliation and physical writes), `test/invocation-pipeline.test.ts` (the gate after validation, an unrecorded refusal) |
1322
- | `W10`, `W12` | `test/identity-write-journey.node.test.ts` (real HTTP/MCP and QuickJS: write budget, read-only discovery and refusal, named guide, pool inheritance/reopening and connector policy), `test/program-writes.test.ts` (construction refusals and classification drift), `test/operator-ui-model.test.ts`, `test/browser/operator-ui.spec.ts` (the badge) |
1323
- | `M1` | `test/guest-api-contract.test.ts` (invalid emits throw catchably, accept nothing), `test/execute-emit.test.ts` (rejected shapes, bounded native snapshots, paging before metadata traversal, and cyclic presentation refusal) |
1324
- | `M2`, `M3` | `test/guest-api-contract.test.ts` (delivery order, truncated return plus delivered blocks), `test/execute-emit.test.ts` (envelope, `structuredContent`, byte-for-byte no-emit path) |
1325
- | `M4` | `test/guest-api-contract.test.ts` (discard is visible), `test/execute-emit.test.ts` (structured and plain paths), `test/quickjs-executor.node.test.ts` (mid-run shutdown) |
1326
- | `M5`, `M7` | `test/execute-emit.test.ts` (both budgets fail the crossing block; host-call budget untouched) |
1327
- | `M8` | two arms passing one case table, `test/codemode-compat.test.ts` |
1328
- | `M10` | `test/execute-emit.test.ts` (aggregate present, numbers only, absent when nothing emitted) |
1329
- | `X4` | `test/guest-api-contract.test.ts` (string logs only), `test/quickjs-executor.node.test.ts` (logs before cancellation), `test/quickjs-child-stderr.node.test.ts` (crash, shutdown, deadline, IPC failure, bounded parent retention), `test/quickjs-log-limits.node.test.ts` (unchanged successful logs) |
1330
- | `X3`, `X6` | `test/quickjs-executor.node.test.ts` (cancels a running child, never-settling await), `test/execute.test.ts` (a wedged executor stops being awaited) |
1331
- | `X7` | `P3`'s tests; the Workers superset is deliberately unused |
1332
-
1333
- The surface itself is checked by `test/server.test.ts` (the exact six-tool list),
1334
- `test/code-first-surface.test.ts` (construction, executor, removed tools, copy, and size),
1314
+ | Clauses | Test |
1315
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1316
+ | `P1`, `P5` | both guest-contract executors (TypeScript syntax, trailing terminators, wrapper recovery), `test/program-source.test.ts` (which semicolons and wrappers are recovered), `test/quickjs-executor.node.test.ts` (`normalizeCode`) |
1317
+ | `P2`, `X5` | `test/guest-api-contract.test.ts` (Dynamic globals plus loader-only filesystem, HTTP, environment, egress, DNS, and local `data:` boundaries), `test/guest-api-contract-quickjs.node.test.ts` (exact absent globals and blocked imports), `test/deployment-shapes.node.test.ts` (loader-only Worker construction) |
1318
+ | `P3`, `X9` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` |
1319
+ | `P4` | `test/guest-api-contract.test.ts` (no cross-run leakage), `test/execute.test.ts` (one catalog load per connector per execution) |
1320
+ | `A1`, `A2` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (canonical addressing), `test/server.test.ts` (bounded live connector inventory) |
1321
+ | `S1`, `S1a`, `S2` | `test/guest-api-contract.test.ts` (flat page, connector guides, schema keys, unfiltered browse), `test/execute.test.ts` (guide pagination/partial/no-match behavior and `$ref`/`allOf`), `test/meta-tools-search.test.ts` (mixed complete/partial ranking, stable pagination, the two safety classes), `test/typescript-signatures.test.ts` (the TypeScript format over provider and pathological schemas, search/describe parity, observed labeling) |
1322
+ | `S3` | `test/guest-api-contract.test.ts` (typed uncaught bound), `test/execute.test.ts` (count limits, fan-out bound) |
1323
+ | `S4` | both guest-contract executors (ordered mixed describe results with unknown-address, unknown-tool suggestion, and catalog-failure details), `test/meta-tools-search.test.ts` (top-level routing, no-suggestion, catalog-failure, and hostile-input bounds) |
1324
+ | `S5`, `S6` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (`unwrapMcpResult`, fail-closed annotations, activity parity) |
1325
+ | `S7` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (parallel calls and shared admission) |
1326
+ | `S8`, `E1`, `X11` | both guest-contract executors (caught call, discovery, utility, removed-function, and forgery cases; typed promise rejections), `test/quickjs-executor.node.test.ts` (oversized messages, private transport, forged outcomes) |
1327
+ | `S9` | `test/result-shapes.test.ts` (value exclusion, bounds, merging, LRU and time expiry, runtime isolation, read-only admission, declared precedence, definition invalidation, unwrapped MCP results, discovery provenance, copy isolation, failure isolation) |
1328
+ | `S10` | `test/resource-read.test.ts` (qualified routing, whole-connector grants, personal credentials, redaction, admission, timeout, cancellation and downstream MCP reads), both guest-contract executors (successful resource reads and caught/uncaught typed failures) |
1329
+ | `E2`, `E8` | `test/guest-api-contract.test.ts` (code → `retryable`, caught, parallel, and uncaught validation recovery, a conflict's bounded `current`), `test/meta-tools-call.test.ts` (direct, destructive, provider fallback), `test/validate.test.ts` (bounded payload-free findings), `test/errors.test.ts` |
1330
+ | `E3`, `E4` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (`auth_required`, destructive reroute), `test/identity-write-journey.node.test.ts` (read-only refusals before validation or dispatch, actual QuickJS) |
1331
+ | `E5` | `test/guest-api-contract.test.ts` (execution-failure channel, in-flight `cancelled`), `test/execute.test.ts` (admission), `test/executor-admission.test.ts`, `test/quickjs-executor.node.test.ts` (mid-run shutdown) |
1332
+ | `E6`, `X8` | `test/guest-api-contract.test.ts` (unknown and inherited members, retained error identities), `test/quickjs-executor.node.test.ts` |
1333
+ | `E7` | `test/guest-api-contract.test.ts` (refusals about a `503`-named connector), `test/errors.test.ts` |
1334
+ | `R1`, `R2`, `R3`, `R4` | `test/guest-api-contract.test.ts` and `test/guest-api-contract-quickjs.node.test.ts` (small pass-through, shared return paging and unavailable fallback, no repeated writes, live authority), `test/program-result-cases.ts` (reconstruction, redaction, notice survives a 2,000-character spill) |
1335
+ | `M6`, `M9` | verdicts; `R2`'s guard, `M1`'s strict typing, and `M2`'s collect-then-deliver are their enforcement |
1336
+ | `R5` | `test/guest-api-contract.test.ts` |
1337
+ | `R6`–`R8` | `test/guest-api-contract.test.ts` (normal result keys), `test/execute.test.ts` (opt-in operation aggregates, failure paths, payload exclusion) |
1338
+ | `Y1`, `Y2`, `Y3` | `test/guest-api-contract.test.ts` (one attempt per call, retryable flags by code) |
1339
+ | `Y4` | `test/meta-tools-call.test.ts`, `test/call-admission.test.ts` (one attempt, retry hints, caller reissue) |
1340
+ | `L1`, `L2` | `test/guest-api-contract.test.ts` (in-flight call fails `cancelled`), `test/execute.test.ts` (cancels outstanding host calls, discovery included, and refuses discovery after the run; a cancelled wedged executor, or one whose `acquire()` ignores the signal, returns promptly and releases its lease) |
1341
+ | `L3`, `X1` | `test/guest-api-contract.test.ts` (short-deadline executors), `test/execute.test.ts` (the watchdog ends a never-settling executor, frees the default pool, spares a slow run, and falls back from an unusable value) |
1342
+ | `L4`, `L8` | `test/guest-api-contract.test.ts`, `test/execute.test.ts` (shared discovery/call budgets and terminal catch-and-continue loops and queued-write cancellation on both executors) |
1343
+ | `L5`, `L7`, `X2` | `test/quickjs-executor.node.test.ts` (CPU, heap), `test/execute.test.ts` and `test/executor-admission.test.ts` (bounded admission and queue), `test/executor-requests.test.ts` (queued handoffs and refusal shape across separate workerd requests), `test/request-context.node.test.ts` (queued and QuickJS host-call request context) |
1344
+ | `L6`, `X10` | `test/guest-api-contract-quickjs.node.test.ts` and `test/guest-api-contract.test.ts` (whole oversized reads and one-write pageable handles), `test/sqlite-storage.node.test.ts` and `test/storage-sql-d1.test.ts` (SQL stash and native D1 fault probes), `test/quickjs-executor.node.test.ts` (bridge and IPC bounds for arguments and result; the address in the over-bound message) |
1345
+ | `V1`–`V4` | `test/guest-api-contract.test.ts` (dispatched calls, every refusal class including an address no connector owns, the friction each derives, no event for the execution itself), `test/activity.test.ts` (the shared code → friction table, the identity clamp, the one-attempt floor), `test/browser/operator-ui.spec.ts` (identity changes), `test/sql-storage-contract.ts`, run by `test/sqlite-storage.node.test.ts` (historical activity rows still round-trip) |
1346
+ | `V5`, `W9` | `test/program-writes.test.ts` (unawaited program drain, failed-program accounting), `test/identity-write-journey.node.test.ts` (committed ambiguity, reconciliation and physical writes), `test/invocation-pipeline.test.ts` (the gate after validation, an unrecorded refusal) |
1347
+ | `W10`, `W12` | `test/identity-write-journey.node.test.ts` (real HTTP/MCP and QuickJS: write budget, read-only discovery and refusal, named guide, pool inheritance/reopening and connector policy), `test/program-writes.test.ts` (construction refusals and classification drift), `test/browser/operator-ui.spec.ts` (the badge) |
1348
+ | `M1` | `test/guest-api-contract.test.ts` (invalid emits throw catchably, accept nothing), `test/execute-emit.test.ts` (rejected shapes, bounded native snapshots, paging before metadata traversal, and cyclic presentation refusal) |
1349
+ | `M2`, `M3` | `test/guest-api-contract.test.ts` (delivery order, truncated return plus delivered blocks), `test/execute-emit.test.ts` (envelope, `structuredContent`, byte-for-byte no-emit path) |
1350
+ | `M4` | `test/guest-api-contract.test.ts` (discard is visible), `test/execute-emit.test.ts` (structured and plain paths), `test/quickjs-executor.node.test.ts` (mid-run shutdown) |
1351
+ | `M5`, `M7` | `test/execute-emit.test.ts` (both budgets fail the crossing block; host-call budget untouched) |
1352
+ | `M8` | two arms passing one case table, `test/codemode-compat.test.ts` |
1353
+ | `M10` | `test/execute-emit.test.ts` (aggregate present, numbers only, absent when nothing emitted) |
1354
+ | `X4` | `test/guest-api-contract.test.ts` (string logs only), `test/quickjs-executor.node.test.ts` (logs before cancellation) |
1355
+ | `X3`, `X6` | `test/quickjs-executor.node.test.ts` (cancels a running child, never-settling await), `test/execute.test.ts` (a wedged executor stops being awaited) |
1356
+ | `X7` | `P3`'s tests; the Workers superset is deliberately unused |
1357
+
1358
+ The surface itself is checked by `test/server.test.ts` (the exact six-tool list)
1335
1359
  and `test/program-writes.test.ts` (deployment policy and classification construction refusals).
@@ -64,12 +64,9 @@ platform, proxy or adapter cap still wins. See
64
64
  A Node host serving `connecta.fetch` without `listen()` has no owned sender:
65
65
  every maintained-provider write, every reviewed POST read and every remote MCP
66
66
  write is refused before sending. Downstream OAuth credential POSTs also require
67
- that sender; discovery GETs retain native fetch. Resource writes worked in 0.34.1;
68
- credential POSTs used native fetch through 0.34.1. For example, an `assistant` using
67
+ that sender. For example, an `assistant` using
69
68
  `vercel_api_read` to POST `/v1/registrar/domains/availability` needs that
70
- transport even on a read-only endpoint. A Node deployment using only the root
71
- entry refuses those requests before sending them. Workers use their native
72
- fetch transport.
69
+ transport even on a read-only endpoint. Workers use their native fetch transport.
73
70
 
74
71
  By default, Node's `listen()` handles SIGTERM and SIGINT: it stops accepting
75
72
  connections, closes idle connections and accepted sockets without a first HTTP
@@ -81,9 +78,8 @@ keepalive before shutdown is unchanged. Its shutdown deadline defaults to ten se
81
78
  (`shutdownTimeoutMs`). For example, retain the template's `listen(connecta, port)` when running it under
82
79
  Docker Compose so `docker compose stop` uses this cleanup.
83
80
 
84
- The owned Node sender connects directly by default. To send maintained-provider
85
- requests (including reads), remote MCP writes and OAuth credential POSTs through an HTTP(S) CONNECT
86
- proxy, set `proxy` explicitly on `listen`:
81
+ The owned Node sender connects directly by default. For HTTP(S) CONNECT proxy
82
+ egress, set `proxy` explicitly on `listen`:
87
83
 
88
84
  ```ts
89
85
  listen(connecta, { port: 3000, proxy: "http://proxy.example.com:8080" });
@@ -108,9 +104,7 @@ replayed by the sender, including after HTTP 421, a reset or a 503. An uncertain
108
104
  refresh requires authorization again; Connecta blocks the spent refresh
109
105
  fingerprint rather than redeeming it twice. Once a refresh claim has been
110
106
  submitted, that protection remains conservative even if proxy setup later fails.
111
- Use a fresh authorization flow to reconcile. OAuth discovery remains on native
112
- fetch and needs its own host proxy policy. These credential POST requirements
113
- change the native-fetch behavior of 0.34.1.
107
+ Use a fresh authorization flow to reconcile.
114
108
 
115
109
  ## Start on Workers
116
110
 
@@ -136,10 +130,8 @@ verified ingress behavior and the cases that still require verification.
136
130
  Agents use `/agent/<pool>`, which connecta authenticates with the `cta_` token
137
131
  alone and which ignores Access context entirely
138
132
  ([agent endpoints](./auth.md#agent-endpoints)). Behind Access, the edge must
139
- let those requests through without an Access login or service token. The P0
140
- probe ([observations](./architecture.md#production-access-bypass-for-agent-endpoints))
141
- verified this shape on 2026-10-15. The Worker example's `alchemy.run.ts`
142
- declares both applications:
133
+ let those requests through without an Access login or service token.
134
+ The Worker example's `alchemy.run.ts` declares both applications:
143
135
 
144
136
  1. Keep the Worker-level application, whose destination is
145
137
  `{ "type": "worker", "worker_id": "<the Worker script tag>" }`, exactly as
@@ -170,12 +162,9 @@ declares both applications:
170
162
  3. Point each agent at `https://<host>/agent/<pool>` with
171
163
  `Authorization: Bearer cta_…` and drop its `CF-Access-Client-Id` and
172
164
  `CF-Access-Client-Secret` headers. The pool must list `"agent:<name>"`.
173
- 4. Verify after the change has settled. Access changes took 15–19 seconds to
174
- settle in the probe, and while they propagate the edge can answer with
175
- transient 500 (`error code: 1104`) or 404 (`error code: 1042` or `1043`)
176
- responses, and in one round a 403 on a bypassed path after more than 30
177
- seconds. Do not rely on a fixed wait: repeat these checks until they agree
178
- for several consecutive rounds. Without credentials, `/agent/<pool>`
165
+ 4. Verify after the change has settled. Do not rely on a fixed wait: repeat
166
+ these checks until they agree for several consecutive rounds. Without
167
+ credentials, `/agent/<pool>`
179
168
  reaches connecta (its 401 carries `WWW-Authenticate: Bearer`, not Access's
180
169
  403 page), while `/mcp` and `/` still get Access's refusal. Then run
181
170
  `connecta doctor --pool <pool>` with the agent's token.
@@ -185,11 +174,8 @@ Connecta answers there only an issued token of an agent listed in the pool,
185
174
  and gives every other spelling of the agent namespace a 404 before auth,
186
175
  because Access matches `/agent/*` after resolving dot segments, folding case,
187
176
  decoding unreserved escapes, and collapsing a leading `//`, while the Worker
188
- sees the raw path. Two cases were not tested: a human's `CF_Authorization`
189
- cookie on a bypassed path, whose `ctx.access` identity is unknown (connecta
190
- never reads it at `/agent/*`), and Custom Domains, which use the same
191
- documented hostname-and-path form but were not observed; only `workers.dev`
192
- was probed. Pinning the Worker-level application's AUD on human routes is
177
+ sees the raw path. Connecta never reads `ctx.access` at `/agent/*`.
178
+ Pinning the Worker-level application's AUD on human routes is
193
179
  recommended hardening that connecta does not yet do.
194
180
 
195
181
  ## Compose capabilities and access
@@ -314,22 +300,16 @@ Bump the exact package pin, read the [changelog](../CHANGELOG.md) for every
314
300
  intervening release, and apply the relevant migration before startup. `init`
315
301
  does not merge changes into an existing deployment.
316
302
 
303
+ Before upgrading past 0.37.1 with pre-0.29 state, follow
304
+ [Retired layout migrations](./migration-retired-layouts.md). Version 0.37.1 is
305
+ the last bridge for KV → D1, JSON → SQLite, and OAuth layout-2 conversions.
306
+
317
307
  For an existing Node deployment, add the Node entry's pinned optional peer
318
308
  before starting the upgraded package: `npm install --save-exact undici@6.29.1`.
319
309
  The current Node template already declares this dependency.
320
310
 
321
- For 0.35.0, serve Node with `listen` from `@zackbart/connecta/node`, as the
322
- current template does. Without `listen()`, a host serving `connecta.fetch` has
323
- no owned sender: every maintained-provider write, every reviewed POST read and
324
- every remote MCP write is refused before sending, although each worked in 0.34.1.
325
- Downstream OAuth token, registration and revocation POSTs also require that
326
- sender. With `listen()`, every maintained-provider request, reads included,
327
- remote MCP writes and those credential POSTs use the owned sender. Configure
328
- `listen(..., { proxy })` explicitly for HTTP(S) CONNECT proxy egress; ambient
329
- `NODE_USE_ENV_PROXY`, `HTTP_PROXY`, `HTTPS_PROXY` and host proxy dispatchers do
330
- not configure it. Remote MCP reads and OAuth discovery GETs retain native fetch
331
- and need their own host proxy policy. An uncertain refresh requires fresh
332
- authorization rather than replaying the spent token. See [Start on Node](#start-on-node).
311
+ For Node upgrades, retain the template's `listen` entrypoint and apply the
312
+ [Node transport and proxy requirements](#start-on-node).
333
313
 
334
314
  Authenticated MCP bodies now default to 4 MiB through
335
315
  `admission.requests.maxBodyBytes`; Node's separate pre-auth buffer also defaults
@@ -354,8 +334,7 @@ and [Eve agents](./meta-tools.md#eve-agents).
354
334
  - [Migration to 0.34](./migration-0.34.md) covers the Overview landing page, Endpoints at `/endpoints`, default browser titles, and Workspace discovery in owner-less agent pools. No storage migration or token rotation is needed from 0.33.
355
335
  - [Migration to 0.33](./migration-0.33.md) maps every removed access option to `maintainers`, pool `members`, and `agents`, moves agents to `/agent/<pool>`, and covers pool owners, token revisions, operator contract v2 with its operator route changes, and the pre-auth listen fix.
356
336
  - [Tokens issued before agents](./auth.md#agent-tokens-and-upgrading-from-earlier-tokens) stop admitting until each machine's token is bound once to a declared agent with `npm run adopt-token -- <token-id> <agent>` (Node) or `AccessTokenManager.adopt`, which keeps its secret. Human-bound tokens stay refused; issue those agents new tokens. Pool members name `"agent:<name>"` instead of matching token record ids.
357
- - [Node storage from 0.28](../templates/node/README.md#storage) uses `connecta migrate-state` to copy the JSON state into SQLite. Activity JSONL is not imported.
358
- - [Worker storage from 0.28](../examples/worker/README.md#upgrading-from-028) copies KV into D1 with a one-shot migration.
337
+ - [Retired layout migrations](./migration-retired-layouts.md) requires completing Node JSON → SQLite, Workers KV → D1, and every OAuth layout-2 grant conversion on 0.37.1 before upgrading. The new package no longer supplies those migrations.
359
338
  - [Worker deployments on Wrangler](../examples/worker/README.md#moving-a-wrangler-deployed-worker-to-alchemy) move to Alchemy once, adopting the Worker, D1 database, and Access applications so the script tag and Access AUD stay unchanged.
360
339
  - [Notion, Vercel, and Cloudflare for 0.29](./provider-migration-0.29.md) records historical defaults and retained API tool names.
361
340
  - [Executor wiring](./code-mode.md#deploy-time-capability) requires branded shipped executors or a self-managed custom executor.
@@ -219,26 +219,11 @@ failure also reports an unknown outcome with no retry or wait advice; a proven
219
219
  unsent failure retains its own recovery advice. Connector `readOnly` remains
220
220
  optional and composes with endpoint policy.
221
221
 
222
- On Node, serve with `listen` from `@zackbart/connecta/node`: it installs the
223
- owned transport that prevents native fetch or a host-configured dispatcher
224
- from silently resending a remote MCP write. Without that transport, Node
225
- refuses remote writes before dispatch. A connector with its own `fetch` hands
226
- writes to that function instead, which owns their single attempt. Downstream OAuth token, registration and
227
- revocation POSTs also require the owned sender. Read calls and OAuth discovery
228
- GETs keep native fetch. Workers
229
- use their native fetch with manual redirects; transport failures after
222
+ On Node, follow the [Node transport and proxy requirements](./deploying.md#start-on-node).
223
+ A connector with its own `fetch` hands writes to that function, which owns their
224
+ single attempt. Workers use native fetch with manual redirects; failures after
230
225
  dispatch remain unknown and non-retryable.
231
226
 
232
- The owned sender connects directly by default. For HTTP(S) CONNECT proxy egress,
233
- configure `listen(connecta, { port: 3000, proxy: "http://proxy.example.com:8080" })`.
234
- This controls maintained-provider requests, remote MCP writes and OAuth
235
- credential POSTs; it ignores `NODE_USE_ENV_PROXY`, `HTTP_PROXY`, `HTTPS_PROXY`
236
- and host proxy dispatchers. Remote MCP reads and OAuth discovery GETs retain
237
- native fetch and need their own host proxy policy. An uncertain refresh requires
238
- fresh authorization rather than replaying the spent token. See
239
- [Node startup](./deploying.md#start-on-node) for the proxy URL, credentials and
240
- TLS trust rules.
241
-
242
227
  Remote catalogs evolve. Discovery, direct calls, and programs enforce the
243
228
  current annotations and `ConnectaConfig.classification` overrides. A leftover
244
229
  `classify` option throws at construction and names that map. Provider reviews,
@@ -346,7 +331,7 @@ check shared behavior. Provider-specific tests remain beside each provider.
346
331
 
347
332
  Use [`@zackbart/connecta-eve`](https://github.com/zackbart/connecta/blob/main/packages/connecta-eve/README.md)
348
333
  in the Eve app for an app-owned connection and endpoint instructions refreshed
349
- once per turn. It requires Node 24 and Eve 0.84.x, and installs separately from
334
+ once per turn. It requires Node 24 and Eve 0.86.x, and installs separately from
350
335
  Connecta. Follow its README for the two agent files, token environment variables,
351
336
  optional write approval and Vercel OIDC token source. Configure the server's
352
337
  [agent and pool membership](./auth.md#issue-rotate-or-revoke-an-agent-token)
@@ -528,8 +528,10 @@ The default cap sits under both lines with room to spare. Preview plus notice
528
528
  stays under 25,000 bytes, which is under 50,000 characters for any text, because
529
529
  a character is at least one UTF-8 byte, and under 25,000 tokens for any text,
530
530
  because a token covers at least one byte. A `connecta.result` page is bounded by the same
531
- inline byte cap, and 24,000 matches the program result boundary in
532
- [code mode](./code-mode.md). A deployment whose
531
+ inline byte cap, and 24,000 matches the default program result boundary in
532
+ [code mode](./code-mode.md) (`execute.maxResultChars`). The `maxBytes` in
533
+ `nextAction` is sized so one page fits that boundary under worst-case JSON
534
+ escaping, capped by the call's own inline cap: 3,829 bytes by default. A deployment whose
533
535
  clients take more can raise the cap, and one whose clients take less can lower
534
536
  it, per connector if need be; a result between 24,000 and 50,000 bytes that
535
537
  used to arrive whole now pages. A client that spills rather than rejects keeps
@@ -1309,7 +1311,7 @@ window, a native `tools/list` carries a 300-second private cache hint, against
1309
1311
  an hour on meta endpoints. This hint does not guarantee that a host refreshes
1310
1312
  its cached annotations; the stale-approval race is accepted on writable pools.
1311
1313
 
1312
- **Listing.** `tools/list` is one page with no cursor (Eve 0.84 reads only the
1314
+ **Listing.** `tools/list` is one page with no cursor (Eve 0.86 reads only the
1313
1315
  first page). A pool listing more than 1,000 tools fails `tools/list` with a
1314
1316
  JSON-RPC error asking the operator to narrow the pool; nothing is silently
1315
1317
  dropped. A connector whose catalog cannot load is left out of that listing
@@ -1380,8 +1382,6 @@ listing, and call translation live in
1380
1382
  [search tests](https://github.com/zackbart/connecta/blob/main/test/meta-tools-search.test.ts),
1381
1383
  [call tests](https://github.com/zackbart/connecta/blob/main/test/meta-tools-call.test.ts),
1382
1384
  [skills tests](https://github.com/zackbart/connecta/blob/main/test/skills-extension.test.ts),
1383
- [native surface tests](https://github.com/zackbart/connecta/blob/main/test/native-tools.test.ts),
1384
- [surface tests](https://github.com/zackbart/connecta/blob/main/test/code-first-surface.test.ts),
1385
- and [pool description tests](https://github.com/zackbart/connecta/blob/main/test/pool-description.test.ts)
1385
+ and [native surface tests](https://github.com/zackbart/connecta/blob/main/test/native-tools.test.ts)
1386
1386
  check the published contract. Guest parity and clause evidence are in
1387
1387
  [code-mode verification](./code-mode.md#verification).
@@ -1,8 +1,7 @@
1
1
  # Migration to 0.33
2
2
 
3
- Use this upgrade guide for an existing deployment moving to 0.33.
4
- [Deployment upgrades](./deploying.md#upgrade-an-existing-deployment) cover the
5
- general procedure; [the agent index](./README.md) routes other work.
3
+ Apply the [general upgrade procedure](./deploying.md#upgrade-an-existing-deployment)
4
+ when moving from 0.32 to 0.33.
6
5
 
7
6
  0.33 makes pools the access model.
8
7
  Every deployment with inbound auth changes its configuration. Each removed
@@ -338,8 +337,9 @@ pools: {
338
337
 
339
338
  ## Verify
340
339
 
341
- 1. Start the deployment; construction errors name each removed option's
342
- replacement.
340
+ 1. Start the deployment; 0.33 construction errors name each removed option's
341
+ replacement. Releases after 0.37.1 use generic unknown-option errors;
342
+ use this guide for replacements.
343
343
  2. Sign in as a maintainer and confirm plain `/mcp` and the operator UI work.
344
344
  3. Run `connecta doctor --pool <pool>` with each agent's token, and confirm
345
345
  the same token at `/mcp` is refused.