@superblocksteam/gateway 2.0.177-next.0 → 2.0.178-next.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.
- package/README.md +52 -19
- package/dist/agents/hosted-boundary.d.ts +36 -0
- package/dist/agents/hosted-boundary.d.ts.map +1 -0
- package/dist/agents/hosted-boundary.js +66 -0
- package/dist/agents/hosted-boundary.js.map +1 -0
- package/dist/agents/resolve-orchestrator-url.d.ts +8 -0
- package/dist/agents/resolve-orchestrator-url.d.ts.map +1 -1
- package/dist/agents/resolve-orchestrator-url.js +5 -0
- package/dist/agents/resolve-orchestrator-url.js.map +1 -1
- package/dist/capabilities/integration-metadata.d.ts.map +1 -1
- package/dist/capabilities/integration-metadata.js +12 -1
- package/dist/capabilities/integration-metadata.js.map +1 -1
- package/dist/capabilities/lifecycle.d.ts +1 -6
- package/dist/capabilities/lifecycle.d.ts.map +1 -1
- package/dist/capabilities/lifecycle.js +339 -21
- package/dist/capabilities/lifecycle.js.map +1 -1
- package/dist/capabilities/live-state-attaches.d.ts +28 -0
- package/dist/capabilities/live-state-attaches.d.ts.map +1 -1
- package/dist/capabilities/live-state-attaches.js +33 -0
- package/dist/capabilities/live-state-attaches.js.map +1 -1
- package/dist/capabilities/query-integration.d.ts.map +1 -1
- package/dist/capabilities/query-integration.js +12 -1
- package/dist/capabilities/query-integration.js.map +1 -1
- package/dist/capabilities/tool-permission-reply.d.ts.map +1 -1
- package/dist/capabilities/tool-permission-reply.js.map +1 -1
- package/dist/capabilities/types.d.ts +3 -4
- package/dist/capabilities/types.d.ts.map +1 -1
- package/dist/capabilities/types.js.map +1 -1
- package/dist/capture/browser-contract.d.ts +1 -18
- package/dist/capture/browser-contract.d.ts.map +1 -1
- package/dist/capture/browser-contract.js +1 -13
- package/dist/capture/browser-contract.js.map +1 -1
- package/dist/capture/browser-instructions.d.ts +3 -3
- package/dist/capture/browser-instructions.d.ts.map +1 -1
- package/dist/capture/browser-instructions.js +4 -5
- package/dist/capture/browser-instructions.js.map +1 -1
- package/dist/capture/capture-library-probe.d.ts +0 -1
- package/dist/capture/capture-library-probe.d.ts.map +1 -1
- package/dist/capture/capture-library-probe.js +1 -1
- package/dist/capture/capture-library-probe.js.map +1 -1
- package/dist/capture/capture-library.d.ts +2 -1
- package/dist/capture/capture-library.d.ts.map +1 -1
- package/dist/capture/classify-library-paint.d.ts +2 -1
- package/dist/capture/classify-library-paint.d.ts.map +1 -1
- package/dist/capture/library-parent-script.d.ts +3 -2
- package/dist/capture/library-parent-script.d.ts.map +1 -1
- package/dist/capture/mode.d.ts +2 -3
- package/dist/capture/mode.d.ts.map +1 -1
- package/dist/capture/mode.js +2 -3
- package/dist/capture/mode.js.map +1 -1
- package/dist/config.d.ts +21 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/debug.js.map +1 -1
- package/dist/deps.d.ts +3 -3
- package/dist/health/readiness.d.ts +2 -1
- package/dist/health/readiness.d.ts.map +1 -1
- package/dist/http/main.d.ts +3 -0
- package/dist/http/main.d.ts.map +1 -0
- package/dist/http/main.js +11 -0
- package/dist/http/main.js.map +1 -0
- package/dist/http/serve.d.ts +26 -0
- package/dist/http/serve.d.ts.map +1 -0
- package/dist/http/serve.js +298 -0
- package/dist/http/serve.js.map +1 -0
- package/dist/integrations/filters.d.ts.map +1 -1
- package/dist/integrations/filters.js +1 -16
- package/dist/integrations/filters.js.map +1 -1
- package/dist/integrations/map.d.ts +0 -5
- package/dist/integrations/map.d.ts.map +1 -1
- package/dist/integrations/map.js +1 -1
- package/dist/integrations/map.js.map +1 -1
- package/dist/internal-ingress.d.ts +47 -0
- package/dist/internal-ingress.d.ts.map +1 -0
- package/dist/internal-ingress.js +90 -0
- package/dist/internal-ingress.js.map +1 -0
- package/dist/orchestrator/client.d.ts +11 -5
- package/dist/orchestrator/client.d.ts.map +1 -1
- package/dist/orchestrator/client.js +14 -3
- package/dist/orchestrator/client.js.map +1 -1
- package/dist/playwright/ensure-chromium.js.map +1 -1
- package/dist/preview/capture-screenshot.d.ts +2 -2
- package/dist/preview/capture-screenshot.d.ts.map +1 -1
- package/dist/preview/capture-screenshot.js +2 -2
- package/dist/preview/capture-screenshot.js.map +1 -1
- package/dist/process/fault-barrier.d.ts +4 -3
- package/dist/process/fault-barrier.d.ts.map +1 -1
- package/dist/sabs/app-state.d.ts +2 -13
- package/dist/sabs/app-state.d.ts.map +1 -1
- package/dist/sabs/app-state.js +7 -2
- package/dist/sabs/app-state.js.map +1 -1
- package/dist/sabs/awaited-decision.d.ts.map +1 -1
- package/dist/sabs/browser-context.d.ts +4 -1
- package/dist/sabs/browser-context.d.ts.map +1 -1
- package/dist/sabs/browser-context.js +1 -0
- package/dist/sabs/browser-context.js.map +1 -1
- package/dist/sabs/editor-client-methods.d.ts.map +1 -1
- package/dist/sabs/editor-client-methods.js +1 -1
- package/dist/sabs/editor-client-methods.js.map +1 -1
- package/dist/sabs/editor-socket.d.ts.map +1 -1
- package/dist/sabs/editor-socket.js.map +1 -1
- package/dist/sabs/session-peer.d.ts +13 -1
- package/dist/sabs/session-peer.d.ts.map +1 -1
- package/dist/sabs/session-peer.js.map +1 -1
- package/dist/sabs/streamed-reply.d.ts.map +1 -1
- package/dist/sabs/streamed-reply.js.map +1 -1
- package/dist/sabs/turn-collector.d.ts.map +1 -1
- package/dist/sabs/turn-collector.js.map +1 -1
- package/dist/sabs/websocket-session-peer.d.ts +17 -1
- package/dist/sabs/websocket-session-peer.d.ts.map +1 -1
- package/dist/sabs/websocket-session-peer.js +89 -15
- package/dist/sabs/websocket-session-peer.js.map +1 -1
- package/dist/server/client.d.ts +48 -0
- package/dist/server/client.d.ts.map +1 -1
- package/dist/server/client.js +91 -173
- package/dist/server/client.js.map +1 -1
- package/dist/server/identity-reads.d.ts +5 -3
- package/dist/server/identity-reads.d.ts.map +1 -1
- package/dist/server/identity-reads.js +31 -4
- package/dist/server/identity-reads.js.map +1 -1
- package/dist/start.d.ts +5 -1
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +23 -9
- package/dist/start.js.map +1 -1
- package/dist/stores/memory.d.ts.map +1 -1
- package/dist/stores/types.d.ts +2 -1
- package/dist/stores/types.d.ts.map +1 -1
- package/dist/telemetry/mcp-client.d.ts +2 -1
- package/dist/telemetry/mcp-client.d.ts.map +1 -1
- package/dist/telemetry/mcp-client.js.map +1 -1
- package/dist/telemetry/mcp-usage.d.ts +22 -0
- package/dist/telemetry/mcp-usage.d.ts.map +1 -0
- package/dist/telemetry/mcp-usage.js +102 -0
- package/dist/telemetry/mcp-usage.js.map +1 -0
- package/dist/telemetry/metrics.d.ts +9 -0
- package/dist/telemetry/metrics.d.ts.map +1 -1
- package/dist/telemetry/metrics.js +21 -0
- package/dist/telemetry/metrics.js.map +1 -1
- package/dist/telemetry/runtime.d.ts +2 -1
- package/dist/telemetry/runtime.d.ts.map +1 -1
- package/dist/telemetry/runtime.js +18 -5
- package/dist/telemetry/runtime.js.map +1 -1
- package/dist/transports/mcp/admin-tools.d.ts +3 -7
- package/dist/transports/mcp/admin-tools.d.ts.map +1 -1
- package/dist/transports/mcp/admin-tools.js +9 -82
- package/dist/transports/mcp/admin-tools.js.map +1 -1
- package/dist/transports/mcp/app-status-html.d.ts +2 -2
- package/dist/transports/mcp/app-status-html.d.ts.map +1 -1
- package/dist/transports/mcp/app-status-html.js +1 -27
- package/dist/transports/mcp/app-status-html.js.map +1 -1
- package/dist/transports/mcp/client-presentation.d.ts +10 -13
- package/dist/transports/mcp/client-presentation.d.ts.map +1 -1
- package/dist/transports/mcp/client-presentation.js +2 -14
- package/dist/transports/mcp/client-presentation.js.map +1 -1
- package/dist/transports/mcp/decision-elicitation.js +23 -1
- package/dist/transports/mcp/decision-elicitation.js.map +1 -1
- package/dist/transports/mcp/dispatch-probe.js.map +1 -1
- package/dist/transports/mcp/editor-document-probe.js.map +1 -1
- package/dist/transports/mcp/editor-integration-setup-url.d.ts +0 -1
- package/dist/transports/mcp/editor-integration-setup-url.d.ts.map +1 -1
- package/dist/transports/mcp/editor-integration-setup-url.js +0 -3
- package/dist/transports/mcp/editor-integration-setup-url.js.map +1 -1
- package/dist/transports/mcp/format-tool-content.js +1 -1
- package/dist/transports/mcp/format-tool-content.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/build-app.d.ts +2 -3
- package/dist/transports/mcp/instructions/tools/build-app.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/build-app.js +5 -11
- package/dist/transports/mcp/instructions/tools/build-app.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/check-app-progress.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/check-app-progress.js +1 -25
- package/dist/transports/mcp/instructions/tools/check-app-progress.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/check-publish-progress.d.ts +1 -2
- package/dist/transports/mcp/instructions/tools/check-publish-progress.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/check-publish-progress.js +2 -11
- package/dist/transports/mcp/instructions/tools/check-publish-progress.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/copy.d.ts +1 -8
- package/dist/transports/mcp/instructions/tools/copy.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/copy.js +4 -28
- package/dist/transports/mcp/instructions/tools/copy.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/create-integration.d.ts +1 -2
- package/dist/transports/mcp/instructions/tools/create-integration.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/create-integration.js +4 -8
- package/dist/transports/mcp/instructions/tools/create-integration.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/edit-app.js +2 -2
- package/dist/transports/mcp/instructions/tools/edit-app.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/get-app.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/get-app.js +1 -23
- package/dist/transports/mcp/instructions/tools/get-app.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/index.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/index.js +0 -4
- package/dist/transports/mcp/instructions/tools/index.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/publish-app.d.ts +1 -2
- package/dist/transports/mcp/instructions/tools/publish-app.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/publish-app.js +1 -10
- package/dist/transports/mcp/instructions/tools/publish-app.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/start-app.d.ts +1 -2
- package/dist/transports/mcp/instructions/tools/start-app.d.ts.map +1 -1
- package/dist/transports/mcp/instructions/tools/start-app.js +3 -3
- package/dist/transports/mcp/instructions/tools/start-app.js.map +1 -1
- package/dist/transports/mcp/mount.d.ts +8 -15
- package/dist/transports/mcp/mount.d.ts.map +1 -1
- package/dist/transports/mcp/mount.js +233 -206
- package/dist/transports/mcp/mount.js.map +1 -1
- package/dist/transports/mcp/plan-approval.d.ts.map +1 -1
- package/dist/transports/mcp/plan-approval.js.map +1 -1
- package/dist/transports/mcp/tool-permissions.d.ts +30 -0
- package/dist/transports/mcp/tool-permissions.d.ts.map +1 -0
- package/dist/transports/mcp/tool-permissions.js +39 -0
- package/dist/transports/mcp/tool-permissions.js.map +1 -0
- package/package.json +28 -22
- package/skills/superblocks-import/SKILL.md +5 -3
- package/dist/capture/cowork-editor-url.d.ts +0 -7
- package/dist/capture/cowork-editor-url.d.ts.map +0 -1
- package/dist/capture/cowork-editor-url.js +0 -12
- package/dist/capture/cowork-editor-url.js.map +0 -1
- package/dist/transports/mcp/native-browser-presence.d.ts +0 -46
- package/dist/transports/mcp/native-browser-presence.d.ts.map +0 -1
- package/dist/transports/mcp/native-browser-presence.js +0 -158
- package/dist/transports/mcp/native-browser-presence.js.map +0 -1
- package/skills/superblocks-build/SKILL.md +0 -59
package/dist/config.d.ts
CHANGED
|
@@ -9,6 +9,20 @@ export type GatewayConfig = {
|
|
|
9
9
|
* screenshots and a live-edit session it never opens on this machine.
|
|
10
10
|
*/
|
|
11
11
|
adminToolsOnly: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Served over HTTP from AgentCore Runtime instead of the CLI's stdio. The
|
|
14
|
+
* host filesystem is the microVM's, not the user's, so `upload_artifact`
|
|
15
|
+
* takes no `filePath`. Set by the HTTP entrypoint, never from an env var.
|
|
16
|
+
*/
|
|
17
|
+
hosted: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The host puts each decision to the user with its own question form, and
|
|
20
|
+
* the agent sends back what the user chose. Set by whatever starts this
|
|
21
|
+
* process for such a host, such as the Cowork plugin bundle
|
|
22
|
+
* (GATEWAY_HOST_COLLECTS_APPROVALS), never by anything the model can reach.
|
|
23
|
+
* See `hostCollectsApprovals` in mount.ts.
|
|
24
|
+
*/
|
|
25
|
+
hostCollectsApprovals: boolean;
|
|
12
26
|
/**
|
|
13
27
|
* Where `upload_artifact` looks when it was handed only a file name or a
|
|
14
28
|
* sandbox path that does not exist on this host.
|
|
@@ -105,6 +119,12 @@ export type GatewayConfig = {
|
|
|
105
119
|
*/
|
|
106
120
|
profileKey: string;
|
|
107
121
|
serverUrl: string;
|
|
122
|
+
/**
|
|
123
|
+
* Kong's internal load balancer, which the hosted Platform MCP's runtime
|
|
124
|
+
* reaches the server and live-edit pods through. Unset everywhere else, where
|
|
125
|
+
* they are reached at their public URLs.
|
|
126
|
+
*/
|
|
127
|
+
internalIngress?: string;
|
|
108
128
|
turnTtlMs: number;
|
|
109
129
|
uiBaseUrl: string;
|
|
110
130
|
/**
|
|
@@ -126,7 +146,7 @@ export type GatewayConfig = {
|
|
|
126
146
|
/**
|
|
127
147
|
* Setup-time scan: a host browser MCP (@playwright/mcp, chrome-devtools,
|
|
128
148
|
* puppeteer, agent-browser) was listed in the client config. Config on disk
|
|
129
|
-
* can lie
|
|
149
|
+
* can lie, so it does not prove this turn has a browser driver.
|
|
130
150
|
*/
|
|
131
151
|
captureHostMcp: boolean;
|
|
132
152
|
/** Scanned host browser MCP args included --isolated (IdP cookies die). */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1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;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;;OAGG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,2EAA2E;IAC3E,mBAAmB,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAiEF,wBAAgB,UAAU,CACxB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,aAAa,CAoGf"}
|
package/dist/config.js
CHANGED
|
@@ -70,6 +70,8 @@ export function loadConfig(env = process.env) {
|
|
|
70
70
|
deploymentEnvironmentName,
|
|
71
71
|
localAgentMode,
|
|
72
72
|
adminToolsOnly,
|
|
73
|
+
hosted: false,
|
|
74
|
+
hostCollectsApprovals: isTruthyFlag(readEnv(env, "GATEWAY_HOST_COLLECTS_APPROVALS")),
|
|
73
75
|
importSearchDirs: resolveImportSearchDirs(env),
|
|
74
76
|
beatLostGraceMs: Number(readEnv(env, "GATEWAY_BEAT_LOST_GRACE_MS") ?? String(60_000)),
|
|
75
77
|
heldSessionIdleMs: Number(readEnv(env, "GATEWAY_HELD_SESSION_IDLE_MS") ?? String(30 * 60 * 1000)),
|
|
@@ -97,6 +99,7 @@ export function loadConfig(env = process.env) {
|
|
|
97
99
|
publishPollIntervalMs: Number(readEnv(env, "GATEWAY_PUBLISH_POLL_INTERVAL_MS") ?? "2000"),
|
|
98
100
|
profileKey: required(env, "GATEWAY_PROFILE_KEY", "default"),
|
|
99
101
|
serverUrl: required(env, "SUPERBLOCKS_SERVER_URL", readEnv(env, "GATEWAY_SERVER_URL") ?? baseUrl ?? "http://localhost:8080"),
|
|
102
|
+
internalIngress: readEnv(env, "GATEWAY_INTERNAL_INGRESS"),
|
|
100
103
|
turnTtlMs: Number(readEnv(env, "GATEWAY_TURN_TTL_MS") ?? DEFAULT_STEP_UP_TTL_MS),
|
|
101
104
|
uiBaseUrl: required(env, "GATEWAY_UI_BASE_URL", baseUrl ?? "http://localhost:3000"),
|
|
102
105
|
deployedShellBaseUrl: readEnv(env, "GATEWAY_DEPLOYED_SHELL_BASE_URL"),
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAkK3D;;;;;;;GAOG;AACH,SAAS,OAAO,CAAC,GAAsB,EAAE,IAAY;IACnD,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;AACxC,CAAC;AAED,SAAS,QAAQ,CACf,GAAsB,EACtB,IAAY,EACZ,QAAiB;IAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC;IAC7C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,uBAAuB,CAA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ACrE,mBAAmB,EAAE,OAAO,CAAC,GAAG,EAAE,gCAAgC,CAAC;QACnE,sBAAsB,EACpB,OAAO,CAAC,GAAG,EAAE,kCAAkC,CAAC,KAAK,MAAM;YAC3D,OAAO,CAAC,GAAG,EAAE,kCAAkC,CAAC,KAAK,GAAG;QAC1D,cAAc,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,0BAA0B,CAAC,CAAC;QACtE,mBAAmB,EAAE,YAAY,CAC/B,OAAO,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAC9C;KACF,CAAC;AACJ,CAAC"}
|
package/dist/debug.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEhD,MAAM,UAAU,iBAAiB,CAC/B,OAAe,EACf,
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEhD,MAAM,UAAU,iBAAiB,CAC/B,OAAe,EACf,UAAU,GAA4B,EAAE;IAExC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IACD,YAAY,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,EAAE,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
package/dist/deps.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import type { SuperblocksServerClient } from "./server/client.js";
|
|
|
5
5
|
import type { ProgressStore, RecentAppStore, StepUpTurnStore } from "./stores/types.js";
|
|
6
6
|
import type { McpClientTelemetry } from "./telemetry/mcp-client.js";
|
|
7
7
|
/**
|
|
8
|
-
* Runtime collaborators for one Gateway process
|
|
9
|
-
*
|
|
10
|
-
* client.
|
|
8
|
+
* Runtime collaborators for one Gateway process, served over the CLI's stdio
|
|
9
|
+
* or over HTTP on AgentCore Runtime. Tests build the same bag and connect an
|
|
10
|
+
* in-memory client.
|
|
11
11
|
*/
|
|
12
12
|
export type AppDeps = {
|
|
13
13
|
/** Per-application facts shared by the session peer and the capabilities. */
|
|
@@ -22,7 +22,7 @@ export type ReadinessVerdict = {
|
|
|
22
22
|
* dispatch path. Resolving means it can; throwing or hanging means it cannot.
|
|
23
23
|
*/
|
|
24
24
|
export type DispatchProbe = () => Promise<void>;
|
|
25
|
-
|
|
25
|
+
type UpstreamProbe = () => Promise<UpstreamState>;
|
|
26
26
|
export type GatewayReadinessOptions = {
|
|
27
27
|
cacheMs?: number;
|
|
28
28
|
dispatchDeadlineMs?: number;
|
|
@@ -97,4 +97,5 @@ export declare class GatewayReadiness {
|
|
|
97
97
|
private log;
|
|
98
98
|
private probeUpstream;
|
|
99
99
|
}
|
|
100
|
+
export {};
|
|
100
101
|
//# sourceMappingURL=readiness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../../src/health/readiness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAUhE;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,IAAI,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,aAAa,CAAC;IACxB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,KAAK,E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AAK,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,aAAa,CAehB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAElD,YAAY,OAAO,EAAE,uBAAuB,EAE3C;IAED;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAE3C;IAED;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAIrC;IAEK,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAE1C;IAEK,SAAS,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAE3C;YAEa,OAAO;IAqBrB;;;;OAIG;YACW,KAAK;YAYL,QAAQ;YAUR,aAAa;IA6C3B,OAAO,CAAC,GAAG;YAOG,aAAa;CAW5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/http/main.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { startHttpGateway } from "./serve.js";
|
|
3
|
+
// AgentCore always uses 8000. Running from source next to other stacks needs another port.
|
|
4
|
+
const gateway = await startHttpGateway({
|
|
5
|
+
port: Number(process.env.GATEWAY_HTTP_PORT) || undefined,
|
|
6
|
+
});
|
|
7
|
+
// Close on a stop signal so the last telemetry batch is sent.
|
|
8
|
+
process.once("SIGTERM", () => {
|
|
9
|
+
void gateway.close().finally(() => process.exit(0));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/http/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,2FAA2F;AAC3F,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,SAAS;CACzD,CAAC,CAAC;AACH,8DAA8D;AAC9D,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;IAC3B,KAAK,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** AgentCore Runtime passes the caller's token through in this header. */
|
|
2
|
+
export declare const USER_TOKEN_HEADER = "x-amzn-bedrock-agentcore-runtime-custom-user-token";
|
|
3
|
+
export type StartedHttpGateway = {
|
|
4
|
+
close: () => Promise<void>;
|
|
5
|
+
port: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Serves the Platform MCP on AgentCore Runtime's MCP contract: streamable HTTP
|
|
9
|
+
* on `/mcp` and a health check on `/ping`.
|
|
10
|
+
*
|
|
11
|
+
* One process is one microVM, which AgentCore gives to one user. It can still
|
|
12
|
+
* see more than one MCP session (AgentCore's own handshake, then the client's),
|
|
13
|
+
* so each session gets its own MCP server over one shared runtime.
|
|
14
|
+
*/
|
|
15
|
+
export declare function startHttpGateway({ host, port, }?: {
|
|
16
|
+
host?: string;
|
|
17
|
+
port?: number;
|
|
18
|
+
}): Promise<StartedHttpGateway>;
|
|
19
|
+
/** The token background work may use, or why it may not. */
|
|
20
|
+
export declare function usableToken(token: string | undefined): string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a JWT's `exp` has passed. A personal access token is not a JWT and
|
|
23
|
+
* has no expiry we can read, so it never counts as expired here.
|
|
24
|
+
*/
|
|
25
|
+
export declare function jwtExpired(token: string, now?: number): boolean;
|
|
26
|
+
//# sourceMappingURL=serve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/http/serve.ts"],"names":[],"mappings":"AAkBA,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,uDACwB,CAAC;AAWvD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,IAAgB,EAChB,IAAW,GACZ,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiOrE;AAED,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAU7D;AAgBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,OAAO,CASnE"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { createServer, } from "node:http";
|
|
4
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
5
|
+
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
import { internalIngress } from "../internal-ingress.js";
|
|
7
|
+
import { installFaultBarrier } from "../process/fault-barrier.js";
|
|
8
|
+
import { HttpSuperblocksServerClient } from "../server/client.js";
|
|
9
|
+
import { IdentityUnavailableError } from "../server/identity-reads.js";
|
|
10
|
+
import { createRuntime } from "../start.js";
|
|
11
|
+
import { createMcpServer } from "../transports/mcp/mount.js";
|
|
12
|
+
/** AgentCore Runtime passes the caller's token through in this header. */
|
|
13
|
+
export const USER_TOKEN_HEADER = "x-amzn-bedrock-agentcore-runtime-custom-user-token";
|
|
14
|
+
/**
|
|
15
|
+
* AgentCore sends its own `initialize` to every microVM before any user is
|
|
16
|
+
* assigned to it, so that handshake comes without a token. Nothing else may.
|
|
17
|
+
*/
|
|
18
|
+
const TOKENLESS_METHODS = new Set(["initialize", "notifications/initialized"]);
|
|
19
|
+
// Bodies read here are handshakes, which are tiny. Larger ones go to the SDK.
|
|
20
|
+
const HANDSHAKE_BODY_LIMIT_BYTES = 64 * 1024;
|
|
21
|
+
/**
|
|
22
|
+
* Serves the Platform MCP on AgentCore Runtime's MCP contract: streamable HTTP
|
|
23
|
+
* on `/mcp` and a health check on `/ping`.
|
|
24
|
+
*
|
|
25
|
+
* One process is one microVM, which AgentCore gives to one user. It can still
|
|
26
|
+
* see more than one MCP session (AgentCore's own handshake, then the client's),
|
|
27
|
+
* so each session gets its own MCP server over one shared runtime.
|
|
28
|
+
*/
|
|
29
|
+
export async function startHttpGateway({ host = "0.0.0.0", port = 8000, } = {}) {
|
|
30
|
+
let latestToken;
|
|
31
|
+
// The token of the /mcp request being served. Each /mcp request brings its
|
|
32
|
+
// own token, which names that request for the audit log, so a tool call and
|
|
33
|
+
// the work it starts (live edit, Clark calling back, prompt-start reads) keep
|
|
34
|
+
// calling the API with it, even after the request ends.
|
|
35
|
+
const requestToken = new AsyncLocalStorage();
|
|
36
|
+
let pinnedUserId;
|
|
37
|
+
const runtime = await createRuntime({
|
|
38
|
+
apiKey: "",
|
|
39
|
+
// Once that token expires, longer work moves on to the newest one.
|
|
40
|
+
getAccessToken: async () => {
|
|
41
|
+
const token = requestToken.getStore();
|
|
42
|
+
return usableToken(token && !jwtExpired(token) ? token : latestToken);
|
|
43
|
+
},
|
|
44
|
+
hosted: true,
|
|
45
|
+
// Keys the plan approval directory, which only this microVM can see.
|
|
46
|
+
sessionKey: "hosted",
|
|
47
|
+
});
|
|
48
|
+
const ingress = runtime.config.internalIngress;
|
|
49
|
+
if (ingress) {
|
|
50
|
+
// Global, so every fetch to the server or a live-edit pod takes it,
|
|
51
|
+
// whichever code in the process makes it.
|
|
52
|
+
const { setGlobalDispatcher } = await import("undici");
|
|
53
|
+
setGlobalDispatcher(await internalIngress.enable(ingress, runtime.config.serverUrl));
|
|
54
|
+
console.error("gateway http reaches the server through", { ingress });
|
|
55
|
+
}
|
|
56
|
+
// The runtime's client sends the latest token, not the one being checked.
|
|
57
|
+
const identities = new HttpSuperblocksServerClient(runtime.config.serverUrl);
|
|
58
|
+
const sessions = new Map();
|
|
59
|
+
// Sessions opened without a token. A request without a token reaches only these.
|
|
60
|
+
const tokenlessSessions = new Set();
|
|
61
|
+
const handleMcp = async (req, res) => {
|
|
62
|
+
const header = req.headers[USER_TOKEN_HEADER];
|
|
63
|
+
const token = (Array.isArray(header) ? header[0] : header)
|
|
64
|
+
?.replace(/^Bearer\s+/i, "")
|
|
65
|
+
.trim();
|
|
66
|
+
const sessionId = req.headers["mcp-session-id"];
|
|
67
|
+
let body;
|
|
68
|
+
if (token) {
|
|
69
|
+
let userId;
|
|
70
|
+
try {
|
|
71
|
+
userId = (await identities.validateApiKey(token))?.userId;
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
if (!(error instanceof IdentityUnavailableError))
|
|
75
|
+
throw error;
|
|
76
|
+
return reject(res, 503, "Superblocks could not check this token.");
|
|
77
|
+
}
|
|
78
|
+
// The identity read is cached, so it can still accept a JWT that just expired.
|
|
79
|
+
if (!userId || jwtExpired(token)) {
|
|
80
|
+
return reject(res, 401, "Superblocks refused this token.");
|
|
81
|
+
}
|
|
82
|
+
if (!pinnedUserId) {
|
|
83
|
+
pinnedUserId = userId;
|
|
84
|
+
console.error("gateway http pinned this server to a user", { userId });
|
|
85
|
+
}
|
|
86
|
+
if (userId !== pinnedUserId) {
|
|
87
|
+
return reject(res, 403, "This session belongs to another user.");
|
|
88
|
+
}
|
|
89
|
+
latestToken = token;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
body = req.method === "POST" ? await readJson(req) : undefined;
|
|
93
|
+
if (!isTokenlessHandshake(body) ||
|
|
94
|
+
(typeof sessionId === "string" && !tokenlessSessions.has(sessionId))) {
|
|
95
|
+
// Shows whether AgentCore sends anything tokenless beyond the handshake.
|
|
96
|
+
console.error("gateway http refused a request without a token", {
|
|
97
|
+
method: req.method,
|
|
98
|
+
rpcMethod: jsonRpcMethod(body)?.slice(0, 100),
|
|
99
|
+
});
|
|
100
|
+
return reject(res, 401, `Missing ${USER_TOKEN_HEADER} header.`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (typeof sessionId === "string") {
|
|
104
|
+
const transport = sessions.get(sessionId);
|
|
105
|
+
if (transport)
|
|
106
|
+
return requestToken.run(token, () => transport.handleRequest(req, res, body));
|
|
107
|
+
// The Superblocks server names the session it opens, so any of its replicas
|
|
108
|
+
// can reach it again. Anything else on an unknown session, however large, is a 404.
|
|
109
|
+
body ??=
|
|
110
|
+
req.method === "POST"
|
|
111
|
+
? await readJson(req).catch(() => undefined)
|
|
112
|
+
: undefined;
|
|
113
|
+
if (!isInitializeRequest(body)) {
|
|
114
|
+
return reject(res, 404, "Session not found.");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
body ??= req.method === "POST" ? await readJson(req) : undefined;
|
|
118
|
+
if (!isInitializeRequest(body)) {
|
|
119
|
+
return reject(res, 400, "Start a session with initialize.");
|
|
120
|
+
}
|
|
121
|
+
// Two Builder calls on a new session both send initialize for the same id.
|
|
122
|
+
// The second goes to the first one's transport, which refuses it. There is
|
|
123
|
+
// no await between this check and claiming the id below.
|
|
124
|
+
const chosenId = typeof sessionId === "string" ? sessionId : undefined;
|
|
125
|
+
const opening = chosenId && sessions.get(chosenId);
|
|
126
|
+
if (opening)
|
|
127
|
+
return requestToken.run(token, () => opening.handleRequest(req, res, body));
|
|
128
|
+
const transport = new StreamableHTTPServerTransport({
|
|
129
|
+
sessionIdGenerator: () => chosenId ?? randomUUID(),
|
|
130
|
+
onsessioninitialized: (id) => {
|
|
131
|
+
console.error("gateway http opened an MCP session", { sessionId: id });
|
|
132
|
+
sessions.set(id, transport);
|
|
133
|
+
if (!token)
|
|
134
|
+
tokenlessSessions.add(id);
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
if (chosenId)
|
|
138
|
+
sessions.set(chosenId, transport);
|
|
139
|
+
// The Superblocks server runs the Admin tools itself and sends only
|
|
140
|
+
// Builder calls here.
|
|
141
|
+
const server = createMcpServer(runtime.deps, { builderToolsOnly: true });
|
|
142
|
+
transport.onclose = () => {
|
|
143
|
+
if (!transport.sessionId)
|
|
144
|
+
return;
|
|
145
|
+
sessions.delete(transport.sessionId);
|
|
146
|
+
tokenlessSessions.delete(transport.sessionId);
|
|
147
|
+
};
|
|
148
|
+
await server.connect(transport);
|
|
149
|
+
await requestToken.run(token, () => transport.handleRequest(req, res, body));
|
|
150
|
+
// An initialize the SDK refused leaves the id free for the next try.
|
|
151
|
+
if (chosenId &&
|
|
152
|
+
!transport.sessionId &&
|
|
153
|
+
sessions.get(chosenId) === transport) {
|
|
154
|
+
sessions.delete(chosenId);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
// AgentCore stops an idle session only once /ping says Healthy and
|
|
158
|
+
// time_of_last_update stops moving, so the time moves only when the status
|
|
159
|
+
// flips.
|
|
160
|
+
let requestsInFlight = 0;
|
|
161
|
+
let status = "Healthy";
|
|
162
|
+
let timeOfLastUpdate = Math.floor(Date.now() / 1000);
|
|
163
|
+
// Called on each request start and end too, so a tool call that fits
|
|
164
|
+
// between two pings still moves the time.
|
|
165
|
+
const updateStatus = () => {
|
|
166
|
+
const turnRunning = runtime.deps.sessionPeer.anyTurnRunning();
|
|
167
|
+
const next = requestsInFlight > 0 || turnRunning ? "HealthyBusy" : "Healthy";
|
|
168
|
+
if (next === status)
|
|
169
|
+
return;
|
|
170
|
+
// Explains after the fact why AgentCore did or did not stop this microVM.
|
|
171
|
+
console.error("gateway http ping status changed", {
|
|
172
|
+
from: status,
|
|
173
|
+
requestsInFlight,
|
|
174
|
+
to: next,
|
|
175
|
+
turnRunning,
|
|
176
|
+
});
|
|
177
|
+
status = next;
|
|
178
|
+
timeOfLastUpdate = Math.floor(Date.now() / 1000);
|
|
179
|
+
};
|
|
180
|
+
const httpServer = createServer((req, res) => {
|
|
181
|
+
const path = new URL(req.url ?? "/", "http://localhost").pathname;
|
|
182
|
+
if (path === "/ping" && req.method === "GET") {
|
|
183
|
+
updateStatus();
|
|
184
|
+
res.writeHead(200, { "content-type": "application/json" });
|
|
185
|
+
res.end(JSON.stringify({ status, time_of_last_update: timeOfLastUpdate }));
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (path !== "/mcp") {
|
|
189
|
+
res.writeHead(404).end();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
// Not GET: that is the client's notification stream, which stays open
|
|
193
|
+
// while the user is idle.
|
|
194
|
+
if (req.method === "POST") {
|
|
195
|
+
requestsInFlight++;
|
|
196
|
+
updateStatus();
|
|
197
|
+
res.on("close", () => {
|
|
198
|
+
requestsInFlight--;
|
|
199
|
+
updateStatus();
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
handleMcp(req, res).catch((error) => {
|
|
203
|
+
if (res.headersSent) {
|
|
204
|
+
console.error("gateway http request failed", error);
|
|
205
|
+
res.end();
|
|
206
|
+
}
|
|
207
|
+
else if (error instanceof SyntaxError ||
|
|
208
|
+
error instanceof BodyTooLargeError) {
|
|
209
|
+
reject(res, 400, error.message);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
console.error("gateway http request failed", error);
|
|
213
|
+
reject(res, 500, "Internal error.");
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
await new Promise((resolve) => httpServer.listen(port, host, resolve));
|
|
218
|
+
const disposeFaultBarrier = installFaultBarrier({
|
|
219
|
+
onFault: () => undefined,
|
|
220
|
+
shutdown: () => runtime.close(),
|
|
221
|
+
});
|
|
222
|
+
const address = httpServer.address();
|
|
223
|
+
const boundPort = typeof address === "object" && address ? address.port : port;
|
|
224
|
+
console.error("gateway MCP listening on http", { host, port: boundPort });
|
|
225
|
+
return {
|
|
226
|
+
port: boundPort,
|
|
227
|
+
close: async () => {
|
|
228
|
+
disposeFaultBarrier();
|
|
229
|
+
await Promise.all([...sessions.values()].map((t) => t.close()));
|
|
230
|
+
httpServer.closeAllConnections();
|
|
231
|
+
await new Promise((resolve) => httpServer.close(() => resolve()));
|
|
232
|
+
await runtime.close();
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/** The token background work may use, or why it may not. */
|
|
237
|
+
export function usableToken(token) {
|
|
238
|
+
if (!token) {
|
|
239
|
+
throw new Error("No Superblocks token has reached this server yet.");
|
|
240
|
+
}
|
|
241
|
+
if (jwtExpired(token)) {
|
|
242
|
+
throw new Error("The Superblocks sign-in for this session expired while this step was running. Send a new request to continue.");
|
|
243
|
+
}
|
|
244
|
+
return token;
|
|
245
|
+
}
|
|
246
|
+
function isTokenlessHandshake(body) {
|
|
247
|
+
const method = jsonRpcMethod(body);
|
|
248
|
+
return method !== undefined && TOKENLESS_METHODS.has(method);
|
|
249
|
+
}
|
|
250
|
+
function jsonRpcMethod(body) {
|
|
251
|
+
return typeof body === "object" &&
|
|
252
|
+
body !== null &&
|
|
253
|
+
"method" in body &&
|
|
254
|
+
typeof body.method === "string"
|
|
255
|
+
? body.method
|
|
256
|
+
: undefined;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Whether a JWT's `exp` has passed. A personal access token is not a JWT and
|
|
260
|
+
* has no expiry we can read, so it never counts as expired here.
|
|
261
|
+
*/
|
|
262
|
+
export function jwtExpired(token, now = Date.now()) {
|
|
263
|
+
const [, payload, signature] = token.split(".");
|
|
264
|
+
if (!payload || signature === undefined)
|
|
265
|
+
return false;
|
|
266
|
+
try {
|
|
267
|
+
const { exp } = JSON.parse(Buffer.from(payload, "base64url").toString());
|
|
268
|
+
return typeof exp === "number" && exp * 1000 <= now;
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
class BodyTooLargeError extends Error {
|
|
275
|
+
}
|
|
276
|
+
async function readJson(req) {
|
|
277
|
+
const chunks = [];
|
|
278
|
+
let size = 0;
|
|
279
|
+
for await (const chunk of req) {
|
|
280
|
+
size += chunk.length;
|
|
281
|
+
if (size > HANDSHAKE_BODY_LIMIT_BYTES) {
|
|
282
|
+
throw new BodyTooLargeError("Request body too large.");
|
|
283
|
+
}
|
|
284
|
+
chunks.push(Buffer.from(chunk));
|
|
285
|
+
}
|
|
286
|
+
return JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
287
|
+
}
|
|
288
|
+
function reject(res, status, message) {
|
|
289
|
+
// Only the status: a JSON parse error message can quote the request body.
|
|
290
|
+
console.error("gateway http refused a request", { status });
|
|
291
|
+
res.writeHead(status, { "content-type": "application/json" });
|
|
292
|
+
res.end(JSON.stringify({
|
|
293
|
+
jsonrpc: "2.0",
|
|
294
|
+
error: { code: -32000, message },
|
|
295
|
+
id: null,
|
|
296
|
+
}));
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/http/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,YAAY,GAGb,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CA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,GAAoB;IAC1C,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,EAAE,CAAC;QAC9B,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC;QACrB,IAAI,IAAI,GAAG,0BAA0B,EAAE,CAAC;YACtC,MAAM,IAAI,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,MAAM,CAAC,GAAmB,EAAE,MAAc,EAAE,OAAe;IAClE,0EAA0E;IAC1E,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC9D,GAAG,CAAC,GAAG,CACL,IAAI,CAAC,SAAS,CAAC;QACb,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE;QAChC,EAAE,EAAE,IAAI;KACT,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/integrations/filters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/integrations/filters.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,aAAa,UAAO,GACnB,OAAO,CAQT"}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Plugin ids Clark cannot use as tools. Mirrored from the UI's
|
|
3
|
-
* `integration-filters` so this package does not depend on `packages/ui`.
|
|
4
|
-
*/
|
|
5
|
-
const UNSUPPORTED_INTEGRATION_TYPES = new Set([
|
|
6
|
-
"confluent",
|
|
7
|
-
"email",
|
|
8
|
-
"gsheets",
|
|
9
|
-
"kafka",
|
|
10
|
-
"kinesis",
|
|
11
|
-
"openai",
|
|
12
|
-
"redis",
|
|
13
|
-
"redpanda",
|
|
14
|
-
"superblocks-ocr",
|
|
15
|
-
"workflow",
|
|
16
|
-
]);
|
|
1
|
+
import { UNSUPPORTED_INTEGRATION_TYPES } from "@superblocksteam/shared";
|
|
17
2
|
/** Ad-hoc types filtered out for SDK-enabled (fullstack) apps. */
|
|
18
3
|
const AD_HOC_INTEGRATION_TYPES = new Set([
|
|
19
4
|
"graphql",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/integrations/filters.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/integrations/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE,kEAAkE;AAClE,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,SAAS;CACV,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,QAAgB,EAChB,aAAa,GAAG,IAAI;IAEpB,IAAI,6BAA6B,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,aAAa,IAAI,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -17,11 +17,6 @@ export type SupersetIntegrationRow = {
|
|
|
17
17
|
readOnly?: boolean;
|
|
18
18
|
};
|
|
19
19
|
export declare function hasBuildPermission(row: SupersetIntegrationRow): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Maps a superset row to the shape Clark expects on `aiGetIntegrations`
|
|
22
|
-
* (no metadata). `applicationId` is the app Clark is building.
|
|
23
|
-
*/
|
|
24
|
-
export declare function toPromptContextIntegrationSummary(row: SupersetIntegrationRow, applicationId?: string): Omit<PromptContextIntegration, "metadata">;
|
|
25
20
|
/**
|
|
26
21
|
* BUILD-filtered, tool-supported integrations for Clark's discovery list.
|
|
27
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/integrations/map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAKtF,sEAAsE;AACtE,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,aAAa,CAAC,EAAE;YAAE,cAAc,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC,CAAC;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAMvE;
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/integrations/map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAKtF,sEAAsE;AACtE,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,aAAa,CAAC,EAAE;YAAE,cAAc,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC,CAAC;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAMvE;AA2BD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,sBAAsB,EAAE,EAC9B,EACE,aAAa,EACb,aAAoB,GACrB,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GAC1D,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,EAAE,CAK9C;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,sBAAsB,EAC3B,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACtC,aAAa,CAAC,EAAE,MAAM,GACrB,wBAAwB,CAK1B"}
|
package/dist/integrations/map.js
CHANGED
|
@@ -16,7 +16,7 @@ function openApiSpecRef(row) {
|
|
|
16
16
|
* Maps a superset row to the shape Clark expects on `aiGetIntegrations`
|
|
17
17
|
* (no metadata). `applicationId` is the app Clark is building.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
function toPromptContextIntegrationSummary(row, applicationId) {
|
|
20
20
|
return {
|
|
21
21
|
...appDatabaseAccessFields(row, applicationId),
|
|
22
22
|
displayName: row.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/integrations/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAkB1D,MAAM,UAAU,kBAAkB,CAAC,GAA2B;IAC5D,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,OAAO,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,mEAAmE;IACnE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;AACvB,CAAC;AAED,SAAS,cAAc,CAAC,GAA2B;IACjD,MAAM,UAAU,GAAG,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,aAAa;QAC5E,EAAE,cAAc,CAAC;IACnB,OAAO,UAAU,IAAI,SAAS,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/integrations/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAkB1D,MAAM,UAAU,kBAAkB,CAAC,GAA2B;IAC5D,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,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