@superblocksteam/gateway 2.0.177 → 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
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CHECKPOINT_FAILED, DECIDE_IN_EDITOR, failedApiRunInstructions, instructUserDecision, REPLACE_WEDGED_APP, } from "./copy.js";
|
|
2
2
|
export function instructCheckAppProgress(result, profile) {
|
|
3
|
-
const navigation = profile.hasNativeBrowser
|
|
4
|
-
? result.value.browserNavigation
|
|
5
|
-
: undefined;
|
|
6
|
-
if (!isBrowserNavigation(navigation)) {
|
|
7
|
-
return resultInstructions(result, profile);
|
|
8
|
-
}
|
|
9
|
-
const instructions = resultInstructions(result, profile);
|
|
10
|
-
const browserInstructions = result.pendingAction === "decide_in_editor"
|
|
11
|
-
? `CRITICAL DO NOT IGNORE: Before any other action, ensure ${navigation.url} is open in Cowork's embedded Page browser.`
|
|
12
|
-
: `CRITICAL DO NOT IGNORE: viewStatus is ready, before any other action, ensure ${navigation.url} is open in Cowork's embedded Page browser and verify the app loaded. ${APP_LOAD_CHECK}`;
|
|
13
|
-
return instructions
|
|
14
|
-
? `${browserInstructions}\n\n${instructions}`
|
|
15
|
-
: browserInstructions;
|
|
16
|
-
}
|
|
17
|
-
function resultInstructions(result, profile) {
|
|
18
3
|
if (result.decisionKind === "missing_integrations") {
|
|
19
4
|
return "Create every entry in `decision.integrations`; do not call `ask_user` or relay manual setup steps. Call `create_integration` with each entry's name, pluginId, and configuration. When `configurationSchema` is present, use it directly and skip `get_integration_config_schema`; when it is absent, call `get_integration_config_schema` first. Follow each `create_integration` result's agentInstructions for configuration and app wiring.";
|
|
20
5
|
}
|
|
@@ -63,15 +48,6 @@ function resultInstructions(result, profile) {
|
|
|
63
48
|
}
|
|
64
49
|
return undefined;
|
|
65
50
|
}
|
|
66
|
-
function isBrowserNavigation(value) {
|
|
67
|
-
return (typeof value === "object" &&
|
|
68
|
-
value !== null &&
|
|
69
|
-
"action" in value &&
|
|
70
|
-
value.action === "open_editor" &&
|
|
71
|
-
"url" in value &&
|
|
72
|
-
typeof value.url === "string" &&
|
|
73
|
-
value.url.length > 0);
|
|
74
|
-
}
|
|
75
51
|
/** Gateway heartbeats are not Superblocks chat and must not trigger a relay. */
|
|
76
52
|
function superblocksActivity(result) {
|
|
77
53
|
const activity = result.value.activity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-app-progress.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/check-app-progress.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"check-app-progress.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/check-app-progress.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,wBAAwB,CACtC,MAAkB,EAClB,OAAsB;IAEtB,IAAI,MAAM,CAAC,YAAY,KAAK,sBAAsB,EAAE,CAAC;QACnD,OAAO,ibAAib,CAAC;IAC3b,CAAC;IACD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnE,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,kBAAkB,EAAE,CAAC;QAChD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,eAAe,EAAE,CAAC;QAC7C,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,mBAAmB,EAAE,CAAC;QAC1C,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,0EAA0E;IAC1E,kEAAkE;IAClE,IACE,MAAM,CAAC,MAAM,KAAK,sBAAsB;QACxC,MAAM,CAAC,aAAa,KAAK,aAAa,EACtC,CAAC;QACD,OAAO,gIAAgI,CAAC;IAC1I,CAAC;IACD,IACE,MAAM,CAAC,aAAa,KAAK,aAAa;QACtC,CAAC,MAAM,CAAC,MAAM,KAAK,WAAW;YAC5B,MAAM,CAAC,MAAM,KAAK,sBAAsB;YACxC,MAAM,CAAC,MAAM,KAAK,YAAY;YAC9B,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,EAC9B,CAAC;QACD,OAAO,4IAA4I,CAAC;IACtJ,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,OAAO,gDAAgD,KAAK,CAAC,MAAM,iBACjE,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAChC,sOAAsO,CAAC;QACzO,CAAC;QACD,OAAO,6KAA6K,CAAC;IACvL,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,gNAAgN,CAAC;IAC1N,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC9B,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,qBAAqB,EAAE,CAAC;YAC1B,OAAO,GAAG,qBAAqB,yFAAyF,CAAC;QAC3H,CAAC;QACD,OAAO,0GAA0G,CAAC;IACpH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,gFAAgF;AAChF,SAAS,mBAAmB,CAAC,MAAkB;IAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IACvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,CACpB,CAAC,IAAI,EAAkB,EAAE,CACvB,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,iCAAiC,CACzE,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ClientProfile } from "../../client-presentation.js";
|
|
2
1
|
import type { ToolResult } from "../result.js";
|
|
3
|
-
export declare function instructCheckPublishProgress(result: ToolResult
|
|
2
|
+
export declare function instructCheckPublishProgress(result: ToolResult): string | undefined;
|
|
4
3
|
//# sourceMappingURL=check-publish-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-publish-progress.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/check-publish-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"check-publish-progress.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/check-publish-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,UAAU,GACjB,MAAM,GAAG,SAAS,CAapB"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export function instructCheckPublishProgress(result, profile) {
|
|
3
|
-
const instructions = resultInstructions(result);
|
|
4
|
-
const navigation = instructPublishDetails(result, profile);
|
|
5
|
-
if (!navigation) {
|
|
6
|
-
return instructions;
|
|
7
|
-
}
|
|
8
|
-
return instructions ? `${navigation}\n\n${instructions}` : navigation;
|
|
9
|
-
}
|
|
10
|
-
function resultInstructions(result) {
|
|
1
|
+
export function instructCheckPublishProgress(result) {
|
|
11
2
|
if (result.code === "publish_not_started") {
|
|
12
|
-
return "
|
|
3
|
+
return "No publish is in flight for this application. If `publish_app` already returned status `deployed`, the app is live: tell the user and stop. Otherwise retry `check_publish_progress` with both the `applicationId` and `commitId` returned by `publish_app`. Do not call `publish_app` again to check on a publish.";
|
|
13
4
|
}
|
|
14
5
|
if (result.status === "publishing") {
|
|
15
6
|
const elapsedSeconds = result.value.elapsedSeconds;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-publish-progress.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/check-publish-progress.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"check-publish-progress.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/check-publish-progress.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,4BAA4B,CAC1C,MAAkB;IAElB,IAAI,MAAM,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;QAC1C,OAAO,qTAAqT,CAAC;IAC/T,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;QACnC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;QACnD,MAAM,OAAO,GACX,OAAO,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC;YACnE,CAAC,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,UAAU;YAC3D,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,+BAA+B,OAAO,kKAAkK,CAAC;IAClN,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
import { type ClientProfile } from "../../client-presentation.js";
|
|
3
3
|
import type { ToolResult } from "../result.js";
|
|
4
4
|
export declare const APP_LOAD_CHECK = "Your automatic verification is a load check and inspection of visible state, not a feature-by-feature test run. Run interactive feature tests only when the user requests testing. Do not click app controls or inspect API traffic as part of a load check; normal navigation and authentication are allowed. Keep relaying Superblocks' own test results. Do not claim features passed from a load check alone.";
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const COWORK_BROWSER_TOOLSEARCH = "select:mcp__remote-devices__Claude_Browser__preview_start,mcp__remote-devices__Claude_Browser__navigate,mcp__remote-devices__Claude_Browser__tabs_context";
|
|
7
|
-
export declare function buildingFollowUp(profile: ClientProfile): string;
|
|
5
|
+
export declare const BUILDING_FOLLOW_UP = "Call `check_app_progress` with this `applicationId` to follow the turn. Relay each new activity line to the user as it arrives.";
|
|
8
6
|
export declare const CHECKPOINT_FAILED = "The build finished but did not save. Do not tell the user the app was saved, and do not poll again - open the editor via this result's `editUrl` and report that the checkpoint failed.";
|
|
9
7
|
export declare const DECIDE_IN_EDITOR = "Open only the exact editor URL provided by this result so the user can answer in the Superblocks editor. When `browserNavigation` is present, follow its exact URL; otherwise use the exact URL in `editUrl`. Only the user may answer this decision. Do not click anything in the editor. Do not type anything in the editor. Do not switch between Plan and Build modes. Do not submit anything. Do not call `ask_user`. Stop and wait for the user.";
|
|
10
8
|
export declare const PLAIN_HOST_TOOL_PERMISSION = "This host cannot collect the user's approval for this action, so it cannot be approved here. Do not call ask_user, do not send `Approve`, and do not ask the user to approve it again. Show the user `decision.question` and tell them this connection cannot record an approval for it. If they decline or ask for something else instead, call edit_app with the same applicationId, permissionMessageId set to decision.messageId, and prompt `Decline`, or `Decline: <their words>`.";
|
|
@@ -15,10 +13,5 @@ export declare const REPLACE_WEDGED_APP = "This application is wedged and cannot
|
|
|
15
13
|
export declare const RETRY_UNAVAILABLE_LIVE_EDIT = "Call `edit_app` again on this `applicationId` with the same prompt. The live-edit session was unavailable; the application itself is still there.";
|
|
16
14
|
export declare const SHOW_PLAN_VERBATIM = "Lead with `decision.title` when it is present, then show the entire `decision.plan` markdown, verbatim, laid out as markdown in the chat stream. Do not paraphrase, summarize, shorten, reorder, or re-level its headings - the user is approving exactly this text.";
|
|
17
15
|
export declare function failedApiRunInstructions(result: ToolResult): string | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* The publish details page shows the rollout live, so Cowork opens it for the
|
|
20
|
-
* whole publish rather than at the end. Other hosts only ever show the link.
|
|
21
|
-
*/
|
|
22
|
-
export declare function instructPublishDetails(result: ToolResult, profile: ClientProfile): string | undefined;
|
|
23
16
|
export declare function instructUserDecision(result: ToolResult, profile: ClientProfile): string | undefined;
|
|
24
17
|
//# sourceMappingURL=copy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/copy.ts"],"names":[],"mappings":"AAAA,0DAA0D;
|
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/copy.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,cAAc,sZAC0X,CAAC;AAEtZ,eAAO,MAAM,kBAAkB,oIACoG,CAAC;AAEpI,eAAO,MAAM,iBAAiB,4LAC6J,CAAC;AAE5L,eAAO,MAAM,gBAAgB,2bAC6Z,CAAC;AAK3b,eAAO,MAAM,0BAA0B,6dACqb,CAAC;AAE7d,eAAO,MAAM,yBAAyB,8QACuO,CAAC;AAE9Q,eAAO,MAAM,uBAAuB,uHACkF,CAAC;AAEvH,eAAO,MAAM,eAAe,gRACmP,CAAC;AAEhR,eAAO,MAAM,kBAAkB,yNACyL,CAAC;AAEzN,eAAO,MAAM,2BAA2B,sJAC6G,CAAC;AAEtJ,eAAO,MAAM,kBAAkB,yQACyO,CAAC;AA+BzQ,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,UAAU,GACjB,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,aAAa,GACrB,MAAM,GAAG,SAAS,CAuBpB"}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
/** Instructions shared verbatim by more than one tool. */
|
|
2
|
-
import { withCoworkEditorHost } from "../../../../capture/cowork-editor-url.js";
|
|
3
2
|
import { collectsUserApproval, } from "../../client-presentation.js";
|
|
4
3
|
export const APP_LOAD_CHECK = "Your automatic verification is a load check and inspection of visible state, not a feature-by-feature test run. Run interactive feature tests only when the user requests testing. Do not click app controls or inspect API traffic as part of a load check; normal navigation and authentication are allowed. Keep relaying Superblocks' own test results. Do not claim features passed from a load check alone.";
|
|
5
|
-
export const
|
|
6
|
-
export const COWORK_BROWSER_TOOLSEARCH = "select:mcp__remote-devices__Claude_Browser__preview_start,mcp__remote-devices__Claude_Browser__navigate,mcp__remote-devices__Claude_Browser__tabs_context";
|
|
7
|
-
// Repeat the query on each build: initialize instructions are gone by then.
|
|
8
|
-
export function buildingFollowUp(profile) {
|
|
9
|
-
const followUp = "Call `check_app_progress` with this `applicationId` to follow the turn. Relay each new activity line to the user as it arrives.";
|
|
10
|
-
if (!profile.hasNativeBrowser) {
|
|
11
|
-
return followUp;
|
|
12
|
-
}
|
|
13
|
-
return `${followUp} CRITICAL: load your browser pane tools now, before the first poll - call ToolSearch with query ${COWORK_BROWSER_TOOLSEARCH}. Without them you cannot open the app when a later result carries browserNavigation.`;
|
|
14
|
-
}
|
|
4
|
+
export const BUILDING_FOLLOW_UP = "Call `check_app_progress` with this `applicationId` to follow the turn. Relay each new activity line to the user as it arrives.";
|
|
15
5
|
export const CHECKPOINT_FAILED = "The build finished but did not save. Do not tell the user the app was saved, and do not poll again - open the editor via this result's `editUrl` and report that the checkpoint failed.";
|
|
16
6
|
export const DECIDE_IN_EDITOR = "Open only the exact editor URL provided by this result so the user can answer in the Superblocks editor. When `browserNavigation` is present, follow its exact URL; otherwise use the exact URL in `editUrl`. Only the user may answer this decision. Do not click anything in the editor. Do not type anything in the editor. Do not switch between Plan and Build modes. Do not submit anything. Do not call `ask_user`. Stop and wait for the user.";
|
|
17
7
|
// TODO(AR-569): once the Superblocks editor shows tool permissions that a
|
|
@@ -53,31 +43,17 @@ function hasFailedApiRun(result) {
|
|
|
53
43
|
export function failedApiRunInstructions(result) {
|
|
54
44
|
return hasFailedApiRun(result) ? FAILED_API_RUNS : undefined;
|
|
55
45
|
}
|
|
56
|
-
/**
|
|
57
|
-
* The publish details page shows the rollout live, so Cowork opens it for the
|
|
58
|
-
* whole publish rather than at the end. Other hosts only ever show the link.
|
|
59
|
-
*/
|
|
60
|
-
export function instructPublishDetails(result, profile) {
|
|
61
|
-
const url = result.value.publishDetailsUrl;
|
|
62
|
-
if (!profile.hasNativeBrowser ||
|
|
63
|
-
(result.status !== "publishing" && result.status !== "deployed") ||
|
|
64
|
-
typeof url !== "string" ||
|
|
65
|
-
!url) {
|
|
66
|
-
return undefined;
|
|
67
|
-
}
|
|
68
|
-
return `Before any other action, ensure ${withCoworkEditorHost(url)} is open in Cowork's embedded Page browser and verify the publish details loaded.`;
|
|
69
|
-
}
|
|
70
46
|
export function instructUserDecision(result, profile) {
|
|
71
47
|
if (result.decisionKind === "plan") {
|
|
72
48
|
// Ask widgets vary (some are one-line, some do not render markdown), so
|
|
73
49
|
// the plan never goes in the form. Cowork hides plain text written
|
|
74
50
|
// between tool calls; only SendUserMessage reaches its chat view.
|
|
75
|
-
return profile.
|
|
51
|
+
return profile.hostCollectsApprovalsAndShowsApp
|
|
76
52
|
? `CRITICAL DO NOT IGNORE: the user has not seen this plan. Plain text you write between tool calls is hidden in this host, so Step 1: send the plan with your SendUserMessage tool, as markdown, before anything else. ${SHOW_PLAN_VERBATIM} Do not call ask_user. Do not put the plan in the form or any other question widget. Step 2: only after SendUserMessage has delivered the plan, use your native ask form to collect the choice: ask "Do you approve the plan above?" and present exactly two choices labeled \`Approve\` and \`Refine\`. In \`Refine\`'s description, refer to the form's built-in free-text field only as \`Something else\`. Do not answer the decision yourself and do not call check_app_progress again until they have answered. If the user chooses \`Approve\`, call edit_app with the applicationId from this result and planAction "approve" with no prompt. If the form returns text in its \`response\` field, call edit_app with that applicationId, planAction "refine", and the exact \`response\` as prompt. If the user chooses \`Refine\` without feedback, ask the user for further instructions`
|
|
77
53
|
: "Call ask_user now to put this plan decision to the user. Do not answer it yourself and do not call check_app_progress again until they have answered.";
|
|
78
54
|
}
|
|
79
55
|
if (result.decisionKind === "multi_choice") {
|
|
80
|
-
return profile.
|
|
56
|
+
return profile.hostCollectsApprovalsAndShowsApp
|
|
81
57
|
? "Use your native ask form to put this multi-choice decision to the user. Do not call ask_user. Keep every native form field plain text, without Markdown markers. Use plain-text display labels but retain each original option string. Present the available options and ask the user to choose one. Do not answer the decision yourself and do not call check_app_progress again until they have answered. Map the selected plain-text label back to its original option string and send that original string through edit_app EXACTLY as Clark provided it."
|
|
82
58
|
: "Call ask_user now to put this multi-choice decision to the user. Do not answer it yourself and do not call check_app_progress again until they have answered.";
|
|
83
59
|
}
|
|
@@ -85,7 +61,7 @@ export function instructUserDecision(result, profile) {
|
|
|
85
61
|
if (!collectsUserApproval(profile)) {
|
|
86
62
|
return PLAIN_HOST_TOOL_PERMISSION;
|
|
87
63
|
}
|
|
88
|
-
return profile.
|
|
64
|
+
return profile.hostCollectsApprovalsAndShowsApp
|
|
89
65
|
? "Use your native ask form to put this approval decision to the user. Do not call ask_user. Present exactly two choices: Approve and Decline. Do not answer the decision yourself and do not call check_app_progress again until they have answered. For every response, call edit_app with permissionMessageId set to the decision.messageId shown to the user, never a newer request's ID. If the user chooses Approve, call edit_app with the same applicationId and prompt set to exactly `Approve`. If the user chooses Decline with no explanation, call edit_app with prompt `Decline`. If they include an explanation, call edit_app with prompt `Decline: <their explanation>`."
|
|
90
66
|
: "Call ask_user now to put this approval decision to the user. Do not answer it yourself and do not call check_app_progress again until they have answered.";
|
|
91
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/copy.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/copy.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EACL,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,CAAC,MAAM,cAAc,GACzB,mZAAmZ,CAAC;AAEtZ,MAAM,CAAC,MAAM,kBAAkB,GAC7B,iIAAiI,CAAC;AAEpI,MAAM,CAAC,MAAM,iBAAiB,GAC5B,yLAAyL,CAAC;AAE5L,MAAM,CAAC,MAAM,gBAAgB,GAC3B,wbAAwb,CAAC;AAE3b,0EAA0E;AAC1E,2EAA2E;AAC3E,kBAAkB;AAClB,MAAM,CAAC,MAAM,0BAA0B,GACrC,0dAA0d,CAAC;AAE7d,MAAM,CAAC,MAAM,yBAAyB,GACpC,2QAA2Q,CAAC;AAE9Q,MAAM,CAAC,MAAM,uBAAuB,GAClC,oHAAoH,CAAC;AAEvH,MAAM,CAAC,MAAM,eAAe,GAC1B,6QAA6Q,CAAC;AAEhR,MAAM,CAAC,MAAM,kBAAkB,GAC7B,sNAAsN,CAAC;AAEzN,MAAM,CAAC,MAAM,2BAA2B,GACtC,mJAAmJ,CAAC;AAEtJ,MAAM,CAAC,MAAM,kBAAkB,GAC7B,sQAAsQ,CAAC;AAEzQ;;;GAGG;AACH,SAAS,eAAe,CAAC,MAAkB;IACzC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC1C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IACE,OAAO,GAAG,KAAK,QAAQ;YACvB,GAAG,KAAK,IAAI;YACZ,MAAM,IAAI,GAAG;YACb,GAAG,CAAC,IAAI,KAAK,UAAU;YACvB,MAAM,IAAI,GAAG;YACb,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ;YAC5B,SAAS,IAAI,GAAG;YAChB,OAAO,GAAG,CAAC,OAAO,KAAK,SAAS,EAChC,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED,yEAAyE;AACzE,qDAAqD;AACrD,MAAM,UAAU,wBAAwB,CACtC,MAAkB;IAElB,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,MAAkB,EAClB,OAAsB;IAEtB,IAAI,MAAM,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC;QACnC,wEAAwE;QACxE,mEAAmE;QACnE,kEAAkE;QAClE,OAAO,OAAO,CAAC,gCAAgC;YAC7C,CAAC,CAAC,wNAAwN,kBAAkB,o2BAAo2B;YAChlC,CAAC,CAAC,uJAAuJ,CAAC;IAC9J,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,KAAK,cAAc,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC,gCAAgC;YAC7C,CAAC,CAAC,+hBAA+hB;YACjiB,CAAC,CAAC,+JAA+J,CAAC;IACtK,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,KAAK,iBAAiB,EAAE,CAAC;QAC9C,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,OAAO,0BAA0B,CAAC;QACpC,CAAC;QACD,OAAO,OAAO,CAAC,gCAAgC;YAC7C,CAAC,CAAC,wpBAAwpB;YAC1pB,CAAC,CAAC,2JAA2J,CAAC;IAClK,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ClientProfile } from "../../client-presentation.js";
|
|
2
1
|
import { type ToolResult } from "../result.js";
|
|
3
|
-
export declare function instructCreateIntegration(result: ToolResult
|
|
2
|
+
export declare function instructCreateIntegration(result: ToolResult): string | undefined;
|
|
4
3
|
export declare function isPublicIntegration(value: Record<string, unknown>): boolean;
|
|
5
4
|
//# sourceMappingURL=create-integration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-integration.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/create-integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-integration.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/create-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAEzD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,UAAU,GACjB,MAAM,GAAG,SAAS,CAwBpB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAY3E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isEditorIntegrationSetupUrl } from "../../editor-integration-setup-url.js";
|
|
2
2
|
import { isRecord } from "../result.js";
|
|
3
|
-
export function instructCreateIntegration(result
|
|
3
|
+
export function instructCreateIntegration(result) {
|
|
4
4
|
const url = result.value.integration_url;
|
|
5
5
|
const integrationId = result.value.integration_id;
|
|
6
6
|
if (typeof integrationId !== "string" || !integrationId) {
|
|
@@ -8,13 +8,9 @@ export function instructCreateIntegration(result, profile) {
|
|
|
8
8
|
}
|
|
9
9
|
const editorSetup = typeof url === "string" && url ? isEditorIntegrationSetupUrl(url) : false;
|
|
10
10
|
const opening = typeof url === "string" && url
|
|
11
|
-
?
|
|
12
|
-
?
|
|
13
|
-
|
|
14
|
-
: `Open the exact returned URL ${url} in Cowork's browser pane side panel.`
|
|
15
|
-
: editorSetup
|
|
16
|
-
? "Show `integration_url` to the user and ask them to open it. It opens the Integrations tab in the editor so they can enter credentials there. Do not send them to the org Integrations page. Do not open it yourself."
|
|
17
|
-
: "Show `integration_url` to the user and ask them to open it in Superblocks. Do not open it yourself."
|
|
11
|
+
? editorSetup
|
|
12
|
+
? "Show `integration_url` to the user and ask them to open it. It opens the Integrations tab in the editor so they can enter credentials there. Do not send them to the org Integrations page."
|
|
13
|
+
: "Show `integration_url` to the user and ask them to open it in Superblocks."
|
|
18
14
|
: "Tell the user to open the integration in Superblocks, but do not invent a URL.";
|
|
19
15
|
const stayInEditor = editorSetup
|
|
20
16
|
? " After they confirm, they are still in the editor."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-integration.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/create-integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-integration.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/create-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAmB,MAAM,cAAc,CAAC;AAEzD,MAAM,UAAU,yBAAyB,CACvC,MAAkB;IAElB,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC;IACzC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;IAClD,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,CAAC,aAAa,EAAE,CAAC;QACxD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,WAAW,GACf,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5E,MAAM,OAAO,GACX,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG;QAC5B,CAAC,CAAC,WAAW;YACX,CAAC,CAAC,6LAA6L;YAC/L,CAAC,CAAC,4EAA4E;QAChF,CAAC,CAAC,gFAAgF,CAAC;IACvF,MAAM,YAAY,GAAG,WAAW;QAC9B,CAAC,CAAC,oDAAoD;QACtD,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,MAAM,GAAG,oDAAoD,aAAa,uHAAuH,CAAC;IAExM,IAAI,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACtC,OAAO,GAAG,OAAO,iHAAiH,MAAM,EAAE,CAAC;IAC7I,CAAC;IACD,OAAO,GAAG,OAAO,8EAA8E,YAAY,iEAAiE,MAAM,EAAE,CAAC;AACvL,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAA8B;IAChE,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;QACzE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAC/C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;YACvD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC;QAC9C,OAAO,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { collectsUserApproval, } from "../../client-presentation.js";
|
|
2
|
-
import { ANSWER_PENDING_PERMISSION, PLAIN_HOST_TOOL_PERMISSION, REPLACE_WEDGED_APP, RETRY_UNAVAILABLE_LIVE_EDIT, STALE_PERMISSION_ANSWER,
|
|
2
|
+
import { ANSWER_PENDING_PERMISSION, PLAIN_HOST_TOOL_PERMISSION, REPLACE_WEDGED_APP, RETRY_UNAVAILABLE_LIVE_EDIT, STALE_PERMISSION_ANSWER, BUILDING_FOLLOW_UP, failedApiRunInstructions, } from "./copy.js";
|
|
3
3
|
export function instructEditApp(result, profile) {
|
|
4
4
|
if (result.pendingAction === "start_new_app") {
|
|
5
5
|
return REPLACE_WEDGED_APP;
|
|
@@ -21,7 +21,7 @@ export function instructEditApp(result, profile) {
|
|
|
21
21
|
return "This application's live-edit session is wedged, but it already has committed work - do not start a new application. Report to the user that this application needs manual recovery and stop.";
|
|
22
22
|
}
|
|
23
23
|
if (result.status === "building") {
|
|
24
|
-
return
|
|
24
|
+
return BUILDING_FOLLOW_UP;
|
|
25
25
|
}
|
|
26
26
|
if (result.status === "ready") {
|
|
27
27
|
return failedApiRunInstructions(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/edit-app.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"edit-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/edit-app.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,eAAe,CAC7B,MAAkB,EAClB,OAAsB;IAEtB,IAAI,MAAM,CAAC,aAAa,KAAK,eAAe,EAAE,CAAC;QAC7C,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IACE,MAAM,CAAC,IAAI,KAAK,yBAAyB;QACzC,MAAM,CAAC,IAAI,KAAK,iCAAiC,EACjD,CAAC;QACD,OAAO,oBAAoB,CAAC,OAAO,CAAC;YAClC,CAAC,CAAC,yBAAyB;YAC3B,CAAC,CAAC,0BAA0B,CAAC;IACjC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;QAC5C,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,IACE,MAAM,CAAC,IAAI,KAAK,uBAAuB;QACvC,MAAM,CAAC,aAAa,KAAK,aAAa,EACtC,CAAC;QACD,OAAO,2BAA2B,CAAC;IACrC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;QAC5C,OAAO,8LAA8L,CAAC;IACxM,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC9B,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-app.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/get-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-app.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/get-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ/C,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,aAAa,GACrB,MAAM,GAAG,SAAS,CA0BpB"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CHECKPOINT_FAILED, DECIDE_IN_EDITOR, instructUserDecision, REPLACE_WEDGED_APP, } from "./copy.js";
|
|
2
2
|
export function instructGetApp(result, profile) {
|
|
3
|
-
const instructions = resultInstructions(result, profile);
|
|
4
|
-
const navigation = result.value.browserNavigation;
|
|
5
|
-
if (!profile.hasNativeBrowser || !isBrowserNavigation(navigation)) {
|
|
6
|
-
return instructions;
|
|
7
|
-
}
|
|
8
|
-
const browserInstructions = result.pendingAction === "decide_in_editor"
|
|
9
|
-
? `Before any other action, ensure ${navigation.url} is open in Cowork's embedded Page browser.`
|
|
10
|
-
: `Before any other action, ensure ${navigation.url} is open in Cowork's embedded Page browser and verify the app loaded. ${APP_LOAD_CHECK}`;
|
|
11
|
-
return instructions
|
|
12
|
-
? `${browserInstructions}\n\n${instructions}`
|
|
13
|
-
: browserInstructions;
|
|
14
|
-
}
|
|
15
|
-
function resultInstructions(result, profile) {
|
|
16
3
|
const screenshot = result.value.screenshotBase64;
|
|
17
4
|
if (result.status === "ready" &&
|
|
18
5
|
typeof screenshot === "string" &&
|
|
@@ -37,13 +24,4 @@ function resultInstructions(result, profile) {
|
|
|
37
24
|
}
|
|
38
25
|
return undefined;
|
|
39
26
|
}
|
|
40
|
-
function isBrowserNavigation(value) {
|
|
41
|
-
return (typeof value === "object" &&
|
|
42
|
-
value !== null &&
|
|
43
|
-
"action" in value &&
|
|
44
|
-
value.action === "open_editor" &&
|
|
45
|
-
"url" in value &&
|
|
46
|
-
typeof value.url === "string" &&
|
|
47
|
-
value.url.length > 0);
|
|
48
|
-
}
|
|
49
27
|
//# sourceMappingURL=get-app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/get-app.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"get-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/get-app.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,cAAc,CAC5B,MAAkB,EAClB,OAAsB;IAEtB,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC;IACjD,IACE,MAAM,CAAC,MAAM,KAAK,OAAO;QACzB,OAAO,UAAU,KAAK,QAAQ;QAC9B,UAAU,EACV,CAAC;QACD,OAAO,2RAA2R,CAAC;IACrS,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,eAAe,EAAE,CAAC;QAC7C,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,aAAa,EAAE,CAAC;QAC3C,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,kBAAkB,EAAE,CAAC;QAChD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnE,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,gBAAgB,EAAE,CAAC;QACvC,OAAO,qFAAqF,CAAC;IAC/F,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa/C,2EAA2E;AAC3E,MAAM,MAAM,QAAQ,GAAG,CACrB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,aAAa,KACnB,MAAM,GAAG,SAAS,CAAC;AAExB,yDAAyD;AACzD,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAa5D,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { instructAskUser } from "./ask-user.js";
|
|
|
2
2
|
import { instructBuildApp, instructGetPreviewStatus } from "./build-app.js";
|
|
3
3
|
import { instructCheckAppProgress } from "./check-app-progress.js";
|
|
4
4
|
import { instructCheckPublishProgress } from "./check-publish-progress.js";
|
|
5
|
-
import { APP_SHARING_CHOICE } from "./copy.js";
|
|
6
5
|
import { instructCreateIntegration } from "./create-integration.js";
|
|
7
6
|
import { instructEditApp } from "./edit-app.js";
|
|
8
7
|
import { instructGetApp } from "./get-app.js";
|
|
@@ -19,9 +18,6 @@ export const INSTRUCTIONS = {
|
|
|
19
18
|
create_integration: instructCreateIntegration,
|
|
20
19
|
edit_app: instructEditApp,
|
|
21
20
|
get_app: instructGetApp,
|
|
22
|
-
get_application_access: () => APP_SHARING_CHOICE,
|
|
23
|
-
get_application_deployment_history: () => APP_SHARING_CHOICE,
|
|
24
|
-
get_application_summary: () => APP_SHARING_CHOICE,
|
|
25
21
|
get_integration_metadata: instructGetIntegrationMetadata,
|
|
26
22
|
get_preview_status: instructGetPreviewStatus,
|
|
27
23
|
publish_app: instructPublishApp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAQ9D,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY,GAAwC;IAC/D,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,gBAAgB;IAC3B,kBAAkB,EAAE,wBAAwB;IAC5C,sBAAsB,EAAE,4BAA4B;IACpD,kBAAkB,EAAE,yBAAyB;IAC7C,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,cAAc;IACvB,wBAAwB,EAAE,8BAA8B;IACxD,kBAAkB,EAAE,wBAAwB;IAC5C,WAAW,EAAE,kBAAkB;IAC/B,SAAS,EAAE,gBAAgB;IAC3B,eAAe,EAAE,sBAAsB;CACxC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ClientProfile } from "../../client-presentation.js";
|
|
2
1
|
import type { ToolResult } from "../result.js";
|
|
3
|
-
export declare function instructPublishApp(result: ToolResult
|
|
2
|
+
export declare function instructPublishApp(result: ToolResult): string | undefined;
|
|
4
3
|
//# sourceMappingURL=publish-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-app.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/publish-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"publish-app.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/publish-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAazE"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export function instructPublishApp(result, profile) {
|
|
3
|
-
const instructions = resultInstructions(result);
|
|
4
|
-
const navigation = instructPublishDetails(result, profile);
|
|
5
|
-
if (!navigation) {
|
|
6
|
-
return instructions;
|
|
7
|
-
}
|
|
8
|
-
return instructions ? `${navigation}\n\n${instructions}` : navigation;
|
|
9
|
-
}
|
|
10
|
-
function resultInstructions(result) {
|
|
1
|
+
export function instructPublishApp(result) {
|
|
11
2
|
if (result.status === "publishing") {
|
|
12
3
|
const url = result.value.publishDetailsUrl;
|
|
13
4
|
const link = typeof url === "string" && url
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/publish-app.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"publish-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/publish-app.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,MAAkB;IACnD,IAAI,MAAM,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAC3C,MAAM,IAAI,GACR,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG;YAC5B,CAAC,CAAC,gBAAgB,GAAG,kBAAkB;YACvC,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,gFAAgF,IAAI,yGAAyG,CAAC;IACvM,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,+BAA+B,EAAE,CAAC;QACpD,OAAO,+KAA+K,CAAC;IACzL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ClientProfile } from "../../client-presentation.js";
|
|
2
1
|
import type { ToolResult } from "../result.js";
|
|
3
|
-
export declare function instructStartApp(result: ToolResult
|
|
2
|
+
export declare function instructStartApp(result: ToolResult): string | undefined;
|
|
4
3
|
//# sourceMappingURL=start-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-app.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/start-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"start-app.d.ts","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/start-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ/C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAwBvE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { REPLACE_WEDGED_APP, RETRY_UNAVAILABLE_LIVE_EDIT,
|
|
2
|
-
export function instructStartApp(result
|
|
1
|
+
import { REPLACE_WEDGED_APP, RETRY_UNAVAILABLE_LIVE_EDIT, BUILDING_FOLLOW_UP, failedApiRunInstructions, } from "./copy.js";
|
|
2
|
+
export function instructStartApp(result) {
|
|
3
3
|
if (result.pendingAction === "start_new_app") {
|
|
4
4
|
return REPLACE_WEDGED_APP;
|
|
5
5
|
}
|
|
@@ -15,7 +15,7 @@ export function instructStartApp(result, profile) {
|
|
|
15
15
|
return "Superblocks could not start the replacement application's live-edit session. One fresh application has already been tried, so do not create another application or retry this build. Stop and report that Superblocks' live-edit service needs recovery.";
|
|
16
16
|
}
|
|
17
17
|
if (result.status === "building") {
|
|
18
|
-
return
|
|
18
|
+
return BUILDING_FOLLOW_UP;
|
|
19
19
|
}
|
|
20
20
|
if (result.status === "ready") {
|
|
21
21
|
return failedApiRunInstructions(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/start-app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/start-app.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,gBAAgB,CAAC,MAAkB;IACjD,IAAI,MAAM,CAAC,aAAa,KAAK,eAAe,EAAE,CAAC;QAC7C,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,yBAAyB,EAAE,CAAC;QAC9C,OAAO,wLAAwL,CAAC;IAClM,CAAC;IACD,IACE,MAAM,CAAC,IAAI,KAAK,uBAAuB;QACvC,MAAM,CAAC,aAAa,KAAK,aAAa,EACtC,CAAC;QACD,OAAO,2BAA2B,CAAC;IACrC,CAAC;IACD,6EAA6E;IAC7E,IAAI,MAAM,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;QAC5C,OAAO,0PAA0P,CAAC;IACpQ,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC9B,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import type { AppDeps } from "../../deps.js";
|
|
3
3
|
import { type EditorDocumentProbe } from "./editor-document-probe.js";
|
|
4
|
+
export declare const SERVER_INSTRUCTIONS: string;
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
* against these tools.
|
|
6
|
+
* The MCP server behind one MCP session, over stdio or HTTP.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* alias here is what lets "get Clark to build me a to-do app" reach
|
|
11
|
-
* `start_app`. Recognizing a name and using it are different things: the alias
|
|
12
|
-
* is input-only, because a client that reads "Clark" here repeats it back and
|
|
13
|
-
* reintroduces the retired name to the user.
|
|
8
|
+
* Tools run as the authenticated Superblocks user. `builderToolsOnly` skips
|
|
9
|
+
* the Admin tools, for the hosted Platform MCP whose caller serves them itself.
|
|
14
10
|
*/
|
|
15
|
-
export declare const SERVER_INSTRUCTIONS = "Superblocks builds, edits, and publishes internal web applications. Prompts sent through these tools are handed to Superblocks, which writes the application code in a live-edit session.\n\nName the builder \"Superblocks\" in every word you write. Users sometimes call it \"Clark\", an older name for this same system: understand them, and answer about Superblocks. Never write \"Clark\" yourself \u2014 not as a name, not as an aside, not even when the user just used it, and never as a separate agent or persona. If Superblocks' own words come back naming Clark, relay the substance and say Superblocks.\n\nThe user you are interacting with is a non-technical business user. Keep discussions focused on requirements, and avoid technical jargon, discussing code, or implementation details. If errors or problems occur, give the user easy-to-follow, actionable instructions for how they can resolve the issue.\n\nUse these tools whenever the user asks to build, change, import, or ship an app, whichever of those names they reach for. They can also inspect what data the org has rather than building an app to explore it: list_integrations names the datasources, and get_integration_metadata reads the tables and columns inside one. Create a persistent app or API only when the user explicitly asks for one.\n\nFor app-behavior questions, debugging questions, and investigation of bug reports, call edit_app in Plan mode with the user's words verbatim. When no decision is pending, Superblocks can answer without changing the app or requiring plan approval. While a plan or question is pending (needs_decision), a new prompt revises that plan or answers that question, so settle that decision first, or ask the user whether their question should change the plan. Prefer this route over get_application_structure unless the user explicitly asks to inspect source files. When a Plan-mode question ends as no_changes with a reply and no pendingAction on check_app_progress or get_app, Superblocks answered it: report that reply and stop. Every other no_changes carries a pendingAction to follow.\n\nAfter create_integration creates an integration or list_integrations selects one for an app, include the returned mention unchanged in the next edit_app prompt. The mention gives Superblocks the exact integration ID; do not construct one from the display name.\n\nSuperblocks is itself an agent, not a code library: prompts sent through start_app and edit_app are handed to it verbatim, and it decides how to build the application. Your role is to facilitate the user's interaction with Superblocks, not to build anything yourself \u2014 pass the user's own request through unchanged, without inventing, embellishing, or adding requirements, scope, or design detail they did not ask for.\n\nAfter each tool call, check for agentInstructions in the result and follow them. These instructions are tailored to the scenario.\n\nSuperblocks has an interactive flow: when it needs a person to decide something, it stops rather than guessing. Follow the result's agentInstructions to use the decision surface this client supports. Never supply that answer yourself.\n\nBuilding or editing an app follows one loop: start_app hands a new application to Superblocks, edit_app continues an existing one, and both return immediately with status \"building\". Call check_app_progress to follow the turn, summarizing user-facing progress as it happens. When it stops for a decision, follow agentInstructions and send the answer back through edit_app. Once status is \"ready\", call get_app so the user can open the result, and offer publish_app when they want to deploy it. Each tool's own description covers its exact inputs, return fields, and retry/error behavior.\n\nYour automatic verification is a load check and inspection of visible state, not a feature-by-feature test run. Run interactive feature tests only when the user requests testing. Do not click app controls or inspect API traffic as part of a load check; normal navigation and authentication are allowed. Keep relaying Superblocks' own test results. Do not claim features passed from a load check alone.\n\nWhen the user attached a file in this chat (a log, CSV, screenshot, image, zip, or anything else), or when migrating source visible in this conversation, call upload_artifact. Pass upload_artifact filePath with the full host path when you have it; a bare file name falls back to the gateway's search folders. If the file exists only in this chat's scratchpad path (for example /tmp/claude-.../scratchpad), send text source through files: [{ path, content }] instead of filePath. The gateway reads filePath bytes itself, so an image or PDF costs nothing to send. Only source you are writing out yourself goes in files, which is archived as text - never base64 a file into it. Then pass the returned artifact in start_app or edit_app artifacts. Do not create a Claude artifact or use the host's own file-upload UI.\n\nWhen the source is a readable tree on this machine, archive the source and assets with their original relative paths, excluding .git, node_modules, build output, secrets, and production data. Inspect the archive, upload it with upload_artifact filePath, then pass the returned artifact unchanged in start_app or edit_app artifacts. Local paths and prose descriptions are not a substitute for the source artifact: Superblocks cannot read the host's workspace. Ask Superblocks to read the attached source and preserve its UI and behavior. Reuse the artifact on retries. Follow the superblocks-import skill when available; Superblocks writes the application, not the host.\n\nFor a migrated app with missing integrations, call list_integrations first. Reuse only the same plugin and the same connection: the same REST base URL, or the same host, port, and database. A similar name is not a match. list_integrations and get_integration_metadata do not expose connection URLs or hosts, so do not use them to guess a match. When there is no exact match, follow the result's agentInstructions to create and wire every declared integration.\n\nThis connector is the single Superblocks MCP: Builder tools (upload_artifact, start_app, edit_app, check_app_progress, ask_user, get_app, build_app, publish_app, check_publish_progress) and Admin tools (integrations, apps, users, folders, deploy_application, and the rest of the customer Admin surface) share this endpoint. Prefer create_integration / list_integrations here over sending the user to a second MCP. create_integration takes name, plugin_id, and configuration, never the raw integrations API envelope. create_integration is Admin CRUD for org datasources; start_app creates an application and hands it a prompt. deploy_application is Admin deploy of an existing commit; publish_app is the Builder path that commits current work and waits for it to go live. Omit base_url on Admin tools unless targeting a different control plane. checkout_application is not exposed on this network surface (host filesystem writes); use the CLI/workspace checkout path instead.\n\nThis connection may be established before browser sign-in. Call the tool that does the user's job. If it reports \"MCP browser login required\" or \"Saved Superblocks login changed outside this task\", explicitly call login when available, then retry the requested tool in this current task. Account-dependent tools never start browser sign-in themselves. Do not ask the user to restart Claude. Do not call whoami as a preflight. If the user asks which Superblocks account is in use, call whoami. If the user asks to sign in or switch accounts, call login when available. If the user asks to change the Superblocks server, use a native question form when available to confirm https://app.superblocks.com or collect another server URL, then call set_server; continue in the current Cowork task after sign-in succeeds. Report the sign-in status from set_server's result; a successful whoami does not show whether browser sign-in occurred.\n\nNever tell the user to restart the MCP server; keep the MCP server running.\n\nA cancelled tool call does not undo work Superblocks already did. The application still exists; read applicationId on the error and follow agentInstructions (or pendingAction) instead of starting over.\n\nget_app's previewUrl opens the current development app with existing app permissions; it is not a published end-user URL. Live-editor previews, including fullscreen links, require app edit/build permission (apps:update); End-User or READ access alone is insufficient. For a requested live-preview link, return that exact URL; do not open Share, change permissions, invite anyone, or publish. Call build_app only when the user explicitly requests an unpublished build or a shareable versioned preview, never automatically after an ordinary app creation, edit, or get_app. It creates a commit preview without publishing; retain its previewUrl and use get_preview_status for subsequent checks. If a sharing request is ambiguous (including \"Can I share this app?\"), ask before calling any tools whether they mean live preview, an unpublished commit preview, or publishing. Access permissions and deployment history cannot resolve this intent; an empty deployment history does not mean publishing is required to share a preview. Call publish_app or deploy_application only when the user explicitly asks to publish or deploy. Publishing does not extend the hosting environment's lifetime; URLs in ephemeral environments remain temporary. Otherwise prefer MCP Apps Open editor / Open preview buttons over dumping editUrl / previewUrl / publishUrl into chat, especially preview JWTs. Claude Desktop can only openLink https URLs; when a URL is http, say so and rely on any screenshot instead.\n\nBrowser capture (MUST):\n1. Prefer host browser tools (Playwright MCP, chrome-devtools, agent-browser) over opening Superblocks URLs yourself. Honor the structured \"browser\" field on start_app / get_app / idp_step_up; do not paraphrase it into a different URL.\n2. When canvas.openWhileBuilding is \"claude_cowork_side_panel_only\", open canvas.editUrl while status is \"building\" only for a Claude Cowork task whose built-in browser is available, and use its embedded side panel. Every other host MUST NOT open it mid-build because that can steal the live-edit turn.\n3. NEVER paste tokens, JWTs, or API keys into browser evaluate or fill. Tokens are not in tool JSON; do not invent them.\n4. Playwright MCP MUST NOT use --isolated for Superblocks IdP. Cookies must survive the session.\n5. MUST NOT call browser_close until the Superblocks task is done (see driver.mustNotCloseUntil).\n6. agent-browser MUST always pass --profile and a stable --session for the same Superblocks origin.\n7. Claude-in-Chrome is not a mid-turn canvas. Do not use it to screenshot the live Vite app while a Gateway turn is held.";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* Tools run as the authenticated Superblocks user.
|
|
20
|
-
*/
|
|
21
|
-
export declare function createMcpServer(deps: AppDeps, probeEditorDocument?: EditorDocumentProbe): McpServer;
|
|
11
|
+
export declare function createMcpServer(deps: AppDeps, { builderToolsOnly, probeEditorDocument, }?: {
|
|
12
|
+
builderToolsOnly?: boolean;
|
|
13
|
+
probeEditorDocument?: EditorDocumentProbe;
|
|
14
|
+
}): McpServer;
|
|
22
15
|
//# sourceMappingURL=mount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../src/transports/mcp/mount.ts"],"names":[],"mappings":"AASA,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../src/transports/mcp/mount.ts"],"names":[],"mappings":"AASA,OAAO,EACL,SAAS,EAGV,MAAM,yCAAyC,CAAC;AA4CjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AA2B7C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAiUpC,eAAO,MAAM,mBAAmB,QAA4B,CAAC;AA8B7D;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,OAAO,EACb,EACE,gBAAwB,EACxB,mBAAiD,GAClD,GAAE;IACD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CACtC,GACL,SAAS,CAkpDX"}
|