- cloud: resolves userId from the authenticated session and builds a [userOrgScope, orgScope] stack via createScopedExecutor(userId, orgId, orgName). userId threaded through execution-stack, mcp-session, and MCP dispatch init. - cloud env refactor: deletes the lazy Proxy apps/cloud/src/env.ts in favor of cloudflare:workers env imported at call sites; adds env-augment.d.ts to type secrets not present in generated wrangler types. - cloud/server.ts: env-guarded OTEL wiring (skips instrument() when AXIOM_TOKEN absent); captures rawFetch before instrument() mutates it so dev requests still land on the Hono app. - cloud/services/db.ts: prefers DATABASE_URL over the hyperdrive proxy so local dev works without the tunnel. - vite.config.ts: devCrashGuard plugin that prints uncaught Worker errors with a stable exit. - hosts/mcp: optional debug flag surfaces verbose session logging, wired up from cloud mcp-session. - local/examples/marketing: migrated to scopes: [scope].
Showing the changes to examples/all-plugins/src (1 of 25 files). Show all
Unified · Split
| @@ -83,7 +83,7 @@ const plugins = [ · 82 unmodified lines | ||
| 83 | 83 | ] as const; |
| 84 | 84 | |
| 85 | 85 | const config = { |
| 86 | − scope, | |
| 86 | + scopes: [scope], | |
| 87 | 87 | adapter: makeMemoryAdapter({ schema: collectSchemas(plugins) }), |
| 88 | 88 | blobs: makeInMemoryBlobStore(), |
| 89 | 89 | plugins, |
| @@ -208,6 +208,7 @@ const program = Effect.gen(function* () { · 118 unmodified lines | ||
| 208 | 208 | yield* executor.secrets.set( |
| 209 | 209 | new SetSecretInput({ |
| 210 | 210 | id: SecretId.make("example-api-token"), |
| 211 | + scope: "example-scope" as SetSecretInput["scope"], | |
| 211 | 212 | name: "Example API Token", |
| 212 | 213 | value: "sk-example-redacted", |
| 213 | 214 | provider: "file", |
| @@ -262,6 +263,7 @@ const program = Effect.gen(function* () { · 48 unmodified lines | ||
| 262 | 263 | spec: exampleOpenApiSpec, |
| 263 | 264 | namespace: "example-api", |
| 264 | 265 | baseUrl: "https://example.com/api", |
| 266 | + scope: "example-scope", | |
| 265 | 267 | }); |
| 266 | 268 | console.log("Registered OpenAPI source:", addSpecResult); |
| 267 | 269 | |
| @@ -371,6 +373,7 @@ const program = Effect.gen(function* () { · 103 unmodified lines | ||
| 371 | 373 | endpoint: "https://example.com/graphql", |
| 372 | 374 | introspectionJson, |
| 373 | 375 | namespace: "example-graphql", |
| 376 | + scope: "example-scope", | |
| 374 | 377 | }); |
| 375 | 378 | console.log("Registered GraphQL source:", gqlResult); |
| 376 | 379 | |