@superblocksteam/gateway 2.0.161-next.0 → 2.0.162-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 +135 -39
- package/dist/capabilities/lifecycle.d.ts +46 -29
- package/dist/capabilities/lifecycle.js +1731 -843
- package/dist/capabilities/lifecycle.js.map +1 -1
- package/dist/capabilities/query-integration.d.ts +14 -0
- package/dist/capabilities/query-integration.js +172 -0
- package/dist/capabilities/query-integration.js.map +1 -0
- package/dist/capabilities/source-files-archive.d.ts +11 -0
- package/dist/capabilities/source-files-archive.js +54 -0
- package/dist/capabilities/source-files-archive.js.map +1 -0
- package/dist/capabilities/types.d.ts +197 -119
- package/dist/capabilities/types.js +45 -6
- package/dist/capabilities/types.js.map +1 -1
- package/dist/capture/browser-contract.d.ts +15 -5
- package/dist/capture/browser-contract.js +13 -3
- package/dist/capture/browser-contract.js.map +1 -1
- package/dist/capture/browser-instructions.d.ts +3 -2
- package/dist/capture/browser-instructions.js +3 -2
- package/dist/capture/browser-instructions.js.map +1 -1
- package/dist/capture/mode.d.ts +8 -1
- package/dist/capture/mode.js +22 -2
- package/dist/capture/mode.js.map +1 -1
- package/dist/config.d.ts +22 -23
- package/dist/config.js +13 -12
- package/dist/config.js.map +1 -1
- package/dist/deps.d.ts +7 -7
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/integrations/read-only-postgres-query.d.ts +2 -0
- package/dist/integrations/read-only-postgres-query.js +164 -0
- package/dist/integrations/read-only-postgres-query.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/playwright/ensure-chromium.d.ts +5 -7
- package/dist/playwright/ensure-chromium.js +13 -13
- package/dist/playwright/ensure-chromium.js.map +1 -1
- package/dist/preview/capture-screenshot.d.ts +30 -4
- package/dist/preview/capture-screenshot.js +67 -17
- package/dist/preview/capture-screenshot.js.map +1 -1
- package/dist/preview/viewer-url.js +3 -1
- package/dist/preview/viewer-url.js.map +1 -1
- package/dist/process/fault-barrier.js +1 -1
- package/dist/process/fault-barrier.js.map +1 -1
- package/dist/sabs/agent-facing-text.d.ts +2 -0
- package/dist/sabs/agent-facing-text.js +56 -2
- package/dist/sabs/agent-facing-text.js.map +1 -1
- package/dist/sabs/app-state.d.ts +126 -0
- package/dist/sabs/app-state.js +332 -0
- package/dist/sabs/app-state.js.map +1 -0
- package/dist/sabs/awaited-decision.d.ts +49 -0
- package/dist/sabs/awaited-decision.js +129 -0
- package/dist/sabs/awaited-decision.js.map +1 -0
- package/dist/sabs/editor-client-methods.d.ts +23 -5
- package/dist/sabs/editor-client-methods.js +45 -4
- package/dist/sabs/editor-client-methods.js.map +1 -1
- package/dist/sabs/editor-socket.d.ts +85 -0
- package/dist/sabs/editor-socket.js +67 -0
- package/dist/sabs/editor-socket.js.map +1 -0
- package/dist/sabs/session-peer.d.ts +119 -82
- package/dist/sabs/session-peer.js +10 -1
- package/dist/sabs/session-peer.js.map +1 -1
- package/dist/sabs/streamed-reply.d.ts +45 -0
- package/dist/sabs/streamed-reply.js +125 -0
- package/dist/sabs/streamed-reply.js.map +1 -0
- package/dist/sabs/turn-collector.d.ts +50 -35
- package/dist/sabs/turn-collector.js +110 -176
- package/dist/sabs/turn-collector.js.map +1 -1
- package/dist/sabs/websocket-session-peer.d.ts +104 -69
- package/dist/sabs/websocket-session-peer.js +1329 -475
- package/dist/sabs/websocket-session-peer.js.map +1 -1
- package/dist/server/client.d.ts +41 -9
- package/dist/server/client.js +126 -21
- package/dist/server/client.js.map +1 -1
- package/dist/start.d.ts +1 -1
- package/dist/start.js +30 -8
- package/dist/start.js.map +1 -1
- package/dist/stores/memory.d.ts +46 -0
- package/dist/stores/memory.js +163 -0
- package/dist/stores/memory.js.map +1 -0
- package/dist/stores/types.d.ts +92 -0
- package/dist/stores/types.js +11 -0
- package/dist/stores/types.js.map +1 -0
- package/dist/telemetry/mcp-client.d.ts +6 -1
- package/dist/telemetry/mcp-client.js +100 -4
- package/dist/telemetry/mcp-client.js.map +1 -1
- package/dist/telemetry/metrics.d.ts +12 -3
- package/dist/telemetry/metrics.js +60 -14
- package/dist/telemetry/metrics.js.map +1 -1
- package/dist/telemetry/runtime.js +4 -6
- package/dist/telemetry/runtime.js.map +1 -1
- package/dist/transports/mcp/admin-tools.d.ts +8 -0
- package/dist/transports/mcp/admin-tools.js +115 -4
- package/dist/transports/mcp/admin-tools.js.map +1 -1
- package/dist/transports/mcp/app-status-html.d.ts +4 -8
- package/dist/transports/mcp/app-status-html.js +336 -128
- package/dist/transports/mcp/app-status-html.js.map +1 -1
- package/dist/transports/mcp/client-presentation.d.ts +16 -0
- package/dist/transports/mcp/client-presentation.js +13 -0
- package/dist/transports/mcp/client-presentation.js.map +1 -0
- package/dist/transports/mcp/cowork-editor-url.d.ts +6 -0
- package/dist/transports/mcp/cowork-editor-url.js +10 -0
- package/dist/transports/mcp/cowork-editor-url.js.map +1 -0
- package/dist/transports/mcp/decision-card-html.d.ts +26 -0
- package/dist/transports/mcp/decision-card-html.js +876 -0
- package/dist/transports/mcp/decision-card-html.js.map +1 -0
- package/dist/transports/mcp/decision-elicitation.d.ts +42 -0
- package/dist/transports/mcp/decision-elicitation.js +59 -0
- package/dist/transports/mcp/decision-elicitation.js.map +1 -1
- package/dist/transports/mcp/editor-document-probe.d.ts +4 -0
- package/dist/transports/mcp/editor-document-probe.js +35 -0
- package/dist/transports/mcp/editor-document-probe.js.map +1 -0
- package/dist/transports/mcp/editor-integration-setup-url.d.ts +14 -0
- package/dist/transports/mcp/editor-integration-setup-url.js +29 -0
- package/dist/transports/mcp/editor-integration-setup-url.js.map +1 -0
- package/dist/transports/mcp/format-tool-content.d.ts +13 -18
- package/dist/transports/mcp/format-tool-content.js +172 -13
- package/dist/transports/mcp/format-tool-content.js.map +1 -1
- package/dist/transports/mcp/instructions/index.d.ts +23 -0
- package/dist/transports/mcp/instructions/index.js +81 -0
- package/dist/transports/mcp/instructions/index.js.map +1 -0
- package/dist/transports/mcp/instructions/result.d.ts +18 -0
- package/dist/transports/mcp/instructions/result.js +58 -0
- package/dist/transports/mcp/instructions/result.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/ask-user.d.ts +2 -0
- package/dist/transports/mcp/instructions/tools/ask-user.js +20 -0
- package/dist/transports/mcp/instructions/tools/ask-user.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/build-app.d.ts +4 -0
- package/dist/transports/mcp/instructions/tools/build-app.js +54 -0
- package/dist/transports/mcp/instructions/tools/build-app.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/check-app-progress.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/check-app-progress.js +79 -0
- package/dist/transports/mcp/instructions/tools/check-app-progress.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/check-publish-progress.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/check-publish-progress.js +23 -0
- package/dist/transports/mcp/instructions/tools/check-publish-progress.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/copy.d.ts +18 -0
- package/dist/transports/mcp/instructions/tools/copy.js +49 -0
- package/dist/transports/mcp/instructions/tools/copy.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/create-integration.d.ts +4 -0
- package/dist/transports/mcp/instructions/tools/create-integration.js +41 -0
- package/dist/transports/mcp/instructions/tools/create-integration.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/edit-app.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/edit-app.js +18 -0
- package/dist/transports/mcp/instructions/tools/edit-app.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/get-app.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/get-app.js +49 -0
- package/dist/transports/mcp/instructions/tools/get-app.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/get-integration-metadata.d.ts +2 -0
- package/dist/transports/mcp/instructions/tools/get-integration-metadata.js +13 -0
- package/dist/transports/mcp/instructions/tools/get-integration-metadata.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/index.d.ts +7 -0
- package/dist/transports/mcp/instructions/tools/index.js +31 -0
- package/dist/transports/mcp/instructions/tools/index.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/publish-app.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/publish-app.js +23 -0
- package/dist/transports/mcp/instructions/tools/publish-app.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/start-app.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/start-app.js +22 -0
- package/dist/transports/mcp/instructions/tools/start-app.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/upload-artifact.d.ts +2 -0
- package/dist/transports/mcp/instructions/tools/upload-artifact.js +13 -0
- package/dist/transports/mcp/instructions/tools/upload-artifact.js.map +1 -0
- package/dist/transports/mcp/mcp-app-brand-css.d.ts +1 -0
- package/dist/transports/mcp/mcp-app-brand-css.js +180 -0
- package/dist/transports/mcp/mcp-app-brand-css.js.map +1 -0
- package/dist/transports/mcp/mount.d.ts +14 -1
- package/dist/transports/mcp/mount.js +729 -172
- package/dist/transports/mcp/mount.js.map +1 -1
- package/dist/transports/mcp/native-browser-presence.d.ts +45 -0
- package/dist/transports/mcp/native-browser-presence.js +158 -0
- package/dist/transports/mcp/native-browser-presence.js.map +1 -0
- package/dist/transports/mcp/plan-approval.d.ts +44 -0
- package/dist/transports/mcp/plan-approval.js +179 -0
- package/dist/transports/mcp/plan-approval.js.map +1 -0
- package/dist/transports/mcp/session-directory.d.ts +7 -0
- package/dist/transports/mcp/session-directory.js +18 -0
- package/dist/transports/mcp/session-directory.js.map +1 -0
- package/dist/transports/mcp/tool-names.d.ts +2 -0
- package/dist/transports/mcp/tool-names.js +2 -0
- package/dist/transports/mcp/tool-names.js.map +1 -0
- package/package.json +16 -7
- package/skills/superblocks-build/SKILL.md +59 -0
- package/skills/superblocks-import/SKILL.md +125 -0
- package/dist/capabilities/import-prompt.d.ts +0 -11
- package/dist/capabilities/import-prompt.js +0 -96
- package/dist/capabilities/import-prompt.js.map +0 -1
- package/dist/capabilities/persisted-progress.d.ts +0 -46
- package/dist/capabilities/persisted-progress.js +0 -246
- package/dist/capabilities/persisted-progress.js.map +0 -1
- package/dist/events/cursor.d.ts +0 -43
- package/dist/events/cursor.js +0 -78
- package/dist/events/cursor.js.map +0 -1
- package/dist/events/memory-event-store.d.ts +0 -34
- package/dist/events/memory-event-store.js +0 -110
- package/dist/events/memory-event-store.js.map +0 -1
- package/dist/events/merge.d.ts +0 -23
- package/dist/events/merge.js +0 -97
- package/dist/events/merge.js.map +0 -1
- package/dist/events/normalized-collector.d.ts +0 -62
- package/dist/events/normalized-collector.js +0 -156
- package/dist/events/normalized-collector.js.map +0 -1
- package/dist/events/schema.d.ts +0 -9
- package/dist/events/schema.js +0 -93
- package/dist/events/schema.js.map +0 -1
- package/dist/events/snapshot.d.ts +0 -32
- package/dist/events/snapshot.js +0 -57
- package/dist/events/snapshot.js.map +0 -1
- package/dist/events/stream-key.d.ts +0 -2
- package/dist/events/stream-key.js +0 -31
- package/dist/events/stream-key.js.map +0 -1
- package/dist/events/types.d.ts +0 -179
- package/dist/events/types.js +0 -66
- package/dist/events/types.js.map +0 -1
- package/dist/resume/memory-progress-store.d.ts +0 -39
- package/dist/resume/memory-progress-store.js +0 -82
- package/dist/resume/memory-progress-store.js.map +0 -1
- package/dist/resume/memory-recent-app-store.d.ts +0 -14
- package/dist/resume/memory-recent-app-store.js +0 -27
- package/dist/resume/memory-recent-app-store.js.map +0 -1
- package/dist/resume/memory-turn-store.d.ts +0 -18
- package/dist/resume/memory-turn-store.js +0 -73
- package/dist/resume/memory-turn-store.js.map +0 -1
- package/dist/resume/progress-key.d.ts +0 -21
- package/dist/resume/progress-key.js +0 -58
- package/dist/resume/progress-key.js.map +0 -1
- package/dist/resume/stores.d.ts +0 -14
- package/dist/resume/stores.js +0 -18
- package/dist/resume/stores.js.map +0 -1
- package/dist/resume/types.d.ts +0 -124
- package/dist/resume/types.js +0 -13
- package/dist/resume/types.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function instructGetIntegrationMetadata(result) {
|
|
2
|
+
if (result.code === "integration_not_supported") {
|
|
3
|
+
return "This integration's plugin type can't be introspected by this tool. Ask the user directly what data it exposes, or proceed without inspecting schema.";
|
|
4
|
+
}
|
|
5
|
+
const entries = result.value.entries;
|
|
6
|
+
if (result.value.totalCount === 0 &&
|
|
7
|
+
Array.isArray(entries) &&
|
|
8
|
+
entries.length === 0) {
|
|
9
|
+
return "No columns/tables matched that search term. Retry with a narrower or different `search`, or omit it to see everything, before concluding the integration has no usable data.";
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=get-integration-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-integration-metadata.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/get-integration-metadata.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,8BAA8B,CAC5C,MAAkB;IAElB,IAAI,MAAM,CAAC,IAAI,KAAK,2BAA2B,EAAE,CAAC;QAChD,OAAO,sJAAsJ,CAAC;IAChK,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;IACrC,IACE,MAAM,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC;QAC7B,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACtB,OAAO,CAAC,MAAM,KAAK,CAAC,EACpB,CAAC;QACD,OAAO,8KAA8K,CAAC;IACxL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ClientProfile } from "../../client-presentation.js";
|
|
2
|
+
import type { ToolName } from "../../tool-names.js";
|
|
3
|
+
import type { ToolResult } from "../result.js";
|
|
4
|
+
/** One tool's whole rule set: its result in, the agent's next step out. */
|
|
5
|
+
export type Instruct = (result: ToolResult, profile: ClientProfile) => string | undefined;
|
|
6
|
+
/** Tools absent from this table send no instructions. */
|
|
7
|
+
export declare const INSTRUCTIONS: Partial<Record<ToolName, Instruct>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { instructAskUser } from "./ask-user.js";
|
|
2
|
+
import { instructBuildApp, instructGetPreviewStatus } from "./build-app.js";
|
|
3
|
+
import { instructCheckAppProgress } from "./check-app-progress.js";
|
|
4
|
+
import { instructCheckPublishProgress } from "./check-publish-progress.js";
|
|
5
|
+
import { APP_SHARING_CHOICE } from "./copy.js";
|
|
6
|
+
import { instructCreateIntegration } from "./create-integration.js";
|
|
7
|
+
import { instructEditApp } from "./edit-app.js";
|
|
8
|
+
import { instructGetApp } from "./get-app.js";
|
|
9
|
+
import { instructGetIntegrationMetadata } from "./get-integration-metadata.js";
|
|
10
|
+
import { instructPublishApp } from "./publish-app.js";
|
|
11
|
+
import { instructStartApp } from "./start-app.js";
|
|
12
|
+
import { instructUploadArtifact } from "./upload-artifact.js";
|
|
13
|
+
/** Tools absent from this table send no instructions. */
|
|
14
|
+
export const INSTRUCTIONS = {
|
|
15
|
+
ask_user: instructAskUser,
|
|
16
|
+
build_app: instructBuildApp,
|
|
17
|
+
check_app_progress: instructCheckAppProgress,
|
|
18
|
+
check_publish_progress: instructCheckPublishProgress,
|
|
19
|
+
create_integration: instructCreateIntegration,
|
|
20
|
+
edit_app: instructEditApp,
|
|
21
|
+
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
|
+
get_integration_metadata: instructGetIntegrationMetadata,
|
|
26
|
+
get_preview_status: instructGetPreviewStatus,
|
|
27
|
+
publish_app: instructPublishApp,
|
|
28
|
+
start_app: instructStartApp,
|
|
29
|
+
upload_artifact: instructUploadArtifact,
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,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,sBAAsB,EAAE,GAAG,EAAE,CAAC,kBAAkB;IAChD,kCAAkC,EAAE,GAAG,EAAE,CAAC,kBAAkB;IAC5D,uBAAuB,EAAE,GAAG,EAAE,CAAC,kBAAkB;IACjD,wBAAwB,EAAE,8BAA8B;IACxD,kBAAkB,EAAE,wBAAwB;IAC5C,WAAW,EAAE,kBAAkB;IAC/B,SAAS,EAAE,gBAAgB;IAC3B,eAAe,EAAE,sBAAsB;CACxC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { instructPublishDetails } from "./copy.js";
|
|
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) {
|
|
11
|
+
if (result.status === "publishing") {
|
|
12
|
+
const url = result.value.publishDetailsUrl;
|
|
13
|
+
const link = typeof url === "string" && url
|
|
14
|
+
? ` and include ${url} in that message`
|
|
15
|
+
: "";
|
|
16
|
+
return `Superblocks has started the publish. Tell the user the publish is rolling out${link}, then call \`check_publish_progress\` until status is \`deployed\`. Do not call \`publish_app\` again.`;
|
|
17
|
+
}
|
|
18
|
+
if (result.code === "publish_needs_acknowledgement") {
|
|
19
|
+
return "A policy gate requires explicit acknowledgement before this can roll out. Tell the user what the gate flagged and ask whether to proceed, rather than retrying automatically.";
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=publish-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/publish-app.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,UAAU,kBAAkB,CAChC,MAAkB,EAClB,OAAsB;IAEtB,MAAM,YAAY,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,UAAU,OAAO,YAAY,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AACxE,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAkB;IAC5C,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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { REPLACE_WEDGED_APP, RETRY_UNAVAILABLE_LIVE_EDIT, buildingFollowUp, } from "./copy.js";
|
|
2
|
+
export function instructStartApp(result, profile) {
|
|
3
|
+
if (result.pendingAction === "start_new_app") {
|
|
4
|
+
return REPLACE_WEDGED_APP;
|
|
5
|
+
}
|
|
6
|
+
if (result.code === "replacement_not_allowed") {
|
|
7
|
+
return "`replacesApplicationId` can only be used once, immediately after a `start_new_app` pendingAction. Call `check_app_progress` on the original application instead of retrying start_app.";
|
|
8
|
+
}
|
|
9
|
+
if (result.code === "live_edit_unavailable" &&
|
|
10
|
+
result.pendingAction === "retry_build") {
|
|
11
|
+
return RETRY_UNAVAILABLE_LIVE_EDIT;
|
|
12
|
+
}
|
|
13
|
+
// No `start_new_app` to recover with: this call was already the replacement.
|
|
14
|
+
if (result.code === "live_edit_unavailable") {
|
|
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
|
+
}
|
|
17
|
+
if (result.status === "building") {
|
|
18
|
+
return buildingFollowUp(profile);
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=start-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-app.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/start-app.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,gBAAgB,CAC9B,MAAkB,EAClB,OAAsB;IAEtB,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,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function instructUploadArtifact(result) {
|
|
2
|
+
if (result.code === "import_zip_too_large") {
|
|
3
|
+
return "This file is over the 50 MB cap. Ask the user for a smaller file or, for imports, a smaller source export without dependencies, build output, secrets, or production data. Do not replace the source artifact with prose or silently omit source files and assets.";
|
|
4
|
+
}
|
|
5
|
+
if (result.code === "import_file_unsupported") {
|
|
6
|
+
return "Binary content was sent through `files`, which only accepts text. Re-send this file via `filePath` instead - the gateway reads the bytes itself.";
|
|
7
|
+
}
|
|
8
|
+
if (result.ok) {
|
|
9
|
+
return "Show the completed upload summary to the user before calling another tool. Pass this result's `artifact` unchanged into `start_app` or `edit_app`'s `artifacts` field. Do not re-upload on a retry - reuse this same artifact.";
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=upload-artifact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-artifact.js","sourceRoot":"","sources":["../../../../../src/transports/mcp/instructions/tools/upload-artifact.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,sBAAsB,CAAC,MAAkB;IACvD,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAsB,EAAE,CAAC;QAC3C,OAAO,oQAAoQ,CAAC;IAC9Q,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,yBAAyB,EAAE,CAAC;QAC9C,OAAO,kJAAkJ,CAAC;IAC5J,CAAC;IACD,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,gOAAgO,CAAC;IAC1O,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MCP_APP_BRAND_CSS = "\n :root {\n color-scheme: light dark;\n --sb-app-background: var(\n --color-background-primary,\n light-dark(#ffffff, #1b1c1f)\n );\n --sb-app-background-subtle: var(\n --color-background-secondary,\n light-dark(#f9fafb, #24272b)\n );\n --sb-app-background-hover: var(\n --color-background-tertiary,\n light-dark(#f3f4f6, #2f3437)\n );\n --sb-app-background-inverse: var(\n --color-background-inverse,\n light-dark(#121517, #f9fafb)\n );\n --sb-app-text: var(\n --color-text-primary,\n light-dark(#121517, #f9fafb)\n );\n --sb-app-text-secondary: var(\n --color-text-secondary,\n light-dark(#5a6272, #c6cad2)\n );\n --sb-app-text-tertiary: var(\n --color-text-tertiary,\n light-dark(#6b7280, #a4aab7)\n );\n --sb-app-text-inverse: var(\n --color-text-inverse,\n light-dark(#ffffff, #121517)\n );\n --sb-app-border: var(\n --color-border-primary,\n light-dark(#e8eaed, #454d5f)\n );\n --sb-app-ring: var(\n --color-ring-primary,\n light-dark(#0077b6, #27bbff)\n );\n --sb-app-info-background: var(\n --color-background-info,\n light-dark(#e6f5ff, #083a50)\n );\n --sb-app-info-text: var(\n --color-text-info,\n light-dark(#00679e, #7dd3fc)\n );\n --sb-app-info-border: var(\n --color-border-info,\n light-dark(#c2e7ff, #075985)\n );\n --sb-app-success-background: var(\n --color-background-success,\n light-dark(#e8f8ef, #0a3926)\n );\n --sb-app-success-text: var(\n --color-text-success,\n light-dark(#087a43, #6ee7b7)\n );\n --sb-app-success-border: var(\n --color-border-success,\n light-dark(#b8e8cf, #087a43)\n );\n --sb-app-warning-background: var(\n --color-background-warning,\n light-dark(#fff7e6, #49350a)\n );\n --sb-app-warning-text: var(\n --color-text-warning,\n light-dark(#946200, #fcd34d)\n );\n --sb-app-warning-border: var(\n --color-border-warning,\n light-dark(#f5d996, #946200)\n );\n --sb-app-danger-background: var(\n --color-background-danger,\n light-dark(#fff1f1, #4a1d1d)\n );\n --sb-app-danger-text: var(\n --color-text-danger,\n light-dark(#c54141, #fca5a5)\n );\n --sb-app-danger-border: var(\n --color-border-danger,\n light-dark(#ffcaca, #c54141)\n );\n }\n * {\n box-sizing: border-box;\n }\n body {\n min-width: 0;\n margin: 0;\n overflow-x: hidden;\n background: transparent;\n color: var(--sb-app-text);\n font-family: var(--font-sans, system-ui, -apple-system, sans-serif);\n font-size: var(--font-text-sm-size, 13px);\n line-height: var(--font-text-sm-line-height, 1.45);\n }\n .card {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: var(--border-width-regular, 1px) solid var(--sb-app-border);\n border-radius: var(--border-radius-lg, 12px);\n background: var(--sb-app-background);\n box-shadow: var(--shadow-sm, 0 1px 2px rgba(18, 21, 23, 0.08));\n }\n h1,\n .meta,\n .note {\n min-width: 0;\n overflow-wrap: anywhere;\n }\n .note:empty {\n position: absolute;\n }\n button,\n textarea {\n font: inherit;\n }\n button {\n appearance: none;\n min-width: 0;\n padding: 8px 12px;\n border: var(--border-width-regular, 1px) solid var(--sb-app-border);\n border-radius: var(--border-radius-md, 8px);\n background: var(--sb-app-background-subtle);\n color: var(--sb-app-text);\n font-weight: var(--font-weight-medium, 500);\n line-height: var(--font-text-sm-line-height, 1.45);\n cursor: pointer;\n }\n button:hover:not(:disabled) {\n background: var(--sb-app-background-hover);\n }\n .button-primary {\n border-color: var(--sb-app-background-inverse);\n background: var(--sb-app-background-inverse);\n color: var(--sb-app-text-inverse);\n }\n .button-primary:hover:not(:disabled) {\n border-color: var(--sb-app-background-inverse);\n background: var(--sb-app-background-inverse);\n }\n button:focus-visible,\n textarea:focus-visible,\n a:focus-visible {\n outline: 2px solid var(--sb-app-ring);\n outline-offset: 2px;\n }\n button:disabled {\n opacity: 0.48;\n cursor: not-allowed;\n }\n .actions {\n min-width: 0;\n }\n .actions > button {\n overflow-wrap: anywhere;\n }\n @media (max-width: 360px) {\n .actions {\n flex-direction: column;\n flex-wrap: nowrap;\n }\n .actions > button {\n width: 100%;\n }\n }\n";
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export const MCP_APP_BRAND_CSS = `
|
|
2
|
+
:root {
|
|
3
|
+
color-scheme: light dark;
|
|
4
|
+
--sb-app-background: var(
|
|
5
|
+
--color-background-primary,
|
|
6
|
+
light-dark(#ffffff, #1b1c1f)
|
|
7
|
+
);
|
|
8
|
+
--sb-app-background-subtle: var(
|
|
9
|
+
--color-background-secondary,
|
|
10
|
+
light-dark(#f9fafb, #24272b)
|
|
11
|
+
);
|
|
12
|
+
--sb-app-background-hover: var(
|
|
13
|
+
--color-background-tertiary,
|
|
14
|
+
light-dark(#f3f4f6, #2f3437)
|
|
15
|
+
);
|
|
16
|
+
--sb-app-background-inverse: var(
|
|
17
|
+
--color-background-inverse,
|
|
18
|
+
light-dark(#121517, #f9fafb)
|
|
19
|
+
);
|
|
20
|
+
--sb-app-text: var(
|
|
21
|
+
--color-text-primary,
|
|
22
|
+
light-dark(#121517, #f9fafb)
|
|
23
|
+
);
|
|
24
|
+
--sb-app-text-secondary: var(
|
|
25
|
+
--color-text-secondary,
|
|
26
|
+
light-dark(#5a6272, #c6cad2)
|
|
27
|
+
);
|
|
28
|
+
--sb-app-text-tertiary: var(
|
|
29
|
+
--color-text-tertiary,
|
|
30
|
+
light-dark(#6b7280, #a4aab7)
|
|
31
|
+
);
|
|
32
|
+
--sb-app-text-inverse: var(
|
|
33
|
+
--color-text-inverse,
|
|
34
|
+
light-dark(#ffffff, #121517)
|
|
35
|
+
);
|
|
36
|
+
--sb-app-border: var(
|
|
37
|
+
--color-border-primary,
|
|
38
|
+
light-dark(#e8eaed, #454d5f)
|
|
39
|
+
);
|
|
40
|
+
--sb-app-ring: var(
|
|
41
|
+
--color-ring-primary,
|
|
42
|
+
light-dark(#0077b6, #27bbff)
|
|
43
|
+
);
|
|
44
|
+
--sb-app-info-background: var(
|
|
45
|
+
--color-background-info,
|
|
46
|
+
light-dark(#e6f5ff, #083a50)
|
|
47
|
+
);
|
|
48
|
+
--sb-app-info-text: var(
|
|
49
|
+
--color-text-info,
|
|
50
|
+
light-dark(#00679e, #7dd3fc)
|
|
51
|
+
);
|
|
52
|
+
--sb-app-info-border: var(
|
|
53
|
+
--color-border-info,
|
|
54
|
+
light-dark(#c2e7ff, #075985)
|
|
55
|
+
);
|
|
56
|
+
--sb-app-success-background: var(
|
|
57
|
+
--color-background-success,
|
|
58
|
+
light-dark(#e8f8ef, #0a3926)
|
|
59
|
+
);
|
|
60
|
+
--sb-app-success-text: var(
|
|
61
|
+
--color-text-success,
|
|
62
|
+
light-dark(#087a43, #6ee7b7)
|
|
63
|
+
);
|
|
64
|
+
--sb-app-success-border: var(
|
|
65
|
+
--color-border-success,
|
|
66
|
+
light-dark(#b8e8cf, #087a43)
|
|
67
|
+
);
|
|
68
|
+
--sb-app-warning-background: var(
|
|
69
|
+
--color-background-warning,
|
|
70
|
+
light-dark(#fff7e6, #49350a)
|
|
71
|
+
);
|
|
72
|
+
--sb-app-warning-text: var(
|
|
73
|
+
--color-text-warning,
|
|
74
|
+
light-dark(#946200, #fcd34d)
|
|
75
|
+
);
|
|
76
|
+
--sb-app-warning-border: var(
|
|
77
|
+
--color-border-warning,
|
|
78
|
+
light-dark(#f5d996, #946200)
|
|
79
|
+
);
|
|
80
|
+
--sb-app-danger-background: var(
|
|
81
|
+
--color-background-danger,
|
|
82
|
+
light-dark(#fff1f1, #4a1d1d)
|
|
83
|
+
);
|
|
84
|
+
--sb-app-danger-text: var(
|
|
85
|
+
--color-text-danger,
|
|
86
|
+
light-dark(#c54141, #fca5a5)
|
|
87
|
+
);
|
|
88
|
+
--sb-app-danger-border: var(
|
|
89
|
+
--color-border-danger,
|
|
90
|
+
light-dark(#ffcaca, #c54141)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
* {
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
}
|
|
96
|
+
body {
|
|
97
|
+
min-width: 0;
|
|
98
|
+
margin: 0;
|
|
99
|
+
overflow-x: hidden;
|
|
100
|
+
background: transparent;
|
|
101
|
+
color: var(--sb-app-text);
|
|
102
|
+
font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
|
|
103
|
+
font-size: var(--font-text-sm-size, 13px);
|
|
104
|
+
line-height: var(--font-text-sm-line-height, 1.45);
|
|
105
|
+
}
|
|
106
|
+
.card {
|
|
107
|
+
display: flex;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
gap: 12px;
|
|
111
|
+
padding: 16px;
|
|
112
|
+
border: var(--border-width-regular, 1px) solid var(--sb-app-border);
|
|
113
|
+
border-radius: var(--border-radius-lg, 12px);
|
|
114
|
+
background: var(--sb-app-background);
|
|
115
|
+
box-shadow: var(--shadow-sm, 0 1px 2px rgba(18, 21, 23, 0.08));
|
|
116
|
+
}
|
|
117
|
+
h1,
|
|
118
|
+
.meta,
|
|
119
|
+
.note {
|
|
120
|
+
min-width: 0;
|
|
121
|
+
overflow-wrap: anywhere;
|
|
122
|
+
}
|
|
123
|
+
.note:empty {
|
|
124
|
+
position: absolute;
|
|
125
|
+
}
|
|
126
|
+
button,
|
|
127
|
+
textarea {
|
|
128
|
+
font: inherit;
|
|
129
|
+
}
|
|
130
|
+
button {
|
|
131
|
+
appearance: none;
|
|
132
|
+
min-width: 0;
|
|
133
|
+
padding: 8px 12px;
|
|
134
|
+
border: var(--border-width-regular, 1px) solid var(--sb-app-border);
|
|
135
|
+
border-radius: var(--border-radius-md, 8px);
|
|
136
|
+
background: var(--sb-app-background-subtle);
|
|
137
|
+
color: var(--sb-app-text);
|
|
138
|
+
font-weight: var(--font-weight-medium, 500);
|
|
139
|
+
line-height: var(--font-text-sm-line-height, 1.45);
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
button:hover:not(:disabled) {
|
|
143
|
+
background: var(--sb-app-background-hover);
|
|
144
|
+
}
|
|
145
|
+
.button-primary {
|
|
146
|
+
border-color: var(--sb-app-background-inverse);
|
|
147
|
+
background: var(--sb-app-background-inverse);
|
|
148
|
+
color: var(--sb-app-text-inverse);
|
|
149
|
+
}
|
|
150
|
+
.button-primary:hover:not(:disabled) {
|
|
151
|
+
border-color: var(--sb-app-background-inverse);
|
|
152
|
+
background: var(--sb-app-background-inverse);
|
|
153
|
+
}
|
|
154
|
+
button:focus-visible,
|
|
155
|
+
textarea:focus-visible,
|
|
156
|
+
a:focus-visible {
|
|
157
|
+
outline: 2px solid var(--sb-app-ring);
|
|
158
|
+
outline-offset: 2px;
|
|
159
|
+
}
|
|
160
|
+
button:disabled {
|
|
161
|
+
opacity: 0.48;
|
|
162
|
+
cursor: not-allowed;
|
|
163
|
+
}
|
|
164
|
+
.actions {
|
|
165
|
+
min-width: 0;
|
|
166
|
+
}
|
|
167
|
+
.actions > button {
|
|
168
|
+
overflow-wrap: anywhere;
|
|
169
|
+
}
|
|
170
|
+
@media (max-width: 360px) {
|
|
171
|
+
.actions {
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
flex-wrap: nowrap;
|
|
174
|
+
}
|
|
175
|
+
.actions > button {
|
|
176
|
+
width: 100%;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
180
|
+
//# sourceMappingURL=mcp-app-brand-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-app-brand-css.js","sourceRoot":"","sources":["../../../src/transports/mcp/mcp-app-brand-css.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkLhC,CAAC"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import type { AppDeps } from "../../deps.js";
|
|
3
|
+
import { type EditorDocumentProbe } from "./editor-document-probe.js";
|
|
4
|
+
/**
|
|
5
|
+
* Told to the model on connect, so it can match what a user actually says
|
|
6
|
+
* against these tools.
|
|
7
|
+
*
|
|
8
|
+
* People refer to this one system as the product and builder ("Superblocks")
|
|
9
|
+
* or by an older name for that same builder ("Clark"). Listing that accepted
|
|
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.
|
|
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, relaying what Superblocks says 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 \u2014 prefer create_integration / update_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.";
|
|
3
16
|
/**
|
|
4
17
|
* The MCP server behind one stdio session.
|
|
5
18
|
*
|
|
6
19
|
* Tools run as the already-logged-in CLI user. There is no per-request OAuth
|
|
7
20
|
* token to expire independently of the process.
|
|
8
21
|
*/
|
|
9
|
-
export declare function createMcpServer(deps: AppDeps): McpServer;
|
|
22
|
+
export declare function createMcpServer(deps: AppDeps, probeEditorDocument?: EditorDocumentProbe): McpServer;
|