@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/README.md
CHANGED
|
@@ -135,20 +135,20 @@ Restart the MCP host after `setup` and after every rebuild below.
|
|
|
135
135
|
|
|
136
136
|
### Rebuild after source changes
|
|
137
137
|
|
|
138
|
-
Cursor MCP
|
|
139
|
-
`@superblocksteam/gateway
|
|
140
|
-
|
|
138
|
+
Cursor MCP goes through oclif `dist/index.js`, which loads
|
|
139
|
+
`@superblocksteam/gateway` and `@superblocksteam/shared` from their own `dist/`.
|
|
140
|
+
Rebuild the package you changed.
|
|
141
141
|
|
|
142
142
|
| You changed | Rebuild |
|
|
143
143
|
| --------------------------------------------------------------- | ---------------------------------------------- |
|
|
144
144
|
| `packages/shared` (types Gateway imports, e.g. SocketHeartbeat) | `pnpm --filter @superblocksteam/shared build` |
|
|
145
145
|
| `packages/gateway/src` | `pnpm --filter @superblocksteam/gateway build` |
|
|
146
|
-
|
|
|
146
|
+
| CLI serve wiring (`packages/cli/packages/cli/src`) | `pnpm --filter @superblocksteam/cli build` |
|
|
147
147
|
|
|
148
|
-
A typical Gateway capture change is shared (if types moved), then Gateway
|
|
149
|
-
|
|
148
|
+
A typical Gateway capture change is shared (if types moved), then Gateway.
|
|
149
|
+
Then restart Cursor.
|
|
150
150
|
|
|
151
|
-
Proof the new
|
|
151
|
+
Proof the new build is live: Gateway stderr logs
|
|
152
152
|
`gateway live canvas capture uses libraryBrowserContext (testingEnabled does not gate it)`
|
|
153
153
|
at boot. A crash that `@superblocksteam/shared` does not export
|
|
154
154
|
`SocketHeartbeat` means shared `dist/` is stale.
|
|
@@ -204,7 +204,7 @@ Browser credentials are stored at `~/.superblocks/auth.json.mcp-oauth`, or
|
|
|
204
204
|
contains the access token and optional refresh token and is written atomically
|
|
205
205
|
with owner-only `0600` permissions; newly created parent directories use `0700`. A file lock
|
|
206
206
|
coordinates refresh-token rotation across Gateway processes. A persistent random
|
|
207
|
-
session ID keeps plan approvals
|
|
207
|
+
session ID keeps plan approvals shared across those
|
|
208
208
|
processes when the access token changes. A new login gets a new session ID.
|
|
209
209
|
|
|
210
210
|
Server calls, Admin tools, orchestrator requests, and telemetry obtain the current
|
|
@@ -322,6 +322,14 @@ session or `SUPERBLOCKS_API_TOKEN`.
|
|
|
322
322
|
| `SUPERBLOCKS_AUTH_FILE` | Worktree-local CLI session (from `just worktree auth`). |
|
|
323
323
|
| `NODE_DEBUG=gateway` | Tool call stacks and conditional-flow logs on stderr. |
|
|
324
324
|
|
|
325
|
+
Set `GATEWAY_HOST_COLLECTS_APPROVALS=true` when the host asks the user each
|
|
326
|
+
decision with its own question form, as the Cowork plugin does. The agent's
|
|
327
|
+
approval of a decision the gateway delivered then counts as the user's. Such a
|
|
328
|
+
host shows the app in its own browser pane, so it also gets no status cards and
|
|
329
|
+
no `get_app` screenshot. A client that declares form elicitation is asked
|
|
330
|
+
through that instead, and the hosted gateway ignores the variable. The gateway
|
|
331
|
+
never treats a client differently because of its name.
|
|
332
|
+
|
|
325
333
|
Gateway debug logs include tool names, result states, decision branches, and
|
|
326
334
|
entry-point stacks. They intentionally omit credentials, prompts, answers, and
|
|
327
335
|
result payloads. Run `superblocks mcp setup --client <client> --debug`, then
|
|
@@ -335,17 +343,42 @@ exports over OTLP through the authenticated Server `/api/v1/metrics` proxy
|
|
|
335
343
|
(same path and policy as traces). `service.name=gateway` and
|
|
336
344
|
`deployment.environment.name` ride on the SDK resource, not on each data point.
|
|
337
345
|
|
|
338
|
-
| Metric | Labels
|
|
339
|
-
| --------------------------------------------- |
|
|
340
|
-
| `gateway.identity.read.outcomes` | `gateway.outcome`: `cached`, `resolved`, `refused`, `credential_error`, `breaker_open`, `caller_timeout`, `outage`
|
|
341
|
-
| `gateway.server.read_retry.outcomes` | `gateway.server.read_retry.outcome`, `gateway.server.read_retry.cause`, `gateway.server.read_retry.operation`
|
|
342
|
-
| `gateway.clark.facts_flag_bootstrap.outcomes` | `gateway.clark.facts_flag_bootstrap.outcome`: `enabled`, `disabled`, `invalid`
|
|
343
|
-
| `gateway.integration_profile.resolutions` | `gateway.profile.source`, `gateway.profile.reason`, `gateway.profile.scope`
|
|
344
|
-
| `gateway.mcp.tool_calls` | `tool.name`, `tool.status`, `mcp.client.name`
|
|
345
|
-
| `gateway.mcp.tool_call_duration_seconds` | same as `gateway.mcp.tool_calls`
|
|
346
|
-
| `gateway.
|
|
347
|
-
| `gateway.
|
|
348
|
-
| `gateway.
|
|
346
|
+
| Metric | Labels |
|
|
347
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
348
|
+
| `gateway.identity.read.outcomes` | `gateway.outcome`: `cached`, `resolved`, `refused`, `credential_error`, `breaker_open`, `caller_timeout`, `outage` |
|
|
349
|
+
| `gateway.server.read_retry.outcomes` | `gateway.server.read_retry.outcome`, `gateway.server.read_retry.cause`, `gateway.server.read_retry.operation` |
|
|
350
|
+
| `gateway.clark.facts_flag_bootstrap.outcomes` | `gateway.clark.facts_flag_bootstrap.outcome`: `enabled`, `disabled`, `invalid` |
|
|
351
|
+
| `gateway.integration_profile.resolutions` | `gateway.profile.source`, `gateway.profile.reason`, `gateway.profile.scope` |
|
|
352
|
+
| `gateway.mcp.tool_calls` | `tool.name`, `tool.status`, `mcp.client.name` |
|
|
353
|
+
| `gateway.mcp.tool_call_duration_seconds` | same as `gateway.mcp.tool_calls` |
|
|
354
|
+
| `gateway.mcp.usage_delivery` | `gateway.mcp.usage_delivery.outcome`: `accepted`, `failed`; `gateway.mcp.usage_delivery.reason`: bounded delivery reason |
|
|
355
|
+
| `gateway.mcp.usage_delivery.attempts` | none; counted before dispatch, independently of delivery settlement |
|
|
356
|
+
| `gateway.checkpoint.outcomes` | `gateway.checkpoint.outcome` |
|
|
357
|
+
| `gateway.process.faults` | `gateway.fault.kind`, `gateway.fault.fatal` |
|
|
358
|
+
| `gateway.readiness.verdicts` | `gateway.readiness.probe`, `gateway.readiness.ready`, `gateway.readiness.dispatch`, `gateway.readiness.upstream` |
|
|
359
|
+
|
|
360
|
+
Usage delivery reasons are `none` for accepted events, or `authentication`,
|
|
361
|
+
`http_error`, `invalid_request`, `network`, `rate_limited`, `server_error`,
|
|
362
|
+
`timeout`, `unknown`, and `unsupported` for failures. Activity ingestion shares
|
|
363
|
+
the Server's authenticated per-user API allowance of 120 requests per minute
|
|
364
|
+
per process; each tool operation sends two events. A confirmed plan refusal
|
|
365
|
+
has activity outcome `not_entitled` and is excluded from warehouse adoption.
|
|
366
|
+
Started and finished events can arrive in either order; the warehouse pairs
|
|
367
|
+
them by authenticated principal and operation ID.
|
|
368
|
+
|
|
369
|
+
The attempts counter includes deliveries still in flight; compare it with the
|
|
370
|
+
accepted and failed counts over the same interval in a long-lived process.
|
|
371
|
+
All these counters require telemetry export. Abrupt process exit can lose
|
|
372
|
+
both an activity event and its counters, so this is not an end-to-end loss
|
|
373
|
+
rate or a durable delivery guarantee.
|
|
374
|
+
|
|
375
|
+
Schema rejections use the Server's existing request warning with bounded
|
|
376
|
+
`builder.mcp.validation.issues` field/code pairs. It inherits authenticated
|
|
377
|
+
request context; rejected values and unknown field names are omitted. Each
|
|
378
|
+
phase is sent once with no automatic retry, and the Server quota also applies
|
|
379
|
+
to invalid activity. Deploy the Server schema before gateways that send new
|
|
380
|
+
outcomes; the delivery counter classifies skew as `invalid_request` or
|
|
381
|
+
`unsupported`.
|
|
349
382
|
|
|
350
383
|
Locally, the Server forwards the proxy to the OTel collector on `:4318`. The
|
|
351
384
|
workspace `just up` (any profile) starts the LGTM stack from
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { OrchestratorClient } from "../orchestrator/client.js";
|
|
2
|
+
import { type HostedOrchestratorRefusalReason } from "../telemetry/metrics.js";
|
|
3
|
+
export declare const HOSTED_CUSTOMER_AGENT_MESSAGE = "Running integrations from the hosted Superblocks MCP isn't available yet for orgs that use their own agent. Use the Superblocks CLI or the editor.";
|
|
4
|
+
/** Why a hosted preview comes back without a screenshot for these orgs. */
|
|
5
|
+
export declare const HOSTED_CUSTOMER_AGENT_PREVIEW_MESSAGE = "Preview screenshots from the hosted Superblocks MCP aren't available yet for orgs that use their own agent. Open the preview link instead.";
|
|
6
|
+
/** Steers the calling agent to explain the limit instead of retrying it. */
|
|
7
|
+
export declare const HOSTED_CUSTOMER_AGENT_INSTRUCTIONS = "Do not retry this call or try another integration: every integration in this organization runs on an agent the hosted Superblocks MCP cannot reach yet. Tell the user, and suggest the Superblocks CLI or the Superblocks editor instead.";
|
|
8
|
+
export declare class HostedOrchestratorRefusedError extends Error {
|
|
9
|
+
readonly reason: HostedOrchestratorRefusalReason;
|
|
10
|
+
readonly code = "hosted_customer_agent_unavailable";
|
|
11
|
+
constructor(reason: HostedOrchestratorRefusalReason);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Whether the hosted Platform MCP may reach the org's agents, directly or
|
|
15
|
+
* through a browser it runs. Always true outside the hosted Platform MCP.
|
|
16
|
+
*/
|
|
17
|
+
export declare function hostedAgentAllowed(input: {
|
|
18
|
+
agentType: number;
|
|
19
|
+
hosted: boolean;
|
|
20
|
+
}): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Throws, and counts the refusal, when the hosted Platform MCP is asked to
|
|
23
|
+
* resolve an orchestrator Superblocks does not run. Agent types it does not
|
|
24
|
+
* recognize are refused too, so a new type has to be allowed on purpose.
|
|
25
|
+
*/
|
|
26
|
+
export declare function assertHostedOrchestratorAllowed(input: {
|
|
27
|
+
agentType: number;
|
|
28
|
+
hosted: boolean;
|
|
29
|
+
}): void;
|
|
30
|
+
/**
|
|
31
|
+
* Stands in for the orchestrator of a live-edit session the hosted Platform
|
|
32
|
+
* MCP may not reach. The turn still runs, and every metadata read or API run
|
|
33
|
+
* Clark asks for fails with the refusal instead of leaving the process.
|
|
34
|
+
*/
|
|
35
|
+
export declare function refusingOrchestratorClient(refusal: HostedOrchestratorRefusedError): OrchestratorClient;
|
|
36
|
+
//# sourceMappingURL=hosted-boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-boundary.d.ts","sourceRoot":"","sources":["../../src/agents/hosted-boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,KAAK,+BAA+B,EAErC,MAAM,yBAAyB,CAAC;AAkBjC,eAAO,MAAM,6BAA6B,uJAC4G,CAAC;AAEvJ,2EAA2E;AAC3E,eAAO,MAAM,qCAAqC,+IAC4F,CAAC;AAE/I,4EAA4E;AAC5E,eAAO,MAAM,kCAAkC,8OAC8L,CAAC;AAE9O,qBAAa,8BAA+B,SAAQ,KAAK;IAG3C,QAAQ,CAAC,MAAM,EAAE,+BAA+B;IAF5D,QAAQ,CAAC,IAAI,uCAAuC;IAEpD,YAAqB,MAAM,EAAE,+BAA+B,EAG3D;CACF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CAEV;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,GAAG,IAAI,CAUP;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,8BAA8B,GACtC,kBAAkB,CASpB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { recordHostedOrchestratorRefusal, } from "../telemetry/metrics.js";
|
|
2
|
+
/**
|
|
3
|
+
* The hosted Platform MCP runs in Superblocks' control plane. An org whose
|
|
4
|
+
* agent the customer hosts keeps that agent inside the customer's network,
|
|
5
|
+
* and nothing yet lets our control plane send requests there. The CLI runs
|
|
6
|
+
* on the person's own machine, so it is not bound by this.
|
|
7
|
+
*/
|
|
8
|
+
/** Matches `@superblocksteam/shared` `AgentType` values Superblocks runs. */
|
|
9
|
+
const SUPERBLOCKS_HOSTED_AGENT_TYPES = new Set([
|
|
10
|
+
0, // MULTITENANT
|
|
11
|
+
1, // DEDICATED
|
|
12
|
+
]);
|
|
13
|
+
/** Matches `@superblocksteam/shared` `AgentType.ONPREMISE`. */
|
|
14
|
+
const CUSTOMER_HOSTED_AGENT_TYPE = 2;
|
|
15
|
+
export const HOSTED_CUSTOMER_AGENT_MESSAGE = "Running integrations from the hosted Superblocks MCP isn't available yet for orgs that use their own agent. Use the Superblocks CLI or the editor.";
|
|
16
|
+
/** Why a hosted preview comes back without a screenshot for these orgs. */
|
|
17
|
+
export const HOSTED_CUSTOMER_AGENT_PREVIEW_MESSAGE = "Preview screenshots from the hosted Superblocks MCP aren't available yet for orgs that use their own agent. Open the preview link instead.";
|
|
18
|
+
/** Steers the calling agent to explain the limit instead of retrying it. */
|
|
19
|
+
export const HOSTED_CUSTOMER_AGENT_INSTRUCTIONS = "Do not retry this call or try another integration: every integration in this organization runs on an agent the hosted Superblocks MCP cannot reach yet. Tell the user, and suggest the Superblocks CLI or the Superblocks editor instead.";
|
|
20
|
+
export class HostedOrchestratorRefusedError extends Error {
|
|
21
|
+
reason;
|
|
22
|
+
code = "hosted_customer_agent_unavailable";
|
|
23
|
+
constructor(reason) {
|
|
24
|
+
super(HOSTED_CUSTOMER_AGENT_MESSAGE);
|
|
25
|
+
this.reason = reason;
|
|
26
|
+
this.name = "HostedOrchestratorRefusedError";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Whether the hosted Platform MCP may reach the org's agents, directly or
|
|
31
|
+
* through a browser it runs. Always true outside the hosted Platform MCP.
|
|
32
|
+
*/
|
|
33
|
+
export function hostedAgentAllowed(input) {
|
|
34
|
+
return !input.hosted || SUPERBLOCKS_HOSTED_AGENT_TYPES.has(input.agentType);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Throws, and counts the refusal, when the hosted Platform MCP is asked to
|
|
38
|
+
* resolve an orchestrator Superblocks does not run. Agent types it does not
|
|
39
|
+
* recognize are refused too, so a new type has to be allowed on purpose.
|
|
40
|
+
*/
|
|
41
|
+
export function assertHostedOrchestratorAllowed(input) {
|
|
42
|
+
if (hostedAgentAllowed(input)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const reason = input.agentType === CUSTOMER_HOSTED_AGENT_TYPE
|
|
46
|
+
? "customer_hosted_agent"
|
|
47
|
+
: "unknown_agent_type";
|
|
48
|
+
recordHostedOrchestratorRefusal(reason);
|
|
49
|
+
throw new HostedOrchestratorRefusedError(reason);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Stands in for the orchestrator of a live-edit session the hosted Platform
|
|
53
|
+
* MCP may not reach. The turn still runs, and every metadata read or API run
|
|
54
|
+
* Clark asks for fails with the refusal instead of leaving the process.
|
|
55
|
+
*/
|
|
56
|
+
export function refusingOrchestratorClient(refusal) {
|
|
57
|
+
const refuse = async () => {
|
|
58
|
+
throw new HostedOrchestratorRefusedError(refusal.reason);
|
|
59
|
+
};
|
|
60
|
+
return {
|
|
61
|
+
executeSdkApiV3: refuse,
|
|
62
|
+
executeV2Api: refuse,
|
|
63
|
+
getMetadata: refuse,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=hosted-boundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-boundary.js","sourceRoot":"","sources":["../../src/agents/hosted-boundary.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AAEH,6EAA6E;AAC7E,MAAM,8BAA8B,GAAwB,IAAI,GAAG,CAAC;IAClE,CAAC,EAAE,cAAc;IACjB,CAAC,EAAE,YAAY;CAChB,CAAC,CAAC;AAEH,+DAA+D;AAC/D,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAErC,MAAM,CAAC,MAAM,6BAA6B,GACxC,oJAAoJ,CAAC;AAEvJ,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qCAAqC,GAChD,4IAA4I,CAAC;AAE/I,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kCAAkC,GAC7C,2OAA2O,CAAC;AAE9O,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IAGlC,MAAM;IAFlB,IAAI,GAAG,mCAAmC,CAAC;IAEpD,YAAqB,MAAuC;QAC1D,KAAK,CAAC,6BAA6B,CAAC,CAAC;sBADlB,MAAM;QAEzB,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IAC/C,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAGlC;IACC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,8BAA8B,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAAC,KAG/C;IACC,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,MAAM,MAAM,GACV,KAAK,CAAC,SAAS,KAAK,0BAA0B;QAC5C,CAAC,CAAC,uBAAuB;QACzB,CAAC,CAAC,oBAAoB,CAAC;IAC3B,+BAA+B,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,IAAI,8BAA8B,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAuC;IAEvC,MAAM,MAAM,GAAG,KAAK,IAAoB,EAAE;QACxC,MAAM,IAAI,8BAA8B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC,CAAC;IACF,OAAO;QACL,eAAe,EAAE,MAAM;QACvB,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,MAAM;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -20,6 +20,11 @@ export type PickOrchestratorBaseUrlInput = {
|
|
|
20
20
|
agentType: number;
|
|
21
21
|
agents: OrchestratorAgentCandidate[];
|
|
22
22
|
controlPlaneUrl?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Served by the hosted Platform MCP rather than the CLI. Required so a new
|
|
25
|
+
* call site cannot skip the hosted agent boundary by leaving it out.
|
|
26
|
+
*/
|
|
27
|
+
hosted: boolean;
|
|
23
28
|
profileKey?: string;
|
|
24
29
|
};
|
|
25
30
|
/** Matches `@superblocksteam/shared` `AgentType.ONPREMISE`. */
|
|
@@ -54,6 +59,9 @@ export declare function orchestratorUrlDependsOnProfile(input: {
|
|
|
54
59
|
* Returns a single orchestrator base URL from Server-reported agents.
|
|
55
60
|
* Throws when none are eligible — same failure mode as the browser's
|
|
56
61
|
* "No active agent found".
|
|
62
|
+
*
|
|
63
|
+
* Hosted, throws HostedOrchestratorRefusedError before looking at the
|
|
64
|
+
* inventory when the org's agents are not ones Superblocks runs.
|
|
57
65
|
*/
|
|
58
66
|
export declare function pickOrchestratorBaseUrl(input: PickOrchestratorBaseUrlInput): string;
|
|
59
67
|
//# sourceMappingURL=resolve-orchestrator-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-orchestrator-url.d.ts","sourceRoot":"","sources":["../../src/agents/resolve-orchestrator-url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-orchestrator-url.d.ts","sourceRoot":"","sources":["../../src/agents/resolve-orchestrator-url.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,0BAA0B,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAMF,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,IAAI,CAAC;AActC,wBAAgB,wCAAwC,CACtD,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,MAAM,GAAG,SAAS,CAoBpB;AA4CD;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAqBR;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,OAAO,CAQV;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,MAAM,CA8CR"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isIP } from "node:net";
|
|
2
|
+
import { assertHostedOrchestratorAllowed } from "./hosted-boundary.js";
|
|
2
3
|
const ACTIVE_STATUS = "Active";
|
|
3
4
|
/** Matches `@superblocksteam/shared` `AgentType.MULTITENANT`. */
|
|
4
5
|
const AGENT_TYPE_MULTITENANT = 0;
|
|
@@ -120,8 +121,12 @@ export function orchestratorUrlDependsOnProfile(input) {
|
|
|
120
121
|
* Returns a single orchestrator base URL from Server-reported agents.
|
|
121
122
|
* Throws when none are eligible — same failure mode as the browser's
|
|
122
123
|
* "No active agent found".
|
|
124
|
+
*
|
|
125
|
+
* Hosted, throws HostedOrchestratorRefusedError before looking at the
|
|
126
|
+
* inventory when the org's agents are not ones Superblocks runs.
|
|
123
127
|
*/
|
|
124
128
|
export function pickOrchestratorBaseUrl(input) {
|
|
129
|
+
assertHostedOrchestratorAllowed(input);
|
|
125
130
|
const active = input.agents.filter((candidate) => candidate.type === input.agentType &&
|
|
126
131
|
candidate.status === ACTIVE_STATUS &&
|
|
127
132
|
Boolean(candidate.url));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-orchestrator-url.js","sourceRoot":"","sources":["../../src/agents/resolve-orchestrator-url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-orchestrator-url.js","sourceRoot":"","sources":["../../src/agents/resolve-orchestrator-url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAkCvE,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B,iEAAiE;AACjE,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,4CAA4C,GAA2B;IAC3E,qBAAqB,EAAE,gCAAgC;IACvD,oBAAoB,EAAE,mCAAmC;IACzD,yBAAyB,EAAE,wCAAwC;CACpE,CAAC;AAEF,MAAM,UAAU,wCAAwC,CACtD,GAAuB;IAEvB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IACE,MAAM,CAAC,QAAQ,KAAK,QAAQ;QAC5B,MAAM,CAAC,IAAI;QACX,MAAM,CAAC,QAAQ,KAAK,WAAW;QAC/B,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC3B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,4CAA4C,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,cAAc,CACrB,IAA8B,EAC9B,UAAkB;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AAM,MAAM,GAAG,wCAAwC,CACrD,KAAK,CAAC,eAAe,CACtB,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,CAAC;SAAM,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;QACpC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACjC,cAAc,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,EAAE,UAAU,CAAC,CACjD,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACjC,kBAAkB,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC,CACzC,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,SAAS,KAAK,oBAAoB,EAAE,CAAC;QAC7C,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,uCAAuC,KAAK,CAAC,SAAS,YACpD,KAAK,CAAC,UAAU,IAAI,SACtB,EAAE,CACH,CAAC;IACJ,CAAC;IAED,OAAO,iBAAiB,CACtB,+BAA+B,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-metadata.d.ts","sourceRoot":"","sources":["../../src/capabilities/integration-metadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration-metadata.d.ts","sourceRoot":"","sources":["../../src/capabilities/integration-metadata.ts"],"names":[],"mappings":"AAWA,OAAO,EAKL,KAAK,sBAAsB,EAC5B,MAAM,oCAAoC,CAAC;AAM5C,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAInD,MAAM,MAAM,2BAA2B,GAAG;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,OAAO,EAAE,sBAAsB,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA0DF,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,CAAC,CA6KzD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HOSTED_CUSTOMER_AGENT_INSTRUCTIONS, HostedOrchestratorRefusedError, } from "../agents/hosted-boundary.js";
|
|
1
2
|
import { AGENT_TYPE_ONPREMISE, pickOrchestratorBaseUrl, } from "../agents/resolve-orchestrator-url.js";
|
|
2
3
|
import { integrationIsToolSupported } from "../integrations/filters.js";
|
|
3
4
|
import { hasBuildPermission } from "../integrations/map.js";
|
|
@@ -125,10 +126,20 @@ export async function getIntegrationMetadata(context, input) {
|
|
|
125
126
|
agentType: inventory.agentType,
|
|
126
127
|
agents: inventory.agents,
|
|
127
128
|
controlPlaneUrl: inventory.controlPlaneUrl,
|
|
129
|
+
hosted: context.config.hosted,
|
|
128
130
|
profileKey,
|
|
129
131
|
});
|
|
130
132
|
}
|
|
131
133
|
catch (error) {
|
|
134
|
+
if (error instanceof HostedOrchestratorRefusedError) {
|
|
135
|
+
return {
|
|
136
|
+
...(applicationId && { applicationId }),
|
|
137
|
+
agentInstructions: HOSTED_CUSTOMER_AGENT_INSTRUCTIONS,
|
|
138
|
+
kind: "error",
|
|
139
|
+
code: error.code,
|
|
140
|
+
message: error.message,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
132
143
|
// Only on-prem agents are picked by profile tag, so only there does a
|
|
133
144
|
// missing profile explain a missing agent.
|
|
134
145
|
if (profileKey || inventory.agentType !== AGENT_TYPE_ONPREMISE) {
|
|
@@ -152,7 +163,7 @@ export async function getIntegrationMetadata(context, input) {
|
|
|
152
163
|
integrationId: input.integrationId,
|
|
153
164
|
scope: "integrations:build",
|
|
154
165
|
});
|
|
155
|
-
const metadata = await new HttpOrchestratorClient(orchestratorUrl).getMetadata({
|
|
166
|
+
const metadata = await new HttpOrchestratorClient(orchestratorUrl, context.config.hosted).getMetadata({
|
|
156
167
|
apiKey: principal.value.apiKey,
|
|
157
168
|
integrationId: input.integrationId,
|
|
158
169
|
profileKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-metadata.js","sourceRoot":"","sources":["../../src/capabilities/integration-metad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AG,EAAE,EACT,
|
|
1
|
+
{"version":3,"file":"integration-metadata.js","sourceRoot":"","sources":["../../src/capabilities/integration-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,4BAA4B,GAE7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,oBAAoB,GAErB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,aAAa,GAAG,GAAG,CAAC;AA+B1B,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC9B,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC;QACzC,CAAC,CAAC,EAAE,CAAC;AACT,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,KAAc,EAAE,KAAa;IACpD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,GAAG,GAAG,KAAgC,CAAC;QAC7C,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACrC,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE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AAC,CAAC,CAAC,IAAI,CAAC;QAE5E,OAAO;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE;gBACL,GAAG,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,CAAC;gBACvC,OAAO;gBACP,OAAO,EAAE,UAAU,KAAK,IAAI;gBAC5B,aAAa,EAAE,WAAW,CAAC,EAAE;gBAC7B,eAAe;gBACf,UAAU;gBACV,MAAM;gBACN,QAAQ;gBACR,OAAO,EAAE,cAAc,CAAC,iBAAiB,CAAC;gBAC1C,aAAa,EAAE,OAAO,CAAC,MAAM;gBAC7B,UAAU,EAAE,OAAO,CAAC,MAAM;aAC3B;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,uBAAuB,CACpC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAClE,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC5B,OAAO;YACL,GAAG,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,CAAC;YACvC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,kCAAkC;YACxC,OAAO,EAAE,+BAA+B,KAAK,GAC3C,iBAAiB,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EACnE,KAAK,MAAM,EAAE;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type HostBrowserTools } from "../capture/browser-contract.js";
|
|
2
1
|
import type { CaptureLibraryScreenshot } from "../capture/capture-library.js";
|
|
3
2
|
import type { GatewayConfig } from "../config.js";
|
|
4
3
|
import { type CapturePreviewScreenshot } from "../preview/capture-screenshot.js";
|
|
@@ -10,6 +9,7 @@ import type { LiveStateAttaches } from "./live-state-attaches.js";
|
|
|
10
9
|
import type { CapabilityResult, CheckAppProgressInput, CheckAppProgressResult, CheckPublishProgressInput, EditAppInput, EditAppResult, AskUserInput, AskUserResult, GetAppInput, GetAppResult, PreviewAppInput, PreviewAppResult, PreviewStatusInput, PreviewStatusResult, Principal, ProgressEvent, PublishAppInput, PublishAppResult, ResolvedPrincipal, StartAppInput, StartAppResult, UploadArtifactInput, UploadArtifactResult } from "./types.js";
|
|
11
10
|
export { IMPORT_ZIP_MAX_BYTES } from "./types.js";
|
|
12
11
|
export type CapabilityContext = {
|
|
12
|
+
mcpClientName?: string;
|
|
13
13
|
config: GatewayConfig;
|
|
14
14
|
/** Injected so turn and stall thresholds are testable without real time. */
|
|
15
15
|
now?: () => number;
|
|
@@ -34,11 +34,6 @@ export type CapabilityContext = {
|
|
|
34
34
|
* Injected in tests; defaults to Playwright in the MCP transport.
|
|
35
35
|
*/
|
|
36
36
|
capturePreviewScreenshot?: CapturePreviewScreenshot;
|
|
37
|
-
/**
|
|
38
|
-
* What the connected host can drive a browser with. Only a transport knows
|
|
39
|
-
* which client it is talking to; absent, the contract says "unknown".
|
|
40
|
-
*/
|
|
41
|
-
hostBrowserTools?: HostBrowserTools;
|
|
42
37
|
server: SuperblocksServerClient;
|
|
43
38
|
sessionPeer: SessionPeer;
|
|
44
39
|
/** The caller gave up on this call (an MCP cancellation, a closed request). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/capabilities/lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/capabilities/lifecycle.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,kCAAkC,CAAC;AAM1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,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