- 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 apps/cloud/src/mcp-session.e2e.node.test.ts (1 of 25 files). Show all
Unified · Split
| @@ -122,7 +122,7 @@ const buildScopedExecutor = ( · 121 unmodified lines | |||
| 122 | name: scopeName, | 122 | name: scopeName, |
| 123 | createdAt: new Date(), | 123 | createdAt: new Date(), |
| 124 | }); | 124 | }); |
| 125 | return yield* createExecutor({ scope, adapter, blobs, plugins }); | 125 | return yield* createExecutor({ scopes: [scope], adapter, blobs, plugins }); |
| 126 | }); | 126 | }); |
| 127 | 127 | ||
| 128 | // Builds a scope, wires a real execution engine + MCP server, and yields | 128 | // Builds a scope, wires a real execution engine + MCP server, and yields |