@zackbart/connecta 0.6.1 → 0.7.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 (69) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/README.md +24 -20
  3. package/dist/auth/bearer.d.ts +4 -3
  4. package/dist/auth/bearer.d.ts.map +1 -1
  5. package/dist/auth/bearer.js +10 -8
  6. package/dist/auth/bearer.js.map +1 -1
  7. package/dist/auth/clerk.d.ts +8 -7
  8. package/dist/auth/clerk.d.ts.map +1 -1
  9. package/dist/auth/clerk.js +27 -8
  10. package/dist/auth/clerk.js.map +1 -1
  11. package/dist/connector-scope.d.ts +13 -0
  12. package/dist/connector-scope.d.ts.map +1 -0
  13. package/dist/connector-scope.js +35 -0
  14. package/dist/connector-scope.js.map +1 -0
  15. package/dist/connectors/api.d.ts +5 -5
  16. package/dist/connectors/api.d.ts.map +1 -1
  17. package/dist/connectors/remote-mcp.d.ts +3 -3
  18. package/dist/connectors/remote-mcp.d.ts.map +1 -1
  19. package/dist/connectors/remote-mcp.js +309 -10
  20. package/dist/connectors/remote-mcp.js.map +1 -1
  21. package/dist/credential-health.d.ts +8 -5
  22. package/dist/credential-health.d.ts.map +1 -1
  23. package/dist/credential-health.js +99 -51
  24. package/dist/credential-health.js.map +1 -1
  25. package/dist/credentials.d.ts +51 -2
  26. package/dist/credentials.d.ts.map +1 -1
  27. package/dist/credentials.js +68 -3
  28. package/dist/credentials.js.map +1 -1
  29. package/dist/index.d.ts +83 -82
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +74 -24
  32. package/dist/index.js.map +1 -1
  33. package/dist/meta-tools.d.ts +3 -3
  34. package/dist/meta-tools.d.ts.map +1 -1
  35. package/dist/meta-tools.js +16 -7
  36. package/dist/meta-tools.js.map +1 -1
  37. package/dist/registry.d.ts +3 -2
  38. package/dist/registry.d.ts.map +1 -1
  39. package/dist/registry.js +4 -3
  40. package/dist/registry.js.map +1 -1
  41. package/dist/server.d.ts +1 -1
  42. package/dist/server.d.ts.map +1 -1
  43. package/dist/server.js +144 -52
  44. package/dist/server.js.map +1 -1
  45. package/dist/toolkits.js +1 -1
  46. package/dist/types.d.ts +41 -27
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/ui.d.ts +24 -10
  49. package/dist/ui.d.ts.map +1 -1
  50. package/dist/ui.js +594 -172
  51. package/dist/ui.js.map +1 -1
  52. package/dist/version.d.ts +1 -1
  53. package/dist/version.js +1 -1
  54. package/package.json +3 -2
  55. package/src/auth/bearer.ts +10 -8
  56. package/src/auth/clerk.ts +28 -9
  57. package/src/connector-scope.ts +41 -0
  58. package/src/connectors/api.ts +5 -5
  59. package/src/connectors/remote-mcp.ts +348 -25
  60. package/src/credential-health.ts +120 -57
  61. package/src/credentials.ts +96 -3
  62. package/src/index.ts +169 -106
  63. package/src/meta-tools.ts +22 -7
  64. package/src/registry.ts +4 -3
  65. package/src/server.ts +183 -70
  66. package/src/toolkits.ts +1 -1
  67. package/src/types.ts +41 -27
  68. package/src/ui.ts +631 -170
  69. package/src/version.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,262 @@
2
2
 
3
3
  All notable changes to this package are documented here.
4
4
 
5
+ ## 0.7.0 — 2026-07-27
6
+
7
+ 0.7.0 is the surface settlement: one release that finishes moving connecta's
8
+ public shape so that it can stop moving. It arrives from two directions at once.
9
+ A controlled qualification pass against 0.6.1 (issue #86) measured four ways a
10
+ deployment could be worn down — an unbounded cache, an enumerable callback, a
11
+ session leak, and a credential that reports itself usable and then isn't — and
12
+ those are fixed here. Meanwhile the config surface had accumulated eleven flat
13
+ tuning fields, the reference manual had reached 2,600 lines, and the operator UI
14
+ was one page pretending to be three. Those are settled here too, and settling
15
+ them breaks things, which is the argument for doing it in one release instead of
16
+ spreading it across three.
17
+
18
+ **What breaks.** Three things, and each is a compile error or a loud refusal
19
+ rather than a behavior change you have to notice on your own. Every flat 0.6.x
20
+ tuning option is removed in favour of four grouped ones. A connector that
21
+ implements `finishAuth` without `verifyState` can no longer complete OAuth. And
22
+ `/`, `/credentials`, and `/activity` are now core-owned routes, so a connector
23
+ `handleRequest` that served any of them is shadowed. The first is mechanical:
24
+ `createConnecta` throws once, before it reads anything else, naming every legacy
25
+ path it found and its replacement.
26
+
27
+ **What a deployment can ignore.** The defaults and runtime behavior of every
28
+ config option are unchanged — only the paths moved. `/ui` bookmarks keep working
29
+ through a permanent redirect, and all 17 documentation anchors still resolve
30
+ even though the manual is now nine files. If you configure connecta with a
31
+ literal object, do not paginate a downstream MCP server, and write your own
32
+ connectors against `remoteMcp`/`api` rather than hand-rolling `finishAuth`, the
33
+ whole migration is a mechanical rewrite of one config block.
34
+
35
+ ### Breaking
36
+
37
+ - **`ConnectaConfig` tuning is grouped by subsystem for 0.7.0** (issue #28).
38
+ The flat 0.6.x options are removed rather than deprecated: TypeScript rejects
39
+ them, and JavaScript callers get one fail-fast error from `createConnecta`
40
+ listing every legacy own property it finds and its replacement. Supplying
41
+ both an old and a new path is still an error; there is no precedence rule or
42
+ compatibility alias. Migrate configuration as follows:
43
+
44
+ | 0.6.x | 0.7.0 |
45
+ |---|---|
46
+ | `activity` | `activity.store` |
47
+ | `activityReadGate` | `activity.readGate` |
48
+ | `activityDeploymentId` | `activity.deploymentId` |
49
+ | `credentialEncryptionKey` | `credentials.encryptionKey` |
50
+ | `credentialHealth` | `credentials.health` |
51
+ | `toolCacheTtlSeconds` | `discovery.catalogTtlSeconds` |
52
+ | `persistToolCatalog` | `discovery.persistCatalog` |
53
+ | `toolCatalogStaleSeconds` | `discovery.staleCatalogSeconds` |
54
+ | `probeTimeoutMs` | `discovery.probeTimeoutMs` |
55
+ | `defaultToolTimeoutMs` | `calls.defaultTimeoutMs` |
56
+ | `maxResultBytes` | `calls.maxResultBytes` |
57
+
58
+ For example:
59
+
60
+ ```ts
61
+ // 0.6.x
62
+ createConnecta({
63
+ connectors,
64
+ storage,
65
+ activity,
66
+ credentialEncryptionKey: env.CONNECTA_CREDENTIAL_KEY,
67
+ toolCacheTtlSeconds: 300,
68
+ defaultToolTimeoutMs: 30_000,
69
+ maxResultBytes: 50_000,
70
+ });
71
+
72
+ // 0.7.0
73
+ createConnecta({
74
+ connectors,
75
+ storage,
76
+ activity: { store: activity },
77
+ credentials: { encryptionKey: env.CONNECTA_CREDENTIAL_KEY },
78
+ discovery: { catalogTtlSeconds: 300 },
79
+ calls: { defaultTimeoutMs: 30_000, maxResultBytes: 50_000 },
80
+ });
81
+ ```
82
+
83
+ The defaults and runtime behavior of each option are unchanged. Connector
84
+ definitions keep their per-connector `maxResultBytes`, and structural seams
85
+ such as `storage`, `auth`, `connectors`, `toolkits`, and `executor` remain at
86
+ the top level.
87
+ - **A connector implementing `finishAuth` without `verifyState` can no longer
88
+ complete OAuth** (issue #62). Such a connector previously exchanged the
89
+ authorization code with no CSRF guard at all — connecta had no way to
90
+ establish that it had started the flow being completed. The callback now
91
+ refuses with the same opaque 400 as every other refusal, exchanges no code,
92
+ and logs one operator-grade line naming the connector and the missing hook.
93
+ `verifyState` stays optional in the type system and is required in practice
94
+ wherever `finishAuth` is present. The shipped `remoteMcp` OAuth provider has
95
+ always implemented it, so this reaches hand-written connectors only.
96
+ - **`/`, `/credentials`, and `/activity` are now core-owned routes** (issue
97
+ #57). They previously fell through to connector `handleRequest` and then to a
98
+ 404, so a connector serving any of the three is now shadowed without warning.
99
+ `GET /` returns the operator shell where 0.6.1 returned 404, and non-GET on
100
+ those routes and on `/ui` returns 405 rather than falling through.
101
+
102
+ ### Added
103
+
104
+ - **`Connector.closeScope?(ctx)`** (issue #66) — an optional, best-effort seam
105
+ for releasing whatever a connector opened for one scope. Called at most once,
106
+ inside a fixed 100 ms completion window: a hook that is absent, throws, or
107
+ never settles cannot replace, corrupt, or delay the result of the operation
108
+ that triggered it. `remoteMcp` implements it, tearing down cached and
109
+ half-open sessions and fencing late connection races. Connectors that do not
110
+ implement it are unaffected.
111
+
112
+ ### Changed
113
+
114
+ - **The operator UI is now a direct-linkable three-page set** (issue #57):
115
+ Connections at `/`, Credentials at `/credentials`, and Activity at
116
+ `/activity`. `GET /ui` remains as a permanent `308` compatibility redirect to
117
+ `/`. The pages use semantic navigation, path-specific titles, direct
118
+ load/refresh/bookmark and Back/Forward behavior, and the same restrained
119
+ responsive connector-ledger design. They are three routes over one
120
+ no-build-step client implementation, not copied applications.
121
+ - **Every canonical operator route serves the same open, data-free shell.** The
122
+ nonce CSP, framing denial, referrer policy, HSTS behavior, content-type
123
+ protection, URL gates, and escaping guarantees formerly attached to `/ui`
124
+ apply equally to `/`, `/credentials`, and `/activity`. Deployment data remains
125
+ behind the unchanged private APIs: `/ui/data`, `/ui/activity`, and
126
+ `/ui/credentials/<connectorId>[/test]`.
127
+ - **Vault controls moved out of connector cards and into Credentials.**
128
+ Connections remains read-only status; Credentials preserves Add/Replace/Test/
129
+ Remove, masked metadata, stored-shape recovery, and live feedback without ever
130
+ returning a secret. Its explicit capability states cover eligible Clerk
131
+ operators, bearer-only sessions, missing vaults, and deployments with no
132
+ credential slots without broadening the existing Clerk/user-id/toolkit/
133
+ same-origin mutation boundary. Activity likewise renders an explicit
134
+ not-configured state when `activity.store.list` is absent. OAuth result pages
135
+ now return to `/`.
136
+ - **The reference manual is nine documents instead of one** (issue #61).
137
+ `docs/documentation.md` had reached 2,600 lines; it is now a compatibility
138
+ index that preserves all 17 `#N-…` anchors, so every existing deep link from
139
+ the README, the examples, and source comments still resolves. The prose moved
140
+ to `architecture`, `meta-tools`, `connectors`, `auth`,
141
+ `storage-and-credentials`, `operations`, `code-mode`, `operator-ui`, and
142
+ `toolkits`. A new `npm run check:docs` validates local links, fragments,
143
+ heading slugs, and the legacy-anchor manifest, and runs first in
144
+ `npm run check`. Contributor-facing only: the published package is unchanged
145
+ and docs still ship in no tarball.
146
+
147
+ ### Fixed
148
+
149
+ - **`clerkAuth`'s identity-decision cache is bounded at 1,024 identities per
150
+ instance** (issue #70). It never evicted: every distinct identity that reached
151
+ the gate was retained for the lifetime of the isolate. `allowedDomains` made
152
+ that attacker-reachable on an open-signup Clerk instance, since an
153
+ authenticated-but-denied identity is still a cache entry — 100,000 denied
154
+ identities measured at roughly 11.96 MiB retained, with the oldest entry still
155
+ present. Eviction is LRU, so a small active set stays hot, and the only thing
156
+ evicting an entry can cause is a fresh check against Clerk: it can never turn
157
+ a denial into an admission, and it cannot extend an allow past its TTL, since
158
+ a cache hit re-inserts the same record rather than restamping it. The bound is
159
+ deliberately fixed rather than an operator knob, and the ~60 s allow / ~30 s
160
+ deny windows are unchanged.
161
+ - **`/oauth/callback/<id>` no longer lets an unauthenticated caller enumerate
162
+ configured connector ids** (issue #62). 0.6.1 answered `404 Unknown connector
163
+ "<id>"` for an id it did not recognise and a distinct 400 for a state
164
+ mismatch, which made the callback a free directory of every connector a
165
+ deployment had configured. Unknown ids, non-OAuth connectors, missing or
166
+ mismatched state, an absent verifier, and a throwing verifier now return one
167
+ byte-identical 400 — same status, same body, same headers. They also cost the
168
+ same single storage read, so the clock cannot sort the ids the body refuses to
169
+ name. That is cost equalisation rather than constant time, and the
170
+ documentation says so and enumerates what stays distinguishable. The precise
171
+ diagnosis moved to the operator log, bounded and escaped.
172
+ - **Probe-opened downstream MCP sessions are closed instead of abandoned**
173
+ (issue #66). Credential-health sweeps, `list_connectors({ probe: true })`, and
174
+ `/ui/data` each opened downstream sessions and left them for the provider to
175
+ age out — measured at 200 probes opening 200 sessions and explicitly closing
176
+ zero, made continuous by the periodic sweep. Closing now ends the session
177
+ rather than merely dropping the local client: `remoteMcp` issues the
178
+ specification's `DELETE` carrying `Mcp-Session-Id` *before* the close that
179
+ would otherwise abort it, feature-detected and best-effort, while a stateless
180
+ downstream issues none. A downstream that refuses, errors, or never answers is
181
+ closed anyway. One consequence worth knowing: a probing `list_connectors` now
182
+ runs on its own scope rather than the request's — it has to, since a request
183
+ scope cannot be closed — so a request that probes *and* then calls the same
184
+ connector opens two downstream sessions where it opened one. Per-request
185
+ `/mcp` scopes are unchanged.
186
+ - **A credential stored under an older declaration no longer reports itself
187
+ usable and then fails** (issue #69). `/ui`, the credential Test route, and
188
+ credential health each interpreted the stored shape slightly differently, so a
189
+ credential could render as configured and testable and then answer 409 with a
190
+ misleading configure-first message. One pure classifier now answers for all
191
+ three, and it asks about *containment* rather than equality: a stored set is
192
+ fine as long as it holds every field the declaration currently names. A
193
+ missing declared field is drift — which covers every case issue #69 reported,
194
+ including a rename and a swap between the single-value and named shapes in
195
+ either direction — and drift is never auto-migrated. Credentials keeps Replace
196
+ and Remove and hides Test, the test route answers 409 without calling a hook,
197
+ and health records an explicit error rather than a fabricated verdict, checked
198
+ before the freshness gate so a stale `ok` cannot mask a redeploy. Leftover
199
+ keys are explicitly *not* drift: dropping a field from a declaration leaves
200
+ its secret in the vault, but every accessor keeps returning the right value
201
+ and every call keeps working, so calling that drift would tell an operator to
202
+ re-enter a credential that works and that many providers will not reissue in
203
+ readable form. Credentials prints one non-blocking line naming the leftovers
204
+ instead. A repeated drift verdict is charged to the freshness budget rather
205
+ than rewritten on every sweep in every isolate.
206
+ - **A paginated downstream MCP server no longer loses everything after its
207
+ first `tools/list` page** (issue #77). `tools/list` is cursor-paginated in the
208
+ MCP specification and the SDK's `Client.listTools()` returns one page,
209
+ `nextCursor` included, without following it. `remoteMcp()` called it once, so
210
+ a downstream that paged its catalog was split in half without complaint:
211
+ page-one tools were counted, searchable, describable and callable, and every
212
+ tool after them appeared not to exist — missing from `list_connectors` counts,
213
+ `search_tools`, `describe_tools`, and address resolution alike, with nothing
214
+ in any log saying a page had been left behind. That is the wrong failure for
215
+ a product whose premise is progressive discovery over large tool catalogs,
216
+ since large catalogs are exactly the ones that paginate. A catalog refresh now
217
+ walks the whole cursor chain on the same request-scoped client before the
218
+ result is indexed. Cursors are handed back byte-for-byte and never parsed,
219
+ rewritten, or persisted; an empty-string `nextCursor` is treated as *present*
220
+ (pagination ends on an absent one, and a truthiness check there would truncate
221
+ the catalog silently). A downstream that advertises no `nextCursor` is
222
+ unchanged in both directions: one request, sent with no `cursor` param, and
223
+ byte-identical tool definitions. Tools are deduplicated by name, first page
224
+ wins, so an unstable cursor that overlaps pages cannot inflate `toolCount`,
225
+ double a `search_tools` row, or churn the registry into a persistence write
226
+ per refresh. A `nextCursor: null` — a common JSON idiom for end-of-pagination
227
+ that the MCP result schema does not accept — is now reported as a named
228
+ nonconformance instead of a raw Zod dump. Any page that fails fails the whole
229
+ refresh rather than publishing a prefix, so the registry keeps serving the
230
+ last complete catalog through its existing stale fallback.
231
+
232
+ The walk is bounded on **tools**, not pages. A page ceiling is the wrong
233
+ dimension — the server picks the page size, so N pages is N × a number
234
+ connecta cannot observe, and the common conformant idiom of "advertise a
235
+ cursor whenever the page came back full, then serve one empty page to
236
+ terminate" means a well-behaved 10,000-tool server paging at 100 spends 101
237
+ requests. So a refresh now fails immediately on a cursor handed back twice,
238
+ fails on two consecutive pages that add nothing while still promising more
239
+ (one is legal — that empty terminator), caps what it accumulates at
240
+ `MAX_TOOLS` (100,000, the top of the catalog envelope issue #82 benchmarks),
241
+ and keeps `MAX_TOOL_PAGES` (raised to 10,000) only as an unreachable runaway
242
+ backstop. These bounds make an unterminating walk finite and report it as a
243
+ connector error; they do not cancel one that a probe deadline has already
244
+ abandoned, because `withTimeout` bounds the caller's wait rather than the
245
+ work.
246
+
247
+ - **Downstream output-schema validation now covers every page of a paginated
248
+ catalog, not just the last one** (issue #77). The MCP SDK's
249
+ `Client.listTools()` rebuilds its output-schema validators and task-support
250
+ sets from each page it receives, clearing them first — so walking the cursor
251
+ chain left the request-scoped client validating the final page alone. A
252
+ `call_tool` against any earlier-page tool then found no validator and
253
+ silently skipped both the "declared an `outputSchema` but returned no
254
+ `structuredContent`" check and the structured-content validation, and lost
255
+ the required-task guard with them. Enforcement depended on which page a tool
256
+ happened to land on. A completed walk now re-primes that cache once from the
257
+ full aggregated catalog; a test asserts the pinned SDK still provides the
258
+ method it reaches for, so a future bump fails CI rather than quietly
259
+ restoring the gap.
260
+
5
261
  ## 0.6.1 — 2026-07-26
6
262
 
7
263
  A patch release: three bug fixes and a documentation overhaul. No new
package/README.md CHANGED
@@ -62,12 +62,13 @@ platform to administer.
62
62
 
63
63
  **Credentials stay server-side.** Downstream tokens live in an AES-GCM encrypted
64
64
  vault over the deployment's own storage, with the key held outside it. A
65
- connector reaches its own credential through `ctx.credential`; `/ui`, the
66
- meta-tools, and the code sandbox only ever see masked metadata. Rotating a token
67
- is an operator action rather than a redeploy — though writing to the vault is
68
- deliberately narrower than everything else, requiring a Clerk-authenticated
69
- operator on a same-origin request, so a bearer-only deployment cannot administer
70
- credentials from the browser. Which tools exist is still code either way.
65
+ connector reaches its own credential through `ctx.credential`; the operator
66
+ pages, meta-tools, and code sandbox never expose a secret value. Rotating a token
67
+ at `/credentials` is an operator action rather than a redeploy — though writing
68
+ to the vault is deliberately narrower than everything else, requiring a
69
+ Clerk-authenticated operator on a same-origin request, so a bearer-only
70
+ deployment cannot administer credentials from the browser. Which tools exist
71
+ is still code either way.
71
72
 
72
73
  **Read-only is fail-closed.** Only tools explicitly annotated `readOnlyHint:
73
74
  true` are reachable through `call_tool`, `batch_call`, and the sandbox. Missing,
@@ -93,14 +94,16 @@ generated code, search text, or raw error messages. The exclusion is structural
93
94
  rather than a redaction pass: the event type has nowhere to put a payload, which
94
95
  is what keeps an operations log from becoming something worth stealing.
95
96
 
96
- **An operator dashboard that can only look.** `GET /ui` is a read-only status
97
- page with no build step: connector health, tool counts, downstream authorization
98
- links, credential controls, and an activity tab when a store is configured. It
99
- displays state and administers credentials; it cannot change what an agent is
100
- allowed to call. Credentials connecta stores are also probed for liveness
97
+ **Operator pages that cannot administer the deployment.** Connections at `GET /`
98
+ shows connector health, tool counts, and downstream authorization links;
99
+ `/credentials` rotates stored secrets; and `/activity` shows the optional
100
+ payload-free ledger. They share one data-free shell with no build step and use
101
+ authenticated private APIs for deployment data. They cannot add a connector,
102
+ change policy, or alter what an agent may call. Credentials connecta stores are
103
+ also probed for liveness
101
104
  proactively — using each connector's own test or status hook, never a downstream
102
105
  tool call — so a dead token surfaces as `auth_required` with the URL to open on
103
- `/ui` and in `list_connectors` before an agent's real call trips over it.
106
+ Connections and in `list_connectors` before an agent's real call trips over it.
104
107
 
105
108
  ## When not to use it
106
109
 
@@ -154,7 +157,7 @@ const connecta = createConnecta({
154
157
  ],
155
158
  });
156
159
 
157
- listen(connecta, 8787); // MCP at http://localhost:8787/mcp, status at /ui
160
+ listen(connecta, 8787); // MCP at /mcp; Connections at http://localhost:8787/
158
161
  ```
159
162
 
160
163
  Point an MCP client at `http://localhost:8787/mcp` with an
@@ -180,13 +183,14 @@ endpoint, credential, and tool choices stay in your project, declared with
180
183
  ## Learn more
181
184
 
182
185
  - **[Documentation](https://github.com/zackbart/connecta/blob/main/docs/documentation.md)**
183
- — the reference manual: architecture, connectors, inbound auth and downstream
184
- OAuth, storage, Clerk setup, testing, and troubleshooting. Start with the
185
- [meta-tools reference](https://github.com/zackbart/connecta/blob/main/docs/documentation.md#3-meta-tools-reference),
186
- the [config options](https://github.com/zackbart/connecta/blob/main/docs/documentation.md#8-running-it),
187
- [code mode](https://github.com/zackbart/connecta/blob/main/docs/documentation.md#13-code-mode-execute_code),
188
- [toolkits](https://github.com/zackbart/connecta/blob/main/docs/documentation.md#16-toolkits-scoped-views),
189
- or [credential health](https://github.com/zackbart/connecta/blob/main/docs/documentation.md#17-credential-health-proactive-liveness-checks).
186
+ — the reference index for architecture, connectors, inbound auth and
187
+ downstream OAuth, storage, Clerk setup, testing, and troubleshooting. Start
188
+ with the [meta-tools reference](https://github.com/zackbart/connecta/blob/main/docs/meta-tools.md#meta-tools-reference),
189
+ the [config options](https://github.com/zackbart/connecta/blob/main/docs/operations.md#running-it),
190
+ [code mode](https://github.com/zackbart/connecta/blob/main/docs/code-mode.md#code-mode-execute_code),
191
+ [toolkits](https://github.com/zackbart/connecta/blob/main/docs/toolkits.md#toolkits-scoped-views),
192
+ [operator pages](https://github.com/zackbart/connecta/blob/main/docs/operator-ui.md#status-ui),
193
+ or [credential health](https://github.com/zackbart/connecta/blob/main/docs/storage-and-credentials.md#credential-health-proactive-liveness-checks).
190
194
  - **[Decisions](https://github.com/zackbart/connecta/blob/main/docs/decisions.md)**
191
195
  — what connecta refuses to be, which alternatives lost and why, and the
192
196
  invariants a change must preserve.
@@ -9,9 +9,10 @@ export interface BearerTokenOptions extends ToolkitBindingOptions {
9
9
  * against `secret`. Checked BEFORE the Clerk gate in the server; a mismatch
10
10
  * falls through so a co-configured Clerk provider can still admit the request.
11
11
  *
12
- * `toolkits` binds the token to named toolkits (§16): one `bearerToken(...)` per
13
- * team credential, each naming the view that team may open. Omit it and the
14
- * token stays unbound — every declared toolkit plus the full registry.
12
+ * `toolkits` binds the token to named toolkits (docs/toolkits.md): one
13
+ * `bearerToken(...)` per team credential, each naming the view that team may
14
+ * open. Omit it and the token stays unbound — every declared toolkit plus the
15
+ * full registry.
15
16
  */
16
17
  export declare function bearerToken(secret: string, options?: BearerTokenOptions): InboundAuth;
17
18
  //# sourceMappingURL=bearer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bearer.d.ts","sourceRoot":"","sources":["../../src/auth/bearer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB3D,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,kBAAuB,GAC/B,WAAW,CAiDb"}
1
+ {"version":3,"file":"bearer.d.ts","sourceRoot":"","sources":["../../src/auth/bearer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB3D,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,kBAAuB,GAC/B,WAAW,CAkDb"}
@@ -19,9 +19,10 @@ function timingSafeEqual(a, b) {
19
19
  * against `secret`. Checked BEFORE the Clerk gate in the server; a mismatch
20
20
  * falls through so a co-configured Clerk provider can still admit the request.
21
21
  *
22
- * `toolkits` binds the token to named toolkits (§16): one `bearerToken(...)` per
23
- * team credential, each naming the view that team may open. Omit it and the
24
- * token stays unbound — every declared toolkit plus the full registry.
22
+ * `toolkits` binds the token to named toolkits (docs/toolkits.md): one
23
+ * `bearerToken(...)` per team credential, each naming the view that team may
24
+ * open. Omit it and the token stays unbound — every declared toolkit plus the
25
+ * full registry.
25
26
  */
26
27
  export function bearerToken(secret, options = {}) {
27
28
  const secretBytes = encoder.encode(secret);
@@ -30,11 +31,12 @@ export function bearerToken(secret, options = {}) {
30
31
  : "bearerToken", options);
31
32
  if (toolkitBinding && !options.subjectId) {
32
33
  // A bound token stands for one team, and both surfaces that report on it —
33
- // the 403 refusal log (§16) and activity events (§15) — can only say
34
- // "bearer" without a subjectId. With several bound tokens that makes an
35
- // operator unable to tell which credential was refused, or whose call
36
- // succeeded. console.warn (as the Clerk adapter does) because an adapter is
37
- // constructed before `createConnecta` has a logger to hand it.
34
+ // the 403 refusal log (docs/toolkits.md) and activity events
35
+ // (docs/operator-ui.md) — can only say "bearer" without a subjectId. With
36
+ // several bound tokens that makes an operator unable to tell which
37
+ // credential was refused, or whose call succeeded. console.warn (as the
38
+ // Clerk adapter does) because an adapter is constructed before
39
+ // `createConnecta` has a logger to hand it.
38
40
  console.warn("[connecta] bearerToken is bound to toolkits " +
39
41
  `(${toolkitBinding.toolkits.join(", ") || "unscoped only"}) but has no ` +
40
42
  "subjectId: refusal logs and activity events cannot say which " +
@@ -1 +1 @@
1
- {"version":3,"file":"bearer.js","sourceRoot":"","sources":["../../src/auth/bearer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAElC,qFAAqF;AACrF,SAAS,eAAe,CAAC,CAAa,EAAE,CAAa;IACnD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAOD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CACzB,MAAc,EACd,UAA8B,EAAE;IAEhC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,cAAc,GAAG,qBAAqB,CAC1C,OAAO,CAAC,SAAS;QACf,CAAC,CAAC,2BAA2B,OAAO,CAAC,SAAS,IAAI;QAClD,CAAC,CAAC,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C7B;iBACF,CACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -23,9 +23,9 @@ export interface ClerkAuthOptions extends ToolkitBindingOptions {
23
23
  gate?: (userId: string, clerk: ClerkClient) => boolean | Promise<boolean>;
24
24
  /** Advertised scopes in protected-resource metadata. */
25
25
  scopes?: string[];
26
- /** Optional hosted Account Portal sign-in URL for `/ui`. Absolute https only. */
26
+ /** Optional hosted Account Portal sign-in URL for operator pages. Absolute https only. */
27
27
  signInUrl?: string;
28
- /** Optional hosted Account Portal sign-up URL for `/ui`. Absolute https only. */
28
+ /** Optional hosted Account Portal sign-up URL for operator pages. Absolute https only. */
29
29
  signUpUrl?: string;
30
30
  }
31
31
  /**
@@ -34,11 +34,12 @@ export interface ClerkAuthOptions extends ToolkitBindingOptions {
34
34
  * `allowedDomains` and `gate` decide WHO is admitted (both must pass);
35
35
  * `toolkits` decides WHICH view the admitted user gets.
36
36
  *
37
- * `toolkits` binds every user this provider admits to those toolkits (§16). For
38
- * a per-team split, configure one `clerkAuth(...)` per team — the same keys, a
39
- * `gate` naming that team's users, and that team's `toolkits`. The server tries
40
- * providers in order and the first that admits the user supplies the binding, so
41
- * a user one gate rejects falls through to the next.
37
+ * `toolkits` binds every user this provider admits to those toolkits
38
+ * (docs/toolkits.md). For a per-team split, configure one `clerkAuth(...)` per
39
+ * team — the same keys, a `gate` naming that team's users, and that team's
40
+ * `toolkits`. The server tries providers in order and the first that admits the
41
+ * user supplies the binding, so a user one gate rejects falls through to the
42
+ * next.
42
43
  */
43
44
  export declare function clerkAuth(opts: ClerkAuthOptions): InboundAuth;
44
45
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"clerk.d.ts","sourceRoot":"","sources":["../../src/auth/clerk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAA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S,MAAM,EAAE,CAAC;IACnC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1E,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ID;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,CAuP7D"}
@@ -28,6 +28,11 @@ function fapiUrl(publishableKey) {
28
28
  }
29
29
  const GATE_ALLOWED_TTL_MS = 60 * 1000;
30
30
  const GATE_FORBIDDEN_TTL_MS = 30 * 1000;
31
+ // Per clerkAuth instance. This is deliberately fixed rather than an operator
32
+ // knob: admission correctness never depends on retaining an entry, and 1,024
33
+ // keeps the common steady identity set hot without letting one-off denied
34
+ // identities define the isolate's lifetime memory footprint.
35
+ const GATE_CACHE_MAX_IDENTITIES = 1_024;
31
36
  /**
32
37
  * One label of a domain: ASCII letters/digits, interior hyphens only, 63
33
38
  * characters at most. ASCII-only is deliberate — an internationalized domain
@@ -127,11 +132,12 @@ function emailDomain(email) {
127
132
  * `allowedDomains` and `gate` decide WHO is admitted (both must pass);
128
133
  * `toolkits` decides WHICH view the admitted user gets.
129
134
  *
130
- * `toolkits` binds every user this provider admits to those toolkits (§16). For
131
- * a per-team split, configure one `clerkAuth(...)` per team — the same keys, a
132
- * `gate` naming that team's users, and that team's `toolkits`. The server tries
133
- * providers in order and the first that admits the user supplies the binding, so
134
- * a user one gate rejects falls through to the next.
135
+ * `toolkits` binds every user this provider admits to those toolkits
136
+ * (docs/toolkits.md). For a per-team split, configure one `clerkAuth(...)` per
137
+ * team — the same keys, a `gate` naming that team's users, and that team's
138
+ * `toolkits`. The server tries providers in order and the first that admits the
139
+ * user supplies the binding, so a user one gate rejects falls through to the
140
+ * next.
135
141
  */
136
142
  export function clerkAuth(opts) {
137
143
  const clerk = createClerkClient({
@@ -205,8 +211,16 @@ export function clerkAuth(opts) {
205
211
  if (!opts.gate && !allowedDomains)
206
212
  return true;
207
213
  const hit = gateCache.get(userId);
208
- if (hit && Date.now() < hit.exp)
209
- return hit.allowed;
214
+ if (hit) {
215
+ if (Date.now() < hit.exp) {
216
+ // Map iteration order is the LRU order. Refreshing a valid hit keeps a
217
+ // small active identity set resident when one-off identities churn.
218
+ gateCache.delete(userId);
219
+ gateCache.set(userId, hit);
220
+ return hit.allowed;
221
+ }
222
+ gateCache.delete(userId);
223
+ }
210
224
  let allowed = false;
211
225
  try {
212
226
  allowed =
@@ -221,6 +235,11 @@ export function clerkAuth(opts) {
221
235
  exp: Date.now() +
222
236
  (allowed ? GATE_ALLOWED_TTL_MS : GATE_FORBIDDEN_TTL_MS),
223
237
  });
238
+ if (gateCache.size > GATE_CACHE_MAX_IDENTITIES) {
239
+ const oldest = gateCache.keys().next();
240
+ if (!oldest.done)
241
+ gateCache.delete(oldest.value);
242
+ }
224
243
  return allowed;
225
244
  };
226
245
  return {
@@ -269,7 +288,7 @@ export function clerkAuth(opts) {
269
288
  let userId;
270
289
  try {
271
290
  const state = await clerk.authenticateRequest(request, {
272
- // MCP clients use Clerk OAuth access tokens; the browser dashboard
291
+ // MCP clients use Clerk OAuth access tokens; the browser operator UI
273
292
  // uses the signed-in operator's short-lived Clerk session token.
274
293
  // authorizedParties must NOT be passed here: OAuth access tokens may
275
294
  // be JWTs without an azp claim, and Clerk rejects azp=undefined when
@@ -1 +1 @@
1
- {"version":3,"file":"clerk.js","sourceRoot":"","sources":["../../src/auth/clerk.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,yBAAyB;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,qBAAqB,GAEt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CAAC,MAAM,CAAC;oBACpD,IAAI,GAAG,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;wBAC1B,OAAO,CAAC,IAAI,CACV,8CAA8C,GAAG,aAAa,MAAM,EAAE,CACvE,CAAC;wBACF,OAAO;4BACL,EAAE,EAAE,KAAK;4BACT,QAAQ,EAAE,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC;yBAC9C,CAAC;oBACJ,CAAC;gBACH,CAAC;gBACD,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC;YACrC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CACV,+CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,eAAe,UAAU,CAAC,OAAO,CAAC,EAAE,CACrC,CAAC;gBACF,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;YAC9D,CAAC;YACD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;YAC9D,CAAC;YACD,IAAI,CAAC,CAAC,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;gBAC/B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC;YAC9C,CAAC;YACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Connector, ConnectorContext } from "./types.js";
2
+ /**
3
+ * Tell a connector that a scope owned by the core has ended.
4
+ *
5
+ * Scope teardown is deliberately best-effort: a missing hook is a no-op and a
6
+ * rejected hook is swallowed so cleanup can never replace the probe result that
7
+ * caused it. The hook gets a small, fixed completion window so edge runtimes do
8
+ * not cut off a real close as the response ends, but one that never settles
9
+ * cannot hold the completed probe open indefinitely. Callers own the
10
+ * at-most-once guarantee and must not use the scope again after this returns.
11
+ */
12
+ export declare function closeConnectorScope(connector: Connector, ctx: ConnectorContext): Promise<void>;
13
+ //# sourceMappingURL=connector-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-scope.d.ts","sourceRoot":"","sources":["../src/connector-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9D;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,gBAAgB,GACpB,OAAO,CAAC,IAAI,CAAC,CAsBf"}
@@ -0,0 +1,35 @@
1
+ /** Enough for local transport abort/close without letting cleanup own latency. */
2
+ const CONNECTOR_SCOPE_CLOSE_BUDGET_MS = 100;
3
+ /**
4
+ * Tell a connector that a scope owned by the core has ended.
5
+ *
6
+ * Scope teardown is deliberately best-effort: a missing hook is a no-op and a
7
+ * rejected hook is swallowed so cleanup can never replace the probe result that
8
+ * caused it. The hook gets a small, fixed completion window so edge runtimes do
9
+ * not cut off a real close as the response ends, but one that never settles
10
+ * cannot hold the completed probe open indefinitely. Callers own the
11
+ * at-most-once guarantee and must not use the scope again after this returns.
12
+ */
13
+ export async function closeConnectorScope(connector, ctx) {
14
+ try {
15
+ const closing = connector.closeScope?.(ctx);
16
+ if (!closing)
17
+ return;
18
+ await new Promise((resolve) => {
19
+ const timer = setTimeout(resolve, CONNECTOR_SCOPE_CLOSE_BUDGET_MS);
20
+ // Both handlers stay attached after the timer wins, so a late rejection
21
+ // is still consumed rather than becoming an unhandled rejection.
22
+ closing.then(() => {
23
+ clearTimeout(timer);
24
+ resolve();
25
+ }, () => {
26
+ clearTimeout(timer);
27
+ resolve();
28
+ });
29
+ });
30
+ }
31
+ catch {
32
+ // The scope is over whether or not the connector managed to clean it up.
33
+ }
34
+ }
35
+ //# sourceMappingURL=connector-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-scope.js","sourceRoot":"","sources":["../src/connector-scope.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,SAAoB,EACpB,GAAqB;IAErB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YAClC,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC;YACnE,wEAAwE;YACxE,iEAAiE;YACjE,OAAO,CAAC,IAAI,CACV,GAAG,EAAE;gBACH,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,EAAE,CAAC;YACZ,CAAC,EACD,GAAG,EAAE;gBACH,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,EAAE,CAAC;YACZ,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,yEAAyE;IAC3E,CAAC;AACH,CAAC"}