@zackbart/connecta 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -0
- package/README.md +11 -0
- package/dist/access-tokens.d.ts +38 -0
- package/dist/access-tokens.js +294 -0
- package/dist/artifacts/document.js +6 -2
- package/dist/artifacts/markdown.js +43 -14
- package/dist/artifacts/routes.js +27 -4
- package/dist/artifacts/validate.js +1 -0
- package/dist/auth/downstream-oauth.js +397 -48
- package/dist/auth/oauth-start-reset.js +20 -0
- package/dist/branding.d.ts +87 -0
- package/dist/branding.js +170 -1
- package/dist/connectors/remote-mcp.js +32 -7
- package/dist/execute.js +7 -8
- package/dist/identity.js +2 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +13 -2
- package/dist/module-contracts.d.ts +5 -0
- package/dist/oauth-callback-outcome.js +43 -18
- package/dist/operator-ui/generated.js +2 -2
- package/dist/operator-ui/model.d.ts +1 -0
- package/dist/operator-ui/view.js +304 -33
- package/dist/page-styles.js +7 -0
- package/dist/registry.js +16 -13
- package/dist/routes/access-tokens.js +110 -0
- package/dist/routes/mcp.js +5 -1
- package/dist/routes/oauth-management.js +66 -12
- package/dist/routes/oauth.js +54 -87
- package/dist/routes/shared.d.ts +3 -1
- package/dist/routes/shared.js +6 -1
- package/dist/routes/ui.js +9 -1
- package/dist/server.js +8 -5
- package/dist/skills.js +6 -6
- package/dist/types.d.ts +5 -0
- package/dist/ui.d.ts +6 -1
- package/dist/ui.js +27 -64
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/architecture.md +19 -9
- package/documentation/auth.md +166 -2
- package/documentation/code-mode.md +15 -15
- package/documentation/meta-tools.md +12 -5
- package/ethos.md +1 -1
- package/package.json +5 -1
- package/templates/node/README.md +11 -0
- package/templates/node/package.json +1 -1
- package/templates/node/src/index.ts +5 -1
package/templates/node/README.md
CHANGED
|
@@ -179,3 +179,14 @@ Doctor verifies the MCP contract. Verify UI behavior separately: sign in at `/`,
|
|
|
179
179
|
confirm the visible connections and their permitted auth controls, and check
|
|
180
180
|
Activity only when you enabled a readable history store. A missing optional
|
|
181
181
|
feature should not leave a tab behind.
|
|
182
|
+
|
|
183
|
+
### Existing client tokens
|
|
184
|
+
|
|
185
|
+
Upgrading from v0.23 does not require rotating managed `cta_…` tokens. Import
|
|
186
|
+
`accessTokens` from `@zackbart/connecta/auth/access-tokens`, replace the old
|
|
187
|
+
`accessTokens: true` with `accessTokens: accessTokens(storage)`, and keep the
|
|
188
|
+
same persistent storage namespace and identity/tool/pool grant rules. Enable
|
|
189
|
+
`identity.accessTokenManagement` only for the interactive operators who should
|
|
190
|
+
manage tokens. New issuance needs storage with atomic `compareAndSet`; older
|
|
191
|
+
storage adapters can still verify existing tokens. See the package's
|
|
192
|
+
`documentation/auth.md` for the migration and storage requirements.
|
|
@@ -27,6 +27,7 @@ import { operatorUi } from "@zackbart/connecta/ui";
|
|
|
27
27
|
import { api, createConnecta } from "@zackbart/connecta";
|
|
28
28
|
import { fileStorage, listen } from "@zackbart/connecta/node";
|
|
29
29
|
import { quickJsExecutor } from "@zackbart/connecta/quickjs";
|
|
30
|
+
// import { accessTokens } from "@zackbart/connecta/auth/access-tokens";
|
|
30
31
|
// import { artifacts, kvArtifactStore } from "@zackbart/connecta/artifacts";
|
|
31
32
|
// Operator sign-in. Needs `npm install @clerk/backend` — it is an optional
|
|
32
33
|
// peer, so it does not install with Connecta.
|
|
@@ -63,6 +64,8 @@ const storage = fileStorage(stateFile);
|
|
|
63
64
|
|
|
64
65
|
const connecta = createConnecta({
|
|
65
66
|
storage,
|
|
67
|
+
// Reuse this storage to keep v0.23 client tokens without rotating secrets.
|
|
68
|
+
// accessTokens: accessTokens(storage),
|
|
66
69
|
auth: [
|
|
67
70
|
bearerToken(token, { subjectId: "operator" }),
|
|
68
71
|
// clerkAuth({
|
|
@@ -74,7 +77,7 @@ const connecta = createConnecta({
|
|
|
74
77
|
// // allowedDomains: ["acme.com"],
|
|
75
78
|
// }),
|
|
76
79
|
],
|
|
77
|
-
// Code-owned identity resolvers.
|
|
80
|
+
// Code-owned identity resolvers. Connection management permissions default to
|
|
78
81
|
// none, so the template grants them. The commented pair is the optional
|
|
79
82
|
// member/operator split for Clerk-backed deployments: connector access is
|
|
80
83
|
// derived from the authenticated identity and cannot be selected by an MCP
|
|
@@ -86,6 +89,7 @@ const connecta = createConnecta({
|
|
|
86
89
|
// connectorAccess: ({ principal }) =>
|
|
87
90
|
// principal?.id === "user_admin" ? "all" : ["time"],
|
|
88
91
|
// activityAccess: ({ id }) => id === "user_admin",
|
|
92
|
+
// accessTokenManagement: ({ principal }) => principal?.id === "user_admin",
|
|
89
93
|
},
|
|
90
94
|
publicUrl,
|
|
91
95
|
// Required: model-written programs run in a bounded QuickJS child.
|