@superblocksteam/gateway 2.0.0-SNAPSHOT.1d4c72c0ab174c21
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/LICENSE.txt +87 -0
- package/README.md +291 -0
- package/dist/agents/resolve-orchestrator-url.d.ts +22 -0
- package/dist/agents/resolve-orchestrator-url.js +38 -0
- package/dist/agents/resolve-orchestrator-url.js.map +1 -0
- package/dist/capabilities/integration-metadata.d.ts +28 -0
- package/dist/capabilities/integration-metadata.js +174 -0
- package/dist/capabilities/integration-metadata.js.map +1 -0
- package/dist/capabilities/lifecycle.d.ts +93 -0
- package/dist/capabilities/lifecycle.js +3450 -0
- package/dist/capabilities/lifecycle.js.map +1 -0
- 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 +542 -0
- package/dist/capabilities/types.js +86 -0
- package/dist/capabilities/types.js.map +1 -0
- package/dist/capture/browser-contract.d.ts +46 -0
- package/dist/capture/browser-contract.js +34 -0
- package/dist/capture/browser-contract.js.map +1 -0
- package/dist/capture/browser-instructions.d.ts +10 -0
- package/dist/capture/browser-instructions.js +18 -0
- package/dist/capture/browser-instructions.js.map +1 -0
- package/dist/capture/capture-library-probe.d.ts +55 -0
- package/dist/capture/capture-library-probe.js +177 -0
- package/dist/capture/capture-library-probe.js.map +1 -0
- package/dist/capture/capture-library.d.ts +52 -0
- package/dist/capture/capture-library.js +249 -0
- package/dist/capture/capture-library.js.map +1 -0
- package/dist/capture/classify-library-paint.d.ts +21 -0
- package/dist/capture/classify-library-paint.js +13 -0
- package/dist/capture/classify-library-paint.js.map +1 -0
- package/dist/capture/host-mcp-scan.d.ts +16 -0
- package/dist/capture/host-mcp-scan.js +64 -0
- package/dist/capture/host-mcp-scan.js.map +1 -0
- package/dist/capture/library-parent-script.d.ts +35 -0
- package/dist/capture/library-parent-script.js +82 -0
- package/dist/capture/library-parent-script.js.map +1 -0
- package/dist/capture/mode.d.ts +29 -0
- package/dist/capture/mode.js +65 -0
- package/dist/capture/mode.js.map +1 -0
- package/dist/config.d.ts +148 -0
- package/dist/config.js +111 -0
- package/dist/config.js.map +1 -0
- package/dist/debug.d.ts +2 -0
- package/dist/debug.js +9 -0
- package/dist/debug.js.map +1 -0
- package/dist/deps.d.ts +38 -0
- package/dist/deps.js +2 -0
- package/dist/deps.js.map +1 -0
- package/dist/health/readiness.d.ts +99 -0
- package/dist/health/readiness.js +202 -0
- package/dist/health/readiness.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/filters.d.ts +8 -0
- package/dist/integrations/filters.js +40 -0
- package/dist/integrations/filters.js.map +1 -0
- package/dist/integrations/map.d.ts +27 -0
- package/dist/integrations/map.js +43 -0
- package/dist/integrations/map.js.map +1 -0
- package/dist/integrations/profile-key.d.ts +19 -0
- package/dist/integrations/profile-key.js +35 -0
- package/dist/integrations/profile-key.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/main.js +5 -0
- package/dist/main.js.map +1 -0
- package/dist/orchestrator/client.d.ts +62 -0
- package/dist/orchestrator/client.js +160 -0
- package/dist/orchestrator/client.js.map +1 -0
- package/dist/playwright/ensure-chromium.d.ts +24 -0
- package/dist/playwright/ensure-chromium.js +60 -0
- package/dist/playwright/ensure-chromium.js.map +1 -0
- package/dist/preview/capture-screenshot.d.ts +67 -0
- package/dist/preview/capture-screenshot.js +179 -0
- package/dist/preview/capture-screenshot.js.map +1 -0
- package/dist/preview/viewer-url.d.ts +82 -0
- package/dist/preview/viewer-url.js +130 -0
- package/dist/preview/viewer-url.js.map +1 -0
- package/dist/process/fault-barrier.d.ts +55 -0
- package/dist/process/fault-barrier.js +113 -0
- package/dist/process/fault-barrier.js.map +1 -0
- package/dist/sabs/agent-facing-text.d.ts +35 -0
- package/dist/sabs/agent-facing-text.js +165 -0
- package/dist/sabs/agent-facing-text.js.map +1 -0
- 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 +47 -0
- package/dist/sabs/awaited-decision.js +124 -0
- package/dist/sabs/awaited-decision.js.map +1 -0
- package/dist/sabs/browser-context.d.ts +53 -0
- package/dist/sabs/browser-context.js +92 -0
- package/dist/sabs/browser-context.js.map +1 -0
- package/dist/sabs/editor-client-methods.d.ts +164 -0
- package/dist/sabs/editor-client-methods.js +750 -0
- package/dist/sabs/editor-client-methods.js.map +1 -0
- package/dist/sabs/editor-socket.d.ts +84 -0
- package/dist/sabs/editor-socket.js +64 -0
- package/dist/sabs/editor-socket.js.map +1 -0
- package/dist/sabs/recent-tool-runs.d.ts +14 -0
- package/dist/sabs/recent-tool-runs.js +61 -0
- package/dist/sabs/recent-tool-runs.js.map +1 -0
- package/dist/sabs/session-peer.d.ts +392 -0
- package/dist/sabs/session-peer.js +11 -0
- package/dist/sabs/session-peer.js.map +1 -0
- package/dist/sabs/streamed-reply.d.ts +42 -0
- package/dist/sabs/streamed-reply.js +110 -0
- package/dist/sabs/streamed-reply.js.map +1 -0
- package/dist/sabs/turn-collector.d.ts +169 -0
- package/dist/sabs/turn-collector.js +506 -0
- package/dist/sabs/turn-collector.js.map +1 -0
- package/dist/sabs/websocket-session-peer.d.ts +540 -0
- package/dist/sabs/websocket-session-peer.js +3289 -0
- package/dist/sabs/websocket-session-peer.js.map +1 -0
- package/dist/security/constant-time.d.ts +9 -0
- package/dist/security/constant-time.js +13 -0
- package/dist/security/constant-time.js.map +1 -0
- package/dist/server/client.d.ts +405 -0
- package/dist/server/client.js +684 -0
- package/dist/server/client.js.map +1 -0
- package/dist/server/identity-reads.d.ts +76 -0
- package/dist/server/identity-reads.js +209 -0
- package/dist/server/identity-reads.js.map +1 -0
- package/dist/start.d.ts +24 -0
- package/dist/start.js +81 -0
- package/dist/start.js.map +1 -0
- package/dist/stores/memory.d.ts +42 -0
- package/dist/stores/memory.js +121 -0
- package/dist/stores/memory.js.map +1 -0
- package/dist/stores/types.d.ts +74 -0
- package/dist/stores/types.js +11 -0
- package/dist/stores/types.js.map +1 -0
- package/dist/telemetry/mcp-client.d.ts +22 -0
- package/dist/telemetry/mcp-client.js +140 -0
- package/dist/telemetry/mcp-client.js.map +1 -0
- package/dist/telemetry/metrics.d.ts +41 -0
- package/dist/telemetry/metrics.js +103 -0
- package/dist/telemetry/metrics.js.map +1 -0
- package/dist/telemetry/runtime.d.ts +9 -0
- package/dist/telemetry/runtime.js +118 -0
- package/dist/telemetry/runtime.js.map +1 -0
- package/dist/transports/mcp/admin-tools.d.ts +56 -0
- package/dist/transports/mcp/admin-tools.js +252 -0
- package/dist/transports/mcp/admin-tools.js.map +1 -0
- package/dist/transports/mcp/app-status-html.d.ts +11 -0
- package/dist/transports/mcp/app-status-html.js +899 -0
- package/dist/transports/mcp/app-status-html.js.map +1 -0
- 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 +116 -0
- package/dist/transports/mcp/decision-elicitation.js +292 -0
- package/dist/transports/mcp/decision-elicitation.js.map +1 -0
- package/dist/transports/mcp/dispatch-probe.d.ts +24 -0
- package/dist/transports/mcp/dispatch-probe.js +48 -0
- package/dist/transports/mcp/dispatch-probe.js.map +1 -0
- 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 +8 -0
- package/dist/transports/mcp/editor-integration-setup-url.js +23 -0
- package/dist/transports/mcp/editor-integration-setup-url.js.map +1 -0
- package/dist/transports/mcp/format-tool-content.d.ts +20 -0
- package/dist/transports/mcp/format-tool-content.js +89 -0
- package/dist/transports/mcp/format-tool-content.js.map +1 -0
- 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 +17 -0
- package/dist/transports/mcp/instructions/tools/ask-user.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 +75 -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 +14 -0
- package/dist/transports/mcp/instructions/tools/copy.js +35 -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 +2 -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 +47 -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 +26 -0
- package/dist/transports/mcp/instructions/tools/index.js.map +1 -0
- package/dist/transports/mcp/instructions/tools/preview-app.d.ts +3 -0
- package/dist/transports/mcp/instructions/tools/preview-app.js +14 -0
- package/dist/transports/mcp/instructions/tools/preview-app.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 +2 -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 +22 -0
- package/dist/transports/mcp/mount.js +1040 -0
- package/dist/transports/mcp/mount.js.map +1 -0
- 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 +38 -0
- package/dist/transports/mcp/plan-approval.js +175 -0
- package/dist/transports/mcp/plan-approval.js.map +1 -0
- package/dist/transports/mcp/progress-notifier.d.ts +39 -0
- package/dist/transports/mcp/progress-notifier.js +52 -0
- package/dist/transports/mcp/progress-notifier.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 +78 -0
- package/skills/superblocks-build/SKILL.md +59 -0
- package/skills/superblocks-import/SKILL.md +88 -0
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@superblocksteam/gateway",
|
|
3
|
+
"version": "2.0.0-SNAPSHOT.1d4c72c0ab174c21",
|
|
4
|
+
"description": "Gateway v0 — MCP entry for app start/edit/publish",
|
|
5
|
+
"license": "Superblocks Community Software License",
|
|
6
|
+
"bin": {
|
|
7
|
+
"superblocks-gateway": "./dist/main.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"skills"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json",
|
|
22
|
+
"./skills/superblocks-import/SKILL.md": "./skills/superblocks-import/SKILL.md"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@modelcontextprotocol/ext-apps": "^1.7.5",
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
27
|
+
"@opentelemetry/api": "^1.9.1",
|
|
28
|
+
"@superblocksteam/library-shared": "2.0.0-SNAPSHOT.d9fcdf9b23406881",
|
|
29
|
+
"@superblocksteam/mcp-server": "2.0.0-SNAPSHOT.fd602514676ebf5e",
|
|
30
|
+
"@superblocksteam/shared": "2.0.0-SNAPSHOT.4dc7555b8c722398",
|
|
31
|
+
"@superblocksteam/telemetry": "2.0.0-SNAPSHOT.faa40614b0614040",
|
|
32
|
+
"fflate": "^0.8.3",
|
|
33
|
+
"libpg-query": "^17.7.4",
|
|
34
|
+
"playwright": "1.56.0",
|
|
35
|
+
"ws": "8.21.0",
|
|
36
|
+
"zod": "^4.3.6"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@eslint/js": "^9.39.2",
|
|
40
|
+
"@types/express": "^4.17.21",
|
|
41
|
+
"@types/node": "^24",
|
|
42
|
+
"@types/ws": "^8.18.1",
|
|
43
|
+
"eslint": "^9.39.2",
|
|
44
|
+
"eslint-config-prettier": "^10.1.8",
|
|
45
|
+
"eslint-config-turbo": "^2.9.16",
|
|
46
|
+
"eslint-plugin-import": "^2.32.0",
|
|
47
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
48
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
49
|
+
"express": "^4.21.1",
|
|
50
|
+
"globals": "^17.3.0",
|
|
51
|
+
"tsx": "^4.20.3",
|
|
52
|
+
"typescript": "^6.0.3",
|
|
53
|
+
"typescript-eslint": "^8.59.2",
|
|
54
|
+
"vitest": "^4.0.17"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=24",
|
|
58
|
+
"npm": ">=10.x"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"registry": "https://registry.npmjs.org"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsc --build tsconfig.build.json",
|
|
65
|
+
"check": "pnpm run lint && pnpm run typecheck",
|
|
66
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
67
|
+
"dev": "node --import tsx src/main.ts",
|
|
68
|
+
"dev:local": "node --import tsx src/main.ts",
|
|
69
|
+
"lint": "eslint --max-warnings 0 --concurrency=2",
|
|
70
|
+
"lint:fix": "eslint --fix --concurrency=2",
|
|
71
|
+
"playwright:install": "playwright install chromium",
|
|
72
|
+
"publish-package": "pnpm publish",
|
|
73
|
+
"start": "node dist/main.js",
|
|
74
|
+
"test": "vitest run",
|
|
75
|
+
"test:watch": "vitest",
|
|
76
|
+
"typecheck": "tsc --noEmit"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: superblocks-build
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user asks to build, create, change, update, edit, or modify an
|
|
5
|
+
app, dashboard, internal tool, admin panel, form, or CRUD UI - including one
|
|
6
|
+
they might otherwise make as a local file or artifact. Most requests never
|
|
7
|
+
say which location they mean. An existing or named app is still ambiguous
|
|
8
|
+
unless this conversation already established its location. Ask where it
|
|
9
|
+
should live before creating or editing anything and before using any tool;
|
|
10
|
+
do not list apps to infer the answer.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Where does this app get built?
|
|
14
|
+
|
|
15
|
+
Two places can build what the user just asked for:
|
|
16
|
+
|
|
17
|
+
- **Superblocks** — a real application. Org datasources, server-side APIs,
|
|
18
|
+
platform auth and permissions, a deploy story, other people can use it.
|
|
19
|
+
- **Here** — a local file or artifact in this chat. Fast and private, but it
|
|
20
|
+
reaches no company data and nobody else can run it.
|
|
21
|
+
|
|
22
|
+
Most requests name neither. Choosing silently is wrong about half the time, and
|
|
23
|
+
the user only finds out once the work already exists in the wrong place.
|
|
24
|
+
|
|
25
|
+
## Ask first
|
|
26
|
+
|
|
27
|
+
Before creating or editing anything, ask one short question naming both options,
|
|
28
|
+
then wait for the answer:
|
|
29
|
+
|
|
30
|
+
> Do you want this built in Superblocks, or as a local artifact here?
|
|
31
|
+
|
|
32
|
+
If the location is ambiguous, your first action must be the two-option question
|
|
33
|
+
above. Do not call any Superblocks tool, including `list_applications`, or
|
|
34
|
+
create or edit a local artifact until the user answers.
|
|
35
|
+
|
|
36
|
+
Ask once per request. Do not build a local version "to show them" while waiting.
|
|
37
|
+
Building it is the choice.
|
|
38
|
+
|
|
39
|
+
## Do not ask when they already answered
|
|
40
|
+
|
|
41
|
+
- Said Superblocks, or explicitly named a Superblocks app already established in
|
|
42
|
+
this conversation -> build there.
|
|
43
|
+
- Said local, artifact, file, HTML, "just show me", "quick mockup" -> build here.
|
|
44
|
+
- Answered this question for this same request -> honor it, stay silent.
|
|
45
|
+
- Not an app at all (a script, a chart, an analysis, a document, a snippet)
|
|
46
|
+
-> just do the work.
|
|
47
|
+
|
|
48
|
+
## Editing counts too
|
|
49
|
+
|
|
50
|
+
The same question applies to changing an app, dashboard, or artifact the user
|
|
51
|
+
names, including one already imported into Superblocks. When you cannot tell
|
|
52
|
+
which copy they mean, ask that instead.
|
|
53
|
+
|
|
54
|
+
## Once they pick Superblocks
|
|
55
|
+
|
|
56
|
+
- Something new -> `start_app`.
|
|
57
|
+
- Existing source to port -> use the `superblocks-import` skill.
|
|
58
|
+
- An app already in Superblocks -> `list_applications` to find it, then
|
|
59
|
+
`edit_app`.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: superblocks-import
|
|
3
|
+
description: >
|
|
4
|
+
Import, migrate, or port an existing app (React, Replit, Lovable, v0, Streamlit,
|
|
5
|
+
a zip on disk, or files in the conversation) into Superblocks. Use when the
|
|
6
|
+
user has existing source and wants it as a Superblocks application — not when
|
|
7
|
+
they are only editing an app that already exists in Superblocks.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Superblocks import (host director)
|
|
11
|
+
|
|
12
|
+
You plan and slice. **Superblocks writes** the application through Builder MCP
|
|
13
|
+
(`start_app` / `edit_app`). Do not invent Superblocks `client/` or `server/`
|
|
14
|
+
files on the laptop. Superblocks already has its own in-sandbox migration
|
|
15
|
+
skillset; your job is to ask for the right slices.
|
|
16
|
+
|
|
17
|
+
## Choose the source path
|
|
18
|
+
|
|
19
|
+
When source files are already visible in this conversation, call
|
|
20
|
+
`upload_artifact` with `files: [{ path, content }]`. Keep their original
|
|
21
|
+
relative paths; do not write or zip them first. Pass the returned `artifact` to
|
|
22
|
+
`start_app` in `artifacts` and ask Superblocks to migrate the attached source.
|
|
23
|
+
|
|
24
|
+
When the source is a readable tree on disk, inventory it locally, then use
|
|
25
|
+
`start_app` and `edit_app`. Do **not** zip or upload it; send focused prompts
|
|
26
|
+
grounded in the files you read.
|
|
27
|
+
|
|
28
|
+
For a zip when there is **no readable tree**, call `upload_artifact` with
|
|
29
|
+
`filePath` (never `zipBase64`), then pass its `artifact` to `start_app` in
|
|
30
|
+
`artifacts`. Archives over 50 MB are rejected.
|
|
31
|
+
|
|
32
|
+
Keep the returned artifact and application IDs. To resume, reuse the same
|
|
33
|
+
artifact ID with `edit_app` and the same application ID. Do not upload the
|
|
34
|
+
source again, and do not call `start_app` again.
|
|
35
|
+
|
|
36
|
+
Replit / Lovable / v0: clone or export onto this machine first. Do not ask
|
|
37
|
+
the live-edit environment to fetch those clouds.
|
|
38
|
+
|
|
39
|
+
## Slice order
|
|
40
|
+
|
|
41
|
+
1. Inventory locally (routes, env keys, ORMs, `fetch`/`axios`, tests). Keep
|
|
42
|
+
the source app running if you can. Map secrets from `.env.example` — never
|
|
43
|
+
paste production `.env` into `edit_app`.
|
|
44
|
+
2. `list_integrations`. Reuse an existing datasource (`find_apps_by_integration`)
|
|
45
|
+
before `create_integration`.
|
|
46
|
+
3. `start_app` a short fullstack scaffold with named integrations. For an
|
|
47
|
+
uploaded source, include the artifact and ask Superblocks to migrate it.
|
|
48
|
+
`start_app` defaults to Plan mode. Pass `mode: "BUILD"` only if the user
|
|
49
|
+
asks for build mode explicitly (e.g. "use build mode" or "skip the plan").
|
|
50
|
+
Otherwise, call
|
|
51
|
+
`ask_user` to put the first plan to them and wait for their answer. Only if
|
|
52
|
+
they approve, call `edit_app` with `planAction: "approve"` instead of
|
|
53
|
+
planning it again. Do not run a second “migrate everything” plan.
|
|
54
|
+
Mode is per call and never sticks: every `edit_app` below plans unless it
|
|
55
|
+
passes `mode: "BUILD"`, so send it on each slice.
|
|
56
|
+
4. One backend operation per `edit_app`, then `check_app_progress` until
|
|
57
|
+
`testApi` activity exists. There is no MCP SQL tool.
|
|
58
|
+
5. One UI route per `edit_app`, wired to APIs that already passed.
|
|
59
|
+
6. Auth, jobs, leftovers last.
|
|
60
|
+
7. After each slice, `get_application_structure` (and `get_app` URLs). Ground
|
|
61
|
+
the next prompt in what Superblocks actually wrote. `list_knowledge` /
|
|
62
|
+
`get_knowledge` for org playbooks.
|
|
63
|
+
|
|
64
|
+
`list_applications` if `start_app` errors: the app may already exist.
|
|
65
|
+
|
|
66
|
+
## Primitive map (not Next.js)
|
|
67
|
+
|
|
68
|
+
- Backend operations are **named APIs** in a registry, not URL routes.
|
|
69
|
+
- Each UI page is a Superblocks page using `useApi` / `useApiData` /
|
|
70
|
+
`executeApi` from the fullstack template — not Next App Router, not the
|
|
71
|
+
source app’s QueryClient.
|
|
72
|
+
- Datasources are **org integrations** (UUIDs). Credentials live there, not
|
|
73
|
+
`process.env` in generated code. Auth is platform user context; drop the
|
|
74
|
+
source login stack unless Superblocks asks otherwise.
|
|
75
|
+
|
|
76
|
+
## `edit_app` prompt shape
|
|
77
|
+
|
|
78
|
+
Ask Superblocks to implement **this slice** as fullstack (APIs vs pages vs
|
|
79
|
+
integrations). Tell it to follow its third-party migration skillset. Cite
|
|
80
|
+
paths you already read and quote only the small source excerpt a slice needs.
|
|
81
|
+
|
|
82
|
+
## Do not
|
|
83
|
+
|
|
84
|
+
- Open `/code-mode/applications/edit/:id` during a Gateway turn (steals the
|
|
85
|
+
editor peer).
|
|
86
|
+
- `browser_evaluate` JWTs; `browser_close` / Playwright `--isolated` between
|
|
87
|
+
IdP and retry.
|
|
88
|
+
- Dump `.env` or production data into prompts.
|