@agent-native/core 0.149.1 → 0.149.3

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 (422) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +54 -488
  3. package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
  4. package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
  5. package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
  6. package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
  7. package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
  8. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
  9. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
  10. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
  11. package/corpus/templates/analytics/AGENTS.md +25 -32
  12. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
  13. package/corpus/templates/analytics/app/global.css +1 -1
  14. package/corpus/templates/analytics/app/i18n-data.ts +37 -0
  15. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
  16. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
  17. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
  18. package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
  19. package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  20. package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  21. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
  22. package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
  23. package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
  24. package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
  25. package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
  26. package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
  27. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
  28. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
  29. package/corpus/templates/assets/AGENTS.md +6 -9
  30. package/corpus/templates/assets/app/global.css +1 -1
  31. package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  32. package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  33. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
  34. package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
  35. package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
  36. package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
  37. package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
  38. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
  39. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
  40. package/corpus/templates/brain/AGENTS.md +5 -12
  41. package/corpus/templates/brain/app/global.css +1 -1
  42. package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  43. package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  44. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
  45. package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
  46. package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
  47. package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
  48. package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
  49. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
  50. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
  51. package/corpus/templates/calendar/AGENTS.md +8 -9
  52. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  53. package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  54. package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  55. package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  56. package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  57. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  58. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  59. package/corpus/templates/chat/AGENTS.md +32 -80
  60. package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  61. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
  62. package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
  63. package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
  64. package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
  65. package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
  66. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
  67. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
  68. package/corpus/templates/clips/AGENTS.md +25 -31
  69. package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
  70. package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
  71. package/corpus/templates/clips/desktop/src/app.tsx +274 -137
  72. package/corpus/templates/clips/desktop/src/styles.css +35 -0
  73. package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
  74. package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
  75. package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
  76. package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
  77. package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
  78. package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
  79. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
  80. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
  81. package/corpus/templates/content/AGENTS.md +5 -9
  82. package/corpus/templates/content/app/global.css +1 -0
  83. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
  84. package/corpus/templates/crm/AGENTS.md +7 -11
  85. package/corpus/templates/crm/app/global.css +1 -1
  86. package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  87. package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  88. package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
  89. package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
  90. package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
  91. package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
  92. package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
  93. package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
  94. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
  95. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
  96. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
  97. package/corpus/templates/design/AGENTS.md +13 -21
  98. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
  99. package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
  100. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
  101. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
  102. package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
  103. package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
  104. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
  105. package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
  106. package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
  107. package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
  108. package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
  109. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
  110. package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
  111. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
  112. package/corpus/templates/design/app/i18n-data.ts +1 -0
  113. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
  114. package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
  115. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
  116. package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
  117. package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
  118. package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
  119. package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
  120. package/corpus/templates/design/e2e/global-setup.ts +27 -32
  121. package/corpus/templates/design/playwright.config.ts +3 -5
  122. package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
  123. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
  124. package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
  125. package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
  126. package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
  127. package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
  128. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
  129. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
  130. package/corpus/templates/dispatch/AGENTS.md +9 -16
  131. package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  132. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
  133. package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
  134. package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
  135. package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
  136. package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
  137. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
  138. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
  139. package/corpus/templates/factory/AGENTS.md +10 -24
  140. package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  141. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
  142. package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
  143. package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
  144. package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
  145. package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
  146. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
  147. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
  148. package/corpus/templates/forms/AGENTS.md +11 -17
  149. package/corpus/templates/forms/app/global.css +1 -0
  150. package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  151. package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  152. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
  153. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
  154. package/corpus/templates/macros/AGENTS.md +8 -8
  155. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
  156. package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
  157. package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
  158. package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
  159. package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
  160. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
  161. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
  162. package/corpus/templates/mail/AGENTS.md +5 -6
  163. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
  164. package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
  165. package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
  166. package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
  167. package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
  168. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
  169. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
  170. package/corpus/templates/plan/AGENTS.md +5 -14
  171. package/corpus/templates/plan/app/global.css +1 -0
  172. package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  173. package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
  174. package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
  175. package/corpus/templates/plan/vite.config.ts +5 -0
  176. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
  177. package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
  178. package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
  179. package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
  180. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
  181. package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
  182. package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
  183. package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
  184. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
  185. package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
  186. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
  187. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
  188. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
  189. package/corpus/templates/slides/AGENTS.md +33 -35
  190. package/corpus/templates/slides/actions/add-deck.ts +2 -0
  191. package/corpus/templates/slides/actions/add-slide.ts +15 -1
  192. package/corpus/templates/slides/actions/create-deck.ts +18 -6
  193. package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
  194. package/corpus/templates/slides/actions/get-deck.ts +83 -7
  195. package/corpus/templates/slides/actions/import-file.ts +2 -1
  196. package/corpus/templates/slides/actions/patch-deck.ts +165 -9
  197. package/corpus/templates/slides/actions/save-deck.ts +24 -1
  198. package/corpus/templates/slides/actions/update-slide.ts +1 -1
  199. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
  200. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
  201. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
  202. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
  203. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
  204. package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
  205. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
  206. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +432 -668
  207. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +296 -259
  208. package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
  209. package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
  210. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
  211. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +241 -116
  212. package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
  213. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +42 -14
  214. package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
  215. package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
  216. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
  217. package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
  218. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
  219. package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
  220. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
  221. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
  222. package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
  223. package/corpus/templates/slides/app/global.css +76 -1
  224. package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
  225. package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
  226. package/corpus/templates/slides/app/lib/create-deck-generation.ts +52 -23
  227. package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
  228. package/corpus/templates/slides/app/lib/slide-animation-elements.ts +104 -3
  229. package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -33
  230. package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
  231. package/corpus/templates/slides/app/pages/Index.tsx +315 -151
  232. package/corpus/templates/slides/app/root.tsx +43 -0
  233. package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
  234. package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
  235. package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
  236. package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
  237. package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
  238. package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
  239. package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
  240. package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
  241. package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
  242. package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
  243. package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
  244. package/corpus/templates/slides/package.json +1 -0
  245. package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
  246. package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
  247. package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -5
  248. package/corpus/templates/slides/shared/api.ts +47 -15
  249. package/corpus/templates/slides/shared/deck-title.ts +135 -0
  250. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
  251. package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
  252. package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
  253. package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
  254. package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
  255. package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
  256. package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
  257. package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
  258. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
  259. package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
  260. package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
  261. package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
  262. package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
  263. package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
  264. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
  265. package/corpus/templates/tasks/AGENTS.md +5 -20
  266. package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
  267. package/dist/agent/engine/ai-sdk-engine.js +1 -1
  268. package/dist/agent/production-agent.d.ts +21 -1
  269. package/dist/agent/production-agent.js +505 -355
  270. package/dist/agent/run-manager.js +156 -14
  271. package/dist/agent/run-store.d.ts +11 -10
  272. package/dist/agent/run-store.js +17 -13
  273. package/dist/agent/tool-approval-store.d.ts +18 -0
  274. package/dist/agent/tool-approval-store.js +122 -0
  275. package/dist/agent/types.d.ts +1 -1
  276. package/dist/cli/code-agent-executor.js +11 -2
  277. package/dist/client/AgentPanel.js +31 -6
  278. package/dist/client/AssistantChat.d.ts +9 -4
  279. package/dist/client/AssistantChat.js +221 -149
  280. package/dist/client/active-run-state.d.ts +9 -1
  281. package/dist/client/active-run-state.js +34 -3
  282. package/dist/client/agent-chat/index.d.ts +1 -1
  283. package/dist/client/agent-chat-adapter.d.ts +8 -0
  284. package/dist/client/agent-chat-adapter.js +125 -28
  285. package/dist/client/agent-chat.d.ts +1 -1
  286. package/dist/client/chat/markdown-renderer.js +14 -2
  287. package/dist/client/chat/message-components.d.ts +13 -3
  288. package/dist/client/chat/message-components.js +57 -52
  289. package/dist/client/chat/run-recovery.d.ts +1 -0
  290. package/dist/client/chat/run-recovery.js +8 -0
  291. package/dist/client/chat/tool-call-display.d.ts +5 -5
  292. package/dist/client/chat/tool-call-display.js +9 -212
  293. package/dist/client/chat-first/apps-rail.js +3 -3
  294. package/dist/client/chat-first/browser-pane.js +4 -1
  295. package/dist/client/chat-first/chat-history.d.ts +3 -1
  296. package/dist/client/chat-first/chat-history.js +7 -4
  297. package/dist/client/chat-first/surface-tabs.d.ts +1 -1
  298. package/dist/client/chat-first/surface-tabs.js +52 -41
  299. package/dist/client/chat-first/types.d.ts +3 -0
  300. package/dist/client/chat-first.d.ts +10 -0
  301. package/dist/client/chat-first.js +37 -2
  302. package/dist/client/components/ui/message-scroller.js +4 -1
  303. package/dist/client/i18n.js +3 -1
  304. package/dist/client/resources/McpConnectionSuggestion.js +9 -1
  305. package/dist/client/sse-event-processor.d.ts +4 -2
  306. package/dist/client/sse-event-processor.js +46 -6
  307. package/dist/client/use-chat-models.js +156 -80
  308. package/dist/client/use-run-stuck-detection.d.ts +2 -0
  309. package/dist/client/use-run-stuck-detection.js +85 -9
  310. package/dist/collab/awareness.d.ts +2 -2
  311. package/dist/collab/routes.d.ts +1 -1
  312. package/dist/collab/struct-routes.d.ts +1 -1
  313. package/dist/integrations/adapters/slack.d.ts +0 -4
  314. package/dist/integrations/adapters/slack.js +6 -30
  315. package/dist/integrations/catalog.js +1 -1
  316. package/dist/integrations/pending-tasks-store.d.ts +0 -8
  317. package/dist/integrations/pending-tasks-store.js +0 -21
  318. package/dist/integrations/slack-manifest.d.ts +2 -2
  319. package/dist/integrations/slack-manifest.js +0 -3
  320. package/dist/integrations/webhook-handler.js +1 -1
  321. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  322. package/dist/observability/routes.d.ts +3 -3
  323. package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
  324. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  325. package/dist/scripts/docs/source-search.js +2 -2
  326. package/dist/server/agent-chat/framework-prompts.js +7 -2
  327. package/dist/server/agent-chat/prompt-resources.js +2 -2
  328. package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
  329. package/dist/server/agent-chat/skill-frontmatter.js +41 -15
  330. package/dist/server/agent-chat-plugin.js +3 -3
  331. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  332. package/dist/server/agents-bundle.d.ts +16 -19
  333. package/dist/server/agents-bundle.js +19 -35
  334. package/dist/server/auth.js +262 -31
  335. package/dist/server/better-auth-instance.d.ts +1 -0
  336. package/dist/server/better-auth-instance.js +17 -2
  337. package/dist/server/onboarding-html.js +56 -9
  338. package/dist/server/prompts/framework-core-compact.d.ts +6 -1
  339. package/dist/server/prompts/framework-core-compact.js +12 -9
  340. package/dist/server/prompts/framework-core.d.ts +6 -1
  341. package/dist/server/prompts/framework-core.js +11 -9
  342. package/dist/server/prompts/index.d.ts +1 -1
  343. package/dist/server/prompts/index.js +1 -1
  344. package/dist/server/prompts/shared-rules.d.ts +15 -11
  345. package/dist/server/prompts/shared-rules.js +17 -13
  346. package/dist/server/realtime-token.d.ts +1 -1
  347. package/dist/server/transcribe-voice.d.ts +1 -1
  348. package/dist/shared/reasoning-effort.d.ts +8 -8
  349. package/dist/shared/reasoning-effort.js +10 -10
  350. package/dist/shared/streaming-text-smoothing.js +41 -11
  351. package/dist/styles/agent-native.css +19 -32
  352. package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  353. package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  354. package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  355. package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  356. package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  357. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  358. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  359. package/dist/templates/chat/AGENTS.md +32 -80
  360. package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  361. package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
  362. package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
  363. package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
  364. package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
  365. package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
  366. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
  367. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
  368. package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
  369. package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
  370. package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
  371. package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
  372. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
  373. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
  374. package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
  375. package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
  376. package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
  377. package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
  378. package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
  379. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
  380. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
  381. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
  382. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
  383. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
  384. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
  385. package/dist/templates/workspace-core/AGENTS.md +7 -16
  386. package/docs/content/messaging.mdx +6 -7
  387. package/docs/content/template-chat.mdx +1 -1
  388. package/package.json +2 -2
  389. package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  390. package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  391. package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  392. package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  393. package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  394. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  395. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  396. package/src/templates/chat/AGENTS.md +32 -80
  397. package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  398. package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
  399. package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
  400. package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
  401. package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
  402. package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
  403. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
  404. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
  405. package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
  406. package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
  407. package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
  408. package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
  409. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
  410. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
  411. package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
  412. package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
  413. package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
  414. package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
  415. package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
  416. package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
  417. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
  418. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
  419. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
  420. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
  421. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
  422. package/src/templates/workspace-core/AGENTS.md +7 -16
@@ -2965,6 +2965,7 @@ ${signInJourneyInlineScript()}
2965
2965
  }
2966
2966
  function __anFinishOAuthExchange(ret, flowId, sessionToken) {
2967
2967
  __anGoogleSignInInFlight = false;
2968
+ __anMagicLinkInFlight = false;
2968
2969
  if (__anIsBuilderPreview()) {
2969
2970
  if (sessionToken) {
2970
2971
  __anSetOAuthDebug('OAuth exchange redeemed; applying session bridge to embedded app', flowId);
@@ -3220,6 +3221,7 @@ ${identitySsoScript}
3220
3221
  var __anOAuthPollTimer = null;
3221
3222
  var __anOAuthPollCount = 0;
3222
3223
  var __anGoogleSignInInFlight = false;
3224
+ var __anMagicLinkInFlight = false;
3223
3225
  var __anGoogleRecoverBound = false;
3224
3226
  function __anNewOAuthFlowId() {
3225
3227
  try {
@@ -3253,15 +3255,26 @@ ${identitySsoScript}
3253
3255
  if (showDebugOverlay) debug.classList.add('show');
3254
3256
  }
3255
3257
  }
3256
- function __anShowOAuthError(err, btn, message) {
3258
+ function __anStopOAuthExchangePolling() {
3257
3259
  if (__anOAuthPollTimer) {
3258
3260
  clearInterval(__anOAuthPollTimer);
3259
3261
  __anOAuthPollTimer = null;
3260
3262
  }
3263
+ }
3264
+ function __anShowAuthExchangeError(err, btn, message, kind) {
3265
+ __anStopOAuthExchangePolling();
3261
3266
  err.textContent = message;
3262
- err.classList.add('show');
3267
+ err.classList.add('show', 'error');
3263
3268
  btn.disabled = false;
3264
- __anGoogleSignInInFlight = false;
3269
+ if (kind === 'magic-link') {
3270
+ __anMagicLinkInFlight = false;
3271
+ showMagicLinkForm();
3272
+ } else {
3273
+ __anGoogleSignInInFlight = false;
3274
+ }
3275
+ }
3276
+ function __anShowOAuthError(err, btn, message) {
3277
+ __anShowAuthExchangeError(err, btn, message, 'google');
3265
3278
  }
3266
3279
  function __anRecoverGoogleSignInAfterReturn() {
3267
3280
  // The user left for the Google sign-in window and came back. If the flow
@@ -3311,14 +3324,17 @@ ${identitySsoScript}
3311
3324
  __anShowOAuthError(err, btn, __anT('failedToConnect'));
3312
3325
  }
3313
3326
  }
3314
- function __anWaitForOAuthExchange(flowId, ret, btn, err) {
3327
+ function __anWaitForOAuthExchange(flowId, ret, btn, err, kind, verifier) {
3315
3328
  var started = Date.now();
3316
3329
  var timeoutMs = 5 * 60 * 1000;
3330
+ var isMagicLink = kind === 'magic-link';
3317
3331
  __anOAuthPollCount = 0;
3318
3332
  async function check() {
3319
3333
  __anOAuthPollCount++;
3320
3334
  try {
3321
- var res = await fetch(__anPath('/_agent-native/auth/desktop-exchange') + '?flow_id=' + encodeURIComponent(flowId), { credentials: 'include' });
3335
+ var exchangeParams = '?flow_id=' + encodeURIComponent(flowId);
3336
+ if (verifier) exchangeParams += '&verifier=' + encodeURIComponent(verifier);
3337
+ var res = await fetch(__anPath('/_agent-native/auth/desktop-exchange') + exchangeParams, { credentials: 'include' });
3322
3338
  var data = await res.json().catch(function() { return {}; });
3323
3339
  if (data && (data.email || data.token)) {
3324
3340
  if (__anOAuthPollTimer) clearInterval(__anOAuthPollTimer);
@@ -3328,7 +3344,12 @@ ${identitySsoScript}
3328
3344
  }
3329
3345
  if (data && data.error) {
3330
3346
  __anSetOAuthDebug('OAuth exchange returned an error: ' + (data.message || data.error), flowId);
3331
- __anShowOAuthError(err, btn, __anAuthErrorText(data, __anT('googleNotConfigured')));
3347
+ __anShowAuthExchangeError(
3348
+ err,
3349
+ btn,
3350
+ __anAuthErrorText(data, isMagicLink ? __anT('magicLinkFailed') : __anT('googleNotConfigured')),
3351
+ isMagicLink ? 'magic-link' : 'google',
3352
+ );
3332
3353
  return;
3333
3354
  }
3334
3355
  if (data && data.pending && (__anOAuthPollCount === 1 || __anOAuthPollCount % 5 === 0)) {
@@ -3340,10 +3361,17 @@ ${identitySsoScript}
3340
3361
  }
3341
3362
  }
3342
3363
  if (Date.now() - started > timeoutMs) {
3343
- __anShowOAuthError(err, btn, __anT('googleNeverFinished') + ' Flow ' + __anFlowDebugId(flowId) + '.');
3364
+ __anShowAuthExchangeError(
3365
+ err,
3366
+ btn,
3367
+ isMagicLink
3368
+ ? __anT('magicLinkFailed')
3369
+ : __anT('googleNeverFinished') + ' Flow ' + __anFlowDebugId(flowId) + '.',
3370
+ isMagicLink ? 'magic-link' : 'google',
3371
+ );
3344
3372
  }
3345
3373
  }
3346
- if (__anOAuthPollTimer) clearInterval(__anOAuthPollTimer);
3374
+ __anStopOAuthExchangePolling();
3347
3375
  __anOAuthPollTimer = setInterval(check, 1000);
3348
3376
  setTimeout(check, 500);
3349
3377
  }
@@ -3479,6 +3507,8 @@ ${googleOnly
3479
3507
  __anSetAuthView('magicLinkSent');
3480
3508
  }
3481
3509
  function showMagicLinkForm() {
3510
+ __anStopOAuthExchangePolling();
3511
+ __anMagicLinkInFlight = false;
3482
3512
  var form = document.getElementById('magic-link-form');
3483
3513
  if (!form) return;
3484
3514
  hideMagicLinkSuccess();
@@ -3851,6 +3881,7 @@ ${googleOnly
3851
3881
  var msg = document.getElementById('m-msg');
3852
3882
  var emailInput = document.getElementById('m-email');
3853
3883
  var email = __anNormalizeAuthEmail(emailInput && emailInput.value);
3884
+ var isDesktopMagicLink = __anIsAgentNativeDesktop();
3854
3885
  msg.classList.remove('show', 'error', 'success');
3855
3886
  if (!__anIsValidAuthEmail(email)) {
3856
3887
  __anShowEmailValidationError(emailInput, msg);
@@ -3858,12 +3889,18 @@ ${googleOnly
3858
3889
  }
3859
3890
  var originalLabel = btn.textContent;
3860
3891
  btn.disabled = true;
3892
+ __anMagicLinkInFlight = isDesktopMagicLink;
3861
3893
  btn.textContent = __anT('sending');
3862
3894
  try {
3863
3895
  var res = await fetch(__anPath('/_agent-native/auth/magic-link'), {
3864
3896
  method: 'POST',
3865
3897
  headers: { 'Content-Type': 'application/json' },
3866
- body: JSON.stringify({ email: email, callbackURL: __anResumeHref() }),
3898
+ body: JSON.stringify({
3899
+ email: email,
3900
+ callbackURL: isDesktopMagicLink
3901
+ ? __anPath('/_agent-native/auth/magic-link/desktop-callback')
3902
+ : __anResumeHref(),
3903
+ }),
3867
3904
  });
3868
3905
  var data = await res.json().catch(function(error) {
3869
3906
  console.warn('[auth] Could not parse magic-link response', error);
@@ -3873,13 +3910,23 @@ ${googleOnly
3873
3910
  btn.disabled = false;
3874
3911
  btn.textContent = originalLabel;
3875
3912
  showMagicLinkSuccess(email);
3913
+ if (isDesktopMagicLink) {
3914
+ var magicFlowId = data && typeof data.flowId === 'string' ? data.flowId : '';
3915
+ var magicVerifier = data && typeof data.verifier === 'string' ? data.verifier : '';
3916
+ if (!magicFlowId || !magicVerifier) {
3917
+ throw new Error('The sign-in flow was not initialized.');
3918
+ }
3919
+ __anWaitForOAuthExchange(magicFlowId, __anResumeHref(), btn, msg, 'magic-link', magicVerifier);
3920
+ }
3876
3921
  return;
3877
3922
  }
3923
+ __anMagicLinkInFlight = false;
3878
3924
  msg.textContent = __anAuthErrorText(data, __anT('magicLinkFailed'));
3879
3925
  msg.classList.add('show', 'error');
3880
3926
  btn.disabled = false;
3881
3927
  btn.textContent = originalLabel;
3882
3928
  } catch (err) {
3929
+ __anMagicLinkInFlight = false;
3883
3930
  msg.textContent = __anT('networkErrorDashRetry');
3884
3931
  msg.classList.add('show', 'error');
3885
3932
  btn.disabled = false;
@@ -2,7 +2,7 @@
2
2
  * Compact framework core instructions (FRAMEWORK_CORE_COMPACT).
3
3
  * Used in lazy-context mode (lazyContext: true — the default).
4
4
  *
5
- * Shares rules 8–9, 12–13 with the full variant via shared-rules.ts.
5
+ * Shares rules 8–9, 13–15 with the full variant via shared-rules.ts.
6
6
  * The compact version omits:
7
7
  * - Verbose "Extended Capabilities" section (agent uses get-framework-context)
8
8
  * - Detailed "Parallel Tool Calls" prose (replaced with one-liner)
@@ -18,6 +18,11 @@ export interface FrameworkCoreCompactPromptOptions {
18
18
  * a group's tool by name is gated on this — a prompt naming an absent tool
19
19
  * makes the model call it, fail, and often report the capability as missing. */
20
20
  disabledFrameworkGroups?: ReadonlySet<FrameworkToolGroup>;
21
+ /** True for surfaces whose agent really can edit source (dev mode). This core
22
+ * prompt is appended to both the production and development prompts, so the
23
+ * Builder-handoff sentence must be dropped here or it contradicts the dev
24
+ * prompt's own "you have full local access". */
25
+ canEditSource?: boolean;
21
26
  }
22
27
  /**
23
28
  * Build the compact FRAMEWORK_CORE prompt string.
@@ -2,7 +2,7 @@
2
2
  * Compact framework core instructions (FRAMEWORK_CORE_COMPACT).
3
3
  * Used in lazy-context mode (lazyContext: true — the default).
4
4
  *
5
- * Shares rules 8–9, 12–13 with the full variant via shared-rules.ts.
5
+ * Shares rules 8–9, 13–15 with the full variant via shared-rules.ts.
6
6
  * The compact version omits:
7
7
  * - Verbose "Extended Capabilities" section (agent uses get-framework-context)
8
8
  * - Detailed "Parallel Tool Calls" prose (replaced with one-liner)
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import { frameworkGroupEnabled, } from "../../framework-tools.js";
12
12
  import { hasDatabaseReadTools, hasDatabaseWriteTools, } from "../../scripts/db/tool-mode.js";
13
- import { sharedRule8, SHARED_RULE_9, sharedRule14, SHARED_RULE_15, SHARED_RULE_AGENT_WARNINGS, } from "./shared-rules.js";
13
+ import { sharedRule8, SHARED_RULE_9, sharedRule13, SHARED_RULE_14, SHARED_RULE_15, } from "./shared-rules.js";
14
14
  /**
15
15
  * Build the compact FRAMEWORK_CORE prompt string.
16
16
  *
@@ -54,10 +54,13 @@ For generated media, prefer this app's native generation action; otherwise use \
54
54
  const actionSurface = options?.extensionTools === true
55
55
  ? "registered actions, extensions, and MCP tools"
56
56
  : "registered actions and MCP tools";
57
+ const codeHandoffClause = options?.canEditSource === true
58
+ ? ""
59
+ : ", and hand code changes to Builder — you don't edit source yourself";
57
60
  return `
58
61
  ### How You Work
59
62
 
60
- Bring a senior engineer's judgment, arrived at through attention not premature certainty: understand the app's data and actions before acting, prefer existing actions and patterns over improvising, and keep work scoped. You act through ${actionSurface}, and hand code changes to Builder — you don't edit source yourself.
63
+ Bring a senior engineer's judgment, arrived at through attention not premature certainty: understand the app's data and actions before acting, prefer existing actions and patterns over improvising, and keep work scoped. You act through ${actionSurface}${codeHandoffClause}.
61
64
 
62
65
  **Autonomy:** handle the task end to end this turn when feasible — take the actions, confirm they worked, report the outcome. Don't stop at a proposal or half-finished work; work through blockers yourself before handing back. In Plan mode, propose only.
63
66
 
@@ -76,18 +79,18 @@ Bring a senior engineer's judgment, arrived at through attention not premature c
76
79
  7. **Security** — ${securityRule}
77
80
  ${sharedRule8(examples, options)}
78
81
  ${SHARED_RULE_9}
79
- **Native widgets** — For table/chart/graph/report requests, prefer actions labeled \`Native chat widget\`; use \`render-data-widget\` for already-summarized data (≤50 rows) instead of markdown tables. Above that, give the total plus the top rows — never retype a full result set as widget arguments. Deliver files in chat, never just a path.
80
- 10. **Your tool list is not the whole surface** — Most app actions and connected MCP tools load on demand, so search the live registry with \`tool-search\` before concluding a capability doesn't exist.
81
- 11. **Relative dates use runtime context** — The \`<runtime-context>\` block gives the authoritative current date/time. Resolve "today", "yesterday", "last week", and similar phrases to explicit calendar dates before querying data or creating artifacts.
82
- ${sharedRule14(options)}
82
+ 10. **Native widgets** — For table/chart/graph/report requests, prefer actions labeled \`Native chat widget\`; use \`render-data-widget\` for already-summarized data (≤50 rows) instead of markdown tables. Above that, give the total plus the top rows — never retype a full result set as widget arguments.
83
+ 11. **Downloadable files** — Deliver files in chat, never just a path.
84
+ 12. **Your tool list is not the whole surface** — Most app actions and connected MCP tools load on demand, so search the live registry with \`tool-search\` before concluding a capability doesn't exist.
85
+ ${sharedRule13(options)}
86
+ ${SHARED_RULE_14}
83
87
  ${SHARED_RULE_15}
84
- ${SHARED_RULE_AGENT_WARNINGS}
85
88
 
86
89
  ${resourcesSection}
87
90
  ### Extended Capabilities
88
91
 
89
92
  You also have tools for ${extendedCapabilitiesList}. Call \`get-framework-context\` with the matching key — it lists its own topics — for full instructions when needed.
90
93
 
91
- **Agent teams:** default to doing the work yourself. Delegate ONE sub-agent (\`agent-teams\` action "spawn") for self-contained heavy work; fan out to several only for genuinely independent units; never parallelize tightly-coupled work; cap fan-out around 3. Treat "background agent", "sub-agent", "parallel", "batch", "kick off", "run the rest", and "queued items" as delegation intent when the user is asking you to start or continue independent work items. After \`spawn\`, say the task started/running, not completed; use \`status\`/\`read-result\` before claiming the delegated work is done. Give each sub-agent a self-contained brief (objective, the specific context/IDs it needs, output format, boundaries) — it can't see this thread — then read all results and synthesize one integrated answer. Full details: \`get-framework-context\` key \`agent-teams\`.
94
+ **Agent teams:** default to doing the work yourself; \`agent-teams\` can delegate to background sub-agents. Treat "background agent", "sub-agent", "parallel", "batch", "kick off", "run the rest", and "queued items" as delegation intent when the user is asking you to start or continue independent work items. Read \`get-framework-context\` key \`agent-teams\` before spawning — it carries the fan-out limits, briefing contract, and why a spawn is not a completion.
92
95
  ${callAgentSection}`;
93
96
  }
@@ -2,7 +2,7 @@
2
2
  * Full framework core instructions (FRAMEWORK_CORE).
3
3
  * Used in the verbose prompt variant (lazyContext: false).
4
4
  *
5
- * Shared rules (8-9, 12-13) are imported from shared-rules.ts so the
5
+ * Shared rules (8-9, 13-15) are imported from shared-rules.ts so the
6
6
  * compact variant uses the same text and the two can never drift.
7
7
  */
8
8
  import { type FrameworkToolGroup } from "../../framework-tools.js";
@@ -15,6 +15,11 @@ export interface FrameworkCorePromptOptions {
15
15
  * a group's tool by name is gated on this — a prompt naming an absent tool
16
16
  * makes the model call it, fail, and often report the capability as missing. */
17
17
  disabledFrameworkGroups?: ReadonlySet<FrameworkToolGroup>;
18
+ /** True for surfaces whose agent really can edit source (dev mode). This core
19
+ * prompt is appended to both the production and development prompts, so the
20
+ * Builder-handoff sentence must be dropped here or it contradicts the dev
21
+ * prompt's own "you have full local access". */
22
+ canEditSource?: boolean;
18
23
  }
19
24
  /**
20
25
  * Build the full FRAMEWORK_CORE prompt string.
@@ -2,12 +2,12 @@
2
2
  * Full framework core instructions (FRAMEWORK_CORE).
3
3
  * Used in the verbose prompt variant (lazyContext: false).
4
4
  *
5
- * Shared rules (8-9, 12-13) are imported from shared-rules.ts so the
5
+ * Shared rules (8-9, 13-15) are imported from shared-rules.ts so the
6
6
  * compact variant uses the same text and the two can never drift.
7
7
  */
8
8
  import { frameworkGroupEnabled, } from "../../framework-tools.js";
9
9
  import { hasDatabaseReadTools, hasDatabaseWriteTools, } from "../../scripts/db/tool-mode.js";
10
- import { sharedRule8, SHARED_RULE_9, sharedRule14, SHARED_RULE_15, SHARED_RULE_AGENT_WARNINGS, } from "./shared-rules.js";
10
+ import { sharedRule8, SHARED_RULE_9, sharedRule13, SHARED_RULE_14, SHARED_RULE_15, } from "./shared-rules.js";
11
11
  /**
12
12
  * Build the full FRAMEWORK_CORE prompt string.
13
13
  *
@@ -41,6 +41,9 @@ export function buildFrameworkCore(examples, options) {
41
41
  const actionSurface = options?.extensionTools === true
42
42
  ? "this app's registered actions, extensions, and connected MCP tools"
43
43
  : "this app's registered actions and connected MCP tools";
44
+ const codeHandoffClause = options?.canEditSource === true
45
+ ? ""
46
+ : " — and you hand code changes to Builder rather than editing source yourself";
44
47
  const groupOn = (group) => frameworkGroupEnabled(options?.disabledFrameworkGroups, group);
45
48
  const resourcesSection = groupOn("resources")
46
49
  ? `### Resources
@@ -73,7 +76,7 @@ Workspace resources are user-facing by default. If you need temporary working fi
73
76
 
74
77
  You bring a senior engineer's judgment to this app, but you let it arrive through attention rather than premature certainty. Understand the app's data and actions before you act — read the current screen, the schema, and what tools exist — and let the shape of the existing system steer you. Prefer the app's own actions and established patterns over improvising a new approach. Keep your work scoped to what the request implies; don't redesign things that already work.
75
78
 
76
- You act through ${actionSurface} — and you hand code changes to Builder rather than editing source yourself. Within that surface, you own the task end to end.
79
+ You act through ${actionSurface}${codeHandoffClause}. Within that surface, you own the task end to end.
77
80
 
78
81
  ### Autonomy And Persistence
79
82
 
@@ -102,13 +105,12 @@ ${refreshRule}
102
105
  ${securityRule}
103
106
  ${sharedRule8(examples, options)}
104
107
  ${SHARED_RULE_9}
105
- **Native chat widgets** — When an available action says it renders a native widget such as \`data-table\`, \`data-chart\`, or \`data-insights\`, call that action for user requests asking for a table, chart, graph, trend, report, or inline data view. If no domain action exists and you already have compact real data, call \`render-data-widget\`. Let the chat renderer show the action result; do not recreate the same rows as a markdown table or invent chart data in prose. Add only a short human summary or next-step link around the widget. Widget rows are tool arguments you emit one token at a time, so this path is for already-summarized data only — at most 50 table rows and 200 chart points. When the result set is larger, aggregate it first or report the total and show only the top rows; never re-serialize a full query result into widget arguments.
106
- **Downloadable files** — When the user asks you to create or export a file, deliver it in the same chat turn. For compact tabular results, prefer \`render-data-widget\` so the user gets the native Download CSV action without a second stored copy. For a complete or durable file written through \`workspaceWrite\`, use a normal non-\`scratch/\` path and then call \`show-workspace-file\` with that path so chat renders a direct download card. Never finish by giving filesystem paths or telling the user to navigate elsewhere to find the file.
107
- 10. **Your tool list is not the whole surface** — Most app actions and connected MCP tools load on demand, so search the live registry with \`tool-search\` before concluding a capability doesn't exist.
108
- 11. **Relative dates use runtime context** — The \`<runtime-context>\` block gives the authoritative current date/time. Resolve "today", "yesterday", "last week", and similar phrases to explicit calendar dates before querying data or creating artifacts. When answering factual questions, include the exact date or date range you used.
109
- ${sharedRule14(options)}
108
+ 10. **Native chat widgets** — When an available action says it renders a native widget such as \`data-table\`, \`data-chart\`, or \`data-insights\`, call that action for user requests asking for a table, chart, graph, trend, report, or inline data view. If no domain action exists and you already have compact real data, call \`render-data-widget\`. Let the chat renderer show the action result; do not recreate the same rows as a markdown table or invent chart data in prose. Add only a short human summary or next-step link around the widget. Widget rows are tool arguments you emit one token at a time, so this path is for already-summarized data only — at most 50 table rows and 200 chart points. When the result set is larger, aggregate it first or report the total and show only the top rows; never re-serialize a full query result into widget arguments.
109
+ 11. **Downloadable files** — When the user asks you to create or export a file, deliver it in the same chat turn. For compact tabular results, prefer \`render-data-widget\` so the user gets the native Download CSV action without a second stored copy. For a complete or durable file written through \`workspaceWrite\`, use a normal non-\`scratch/\` path and then call \`show-workspace-file\` with that path so chat renders a direct download card. Never finish by giving filesystem paths or telling the user to navigate elsewhere to find the file.
110
+ 12. **Your tool list is not the whole surface** — Most app actions and connected MCP tools load on demand, so search the live registry with \`tool-search\` before concluding a capability doesn't exist.
111
+ ${sharedRule13(options)}
112
+ ${SHARED_RULE_14}
110
113
  ${SHARED_RULE_15}
111
- ${SHARED_RULE_AGENT_WARNINGS}
112
114
 
113
115
  ### Parallel Tool Calls
114
116
 
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export { buildFrameworkCore } from "./framework-core.js";
6
6
  export { buildFrameworkCoreCompact } from "./framework-core-compact.js";
7
- export { sharedRule8, SHARED_RULE_9, sharedRule14, SHARED_RULE_15, type PromptExamples, type SharedRuleOptions, } from "./shared-rules.js";
7
+ export { sharedRule8, SHARED_RULE_9, sharedRule13, SHARED_RULE_14, SHARED_RULE_15, type PromptExamples, type SharedRuleOptions, } from "./shared-rules.js";
8
8
  export { getModelFamilyOverlay } from "./model-overlays.js";
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export { buildFrameworkCore } from "./framework-core.js";
6
6
  export { buildFrameworkCoreCompact } from "./framework-core-compact.js";
7
- export { sharedRule8, SHARED_RULE_9, sharedRule14, SHARED_RULE_15, } from "./shared-rules.js";
7
+ export { sharedRule8, SHARED_RULE_9, sharedRule13, SHARED_RULE_14, SHARED_RULE_15, } from "./shared-rules.js";
8
8
  export { getModelFamilyOverlay } from "./model-overlays.js";
@@ -4,8 +4,13 @@
4
4
  * identical between them.
5
5
  *
6
6
  * Rules 8–9 (db-* tools; the consolidated no-fabrication / verify / recover
7
- * rule) and 12–13 (planning discipline; collaborate through uncertainty) are
8
- * reproduced verbatim in both prompts — keep them here.
7
+ * rule) and 13–15 (planning discipline; collaborate through uncertainty;
8
+ * relay agent warnings) are reproduced verbatim in both prompts — keep them
9
+ * here.
10
+ *
11
+ * Each identifier carries the number its text emits. Renumbering a rule means
12
+ * renaming its identifier in the same change; the two drifted apart once
13
+ * already and left people editing a different rule than the name said.
9
14
  */
10
15
  import { type FrameworkToolGroup } from "../../framework-tools.js";
11
16
  import { type DatabaseToolsOption } from "../../scripts/db/tool-mode.js";
@@ -30,7 +35,7 @@ export interface SharedRuleOptions {
30
35
  export declare function sharedRule8(examples?: PromptExamples, options?: SharedRuleOptions): string;
31
36
  /**
32
37
  * Rule 9 — Consolidated anti-fabrication rule (shared). Formerly three
33
- * separate rules (fabricating facts, fabricating success, and Rule 11's
38
+ * separate rules (fabricating facts, fabricating success, and a since-removed
34
39
  * "verify before you claim done") — merged because they are one behavior,
35
40
  * honesty about what actually happened, viewed from three angles. Keep all
36
41
  * three sub-behaviors distinct; do not re-split them back into separate
@@ -38,8 +43,8 @@ export declare function sharedRule8(examples?: PromptExamples, options?: SharedR
38
43
  */
39
44
  export declare const SHARED_RULE_9 = "9. **Never fabricate \u2014 verify results, report failures honestly, and recover instead of giving up.**\n - **Never fabricate factual claims or records** \u2014 do not invent numbers, metrics, records, query results, URLs, citations, source attributions, customer names, dates, or success rates. This applies inside generated artifacts too: decks, documents, reports, dashboards, Slack/email replies, and charts. Only state factual numbers/claims the user provided or you retrieved with an action/tool. If a data source is unavailable, returns no rows, is missing credentials, or has a connection error, say so clearly; do not create placeholder rows or fetch unrelated providers to look complete unless the user explicitly asked you to import/sync/backfill. Prefer qualitative wording, placeholders like `[metric TBD]`, or clearly labeled draft assumptions over plausible-looking facts \u2014 presenting made-up data as real is worse than admitting the limitation.\n - **Never fabricate success from tool errors** \u2014 when a tool call returns an error (marked `isError: true`, contains \"Command failed\", \"Error:\", or non-zero exit output), the operation FAILED; do not synthesize a success narrative or describe what it \"would have\" produced. Report the failure verbatim (this applies especially to `bash(command=\"pnpm action ...\")` calls). Before telling the user a mutating action (create/update/delete/send/publish) is done, confirm it actually landed \u2014 check the tool result, or read the refreshed `<current-screen>` / re-query the data; having *called* an action is not proof it worked. If a result is ambiguous, check rather than assume.\n - **Recover instead of giving up** \u2014 treat a failure or ambiguous result as a signal to retry the obvious fix, try an alternate tool or approach, or clearly hand the blocker back with what you tried; never silently give up, and never paper over a failure by claiming success.";
40
45
  /**
41
- * Rule 12 (name retained as `sharedRule14` for import stability) — Planning and
42
- * progress. Deliberately states only when to open a progress run; the
46
+ * Rule 13 — Planning and progress. Deliberately states only when to open a
47
+ * progress run; the
43
48
  * start/update/complete discipline lives in `manage-progress`'s own tool
44
49
  * description (packages/core/src/progress/actions.ts). Re-adding the mechanics
45
50
  * here means every turn pays for guidance the model only needs once it has the
@@ -49,10 +54,11 @@ export declare const SHARED_RULE_9 = "9. **Never fabricate \u2014 verify results
49
54
  * the rule never names a tool the request does not carry. The planning
50
55
  * discipline itself still applies — only the tool call goes away.
51
56
  */
52
- export declare function sharedRule14(options?: SharedRuleOptions): string;
57
+ export declare function sharedRule13(options?: SharedRuleOptions): string;
58
+ /** Rule 14 — Collaborate through uncertainty (better-specified version). */
59
+ export declare const SHARED_RULE_14 = "14. **Collaborate through uncertainty** \u2014 If a task stalls, errors, or depends on setup the user may not know about, shift into builder-coach mode instead of repeating the same attempt. State what you verified, name the most likely next checks, and proactively try common unblockers you can inspect (for example prompt size, missing environment variables, unavailable connections, current screen state, or tool choice). When you finish a meaningful step, offer one or two concrete next steps or improvements so non-technical users can keep iterating. When you are genuinely blocked on a decision you cannot resolve from context \u2014 and a wrong guess would be costly \u2014 use `ask-question` to present the choice instead of guessing; otherwise prefer a reasonable assumption and keep moving.";
53
60
  /**
54
- * Rule 14 — Relay agent warnings. Named for what it is rather than its number,
55
- * since the `SHARED_RULE_14`/`15` names above no longer match theirs.
61
+ * Rule 15 — Relay agent warnings.
56
62
  *
57
63
  * Load-bearing: a tool result can carry an `<agent-warning>` block raised deep
58
64
  * inside an action (see `agent/action-warnings.ts`) for an operation the caller
@@ -60,6 +66,4 @@ export declare function sharedRule14(options?: SharedRuleOptions): string;
60
66
  * Without this rule the model summarizes past the block and reports success,
61
67
  * which is the incident this channel was built to prevent.
62
68
  */
63
- export declare const SHARED_RULE_AGENT_WARNINGS = "14. **Relay `<agent-warning>` blocks before you report success** \u2014 A tool result may contain one or more `<agent-warning severity=\"...\" code=\"...\">` blocks. These are not part of the action's return value: they are raised by the operation the tool performed and they are the only place that consequence is reported. Never drop, bury, or paraphrase one away. On `severity=\"critical\"`, stop and tell the user what happened in your own words BEFORE any success summary \u2014 lead with the consequence and the remedy the block names, do not continue a multi-step plan whose later steps depend on the affected state, and if the operation is reversible say so and offer to reverse it. On `severity=\"advisory\"`, mention it in your final response. If a warning says something may already be broken, say that plainly; \"done\" is not an honest answer to a turn that raised a critical warning.";
64
- /** Rule 13 (const name retained as SHARED_RULE_15 for import stability) — Collaborate through uncertainty (better-specified version). */
65
- export declare const SHARED_RULE_15 = "13. **Collaborate through uncertainty** \u2014 If a task stalls, errors, or depends on setup the user may not know about, shift into builder-coach mode instead of repeating the same attempt. State what you verified, name the most likely next checks, and proactively try common unblockers you can inspect (for example prompt size, missing environment variables, unavailable connections, current screen state, or tool choice). When you finish a meaningful step, offer one or two concrete next steps or improvements so non-technical users can keep iterating. When you are genuinely blocked on a decision you cannot resolve from context \u2014 and a wrong guess would be costly \u2014 use `ask-question` to present the choice instead of guessing; otherwise prefer a reasonable assumption and keep moving.";
69
+ export declare const SHARED_RULE_15 = "15. **Relay `<agent-warning>` blocks before you report success** \u2014 A tool result may contain one or more `<agent-warning severity=\"...\" code=\"...\">` blocks. These are not part of the action's return value: they are raised by the operation the tool performed and they are the only place that consequence is reported. Never drop, bury, or paraphrase one away. On `severity=\"critical\"`, stop and tell the user what happened in your own words BEFORE any success summary \u2014 lead with the consequence and the remedy the block names, do not continue a multi-step plan whose later steps depend on the affected state, and if the operation is reversible say so and offer to reverse it. On `severity=\"advisory\"`, mention it in your final response. If a warning says something may already be broken, say that plainly; \"done\" is not an honest answer to a turn that raised a critical warning.";
@@ -4,8 +4,13 @@
4
4
  * identical between them.
5
5
  *
6
6
  * Rules 8–9 (db-* tools; the consolidated no-fabrication / verify / recover
7
- * rule) and 12–13 (planning discipline; collaborate through uncertainty) are
8
- * reproduced verbatim in both prompts — keep them here.
7
+ * rule) and 13–15 (planning discipline; collaborate through uncertainty;
8
+ * relay agent warnings) are reproduced verbatim in both prompts — keep them
9
+ * here.
10
+ *
11
+ * Each identifier carries the number its text emits. Renumbering a rule means
12
+ * renaming its identifier in the same change; the two drifted apart once
13
+ * already and left people editing a different rule than the name said.
9
14
  */
10
15
  import { frameworkGroupEnabled, } from "../../framework-tools.js";
11
16
  import { normalizeDatabaseToolsMode, } from "../../scripts/db/tool-mode.js";
@@ -54,7 +59,7 @@ export function sharedRule8(examples, options) {
54
59
  }
55
60
  /**
56
61
  * Rule 9 — Consolidated anti-fabrication rule (shared). Formerly three
57
- * separate rules (fabricating facts, fabricating success, and Rule 11's
62
+ * separate rules (fabricating facts, fabricating success, and a since-removed
58
63
  * "verify before you claim done") — merged because they are one behavior,
59
64
  * honesty about what actually happened, viewed from three angles. Keep all
60
65
  * three sub-behaviors distinct; do not re-split them back into separate
@@ -65,8 +70,8 @@ export const SHARED_RULE_9 = `9. **Never fabricate — verify results, report fa
65
70
  - **Never fabricate success from tool errors** — when a tool call returns an error (marked \`isError: true\`, contains "Command failed", "Error:", or non-zero exit output), the operation FAILED; do not synthesize a success narrative or describe what it "would have" produced. Report the failure verbatim (this applies especially to \`bash(command="pnpm action ...")\` calls). Before telling the user a mutating action (create/update/delete/send/publish) is done, confirm it actually landed — check the tool result, or read the refreshed \`<current-screen>\` / re-query the data; having *called* an action is not proof it worked. If a result is ambiguous, check rather than assume.
66
71
  - **Recover instead of giving up** — treat a failure or ambiguous result as a signal to retry the obvious fix, try an alternate tool or approach, or clearly hand the blocker back with what you tried; never silently give up, and never paper over a failure by claiming success.`;
67
72
  /**
68
- * Rule 12 (name retained as `sharedRule14` for import stability) — Planning and
69
- * progress. Deliberately states only when to open a progress run; the
73
+ * Rule 13 — Planning and progress. Deliberately states only when to open a
74
+ * progress run; the
70
75
  * start/update/complete discipline lives in `manage-progress`'s own tool
71
76
  * description (packages/core/src/progress/actions.ts). Re-adding the mechanics
72
77
  * here means every turn pays for guidance the model only needs once it has the
@@ -76,15 +81,16 @@ export const SHARED_RULE_9 = `9. **Never fabricate — verify results, report fa
76
81
  * the rule never names a tool the request does not carry. The planning
77
82
  * discipline itself still applies — only the tool call goes away.
78
83
  */
79
- export function sharedRule14(options) {
84
+ export function sharedRule13(options) {
80
85
  if (!frameworkGroupEnabled(options?.disabledFrameworkGroups, "automation")) {
81
- return `12. **Plan and track multi-step work** — When a task spans several real steps, work through them in order and tell the user where you are as you go rather than only at the end. Skip ceremony for single-action lookups, simple reads, and anything that finishes in one tool call.`;
86
+ return `13. **Plan and track multi-step work** — When a task spans several real steps, work through them in order and tell the user where you are as you go rather than only at the end. Skip ceremony for single-action lookups, simple reads, and anything that finishes in one tool call.`;
82
87
  }
83
- return `12. **Plan and track multi-step work** — When a task spans several real steps the user would want to watch, open a \`manage-progress\` run so the work is visible while it's still in flight, and keep it updated as you go rather than after the fact; the tool's own description carries the full discipline. Skip it for single-action lookups, simple reads, and anything that finishes in one tool call — never create single-step plans.`;
88
+ return `13. **Plan and track multi-step work** — When a task spans several real steps the user would want to watch, open a \`manage-progress\` run so the work is visible while it's still in flight, and keep it updated as you go rather than after the fact; the tool's own description carries the full discipline. Skip it for single-action lookups, simple reads, and anything that finishes in one tool call — never create single-step plans.`;
84
89
  }
90
+ /** Rule 14 — Collaborate through uncertainty (better-specified version). */
91
+ export const SHARED_RULE_14 = `14. **Collaborate through uncertainty** — If a task stalls, errors, or depends on setup the user may not know about, shift into builder-coach mode instead of repeating the same attempt. State what you verified, name the most likely next checks, and proactively try common unblockers you can inspect (for example prompt size, missing environment variables, unavailable connections, current screen state, or tool choice). When you finish a meaningful step, offer one or two concrete next steps or improvements so non-technical users can keep iterating. When you are genuinely blocked on a decision you cannot resolve from context — and a wrong guess would be costly — use \`ask-question\` to present the choice instead of guessing; otherwise prefer a reasonable assumption and keep moving.`;
85
92
  /**
86
- * Rule 14 — Relay agent warnings. Named for what it is rather than its number,
87
- * since the `SHARED_RULE_14`/`15` names above no longer match theirs.
93
+ * Rule 15 — Relay agent warnings.
88
94
  *
89
95
  * Load-bearing: a tool result can carry an `<agent-warning>` block raised deep
90
96
  * inside an action (see `agent/action-warnings.ts`) for an operation the caller
@@ -92,6 +98,4 @@ export function sharedRule14(options) {
92
98
  * Without this rule the model summarizes past the block and reports success,
93
99
  * which is the incident this channel was built to prevent.
94
100
  */
95
- export const SHARED_RULE_AGENT_WARNINGS = `14. **Relay \`<agent-warning>\` blocks before you report success** — A tool result may contain one or more \`<agent-warning severity="..." code="...">\` blocks. These are not part of the action's return value: they are raised by the operation the tool performed and they are the only place that consequence is reported. Never drop, bury, or paraphrase one away. On \`severity="critical"\`, stop and tell the user what happened in your own words BEFORE any success summary — lead with the consequence and the remedy the block names, do not continue a multi-step plan whose later steps depend on the affected state, and if the operation is reversible say so and offer to reverse it. On \`severity="advisory"\`, mention it in your final response. If a warning says something may already be broken, say that plainly; "done" is not an honest answer to a turn that raised a critical warning.`;
96
- /** Rule 13 (const name retained as SHARED_RULE_15 for import stability) — Collaborate through uncertainty (better-specified version). */
97
- export const SHARED_RULE_15 = `13. **Collaborate through uncertainty** — If a task stalls, errors, or depends on setup the user may not know about, shift into builder-coach mode instead of repeating the same attempt. State what you verified, name the most likely next checks, and proactively try common unblockers you can inspect (for example prompt size, missing environment variables, unavailable connections, current screen state, or tool choice). When you finish a meaningful step, offer one or two concrete next steps or improvements so non-technical users can keep iterating. When you are genuinely blocked on a decision you cannot resolve from context — and a wrong guess would be costly — use \`ask-question\` to present the choice instead of guessing; otherwise prefer a reasonable assumption and keep moving.`;
101
+ export const SHARED_RULE_15 = `15. **Relay \`<agent-warning>\` blocks before you report success** — A tool result may contain one or more \`<agent-warning severity="..." code="...">\` blocks. These are not part of the action's return value: they are raised by the operation the tool performed and they are the only place that consequence is reported. Never drop, bury, or paraphrase one away. On \`severity="critical"\`, stop and tell the user what happened in your own words BEFORE any success summary — lead with the consequence and the remedy the block names, do not continue a multi-step plan whose later steps depend on the affected state, and if the operation is reversible say so and offer to reverse it. On \`severity="advisory"\`, mention it in your final response. If a warning says something may already be broken, say that plainly; "done" is not an honest answer to a turn that raised a critical warning.`;
@@ -26,8 +26,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
26
26
  expiresAt?: undefined;
27
27
  ttlSeconds?: undefined;
28
28
  } | {
29
+ error?: undefined;
29
30
  token: string;
30
31
  expiresAt: string;
31
32
  ttlSeconds: number;
32
- error?: undefined;
33
33
  }>>;
@@ -20,6 +20,6 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
@@ -1,9 +1,9 @@
1
1
  export declare const REASONING_EFFORTS: readonly ["auto", "none", "minimal", "low", "medium", "high", "xhigh", "max"];
2
2
  export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
3
3
  /**
4
- * Shared chat always chooses an explicit reasoning tier. Keep `auto` in the
4
+ * Shared chat always chooses an explicit effort tier. Keep `auto` in the
5
5
  * accepted type only so older persisted selections and external callers can
6
- * migrate cleanly; new UI and engine defaults resolve it to Medium.
6
+ * migrate cleanly; new UI and engine defaults resolve it to High.
7
7
  */
8
8
  export declare const DEFAULT_REASONING_EFFORT: ReasoningEffort;
9
9
  export declare const REASONING_EFFORT_LABELS: Record<ReasoningEffort, string>;
@@ -19,22 +19,22 @@ export declare function normalizeReasoningEffortForRequest(model: string | undef
19
19
  export declare function reasoningEffortLabel(effort: ReasoningEffort | undefined): string;
20
20
  /**
21
21
  * Resolve a user-facing selection for a model. Legacy `auto`, missing values,
22
- * and tiers unsupported by the newly selected model all become Medium.
23
- * Non-reasoning models still retain Medium in persisted chat state so moving
24
- * back to a reasoning model has a predictable default; their engines omit the
25
- * effort through `normalizeReasoningEffortForModel`.
22
+ * and tiers unsupported by the newly selected model all become High.
23
+ * Models without effort controls still retain High in persisted chat state so
24
+ * moving back to an effort-capable model has a predictable default; their
25
+ * engines omit the effort through `normalizeReasoningEffortForModel`.
26
26
  */
27
27
  export declare function resolveReasoningEffortSelection(model: string | undefined, effort: ReasoningEffort | undefined): ReasoningEffort;
28
28
  export declare function stepDownReasoningEffort(effort: ReasoningEffort | undefined): ReasoningEffort | undefined;
29
29
  export declare function isGPTReasoningModel(model: string): boolean;
30
30
  /**
31
31
  * Anthropic's adaptive-thinking API is only available on the newer Claude
32
- * model families. Claude Haiku 4.5 is reasoning-capable, but it still
32
+ * model families. Claude Haiku 4.5 supports effort, but it still
33
33
  * requires the legacy manual `budget_tokens` configuration.
34
34
  */
35
35
  export declare function supportsClaudeAdaptiveThinking(model: string | undefined): boolean;
36
36
  /**
37
- * Map the shared reasoning ladder to Anthropic's manual thinking budgets for
37
+ * Map the shared effort ladder to Anthropic's manual thinking budgets for
38
38
  * models that do not support adaptive thinking (currently Claude Haiku 4.5).
39
39
  */
40
40
  export declare function anthropicManualThinkingBudget(effort: ReasoningEffort): 1024 | 4096 | 8000 | 16000 | 32000;
@@ -9,11 +9,11 @@ export const REASONING_EFFORTS = [
9
9
  "max",
10
10
  ];
11
11
  /**
12
- * Shared chat always chooses an explicit reasoning tier. Keep `auto` in the
12
+ * Shared chat always chooses an explicit effort tier. Keep `auto` in the
13
13
  * accepted type only so older persisted selections and external callers can
14
- * migrate cleanly; new UI and engine defaults resolve it to Medium.
14
+ * migrate cleanly; new UI and engine defaults resolve it to High.
15
15
  */
16
- export const DEFAULT_REASONING_EFFORT = "medium";
16
+ export const DEFAULT_REASONING_EFFORT = "high";
17
17
  export const REASONING_EFFORT_LABELS = {
18
18
  auto: "Auto",
19
19
  none: "None",
@@ -91,10 +91,10 @@ export function reasoningEffortLabel(effort) {
91
91
  }
92
92
  /**
93
93
  * Resolve a user-facing selection for a model. Legacy `auto`, missing values,
94
- * and tiers unsupported by the newly selected model all become Medium.
95
- * Non-reasoning models still retain Medium in persisted chat state so moving
96
- * back to a reasoning model has a predictable default; their engines omit the
97
- * effort through `normalizeReasoningEffortForModel`.
94
+ * and tiers unsupported by the newly selected model all become High.
95
+ * Models without effort controls still retain High in persisted chat state so
96
+ * moving back to an effort-capable model has a predictable default; their
97
+ * engines omit the effort through `normalizeReasoningEffortForModel`.
98
98
  */
99
99
  export function resolveReasoningEffortSelection(model, effort) {
100
100
  const requested = !effort || effort === "auto" ? DEFAULT_REASONING_EFFORT : effort;
@@ -107,7 +107,7 @@ export function resolveReasoningEffortSelection(model, effort) {
107
107
  * One tier down from each effort, stopping at "minimal" — legacy `auto`,
108
108
  * "none", and "minimal" itself are left unchanged. Used by the
109
109
  * empty-final-response retry so a retried turn asks for meaningfully less
110
- * reasoning instead of repeating the exact request that came back empty.
110
+ * effort instead of repeating the exact request that came back empty.
111
111
  */
112
112
  const REASONING_EFFORT_STEP_DOWN = {
113
113
  max: "xhigh",
@@ -138,7 +138,7 @@ function isClaudeReasoningModel(model) {
138
138
  }
139
139
  /**
140
140
  * Anthropic's adaptive-thinking API is only available on the newer Claude
141
- * model families. Claude Haiku 4.5 is reasoning-capable, but it still
141
+ * model families. Claude Haiku 4.5 supports effort, but it still
142
142
  * requires the legacy manual `budget_tokens` configuration.
143
143
  */
144
144
  export function supportsClaudeAdaptiveThinking(model) {
@@ -153,7 +153,7 @@ export function supportsClaudeAdaptiveThinking(model) {
153
153
  return opusMatch ? parseInt(opusMatch[1], 10) >= 6 : false;
154
154
  }
155
155
  /**
156
- * Map the shared reasoning ladder to Anthropic's manual thinking budgets for
156
+ * Map the shared effort ladder to Anthropic's manual thinking budgets for
157
157
  * models that do not support adaptive thinking (currently Claude Haiku 4.5).
158
158
  */
159
159
  export function anthropicManualThinkingBudget(effort) {