@superblocksteam/vite-plugin-file-sync 2.0.154 → 2.0.155-next.1

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.
Files changed (140) hide show
  1. package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts +23 -1
  2. package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts.map +1 -1
  3. package/dist/ai-service/agent/prompts/build-base-system-prompt.js +84 -29
  4. package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
  5. package/dist/ai-service/agent/subagents/apis/prompt-builder.d.ts +2 -0
  6. package/dist/ai-service/agent/subagents/apis/prompt-builder.d.ts.map +1 -1
  7. package/dist/ai-service/agent/subagents/apis/prompt-builder.js +11 -2
  8. package/dist/ai-service/agent/subagents/apis/prompt-builder.js.map +1 -1
  9. package/dist/ai-service/agent/tool-permission-delivery.d.ts.map +1 -1
  10. package/dist/ai-service/agent/tool-permission-delivery.js +4 -0
  11. package/dist/ai-service/agent/tool-permission-delivery.js.map +1 -1
  12. package/dist/ai-service/agent/tools/app-environment/update-app-environment.d.ts +29 -0
  13. package/dist/ai-service/agent/tools/app-environment/update-app-environment.d.ts.map +1 -0
  14. package/dist/ai-service/agent/tools/app-environment/update-app-environment.js +387 -0
  15. package/dist/ai-service/agent/tools/app-environment/update-app-environment.js.map +1 -0
  16. package/dist/ai-service/agent/tools/databases/destructive-migration-prompt.d.ts +58 -0
  17. package/dist/ai-service/agent/tools/databases/destructive-migration-prompt.d.ts.map +1 -0
  18. package/dist/ai-service/agent/tools/databases/destructive-migration-prompt.js +258 -0
  19. package/dist/ai-service/agent/tools/databases/destructive-migration-prompt.js.map +1 -0
  20. package/dist/ai-service/agent/tools/databases/dev-database-tasks.d.ts +18 -6
  21. package/dist/ai-service/agent/tools/databases/dev-database-tasks.d.ts.map +1 -1
  22. package/dist/ai-service/agent/tools/databases/dev-database-tasks.js +203 -51
  23. package/dist/ai-service/agent/tools/databases/dev-database-tasks.js.map +1 -1
  24. package/dist/ai-service/agent/tools/databases/dev-database-tools.d.ts +12 -10
  25. package/dist/ai-service/agent/tools/databases/dev-database-tools.d.ts.map +1 -1
  26. package/dist/ai-service/agent/tools/databases/dev-database-tools.js +29 -8
  27. package/dist/ai-service/agent/tools/databases/dev-database-tools.js.map +1 -1
  28. package/dist/ai-service/agent/tools/integrations/metadata.d.ts +3 -0
  29. package/dist/ai-service/agent/tools/integrations/metadata.d.ts.map +1 -1
  30. package/dist/ai-service/agent/tools/integrations/metadata.js +10 -2
  31. package/dist/ai-service/agent/tools/integrations/metadata.js.map +1 -1
  32. package/dist/ai-service/agent/tools.d.ts +9 -1
  33. package/dist/ai-service/agent/tools.d.ts.map +1 -1
  34. package/dist/ai-service/agent/tools.js +25 -1
  35. package/dist/ai-service/agent/tools.js.map +1 -1
  36. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts +8 -0
  37. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts.map +1 -1
  38. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js +104 -14
  39. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js.map +1 -1
  40. package/dist/ai-service/app-interface/npm-registry.d.ts +9 -0
  41. package/dist/ai-service/app-interface/npm-registry.d.ts.map +1 -1
  42. package/dist/ai-service/app-interface/npm-registry.js +50 -1
  43. package/dist/ai-service/app-interface/npm-registry.js.map +1 -1
  44. package/dist/ai-service/app-skills/helpers.d.ts.map +1 -1
  45. package/dist/ai-service/app-skills/helpers.js +1 -0
  46. package/dist/ai-service/app-skills/helpers.js.map +1 -1
  47. package/dist/ai-service/dev-database-client.d.ts +3 -1
  48. package/dist/ai-service/dev-database-client.d.ts.map +1 -1
  49. package/dist/ai-service/dev-database-client.js.map +1 -1
  50. package/dist/ai-service/features.d.ts +24 -0
  51. package/dist/ai-service/features.d.ts.map +1 -1
  52. package/dist/ai-service/features.js +24 -0
  53. package/dist/ai-service/features.js.map +1 -1
  54. package/dist/ai-service/helper-system-ai-attributes.d.ts +19 -0
  55. package/dist/ai-service/helper-system-ai-attributes.d.ts.map +1 -0
  56. package/dist/ai-service/helper-system-ai-attributes.js +17 -0
  57. package/dist/ai-service/helper-system-ai-attributes.js.map +1 -0
  58. package/dist/ai-service/index.d.ts +58 -2
  59. package/dist/ai-service/index.d.ts.map +1 -1
  60. package/dist/ai-service/index.js +186 -34
  61. package/dist/ai-service/index.js.map +1 -1
  62. package/dist/ai-service/integrations/store.d.ts +3 -0
  63. package/dist/ai-service/integrations/store.d.ts.map +1 -1
  64. package/dist/ai-service/integrations/store.js +3 -0
  65. package/dist/ai-service/integrations/store.js.map +1 -1
  66. package/dist/ai-service/live-edit-events/bridge.d.ts +21 -0
  67. package/dist/ai-service/live-edit-events/bridge.d.ts.map +1 -0
  68. package/dist/ai-service/live-edit-events/bridge.js +52 -0
  69. package/dist/ai-service/live-edit-events/bridge.js.map +1 -0
  70. package/dist/ai-service/live-edit-events/forwarder.d.ts +158 -0
  71. package/dist/ai-service/live-edit-events/forwarder.d.ts.map +1 -0
  72. package/dist/ai-service/live-edit-events/forwarder.js +403 -0
  73. package/dist/ai-service/live-edit-events/forwarder.js.map +1 -0
  74. package/dist/ai-service/state-machine/clark-fsm.d.ts +14 -0
  75. package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
  76. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  77. package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts.map +1 -1
  78. package/dist/ai-service/state-machine/handlers/awaiting-user.js +4 -0
  79. package/dist/ai-service/state-machine/handlers/awaiting-user.js.map +1 -1
  80. package/dist/ai-service/state-machine/handlers/idle.d.ts.map +1 -1
  81. package/dist/ai-service/state-machine/handlers/idle.js +3 -0
  82. package/dist/ai-service/state-machine/handlers/idle.js.map +1 -1
  83. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts +2 -0
  84. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  85. package/dist/ai-service/state-machine/handlers/llm-generating.js +93 -3
  86. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  87. package/dist/ai-service/state-machine/helpers/headless-turn-lifecycle.d.ts +27 -0
  88. package/dist/ai-service/state-machine/helpers/headless-turn-lifecycle.d.ts.map +1 -0
  89. package/dist/ai-service/state-machine/helpers/headless-turn-lifecycle.js +34 -0
  90. package/dist/ai-service/state-machine/helpers/headless-turn-lifecycle.js.map +1 -0
  91. package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
  92. package/dist/ai-service/state-machine/helpers/peer.js +24 -0
  93. package/dist/ai-service/state-machine/helpers/peer.js.map +1 -1
  94. package/dist/ai-service/state-machine/helpers/policy-gate-usage-metrics.d.ts.map +1 -1
  95. package/dist/ai-service/state-machine/helpers/policy-gate-usage-metrics.js +4 -0
  96. package/dist/ai-service/state-machine/helpers/policy-gate-usage-metrics.js.map +1 -1
  97. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.d.ts +103 -1
  98. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.d.ts.map +1 -1
  99. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.js +263 -3
  100. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.js.map +1 -1
  101. package/dist/ai-service/state-machine/helpers/stable-peer.d.ts +143 -0
  102. package/dist/ai-service/state-machine/helpers/stable-peer.d.ts.map +1 -1
  103. package/dist/ai-service/state-machine/helpers/stable-peer.js +220 -2
  104. package/dist/ai-service/state-machine/helpers/stable-peer.js.map +1 -1
  105. package/dist/ai-service/tasks/peer-push.d.ts.map +1 -1
  106. package/dist/ai-service/tasks/peer-push.js +7 -0
  107. package/dist/ai-service/tasks/peer-push.js.map +1 -1
  108. package/dist/dev-server-ws-smoke-client.d.ts.map +1 -1
  109. package/dist/dev-server-ws-smoke-client.js +1 -0
  110. package/dist/dev-server-ws-smoke-client.js.map +1 -1
  111. package/dist/file-sync-vite-plugin.d.ts.map +1 -1
  112. package/dist/file-sync-vite-plugin.js +9 -2
  113. package/dist/file-sync-vite-plugin.js.map +1 -1
  114. package/dist/lock-service/activity-tracker.d.ts.map +1 -1
  115. package/dist/lock-service/activity-tracker.js +5 -6
  116. package/dist/lock-service/activity-tracker.js.map +1 -1
  117. package/dist/lock-service/index.d.ts +56 -1
  118. package/dist/lock-service/index.d.ts.map +1 -1
  119. package/dist/lock-service/index.js +158 -13
  120. package/dist/lock-service/index.js.map +1 -1
  121. package/dist/rename-manager.d.ts.map +1 -1
  122. package/dist/rename-manager.js +2 -6
  123. package/dist/rename-manager.js.map +1 -1
  124. package/dist/socket-manager.d.ts +64 -0
  125. package/dist/socket-manager.d.ts.map +1 -1
  126. package/dist/socket-manager.js +236 -51
  127. package/dist/socket-manager.js.map +1 -1
  128. package/dist/util/logger.d.ts +2 -0
  129. package/dist/util/logger.d.ts.map +1 -1
  130. package/dist/util/logger.js +5 -0
  131. package/dist/util/logger.js.map +1 -1
  132. package/package.json +9 -9
  133. package/dist/parsing/entity/to-code-entity.d.ts +0 -3
  134. package/dist/parsing/entity/to-code-entity.d.ts.map +0 -1
  135. package/dist/parsing/entity/to-code-entity.js +0 -77
  136. package/dist/parsing/entity/to-code-entity.js.map +0 -1
  137. package/dist/parsing/entity/to-value-entity.d.ts +0 -8
  138. package/dist/parsing/entity/to-value-entity.d.ts.map +0 -1
  139. package/dist/parsing/entity/to-value-entity.js +0 -129
  140. package/dist/parsing/entity/to-value-entity.js.map +0 -1
@@ -15,7 +15,29 @@ export interface RegistryPolicy {
15
15
  hasAnyRegistryConfigured: boolean;
16
16
  source?: "configured" | "not-configured" | "unreachable";
17
17
  }
18
- export declare const buildBaseSystemPrompt: (config: AiServiceConfig, mode?: AiMode, factsSection?: string, appKnowledgeSection?: string, onDemandKnowledgeIndex?: string, registryPolicy?: RegistryPolicy, v2ToV3MigrationInProgress?: boolean, coreModel?: CoreModelName, includeAppBuilderModelGuidance?: boolean) => string;
18
+ /**
19
+ * Prompt audience.
20
+ *
21
+ * - "agent": the default — the full prompt for the tool-calling agent loop.
22
+ * - "plan-generation": the same prompt minus every section whose purpose is
23
+ * driving tool calls. It feeds the nested exitPlanMode plan-writing stream,
24
+ * which binds NO tools: seeding that stream with tool-workflow instructions
25
+ * ("present plans using the exitPlanMode tool", checklist management,
26
+ * mandatory skill loading, web tooling, tool-call guidance) made models
27
+ * imitate a tool call in text — a literal <tool_call> block rendered on the
28
+ * user's plan card. Contextual sections (identity, knowledge block,
29
+ * critical rules, safety, focused entities) are kept so plan content still
30
+ * honors saved knowledge and product rules; the tool-imperative lines
31
+ * inside critical_rules (grep/glob reads, askMultiChoice) are stripped for
32
+ * the variant, since same-prompt contradictions are the incident's causal
33
+ * mechanism and the preamble's ignore-clause is a disclaimer, not a guard.
34
+ * Consumption of this variant is gated by the
35
+ * clark.plan-generation-system-prompt.enabled rollout flag.
36
+ */
37
+ export type SystemPromptVariant = "agent" | "plan-generation";
38
+ export declare const buildBaseSystemPrompt: (config: AiServiceConfig, mode?: AiMode, factsSection?: string, appKnowledgeSection?: string, onDemandKnowledgeIndex?: string, registryPolicy?: RegistryPolicy, v2ToV3MigrationInProgress?: boolean, coreModel?: CoreModelName, includeAppBuilderModelGuidance?: boolean, options?: {
39
+ variant?: SystemPromptVariant;
40
+ }) => string;
19
41
  /**
20
42
  * Resolves app-editor model guidance from LaunchDarkly (`ai.prompt.app-builder.model-guidance`).
21
43
  * Only injected when `buildBaseSystemPrompt` is called with `includeAppBuilderModelGuidance`.
@@ -1 +1 @@
1
- {"version":3,"file":"build-base-system-prompt.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/agent/prompts/build-base-system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACd,MAAM,uCAAuC,CAAC;AAQ/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAStD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;CAC1D;AAED,eAAO,MAAM,qBAAqB,GAChC,QAAQ,eAAe,EACvB,OAAO,MAAM,EACb,eAAe,MAAM,EACrB,sBAAsB,MAAM,EAC5B,yBAAyB,MAAM,EAC/B,iBAAiB,cAAc,EAC/B,mCAAiC,EACjC,YAAY,aAAa,EACzB,wCAAsC,WAuYvC,CAAC;AA4oBF;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAC/C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnD,SAAS,CAAC,EAAE,aAAa,GACxB,MAAM,CAiBR"}
1
+ {"version":3,"file":"build-base-system-prompt.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/agent/prompts/build-base-system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACd,MAAM,uCAAuC,CAAC;AAQ/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAStD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAE9D,eAAO,MAAM,qBAAqB,GAChC,QAAQ,eAAe,EACvB,OAAO,MAAM,EACb,eAAe,MAAM,EACrB,sBAAsB,MAAM,EAC5B,yBAAyB,MAAM,EAC/B,iBAAiB,cAAc,EAC/B,mCAAiC,EACjC,YAAY,aAAa,EACzB,wCAAsC,EACtC,UAAU;IAAE,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAAE,WA+c5C,CAAC;AA4oBF;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAC/C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnD,SAAS,CAAC,EAAE,aAAa,GACxB,MAAM,CAiBR"}
@@ -6,13 +6,33 @@ import { buildSystemSkillExclusions } from "../../migration-prompt-gating.js";
6
6
  import { generateSkillsXml } from "../../skills/index.js";
7
7
  import { buildYamlApiSection, buildSdkApiSection, buildApiToolGuidance, } from "./api-prompts.js";
8
8
  const logger = getPrefixedLogger("[build-base-system-prompt]");
9
- export const buildBaseSystemPrompt = (config, mode, factsSection, appKnowledgeSection, onDemandKnowledgeIndex, registryPolicy, v2ToV3MigrationInProgress = false, coreModel, includeAppBuilderModelGuidance = false) => {
9
+ export const buildBaseSystemPrompt = (config, mode, factsSection, appKnowledgeSection, onDemandKnowledgeIndex, registryPolicy, v2ToV3MigrationInProgress = false, coreModel, includeAppBuilderModelGuidance = false, options) => {
10
+ const planGenerationVariant = options?.variant === "plan-generation";
10
11
  const managedNativeDbAvailable = isManagedNativeDbAvailableForClark(config);
11
12
  const superblocksDocsGuidance = config.features.superblocksDocsMcpEnabled
12
13
  ? "For Superblocks product documentation, use the `search_superblocks_docs` tool first for setup, integration, and platform behavior questions. If the docs MCP result is missing or incomplete, then use `web_fetch` against `https://docs.superblocks.com` and, if needed, discover pages via `https://docs.superblocks.com/sitemap.xml`.\nWhen referring to Superblocks pages in your response, always include relative links: [Integrations](/integrations) for the integrations page, or [Integration Name](/integrations/{slug}) for a specific integration (e.g., [Salesforce](/integrations/salesforce), [PostgreSQL](/integrations/postgres))."
13
14
  : "For Superblocks product documentation, prefer `https://docs.superblocks.com` as the primary source. If you need to discover the right page first, use the sitemap at `https://docs.superblocks.com/sitemap.xml`, then fetch the specific docs page you need.";
14
15
  let preamble = "";
15
- if (mode !== undefined) {
16
+ if (planGenerationVariant) {
17
+ // Replaces the modes/tools preamble below: the plan-generation stream has
18
+ // no tools, so mode behavior ("present plans using the exitPlanMode
19
+ // tool") and tool workflows must not reach it. The plain-text framing
20
+ // resolves the contradiction that made models imitate a tool call in
21
+ // text, and names the markup shapes that leaked so they are explicitly
22
+ // forbidden.
23
+ preamble = `## System Instructions
24
+ You are writing the text of a plan that will be shown to the user on a plan proposal card. The conversation so far contains the user's request and everything gathered about their application; the final message tells you exactly how to format the plan.
25
+
26
+ This is a plain-text-only task:
27
+ - You have NO tools in this conversation. Respond with the plan as markdown text only.
28
+ - Earlier messages — or instructions elsewhere in this prompt — may mention or demonstrate calling tools. Ignore them: presenting the plan is handled for you; your entire response IS the plan content.
29
+ - Never include tool-call or transcript markup such as <tool_call>, <tool-call>, <tool_response>, <tool-result>, or JSON objects with "name"/"arguments" fields. Markup like that is rendered to the user verbatim and breaks the plan card.
30
+
31
+ Here are some additional guidelines to follow:
32
+
33
+ `;
34
+ }
35
+ else if (mode !== undefined) {
16
36
  preamble = `## System Instructions
17
37
  You are an AI assistant named Clark with two modes of operation: 'Build' and 'Plan'.
18
38
  You cannot switch between modes on your own - the user must explicitly set the mode in the UI.
@@ -59,7 +79,7 @@ ${managedNativeDbAvailable
59
79
  You can provision and manage lifecycle-controlled dev databases for the application in Build mode (or in Plan mode with an approved plan). Side-effecting kickoff tools are off-limits in unapproved Plan mode, so when you are in Plan mode and the user needs a database, propose a plan that includes these steps.
60
80
  You cannot delete App Database bindings. Explain that deletion is not supported here and direct the user to the Superblocks admin console or support; use the database lifecycle tools only to provision, migrate, or check a binding's status.
61
81
  - \`provisionDatabase\` — Create the application's dev App Database binding, or reuse it when the same logical database was already provisioned (cloud Postgres; Amazon Aurora or Amazon RDS depending on the Superblocks environment — do NOT assume either product). Only one App Database per application is supported. If the user asks for another database, explain this limit; do not substitute tables, schema, or migrations in the existing database unless the user explicitly asks to modify that existing database. Returns a taskId IMMEDIATELY while provisioning runs in the background.
62
- - \`startApplyDevDatabaseMigrations\` — Run the binding's SQL migrations. Required after \`provisionDatabase\` if any application tables need to exist; provisioning only creates an empty App Database.
82
+ - \`startApplyDevDatabaseMigrations\` — Run the binding's SQL migrations. Required after \`provisionDatabase\` if any application tables need to exist; provisioning only creates an empty App Database. If a migration it will run deletes anything (DROP TABLE/DATABASE/SCHEMA, TRUNCATE, DROP COLUMN), fill \`destructiveChangeSummary\` / \`destructiveChangeDetails\` / \`destructiveChangeReason\` on the call: the user gets one confirmation card with your words on it and the call resumes by itself if they approve.
63
83
  - \`checkTask\` (read-only, instant) and \`waitForTask\` (read-only, blocking) — Observe progress. PREFER \`checkTask\` and keep working on unrelated steps while a task runs; only fall back to \`waitForTask\` when \`checkTask\` still reports \`state='running'\` AND you literally have no other useful work to do.
64
84
  - After \`checkTask\` or \`waitForTask\` reports the provisioning task completed, use only the \`integrationId\` from that task result for tool inputs and generated source (for example \`postgres(...)\`) for this managed database.
65
85
  - \`integrationId\` and other internal UUIDs from these task results are never for user-facing chat. MUST NEVER paste bare UUIDs or phrases like "Integration ID is …". When referring to the provisioned database in chat, paste the \`entityTag\` from the task result (for example \`@OrdersDB[id=…]\`) so the UI shows a name sticker like a user @ mention; also report human status fields such as \`lifecycleState\` / \`migrationState\`, success/failure, and the next step.
@@ -176,13 +196,17 @@ Think holistically about what the user wants to achieve. When solving bugs, ensu
176
196
 
177
197
  Do not be overly verbose, explain just enough to get your points across to the user.
178
198
  ${buildKnowledgeBlock(factsSection, appKnowledgeSection)}
179
- IMPORTANT: to explore the application structure, use tools:
199
+ ${planGenerationVariant
200
+ ? ""
201
+ : `IMPORTANT: to explore the application structure, use tools:
180
202
  - 'ls' to browse directories and see file metadata (sizes, timestamps)
181
203
  - 'glob' to find files matching patterns across the directory tree (e.g., "**/*.tsx")
182
204
  - 'grep' to search for specific code patterns or text within files
183
-
184
- ${config.features.clarkAttachmentDownloadEnabled
185
- ? `**Attachment workflow (uploaded files):**
205
+ `}
206
+ ${planGenerationVariant
207
+ ? ""
208
+ : config.features.clarkAttachmentDownloadEnabled
209
+ ? `**Attachment workflow (uploaded files):**
186
210
  An \`<attachment_reference>\` block gives you the stable handle for an uploaded file. Images, PDFs, and text files may also be visible inline, but if you need raw bytes on disk or need to copy an attachment into the project, you must materialize it first.
187
211
 
188
212
  The fastest path when an \`<attachment_reference>\` block is present:
@@ -199,19 +223,23 @@ Rules:
199
223
  - Never fabricate or fetch attachment \`url\` values directly (no ad-hoc code, shell, urllib/curl, or HTTP requests) — \`downloadAttachments\` is the only path.
200
224
  - Do not claim contents were reviewed unless you actually downloaded and inspected them in this turn.
201
225
  - If the block's \`note\` says there is no \`storageKey\`, do not invent one; tell the user the attachment cannot be materialized from the current message.${thirdPartyImportEnabled
202
- ? `
226
+ ? `
203
227
  - If the attachment is a third-party app export (e.g. Replit, Lovable, v0, Next.js), \`build_readFile\` \`skills/system/third-party-migration/SKILL.md\` before drafting a plan, and the plan you submit to \`exitPlanMode\` must include theme/styling fidelity (color tokens, fonts, layout shells) — not just the functional spec.`
204
- : ""}
228
+ : ""}
205
229
  - In Plan mode after inspection, don't freeform implement; use \`askMultiChoice\` or \`exitPlanMode\`. In Build mode, continue.`
206
- : `**Attachment workflow:**
230
+ : `**Attachment workflow:**
207
231
  - Call \`listAttachments\` to discover attachment IDs when the user references uploaded files, then inspect them inline.
208
232
  - Do not fetch attachment URLs directly with ad-hoc code, shell scripts, or HTTP requests.`}
209
233
 
210
- **App-specific knowledge files** are stored at \`skills/app/*.md\`. These files contain rules and preferences the user has explicitly saved for this application. **Read them at the start of every task** — they appear in file listings and contain authoritative requirements you must follow.
211
- ${skillsGuidance ?? ""}
212
- ${onDemandKnowledgeIndex ? buildOnDemandKnowledgeGuidance(onDemandKnowledgeIndex) : ""}
234
+ ${planGenerationVariant
235
+ ? ""
236
+ : `**App-specific knowledge files** are stored at \`skills/app/*.md\`. These files contain rules and preferences the user has explicitly saved for this application. **Read them at the start of every task** — they appear in file listings and contain authoritative requirements you must follow.`}
237
+ ${planGenerationVariant ? "" : (skillsGuidance ?? "")}
238
+ ${!planGenerationVariant && onDemandKnowledgeIndex ? buildOnDemandKnowledgeGuidance(onDemandKnowledgeIndex) : ""}
213
239
 
214
- **CRITICAL: Proactively use web tools when questions may require current information.**
240
+ ${planGenerationVariant
241
+ ? ""
242
+ : `**CRITICAL: Proactively use web tools when questions may require current information.**
215
243
 
216
244
  Use 'web_search' BEFORE answering when the user asks about:
217
245
  - Current or latest versions of libraries, frameworks, or tools
@@ -239,7 +267,24 @@ ${superblocksDocsGuidance}
239
267
 
240
268
  **Before installing any package, check it with \`build_lookupNpmPackage\`** to verify it exists in the configured registry and that you are using a recent version.
241
269
 
242
- ${buildRegistryPolicyParagraph(registryPolicy, config.features.packageInstallGateEnabled === true)}
270
+ ${buildRegistryPolicyParagraph(registryPolicy, config.features.packageInstallGateEnabled === true)}`}
271
+ ${planGenerationVariant
272
+ ? ""
273
+ : `
274
+ **Environment compatibility:**
275
+ When an \`<environment_compatibility>\` block is present, treat it as the server-authoritative compatibility and permission result. Do not recompute it from data tags, integrations, or other context.
276
+ - \`organizationDataTags\` is the organization catalog: every data tag that already exists in the org, with \`profileId\`, \`profileKey\`, and \`displayName\`.
277
+ - \`appDataTags\` is this app's membership: which of those tags the app currently uses, and in which modes (edit, preview, deployed).
278
+ - \`<available_data_tags>\` is only the tags currently selectable in Edit on this app. Do not treat that list as the org catalog.
279
+ - If the user asks to enable a tag that appears in \`organizationDataTags\` but not in \`appDataTags\`, add it with the Environment mutation tool using that tag's \`profileId\`. Do not tell them the tag does not exist.
280
+ - Only tell the user a tag must be created in Organization Settings when it is absent from \`organizationDataTags\`.
281
+ - Distinguish App Database support failures (including each tag's missing lifecycle operations), integration configuration failures (\`none\` versus \`default_fallback\` or \`exact\`), permission failures (\`canManageEnvironments: false\`), and temporarily unavailable reads or states.
282
+ - Explain temporarily unavailable states as transient; do not present them as a configuration mismatch.
283
+ - Propose only remediation actions listed in \`remediationActions\` in the block or the relevant per-tag entry. Never invent another remediation.
284
+ - Never claim that you can create organization data tags or change integration configurations. Explain those actions for the user or an administrator to perform.
285
+ - Use the Environment mutation tool only when \`canManageEnvironments\` is true and either the user asked to change app environment membership or \`remediationActions\` contains \`change_app_environment\`.
286
+ - If that tool is unavailable, provide a read-only explanation and the server-supplied remediation options instead of claiming to make the change.
287
+ `}
243
288
  <safety_guidance>
244
289
  ${safetyGuidance}
245
290
  </safety_guidance>
@@ -253,16 +298,20 @@ ${modelGuidance}
253
298
  - Pages should orchestrate components, not contain all the JSX
254
299
  - Monolithic pages are unacceptable and hard to maintain
255
300
  - keep file sizes small and focused on a single responsibility
256
-
301
+ ${planGenerationVariant
302
+ ? ""
303
+ : `
257
304
  ALWAYS read components using tools like \`grep\` and \`glob\` when you do not have a clear idea of what a components props are.
258
-
305
+ `}
259
306
  **Cleanup is REQUIRED:**
260
307
  - Deletions are draftable and can be restored by discarding changes - it's safer to delete than leave orphaned code
261
308
  - When you replace a file, **you MUST delete the old version** - leaving it is incomplete work
262
309
  - When you refactor components, **you MUST delete the old versions**
263
310
  - After completing any task, **you MUST scan for and delete orphaned files**
264
- - Leaving orphaned files is unprofessional and creates technical debt
265
- - If unsure whether a file is used, check with grep/glob first, then delete if unused
311
+ - Leaving orphaned files is unprofessional and creates technical debt${planGenerationVariant
312
+ ? ""
313
+ : `
314
+ - If unsure whether a file is used, check with grep/glob first, then delete if unused`}
266
315
  - Always provide clear context in deletion requests (what's being deleted and why)
267
316
  - Note: The tool will automatically prompt users for API and page deletions, so be confident in your deletions
268
317
 
@@ -274,8 +323,10 @@ ALWAYS read components using tools like \`grep\` and \`glob\` when you do not ha
274
323
 
275
324
  **Seeking user input is CRITICAL:**
276
325
  - When dealing with a persistent error, before deciding to change approach (eg switch to mock data, simplify UI, etc), ALWAYS check in with the user first
277
- - NEVER decide on a workaround without user confirmation
278
- - ALWAYS use askMultiChoice to get input from the user when multiple options are possible
326
+ - NEVER decide on a workaround without user confirmation${planGenerationVariant
327
+ ? ""
328
+ : `
329
+ - ALWAYS use askMultiChoice to get input from the user when multiple options are possible`}
279
330
  - NEVER autonomously decide to pivot away from the user's stated intent
280
331
  - The user's original goal takes precedence - you are a collaborator, not an autonomous decision maker
281
332
 
@@ -303,7 +354,9 @@ ALWAYS read components using tools like \`grep\` and \`glob\` when you do not ha
303
354
 
304
355
  </critical_rules>
305
356
 
306
- <checklist_management>
357
+ ${planGenerationVariant
358
+ ? ""
359
+ : `<checklist_management>
307
360
  ## Checklist Management
308
361
 
309
362
  Use \`build_manageChecklist\` to give the user real-time visibility into your progress on multi-step tasks. The checklist renders inline in the UI so the user can see what you are doing without asking.
@@ -323,9 +376,9 @@ Use \`build_manageChecklist\` to give the user real-time visibility into your pr
323
376
  - Break complex tasks into specific, actionable items — not vague descriptions
324
377
  - Mark an item \`in_progress\` BEFORE starting work on it
325
378
  - Keep one hands-on item \`in_progress\` at a time${managedNativeDbAvailable
326
- ? `
379
+ ? `
327
380
  - An item waiting on a background task (e.g. \`provisionDatabase\`) is the exception: leave it \`in_progress\` while the task runs and mark the next hands-on item \`in_progress\` too, so the user sees both moving at once`
328
- : ""}
381
+ : ""}
329
382
  - Mark items \`completed\` immediately after finishing — do not batch completions
330
383
  - Only add items you intend to complete — unfinished items block \`build_finalize\`
331
384
  - If a task cannot be completed, mark it \`failed\` with a \`failureReason\` — never leave items stuck as \`pending\` or \`in_progress\`
@@ -333,20 +386,22 @@ Use \`build_manageChecklist\` to give the user real-time visibility into your pr
333
386
  - For non-trivial work, include a verification step (e.g. "Verify app renders without errors")
334
387
 
335
388
  </checklist_management>
336
-
389
+ `}
337
390
  <focused_entities>
338
391
  If the user has focused the editor on one or more entities, you must do your best to constrain your actions to affect only those entities. Editing outside of the focused entities is only allowed if it is necessary to complete the user's request.
339
392
  </focused_entities>
340
- ${detailedGuidance}
341
- ${sdkApiEnabled ? buildSdkApiSection({ v2ToV3MigrationInProgress }) : ""}
342
- <tool_call_guidance>
393
+ ${planGenerationVariant ? "" : detailedGuidance}
394
+ ${!planGenerationVariant && sdkApiEnabled ? buildSdkApiSection({ v2ToV3MigrationInProgress }) : ""}
395
+ ${planGenerationVariant
396
+ ? ""
397
+ : `<tool_call_guidance>
343
398
  **Parallel calls:** For maximum efficiency, invoke all independent operations simultaneously.
344
399
 
345
400
  **Tool inputs:** Adhere to each tool's input schema. Always pass JSON object for tool inputs.
346
401
 
347
402
  ${buildApiToolGuidance(sdkApiEnabled)}
348
403
  </tool_call_guidance>
349
- `);
404
+ `}`);
350
405
  };
351
406
  const APP_KNOWLEDGE_MAX_CHARS = 80_000;
352
407
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"build-base-system-prompt.js","sourceRoot":"","sources":["../../../../src/ai-service/agent/prompts/build-base-system-prompt.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,GAAG,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;AAkB/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAuB,EACvB,IAAa,EACb,YAAqB,EACrB,mBAA4B,EAC5B,sBAA+B,EAC/B,cAA+B,EAC/B,yBAAyB,GAAG,KAAK,EACjC,SAAyB,EACzB,8BAA8B,GAAG,KAAK,EACtC,EAAE;IACF,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,MAAM,CAAC,CAAC;IAC5E,MAAM,uBAAuB,GAAG,MAAM,CAAC,QAAQ,CAAC,yBAAyB;QACvE,CAAC,CAAC,snBAAsnB;QACxnB,CAAC,CAAC,8PAA8P,CAAC;IAEnQ,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,IAA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EAA2E;IAC3E,sCAAsC;IACtC,IAAI,cAAc,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QAC5C,OAAO,8VAA8V,yBAAyB;;CAEjY,CAAC;IACA,CAAC;IAED,IAAI,cAAc,CAAC,wBAAwB,EAAE,CAAC;QAC5C,yEAAyE;QACzE,sEAAsE;QACtE,qCAAqC;QACrC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,GAAG,CACzD,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CACxB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,kcAAkc,uBAAuB,uHAAuH,yBAAyB;;CAEnnB,CAAC;IACA,CAAC;IAED,OAAO,yMAAyM,yBAAyB;;CAE1O,CAAC;AACF,CAAC;AAED,MAAM,uBAAuB,GAAG,MAAM,CAAC;;;;;;;;CAQtC,CAAC"}
1
+ {"version":3,"file":"build-base-system-prompt.js","sourceRoot":"","sources":["../../../../src/ai-service/agent/prompts/build-base-system-prompt.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,GAAG,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;AAuC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAuB,EACvB,IAAa,EACb,YAAqB,EACrB,mBAA4B,EAC5B,sBAA+B,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,CAAC,8BAA8B,EAAE;QAClC,CAAC,CAAC,EAAE,CAAC;IAEP,yEAAyE;IACzE,0EAA0E;IAC1E,2EAA2E;IAC3E,uEAAuE;IACvE,2EAA2E;IAC3E,sCAAsC;IACtC,IAAI,cAAc,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QAC5C,OAAO,8VAA8V,yBAAyB;;CAEjY,CAAC;IACA,CAAC;IAED,IAAI,cAAc,CAAC,wBAAwB,EAAE,CAAC;QAC5C,yEAAyE;QACzE,sEAAsE;QACtE,qCAAqC;QACrC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,GAAG,CACzD,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CACxB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,kcAAkc,uBAAuB,uHAAuH,yBAAyB;;CAEnnB,CAAC;IACA,CAAC;IAED,OAAO,yMAAyM,yBAAyB;;CAE1O,CAAC;AACF,CAAC;AAED,MAAM,uBAAuB,GAAG,MAAM,CAAC;;;;;;;;CAQtC,CAAC"}
@@ -11,6 +11,8 @@ export interface AvailableIntegration {
11
11
  name: string;
12
12
  displayName?: string;
13
13
  id: string;
14
+ mismatchedAppProfileKeys?: string[];
15
+ supportedProfileKeys?: string[];
14
16
  type: string;
15
17
  }
16
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/agent/subagents/apis/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC/C,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAwCD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CA8E5D"}
1
+ {"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/agent/subagents/apis/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC/C,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAqDD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CA8E5D"}
@@ -9,9 +9,18 @@ function formatAvailableIntegrations(integrations) {
9
9
  if (integrations.length === 0) {
10
10
  return "";
11
11
  }
12
- return integrations
13
- .map((i) => `- ${i.displayName || i.name} (id: ${i.id}, type: ${i.type})`)
12
+ const formatted = integrations
13
+ .map((integration) => {
14
+ const supported = integration.supportedProfileKeys?.join(", ") || "none";
15
+ const mismatched = integration.mismatchedAppProfileKeys?.join(", ") || "none";
16
+ return `- ${integration.displayName || integration.name} (id: ${integration.id}, type: ${integration.type}, supported app data tags: ${supported}, missing app data tags: ${mismatched})`;
17
+ })
14
18
  .join("\n");
19
+ const requiresConfirmation = integrations.some((integration) => (integration.mismatchedAppProfileKeys?.length ?? 0) > 0);
20
+ return requiresConfirmation
21
+ ? `${formatted}
22
+ If an integration has missing app data tags, warn the user which tags are missing and ask the user to confirm before using an integration with missing app data tags. This warning does not block the integration.`
23
+ : formatted;
15
24
  }
16
25
  /**
17
26
  * Formats integration metadata as XML with JSON content.
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-builder.js","sourceRoot":"","sources":["../../../../../src/ai-service/agent/subagents/apis/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmCH;;GAEG;AACH,SAAS,2BAA2B,CAClC,YAAoC;IAEpC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO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GZ,iBAAiB;;uBAEI,CAAC;IACtB,CAAC;IAED,0CAA0C;IAC1C,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI;;;EAGZ,qBAAqB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;sCACvB,CAAC;IACrC,CAAC;IAED,MAAM,IAAI;eACG,CAAC;IAEd,gEAAgE;IAChE,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI;;;;;EAKZ,yBAAyB,CAAC,mBAAmB,CAAC;sBAC1B,CAAC;IACrB,CAAC;IAED,MAAM,IAAI;;sDAE0C,CAAC;IAErD,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,IAAI,4EAA4E,CAAC;IACzF,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"prompt-builder.js","sourceRoot":"","sources":["../../../../../src/ai-service/agent/subagents/apis/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqCH;;GAEG;AACH,SAAS,2BAA2B,CAClC,YAAoC;IAEpC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAG,YAAY;SAC3B,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;QACnB,MAAM,SAAS,GAAG,WAAW,CAAC,oBAAoB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC;QACzE,MAAM,UAAU,GACd,WAAW,CAAC,wBAAwB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC;QAC7D,OAAO,KAAK,WAAW,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,SAAS,WAAW,CAAC,EAAE,WAAW,WAAW,CAAC,IAAI,8BAA8B,SA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zB,CAAC;IAED,kBAAkB;IAClB,MAAM,IAAI;;EAEV,UAAU;eACG,CAAC;IAEd,qCAAqC;IACrC,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,IAAI;;;EAGZ,iBAAiB;;uBAEI,CAAC;IACtB,CAAC;IAED,0CAA0C;IAC1C,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI;;;EAGZ,qBAAqB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;sCACvB,CAAC;IACrC,CAAC;IAED,MAAM,IAAI;eACG,CAAC;IAEd,gEAAgE;IAChE,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI;;;;;EAKZ,yBAAyB,CAAC,mBAAmB,CAAC;sBAC1B,CAAC;IACrB,CAAC;IAED,MAAM,IAAI;;sDAE0C,CAAC;IAErD,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,IAAI,4EAA4E,CAAC;IACzF,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-permission-delivery.d.ts","sourceRoot":"","sources":["../../../src/ai-service/agent/tool-permission-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAQ3D;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,CACzE,CAAC,CAAC,CAAC,CAAC;AAEL;;;;;;GAMG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;gBAC1C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAgB5D;AAED;;;;;;;;GAQG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
1
+ {"version":3,"file":"tool-permission-delivery.d.ts","sourceRoot":"","sources":["../../../src/ai-service/agent/tool-permission-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAQ3D;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,CACzE,CAAC,CAAC,CAAC,CAAC;AAEL;;;;;;GAMG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;gBAC1C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAgB5D;AAED;;;;;;;;GAQG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,IAAI,CAAC,CAgDf"}
@@ -11,6 +11,7 @@
11
11
  * decision resumes the turn via aiRespondToToolPermission.
12
12
  */
13
13
  import { getLogger } from "../../util/logger.js";
14
+ import { emitLiveEditEvent } from "../live-edit-events/bridge.js";
14
15
  import { clearPendingToolPermissionRequest } from "../state-machine/helpers/peer.js";
15
16
  import { PERMISSION_PROMPT_DELIVERY_TIMEOUT_MS, RpcTimeoutError, withRpcTimeout, } from "../util/rpc-timeout.js";
16
17
  /**
@@ -56,6 +57,9 @@ export async function deliverToolPermissionPrompt(clark, request) {
56
57
  if (!clark.context.peer) {
57
58
  return;
58
59
  }
60
+ // Clark is now blocked on a human. A Gateway caller cannot see this dialog,
61
+ // so without the relay its turn just appears to stall.
62
+ emitLiveEditEvent("auth_required", { reason: "tool_permission" });
59
63
  try {
60
64
  await withRpcTimeout(clark.context.peer.call.aiRequestToolPermission(request), PERMISSION_PROMPT_DELIVERY_TIMEOUT_MS, "aiRequestToolPermission");
61
65
  clark.logger.info(`[debug] aiRequestToolPermission acknowledged`, {
@@ -1 +1 @@
1
- {"version":3,"file":"tool-permission-delivery.js","sourceRoot":"","sources":["../../../src/ai-service/agent/tool-permission-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EACL,qCAAqC,EACrC,eAAe,EACf,cAAc,GACf,MAAM,wBAAwB,CAAC;AAUhC;;;;;;GAMG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACtD,YAAY,QAAgB,EAAE,OAA6B;QACzD,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,CAAC;QAC7B,MAAM,SAAS,GACb,KAAK,YAAY,eAAe;YAC9B,CAAC,CAAC,gDAAgD,QAAQ,oCAAoC;gBAC5F,GAAG,qCAAqC,GAAG,IAAI,kCAAkC;YACnF,CAAC,CAAC,gDAAgD,QAAQ,8BAA8B;gBACtF,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QACnE,KAAK,CACH,GAAG,SAAS,GAAG;YACb,0FAA0F;YAC1F,0DAA0D,EAC5D,OAAO,CACR,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAC9C,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,KAAY,EACZ,OAAoC;IAEpC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAA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 {"version":3,"file":"tool-permission-delivery.js","sourceRoot":"","sources":["../../../src/ai-service/agent/tool-permission-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EACL,qCAAqC,EACrC,eAAe,EACf,cAAc,GACf,MAAM,wBAAwB,CAAC;AAUhC;;;;;;GAMG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACtD,YAAY,QAAgB,EAAE,OAA6B;QACzD,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,CAAC;QAC7B,MAAM,SAAS,GACb,KAAK,YAAY,eAAe;YAC9B,CAAC,CAAC,gDAAgD,QAAQ,oCAAoC;gBAC5F,GAAG,qCAAqC,GAAG,IAAI,kCAAkC;YACnF,CAAC,CAAC,gDAAgD,QAAQ,8BAA8B;gBACtF,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QACnE,KAAK,CACH,GAAG,SAAS,GAAG;YACb,0FAA0F;YAC1F,0DAA0D,EAC5D,OAAO,CACR,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAC9C,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,KAAY,EACZ,OAAoC;IAEpC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAEnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACxB,SAAS,EAAE,CAAC,IAAI,CACd,8DAA8D,QAAQ,EAAE,CACzE,CAAC;IACJ,CAAC;IACD,KAAK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superblocksteam/shared";
2
+ export type UpdateAppEnvironmentDeps = {
3
+ applicationId: string;
4
+ superblocksBaseUrl: string;
5
+ getJwt: () => string | undefined;
6
+ onEnvironmentUpdated?: (settings: ApplicationEnvironmentSettings) => Promise<void>;
7
+ };
8
+ declare const MODES: readonly ["editor", "preview", "deployed"];
9
+ type Mode = (typeof MODES)[number];
10
+ export declare const FORMAT_INPUT_TIMEOUT_MS = 15000;
11
+ type EnvironmentProfiles = Partial<Record<Mode, EntityModeProfileSettings>>;
12
+ type UpdateResult = {
13
+ success: true;
14
+ environment: {
15
+ profiles: EnvironmentProfiles;
16
+ updated: number;
17
+ };
18
+ compatibility: Pick<AppEnvironmentCompatibility, "isBlocking" | "needsAttention" | "overallState" | "remediationActions">;
19
+ };
20
+ export declare const updateAppEnvironmentToolFactory: import("../../tools2/types.js").ToolFactory<UpdateAppEnvironmentDeps, import("../../tools2/types.js").Tool<{
21
+ changes: {
22
+ mode: "preview" | "editor" | "deployed";
23
+ addProfileIds?: string[] | undefined;
24
+ removeProfileIds?: string[] | undefined;
25
+ defaultProfileId?: string | undefined;
26
+ }[];
27
+ }, UpdateResult>>;
28
+ export {};
29
+ //# sourceMappingURL=update-app-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-app-environment.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/agent/tools/app-environment/update-app-environment.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EAE1B,MAAM,yBAAyB,CAAC;AAUjC,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IACjC,oBAAoB,CAAC,EAAE,CACrB,QAAQ,EAAE,8BAA8B,KACrC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,KAAK,4CAA6C,CAAC;AACzD,KAAK,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnC,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAG9C,KAAK,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAQ5E,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,IAAI,CAAC;IACd,WAAW,EAAE;QAAE,QAAQ,EAAE,mBAAmB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,aAAa,EAAE,IAAI,CACjB,2BAA2B,EAC3B,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG,oBAAoB,CACxE,CAAC;CACH,CAAC;AA0PF,eAAO,MAAM,+BAA+B;;;;;;;iBAyN3C,CAAC"}