@superblocksteam/gateway 2.0.166 → 2.0.168-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 +163 -28
- package/dist/agents/resolve-orchestrator-url.js +1 -2
- package/dist/agents/resolve-orchestrator-url.js.map +1 -1
- package/dist/capabilities/lifecycle.d.ts +3 -0
- package/dist/capabilities/lifecycle.js +330 -128
- package/dist/capabilities/lifecycle.js.map +1 -1
- package/dist/capabilities/live-state-attaches.d.ts +26 -0
- package/dist/capabilities/live-state-attaches.js +41 -0
- package/dist/capabilities/live-state-attaches.js.map +1 -0
- package/dist/capabilities/tool-permission-reply.d.ts +28 -0
- package/dist/capabilities/tool-permission-reply.js +55 -0
- package/dist/capabilities/tool-permission-reply.js.map +1 -0
- package/dist/capabilities/types.d.ts +19 -1
- package/dist/capabilities/types.js.map +1 -1
- package/dist/deadline.d.ts +6 -0
- package/dist/deadline.js +23 -0
- package/dist/deadline.js.map +1 -0
- package/dist/deps.d.ts +7 -0
- package/dist/health/readiness.js +1 -17
- package/dist/health/readiness.js.map +1 -1
- package/dist/integrations/filters.js +2 -2
- package/dist/integrations/filters.js.map +1 -1
- package/dist/orchestrator/client.d.ts +2 -1
- package/dist/orchestrator/client.js +4 -2
- package/dist/orchestrator/client.js.map +1 -1
- package/dist/sabs/app-state.d.ts +1 -0
- package/dist/sabs/app-state.js +9 -0
- package/dist/sabs/app-state.js.map +1 -1
- package/dist/sabs/awaited-decision.d.ts +24 -1
- package/dist/sabs/awaited-decision.js +40 -9
- package/dist/sabs/awaited-decision.js.map +1 -1
- package/dist/sabs/editor-client-methods.d.ts +21 -10
- package/dist/sabs/editor-client-methods.js +48 -24
- package/dist/sabs/editor-client-methods.js.map +1 -1
- package/dist/sabs/session-peer.d.ts +47 -14
- package/dist/sabs/session-peer.js.map +1 -1
- package/dist/sabs/turn-collector.d.ts +27 -1
- package/dist/sabs/turn-collector.js +38 -2
- package/dist/sabs/turn-collector.js.map +1 -1
- package/dist/sabs/websocket-session-peer.d.ts +27 -3
- package/dist/sabs/websocket-session-peer.js +466 -66
- package/dist/sabs/websocket-session-peer.js.map +1 -1
- package/dist/server/client.d.ts +3 -0
- package/dist/server/client.js +7 -3
- package/dist/server/client.js.map +1 -1
- package/dist/start.d.ts +13 -2
- package/dist/start.js +112 -12
- package/dist/start.js.map +1 -1
- package/dist/telemetry/metrics.js +8 -21
- package/dist/telemetry/metrics.js.map +1 -1
- package/dist/telemetry/runtime.d.ts +5 -0
- package/dist/telemetry/runtime.js +22 -8
- package/dist/telemetry/runtime.js.map +1 -1
- package/dist/transports/mcp/admin-tools.d.ts +2 -1
- package/dist/transports/mcp/admin-tools.js +19 -2
- package/dist/transports/mcp/admin-tools.js.map +1 -1
- package/dist/transports/mcp/client-presentation.d.ts +9 -1
- package/dist/transports/mcp/client-presentation.js +10 -0
- package/dist/transports/mcp/client-presentation.js.map +1 -1
- package/dist/transports/mcp/decision-card-html.d.ts +4 -2
- package/dist/transports/mcp/decision-card-html.js +107 -25
- package/dist/transports/mcp/decision-card-html.js.map +1 -1
- package/dist/transports/mcp/decision-elicitation.d.ts +3 -2
- package/dist/transports/mcp/decision-elicitation.js +67 -2
- package/dist/transports/mcp/decision-elicitation.js.map +1 -1
- package/dist/transports/mcp/format-tool-content.d.ts +7 -0
- package/dist/transports/mcp/format-tool-content.js +3 -3
- package/dist/transports/mcp/format-tool-content.js.map +1 -1
- package/dist/transports/mcp/instructions/result.js +1 -0
- package/dist/transports/mcp/instructions/result.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/ask-user.d.ts +2 -1
- package/dist/transports/mcp/instructions/tools/ask-user.js +9 -2
- package/dist/transports/mcp/instructions/tools/ask-user.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/copy.d.ts +5 -2
- package/dist/transports/mcp/instructions/tools/copy.js +20 -5
- package/dist/transports/mcp/instructions/tools/copy.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/edit-app.d.ts +1 -1
- package/dist/transports/mcp/instructions/tools/edit-app.js +11 -1
- package/dist/transports/mcp/instructions/tools/edit-app.js.map +1 -1
- package/dist/transports/mcp/mount.d.ts +2 -3
- package/dist/transports/mcp/mount.js +395 -112
- package/dist/transports/mcp/mount.js.map +1 -1
- package/dist/transports/mcp/plan-approval.d.ts +23 -13
- package/dist/transports/mcp/plan-approval.js +39 -26
- package/dist/transports/mcp/plan-approval.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-elicitation.js","sourceRoot":"","sources":["../../../src/transports/mcp/decision-elicitation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAMxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAqC9C;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAC3C,YAAmE;IAEnE,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC;QAC/B,YAAY,CAAC,gCAAgC,EAAE;YAC7C,yBAAyB,EAAE,KAAK;YAChC,iBAAiB,EAAE,oBAAoB;SACxC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;IAC7C,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1C,YAAY,CAAC,gCAAgC,EAAE;YAC7C,yBAAyB,EAAE,IAAI;YAC/B,iBAAiB,EAAE,kBAAkB;SACtC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,IAAI,WAAW,CAAC;IACrC,YAAY,CAAC,gCAAgC,EAAE;QAC7C,yBAAyB,EAAE,MAAM;QACjC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;QAC1C,iBAAiB,EAAE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;KACpC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,YAAY,CAAC,+BAA+B,EAAE;QAC5C,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;QACnC,mBAAmB,EAAE,IAAI;QACzB,aAAa,EAAE,MAAM,CAAC,IAAI;KAC3B,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -18,3 +18,10 @@ export declare function formatMcpToolContent(result: CapabilityResult<unknown>,
|
|
|
18
18
|
type: string;
|
|
19
19
|
message: string;
|
|
20
20
|
}>, profile?: ClientProfile): ContentBlock[];
|
|
21
|
+
/**
|
|
22
|
+
* Bolds integration names without changing the plan's authored Markdown.
|
|
23
|
+
*
|
|
24
|
+
* Hosts may show the model `structuredContent` instead of the text blocks, so
|
|
25
|
+
* both get this copy. The decision card gets the tagged plan through `_meta`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function withDisplayedMentions(result: CapabilityResult<unknown>): CapabilityResult<unknown>;
|
|
@@ -79,10 +79,10 @@ const ENTITY_MENTION = /(\\*)@((?:(?!\[id=)[^@\r\n])+?(?<!\s))\[id=[^\]\r\n]+\]/
|
|
|
79
79
|
/**
|
|
80
80
|
* Bolds integration names without changing the plan's authored Markdown.
|
|
81
81
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* Hosts may show the model `structuredContent` instead of the text blocks, so
|
|
83
|
+
* both get this copy. The decision card gets the tagged plan through `_meta`.
|
|
84
84
|
*/
|
|
85
|
-
function withDisplayedMentions(result) {
|
|
85
|
+
export function withDisplayedMentions(result) {
|
|
86
86
|
if (result.kind !== "ok" || !isRecord(result.value)) {
|
|
87
87
|
return result;
|
|
88
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-tool-content.js","sourceRoot":"","sources":["../../../src/transports/mcp/format-tool-content.ts"],"names":[],"mappings":"AAEA,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CAAC;AAED;;;GAGG;AACH,MAAM,cAAc,GAClB,2DAA2D,CAAC;AAE9D;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"format-tool-content.js","sourceRoot":"","sources":["../../../src/transports/mcp/format-tool-content.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAI9E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAiC,EACjC,WAAqD,EAAE,EACvD,OAAuB;IAEvB,MAAM,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,GACvD,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,6EAA6E;IAC7E,2EAA2E;IAC3E,4EAA4E;IAC5E,wBAAwB;IACxB,OAAO,CAAC,IAAI,CAAC;QACX,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;QAChD,IAAI,EAAE,MAAM;KACb,CAAC,CAAC;IACH,IAAI,OAAO,EAAE,gBAAgB,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IACD,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,CAAC,IAAI,CAAC;YACX,WA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IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,cAAc,CACrB,KAA8B;IAE9B,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,sBAAsB,CAAC;QAC5B,KAAK,cAAc,CAAC;QACpB,KAAK,MAAM,CAAC;QACZ,KAAK,iBAAiB;YACpB,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CACtB,KAA8B;IAE9B,QAAQ,KAAK,CAAC,aAAa,EAAE,CAAC;QAC5B,KAAK,iBAAiB,CAAC;QACvB,KAAK,cAAc,CAAC;QACpB,KAAK,oBAAoB,CAAC;QAC1B,KAAK,kBAAkB,CAAC;QACxB,KAAK,aAAa,CAAC;QACnB,KAAK,aAAa,CAAC;QACnB,KAAK,eAAe,CAAC;QACrB,KAAK,gBAAgB;YACnB,OAAO,KAAK,CAAC,aAAa,CAAC;QAC7B;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { type ClientProfile } from "../../client-presentation.js";
|
|
1
2
|
import type { ToolResult } from "../result.js";
|
|
2
|
-
export declare function instructAskUser(result: ToolResult): string | undefined;
|
|
3
|
+
export declare function instructAskUser(result: ToolResult, profile: ClientProfile): string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { collectsUserApproval, } from "../../client-presentation.js";
|
|
2
|
+
import { DECIDE_IN_EDITOR, PLAIN_HOST_TOOL_PERMISSION, SHOW_PLAN_VERBATIM, } from "./copy.js";
|
|
3
|
+
export function instructAskUser(result, profile) {
|
|
3
4
|
if (!result.ok) {
|
|
4
5
|
return undefined;
|
|
5
6
|
}
|
|
@@ -12,6 +13,12 @@ export function instructAskUser(result) {
|
|
|
12
13
|
if (result.decisionKind === "multi_choice") {
|
|
13
14
|
return "Present `decision.question` and every entry of `decision.options`, none dropped or merged, as an affordance (picker/suggested replies) if your host supports one. Never type a numbered menu as a stand-in for a picker that's already showing the same options.";
|
|
14
15
|
}
|
|
16
|
+
if (result.decisionKind === "tool_permission") {
|
|
17
|
+
if (!collectsUserApproval(profile)) {
|
|
18
|
+
return PLAIN_HOST_TOOL_PERMISSION;
|
|
19
|
+
}
|
|
20
|
+
return "Present `decision.question` and exactly two choices: `Approve` and `Decline`. Do not answer it yourself. If the card has already submitted the response, call check_app_progress. Otherwise answer through edit_app with permissionMessageId set to the decision.messageId shown to the user.";
|
|
21
|
+
}
|
|
15
22
|
if (!result.decisionKind) {
|
|
16
23
|
return "Nothing is waiting on the user right now. Follow the build instead: call `check_app_progress` or `get_app` rather than asking again.";
|
|
17
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask-user.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/ask-user.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ask-user.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/ask-user.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,eAAe,CAC7B,MAAkB,EAClB,OAAsB;IAEtB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,kBAAkB,EAAE,CAAC;QAChD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC;QACnC,OAAO,sCAAsC,kBAAkB,wDAAwD,CAAC;IAC1H,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,KAAK,cAAc,EAAE,CAAC;QAC3C,OAAO,kQAAkQ,CAAC;IAC5Q,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,+RAA+R,CAAC;IACzS,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;QACzB,OAAO,sIAAsI,CAAC;IAChJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/** Instructions shared verbatim by more than one tool. */
|
|
2
|
-
import type
|
|
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 APP_SHARING_CHOICE = "For an ambiguous sharing request, ask the user to choose live preview, an unpublished commit preview, or publishing. Present all three options without choosing one for them. Do not assume publishing is required because the app has not been deployed: live and commit previews use existing app permissions without publishing. Only publish or change access when the user explicitly requests that action.";
|
|
5
|
+
export declare const APP_SHARING_CHOICE = "For an ambiguous sharing request, ask the user to choose live preview, an unpublished commit preview, or publishing. Present all three options without choosing one for them. Do not assume publishing is required because the app has not been deployed: live and commit previews use existing app permissions without publishing. Live-editor previews, including fullscreen links, require app edit/build permission (apps:update); End-User or READ access alone is insufficient. Only publish or change access when the user explicitly requests that action. Publishing does not extend the hosting environment's lifetime; URLs in ephemeral environments remain temporary.";
|
|
6
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
7
|
export declare function buildingFollowUp(profile: ClientProfile): string;
|
|
8
8
|
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
9
|
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
|
+
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>`.";
|
|
11
|
+
export declare const ANSWER_PENDING_PERMISSION = "Put the pending permission to the user through your decision form, then answer it with edit_app, permissionMessageId set to decision.messageId, and the user's choice. To give Superblocks a different instruction instead, send prompt `Decline: <the new instruction>`.";
|
|
12
|
+
export declare const STALE_PERMISSION_ANSWER = "Get the current permission request from check_app_progress and follow its instructions. Do not resend this answer.";
|
|
10
13
|
export declare const FAILED_API_RUNS = "One or more APIs did not execute and returned no data: each is the latest `test_api` entry for its name in `recentRuns` with `success: false`. Report each as a failed API check. Do not describe a failed API, or a page that depends on it, as built, tested, or working.";
|
|
11
14
|
export declare const REPLACE_WEDGED_APP = "This application is wedged and cannot be recovered. Call `start_app` once more with the same prompt and artifacts, and set `replacesApplicationId` to this result's `applicationId`. Do not upload the source again.";
|
|
12
15
|
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.";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** Instructions shared verbatim by more than one tool. */
|
|
2
2
|
import { withCoworkEditorHost } from "../../../../capture/cowork-editor-url.js";
|
|
3
|
+
import { collectsUserApproval, } from "../../client-presentation.js";
|
|
3
4
|
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.";
|
|
4
|
-
export const APP_SHARING_CHOICE = "For an ambiguous sharing request, ask the user to choose live preview, an unpublished commit preview, or publishing. Present all three options without choosing one for them. Do not assume publishing is required because the app has not been deployed: live and commit previews use existing app permissions without publishing. Only publish or change access when the user explicitly requests that action.";
|
|
5
|
+
export const APP_SHARING_CHOICE = "For an ambiguous sharing request, ask the user to choose live preview, an unpublished commit preview, or publishing. Present all three options without choosing one for them. Do not assume publishing is required because the app has not been deployed: live and commit previews use existing app permissions without publishing. Live-editor previews, including fullscreen links, require app edit/build permission (apps:update); End-User or READ access alone is insufficient. Only publish or change access when the user explicitly requests that action. Publishing does not extend the hosting environment's lifetime; URLs in ephemeral environments remain temporary.";
|
|
5
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";
|
|
6
7
|
// Repeat the query on each build: initialize instructions are gone by then.
|
|
7
8
|
export function buildingFollowUp(profile) {
|
|
@@ -13,6 +14,12 @@ export function buildingFollowUp(profile) {
|
|
|
13
14
|
}
|
|
14
15
|
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.";
|
|
15
16
|
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
|
+
// TODO(AR-569): once the Superblocks editor shows tool permissions that a
|
|
18
|
+
// Gateway turn owns, send plain hosts there to approve instead of offering
|
|
19
|
+
// only a decline.
|
|
20
|
+
export 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>`.";
|
|
21
|
+
export const ANSWER_PENDING_PERMISSION = "Put the pending permission to the user through your decision form, then answer it with edit_app, permissionMessageId set to decision.messageId, and the user's choice. To give Superblocks a different instruction instead, send prompt `Decline: <the new instruction>`.";
|
|
22
|
+
export const STALE_PERMISSION_ANSWER = "Get the current permission request from check_app_progress and follow its instructions. Do not resend this answer.";
|
|
16
23
|
export const FAILED_API_RUNS = "One or more APIs did not execute and returned no data: each is the latest `test_api` entry for its name in `recentRuns` with `success: false`. Report each as a failed API check. Do not describe a failed API, or a page that depends on it, as built, tested, or working.";
|
|
17
24
|
export const REPLACE_WEDGED_APP = "This application is wedged and cannot be recovered. Call `start_app` once more with the same prompt and artifacts, and set `replacesApplicationId` to this result's `applicationId`. Do not upload the source again.";
|
|
18
25
|
export 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.";
|
|
@@ -62,11 +69,11 @@ export function instructPublishDetails(result, profile) {
|
|
|
62
69
|
}
|
|
63
70
|
export function instructUserDecision(result, profile) {
|
|
64
71
|
if (result.decisionKind === "plan") {
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
72
|
+
// Ask widgets vary (some are one-line, some do not render markdown), so
|
|
73
|
+
// the plan never goes in the form. Cowork hides plain text written
|
|
74
|
+
// between tool calls; only SendUserMessage reaches its chat view.
|
|
68
75
|
return profile.hasNativeAskForm
|
|
69
|
-
? `
|
|
76
|
+
? `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`
|
|
70
77
|
: "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.";
|
|
71
78
|
}
|
|
72
79
|
if (result.decisionKind === "multi_choice") {
|
|
@@ -74,6 +81,14 @@ export function instructUserDecision(result, profile) {
|
|
|
74
81
|
? "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."
|
|
75
82
|
: "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.";
|
|
76
83
|
}
|
|
84
|
+
if (result.decisionKind === "tool_permission") {
|
|
85
|
+
if (!collectsUserApproval(profile)) {
|
|
86
|
+
return PLAIN_HOST_TOOL_PERMISSION;
|
|
87
|
+
}
|
|
88
|
+
return profile.hasNativeAskForm
|
|
89
|
+
? "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
|
+
: "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
|
+
}
|
|
77
92
|
return undefined;
|
|
78
93
|
}
|
|
79
94
|
//# sourceMappingURL=copy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/copy.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/copy.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EACL,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,CAAC,MAAM,cAAc,GACzB,mZAAmZ,CAAC;AAEtZ,MAAM,CAAC,MAAM,kBAAkB,GAC7B,opBAAopB,CAAC;AAEvpB,MAAM,CAAC,MAAM,yBAAyB,GACpC,2JAA2J,CAAC;AAE9J,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,OAAsB;IACrD,MAAM,QAAQ,GACZ,iIAAiI,CAAC;IACpI,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAA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B,EAAE,CAAC;QAC9C,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,OAAO,0BAA0B,CAAC;QACpC,CAAC;QACD,OAAO,OAAO,CAAC,gBAAgB;YAC7B,CAAC,CAAC,wpBAAwpB;YAC1pB,CAAC,CAAC,2JAA2J,CAAC;IAClK,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientProfile } from "../../client-presentation.js";
|
|
2
2
|
import type { ToolResult } from "../result.js";
|
|
3
3
|
export declare function instructEditApp(result: ToolResult, profile: ClientProfile): string | undefined;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
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, buildingFollowUp, failedApiRunInstructions, } from "./copy.js";
|
|
2
3
|
export function instructEditApp(result, profile) {
|
|
3
4
|
if (result.pendingAction === "start_new_app") {
|
|
4
5
|
return REPLACE_WEDGED_APP;
|
|
5
6
|
}
|
|
7
|
+
if (result.code === "tool_permission_pending" ||
|
|
8
|
+
result.code === "tool_permission_reply_ambiguous") {
|
|
9
|
+
return collectsUserApproval(profile)
|
|
10
|
+
? ANSWER_PENDING_PERMISSION
|
|
11
|
+
: PLAIN_HOST_TOOL_PERMISSION;
|
|
12
|
+
}
|
|
13
|
+
if (result.code === "tool_permission_stale") {
|
|
14
|
+
return STALE_PERMISSION_ANSWER;
|
|
15
|
+
}
|
|
6
16
|
if (result.code === "live_edit_unavailable" &&
|
|
7
17
|
result.pendingAction === "retry_build") {
|
|
8
18
|
return RETRY_UNAVAILABLE_LIVE_EDIT;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/edit-app.ts"],"names":[],"mappings":"
|
|
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,gBAAgB,EAChB,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,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,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"}
|
|
@@ -12,11 +12,10 @@ import { type EditorDocumentProbe } from "./editor-document-probe.js";
|
|
|
12
12
|
* is input-only, because a client that reads "Clark" here repeats it back and
|
|
13
13
|
* reintroduces the retired name to the user.
|
|
14
14
|
*/
|
|
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\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 is already authenticated against one Superblocks Server \u2014 there is no setup, login, or auth-status call to make first. Call the tool that does the job and read its error if something is genuinely wrong; there is no tool that reports credentials or environments.\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. 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. 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.";
|
|
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
16
|
/**
|
|
17
17
|
* The MCP server behind one stdio session.
|
|
18
18
|
*
|
|
19
|
-
* Tools run as the
|
|
20
|
-
* token to expire independently of the process.
|
|
19
|
+
* Tools run as the authenticated Superblocks user.
|
|
21
20
|
*/
|
|
22
21
|
export declare function createMcpServer(deps: AppDeps, probeEditorDocument?: EditorDocumentProbe): McpServer;
|