@agent-native/core 0.109.4 → 0.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1522) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +11 -0
  3. package/corpus/core/docs/content/actions.mdx +2 -4
  4. package/corpus/core/docs/content/agent-surfaces.mdx +2 -4
  5. package/corpus/core/docs/content/audit-log.mdx +1 -2
  6. package/corpus/core/docs/content/authentication.mdx +3 -2
  7. package/corpus/core/docs/content/client.mdx +19 -18
  8. package/corpus/core/docs/content/components.mdx +1 -1
  9. package/corpus/core/docs/content/context-awareness.mdx +4 -7
  10. package/corpus/core/docs/content/creating-templates.mdx +7 -5
  11. package/corpus/core/docs/content/doctor.mdx +27 -6
  12. package/corpus/core/docs/content/drop-in-agent.mdx +6 -11
  13. package/corpus/core/docs/content/embedding-sdk.mdx +8 -10
  14. package/corpus/core/docs/content/getting-started.mdx +4 -2
  15. package/corpus/core/docs/content/internationalization.mdx +9 -6
  16. package/corpus/core/docs/content/key-concepts.mdx +2 -4
  17. package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -4
  18. package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
  19. package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +1 -2
  20. package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +3 -2
  21. package/corpus/core/docs/content/locales/ar-SA/client.mdx +19 -18
  22. package/corpus/core/docs/content/locales/ar-SA/components.mdx +1 -1
  23. package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
  24. package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
  25. package/corpus/core/docs/content/locales/ar-SA/doctor.mdx +10 -0
  26. package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
  27. package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
  28. package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +9 -6
  29. package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
  30. package/corpus/core/docs/content/locales/ar-SA/observability.mdx +1 -2
  31. package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
  32. package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
  33. package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +1 -2
  34. package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -2
  35. package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +2 -4
  36. package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
  37. package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -4
  38. package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
  39. package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +1 -2
  40. package/corpus/core/docs/content/locales/de-DE/authentication.mdx +3 -2
  41. package/corpus/core/docs/content/locales/de-DE/client.mdx +19 -18
  42. package/corpus/core/docs/content/locales/de-DE/components.mdx +1 -1
  43. package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +4 -7
  44. package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +7 -5
  45. package/corpus/core/docs/content/locales/de-DE/doctor.mdx +10 -0
  46. package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
  47. package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
  48. package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +9 -6
  49. package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +2 -4
  50. package/corpus/core/docs/content/locales/de-DE/observability.mdx +1 -2
  51. package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
  52. package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
  53. package/corpus/core/docs/content/locales/de-DE/sharing.mdx +1 -2
  54. package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -2
  55. package/corpus/core/docs/content/locales/de-DE/tracking.mdx +2 -4
  56. package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
  57. package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -4
  58. package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
  59. package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +1 -2
  60. package/corpus/core/docs/content/locales/es-ES/authentication.mdx +3 -2
  61. package/corpus/core/docs/content/locales/es-ES/client.mdx +19 -18
  62. package/corpus/core/docs/content/locales/es-ES/components.mdx +1 -1
  63. package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +4 -7
  64. package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +7 -5
  65. package/corpus/core/docs/content/locales/es-ES/doctor.mdx +10 -0
  66. package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
  67. package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
  68. package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +9 -6
  69. package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +2 -4
  70. package/corpus/core/docs/content/locales/es-ES/observability.mdx +1 -2
  71. package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
  72. package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
  73. package/corpus/core/docs/content/locales/es-ES/sharing.mdx +1 -2
  74. package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -2
  75. package/corpus/core/docs/content/locales/es-ES/tracking.mdx +2 -4
  76. package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
  77. package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -4
  78. package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
  79. package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +1 -2
  80. package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +3 -2
  81. package/corpus/core/docs/content/locales/fr-FR/client.mdx +19 -18
  82. package/corpus/core/docs/content/locales/fr-FR/components.mdx +1 -1
  83. package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
  84. package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
  85. package/corpus/core/docs/content/locales/fr-FR/doctor.mdx +10 -0
  86. package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
  87. package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
  88. package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +9 -6
  89. package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
  90. package/corpus/core/docs/content/locales/fr-FR/observability.mdx +1 -2
  91. package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
  92. package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
  93. package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +1 -2
  94. package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -2
  95. package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +2 -4
  96. package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
  97. package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -4
  98. package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
  99. package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +1 -2
  100. package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +3 -2
  101. package/corpus/core/docs/content/locales/hi-IN/client.mdx +19 -18
  102. package/corpus/core/docs/content/locales/hi-IN/components.mdx +1 -1
  103. package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
  104. package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
  105. package/corpus/core/docs/content/locales/hi-IN/doctor.mdx +10 -0
  106. package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
  107. package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
  108. package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +9 -6
  109. package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
  110. package/corpus/core/docs/content/locales/hi-IN/observability.mdx +1 -2
  111. package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
  112. package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
  113. package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +1 -2
  114. package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -2
  115. package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +2 -4
  116. package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
  117. package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -4
  118. package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
  119. package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +1 -2
  120. package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +3 -2
  121. package/corpus/core/docs/content/locales/ja-JP/client.mdx +19 -18
  122. package/corpus/core/docs/content/locales/ja-JP/components.mdx +1 -1
  123. package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
  124. package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
  125. package/corpus/core/docs/content/locales/ja-JP/doctor.mdx +10 -0
  126. package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
  127. package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
  128. package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +9 -6
  129. package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
  130. package/corpus/core/docs/content/locales/ja-JP/observability.mdx +1 -2
  131. package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
  132. package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
  133. package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +1 -2
  134. package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -2
  135. package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +2 -4
  136. package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
  137. package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -4
  138. package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
  139. package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +1 -2
  140. package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +3 -2
  141. package/corpus/core/docs/content/locales/ko-KR/client.mdx +19 -18
  142. package/corpus/core/docs/content/locales/ko-KR/components.mdx +1 -1
  143. package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
  144. package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
  145. package/corpus/core/docs/content/locales/ko-KR/doctor.mdx +10 -0
  146. package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
  147. package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
  148. package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +9 -6
  149. package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
  150. package/corpus/core/docs/content/locales/ko-KR/observability.mdx +1 -2
  151. package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
  152. package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
  153. package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +1 -2
  154. package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -2
  155. package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +2 -4
  156. package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
  157. package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -4
  158. package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
  159. package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +1 -2
  160. package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +3 -2
  161. package/corpus/core/docs/content/locales/pt-BR/client.mdx +19 -18
  162. package/corpus/core/docs/content/locales/pt-BR/components.mdx +1 -1
  163. package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
  164. package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
  165. package/corpus/core/docs/content/locales/pt-BR/doctor.mdx +10 -0
  166. package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
  167. package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
  168. package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +9 -6
  169. package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
  170. package/corpus/core/docs/content/locales/pt-BR/observability.mdx +1 -2
  171. package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
  172. package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
  173. package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +1 -2
  174. package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -2
  175. package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +2 -4
  176. package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
  177. package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -4
  178. package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
  179. package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +1 -2
  180. package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +3 -2
  181. package/corpus/core/docs/content/locales/zh-CN/client.mdx +19 -18
  182. package/corpus/core/docs/content/locales/zh-CN/components.mdx +1 -1
  183. package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
  184. package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
  185. package/corpus/core/docs/content/locales/zh-CN/doctor.mdx +10 -0
  186. package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
  187. package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
  188. package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +9 -6
  189. package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
  190. package/corpus/core/docs/content/locales/zh-CN/observability.mdx +1 -2
  191. package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
  192. package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
  193. package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +1 -2
  194. package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -2
  195. package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +2 -4
  196. package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
  197. package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -4
  198. package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
  199. package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +1 -2
  200. package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +3 -2
  201. package/corpus/core/docs/content/locales/zh-TW/client.mdx +19 -18
  202. package/corpus/core/docs/content/locales/zh-TW/components.mdx +1 -1
  203. package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
  204. package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
  205. package/corpus/core/docs/content/locales/zh-TW/doctor.mdx +10 -0
  206. package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
  207. package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
  208. package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +9 -6
  209. package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
  210. package/corpus/core/docs/content/locales/zh-TW/observability.mdx +1 -2
  211. package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
  212. package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
  213. package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +1 -2
  214. package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -2
  215. package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +2 -4
  216. package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
  217. package/corpus/core/docs/content/observability.mdx +1 -2
  218. package/corpus/core/docs/content/package-lifecycle.mdx +29 -0
  219. package/corpus/core/docs/content/real-time-collaboration.mdx +8 -7
  220. package/corpus/core/docs/content/sharing.mdx +1 -2
  221. package/corpus/core/docs/content/template-chat.mdx +1 -2
  222. package/corpus/core/docs/content/toolkit-agent-ux.mdx +3 -2
  223. package/corpus/core/docs/content/toolkit-observability.mdx +1 -2
  224. package/corpus/core/docs/content/toolkit-settings.mdx +2 -2
  225. package/corpus/core/docs/content/toolkit-sharing.mdx +5 -2
  226. package/corpus/core/docs/content/tracking.mdx +2 -4
  227. package/corpus/core/docs/content/what-is-agent-native.mdx +1 -2
  228. package/corpus/core/export-snapshot.json +324 -0
  229. package/corpus/core/migration-manifest.json +1353 -0
  230. package/corpus/core/package.json +21 -3
  231. package/corpus/core/src/cli/doctor.ts +77 -7
  232. package/corpus/core/src/cli/migration-codemod.ts +569 -0
  233. package/corpus/core/src/cli/upgrade.ts +63 -7
  234. package/corpus/core/src/client/agent-chat/index.ts +279 -0
  235. package/corpus/core/src/client/agent-page/AgentContextTab.tsx +3 -1
  236. package/corpus/core/src/client/analytics/index.ts +40 -0
  237. package/corpus/core/src/client/api-path.ts +2 -2
  238. package/corpus/core/src/client/automation/index.ts +4 -0
  239. package/corpus/core/src/client/changelog/index.ts +1 -0
  240. package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +5 -84
  241. package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +52 -14
  242. package/corpus/core/src/client/chat/widgets/inline-extension-result.ts +86 -0
  243. package/corpus/core/src/client/client-bootstrap.ts +7 -0
  244. package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +1 -1
  245. package/corpus/core/src/client/hooks/index.ts +46 -0
  246. package/corpus/core/src/client/host/index.ts +170 -0
  247. package/corpus/core/src/client/index.ts +20 -664
  248. package/corpus/core/src/client/navigation/index.ts +54 -0
  249. package/corpus/core/src/client/resources/ResourcesPanel.tsx +1 -1
  250. package/corpus/core/src/client/resources/index.ts +2 -1
  251. package/corpus/core/src/client/resources/use-resources.ts +0 -20
  252. package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
  253. package/corpus/core/src/client/ui/index.ts +55 -0
  254. package/corpus/core/src/client/uploads/index.ts +1 -0
  255. package/corpus/core/src/client/uploads/use-upload-resource.ts +24 -0
  256. package/corpus/core/src/client/widgets/index.ts +41 -0
  257. package/corpus/core/src/localization/default-messages.ts +2 -1
  258. package/corpus/core/src/package-lifecycle/deprecated-imports.ts +179 -0
  259. package/corpus/core/src/package-lifecycle/index.ts +5 -0
  260. package/corpus/core/src/package-lifecycle/migration-manifest.ts +159 -0
  261. package/corpus/core/src/package-lifecycle/migration-message.ts +6 -0
  262. package/corpus/core/src/package-lifecycle/tombstone.ts +44 -0
  263. package/corpus/core/src/package-lifecycle/upgrade-error.ts +19 -0
  264. package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
  265. package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
  266. package/corpus/core/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  267. package/corpus/core/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  268. package/corpus/core/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
  269. package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
  270. package/corpus/core/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
  271. package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  272. package/corpus/core/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
  273. package/corpus/core/src/templates/default/app/i18n/index.ts +1 -1
  274. package/corpus/core/src/templates/default/app/lib/utils.ts +1 -1
  275. package/corpus/core/src/templates/default/app/root.tsx +8 -6
  276. package/corpus/core/src/templates/default/app/routes/_index.tsx +2 -1
  277. package/corpus/core/src/templates/default/app/routes/agent.tsx +2 -1
  278. package/corpus/core/src/templates/default/app/routes/settings.tsx +2 -3
  279. package/corpus/core/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  280. package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  281. package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
  282. package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
  283. package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
  284. package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
  285. package/corpus/core/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
  286. package/corpus/core/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
  287. package/corpus/core/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  288. package/corpus/core/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  289. package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
  290. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
  291. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
  292. package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
  293. package/corpus/core/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
  294. package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  295. package/corpus/core/src/vite/action-types-plugin.ts +4 -0
  296. package/corpus/core/src/vite/client.ts +80 -65
  297. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +3 -3
  298. package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  299. package/corpus/templates/analytics/.agents/skills/feature-flags/SKILL.md +1 -1
  300. package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +4 -4
  301. package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +1 -1
  302. package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  303. package/corpus/templates/analytics/app/components/Markdown.tsx +1 -1
  304. package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +2 -1
  305. package/corpus/templates/analytics/app/components/agents/FeatureFlagsFleetPanel.tsx +6 -4
  306. package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +1 -1
  307. package/corpus/templates/analytics/app/components/auth/AuthProvider.tsx +2 -2
  308. package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
  309. package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -1
  310. package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
  311. package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
  312. package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
  313. package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
  314. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
  315. package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
  316. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +4 -6
  317. package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +1 -1
  318. package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -2
  319. package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -1
  320. package/corpus/templates/analytics/app/components/layout/Layout.tsx +3 -3
  321. package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
  322. package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +4 -6
  323. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -5
  324. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +10 -10
  325. package/corpus/templates/analytics/app/entry.client.tsx +2 -4
  326. package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +4 -1
  327. package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +6 -4
  328. package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +4 -1
  329. package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +1 -1
  330. package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -4
  331. package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +1 -1
  332. package/corpus/templates/analytics/app/hooks/use-user-pref.ts +1 -1
  333. package/corpus/templates/analytics/app/i18n/index.ts +1 -1
  334. package/corpus/templates/analytics/app/i18n-data.ts +1 -1
  335. package/corpus/templates/analytics/app/lib/api-hooks.ts +1 -1
  336. package/corpus/templates/analytics/app/lib/item-popularity.ts +1 -1
  337. package/corpus/templates/analytics/app/lib/query-metrics.ts +1 -1
  338. package/corpus/templates/analytics/app/lib/sql-query.ts +1 -1
  339. package/corpus/templates/analytics/app/lib/tab-id.ts +1 -1
  340. package/corpus/templates/analytics/app/lib/track-metric.ts +1 -1
  341. package/corpus/templates/analytics/app/lib/user-info.ts +1 -1
  342. package/corpus/templates/analytics/app/lib/utils.ts +1 -1
  343. package/corpus/templates/analytics/app/pages/Agents.tsx +5 -6
  344. package/corpus/templates/analytics/app/pages/Ask.tsx +2 -2
  345. package/corpus/templates/analytics/app/pages/DataDictionary.tsx +3 -3
  346. package/corpus/templates/analytics/app/pages/DataSources.tsx +7 -5
  347. package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -1
  348. package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -1
  349. package/corpus/templates/analytics/app/pages/Settings.tsx +5 -6
  350. package/corpus/templates/analytics/app/pages/adhoc/BlankDashboard.tsx +1 -1
  351. package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
  352. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +1 -1
  353. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -1
  354. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +1 -1
  355. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +1 -1
  356. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -1
  357. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +1 -1
  358. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +1 -1
  359. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
  360. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
  361. package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +2 -1
  362. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +2 -1
  363. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +8 -6
  364. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +1 -1
  365. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
  366. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +4 -6
  367. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
  368. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +2 -1
  369. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +1 -1
  370. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +9 -7
  371. package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +3 -6
  372. package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +4 -4
  373. package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +2 -1
  374. package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +1 -11
  375. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +2 -1
  376. package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +1 -14
  377. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +1 -1
  378. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +1 -1
  379. package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +1 -6
  380. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +1 -8
  381. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +4 -10
  382. package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +1 -6
  383. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +4 -8
  384. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +4 -10
  385. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +1 -6
  386. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +5 -6
  387. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +1 -1
  388. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +5 -5
  389. package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +2 -2
  390. package/corpus/templates/analytics/app/pages/settings/settings-search.ts +1 -1
  391. package/corpus/templates/analytics/app/root.tsx +6 -6
  392. package/corpus/templates/analytics/app/routes/agent.tsx +1 -1
  393. package/corpus/templates/analytics/app/routes/catalog.tsx +2 -2
  394. package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
  395. package/corpus/templates/analytics/app/routes/status.$slug.tsx +1 -13
  396. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +3 -3
  397. package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  398. package/corpus/templates/assets/.agents/skills/feature-flags/SKILL.md +1 -1
  399. package/corpus/templates/assets/.agents/skills/real-time-collab/SKILL.md +4 -4
  400. package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +4 -4
  401. package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +1 -1
  402. package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  403. package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -1
  404. package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +3 -3
  405. package/corpus/templates/assets/app/components/layout/Header.tsx +3 -5
  406. package/corpus/templates/assets/app/components/layout/Layout.tsx +4 -4
  407. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +6 -6
  408. package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +2 -2
  409. package/corpus/templates/assets/app/components/library/GenerationPresetsPanel.tsx +2 -1
  410. package/corpus/templates/assets/app/components/library/LibraryCard.tsx +1 -1
  411. package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
  412. package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +2 -2
  413. package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -3
  414. package/corpus/templates/assets/app/i18n/index.ts +1 -1
  415. package/corpus/templates/assets/app/i18n-data.ts +1 -1
  416. package/corpus/templates/assets/app/lib/asset-urls.ts +1 -1
  417. package/corpus/templates/assets/app/lib/utils.ts +1 -1
  418. package/corpus/templates/assets/app/root.tsx +10 -9
  419. package/corpus/templates/assets/app/routes/_index.tsx +3 -3
  420. package/corpus/templates/assets/app/routes/agent.tsx +1 -1
  421. package/corpus/templates/assets/app/routes/asset.$id.tsx +3 -3
  422. package/corpus/templates/assets/app/routes/asset.$id_.embed.tsx +1 -1
  423. package/corpus/templates/assets/app/routes/audit.tsx +2 -2
  424. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +6 -4
  425. package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +4 -4
  426. package/corpus/templates/assets/app/routes/brand-kits.$id_.settings.tsx +3 -3
  427. package/corpus/templates/assets/app/routes/library.tsx +13 -9
  428. package/corpus/templates/assets/app/routes/run.$id_.embed.tsx +1 -1
  429. package/corpus/templates/assets/app/routes/settings.tsx +11 -12
  430. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +3 -3
  431. package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +1 -1
  432. package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  433. package/corpus/templates/brain/.agents/skills/feature-flags/SKILL.md +1 -1
  434. package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +4 -4
  435. package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  436. package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +1 -1
  437. package/corpus/templates/brain/app/components/layout/Layout.tsx +2 -2
  438. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
  439. package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +3 -6
  440. package/corpus/templates/brain/app/hooks/use-navigation-state.ts +3 -4
  441. package/corpus/templates/brain/app/i18n/index.ts +1 -1
  442. package/corpus/templates/brain/app/i18n-data.ts +1 -1
  443. package/corpus/templates/brain/app/lib/utils.ts +1 -1
  444. package/corpus/templates/brain/app/root.tsx +10 -9
  445. package/corpus/templates/brain/app/routes/_index.tsx +2 -2
  446. package/corpus/templates/brain/app/routes/agent.tsx +1 -1
  447. package/corpus/templates/brain/app/routes/knowledge.tsx +2 -2
  448. package/corpus/templates/brain/app/routes/ops.tsx +2 -2
  449. package/corpus/templates/brain/app/routes/review.tsx +2 -2
  450. package/corpus/templates/brain/app/routes/search.tsx +2 -1
  451. package/corpus/templates/brain/app/routes/settings.tsx +8 -7
  452. package/corpus/templates/brain/app/routes/sources.tsx +2 -2
  453. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +3 -3
  454. package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  455. package/corpus/templates/calendar/.agents/skills/feature-flags/SKILL.md +1 -1
  456. package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +4 -4
  457. package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +1 -1
  458. package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  459. package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +1 -1
  460. package/corpus/templates/calendar/app/components/ThemeToggle.tsx +1 -1
  461. package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +1 -1
  462. package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -1
  463. package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +2 -1
  464. package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +1 -1
  465. package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +2 -1
  466. package/corpus/templates/calendar/app/components/calendar/ApolloPanel.tsx +2 -1
  467. package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +1 -1
  468. package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +2 -1
  469. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +3 -5
  470. package/corpus/templates/calendar/app/components/calendar/DayView.tsx +1 -1
  471. package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +1 -1
  472. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +1 -1
  473. package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +1 -1
  474. package/corpus/templates/calendar/app/components/calendar/EventDescription.tsx +1 -1
  475. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +1 -1
  476. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +2 -1
  477. package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +1 -1
  478. package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +2 -1
  479. package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +2 -1
  480. package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +3 -3
  481. package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -5
  482. package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
  483. package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +1 -1
  484. package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +2 -1
  485. package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +1 -1
  486. package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +2 -1
  487. package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +1 -1
  488. package/corpus/templates/calendar/app/components/calendar/WorkingLocationEditor.tsx +1 -1
  489. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -3
  490. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +4 -6
  491. package/corpus/templates/calendar/app/hooks/use-apollo.ts +1 -1
  492. package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +4 -1
  493. package/corpus/templates/calendar/app/hooks/use-availability.ts +4 -1
  494. package/corpus/templates/calendar/app/hooks/use-booking-links.ts +4 -1
  495. package/corpus/templates/calendar/app/hooks/use-bookings.ts +1 -1
  496. package/corpus/templates/calendar/app/hooks/use-db-status.ts +1 -1
  497. package/corpus/templates/calendar/app/hooks/use-events.ts +1 -1
  498. package/corpus/templates/calendar/app/hooks/use-external-calendars.ts +1 -1
  499. package/corpus/templates/calendar/app/hooks/use-google-auth.ts +2 -2
  500. package/corpus/templates/calendar/app/hooks/use-integrations.ts +1 -1
  501. package/corpus/templates/calendar/app/hooks/use-navigation-state.ts +3 -2
  502. package/corpus/templates/calendar/app/hooks/use-overlay-people.ts +1 -1
  503. package/corpus/templates/calendar/app/hooks/use-people.ts +1 -1
  504. package/corpus/templates/calendar/app/hooks/use-settings.ts +4 -1
  505. package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +2 -1
  506. package/corpus/templates/calendar/app/hooks/use-zoom-auth.ts +2 -1
  507. package/corpus/templates/calendar/app/i18n/index.ts +1 -1
  508. package/corpus/templates/calendar/app/i18n-data.ts +1 -1
  509. package/corpus/templates/calendar/app/lib/api-path.ts +1 -1
  510. package/corpus/templates/calendar/app/lib/utils.ts +1 -1
  511. package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +1 -1
  512. package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +3 -1
  513. package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -3
  514. package/corpus/templates/calendar/app/pages/BookingsList.tsx +1 -1
  515. package/corpus/templates/calendar/app/pages/CalendarView.tsx +3 -5
  516. package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +1 -1
  517. package/corpus/templates/calendar/app/pages/NotFound.tsx +1 -1
  518. package/corpus/templates/calendar/app/pages/Settings.tsx +9 -8
  519. package/corpus/templates/calendar/app/root.tsx +15 -9
  520. package/corpus/templates/calendar/app/routes/_app.agent.tsx +2 -1
  521. package/corpus/templates/calendar/app/routes/_app.settings.tsx +1 -1
  522. package/corpus/templates/calendar/app/routes/event.tsx +3 -3
  523. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +3 -3
  524. package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
  525. package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  526. package/corpus/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  527. package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
  528. package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  529. package/corpus/templates/chat/app/components/layout/Header.tsx +2 -1
  530. package/corpus/templates/chat/app/components/layout/Layout.tsx +2 -2
  531. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +4 -4
  532. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -4
  533. package/corpus/templates/chat/app/i18n/index.ts +1 -1
  534. package/corpus/templates/chat/app/i18n-data.ts +1 -1
  535. package/corpus/templates/chat/app/lib/utils.ts +1 -1
  536. package/corpus/templates/chat/app/root.tsx +10 -9
  537. package/corpus/templates/chat/app/routes/_index.tsx +2 -2
  538. package/corpus/templates/chat/app/routes/agent.tsx +10 -3
  539. package/corpus/templates/chat/app/routes/database.tsx +1 -1
  540. package/corpus/templates/chat/app/routes/observability.tsx +2 -1
  541. package/corpus/templates/chat/app/routes/settings.tsx +4 -5
  542. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +3 -3
  543. package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  544. package/corpus/templates/clips/.agents/skills/feature-flags/SKILL.md +1 -1
  545. package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  546. package/corpus/templates/clips/app/components/capture-install-options.tsx +2 -1
  547. package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +2 -2
  548. package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -1
  549. package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +2 -1
  550. package/corpus/templates/clips/app/components/editor/editor-layout.tsx +4 -14
  551. package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +2 -1
  552. package/corpus/templates/clips/app/components/editor/split-button.tsx +2 -1
  553. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +3 -3
  554. package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +2 -1
  555. package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +1 -1
  556. package/corpus/templates/clips/app/components/layout/Header.tsx +2 -1
  557. package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +1 -1
  558. package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +1 -1
  559. package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +1 -1
  560. package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -1
  561. package/corpus/templates/clips/app/components/library/folder-tree.tsx +1 -1
  562. package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -2
  563. package/corpus/templates/clips/app/components/library/library-layout.tsx +6 -6
  564. package/corpus/templates/clips/app/components/library/organization-switcher.tsx +1 -1
  565. package/corpus/templates/clips/app/components/library/recording-card.tsx +1 -1
  566. package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
  567. package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -17
  568. package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +1 -1
  569. package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -1
  570. package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -20
  571. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +3 -1
  572. package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +1 -1
  573. package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +1 -1
  574. package/corpus/templates/clips/app/components/player/captions-overlay.tsx +1 -1
  575. package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -1
  576. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +2 -1
  577. package/corpus/templates/clips/app/components/player/insights-panel.tsx +2 -1
  578. package/corpus/templates/clips/app/components/player/player-controls.tsx +1 -1
  579. package/corpus/templates/clips/app/components/player/settings-panel.tsx +2 -2
  580. package/corpus/templates/clips/app/components/player/share-dialog.tsx +3 -3
  581. package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +1 -1
  582. package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -1
  583. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -6
  584. package/corpus/templates/clips/app/components/player/video-player.tsx +3 -5
  585. package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
  586. package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +1 -1
  587. package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
  588. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -1
  589. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -13
  590. package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +1 -1
  591. package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +3 -6
  592. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
  593. package/corpus/templates/clips/app/components/sharing/viewed-by-popover.tsx +2 -1
  594. package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +3 -5
  595. package/corpus/templates/clips/app/components/workspace/engagement-chart.tsx +1 -1
  596. package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +3 -1
  597. package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -1
  598. package/corpus/templates/clips/app/components/workspace/members-list.tsx +2 -1
  599. package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -1
  600. package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +1 -1
  601. package/corpus/templates/clips/app/entry.client.tsx +2 -4
  602. package/corpus/templates/clips/app/hooks/use-auto-title.ts +3 -17
  603. package/corpus/templates/clips/app/hooks/use-library.ts +4 -1
  604. package/corpus/templates/clips/app/hooks/use-navigation-state.ts +2 -1
  605. package/corpus/templates/clips/app/hooks/use-video-storage-status.ts +1 -1
  606. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +1 -1
  607. package/corpus/templates/clips/app/i18n/index.ts +5 -5
  608. package/corpus/templates/clips/app/lib/camera-blur.ts +1 -1
  609. package/corpus/templates/clips/app/lib/capture-install-options.ts +1 -1
  610. package/corpus/templates/clips/app/lib/thumbnail-capture.ts +1 -1
  611. package/corpus/templates/clips/app/lib/utils.ts +1 -1
  612. package/corpus/templates/clips/app/root.tsx +13 -9
  613. package/corpus/templates/clips/app/routes/_app.agent.tsx +2 -1
  614. package/corpus/templates/clips/app/routes/_app.archive.tsx +1 -1
  615. package/corpus/templates/clips/app/routes/_app.dictate.tsx +2 -2
  616. package/corpus/templates/clips/app/routes/_app.extensions.$id.tsx +1 -1
  617. package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
  618. package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
  619. package/corpus/templates/clips/app/routes/_app.library.folder.$folderId.tsx +1 -1
  620. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +2 -2
  621. package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -5
  622. package/corpus/templates/clips/app/routes/_app.notifications.tsx +2 -2
  623. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +7 -7
  624. package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +2 -1
  625. package/corpus/templates/clips/app/routes/_app.shared.tsx +1 -1
  626. package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.folder.$folderId.tsx +1 -1
  627. package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.tsx +1 -1
  628. package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
  629. package/corpus/templates/clips/app/routes/_app.trash.tsx +2 -1
  630. package/corpus/templates/clips/app/routes/_index.tsx +1 -1
  631. package/corpus/templates/clips/app/routes/bug-report.done.tsx +2 -1
  632. package/corpus/templates/clips/app/routes/bug-report.tsx +2 -1
  633. package/corpus/templates/clips/app/routes/download.tsx +2 -1
  634. package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -1
  635. package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -1
  636. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +4 -5
  637. package/corpus/templates/clips/app/routes/record.tsx +4 -4
  638. package/corpus/templates/clips/app/routes/share.$shareId.tsx +5 -6
  639. package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +3 -1
  640. package/corpus/templates/content/.agents/skills/actions/SKILL.md +3 -3
  641. package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  642. package/corpus/templates/content/.agents/skills/feature-flags/SKILL.md +1 -1
  643. package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +4 -4
  644. package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +1 -1
  645. package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  646. package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +1 -1
  647. package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +1 -1
  648. package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
  649. package/corpus/templates/content/app/components/QueryErrorState.tsx +1 -1
  650. package/corpus/templates/content/app/components/ThemeToggle.tsx +1 -1
  651. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -1
  652. package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +3 -1
  653. package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
  654. package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +1 -1
  655. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +7 -5
  656. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +3 -6
  657. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +7 -9
  658. package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +1 -1
  659. package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
  660. package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
  661. package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +1 -1
  662. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +2 -1
  663. package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +1 -1
  664. package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +2 -1
  665. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +6 -4
  666. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -6
  667. package/corpus/templates/content/app/components/editor/database/FormView.tsx +1 -1
  668. package/corpus/templates/content/app/components/editor/database/settings.tsx +2 -2
  669. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +1 -1
  670. package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +2 -1
  671. package/corpus/templates/content/app/components/editor/extensions/CodeBlockNode.tsx +1 -1
  672. package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -1
  673. package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +1 -1
  674. package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +2 -1
  675. package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +1 -1
  676. package/corpus/templates/content/app/components/editor/image-upload.ts +1 -1
  677. package/corpus/templates/content/app/components/editor/registrySlashItems.ts +1 -1
  678. package/corpus/templates/content/app/components/layout/Header.tsx +1 -1
  679. package/corpus/templates/content/app/components/layout/Layout.tsx +3 -1
  680. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +9 -9
  681. package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +1 -1
  682. package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +5 -1
  683. package/corpus/templates/content/app/entry.client.tsx +2 -4
  684. package/corpus/templates/content/app/hooks/use-comments.ts +4 -1
  685. package/corpus/templates/content/app/hooks/use-content-database.ts +4 -1
  686. package/corpus/templates/content/app/hooks/use-content-spaces.ts +4 -1
  687. package/corpus/templates/content/app/hooks/use-db-sync.ts +1 -1
  688. package/corpus/templates/content/app/hooks/use-document-properties.ts +4 -1
  689. package/corpus/templates/content/app/hooks/use-document-versions.ts +4 -1
  690. package/corpus/templates/content/app/hooks/use-documents.ts +4 -1
  691. package/corpus/templates/content/app/hooks/use-mention-members.ts +1 -1
  692. package/corpus/templates/content/app/hooks/use-navigation-state.ts +2 -1
  693. package/corpus/templates/content/app/hooks/use-notion.ts +2 -2
  694. package/corpus/templates/content/app/i18n/index.ts +1 -1
  695. package/corpus/templates/content/app/i18n-data.ts +1 -1
  696. package/corpus/templates/content/app/lib/local-control-resources.ts +1 -1
  697. package/corpus/templates/content/app/lib/utils.ts +1 -1
  698. package/corpus/templates/content/app/root.tsx +15 -9
  699. package/corpus/templates/content/app/routes/_app.agent.tsx +2 -1
  700. package/corpus/templates/content/app/routes/_app.local-files.tsx +2 -1
  701. package/corpus/templates/content/app/routes/_app.page.$id.tsx +1 -1
  702. package/corpus/templates/content/app/routes/_app.settings.tsx +4 -5
  703. package/corpus/templates/content/app/routes/p.$id.tsx +2 -1
  704. package/corpus/templates/design/.agents/skills/actions/SKILL.md +3 -3
  705. package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  706. package/corpus/templates/design/.agents/skills/feature-flags/SKILL.md +1 -1
  707. package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  708. package/corpus/templates/design/app/components/QueryErrorState.tsx +1 -1
  709. package/corpus/templates/design/app/components/ThemeToggle.tsx +1 -1
  710. package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +1 -1
  711. package/corpus/templates/design/app/components/design/BreakpointBar.tsx +1 -30
  712. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +4 -3
  713. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +4 -4
  714. package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +2 -5
  715. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
  716. package/corpus/templates/design/app/components/design/EditPanel.tsx +2 -2
  717. package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +4 -1
  718. package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +1 -1
  719. package/corpus/templates/design/app/components/design/LayersPanel.tsx +1 -1
  720. package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +1 -1
  721. package/corpus/templates/design/app/components/design/MotionDock.tsx +1 -19
  722. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2 -2
  723. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +2 -2
  724. package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +1 -1
  725. package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +2 -2
  726. package/corpus/templates/design/app/components/design/ReviewPanel.tsx +1 -22
  727. package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +2 -2
  728. package/corpus/templates/design/app/components/design/StatesPanel.tsx +4 -14
  729. package/corpus/templates/design/app/components/design/TokensPanel.tsx +2 -17
  730. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
  731. package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -1
  732. package/corpus/templates/design/app/components/design/code-workbench/editor/BufferSync.tsx +1 -1
  733. package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -1
  734. package/corpus/templates/design/app/components/design/code-workbench/workspace/inline-provider.ts +1 -1
  735. package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +1 -1
  736. package/corpus/templates/design/app/components/design/design-canvas/annotation-snapshot.ts +1 -1
  737. package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
  738. package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +2 -2
  739. package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +1 -1
  740. package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +1 -1
  741. package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +1 -1
  742. package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -1
  743. package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +1 -1
  744. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -1
  745. package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +1 -1
  746. package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +1 -1
  747. package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +1 -16
  748. package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +2 -34
  749. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +2 -1
  750. package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +1 -25
  751. package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +1 -30
  752. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +1 -1
  753. package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +1 -1
  754. package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +1 -1
  755. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
  756. package/corpus/templates/design/app/components/layout/Header.tsx +4 -4
  757. package/corpus/templates/design/app/components/layout/Layout.tsx +4 -5
  758. package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -6
  759. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +1 -1
  760. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
  761. package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +2 -2
  762. package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +3 -4
  763. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
  764. package/corpus/templates/design/app/hooks/use-agent-generating.ts +1 -1
  765. package/corpus/templates/design/app/hooks/use-design-system.ts +1 -1
  766. package/corpus/templates/design/app/hooks/use-design-systems.ts +1 -1
  767. package/corpus/templates/design/app/hooks/use-navigation-state.ts +2 -2
  768. package/corpus/templates/design/app/hooks/use-question-flow.ts +1 -1
  769. package/corpus/templates/design/app/i18n/index.ts +1 -1
  770. package/corpus/templates/design/app/i18n-data.ts +1 -1
  771. package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +1 -1
  772. package/corpus/templates/design/app/lib/agent-chat.ts +1 -1
  773. package/corpus/templates/design/app/lib/design-save-outbox.ts +1 -1
  774. package/corpus/templates/design/app/lib/desktop-design-preview.ts +1 -1
  775. package/corpus/templates/design/app/lib/figma-connection.ts +2 -1
  776. package/corpus/templates/design/app/lib/figma-svg-copy.ts +1 -1
  777. package/corpus/templates/design/app/lib/pending-generation.ts +1 -1
  778. package/corpus/templates/design/app/lib/utils.ts +1 -1
  779. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +4 -6
  780. package/corpus/templates/design/app/pages/DesignSystems.tsx +4 -4
  781. package/corpus/templates/design/app/pages/Index.tsx +5 -5
  782. package/corpus/templates/design/app/pages/NotFound.tsx +3 -5
  783. package/corpus/templates/design/app/pages/Present.tsx +7 -6
  784. package/corpus/templates/design/app/pages/Templates.tsx +4 -4
  785. package/corpus/templates/design/app/pages/VisualEdit.tsx +3 -1
  786. package/corpus/templates/design/app/pages/design-editor/editor-session.ts +1 -1
  787. package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +1 -1
  788. package/corpus/templates/design/app/root.tsx +10 -9
  789. package/corpus/templates/design/app/routes/agent.tsx +2 -1
  790. package/corpus/templates/design/app/routes/observability.tsx +1 -1
  791. package/corpus/templates/design/app/routes/settings.tsx +4 -5
  792. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +3 -3
  793. package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  794. package/corpus/templates/dispatch/.agents/skills/feature-flags/SKILL.md +1 -1
  795. package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  796. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +3 -4
  797. package/corpus/templates/dispatch/app/i18n/index.ts +1 -1
  798. package/corpus/templates/dispatch/app/i18n-data.ts +1 -1
  799. package/corpus/templates/dispatch/app/root.tsx +10 -9
  800. package/corpus/templates/dispatch/app/routes/agent.tsx +2 -1
  801. package/corpus/templates/dispatch/app/routes/integrations.tsx +3 -3
  802. package/corpus/templates/dispatch/app/routes/settings.tsx +4 -5
  803. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +3 -3
  804. package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  805. package/corpus/templates/forms/.agents/skills/feature-flags/SKILL.md +1 -1
  806. package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +4 -4
  807. package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +1 -1
  808. package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  809. package/corpus/templates/forms/app/components/CloudUpgrade.tsx +1 -1
  810. package/corpus/templates/forms/app/components/ThemeToggle.tsx +1 -1
  811. package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +1 -1
  812. package/corpus/templates/forms/app/components/layout/Header.tsx +2 -1
  813. package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -2
  814. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +5 -5
  815. package/corpus/templates/forms/app/hooks/use-db-status.ts +1 -1
  816. package/corpus/templates/forms/app/hooks/use-forms.ts +2 -2
  817. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +3 -3
  818. package/corpus/templates/forms/app/hooks/use-responses.ts +1 -1
  819. package/corpus/templates/forms/app/i18n/index.ts +1 -1
  820. package/corpus/templates/forms/app/lib/utils.ts +1 -1
  821. package/corpus/templates/forms/app/pages/AskPage.tsx +2 -2
  822. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +5 -6
  823. package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -1
  824. package/corpus/templates/forms/app/pages/FormsListPage.tsx +3 -6
  825. package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +1 -1
  826. package/corpus/templates/forms/app/pages/ResponsesPage.tsx +1 -1
  827. package/corpus/templates/forms/app/root.tsx +15 -12
  828. package/corpus/templates/forms/app/routes/_app.agent.tsx +2 -1
  829. package/corpus/templates/forms/app/routes/_app.settings.tsx +4 -5
  830. package/corpus/templates/forms/app/routes/_index.tsx +1 -1
  831. package/corpus/templates/forms/app/routes/form-preview.tsx +5 -1
  832. package/corpus/templates/macros/.agents/skills/feature-flags/SKILL.md +1 -1
  833. package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  834. package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +2 -1
  835. package/corpus/templates/macros/app/components/AddMealDialog.tsx +2 -1
  836. package/corpus/templates/macros/app/components/AddWeightDialog.tsx +2 -1
  837. package/corpus/templates/macros/app/components/DailyProgress.tsx +2 -1
  838. package/corpus/templates/macros/app/components/ExerciseCard.tsx +1 -1
  839. package/corpus/templates/macros/app/components/MealCard.tsx +1 -1
  840. package/corpus/templates/macros/app/components/QueryErrorState.tsx +1 -1
  841. package/corpus/templates/macros/app/components/VoiceDictation.tsx +2 -1
  842. package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
  843. package/corpus/templates/macros/app/components/WeightCard.tsx +1 -1
  844. package/corpus/templates/macros/app/components/WeightTracker.tsx +2 -2
  845. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -8
  846. package/corpus/templates/macros/app/components/layout/Header.tsx +2 -1
  847. package/corpus/templates/macros/app/i18n/index.ts +1 -1
  848. package/corpus/templates/macros/app/lib/api.ts +1 -1
  849. package/corpus/templates/macros/app/lib/utils.ts +1 -1
  850. package/corpus/templates/macros/app/root.tsx +10 -9
  851. package/corpus/templates/macros/app/routes/_index.tsx +2 -2
  852. package/corpus/templates/macros/app/routes/agent.tsx +2 -1
  853. package/corpus/templates/macros/app/routes/analytics.tsx +2 -1
  854. package/corpus/templates/macros/app/routes/settings.tsx +4 -5
  855. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +3 -3
  856. package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  857. package/corpus/templates/mail/.agents/skills/feature-flags/SKILL.md +1 -1
  858. package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +4 -4
  859. package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +1 -1
  860. package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  861. package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +3 -3
  862. package/corpus/templates/mail/app/components/ThemeToggle.tsx +1 -1
  863. package/corpus/templates/mail/app/components/agent-engine-picker.tsx +2 -1
  864. package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +1 -1
  865. package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +1 -1
  866. package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +1 -1
  867. package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +1 -1
  868. package/corpus/templates/mail/app/components/email/ComposeModal.tsx +2 -1
  869. package/corpus/templates/mail/app/components/email/ComposeSlashMenu.tsx +1 -1
  870. package/corpus/templates/mail/app/components/email/EmailList.tsx +1 -1
  871. package/corpus/templates/mail/app/components/email/EmailListItem.tsx +1 -1
  872. package/corpus/templates/mail/app/components/email/EmailThread.tsx +2 -1
  873. package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +2 -1
  874. package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +2 -1
  875. package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +1 -1
  876. package/corpus/templates/mail/app/components/email/RecipientInput.tsx +1 -1
  877. package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +1 -1
  878. package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
  879. package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +1 -1
  880. package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +1 -1
  881. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -6
  882. package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +2 -1
  883. package/corpus/templates/mail/app/components/layout/SearchBar.tsx +1 -1
  884. package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
  885. package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
  886. package/corpus/templates/mail/app/entry.client.tsx +1 -6
  887. package/corpus/templates/mail/app/hooks/use-aliases.ts +1 -1
  888. package/corpus/templates/mail/app/hooks/use-apollo.ts +1 -1
  889. package/corpus/templates/mail/app/hooks/use-automations.ts +1 -1
  890. package/corpus/templates/mail/app/hooks/use-compose-state.ts +2 -2
  891. package/corpus/templates/mail/app/hooks/use-draft-queue.ts +4 -1
  892. package/corpus/templates/mail/app/hooks/use-emails.ts +3 -1
  893. package/corpus/templates/mail/app/hooks/use-gmail-filters.ts +1 -1
  894. package/corpus/templates/mail/app/hooks/use-google-auth.ts +2 -1
  895. package/corpus/templates/mail/app/hooks/use-integrations.ts +2 -2
  896. package/corpus/templates/mail/app/hooks/use-navigation-state.ts +1 -1
  897. package/corpus/templates/mail/app/hooks/use-scheduled-jobs.ts +2 -2
  898. package/corpus/templates/mail/app/hooks/use-snippets.ts +1 -1
  899. package/corpus/templates/mail/app/i18n/index.ts +1 -1
  900. package/corpus/templates/mail/app/lib/agent-generate.ts +1 -1
  901. package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +1 -10
  902. package/corpus/templates/mail/app/lib/mcp-chat-bridge.ts +1 -1
  903. package/corpus/templates/mail/app/lib/thread-cache.ts +1 -1
  904. package/corpus/templates/mail/app/lib/upload.ts +1 -1
  905. package/corpus/templates/mail/app/lib/utils.ts +1 -1
  906. package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +1 -1
  907. package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
  908. package/corpus/templates/mail/app/pages/NotFound.tsx +1 -1
  909. package/corpus/templates/mail/app/pages/SettingsPage.tsx +9 -8
  910. package/corpus/templates/mail/app/root.tsx +11 -8
  911. package/corpus/templates/mail/app/routes/agent.tsx +2 -1
  912. package/corpus/templates/mail/app/routes/email.tsx +5 -1
  913. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +3 -3
  914. package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +1 -1
  915. package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  916. package/corpus/templates/plan/.agents/skills/feature-flags/SKILL.md +1 -1
  917. package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +4 -4
  918. package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  919. package/corpus/templates/plan/app/components/editor/PlanBlockNode.tsx +2 -2
  920. package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +3 -3
  921. package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +1 -1
  922. package/corpus/templates/plan/app/components/layout/Header.tsx +2 -1
  923. package/corpus/templates/plan/app/components/layout/Layout.tsx +2 -2
  924. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +8 -9
  925. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +1 -1
  926. package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +3 -5
  927. package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -1
  928. package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +2 -1
  929. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +7 -5
  930. package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +2 -1
  931. package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +1 -1
  932. package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +3 -3
  933. package/corpus/templates/plan/app/components/plan/PlanMarkdownReader.tsx +1 -1
  934. package/corpus/templates/plan/app/components/plan/PlanTableOfContents.tsx +1 -1
  935. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +1 -1
  936. package/corpus/templates/plan/app/components/plan/PrototypeViewer.tsx +1 -1
  937. package/corpus/templates/plan/app/components/plan/VisualAnswerInline.tsx +1 -1
  938. package/corpus/templates/plan/app/components/plan/planBlocks.tsx +3 -5
  939. package/corpus/templates/plan/app/components/plan/wireframe/LegacyRegionWireframe.tsx +1 -1
  940. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
  941. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -3
  942. package/corpus/templates/plan/app/hooks/use-plan-presence.ts +2 -2
  943. package/corpus/templates/plan/app/hooks/use-plans.ts +4 -1
  944. package/corpus/templates/plan/app/i18n/ar-SA.ts +4 -0
  945. package/corpus/templates/plan/app/i18n/de-DE.ts +4 -0
  946. package/corpus/templates/plan/app/i18n/en-US.ts +4 -0
  947. package/corpus/templates/plan/app/i18n/es-ES.ts +4 -0
  948. package/corpus/templates/plan/app/i18n/fr-FR.ts +4 -0
  949. package/corpus/templates/plan/app/i18n/hi-IN.ts +4 -0
  950. package/corpus/templates/plan/app/i18n/index.ts +1 -1
  951. package/corpus/templates/plan/app/i18n/ja-JP.ts +4 -0
  952. package/corpus/templates/plan/app/i18n/ko-KR.ts +4 -0
  953. package/corpus/templates/plan/app/i18n/pt-BR.ts +4 -0
  954. package/corpus/templates/plan/app/i18n/zh-CN.ts +4 -0
  955. package/corpus/templates/plan/app/i18n/zh-TW.ts +4 -0
  956. package/corpus/templates/plan/app/lib/local-codebase-context.ts +1 -1
  957. package/corpus/templates/plan/app/lib/local-control-resources.ts +1 -1
  958. package/corpus/templates/plan/app/lib/plan-comment-editor-helpers.ts +1 -1
  959. package/corpus/templates/plan/app/lib/plan-local-bridge.ts +1 -1
  960. package/corpus/templates/plan/app/lib/register-chat-renderers.tsx +1 -1
  961. package/corpus/templates/plan/app/lib/utils.ts +1 -1
  962. package/corpus/templates/plan/app/pages/PlanChatPage.tsx +2 -2
  963. package/corpus/templates/plan/app/pages/PlansPage.tsx +13 -14
  964. package/corpus/templates/plan/app/root.tsx +11 -10
  965. package/corpus/templates/plan/app/routes/agent.tsx +2 -1
  966. package/corpus/templates/plan/app/routes/settings.tsx +4 -5
  967. package/corpus/templates/plan/shared/plan-doc.ts +2 -47
  968. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +3 -3
  969. package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  970. package/corpus/templates/slides/.agents/skills/feature-flags/SKILL.md +1 -1
  971. package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  972. package/corpus/templates/slides/app/components/CloudUpgrade.tsx +1 -1
  973. package/corpus/templates/slides/app/components/ThemeToggle.tsx +1 -1
  974. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
  975. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -1
  976. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
  977. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -1
  978. package/corpus/templates/slides/app/components/design-system/DesignSystemPreview.tsx +1 -1
  979. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +5 -5
  980. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +1 -1
  981. package/corpus/templates/slides/app/components/editor/AssetLibraryPanel.tsx +2 -1
  982. package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +1 -1
  983. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
  984. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +6 -8
  985. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +2 -1
  986. package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -1
  987. package/corpus/templates/slides/app/components/editor/GeneratingOverlay.tsx +1 -1
  988. package/corpus/templates/slides/app/components/editor/GoogleDocImportHint.tsx +3 -5
  989. package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +1 -1
  990. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -1
  991. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
  992. package/corpus/templates/slides/app/components/editor/ImageOverlay.tsx +1 -1
  993. package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +2 -1
  994. package/corpus/templates/slides/app/components/editor/ImportButton.tsx +5 -1
  995. package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +2 -1
  996. package/corpus/templates/slides/app/components/editor/MermaidToExcalidrawPanel.tsx +1 -1
  997. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +3 -1
  998. package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +1 -1
  999. package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +2 -1
  1000. package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +1 -1
  1001. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +12 -8
  1002. package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +2 -1
  1003. package/corpus/templates/slides/app/components/editor/SlideSlashMenu.tsx +1 -1
  1004. package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +1 -1
  1005. package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +1 -1
  1006. package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +1 -1
  1007. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +2 -1
  1008. package/corpus/templates/slides/app/components/layout/Header.tsx +2 -1
  1009. package/corpus/templates/slides/app/components/layout/Layout.tsx +2 -1
  1010. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +4 -6
  1011. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +1 -1
  1012. package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +2 -1
  1013. package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +1 -1
  1014. package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
  1015. package/corpus/templates/slides/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
  1016. package/corpus/templates/slides/app/context/DeckContext.tsx +5 -3
  1017. package/corpus/templates/slides/app/entry.client.tsx +2 -4
  1018. package/corpus/templates/slides/app/hooks/use-agent-generating.ts +1 -1
  1019. package/corpus/templates/slides/app/hooks/use-db-status.ts +1 -1
  1020. package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +1 -1
  1021. package/corpus/templates/slides/app/hooks/use-deck-presence.ts +1 -1
  1022. package/corpus/templates/slides/app/hooks/use-deck-role.ts +1 -1
  1023. package/corpus/templates/slides/app/hooks/use-deck-versions.ts +4 -1
  1024. package/corpus/templates/slides/app/hooks/use-design-systems.ts +1 -1
  1025. package/corpus/templates/slides/app/hooks/use-navigation-state.ts +1 -1
  1026. package/corpus/templates/slides/app/hooks/use-slide-comments.ts +2 -2
  1027. package/corpus/templates/slides/app/i18n/index.ts +1 -1
  1028. package/corpus/templates/slides/app/lib/utils.ts +1 -1
  1029. package/corpus/templates/slides/app/pages/DeckEditor.tsx +5 -6
  1030. package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -1
  1031. package/corpus/templates/slides/app/pages/Index.tsx +4 -7
  1032. package/corpus/templates/slides/app/pages/NotFound.tsx +1 -1
  1033. package/corpus/templates/slides/app/pages/Presentation.tsx +1 -1
  1034. package/corpus/templates/slides/app/pages/SharedPresentation.tsx +2 -1
  1035. package/corpus/templates/slides/app/root.tsx +13 -11
  1036. package/corpus/templates/slides/app/routes/agent.tsx +2 -1
  1037. package/corpus/templates/slides/app/routes/settings.tsx +4 -5
  1038. package/corpus/templates/slides/app/routes/slide.tsx +3 -3
  1039. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +3 -3
  1040. package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1041. package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1042. package/corpus/templates/tasks/.agents/skills/feature-flags/SKILL.md +1 -1
  1043. package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +4 -4
  1044. package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1045. package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +1 -1
  1046. package/corpus/templates/tasks/app/components/layout/Header.tsx +1 -1
  1047. package/corpus/templates/tasks/app/components/layout/Layout.tsx +4 -1
  1048. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +2 -1
  1049. package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +1 -1
  1050. package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +1 -1
  1051. package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +4 -1
  1052. package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +4 -1
  1053. package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +2 -1
  1054. package/corpus/templates/tasks/app/hooks/use-tasks.ts +4 -1
  1055. package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +4 -1
  1056. package/corpus/templates/tasks/app/lib/utils.ts +1 -1
  1057. package/corpus/templates/tasks/app/root.tsx +9 -7
  1058. package/dist/cli/doctor.d.ts +4 -1
  1059. package/dist/cli/doctor.d.ts.map +1 -1
  1060. package/dist/cli/doctor.js +57 -5
  1061. package/dist/cli/doctor.js.map +1 -1
  1062. package/dist/cli/migration-codemod.d.ts +21 -0
  1063. package/dist/cli/migration-codemod.d.ts.map +1 -0
  1064. package/dist/cli/migration-codemod.js +363 -0
  1065. package/dist/cli/migration-codemod.js.map +1 -0
  1066. package/dist/cli/upgrade.d.ts +7 -0
  1067. package/dist/cli/upgrade.d.ts.map +1 -1
  1068. package/dist/cli/upgrade.js +52 -7
  1069. package/dist/cli/upgrade.js.map +1 -1
  1070. package/dist/client/agent-chat/index.d.ts +40 -0
  1071. package/dist/client/agent-chat/index.d.ts.map +1 -0
  1072. package/dist/client/agent-chat/index.js +39 -0
  1073. package/dist/client/agent-chat/index.js.map +1 -0
  1074. package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -1
  1075. package/dist/client/agent-page/AgentContextTab.js +3 -1
  1076. package/dist/client/agent-page/AgentContextTab.js.map +1 -1
  1077. package/dist/client/analytics/index.d.ts +3 -0
  1078. package/dist/client/analytics/index.d.ts.map +1 -0
  1079. package/dist/client/analytics/index.js +3 -0
  1080. package/dist/client/analytics/index.js.map +1 -0
  1081. package/dist/client/api-path.js +2 -2
  1082. package/dist/client/api-path.js.map +1 -1
  1083. package/dist/client/automation/index.d.ts +2 -0
  1084. package/dist/client/automation/index.d.ts.map +1 -0
  1085. package/dist/client/automation/index.js +2 -0
  1086. package/dist/client/automation/index.js.map +1 -0
  1087. package/dist/client/changelog/index.d.ts +2 -0
  1088. package/dist/client/changelog/index.d.ts.map +1 -0
  1089. package/dist/client/changelog/index.js +2 -0
  1090. package/dist/client/changelog/index.js.map +1 -0
  1091. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts +1 -12
  1092. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
  1093. package/dist/client/chat/widgets/InlineExtensionWidget.js +2 -66
  1094. package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
  1095. package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
  1096. package/dist/client/chat/widgets/builtin-tool-renderers.js +21 -8
  1097. package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
  1098. package/dist/client/chat/widgets/inline-extension-result.d.ts +14 -0
  1099. package/dist/client/chat/widgets/inline-extension-result.d.ts.map +1 -0
  1100. package/dist/client/chat/widgets/inline-extension-result.js +67 -0
  1101. package/dist/client/chat/widgets/inline-extension-result.js.map +1 -0
  1102. package/dist/client/client-bootstrap.d.ts +2 -0
  1103. package/dist/client/client-bootstrap.d.ts.map +1 -0
  1104. package/dist/client/client-bootstrap.js +7 -0
  1105. package/dist/client/client-bootstrap.js.map +1 -0
  1106. package/dist/client/context-xray/ContextXRayPanel.js +1 -1
  1107. package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
  1108. package/dist/client/hooks/index.d.ts +13 -0
  1109. package/dist/client/hooks/index.d.ts.map +1 -0
  1110. package/dist/client/hooks/index.js +13 -0
  1111. package/dist/client/hooks/index.js.map +1 -0
  1112. package/dist/client/host/index.d.ts +20 -0
  1113. package/dist/client/host/index.d.ts.map +1 -0
  1114. package/dist/client/host/index.js +18 -0
  1115. package/dist/client/host/index.js.map +1 -0
  1116. package/dist/client/index.d.ts +19 -100
  1117. package/dist/client/index.d.ts.map +1 -1
  1118. package/dist/client/index.js +19 -106
  1119. package/dist/client/index.js.map +1 -1
  1120. package/dist/client/navigation/index.d.ts +6 -0
  1121. package/dist/client/navigation/index.d.ts.map +1 -0
  1122. package/dist/client/navigation/index.js +6 -0
  1123. package/dist/client/navigation/index.js.map +1 -0
  1124. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  1125. package/dist/client/resources/ResourcesPanel.js +2 -1
  1126. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  1127. package/dist/client/resources/index.d.ts +2 -1
  1128. package/dist/client/resources/index.d.ts.map +1 -1
  1129. package/dist/client/resources/index.js +1 -0
  1130. package/dist/client/resources/index.js.map +1 -1
  1131. package/dist/client/resources/use-resources.d.ts +0 -1
  1132. package/dist/client/resources/use-resources.d.ts.map +1 -1
  1133. package/dist/client/resources/use-resources.js +0 -17
  1134. package/dist/client/resources/use-resources.js.map +1 -1
  1135. package/dist/client/route-chunk-recovery/index.d.ts +2 -0
  1136. package/dist/client/route-chunk-recovery/index.d.ts.map +1 -0
  1137. package/dist/client/route-chunk-recovery/index.js +2 -0
  1138. package/dist/client/route-chunk-recovery/index.js.map +1 -0
  1139. package/dist/client/ui/index.d.ts +18 -0
  1140. package/dist/client/ui/index.d.ts.map +1 -0
  1141. package/dist/client/ui/index.js +18 -0
  1142. package/dist/client/ui/index.js.map +1 -0
  1143. package/dist/client/uploads/index.d.ts +2 -0
  1144. package/dist/client/uploads/index.d.ts.map +1 -0
  1145. package/dist/client/uploads/index.js +2 -0
  1146. package/dist/client/uploads/index.js.map +1 -0
  1147. package/dist/client/uploads/use-upload-resource.d.ts +3 -0
  1148. package/dist/client/uploads/use-upload-resource.d.ts.map +1 -0
  1149. package/dist/client/uploads/use-upload-resource.js +20 -0
  1150. package/dist/client/uploads/use-upload-resource.js.map +1 -0
  1151. package/dist/client/widgets/index.d.ts +3 -0
  1152. package/dist/client/widgets/index.d.ts.map +1 -0
  1153. package/dist/client/widgets/index.js +3 -0
  1154. package/dist/client/widgets/index.js.map +1 -0
  1155. package/dist/collab/awareness.d.ts +2 -2
  1156. package/dist/collab/awareness.d.ts.map +1 -1
  1157. package/dist/collab/struct-routes.d.ts +1 -1
  1158. package/dist/localization/default-messages.d.ts +2 -1
  1159. package/dist/localization/default-messages.d.ts.map +1 -1
  1160. package/dist/localization/default-messages.js +2 -1
  1161. package/dist/localization/default-messages.js.map +1 -1
  1162. package/dist/notifications/routes.d.ts +3 -3
  1163. package/dist/package-lifecycle/deprecated-imports.d.ts +15 -0
  1164. package/dist/package-lifecycle/deprecated-imports.d.ts.map +1 -0
  1165. package/dist/package-lifecycle/deprecated-imports.js +141 -0
  1166. package/dist/package-lifecycle/deprecated-imports.js.map +1 -0
  1167. package/dist/package-lifecycle/index.d.ts +5 -0
  1168. package/dist/package-lifecycle/index.d.ts.map +1 -1
  1169. package/dist/package-lifecycle/index.js +5 -0
  1170. package/dist/package-lifecycle/index.js.map +1 -1
  1171. package/dist/package-lifecycle/migration-manifest.d.ts +28 -0
  1172. package/dist/package-lifecycle/migration-manifest.d.ts.map +1 -0
  1173. package/dist/package-lifecycle/migration-manifest.js +102 -0
  1174. package/dist/package-lifecycle/migration-manifest.js.map +1 -0
  1175. package/dist/package-lifecycle/migration-message.d.ts +3 -0
  1176. package/dist/package-lifecycle/migration-message.d.ts.map +1 -0
  1177. package/dist/package-lifecycle/migration-message.js +5 -0
  1178. package/dist/package-lifecycle/migration-message.js.map +1 -0
  1179. package/dist/package-lifecycle/tombstone.d.ts +10 -0
  1180. package/dist/package-lifecycle/tombstone.d.ts.map +1 -0
  1181. package/dist/package-lifecycle/tombstone.js +23 -0
  1182. package/dist/package-lifecycle/tombstone.js.map +1 -0
  1183. package/dist/package-lifecycle/upgrade-error.d.ts +11 -0
  1184. package/dist/package-lifecycle/upgrade-error.d.ts.map +1 -0
  1185. package/dist/package-lifecycle/upgrade-error.js +11 -0
  1186. package/dist/package-lifecycle/upgrade-error.js.map +1 -0
  1187. package/dist/secrets/routes.d.ts +9 -9
  1188. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  1189. package/dist/server/transcribe-voice.d.ts +1 -1
  1190. package/dist/templates/chat/.agents/skills/actions/SKILL.md +3 -3
  1191. package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1192. package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1193. package/dist/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  1194. package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
  1195. package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1196. package/dist/templates/chat/app/components/layout/Header.tsx +2 -1
  1197. package/dist/templates/chat/app/components/layout/Layout.tsx +2 -2
  1198. package/dist/templates/chat/app/components/layout/Sidebar.tsx +4 -4
  1199. package/dist/templates/chat/app/hooks/use-navigation-state.ts +3 -4
  1200. package/dist/templates/chat/app/i18n/index.ts +1 -1
  1201. package/dist/templates/chat/app/i18n-data.ts +1 -1
  1202. package/dist/templates/chat/app/lib/utils.ts +1 -1
  1203. package/dist/templates/chat/app/root.tsx +10 -9
  1204. package/dist/templates/chat/app/routes/_index.tsx +2 -2
  1205. package/dist/templates/chat/app/routes/agent.tsx +10 -3
  1206. package/dist/templates/chat/app/routes/database.tsx +1 -1
  1207. package/dist/templates/chat/app/routes/observability.tsx +2 -1
  1208. package/dist/templates/chat/app/routes/settings.tsx +4 -5
  1209. package/dist/templates/default/.agents/skills/actions/SKILL.md +3 -3
  1210. package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1211. package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1212. package/dist/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  1213. package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
  1214. package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
  1215. package/dist/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
  1216. package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1217. package/dist/templates/default/app/hooks/use-navigation-state.ts +2 -5
  1218. package/dist/templates/default/app/i18n/index.ts +1 -1
  1219. package/dist/templates/default/app/lib/utils.ts +1 -1
  1220. package/dist/templates/default/app/root.tsx +8 -6
  1221. package/dist/templates/default/app/routes/_index.tsx +2 -1
  1222. package/dist/templates/default/app/routes/agent.tsx +2 -1
  1223. package/dist/templates/default/app/routes/settings.tsx +2 -3
  1224. package/dist/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  1225. package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1226. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
  1227. package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1228. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
  1229. package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
  1230. package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
  1231. package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
  1232. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1233. package/dist/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  1234. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
  1235. package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
  1236. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
  1237. package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
  1238. package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
  1239. package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1240. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  1241. package/dist/vite/action-types-plugin.js +4 -0
  1242. package/dist/vite/action-types-plugin.js.map +1 -1
  1243. package/dist/vite/client.d.ts.map +1 -1
  1244. package/dist/vite/client.js +35 -64
  1245. package/dist/vite/client.js.map +1 -1
  1246. package/docs/content/actions.mdx +2 -4
  1247. package/docs/content/agent-surfaces.mdx +2 -4
  1248. package/docs/content/audit-log.mdx +1 -2
  1249. package/docs/content/authentication.mdx +3 -2
  1250. package/docs/content/client.mdx +19 -18
  1251. package/docs/content/components.mdx +1 -1
  1252. package/docs/content/context-awareness.mdx +4 -7
  1253. package/docs/content/creating-templates.mdx +7 -5
  1254. package/docs/content/doctor.mdx +27 -6
  1255. package/docs/content/drop-in-agent.mdx +6 -11
  1256. package/docs/content/embedding-sdk.mdx +8 -10
  1257. package/docs/content/getting-started.mdx +4 -2
  1258. package/docs/content/internationalization.mdx +9 -6
  1259. package/docs/content/key-concepts.mdx +2 -4
  1260. package/docs/content/locales/ar-SA/actions.mdx +2 -4
  1261. package/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
  1262. package/docs/content/locales/ar-SA/audit-log.mdx +1 -2
  1263. package/docs/content/locales/ar-SA/authentication.mdx +3 -2
  1264. package/docs/content/locales/ar-SA/client.mdx +19 -18
  1265. package/docs/content/locales/ar-SA/components.mdx +1 -1
  1266. package/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
  1267. package/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
  1268. package/docs/content/locales/ar-SA/doctor.mdx +10 -0
  1269. package/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
  1270. package/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
  1271. package/docs/content/locales/ar-SA/internationalization.mdx +9 -6
  1272. package/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
  1273. package/docs/content/locales/ar-SA/observability.mdx +1 -2
  1274. package/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
  1275. package/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
  1276. package/docs/content/locales/ar-SA/sharing.mdx +1 -2
  1277. package/docs/content/locales/ar-SA/template-chat.mdx +1 -2
  1278. package/docs/content/locales/ar-SA/tracking.mdx +2 -4
  1279. package/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
  1280. package/docs/content/locales/de-DE/actions.mdx +2 -4
  1281. package/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
  1282. package/docs/content/locales/de-DE/audit-log.mdx +1 -2
  1283. package/docs/content/locales/de-DE/authentication.mdx +3 -2
  1284. package/docs/content/locales/de-DE/client.mdx +19 -18
  1285. package/docs/content/locales/de-DE/components.mdx +1 -1
  1286. package/docs/content/locales/de-DE/context-awareness.mdx +4 -7
  1287. package/docs/content/locales/de-DE/creating-templates.mdx +7 -5
  1288. package/docs/content/locales/de-DE/doctor.mdx +10 -0
  1289. package/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
  1290. package/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
  1291. package/docs/content/locales/de-DE/internationalization.mdx +9 -6
  1292. package/docs/content/locales/de-DE/key-concepts.mdx +2 -4
  1293. package/docs/content/locales/de-DE/observability.mdx +1 -2
  1294. package/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
  1295. package/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
  1296. package/docs/content/locales/de-DE/sharing.mdx +1 -2
  1297. package/docs/content/locales/de-DE/template-chat.mdx +1 -2
  1298. package/docs/content/locales/de-DE/tracking.mdx +2 -4
  1299. package/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
  1300. package/docs/content/locales/es-ES/actions.mdx +2 -4
  1301. package/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
  1302. package/docs/content/locales/es-ES/audit-log.mdx +1 -2
  1303. package/docs/content/locales/es-ES/authentication.mdx +3 -2
  1304. package/docs/content/locales/es-ES/client.mdx +19 -18
  1305. package/docs/content/locales/es-ES/components.mdx +1 -1
  1306. package/docs/content/locales/es-ES/context-awareness.mdx +4 -7
  1307. package/docs/content/locales/es-ES/creating-templates.mdx +7 -5
  1308. package/docs/content/locales/es-ES/doctor.mdx +10 -0
  1309. package/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
  1310. package/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
  1311. package/docs/content/locales/es-ES/internationalization.mdx +9 -6
  1312. package/docs/content/locales/es-ES/key-concepts.mdx +2 -4
  1313. package/docs/content/locales/es-ES/observability.mdx +1 -2
  1314. package/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
  1315. package/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
  1316. package/docs/content/locales/es-ES/sharing.mdx +1 -2
  1317. package/docs/content/locales/es-ES/template-chat.mdx +1 -2
  1318. package/docs/content/locales/es-ES/tracking.mdx +2 -4
  1319. package/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
  1320. package/docs/content/locales/fr-FR/actions.mdx +2 -4
  1321. package/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
  1322. package/docs/content/locales/fr-FR/audit-log.mdx +1 -2
  1323. package/docs/content/locales/fr-FR/authentication.mdx +3 -2
  1324. package/docs/content/locales/fr-FR/client.mdx +19 -18
  1325. package/docs/content/locales/fr-FR/components.mdx +1 -1
  1326. package/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
  1327. package/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
  1328. package/docs/content/locales/fr-FR/doctor.mdx +10 -0
  1329. package/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
  1330. package/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
  1331. package/docs/content/locales/fr-FR/internationalization.mdx +9 -6
  1332. package/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
  1333. package/docs/content/locales/fr-FR/observability.mdx +1 -2
  1334. package/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
  1335. package/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
  1336. package/docs/content/locales/fr-FR/sharing.mdx +1 -2
  1337. package/docs/content/locales/fr-FR/template-chat.mdx +1 -2
  1338. package/docs/content/locales/fr-FR/tracking.mdx +2 -4
  1339. package/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
  1340. package/docs/content/locales/hi-IN/actions.mdx +2 -4
  1341. package/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
  1342. package/docs/content/locales/hi-IN/audit-log.mdx +1 -2
  1343. package/docs/content/locales/hi-IN/authentication.mdx +3 -2
  1344. package/docs/content/locales/hi-IN/client.mdx +19 -18
  1345. package/docs/content/locales/hi-IN/components.mdx +1 -1
  1346. package/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
  1347. package/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
  1348. package/docs/content/locales/hi-IN/doctor.mdx +10 -0
  1349. package/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
  1350. package/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
  1351. package/docs/content/locales/hi-IN/internationalization.mdx +9 -6
  1352. package/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
  1353. package/docs/content/locales/hi-IN/observability.mdx +1 -2
  1354. package/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
  1355. package/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
  1356. package/docs/content/locales/hi-IN/sharing.mdx +1 -2
  1357. package/docs/content/locales/hi-IN/template-chat.mdx +1 -2
  1358. package/docs/content/locales/hi-IN/tracking.mdx +2 -4
  1359. package/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
  1360. package/docs/content/locales/ja-JP/actions.mdx +2 -4
  1361. package/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
  1362. package/docs/content/locales/ja-JP/audit-log.mdx +1 -2
  1363. package/docs/content/locales/ja-JP/authentication.mdx +3 -2
  1364. package/docs/content/locales/ja-JP/client.mdx +19 -18
  1365. package/docs/content/locales/ja-JP/components.mdx +1 -1
  1366. package/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
  1367. package/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
  1368. package/docs/content/locales/ja-JP/doctor.mdx +10 -0
  1369. package/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
  1370. package/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
  1371. package/docs/content/locales/ja-JP/internationalization.mdx +9 -6
  1372. package/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
  1373. package/docs/content/locales/ja-JP/observability.mdx +1 -2
  1374. package/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
  1375. package/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
  1376. package/docs/content/locales/ja-JP/sharing.mdx +1 -2
  1377. package/docs/content/locales/ja-JP/template-chat.mdx +1 -2
  1378. package/docs/content/locales/ja-JP/tracking.mdx +2 -4
  1379. package/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
  1380. package/docs/content/locales/ko-KR/actions.mdx +2 -4
  1381. package/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
  1382. package/docs/content/locales/ko-KR/audit-log.mdx +1 -2
  1383. package/docs/content/locales/ko-KR/authentication.mdx +3 -2
  1384. package/docs/content/locales/ko-KR/client.mdx +19 -18
  1385. package/docs/content/locales/ko-KR/components.mdx +1 -1
  1386. package/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
  1387. package/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
  1388. package/docs/content/locales/ko-KR/doctor.mdx +10 -0
  1389. package/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
  1390. package/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
  1391. package/docs/content/locales/ko-KR/internationalization.mdx +9 -6
  1392. package/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
  1393. package/docs/content/locales/ko-KR/observability.mdx +1 -2
  1394. package/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
  1395. package/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
  1396. package/docs/content/locales/ko-KR/sharing.mdx +1 -2
  1397. package/docs/content/locales/ko-KR/template-chat.mdx +1 -2
  1398. package/docs/content/locales/ko-KR/tracking.mdx +2 -4
  1399. package/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
  1400. package/docs/content/locales/pt-BR/actions.mdx +2 -4
  1401. package/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
  1402. package/docs/content/locales/pt-BR/audit-log.mdx +1 -2
  1403. package/docs/content/locales/pt-BR/authentication.mdx +3 -2
  1404. package/docs/content/locales/pt-BR/client.mdx +19 -18
  1405. package/docs/content/locales/pt-BR/components.mdx +1 -1
  1406. package/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
  1407. package/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
  1408. package/docs/content/locales/pt-BR/doctor.mdx +10 -0
  1409. package/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
  1410. package/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
  1411. package/docs/content/locales/pt-BR/internationalization.mdx +9 -6
  1412. package/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
  1413. package/docs/content/locales/pt-BR/observability.mdx +1 -2
  1414. package/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
  1415. package/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
  1416. package/docs/content/locales/pt-BR/sharing.mdx +1 -2
  1417. package/docs/content/locales/pt-BR/template-chat.mdx +1 -2
  1418. package/docs/content/locales/pt-BR/tracking.mdx +2 -4
  1419. package/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
  1420. package/docs/content/locales/zh-CN/actions.mdx +2 -4
  1421. package/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
  1422. package/docs/content/locales/zh-CN/audit-log.mdx +1 -2
  1423. package/docs/content/locales/zh-CN/authentication.mdx +3 -2
  1424. package/docs/content/locales/zh-CN/client.mdx +19 -18
  1425. package/docs/content/locales/zh-CN/components.mdx +1 -1
  1426. package/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
  1427. package/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
  1428. package/docs/content/locales/zh-CN/doctor.mdx +10 -0
  1429. package/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
  1430. package/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
  1431. package/docs/content/locales/zh-CN/internationalization.mdx +9 -6
  1432. package/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
  1433. package/docs/content/locales/zh-CN/observability.mdx +1 -2
  1434. package/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
  1435. package/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
  1436. package/docs/content/locales/zh-CN/sharing.mdx +1 -2
  1437. package/docs/content/locales/zh-CN/template-chat.mdx +1 -2
  1438. package/docs/content/locales/zh-CN/tracking.mdx +2 -4
  1439. package/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
  1440. package/docs/content/locales/zh-TW/actions.mdx +2 -4
  1441. package/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
  1442. package/docs/content/locales/zh-TW/audit-log.mdx +1 -2
  1443. package/docs/content/locales/zh-TW/authentication.mdx +3 -2
  1444. package/docs/content/locales/zh-TW/client.mdx +19 -18
  1445. package/docs/content/locales/zh-TW/components.mdx +1 -1
  1446. package/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
  1447. package/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
  1448. package/docs/content/locales/zh-TW/doctor.mdx +10 -0
  1449. package/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
  1450. package/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
  1451. package/docs/content/locales/zh-TW/internationalization.mdx +9 -6
  1452. package/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
  1453. package/docs/content/locales/zh-TW/observability.mdx +1 -2
  1454. package/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
  1455. package/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
  1456. package/docs/content/locales/zh-TW/sharing.mdx +1 -2
  1457. package/docs/content/locales/zh-TW/template-chat.mdx +1 -2
  1458. package/docs/content/locales/zh-TW/tracking.mdx +2 -4
  1459. package/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
  1460. package/docs/content/observability.mdx +1 -2
  1461. package/docs/content/package-lifecycle.mdx +29 -0
  1462. package/docs/content/real-time-collaboration.mdx +8 -7
  1463. package/docs/content/sharing.mdx +1 -2
  1464. package/docs/content/template-chat.mdx +1 -2
  1465. package/docs/content/toolkit-agent-ux.mdx +3 -2
  1466. package/docs/content/toolkit-observability.mdx +1 -2
  1467. package/docs/content/toolkit-settings.mdx +2 -2
  1468. package/docs/content/toolkit-sharing.mdx +5 -2
  1469. package/docs/content/tracking.mdx +2 -4
  1470. package/docs/content/what-is-agent-native.mdx +1 -2
  1471. package/migration-manifest.json +1353 -0
  1472. package/package.json +22 -4
  1473. package/src/templates/chat/.agents/skills/actions/SKILL.md +3 -3
  1474. package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1475. package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1476. package/src/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  1477. package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
  1478. package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1479. package/src/templates/chat/app/components/layout/Header.tsx +2 -1
  1480. package/src/templates/chat/app/components/layout/Layout.tsx +2 -2
  1481. package/src/templates/chat/app/components/layout/Sidebar.tsx +4 -4
  1482. package/src/templates/chat/app/hooks/use-navigation-state.ts +3 -4
  1483. package/src/templates/chat/app/i18n/index.ts +1 -1
  1484. package/src/templates/chat/app/i18n-data.ts +1 -1
  1485. package/src/templates/chat/app/lib/utils.ts +1 -1
  1486. package/src/templates/chat/app/root.tsx +10 -9
  1487. package/src/templates/chat/app/routes/_index.tsx +2 -2
  1488. package/src/templates/chat/app/routes/agent.tsx +10 -3
  1489. package/src/templates/chat/app/routes/database.tsx +1 -1
  1490. package/src/templates/chat/app/routes/observability.tsx +2 -1
  1491. package/src/templates/chat/app/routes/settings.tsx +4 -5
  1492. package/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
  1493. package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1494. package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1495. package/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  1496. package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
  1497. package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
  1498. package/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
  1499. package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1500. package/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
  1501. package/src/templates/default/app/i18n/index.ts +1 -1
  1502. package/src/templates/default/app/lib/utils.ts +1 -1
  1503. package/src/templates/default/app/root.tsx +8 -6
  1504. package/src/templates/default/app/routes/_index.tsx +2 -1
  1505. package/src/templates/default/app/routes/agent.tsx +2 -1
  1506. package/src/templates/default/app/routes/settings.tsx +2 -3
  1507. package/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  1508. package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1509. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
  1510. package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1511. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
  1512. package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
  1513. package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
  1514. package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
  1515. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1516. package/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  1517. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
  1518. package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
  1519. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
  1520. package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
  1521. package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
  1522. package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/agent-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,EACpC,4BAA4B,EAC5B,oBAAoB,EACpB,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,GAgBd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,GAIhC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,0BAA0B,GAM3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,GAGvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,GAG/B,MAAM,uCAAuC,CAAC;AAC/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EACf,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GAWvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,GAQf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,eAAe,GAIhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAA2B,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,cAAc,GAKf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,GAId,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4B,EAC5B,wBAAwB,EACxB,mCAAmC,EACnC,4BAA4B,EAC5B,+BAA+B,GAIhC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAG7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,GAI9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,kCAAkC,EAClC,oCAAoC,EACpC,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,GAOpB,MAAM,iCAAiC,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC","sourcesContent":["export {\n AgentAskPopover,\n type AgentAskPopoverProps,\n} from \"../AgentAskPopover.js\";\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n insertAgentComposerReference,\n listAgentChatContext,\n normalizeAgentComposerReference,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n requestAgentChatThreadOpen,\n requestAgentTaskOpen,\n sendToAgentChat,\n sendToAgentChatAndConfirm,\n reportAgentChatSubmitResult,\n AGENT_CHAT_SUBMIT_RESULT_EVENT,\n parseSubmitChatMessage,\n setAgentChatContextItem,\n setContextToAgentChat,\n generateTabId,\n type ParsedSubmitChat,\n type AgentChatOpenTaskRequest,\n type AgentChatOpenThreadRequest,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n type AgentChatSubmitResult,\n type SendToAgentChatAndConfirmResult,\n type AgentComposerReference,\n type AgentComposerReferenceInsertOptions,\n type AgentComposerReferenceInsertPayload,\n} from \"../agent-chat.js\";\nexport {\n saveAgentEngineApiKey,\n saveAgentEngineProviderSettings,\n type AgentEngineProvider,\n type SaveAgentEngineApiKeyOptions,\n type SaveAgentEngineProviderSettingsOptions,\n} from \"../agent-engine-key.js\";\nexport { useAgentChatGenerating } from \"../use-agent-chat.js\";\nexport {\n useAgentChatContext,\n type UseAgentChatContextResult,\n} from \"../use-agent-chat-context.js\";\nexport { useCodeMode, useDevMode } from \"../use-dev-mode.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n codeAgentTranscriptHasPendingApproval,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"../code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../../code-agents/transcript-order.js\";\nexport {\n CREDENTIAL_GAP_SIGNAL,\n isCredentialGapCodeAgentEvent,\n} from \"../../code-agents/transcript-normalizer.js\";\nexport { useSendToAgentChat } from \"../use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"../use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"../components/CodeRequiredDialog.js\";\nexport {\n useAgentEngineConfigured,\n type AgentEngineConfiguredState,\n type UseAgentEngineConfiguredResult,\n} from \"../use-agent-engine-configured.js\";\nexport { BuilderSetupCard } from \"../chat/run-recovery.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"../conversation/index.js\";\nexport { McpAppRenderer } from \"../mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"../mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"../components/CodeAgentIndicator.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"../dynamic-suggestions.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n type AssistantChatAdapterContext,\n} from \"../AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"../MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"../RunStuckBanner.js\";\nexport {\n KeepTabOpenNotice,\n type KeepTabOpenNoticeProps,\n} from \"../KeepTabOpenNotice.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"../use-run-stuck-detection.js\";\nexport {\n createAgentChatAdapter,\n type AgentChatSurfaceKind,\n type CreateAgentChatAdapterOptions,\n} from \"../agent-chat-adapter.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n askUserQuestion,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type AskUserQuestionInput,\n type AskUserQuestionOption,\n type AskUserQuestionResult,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"../guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSnapshot,\n type ChatThreadSummary,\n type ChatThreadData,\n type ChatThreadShareLink,\n type ChatThreadShareState,\n type UseChatThreadsOptions,\n} from \"../use-chat-threads.js\";\nexport {\n ChatHistoryList,\n type ChatHistoryItem,\n type ChatHistorySection,\n type ChatHistoryListProps,\n} from \"../chat/ChatHistoryList.js\";\nexport { AgentChatHome, type AgentChatHomeProps } from \"../AgentChatHome.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"../AgentPanel.js\";\nexport {\n AgentTabsPage,\n type AgentPageExtraTabContext,\n type AgentPageExtraTabFactory,\n type AgentTabsPageProps,\n} from \"../agent-page/AgentTabsPage.js\";\nexport type { AgentPageScope, AgentPageTabProps } from \"../agent-page/types.js\";\nexport {\n AGENT_CHAT_HOME_HANDOFF_TTL_MS,\n AGENT_CHAT_VIEW_TRANSITION_CLASS,\n AGENT_CHAT_VIEW_TRANSITION_NAME,\n consumeAgentChatHomeHandoff,\n getAgentChatViewTransitionStyle,\n isAgentChatHomeHandoffActive,\n markAgentChatHomeHandoff,\n navigateWithAgentChatViewTransition,\n startAgentChatViewTransition,\n supportsAgentChatViewTransition,\n type AgentChatHomeHandoffOptions,\n type AgentChatViewTransition,\n type AgentChatViewTransitionOptions,\n} from \"../chat-view-transition.js\";\nexport {\n useAgentChatHomeHandoff,\n useAgentChatHomeHandoffLinks,\n type UseAgentChatHomeHandoffLinksOptions,\n type UseAgentChatHomeHandoffOptions,\n} from \"../use-agent-chat-home-handoff.js\";\nexport {\n requestAgentSidebarOpen,\n SIDEBAR_STATE_CHANGE_EVENT,\n setAgentSidebarOpenPreference,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"../agent-sidebar-state.js\";\nexport {\n clearReservedToolRenderersForTests,\n clearToolRenderersForTests,\n registerActionChatRenderer,\n registerFallbackToolRenderer,\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n registerReservedToolRenderer,\n registerToolRenderer,\n resolveToolRenderer,\n type ActionChatRendererRegistration,\n type ToolRendererComponent,\n type ToolRendererContext,\n type ToolRendererMatch,\n type ToolRendererProps,\n type ToolRendererRegistration,\n} from \"../chat/tool-render-registry.js\";\nexport * from \"../chat/connectors.js\";\nexport * from \"../chat/runtime.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AgentContextTab.d.ts","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAAE,GAC3B,iBAAiB,GAAG,SAAS,CAM/B;AAkRD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,+BA2K3D"}
1
+ {"version":3,"file":"AgentContextTab.d.ts","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAAE,GAC3B,iBAAiB,GAAG,SAAS,CAM/B;AAkRD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,+BA6K3D"}
@@ -169,7 +169,9 @@ export function AgentContextTab({ scope }) {
169
169
  const preview = previewQuery.data;
170
170
  const previewManifest = preview ? previewAsManifest(preview) : null;
171
171
  const budget = resolveContextWindow(preview?.model);
172
- const title = t("contextXray.pageTitle", { defaultValue: "Snapshots" });
172
+ const title = t("contextXray.snapshotsTitle", {
173
+ defaultValue: "Snapshots",
174
+ });
173
175
  const description = t("contextXray.headerDescription", {
174
176
  defaultValue: "Inspect the latest combined snapshot of what the agent loaded and why.",
175
177
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AgentContextTab.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAg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esContent":["import {\n IconChartTreemap,\n IconInfoCircle,\n IconList,\n IconLock,\n} from \"@tabler/icons-react\";\nimport { useMemo, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextManifestSystemSection,\n ContextPreview,\n} from \"../../shared/context-xray.js\";\nimport { manifestConversationTokens } from \"../../shared/context-xray.js\";\nimport { ContextMeter } from \"../context-xray/ContextMeter.js\";\nimport { ContextTreemap } from \"../context-xray/ContextTreemap.js\";\nimport { formatTokens, resolveContextWindow } from \"../context-xray/format.js\";\nimport { useT } from \"../i18n.js\";\nimport { useActionQuery } from \"../use-action.js\";\nimport { useChatThreads, type ChatThreadSummary } from \"../use-chat-threads.js\";\nimport { cn } from \"../utils.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageTabProps } from \"./types.js\";\n\ntype PreviewQuery = {\n data?: ContextPreview;\n isLoading?: boolean;\n error?: unknown;\n};\ntype ManifestQuery = { data?: ContextManifest; isLoading?: boolean };\n\nexport function mostRecentlyUpdatedThread(\n threads: ChatThreadSummary[],\n): ChatThreadSummary | undefined {\n return threads.reduce<ChatThreadSummary | undefined>(\n (latest, thread) =>\n !latest || thread.updatedAt > latest.updatedAt ? thread : latest,\n undefined,\n );\n}\n\nconst PROVENANCE_ORDER = [\n \"framework-core\",\n \"actions-prompt\",\n \"enterprise-workspace-core\",\n \"template\",\n \"sql-workspace\",\n \"legacy-app-default\",\n \"organization\",\n \"personal\",\n \"memory\",\n \"db-schema\",\n \"tools\",\n \"model-overlay\",\n \"runtime-context\",\n] as const;\n\ntype Translate = (key: string, options?: Record<string, unknown>) => string;\n\nfunction provenanceLabel(\n provenance: ContextManifestSystemSection[\"provenance\"],\n t: Translate,\n): string {\n switch (provenance) {\n case \"framework-core\":\n return t(\"contextXray.provenance.frameworkCore\", {\n defaultValue: \"Framework\",\n });\n case \"actions-prompt\":\n return t(\"contextXray.provenance.actionsPrompt\", {\n defaultValue: \"Actions\",\n });\n case \"template\":\n return t(\"contextXray.provenance.template\", {\n defaultValue: \"Template\",\n });\n case \"enterprise-workspace-core\":\n return t(\"contextXray.provenance.enterpriseWorkspaceCore\", {\n defaultValue: \"Enterprise workspace core\",\n });\n case \"sql-workspace\":\n return t(\"contextXray.provenance.sqlWorkspace\", {\n defaultValue: \"Workspace\",\n });\n case \"legacy-app-default\":\n return t(\"contextXray.provenance.legacyAppDefault\", {\n defaultValue: \"App defaults\",\n });\n case \"organization\":\n return t(\"contextXray.provenance.organization\", {\n defaultValue: \"Organization\",\n });\n case \"personal\":\n return t(\"contextXray.provenance.personal\", {\n defaultValue: \"Personal\",\n });\n case \"memory\":\n return t(\"contextXray.provenance.memory\", {\n defaultValue: \"Memory\",\n });\n case \"db-schema\":\n return t(\"contextXray.provenance.dbSchema\", {\n defaultValue: \"SQL schema\",\n });\n case \"tools\":\n return t(\"contextXray.provenance.tools\", { defaultValue: \"Tools\" });\n case \"model-overlay\":\n return t(\"contextXray.provenance.modelOverlay\", {\n defaultValue: \"Model overlay\",\n });\n case \"runtime-context\":\n return t(\"contextXray.provenance.runtimeContext\", {\n defaultValue: \"Runtime context\",\n });\n }\n}\n\nfunction governanceLabel(\n governance: ContextManifestSystemSection[\"governance\"],\n t: Translate,\n): string {\n switch (governance) {\n case \"required\":\n return t(\"contextXray.governance.required\", {\n defaultValue: \"Required\",\n });\n case \"inherited\":\n return t(\"contextXray.governance.inherited\", {\n defaultValue: \"Inherited\",\n });\n case \"user\":\n return t(\"contextXray.governance.user\", {\n defaultValue: \"Your context\",\n });\n }\n}\n\nfunction sourceLabel(section: ContextManifestSystemSection): string {\n return (\n section.sourceRef?.path ??\n section.sourceRef?.resourceId ??\n section.sourceRef?.scope ??\n \"framework\"\n );\n}\n\nfunction previewAsManifest(preview: ContextPreview): ContextManifest {\n return {\n threadId: \"context-preview\",\n computedAt: preview.computedAt,\n ...(preview.model ? { model: preview.model } : {}),\n totalTokens: preview.totalTokens,\n rawTokens: preview.totalTokens,\n reclaimedTokens: 0,\n tokenCountMethod: preview.tokenCountMethod,\n conversationTokens: 0,\n systemTokens: preview.systemTokens,\n source: \"preview\",\n enforceable: false,\n segments: [],\n systemSections: preview.sections,\n };\n}\n\nfunction ContextSplitMeter({\n manifest,\n budget,\n}: {\n manifest: ContextManifest;\n budget: number;\n}) {\n const t = useT();\n const systemTokens = manifest.systemTokens ?? 0;\n const conversationTokens = manifestConversationTokens(manifest);\n const total = Math.max(1, systemTokens + conversationTokens);\n return (\n <div className=\"space-y-2\">\n <div className=\"flex h-2 overflow-hidden rounded-full bg-muted\">\n <div\n className=\"bg-slate-700 dark:bg-slate-400\"\n style={{ width: `${(systemTokens / total) * 100}%` }}\n />\n <div\n className=\"bg-sky-500\"\n style={{ width: `${(conversationTokens / total) * 100}%` }}\n />\n </div>\n <div className=\"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground\">\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-slate-700 dark:bg-slate-400\" />\n {t(\"contextXray.system\", { defaultValue: \"System\" })}{\" \"}\n {formatTokens(systemTokens)}\n </span>\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-sky-500\" />\n {t(\"contextXray.conversation\", { defaultValue: \"Conversation\" })}{\" \"}\n {formatTokens(conversationTokens)}\n </span>\n <span>\n {formatTokens(Math.max(0, budget - manifest.totalTokens))}{\" \"}\n {t(\"contextXray.free\", { defaultValue: \"free\" })}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SystemSectionList({\n sections,\n totalTokens,\n}: {\n sections: ContextManifestSystemSection[];\n totalTokens: number;\n}) {\n const t = useT();\n const grouped = useMemo(() => {\n const map = new Map<\n ContextManifestSystemSection[\"provenance\"],\n ContextManifestSystemSection[]\n >();\n for (const section of sections) {\n const items = map.get(section.provenance) ?? [];\n items.push(section);\n map.set(section.provenance, items);\n }\n return PROVENANCE_ORDER.flatMap((provenance) => {\n const items = map.get(provenance);\n return items && items.length > 0 ? [{ provenance, items }] : [];\n });\n }, [sections]);\n\n return (\n <div className=\"space-y-4\">\n {grouped.map((group) => {\n const tokens = group.items.reduce(\n (sum, item) => sum + item.tokenCount,\n 0,\n );\n return (\n <section key={group.provenance}>\n <div className=\"mb-1 flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"size-2 rounded-full bg-indigo-500\" />\n <h3 className=\"truncate text-sm font-medium\">\n {provenanceLabel(group.provenance, t)}\n </h3>\n <span className=\"text-[11px] text-muted-foreground\">\n {governanceLabel(\n group.items[0]?.governance ?? \"inherited\",\n t,\n )}\n </span>\n </div>\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(tokens)} ·{\" \"}\n {totalTokens > 0 ? Math.round((tokens / totalTokens) * 100) : 0}\n %\n </span>\n </div>\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {group.items\n .slice()\n .sort((a, b) => b.tokenCount - a.tokenCount)\n .map((section) => (\n <div\n key={section.segmentId}\n className=\"flex gap-3 px-3 py-2.5\"\n >\n <IconLock className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline justify-between gap-3\">\n <div className=\"truncate text-sm font-medium\">\n {section.label}\n </div>\n <div className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(section.tokenCount)} ·{\" \"}\n {totalTokens > 0\n ? Math.round(\n (section.tokenCount / totalTokens) * 100,\n )\n : 0}\n %\n </div>\n </div>\n <div className=\"truncate text-xs text-muted-foreground\">\n {sourceLabel(section)}\n {section.tokenMethod === \"estimate\"\n ? \" · estimated\"\n : \"\"}\n </div>\n {section.preview ? (\n <div className=\"mt-1 line-clamp-2 text-xs text-muted-foreground/80\">\n {section.preview}\n </div>\n ) : null}\n </div>\n </div>\n ))}\n </div>\n </section>\n );\n })}\n {grouped.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noSystemContext\", {\n defaultValue: \"No system context is available for this scope yet.\",\n })}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function AgentContextTab({ scope }: AgentPageTabProps) {\n const t = useT();\n const [view, setView] = useState<\"list\" | \"map\">(\"list\");\n const previewQuery = useActionQuery(\n \"context-preview-get\",\n { scope },\n { staleTime: 5_000 },\n ) as PreviewQuery;\n const threads = useChatThreads(undefined, \"agent-context-page\", null, {\n autoCreate: false,\n restoreActiveThread: false,\n });\n const latestThread = mostRecentlyUpdatedThread(threads.threads);\n const liveManifestQuery = useActionQuery(\n \"context-manifest-get\",\n latestThread ? { threadId: latestThread.id } : undefined,\n { enabled: Boolean(latestThread), staleTime: 1_000 },\n ) as ManifestQuery;\n const preview = previewQuery.data;\n const previewManifest = preview ? previewAsManifest(preview) : null;\n const budget = resolveContextWindow(preview?.model);\n const title = t(\"contextXray.pageTitle\", { defaultValue: \"Snapshots\" });\n const description = t(\"contextXray.headerDescription\", {\n defaultValue:\n \"Inspect the latest combined snapshot of what the agent loaded and why.\",\n });\n\n return (\n <AgentTabFrame\n title={title}\n description={description}\n actions={\n previewManifest ? (\n <ContextMeter manifest={previewManifest} enabled />\n ) : null\n }\n >\n <div className=\"space-y-7\">\n {previewManifest ? (\n <ContextSplitMeter manifest={previewManifest} budget={budget} />\n ) : null}\n\n <section className=\"space-y-4\">\n <div className=\"flex justify-end\">\n <div className=\"inline-flex rounded-md bg-muted/50 p-0.5\">\n <button\n type=\"button\"\n onClick={() => setView(\"list\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"list\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconList className=\"size-3.5\" />\n {t(\"contextXray.list\", { defaultValue: \"List\" })}\n </button>\n <button\n type=\"button\"\n onClick={() => setView(\"map\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"map\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconChartTreemap className=\"size-3.5\" />\n {t(\"contextXray.treemap\", { defaultValue: \"Treemap\" })}\n </button>\n </div>\n </div>\n {previewQuery.isLoading ? (\n <div className=\"rounded-md border border-border/60 p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.loadingPreview\", {\n defaultValue: \"Loading recent snapshot…\",\n })}\n </div>\n ) : previewQuery.error ? (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.previewUnavailable\", {\n defaultValue: \"A recent snapshot is not available yet.\",\n })}\n </div>\n ) : previewManifest ? (\n view === \"map\" ? (\n <ContextTreemap\n segments={[]}\n systemSections={previewManifest.systemSections}\n />\n ) : (\n <SystemSectionList\n sections={previewManifest.systemSections ?? []}\n totalTokens={previewManifest.totalTokens}\n />\n )\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noPreview\", {\n defaultValue:\n \"No recent snapshot is available for this scope yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"space-y-3\">\n <div>\n <h2 className=\"text-lg font-semibold\">\n {t(\"contextXray.liveThread\", { defaultValue: \"Live thread\" })}\n </h2>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"contextXray.liveThreadDescription\", {\n defaultValue:\n \"The latest thread snapshot, when one exists. This is a single current snapshot, not an append-only history.\",\n })}\n </p>\n </div>\n {latestThread && liveManifestQuery.data ? (\n <div className=\"space-y-3 border-y border-border/60 py-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-medium\">\n {latestThread.title ||\n latestThread.preview ||\n t(\"contextXray.latestThread\", {\n defaultValue: \"Latest thread\",\n })}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n {formatTokens(liveManifestQuery.data.totalTokens)} tokens ·{\" \"}\n {latestThread.id}\n </div>\n </div>\n <ContextMeter threadId={latestThread.id} />\n </div>\n <ContextTreemap\n segments={liveManifestQuery.data.segments}\n systemSections={liveManifestQuery.data.systemSections}\n />\n </div>\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noLiveThread\", {\n defaultValue: \"No live thread snapshot is available yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"flex gap-3 border-t border-border/70 pt-5\">\n <IconInfoCircle className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"space-y-1 text-sm text-muted-foreground\">\n <p className=\"font-medium text-foreground\">\n {t(\"contextXray.orderedTokensTitle\", {\n defaultValue:\n \"Snapshots show ordered tokens, not weighted tokens.\",\n })}\n </p>\n <p>\n {t(\"contextXray.orderedTokensDescription\", {\n defaultValue:\n \"Required framework and enterprise policy come first, followed by inherited template, workspace, and organization instructions. Personal instructions and memory arrive later and can narrow or override earlier guidance where the prompt permits. These system sections are not evictable; only run-local conversation segments support pin, evict, and restore.\",\n })}\n </p>\n </div>\n </section>\n </div>\n </AgentTabFrame>\n );\n}\n"]}
1
+ {"version":3,"file":"AgentContextTab.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,C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,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAW,GAAG,EAC9D,YAAY,CAAC,EAAE,IACZ,IACF,EACN,KAAC,YAAY,IAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,GAAI,IACvC,EACN,KAAC,cAAc,IACb,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EACzC,cAAc,EAAE,iBAAiB,CAAC,IAAI,CAAC,cAAc,GACrD,IACE,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,6FAA6F,YACzG,CAAC,CAAC,0BAA0B,EAAE;gCAC7B,YAAY,EAAE,2CAA2C;6BAC1D,CAAC,GACE,CACP,IACO,EAEV,mBAAS,SAAS,EAAC,2CAA2C,aAC5D,KAAC,cAAc,IAAC,SAAS,EAAC,8CAA8C,GAAG,EAC3E,eAAK,SAAS,EAAC,yCAAyC,aACtD,YAAG,SAAS,EAAC,6BAA6B,YACvC,CAAC,CAAC,gCAAgC,EAAE;wCACnC,YAAY,EACV,qDAAqD;qCACxD,CAAC,GACA,EACJ,sBACG,CAAC,CAAC,sCAAsC,EAAE;wCACzC,YAAY,EACV,mWAAmW;qCACtW,CAAC,GACA,IACA,IACE,IACN,GACQ,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconChartTreemap,\n IconInfoCircle,\n IconList,\n IconLock,\n} from \"@tabler/icons-react\";\nimport { useMemo, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextManifestSystemSection,\n ContextPreview,\n} from \"../../shared/context-xray.js\";\nimport { manifestConversationTokens } from \"../../shared/context-xray.js\";\nimport { ContextMeter } from \"../context-xray/ContextMeter.js\";\nimport { ContextTreemap } from \"../context-xray/ContextTreemap.js\";\nimport { formatTokens, resolveContextWindow } from \"../context-xray/format.js\";\nimport { useT } from \"../i18n.js\";\nimport { useActionQuery } from \"../use-action.js\";\nimport { useChatThreads, type ChatThreadSummary } from \"../use-chat-threads.js\";\nimport { cn } from \"../utils.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageTabProps } from \"./types.js\";\n\ntype PreviewQuery = {\n data?: ContextPreview;\n isLoading?: boolean;\n error?: unknown;\n};\ntype ManifestQuery = { data?: ContextManifest; isLoading?: boolean };\n\nexport function mostRecentlyUpdatedThread(\n threads: ChatThreadSummary[],\n): ChatThreadSummary | undefined {\n return threads.reduce<ChatThreadSummary | undefined>(\n (latest, thread) =>\n !latest || thread.updatedAt > latest.updatedAt ? thread : latest,\n undefined,\n );\n}\n\nconst PROVENANCE_ORDER = [\n \"framework-core\",\n \"actions-prompt\",\n \"enterprise-workspace-core\",\n \"template\",\n \"sql-workspace\",\n \"legacy-app-default\",\n \"organization\",\n \"personal\",\n \"memory\",\n \"db-schema\",\n \"tools\",\n \"model-overlay\",\n \"runtime-context\",\n] as const;\n\ntype Translate = (key: string, options?: Record<string, unknown>) => string;\n\nfunction provenanceLabel(\n provenance: ContextManifestSystemSection[\"provenance\"],\n t: Translate,\n): string {\n switch (provenance) {\n case \"framework-core\":\n return t(\"contextXray.provenance.frameworkCore\", {\n defaultValue: \"Framework\",\n });\n case \"actions-prompt\":\n return t(\"contextXray.provenance.actionsPrompt\", {\n defaultValue: \"Actions\",\n });\n case \"template\":\n return t(\"contextXray.provenance.template\", {\n defaultValue: \"Template\",\n });\n case \"enterprise-workspace-core\":\n return t(\"contextXray.provenance.enterpriseWorkspaceCore\", {\n defaultValue: \"Enterprise workspace core\",\n });\n case \"sql-workspace\":\n return t(\"contextXray.provenance.sqlWorkspace\", {\n defaultValue: \"Workspace\",\n });\n case \"legacy-app-default\":\n return t(\"contextXray.provenance.legacyAppDefault\", {\n defaultValue: \"App defaults\",\n });\n case \"organization\":\n return t(\"contextXray.provenance.organization\", {\n defaultValue: \"Organization\",\n });\n case \"personal\":\n return t(\"contextXray.provenance.personal\", {\n defaultValue: \"Personal\",\n });\n case \"memory\":\n return t(\"contextXray.provenance.memory\", {\n defaultValue: \"Memory\",\n });\n case \"db-schema\":\n return t(\"contextXray.provenance.dbSchema\", {\n defaultValue: \"SQL schema\",\n });\n case \"tools\":\n return t(\"contextXray.provenance.tools\", { defaultValue: \"Tools\" });\n case \"model-overlay\":\n return t(\"contextXray.provenance.modelOverlay\", {\n defaultValue: \"Model overlay\",\n });\n case \"runtime-context\":\n return t(\"contextXray.provenance.runtimeContext\", {\n defaultValue: \"Runtime context\",\n });\n }\n}\n\nfunction governanceLabel(\n governance: ContextManifestSystemSection[\"governance\"],\n t: Translate,\n): string {\n switch (governance) {\n case \"required\":\n return t(\"contextXray.governance.required\", {\n defaultValue: \"Required\",\n });\n case \"inherited\":\n return t(\"contextXray.governance.inherited\", {\n defaultValue: \"Inherited\",\n });\n case \"user\":\n return t(\"contextXray.governance.user\", {\n defaultValue: \"Your context\",\n });\n }\n}\n\nfunction sourceLabel(section: ContextManifestSystemSection): string {\n return (\n section.sourceRef?.path ??\n section.sourceRef?.resourceId ??\n section.sourceRef?.scope ??\n \"framework\"\n );\n}\n\nfunction previewAsManifest(preview: ContextPreview): ContextManifest {\n return {\n threadId: \"context-preview\",\n computedAt: preview.computedAt,\n ...(preview.model ? { model: preview.model } : {}),\n totalTokens: preview.totalTokens,\n rawTokens: preview.totalTokens,\n reclaimedTokens: 0,\n tokenCountMethod: preview.tokenCountMethod,\n conversationTokens: 0,\n systemTokens: preview.systemTokens,\n source: \"preview\",\n enforceable: false,\n segments: [],\n systemSections: preview.sections,\n };\n}\n\nfunction ContextSplitMeter({\n manifest,\n budget,\n}: {\n manifest: ContextManifest;\n budget: number;\n}) {\n const t = useT();\n const systemTokens = manifest.systemTokens ?? 0;\n const conversationTokens = manifestConversationTokens(manifest);\n const total = Math.max(1, systemTokens + conversationTokens);\n return (\n <div className=\"space-y-2\">\n <div className=\"flex h-2 overflow-hidden rounded-full bg-muted\">\n <div\n className=\"bg-slate-700 dark:bg-slate-400\"\n style={{ width: `${(systemTokens / total) * 100}%` }}\n />\n <div\n className=\"bg-sky-500\"\n style={{ width: `${(conversationTokens / total) * 100}%` }}\n />\n </div>\n <div className=\"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground\">\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-slate-700 dark:bg-slate-400\" />\n {t(\"contextXray.system\", { defaultValue: \"System\" })}{\" \"}\n {formatTokens(systemTokens)}\n </span>\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-sky-500\" />\n {t(\"contextXray.conversation\", { defaultValue: \"Conversation\" })}{\" \"}\n {formatTokens(conversationTokens)}\n </span>\n <span>\n {formatTokens(Math.max(0, budget - manifest.totalTokens))}{\" \"}\n {t(\"contextXray.free\", { defaultValue: \"free\" })}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SystemSectionList({\n sections,\n totalTokens,\n}: {\n sections: ContextManifestSystemSection[];\n totalTokens: number;\n}) {\n const t = useT();\n const grouped = useMemo(() => {\n const map = new Map<\n ContextManifestSystemSection[\"provenance\"],\n ContextManifestSystemSection[]\n >();\n for (const section of sections) {\n const items = map.get(section.provenance) ?? [];\n items.push(section);\n map.set(section.provenance, items);\n }\n return PROVENANCE_ORDER.flatMap((provenance) => {\n const items = map.get(provenance);\n return items && items.length > 0 ? [{ provenance, items }] : [];\n });\n }, [sections]);\n\n return (\n <div className=\"space-y-4\">\n {grouped.map((group) => {\n const tokens = group.items.reduce(\n (sum, item) => sum + item.tokenCount,\n 0,\n );\n return (\n <section key={group.provenance}>\n <div className=\"mb-1 flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"size-2 rounded-full bg-indigo-500\" />\n <h3 className=\"truncate text-sm font-medium\">\n {provenanceLabel(group.provenance, t)}\n </h3>\n <span className=\"text-[11px] text-muted-foreground\">\n {governanceLabel(\n group.items[0]?.governance ?? \"inherited\",\n t,\n )}\n </span>\n </div>\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(tokens)} ·{\" \"}\n {totalTokens > 0 ? Math.round((tokens / totalTokens) * 100) : 0}\n %\n </span>\n </div>\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {group.items\n .slice()\n .sort((a, b) => b.tokenCount - a.tokenCount)\n .map((section) => (\n <div\n key={section.segmentId}\n className=\"flex gap-3 px-3 py-2.5\"\n >\n <IconLock className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline justify-between gap-3\">\n <div className=\"truncate text-sm font-medium\">\n {section.label}\n </div>\n <div className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(section.tokenCount)} ·{\" \"}\n {totalTokens > 0\n ? Math.round(\n (section.tokenCount / totalTokens) * 100,\n )\n : 0}\n %\n </div>\n </div>\n <div className=\"truncate text-xs text-muted-foreground\">\n {sourceLabel(section)}\n {section.tokenMethod === \"estimate\"\n ? \" · estimated\"\n : \"\"}\n </div>\n {section.preview ? (\n <div className=\"mt-1 line-clamp-2 text-xs text-muted-foreground/80\">\n {section.preview}\n </div>\n ) : null}\n </div>\n </div>\n ))}\n </div>\n </section>\n );\n })}\n {grouped.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noSystemContext\", {\n defaultValue: \"No system context is available for this scope yet.\",\n })}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function AgentContextTab({ scope }: AgentPageTabProps) {\n const t = useT();\n const [view, setView] = useState<\"list\" | \"map\">(\"list\");\n const previewQuery = useActionQuery(\n \"context-preview-get\",\n { scope },\n { staleTime: 5_000 },\n ) as PreviewQuery;\n const threads = useChatThreads(undefined, \"agent-context-page\", null, {\n autoCreate: false,\n restoreActiveThread: false,\n });\n const latestThread = mostRecentlyUpdatedThread(threads.threads);\n const liveManifestQuery = useActionQuery(\n \"context-manifest-get\",\n latestThread ? { threadId: latestThread.id } : undefined,\n { enabled: Boolean(latestThread), staleTime: 1_000 },\n ) as ManifestQuery;\n const preview = previewQuery.data;\n const previewManifest = preview ? previewAsManifest(preview) : null;\n const budget = resolveContextWindow(preview?.model);\n const title = t(\"contextXray.snapshotsTitle\", {\n defaultValue: \"Snapshots\",\n });\n const description = t(\"contextXray.headerDescription\", {\n defaultValue:\n \"Inspect the latest combined snapshot of what the agent loaded and why.\",\n });\n\n return (\n <AgentTabFrame\n title={title}\n description={description}\n actions={\n previewManifest ? (\n <ContextMeter manifest={previewManifest} enabled />\n ) : null\n }\n >\n <div className=\"space-y-7\">\n {previewManifest ? (\n <ContextSplitMeter manifest={previewManifest} budget={budget} />\n ) : null}\n\n <section className=\"space-y-4\">\n <div className=\"flex justify-end\">\n <div className=\"inline-flex rounded-md bg-muted/50 p-0.5\">\n <button\n type=\"button\"\n onClick={() => setView(\"list\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"list\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconList className=\"size-3.5\" />\n {t(\"contextXray.list\", { defaultValue: \"List\" })}\n </button>\n <button\n type=\"button\"\n onClick={() => setView(\"map\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"map\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconChartTreemap className=\"size-3.5\" />\n {t(\"contextXray.treemap\", { defaultValue: \"Treemap\" })}\n </button>\n </div>\n </div>\n {previewQuery.isLoading ? (\n <div className=\"rounded-md border border-border/60 p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.loadingPreview\", {\n defaultValue: \"Loading recent snapshot…\",\n })}\n </div>\n ) : previewQuery.error ? (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.previewUnavailable\", {\n defaultValue: \"A recent snapshot is not available yet.\",\n })}\n </div>\n ) : previewManifest ? (\n view === \"map\" ? (\n <ContextTreemap\n segments={[]}\n systemSections={previewManifest.systemSections}\n />\n ) : (\n <SystemSectionList\n sections={previewManifest.systemSections ?? []}\n totalTokens={previewManifest.totalTokens}\n />\n )\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noPreview\", {\n defaultValue:\n \"No recent snapshot is available for this scope yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"space-y-3\">\n <div>\n <h2 className=\"text-lg font-semibold\">\n {t(\"contextXray.liveThread\", { defaultValue: \"Live thread\" })}\n </h2>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"contextXray.liveThreadDescription\", {\n defaultValue:\n \"The latest thread snapshot, when one exists. This is a single current snapshot, not an append-only history.\",\n })}\n </p>\n </div>\n {latestThread && liveManifestQuery.data ? (\n <div className=\"space-y-3 border-y border-border/60 py-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-medium\">\n {latestThread.title ||\n latestThread.preview ||\n t(\"contextXray.latestThread\", {\n defaultValue: \"Latest thread\",\n })}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n {formatTokens(liveManifestQuery.data.totalTokens)} tokens ·{\" \"}\n {latestThread.id}\n </div>\n </div>\n <ContextMeter threadId={latestThread.id} />\n </div>\n <ContextTreemap\n segments={liveManifestQuery.data.segments}\n systemSections={liveManifestQuery.data.systemSections}\n />\n </div>\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noLiveThread\", {\n defaultValue: \"No live thread snapshot is available yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"flex gap-3 border-t border-border/70 pt-5\">\n <IconInfoCircle className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"space-y-1 text-sm text-muted-foreground\">\n <p className=\"font-medium text-foreground\">\n {t(\"contextXray.orderedTokensTitle\", {\n defaultValue:\n \"Snapshots show ordered tokens, not weighted tokens.\",\n })}\n </p>\n <p>\n {t(\"contextXray.orderedTokensDescription\", {\n defaultValue:\n \"Required framework and enterprise policy come first, followed by inherited template, workspace, and organization instructions. Personal instructions and memory arrive later and can narrow or override earlier guidance where the prompt permits. These system sections are not evictable; only run-local conversation segments support pin, evict, and restore.\",\n })}\n </p>\n </div>\n </section>\n </div>\n </AgentTabFrame>\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureClientException, captureError, captureException, captureMessage, configureTracking, getAnalyticsAnonymousId, getAnalyticsSessionId, getFirstTouchAttribution, getSessionReplayContext, getSessionReplayUrl, isErrorCaptureInstalled, maybeStartSessionReplay, setSentryUser, setTrackingContentCaptureEnabled, setTrackingIdentity, startSessionReplay, stopSessionReplay, trackAgentChatLifecycle, trackEvent, trackSessionStatus, type AgentChatLifecycleEvent, type CaptureExceptionContext, type CapturedExceptionEvent, type ClientCaptureContext, type ConfigureTrackingOptions, type ErrorCaptureConfigOptions, type ExceptionBreadcrumb, type ExceptionLevel, type FirstTouchAttribution, type SessionReplayContext, type SessionReplayLinkOptions, type SessionReplayOptions, type SessionReplayStartResult, type SessionReplayUrlMatcher, type TrackingIdentityUser, } from "../analytics.js";
2
+ export { track } from "../track.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureClientException, captureError, captureException, captureMessage, configureTracking, getAnalyticsAnonymousId, getAnalyticsSessionId, getFirstTouchAttribution, getSessionReplayContext, getSessionReplayUrl, isErrorCaptureInstalled, maybeStartSessionReplay, setSentryUser, setTrackingContentCaptureEnabled, setTrackingIdentity, startSessionReplay, stopSessionReplay, trackAgentChatLifecycle, trackEvent, trackSessionStatus, } from "../analytics.js";
2
+ export { track } from "../track.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,GAgBnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export {\n AGENT_NATIVE_EXCEPTION_EVENT_NAME,\n addErrorBreadcrumb,\n captureClientException,\n captureError,\n captureException,\n captureMessage,\n configureTracking,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n getSessionReplayContext,\n getSessionReplayUrl,\n isErrorCaptureInstalled,\n maybeStartSessionReplay,\n setSentryUser,\n setTrackingContentCaptureEnabled,\n setTrackingIdentity,\n startSessionReplay,\n stopSessionReplay,\n trackAgentChatLifecycle,\n trackEvent,\n trackSessionStatus,\n type AgentChatLifecycleEvent,\n type CaptureExceptionContext,\n type CapturedExceptionEvent,\n type ClientCaptureContext,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayContext,\n type SessionReplayLinkOptions,\n type SessionReplayOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n type TrackingIdentityUser,\n} from \"../analytics.js\";\nexport { track } from \"../track.js\";\n"]}
@@ -1,4 +1,4 @@
1
- import { ensureEmbedAuthFetchInterceptor } from "./embed-auth.js";
1
+ import { initializeAgentNativeClient } from "./client-bootstrap.js";
2
2
  const FRAMEWORK_ROUTE_PREFIX = "/_agent-native";
3
3
  function normalizeBasePath(value) {
4
4
  if (!value || value === "/")
@@ -71,7 +71,7 @@ function externalEmbedTargetBasePath() {
71
71
  return "";
72
72
  }
73
73
  export function appBasePath() {
74
- ensureEmbedAuthFetchInterceptor();
74
+ initializeAgentNativeClient();
75
75
  const externalEmbed = externalEmbedTargetBasePath();
76
76
  if (externalEmbed)
77
77
  return externalEmbed;
@@ -1 +1 @@
1
- {"version":3,"file":"api-path.js","sourceRoot":"","sources":["../../src/client/api-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEhD,SAAS,iBA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AC;IACvC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3B,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACtE,OAAO,GAAG,QAAQ,GAAG,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,UAAU,GACd,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACzC,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;IACzC,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import { ensureEmbedAuthFetchInterceptor } from \"./embed-auth.js\";\n\nconst FRAMEWORK_ROUTE_PREFIX = \"/_agent-native\";\n\nfunction normalizeBasePath(value: string | undefined): string {\n if (!value || value === \"/\") return \"\";\n const trimmed = value.trim();\n if (!trimmed || trimmed === \"/\") return \"\";\n return `/${trimmed.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\")}`;\n}\n\nfunction configuredBasePath(): string {\n const env = clientEnv();\n const value = env?.VITE_APP_BASE_PATH ?? env?.APP_BASE_PATH ?? env?.BASE_URL;\n return typeof value === \"string\" ? normalizeBasePath(value) : \"\";\n}\n\nfunction clientEnv(): Record<string, string | boolean | undefined> | undefined {\n const importMetaEnv = (\n import.meta as unknown as {\n env?: Record<string, string | boolean | undefined>;\n }\n ).env;\n const processEnv = (\n globalThis as typeof globalThis & {\n process?: { env?: Record<string, string | boolean | undefined> };\n }\n ).process?.env;\n\n if (importMetaEnv && processEnv) return { ...processEnv, ...importMetaEnv };\n return importMetaEnv ?? processEnv;\n}\n\nfunction pathDerivedBasePath(): string {\n if (typeof window === \"undefined\") return \"\";\n const pathname = window.location.pathname;\n const markerIndex = pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);\n if (markerIndex <= 0) return \"\";\n return normalizeBasePath(pathname.slice(0, markerIndex));\n}\n\nfunction pathMatchesBasePath(pathname: string, basePath: string): boolean {\n return pathname === basePath || pathname.startsWith(`${basePath}/`);\n}\n\nfunction isWorkspaceRuntime(): boolean {\n const env = clientEnv();\n return (\n env?.VITE_AGENT_NATIVE_WORKSPACE === \"1\" ||\n env?.AGENT_NATIVE_WORKSPACE === \"1\" ||\n typeof env?.VITE_AGENT_NATIVE_WORKSPACE_APPS_JSON === \"string\"\n );\n}\n\nfunction workspacePathBasePath(): string {\n if (typeof window === \"undefined\" || !isWorkspaceRuntime()) return \"\";\n const segment = window.location.pathname.split(\"/\").find(Boolean);\n if (!segment || segment === \"_agent-native\" || segment === \"api\") return \"\";\n return normalizeBasePath(segment);\n}\n\nfunction externalEmbedTargetBasePath(): string {\n if (typeof window === \"undefined\") return \"\";\n const target = (\n window as Window & {\n __AGENT_NATIVE_EXTERNAL_EMBED?: { target?: unknown };\n }\n ).__AGENT_NATIVE_EXTERNAL_EMBED?.target;\n if (typeof target !== \"string\" || !target.startsWith(\"/\")) return \"\";\n try {\n const url = new URL(target, \"http://agent-native.invalid\");\n const markerIndex = url.pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);\n if (markerIndex > 0) {\n return normalizeBasePath(url.pathname.slice(0, markerIndex));\n }\n if (isWorkspaceRuntime()) {\n const segment = url.pathname.split(\"/\").find(Boolean);\n if (segment && segment !== \"_agent-native\" && segment !== \"api\") {\n return normalizeBasePath(segment);\n }\n }\n } catch {\n return \"\";\n }\n return \"\";\n}\n\nexport function appBasePath(): string {\n ensureEmbedAuthFetchInterceptor();\n const externalEmbed = externalEmbedTargetBasePath();\n if (externalEmbed) return externalEmbed;\n const configured = configuredBasePath();\n const derived = pathDerivedBasePath();\n if (!configured) return derived;\n if (typeof window === \"undefined\") return configured;\n\n const pathname = window.location.pathname;\n if (pathMatchesBasePath(pathname, configured)) return configured;\n\n // In a multi-app workspace, a globally configured base can bleed from one\n // app build into another. Prefer the live mount path when they disagree.\n return derived || workspacePathBasePath() || configured;\n}\n\nexport function appPath(path: string): string {\n if (!path.startsWith(\"/\")) return path;\n const basePath = appBasePath();\n if (!basePath) return path;\n if (path === basePath || path.startsWith(`${basePath}/`)) return path;\n return `${basePath}${path}`;\n}\n\nexport function appApiPath(path: string): string {\n const normalized =\n path === \"/api\" || path.startsWith(\"/api/\")\n ? path\n : `/api/${path.replace(/^\\/+/, \"\")}`;\n return appPath(normalized);\n}\n\nexport function agentNativePath(path: string): string {\n if (!path.startsWith(FRAMEWORK_ROUTE_PREFIX)) return path;\n return appPath(path);\n}\n"]}
1
+ {"version":3,"file":"api-path.js","sourceRoot":"","sources":["../../src/client/api-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEhD,SAAS,iBAAiB,CAAC,KAAyB;IAClD,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,GAAG;QAAE,OAAO,EAAE,CAAC;IAC3C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,GAAG,GAAG,SAAS,EAAE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C,IAAI;QACN,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;IACzC,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import { initializeAgentNativeClient } from \"./client-bootstrap.js\";\n\nconst FRAMEWORK_ROUTE_PREFIX = \"/_agent-native\";\n\nfunction normalizeBasePath(value: string | undefined): string {\n if (!value || value === \"/\") return \"\";\n const trimmed = value.trim();\n if (!trimmed || trimmed === \"/\") return \"\";\n return `/${trimmed.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\")}`;\n}\n\nfunction configuredBasePath(): string {\n const env = clientEnv();\n const value = env?.VITE_APP_BASE_PATH ?? env?.APP_BASE_PATH ?? env?.BASE_URL;\n return typeof value === \"string\" ? normalizeBasePath(value) : \"\";\n}\n\nfunction clientEnv(): Record<string, string | boolean | undefined> | undefined {\n const importMetaEnv = (\n import.meta as unknown as {\n env?: Record<string, string | boolean | undefined>;\n }\n ).env;\n const processEnv = (\n globalThis as typeof globalThis & {\n process?: { env?: Record<string, string | boolean | undefined> };\n }\n ).process?.env;\n\n if (importMetaEnv && processEnv) return { ...processEnv, ...importMetaEnv };\n return importMetaEnv ?? processEnv;\n}\n\nfunction pathDerivedBasePath(): string {\n if (typeof window === \"undefined\") return \"\";\n const pathname = window.location.pathname;\n const markerIndex = pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);\n if (markerIndex <= 0) return \"\";\n return normalizeBasePath(pathname.slice(0, markerIndex));\n}\n\nfunction pathMatchesBasePath(pathname: string, basePath: string): boolean {\n return pathname === basePath || pathname.startsWith(`${basePath}/`);\n}\n\nfunction isWorkspaceRuntime(): boolean {\n const env = clientEnv();\n return (\n env?.VITE_AGENT_NATIVE_WORKSPACE === \"1\" ||\n env?.AGENT_NATIVE_WORKSPACE === \"1\" ||\n typeof env?.VITE_AGENT_NATIVE_WORKSPACE_APPS_JSON === \"string\"\n );\n}\n\nfunction workspacePathBasePath(): string {\n if (typeof window === \"undefined\" || !isWorkspaceRuntime()) return \"\";\n const segment = window.location.pathname.split(\"/\").find(Boolean);\n if (!segment || segment === \"_agent-native\" || segment === \"api\") return \"\";\n return normalizeBasePath(segment);\n}\n\nfunction externalEmbedTargetBasePath(): string {\n if (typeof window === \"undefined\") return \"\";\n const target = (\n window as Window & {\n __AGENT_NATIVE_EXTERNAL_EMBED?: { target?: unknown };\n }\n ).__AGENT_NATIVE_EXTERNAL_EMBED?.target;\n if (typeof target !== \"string\" || !target.startsWith(\"/\")) return \"\";\n try {\n const url = new URL(target, \"http://agent-native.invalid\");\n const markerIndex = url.pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);\n if (markerIndex > 0) {\n return normalizeBasePath(url.pathname.slice(0, markerIndex));\n }\n if (isWorkspaceRuntime()) {\n const segment = url.pathname.split(\"/\").find(Boolean);\n if (segment && segment !== \"_agent-native\" && segment !== \"api\") {\n return normalizeBasePath(segment);\n }\n }\n } catch {\n return \"\";\n }\n return \"\";\n}\n\nexport function appBasePath(): string {\n initializeAgentNativeClient();\n const externalEmbed = externalEmbedTargetBasePath();\n if (externalEmbed) return externalEmbed;\n const configured = configuredBasePath();\n const derived = pathDerivedBasePath();\n if (!configured) return derived;\n if (typeof window === \"undefined\") return configured;\n\n const pathname = window.location.pathname;\n if (pathMatchesBasePath(pathname, configured)) return configured;\n\n // In a multi-app workspace, a globally configured base can bleed from one\n // app build into another. Prefer the live mount path when they disagree.\n return derived || workspacePathBasePath() || configured;\n}\n\nexport function appPath(path: string): string {\n if (!path.startsWith(\"/\")) return path;\n const basePath = appBasePath();\n if (!basePath) return path;\n if (path === basePath || path.startsWith(`${basePath}/`)) return path;\n return `${basePath}${path}`;\n}\n\nexport function appApiPath(path: string): string {\n const normalized =\n path === \"/api\" || path.startsWith(\"/api/\")\n ? path\n : `/api/${path.replace(/^\\/+/, \"\")}`;\n return appPath(normalized);\n}\n\nexport function agentNativePath(path: string): string {\n if (!path.startsWith(FRAMEWORK_ROUTE_PREFIX)) return path;\n return appPath(path);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { invokeConfiguredAutomationWorkflow, type InvokeConfiguredAutomationWorkflowInput, } from "../automation.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,KAAK,uCAAuC,GAC7C,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { invokeConfiguredAutomationWorkflow, } from "../automation.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,GAEnC,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n invokeConfiguredAutomationWorkflow,\n type InvokeConfiguredAutomationWorkflowInput,\n} from \"../automation.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./Changelog.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/changelog/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./Changelog.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/changelog/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from \"./Changelog.js\";\n"]}
@@ -1,16 +1,5 @@
1
1
  import type { ToolRendererContext } from "../tool-render-registry.js";
2
- export interface InlineExtensionToolResult {
3
- mode: "transient" | "persisted";
4
- id: string;
5
- name: string;
6
- description?: string;
7
- content?: string;
8
- path?: string;
9
- updatedAt?: string;
10
- context?: Record<string, unknown>;
11
- initialHeight?: number;
12
- }
13
- export declare function normalizeInlineExtensionToolResult(context: ToolRendererContext): InlineExtensionToolResult | null;
2
+ export { normalizeInlineExtensionToolResult, type InlineExtensionToolResult, } from "./inline-extension-result.js";
14
3
  export declare function InlineExtensionWidget({ context, }: {
15
4
  context: ToolRendererContext;
16
5
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"InlineExtensionWidget.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2CD,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,mBAAmB,GAC3B,yBAAyB,GAAG,IAAI,CA2BlC;AAED,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,GACR,EAAE;IACD,OAAO,EAAE,mBAAmB,CAAC;CAC9B,sCA2CA"}
1
+ {"version":3,"file":"InlineExtensionWidget.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,EACL,kCAAkC,EAClC,KAAK,yBAAyB,GAC/B,MAAM,8BAA8B,CAAC;AAEtC,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,GACR,EAAE;IACD,OAAO,EAAE,mBAAmB,CAAC;CAC9B,sCA2CA"}
@@ -1,73 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { IconExternalLink, IconSparkles } from "@tabler/icons-react";
3
- import { extensionPath } from "../../../extensions/path.js";
4
3
  import { appPath } from "../../api-path.js";
5
4
  import { InlineExtensionFrame } from "../../extensions/InlineExtensionFrame.js";
6
- function isRecord(value) {
7
- return !!value && typeof value === "object" && !Array.isArray(value);
8
- }
9
- function stringValue(value) {
10
- return typeof value === "string" && value.trim() ? value.trim() : undefined;
11
- }
12
- function recordValue(value) {
13
- return isRecord(value) ? value : undefined;
14
- }
15
- function initialHeightValue(value) {
16
- const height = Number(value);
17
- if (!Number.isFinite(height) || height <= 0)
18
- return undefined;
19
- return Math.min(Math.max(Math.round(height), 120), 1000);
20
- }
21
- function normalizeInlineExtension(value) {
22
- if (!isRecord(value))
23
- return null;
24
- const id = stringValue(value.id);
25
- const name = stringValue(value.name);
26
- if (!id || !name)
27
- return null;
28
- const mode = value.mode === "transient" ? "transient" : "persisted";
29
- const content = stringValue(value.content);
30
- if (mode === "transient" && !content)
31
- return null;
32
- return {
33
- mode,
34
- id,
35
- name,
36
- description: stringValue(value.description),
37
- content,
38
- path: stringValue(value.path),
39
- updatedAt: stringValue(value.updatedAt),
40
- context: recordValue(value.context),
41
- initialHeight: initialHeightValue(value.initialHeight),
42
- };
43
- }
44
- export function normalizeInlineExtensionToolResult(context) {
45
- const result = context.resultJson;
46
- if (!isRecord(result))
47
- return null;
48
- const inline = normalizeInlineExtension(result.inlineExtension);
49
- if (inline)
50
- return inline;
51
- if (isRecord(result.extension)) {
52
- const id = stringValue(result.extension.id);
53
- const name = stringValue(result.extension.name);
54
- if (!id || !name)
55
- return null;
56
- return {
57
- mode: "persisted",
58
- id,
59
- name,
60
- description: stringValue(result.extension.description),
61
- path: stringValue(result.extension.path) ??
62
- stringValue(result.path) ??
63
- extensionPath(id, name),
64
- updatedAt: stringValue(result.extension.updatedAt),
65
- context: recordValue(result.context),
66
- initialHeight: initialHeightValue(result.initialHeight),
67
- };
68
- }
69
- return null;
70
- }
5
+ import { normalizeInlineExtensionToolResult } from "./inline-extension-result.js";
6
+ export { normalizeInlineExtensionToolResult, } from "./inline-extension-result.js";
71
7
  export function InlineExtensionWidget({ context, }) {
72
8
  const result = normalizeInlineExtensionToolResult(context);
73
9
  if (!result)
@@ -1 +1 @@
1
- {"version":3,"file":"InlineExtensionWidget.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAehF,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC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Aa,IAAI,GAAG,GAC1C,IACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconExternalLink, IconSparkles } from \"@tabler/icons-react\";\n\nimport { extensionPath } from \"../../../extensions/path.js\";\nimport { appPath } from \"../../api-path.js\";\nimport { InlineExtensionFrame } from \"../../extensions/InlineExtensionFrame.js\";\nimport type { ToolRendererContext } from \"../tool-render-registry.js\";\n\nexport interface InlineExtensionToolResult {\n mode: \"transient\" | \"persisted\";\n id: string;\n name: string;\n description?: string;\n content?: string;\n path?: string;\n updatedAt?: string;\n context?: Record<string, unknown>;\n initialHeight?: number;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction stringValue(value: unknown): string | undefined {\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction recordValue(value: unknown): Record<string, unknown> | undefined {\n return isRecord(value) ? value : undefined;\n}\n\nfunction initialHeightValue(value: unknown): number | undefined {\n const height = Number(value);\n if (!Number.isFinite(height) || height <= 0) return undefined;\n return Math.min(Math.max(Math.round(height), 120), 1000);\n}\n\nfunction normalizeInlineExtension(\n value: unknown,\n): InlineExtensionToolResult | null {\n if (!isRecord(value)) return null;\n const id = stringValue(value.id);\n const name = stringValue(value.name);\n if (!id || !name) return null;\n const mode = value.mode === \"transient\" ? \"transient\" : \"persisted\";\n const content = stringValue(value.content);\n if (mode === \"transient\" && !content) return null;\n return {\n mode,\n id,\n name,\n description: stringValue(value.description),\n content,\n path: stringValue(value.path),\n updatedAt: stringValue(value.updatedAt),\n context: recordValue(value.context),\n initialHeight: initialHeightValue(value.initialHeight),\n };\n}\n\nexport function normalizeInlineExtensionToolResult(\n context: ToolRendererContext,\n): InlineExtensionToolResult | null {\n const result = context.resultJson;\n if (!isRecord(result)) return null;\n\n const inline = normalizeInlineExtension(result.inlineExtension);\n if (inline) return inline;\n\n if (isRecord(result.extension)) {\n const id = stringValue(result.extension.id);\n const name = stringValue(result.extension.name);\n if (!id || !name) return null;\n return {\n mode: \"persisted\",\n id,\n name,\n description: stringValue(result.extension.description),\n path:\n stringValue(result.extension.path) ??\n stringValue(result.path) ??\n extensionPath(id, name),\n updatedAt: stringValue(result.extension.updatedAt),\n context: recordValue(result.context),\n initialHeight: initialHeightValue(result.initialHeight),\n };\n }\n\n return null;\n}\n\nexport function InlineExtensionWidget({\n context,\n}: {\n context: ToolRendererContext;\n}) {\n const result = normalizeInlineExtensionToolResult(context);\n if (!result) return null;\n\n const href = result.path ? appPath(result.path) : undefined;\n\n return (\n <div className=\"my-1.5 overflow-hidden rounded-lg border border-border bg-background text-foreground shadow-sm\">\n <div className=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <IconSparkles className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-medium\">{result.name}</div>\n {result.description ? (\n <div className=\"truncate text-[11px] text-muted-foreground\">\n {result.description}\n </div>\n ) : null}\n </div>\n {href ? (\n <a\n href={href}\n className=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground\"\n aria-label=\"Open extension\"\n >\n <IconExternalLink className=\"h-4 w-4\" />\n </a>\n ) : null}\n </div>\n <InlineExtensionFrame\n extensionId={result.mode === \"persisted\" ? result.id : undefined}\n extension={{\n id: result.id,\n name: result.name,\n description: result.description,\n content: result.mode === \"transient\" ? result.content : undefined,\n updatedAt: result.updatedAt,\n mode: result.mode,\n }}\n context={result.context}\n initialHeight={result.initialHeight ?? 260}\n />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"InlineExtensionWidget.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EA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WAAW;oBAC/B,OAAO,EAAE,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;oBACjE,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,IAAI,EAAE,MAAM,CAAC,IAAI;iBAClB,EACD,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,GAAG,GAC1C,IACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconExternalLink, IconSparkles } from \"@tabler/icons-react\";\n\nimport { appPath } from \"../../api-path.js\";\nimport { InlineExtensionFrame } from \"../../extensions/InlineExtensionFrame.js\";\nimport type { ToolRendererContext } from \"../tool-render-registry.js\";\nimport { normalizeInlineExtensionToolResult } from \"./inline-extension-result.js\";\n\nexport {\n normalizeInlineExtensionToolResult,\n type InlineExtensionToolResult,\n} from \"./inline-extension-result.js\";\n\nexport function InlineExtensionWidget({\n context,\n}: {\n context: ToolRendererContext;\n}) {\n const result = normalizeInlineExtensionToolResult(context);\n if (!result) return null;\n\n const href = result.path ? appPath(result.path) : undefined;\n\n return (\n <div className=\"my-1.5 overflow-hidden rounded-lg border border-border bg-background text-foreground shadow-sm\">\n <div className=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <IconSparkles className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-medium\">{result.name}</div>\n {result.description ? (\n <div className=\"truncate text-[11px] text-muted-foreground\">\n {result.description}\n </div>\n ) : null}\n </div>\n {href ? (\n <a\n href={href}\n className=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground\"\n aria-label=\"Open extension\"\n >\n <IconExternalLink className=\"h-4 w-4\" />\n </a>\n ) : null}\n </div>\n <InlineExtensionFrame\n extensionId={result.mode === \"persisted\" ? result.id : undefined}\n extension={{\n id: result.id,\n name: result.name,\n description: result.description,\n content: result.mode === \"transient\" ? result.content : undefined,\n updatedAt: result.updatedAt,\n mode: result.mode,\n }}\n context={result.context}\n initialHeight={result.initialHeight ?? 260}\n />\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-tool-renderers.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAC;AAiGpC,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAQT;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,GAAG,IAAI,CAc9B;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,GAAG,IAAI,CAU9B"}
1
+ {"version":3,"file":"builtin-tool-renderers.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAC;AAqIpC,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAQT;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,GAAG,IAAI,CAc9B;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,GAAG,IAAI,CAU9B"}
@@ -1,11 +1,21 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { lazy, Suspense } from "react";
2
3
  import { ACTION_CHAT_UI_DATA_CHART_RENDERER, ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER, ACTION_CHAT_UI_DATA_TABLE_RENDERER, ACTION_CHAT_UI_DATA_WIDGET_RENDERER, ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER, } from "../../../action-ui.js";
3
4
  import { registerReservedActionChatRenderer, registerReservedFallbackToolRenderer, } from "../tool-render-registry.js";
4
5
  import { DATA_CHART_WIDGET, DATA_INSIGHTS_WIDGET, DATA_TABLE_WIDGET, normalizeDataWidgetKind, normalizeDataWidgetResult, } from "./data-widget-types.js";
5
- import { DataChartWidget } from "./DataChartWidget.js";
6
- import { DataInsightsWidget } from "./DataInsightsWidget.js";
7
- import { DataTableWidget } from "./DataTableWidget.js";
8
- import { InlineExtensionWidget, normalizeInlineExtensionToolResult, } from "./InlineExtensionWidget.js";
6
+ import { normalizeInlineExtensionToolResult } from "./inline-extension-result.js";
7
+ const LazyDataChartWidget = lazy(() => import("./DataChartWidget.js").then((module) => ({
8
+ default: module.DataChartWidget,
9
+ })));
10
+ const LazyDataInsightsWidget = lazy(() => import("./DataInsightsWidget.js").then((module) => ({
11
+ default: module.DataInsightsWidget,
12
+ })));
13
+ const LazyDataTableWidget = lazy(() => import("./DataTableWidget.js").then((module) => ({
14
+ default: module.DataTableWidget,
15
+ })));
16
+ const LazyInlineExtensionWidget = lazy(() => import("./InlineExtensionWidget.js").then((module) => ({
17
+ default: module.InlineExtensionWidget,
18
+ })));
9
19
  function isRecord(value) {
10
20
  return !!value && typeof value === "object" && !Array.isArray(value);
11
21
  }
@@ -55,18 +65,21 @@ function renderDataWidget(context) {
55
65
  return null;
56
66
  const widget = normalizeDataWidgetKind(result.widget);
57
67
  if (widget === DATA_TABLE_WIDGET && result.table) {
58
- return (_jsx(DataTableWidget, { table: result.table, action: result.display?.primaryAction }));
68
+ return (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyDataTableWidget, { table: result.table, action: result.display?.primaryAction }) }));
59
69
  }
60
70
  if (widget === DATA_CHART_WIDGET && result.chartSeries) {
61
- return _jsx(DataChartWidget, { chart: result.chartSeries });
71
+ return (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyDataChartWidget, { chart: result.chartSeries }) }));
62
72
  }
63
73
  if (widget === DATA_INSIGHTS_WIDGET) {
64
- return _jsx(DataInsightsWidget, { result: result });
74
+ return (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyDataInsightsWidget, { result: result }) }));
65
75
  }
66
76
  return null;
67
77
  }
78
+ function BuiltinToolRendererSkeleton() {
79
+ return (_jsx("div", { "aria-label": "Loading tool result", className: "my-1.5 h-24 animate-pulse rounded-lg border border-border bg-muted/30" }));
80
+ }
68
81
  const BuiltinDataWidgetRenderer = ({ context }) => renderDataWidget(context);
69
- const BuiltinInlineExtensionRenderer = ({ context }) => normalizeInlineExtensionToolResult(context) ? (_jsx(InlineExtensionWidget, { context: context })) : null;
82
+ const BuiltinInlineExtensionRenderer = ({ context }) => normalizeInlineExtensionToolResult(context) ? (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyInlineExtensionWidget, { context: context }) })) : null;
70
83
  export function isBuiltinDataWidgetActionRenderer(context) {
71
84
  const renderer = context.chatUI?.renderer;
72
85
  return (renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER ||
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-tool-renderers.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAClC,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kCAAkC,EAClC,oCAAoC,GAGrC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAE1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,k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B,EAAE,kCAAkC,CAAC;IACvD,CAAC,oBAAoB,EAAE,qCAAqC,CAAC;IAC7D,CAAC,kBAAkB,EAAE,mCAAmC,CAAC;IACzD,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;CAC3D,EAAE,CAAC;IACX,kCAAkC,CAAC;QACjC,EAAE;QACF,QAAQ;QACR,SAAS,EACP,QAAQ,KAAK,wCAAwC;YACnD,CAAC,CAAC,8BAA8B;YAChC,CAAC,CAAC,yBAAyB;KAChC,CAAC,CAAC;AACL,CAAC;AAED,oCAAoC,CAAC;IACnC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,+BAA+B,CAAC,OAAO,CAAC,KAAK,IAAI;IACrE,SAAS,EAAE,yBAAyB;CACrC,CAAC,CAAC","sourcesContent":["import {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,\n} from \"../../../action-ui.js\";\nimport {\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n type ToolRendererContext,\n type ToolRendererComponent,\n} from \"../tool-render-registry.js\";\nimport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataWidgetResult,\n} from \"./data-widget-types.js\";\nimport { DataChartWidget } from \"./DataChartWidget.js\";\nimport { DataInsightsWidget } from \"./DataInsightsWidget.js\";\nimport { DataTableWidget } from \"./DataTableWidget.js\";\nimport {\n InlineExtensionWidget,\n normalizeInlineExtensionToolResult,\n} from \"./InlineExtensionWidget.js\";\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction normalizeActionDataWidgetResult(\n context: ToolRendererContext,\n): DataWidgetResult | null {\n const renderer = context.chatUI?.renderer;\n if (isRecord(context.resultJson)) {\n if (renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_TABLE_WIDGET,\n table: isRecord(context.resultJson.table)\n ? context.resultJson.table\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_CHART_WIDGET,\n chartSeries: isRecord(context.resultJson.chartSeries)\n ? context.resultJson.chartSeries\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_INSIGHTS_WIDGET,\n });\n }\n }\n\n const result = normalizeDataWidgetResult(context.resultJson);\n if (result) return result;\n\n if (\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER ||\n context.toolName === \"render-data-widget\"\n ) {\n const argsResult = normalizeDataWidgetResult(context.args);\n if (argsResult) return argsResult;\n }\n\n return null;\n}\n\nfunction renderDataWidget(context: ToolRendererContext) {\n const result =\n normalizeActionDataWidgetResult(context) ??\n normalizeDataWidgetResult(context.resultJson);\n if (!result) return null;\n const widget = normalizeDataWidgetKind(result.widget);\n if (widget === DATA_TABLE_WIDGET && result.table) {\n return (\n <DataTableWidget\n table={result.table}\n action={result.display?.primaryAction}\n />\n );\n }\n if (widget === DATA_CHART_WIDGET && result.chartSeries) {\n return <DataChartWidget chart={result.chartSeries} />;\n }\n if (widget === DATA_INSIGHTS_WIDGET) {\n return <DataInsightsWidget result={result} />;\n }\n return null;\n}\n\nconst BuiltinDataWidgetRenderer: ToolRendererComponent = ({ context }) =>\n renderDataWidget(context);\n\nconst BuiltinInlineExtensionRenderer: ToolRendererComponent = ({ context }) =>\n normalizeInlineExtensionToolResult(context) ? (\n <InlineExtensionWidget context={context} />\n ) : null;\n\nexport function isBuiltinDataWidgetActionRenderer(\n context: ToolRendererContext,\n): boolean {\n const renderer = context.chatUI?.renderer;\n return (\n renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER\n );\n}\n\nexport function resolveBuiltinActionChatRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n if (\n isBuiltinDataWidgetActionRenderer(context) &&\n normalizeActionDataWidgetResult(context)\n ) {\n return BuiltinDataWidgetRenderer;\n }\n return null;\n}\n\nexport function resolveBuiltinFallbackToolRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n return normalizeActionDataWidgetResult(context) !== null\n ? BuiltinDataWidgetRenderer\n : null;\n}\n\nfor (const [id, renderer] of [\n [\"core.data-table\", ACTION_CHAT_UI_DATA_TABLE_RENDERER],\n [\"core.data-chart\", ACTION_CHAT_UI_DATA_CHART_RENDERER],\n [\"core.data-insights\", ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER],\n [\"core.data-widget\", ACTION_CHAT_UI_DATA_WIDGET_RENDERER],\n [\"core.inline-extension\", ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER],\n] as const) {\n registerReservedActionChatRenderer({\n id,\n renderer,\n Component:\n renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER\n ? BuiltinInlineExtensionRenderer\n : BuiltinDataWidgetRenderer,\n });\n}\n\nregisterReservedFallbackToolRenderer({\n id: \"core.data-widgets\",\n match: (context) => normalizeActionDataWidgetResult(context) !== null,\n Component: BuiltinDataWidgetRenderer,\n});\n"]}
1
+ {"version":3,"file":"builtin-tool-renderers.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAClC,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kCAAkC,EAClC,oCAAoC,GAGrC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAE1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAElF,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,EAAE,CACpC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC,eAAe;CAChC,CAAC,CAAC,CACJ,CAAC;AACF,MAAM,sBAAsB,GAAG,IAAI,CAAC,GAAG,EAAE,CACvC,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC,kBAAkB;CACnC,CAAC,CAAC,CACJ,CAAC;AACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,EAAE,CACpC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC,eAAe;CAChC,CAAC,CAAC,CACJ,CAAC;AACF,MAAM,yBAAyB,GAAG,IA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CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,OAA4B;IAE5B,IACE,OAAO,CAAC,MAAM,EAAE,QAAQ,KAAK,wCAAwC;QACrE,kCAAkC,CAAC,OAAO,CAAC,EAC3C,CAAC;QACD,OAAO,8BAA8B,CAAC;IACxC,CAAC;IACD,OAAO,+BAA+B,CAAC,OAAO,CAAC,KAAK,IAAI;QACtD,CAAC,CAAC,yBAAyB;QAC3B,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,KAAK,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI;IAC3B,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IACvD,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IACvD,CAAC,oBAAoB,EAAE,qCAAqC,CAAC;IAC7D,CAAC,kBAAkB,EAAE,mCAAmC,CAAC;IACzD,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;CAC3D,EAAE,CAAC;IACX,kCAAkC,CAAC;QACjC,EAAE;QACF,QAAQ;QACR,SAAS,EACP,QAAQ,KAAK,wCAAwC;YACnD,CAAC,CAAC,8BAA8B;YAChC,CAAC,CAAC,yBAAyB;KAChC,CAAC,CAAC;AACL,CAAC;AAED,oCAAoC,CAAC;IACnC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,+BAA+B,CAAC,OAAO,CAAC,KAAK,IAAI;IACrE,SAAS,EAAE,yBAAyB;CACrC,CAAC,CAAC","sourcesContent":["import { lazy, Suspense } from \"react\";\n\nimport {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,\n} from \"../../../action-ui.js\";\nimport {\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n type ToolRendererContext,\n type ToolRendererComponent,\n} from \"../tool-render-registry.js\";\nimport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataWidgetResult,\n} from \"./data-widget-types.js\";\nimport { normalizeInlineExtensionToolResult } from \"./inline-extension-result.js\";\n\nconst LazyDataChartWidget = lazy(() =>\n import(\"./DataChartWidget.js\").then((module) => ({\n default: module.DataChartWidget,\n })),\n);\nconst LazyDataInsightsWidget = lazy(() =>\n import(\"./DataInsightsWidget.js\").then((module) => ({\n default: module.DataInsightsWidget,\n })),\n);\nconst LazyDataTableWidget = lazy(() =>\n import(\"./DataTableWidget.js\").then((module) => ({\n default: module.DataTableWidget,\n })),\n);\nconst LazyInlineExtensionWidget = lazy(() =>\n import(\"./InlineExtensionWidget.js\").then((module) => ({\n default: module.InlineExtensionWidget,\n })),\n);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction normalizeActionDataWidgetResult(\n context: ToolRendererContext,\n): DataWidgetResult | null {\n const renderer = context.chatUI?.renderer;\n if (isRecord(context.resultJson)) {\n if (renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_TABLE_WIDGET,\n table: isRecord(context.resultJson.table)\n ? context.resultJson.table\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_CHART_WIDGET,\n chartSeries: isRecord(context.resultJson.chartSeries)\n ? context.resultJson.chartSeries\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_INSIGHTS_WIDGET,\n });\n }\n }\n\n const result = normalizeDataWidgetResult(context.resultJson);\n if (result) return result;\n\n if (\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER ||\n context.toolName === \"render-data-widget\"\n ) {\n const argsResult = normalizeDataWidgetResult(context.args);\n if (argsResult) return argsResult;\n }\n\n return null;\n}\n\nfunction renderDataWidget(context: ToolRendererContext) {\n const result =\n normalizeActionDataWidgetResult(context) ??\n normalizeDataWidgetResult(context.resultJson);\n if (!result) return null;\n const widget = normalizeDataWidgetKind(result.widget);\n if (widget === DATA_TABLE_WIDGET && result.table) {\n return (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyDataTableWidget\n table={result.table}\n action={result.display?.primaryAction}\n />\n </Suspense>\n );\n }\n if (widget === DATA_CHART_WIDGET && result.chartSeries) {\n return (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyDataChartWidget chart={result.chartSeries} />\n </Suspense>\n );\n }\n if (widget === DATA_INSIGHTS_WIDGET) {\n return (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyDataInsightsWidget result={result} />\n </Suspense>\n );\n }\n return null;\n}\n\nfunction BuiltinToolRendererSkeleton() {\n return (\n <div\n aria-label=\"Loading tool result\"\n className=\"my-1.5 h-24 animate-pulse rounded-lg border border-border bg-muted/30\"\n />\n );\n}\n\nconst BuiltinDataWidgetRenderer: ToolRendererComponent = ({ context }) =>\n renderDataWidget(context);\n\nconst BuiltinInlineExtensionRenderer: ToolRendererComponent = ({ context }) =>\n normalizeInlineExtensionToolResult(context) ? (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyInlineExtensionWidget context={context} />\n </Suspense>\n ) : null;\n\nexport function isBuiltinDataWidgetActionRenderer(\n context: ToolRendererContext,\n): boolean {\n const renderer = context.chatUI?.renderer;\n return (\n renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER\n );\n}\n\nexport function resolveBuiltinActionChatRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n if (\n isBuiltinDataWidgetActionRenderer(context) &&\n normalizeActionDataWidgetResult(context)\n ) {\n return BuiltinDataWidgetRenderer;\n }\n return null;\n}\n\nexport function resolveBuiltinFallbackToolRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n return normalizeActionDataWidgetResult(context) !== null\n ? BuiltinDataWidgetRenderer\n : null;\n}\n\nfor (const [id, renderer] of [\n [\"core.data-table\", ACTION_CHAT_UI_DATA_TABLE_RENDERER],\n [\"core.data-chart\", ACTION_CHAT_UI_DATA_CHART_RENDERER],\n [\"core.data-insights\", ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER],\n [\"core.data-widget\", ACTION_CHAT_UI_DATA_WIDGET_RENDERER],\n [\"core.inline-extension\", ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER],\n] as const) {\n registerReservedActionChatRenderer({\n id,\n renderer,\n Component:\n renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER\n ? BuiltinInlineExtensionRenderer\n : BuiltinDataWidgetRenderer,\n });\n}\n\nregisterReservedFallbackToolRenderer({\n id: \"core.data-widgets\",\n match: (context) => normalizeActionDataWidgetResult(context) !== null,\n Component: BuiltinDataWidgetRenderer,\n});\n"]}
@@ -0,0 +1,14 @@
1
+ import type { ToolRendererContext } from "../tool-render-registry.js";
2
+ export interface InlineExtensionToolResult {
3
+ mode: "transient" | "persisted";
4
+ id: string;
5
+ name: string;
6
+ description?: string;
7
+ content?: string;
8
+ path?: string;
9
+ updatedAt?: string;
10
+ context?: Record<string, unknown>;
11
+ initialHeight?: number;
12
+ }
13
+ export declare function normalizeInlineExtensionToolResult(context: ToolRendererContext): InlineExtensionToolResult | null;
14
+ //# sourceMappingURL=inline-extension-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-extension-result.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/inline-extension-result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2CD,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,mBAAmB,GAC3B,yBAAyB,GAAG,IAAI,CA2BlC"}