@agent-native/core 0.109.3 → 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 (1744) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +19 -0
  3. package/corpus/core/docs/content/actions.mdx +2 -4
  4. package/corpus/core/docs/content/agent-native-toolkit.mdx +46 -13
  5. package/corpus/core/docs/content/agent-surfaces.mdx +2 -4
  6. package/corpus/core/docs/content/audit-log.mdx +1 -2
  7. package/corpus/core/docs/content/authentication.mdx +3 -2
  8. package/corpus/core/docs/content/client.mdx +19 -18
  9. package/corpus/core/docs/content/components.mdx +1 -1
  10. package/corpus/core/docs/content/context-awareness.mdx +4 -7
  11. package/corpus/core/docs/content/creating-templates.mdx +7 -5
  12. package/corpus/core/docs/content/doctor.mdx +27 -6
  13. package/corpus/core/docs/content/drop-in-agent.mdx +6 -11
  14. package/corpus/core/docs/content/embedding-sdk.mdx +8 -10
  15. package/corpus/core/docs/content/getting-started.mdx +4 -2
  16. package/corpus/core/docs/content/internationalization.mdx +9 -6
  17. package/corpus/core/docs/content/key-concepts.mdx +2 -4
  18. package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -4
  19. package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
  20. package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
  21. package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +1 -2
  22. package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +3 -2
  23. package/corpus/core/docs/content/locales/ar-SA/client.mdx +19 -18
  24. package/corpus/core/docs/content/locales/ar-SA/components.mdx +1 -1
  25. package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
  26. package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
  27. package/corpus/core/docs/content/locales/ar-SA/doctor.mdx +10 -0
  28. package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
  29. package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
  30. package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +9 -6
  31. package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
  32. package/corpus/core/docs/content/locales/ar-SA/observability.mdx +1 -2
  33. package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
  34. package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
  35. package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +1 -2
  36. package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -2
  37. package/corpus/core/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
  38. package/corpus/core/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
  39. package/corpus/core/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
  40. package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +2 -4
  41. package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
  42. package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -4
  43. package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
  44. package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
  45. package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +1 -2
  46. package/corpus/core/docs/content/locales/de-DE/authentication.mdx +3 -2
  47. package/corpus/core/docs/content/locales/de-DE/client.mdx +19 -18
  48. package/corpus/core/docs/content/locales/de-DE/components.mdx +1 -1
  49. package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +4 -7
  50. package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +7 -5
  51. package/corpus/core/docs/content/locales/de-DE/doctor.mdx +10 -0
  52. package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
  53. package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
  54. package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +9 -6
  55. package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +2 -4
  56. package/corpus/core/docs/content/locales/de-DE/observability.mdx +1 -2
  57. package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
  58. package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
  59. package/corpus/core/docs/content/locales/de-DE/sharing.mdx +1 -2
  60. package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -2
  61. package/corpus/core/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
  62. package/corpus/core/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
  63. package/corpus/core/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
  64. package/corpus/core/docs/content/locales/de-DE/tracking.mdx +2 -4
  65. package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
  66. package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -4
  67. package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
  68. package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
  69. package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +1 -2
  70. package/corpus/core/docs/content/locales/es-ES/authentication.mdx +3 -2
  71. package/corpus/core/docs/content/locales/es-ES/client.mdx +19 -18
  72. package/corpus/core/docs/content/locales/es-ES/components.mdx +1 -1
  73. package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +4 -7
  74. package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +7 -5
  75. package/corpus/core/docs/content/locales/es-ES/doctor.mdx +10 -0
  76. package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
  77. package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
  78. package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +9 -6
  79. package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +2 -4
  80. package/corpus/core/docs/content/locales/es-ES/observability.mdx +1 -2
  81. package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
  82. package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
  83. package/corpus/core/docs/content/locales/es-ES/sharing.mdx +1 -2
  84. package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -2
  85. package/corpus/core/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
  86. package/corpus/core/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
  87. package/corpus/core/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
  88. package/corpus/core/docs/content/locales/es-ES/tracking.mdx +2 -4
  89. package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
  90. package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -4
  91. package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
  92. package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
  93. package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +1 -2
  94. package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +3 -2
  95. package/corpus/core/docs/content/locales/fr-FR/client.mdx +19 -18
  96. package/corpus/core/docs/content/locales/fr-FR/components.mdx +1 -1
  97. package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
  98. package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
  99. package/corpus/core/docs/content/locales/fr-FR/doctor.mdx +10 -0
  100. package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
  101. package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
  102. package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +9 -6
  103. package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
  104. package/corpus/core/docs/content/locales/fr-FR/observability.mdx +1 -2
  105. package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
  106. package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
  107. package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +1 -2
  108. package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -2
  109. package/corpus/core/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
  110. package/corpus/core/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
  111. package/corpus/core/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
  112. package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +2 -4
  113. package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
  114. package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -4
  115. package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
  116. package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
  117. package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +1 -2
  118. package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +3 -2
  119. package/corpus/core/docs/content/locales/hi-IN/client.mdx +19 -18
  120. package/corpus/core/docs/content/locales/hi-IN/components.mdx +1 -1
  121. package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
  122. package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
  123. package/corpus/core/docs/content/locales/hi-IN/doctor.mdx +10 -0
  124. package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
  125. package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
  126. package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +9 -6
  127. package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
  128. package/corpus/core/docs/content/locales/hi-IN/observability.mdx +1 -2
  129. package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
  130. package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
  131. package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +1 -2
  132. package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -2
  133. package/corpus/core/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
  134. package/corpus/core/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
  135. package/corpus/core/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
  136. package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +2 -4
  137. package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
  138. package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -4
  139. package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
  140. package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
  141. package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +1 -2
  142. package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +3 -2
  143. package/corpus/core/docs/content/locales/ja-JP/client.mdx +19 -18
  144. package/corpus/core/docs/content/locales/ja-JP/components.mdx +1 -1
  145. package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
  146. package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
  147. package/corpus/core/docs/content/locales/ja-JP/doctor.mdx +10 -0
  148. package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
  149. package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
  150. package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +9 -6
  151. package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
  152. package/corpus/core/docs/content/locales/ja-JP/observability.mdx +1 -2
  153. package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
  154. package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
  155. package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +1 -2
  156. package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -2
  157. package/corpus/core/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
  158. package/corpus/core/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
  159. package/corpus/core/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
  160. package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +2 -4
  161. package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
  162. package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -4
  163. package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
  164. package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
  165. package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +1 -2
  166. package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +3 -2
  167. package/corpus/core/docs/content/locales/ko-KR/client.mdx +19 -18
  168. package/corpus/core/docs/content/locales/ko-KR/components.mdx +1 -1
  169. package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
  170. package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
  171. package/corpus/core/docs/content/locales/ko-KR/doctor.mdx +10 -0
  172. package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
  173. package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
  174. package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +9 -6
  175. package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
  176. package/corpus/core/docs/content/locales/ko-KR/observability.mdx +1 -2
  177. package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
  178. package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
  179. package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +1 -2
  180. package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -2
  181. package/corpus/core/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
  182. package/corpus/core/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
  183. package/corpus/core/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
  184. package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +2 -4
  185. package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
  186. package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -4
  187. package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
  188. package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
  189. package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +1 -2
  190. package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +3 -2
  191. package/corpus/core/docs/content/locales/pt-BR/client.mdx +19 -18
  192. package/corpus/core/docs/content/locales/pt-BR/components.mdx +1 -1
  193. package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
  194. package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
  195. package/corpus/core/docs/content/locales/pt-BR/doctor.mdx +10 -0
  196. package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
  197. package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
  198. package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +9 -6
  199. package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
  200. package/corpus/core/docs/content/locales/pt-BR/observability.mdx +1 -2
  201. package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
  202. package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
  203. package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +1 -2
  204. package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -2
  205. package/corpus/core/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
  206. package/corpus/core/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
  207. package/corpus/core/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
  208. package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +2 -4
  209. package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
  210. package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -4
  211. package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
  212. package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
  213. package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +1 -2
  214. package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +3 -2
  215. package/corpus/core/docs/content/locales/zh-CN/client.mdx +19 -18
  216. package/corpus/core/docs/content/locales/zh-CN/components.mdx +1 -1
  217. package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
  218. package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
  219. package/corpus/core/docs/content/locales/zh-CN/doctor.mdx +10 -0
  220. package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
  221. package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
  222. package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +9 -6
  223. package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
  224. package/corpus/core/docs/content/locales/zh-CN/observability.mdx +1 -2
  225. package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
  226. package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
  227. package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +1 -2
  228. package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -2
  229. package/corpus/core/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
  230. package/corpus/core/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
  231. package/corpus/core/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
  232. package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +2 -4
  233. package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
  234. package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -4
  235. package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
  236. package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
  237. package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +1 -2
  238. package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +3 -2
  239. package/corpus/core/docs/content/locales/zh-TW/client.mdx +19 -18
  240. package/corpus/core/docs/content/locales/zh-TW/components.mdx +1 -1
  241. package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
  242. package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
  243. package/corpus/core/docs/content/locales/zh-TW/doctor.mdx +10 -0
  244. package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
  245. package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
  246. package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +9 -6
  247. package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
  248. package/corpus/core/docs/content/locales/zh-TW/observability.mdx +1 -2
  249. package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
  250. package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
  251. package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +1 -2
  252. package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -2
  253. package/corpus/core/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
  254. package/corpus/core/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
  255. package/corpus/core/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
  256. package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +2 -4
  257. package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
  258. package/corpus/core/docs/content/observability.mdx +1 -2
  259. package/corpus/core/docs/content/package-lifecycle.mdx +29 -0
  260. package/corpus/core/docs/content/real-time-collaboration.mdx +8 -7
  261. package/corpus/core/docs/content/sharing.mdx +1 -2
  262. package/corpus/core/docs/content/template-chat.mdx +1 -2
  263. package/corpus/core/docs/content/toolkit-agent-ux.mdx +3 -2
  264. package/corpus/core/docs/content/toolkit-capability-packages.mdx +52 -0
  265. package/corpus/core/docs/content/toolkit-context-knowledge.mdx +46 -0
  266. package/corpus/core/docs/content/toolkit-editors-canvases.mdx +55 -0
  267. package/corpus/core/docs/content/toolkit-observability.mdx +1 -2
  268. package/corpus/core/docs/content/toolkit-settings.mdx +2 -2
  269. package/corpus/core/docs/content/toolkit-sharing.mdx +5 -2
  270. package/corpus/core/docs/content/tracking.mdx +2 -4
  271. package/corpus/core/docs/content/what-is-agent-native.mdx +1 -2
  272. package/corpus/core/export-snapshot.json +324 -0
  273. package/corpus/core/migration-manifest.json +1353 -0
  274. package/corpus/core/package.json +54 -35
  275. package/corpus/core/src/cli/create.ts +39 -3
  276. package/corpus/core/src/cli/doctor.ts +77 -7
  277. package/corpus/core/src/cli/migration-codemod.ts +569 -0
  278. package/corpus/core/src/cli/package-lifecycle.ts +2 -0
  279. package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +2 -0
  280. package/corpus/core/src/cli/upgrade.ts +63 -7
  281. package/corpus/core/src/client/agent-chat/index.ts +279 -0
  282. package/corpus/core/src/client/agent-page/AgentContextTab.tsx +3 -1
  283. package/corpus/core/src/client/analytics/index.ts +40 -0
  284. package/corpus/core/src/client/api-path.ts +2 -2
  285. package/corpus/core/src/client/automation/index.ts +4 -0
  286. package/corpus/core/src/client/changelog/index.ts +1 -0
  287. package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +5 -84
  288. package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +52 -14
  289. package/corpus/core/src/client/chat/widgets/inline-extension-result.ts +86 -0
  290. package/corpus/core/src/client/client-bootstrap.ts +7 -0
  291. package/corpus/core/src/client/context-xray/ContextMeter.tsx +31 -111
  292. package/corpus/core/src/client/context-xray/ContextSegmentRow.tsx +8 -111
  293. package/corpus/core/src/client/context-xray/ContextTreemap.tsx +6 -111
  294. package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +31 -391
  295. package/corpus/core/src/client/context-xray/SegmentProvenancePopover.tsx +4 -52
  296. package/corpus/core/src/client/context-xray/format.ts +0 -33
  297. package/corpus/core/src/client/hooks/index.ts +46 -0
  298. package/corpus/core/src/client/host/index.ts +170 -0
  299. package/corpus/core/src/client/index.ts +20 -664
  300. package/corpus/core/src/client/navigation/index.ts +54 -0
  301. package/corpus/core/src/client/resources/ResourcesPanel.tsx +1 -1
  302. package/corpus/core/src/client/resources/index.ts +2 -1
  303. package/corpus/core/src/client/resources/use-resources.ts +0 -20
  304. package/corpus/core/src/client/rich-markdown-editor/index.ts +42 -57
  305. package/corpus/core/src/client/rich-markdown-editor/uploadEditorImage.ts +2 -1
  306. package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
  307. package/corpus/core/src/client/ui/index.ts +55 -0
  308. package/corpus/core/src/client/uploads/index.ts +1 -0
  309. package/corpus/core/src/client/uploads/use-upload-resource.ts +24 -0
  310. package/corpus/core/src/client/visual-style-controls.tsx +1 -1088
  311. package/corpus/core/src/client/widgets/index.ts +41 -0
  312. package/corpus/core/src/collab/agent-identity.ts +5 -22
  313. package/corpus/core/src/collab/client.ts +1 -53
  314. package/corpus/core/src/localization/default-messages.ts +2 -1
  315. package/corpus/core/src/package-lifecycle/deprecated-imports.ts +179 -0
  316. package/corpus/core/src/package-lifecycle/index.ts +5 -0
  317. package/corpus/core/src/package-lifecycle/migration-manifest.ts +159 -0
  318. package/corpus/core/src/package-lifecycle/migration-message.ts +6 -0
  319. package/corpus/core/src/package-lifecycle/tombstone.ts +44 -0
  320. package/corpus/core/src/package-lifecycle/upgrade-error.ts +19 -0
  321. package/corpus/core/src/styles/rich-markdown-editor.css +1 -510
  322. package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
  323. package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
  324. package/corpus/core/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  325. package/corpus/core/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  326. package/corpus/core/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
  327. package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
  328. package/corpus/core/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
  329. package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  330. package/corpus/core/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
  331. package/corpus/core/src/templates/default/app/i18n/index.ts +1 -1
  332. package/corpus/core/src/templates/default/app/lib/utils.ts +1 -1
  333. package/corpus/core/src/templates/default/app/root.tsx +8 -6
  334. package/corpus/core/src/templates/default/app/routes/_index.tsx +2 -1
  335. package/corpus/core/src/templates/default/app/routes/agent.tsx +2 -1
  336. package/corpus/core/src/templates/default/app/routes/settings.tsx +2 -3
  337. package/corpus/core/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  338. package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  339. package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
  340. package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
  341. package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
  342. package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
  343. package/corpus/core/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
  344. package/corpus/core/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
  345. package/corpus/core/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  346. package/corpus/core/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  347. package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
  348. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
  349. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
  350. package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
  351. package/corpus/core/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
  352. package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  353. package/corpus/core/src/testing.ts +1 -1
  354. package/corpus/core/src/vite/action-types-plugin.ts +4 -0
  355. package/corpus/core/src/vite/client.ts +80 -62
  356. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +3 -3
  357. package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  358. package/corpus/templates/analytics/.agents/skills/feature-flags/SKILL.md +1 -1
  359. package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +4 -4
  360. package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +1 -1
  361. package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  362. package/corpus/templates/analytics/app/components/Markdown.tsx +1 -1
  363. package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +2 -1
  364. package/corpus/templates/analytics/app/components/agents/FeatureFlagsFleetPanel.tsx +6 -4
  365. package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +1 -1
  366. package/corpus/templates/analytics/app/components/auth/AuthProvider.tsx +2 -2
  367. package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
  368. package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -1
  369. package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
  370. package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
  371. package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
  372. package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
  373. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
  374. package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
  375. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +4 -6
  376. package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +1 -1
  377. package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -2
  378. package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -1
  379. package/corpus/templates/analytics/app/components/layout/Layout.tsx +3 -3
  380. package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
  381. package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +4 -6
  382. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -5
  383. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +10 -10
  384. package/corpus/templates/analytics/app/entry.client.tsx +2 -4
  385. package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +4 -1
  386. package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +6 -4
  387. package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +4 -1
  388. package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +1 -1
  389. package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -4
  390. package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +1 -1
  391. package/corpus/templates/analytics/app/hooks/use-user-pref.ts +1 -1
  392. package/corpus/templates/analytics/app/i18n/index.ts +1 -1
  393. package/corpus/templates/analytics/app/i18n-data.ts +1 -1
  394. package/corpus/templates/analytics/app/lib/api-hooks.ts +1 -1
  395. package/corpus/templates/analytics/app/lib/item-popularity.ts +1 -1
  396. package/corpus/templates/analytics/app/lib/query-metrics.ts +1 -1
  397. package/corpus/templates/analytics/app/lib/sql-query.ts +1 -1
  398. package/corpus/templates/analytics/app/lib/tab-id.ts +1 -1
  399. package/corpus/templates/analytics/app/lib/track-metric.ts +1 -1
  400. package/corpus/templates/analytics/app/lib/user-info.ts +1 -1
  401. package/corpus/templates/analytics/app/lib/utils.ts +1 -1
  402. package/corpus/templates/analytics/app/pages/Agents.tsx +5 -6
  403. package/corpus/templates/analytics/app/pages/Ask.tsx +2 -2
  404. package/corpus/templates/analytics/app/pages/DataDictionary.tsx +3 -3
  405. package/corpus/templates/analytics/app/pages/DataSources.tsx +7 -5
  406. package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -1
  407. package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -1
  408. package/corpus/templates/analytics/app/pages/Settings.tsx +5 -6
  409. package/corpus/templates/analytics/app/pages/adhoc/BlankDashboard.tsx +1 -1
  410. package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
  411. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +1 -1
  412. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -1
  413. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +1 -1
  414. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +1 -1
  415. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -1
  416. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +1 -1
  417. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +1 -1
  418. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
  419. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
  420. package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +2 -1
  421. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +2 -1
  422. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +8 -6
  423. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +1 -1
  424. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
  425. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +4 -6
  426. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
  427. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +2 -1
  428. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +1 -1
  429. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +9 -7
  430. package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +3 -6
  431. package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +4 -4
  432. package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +2 -1
  433. package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +1 -11
  434. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +2 -1
  435. package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +1 -14
  436. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +1 -1
  437. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +1 -1
  438. package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +1 -6
  439. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +1 -8
  440. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +4 -10
  441. package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +1 -6
  442. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +4 -8
  443. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +4 -10
  444. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +1 -6
  445. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +5 -6
  446. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +1 -1
  447. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +5 -5
  448. package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +2 -2
  449. package/corpus/templates/analytics/app/pages/settings/settings-search.ts +1 -1
  450. package/corpus/templates/analytics/app/root.tsx +6 -6
  451. package/corpus/templates/analytics/app/routes/agent.tsx +1 -1
  452. package/corpus/templates/analytics/app/routes/catalog.tsx +2 -2
  453. package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
  454. package/corpus/templates/analytics/app/routes/status.$slug.tsx +1 -13
  455. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +3 -3
  456. package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  457. package/corpus/templates/assets/.agents/skills/feature-flags/SKILL.md +1 -1
  458. package/corpus/templates/assets/.agents/skills/real-time-collab/SKILL.md +4 -4
  459. package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +4 -4
  460. package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +1 -1
  461. package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  462. package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -1
  463. package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +3 -3
  464. package/corpus/templates/assets/app/components/layout/Header.tsx +3 -5
  465. package/corpus/templates/assets/app/components/layout/Layout.tsx +4 -4
  466. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +6 -6
  467. package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +2 -2
  468. package/corpus/templates/assets/app/components/library/GenerationPresetsPanel.tsx +2 -1
  469. package/corpus/templates/assets/app/components/library/LibraryCard.tsx +1 -1
  470. package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
  471. package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +2 -2
  472. package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -3
  473. package/corpus/templates/assets/app/i18n/index.ts +1 -1
  474. package/corpus/templates/assets/app/i18n-data.ts +1 -1
  475. package/corpus/templates/assets/app/lib/asset-urls.ts +1 -1
  476. package/corpus/templates/assets/app/lib/utils.ts +1 -1
  477. package/corpus/templates/assets/app/root.tsx +10 -9
  478. package/corpus/templates/assets/app/routes/_index.tsx +3 -3
  479. package/corpus/templates/assets/app/routes/agent.tsx +1 -1
  480. package/corpus/templates/assets/app/routes/asset.$id.tsx +3 -3
  481. package/corpus/templates/assets/app/routes/asset.$id_.embed.tsx +1 -1
  482. package/corpus/templates/assets/app/routes/audit.tsx +2 -2
  483. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +6 -4
  484. package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +4 -4
  485. package/corpus/templates/assets/app/routes/brand-kits.$id_.settings.tsx +3 -3
  486. package/corpus/templates/assets/app/routes/library.tsx +13 -9
  487. package/corpus/templates/assets/app/routes/run.$id_.embed.tsx +1 -1
  488. package/corpus/templates/assets/app/routes/settings.tsx +11 -12
  489. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +3 -3
  490. package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +1 -1
  491. package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  492. package/corpus/templates/brain/.agents/skills/feature-flags/SKILL.md +1 -1
  493. package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +4 -4
  494. package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  495. package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +1 -1
  496. package/corpus/templates/brain/app/components/layout/Layout.tsx +2 -2
  497. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
  498. package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +3 -6
  499. package/corpus/templates/brain/app/hooks/use-navigation-state.ts +3 -4
  500. package/corpus/templates/brain/app/i18n/index.ts +1 -1
  501. package/corpus/templates/brain/app/i18n-data.ts +1 -1
  502. package/corpus/templates/brain/app/lib/utils.ts +1 -1
  503. package/corpus/templates/brain/app/root.tsx +10 -9
  504. package/corpus/templates/brain/app/routes/_index.tsx +2 -2
  505. package/corpus/templates/brain/app/routes/agent.tsx +1 -1
  506. package/corpus/templates/brain/app/routes/knowledge.tsx +2 -2
  507. package/corpus/templates/brain/app/routes/ops.tsx +2 -2
  508. package/corpus/templates/brain/app/routes/review.tsx +2 -2
  509. package/corpus/templates/brain/app/routes/search.tsx +2 -1
  510. package/corpus/templates/brain/app/routes/settings.tsx +8 -7
  511. package/corpus/templates/brain/app/routes/sources.tsx +2 -2
  512. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +3 -3
  513. package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  514. package/corpus/templates/calendar/.agents/skills/feature-flags/SKILL.md +1 -1
  515. package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +4 -4
  516. package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +1 -1
  517. package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  518. package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +1 -1
  519. package/corpus/templates/calendar/app/components/ThemeToggle.tsx +1 -1
  520. package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +1 -1
  521. package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -1
  522. package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +2 -1
  523. package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +1 -1
  524. package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +2 -1
  525. package/corpus/templates/calendar/app/components/calendar/ApolloPanel.tsx +2 -1
  526. package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +1 -1
  527. package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +2 -1
  528. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +3 -5
  529. package/corpus/templates/calendar/app/components/calendar/DayView.tsx +1 -1
  530. package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +1 -1
  531. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +1 -1
  532. package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +1 -1
  533. package/corpus/templates/calendar/app/components/calendar/EventDescription.tsx +1 -1
  534. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +1 -1
  535. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +2 -1
  536. package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +1 -1
  537. package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +2 -1
  538. package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +2 -1
  539. package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +3 -3
  540. package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -5
  541. package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
  542. package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +1 -1
  543. package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +2 -1
  544. package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +1 -1
  545. package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +2 -1
  546. package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +1 -1
  547. package/corpus/templates/calendar/app/components/calendar/WorkingLocationEditor.tsx +1 -1
  548. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -3
  549. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +4 -6
  550. package/corpus/templates/calendar/app/hooks/use-apollo.ts +1 -1
  551. package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +4 -1
  552. package/corpus/templates/calendar/app/hooks/use-availability.ts +4 -1
  553. package/corpus/templates/calendar/app/hooks/use-booking-links.ts +4 -1
  554. package/corpus/templates/calendar/app/hooks/use-bookings.ts +1 -1
  555. package/corpus/templates/calendar/app/hooks/use-db-status.ts +1 -1
  556. package/corpus/templates/calendar/app/hooks/use-events.ts +1 -1
  557. package/corpus/templates/calendar/app/hooks/use-external-calendars.ts +1 -1
  558. package/corpus/templates/calendar/app/hooks/use-google-auth.ts +2 -2
  559. package/corpus/templates/calendar/app/hooks/use-integrations.ts +1 -1
  560. package/corpus/templates/calendar/app/hooks/use-navigation-state.ts +3 -2
  561. package/corpus/templates/calendar/app/hooks/use-overlay-people.ts +1 -1
  562. package/corpus/templates/calendar/app/hooks/use-people.ts +1 -1
  563. package/corpus/templates/calendar/app/hooks/use-settings.ts +4 -1
  564. package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +2 -1
  565. package/corpus/templates/calendar/app/hooks/use-zoom-auth.ts +2 -1
  566. package/corpus/templates/calendar/app/i18n/index.ts +1 -1
  567. package/corpus/templates/calendar/app/i18n-data.ts +1 -1
  568. package/corpus/templates/calendar/app/lib/api-path.ts +1 -1
  569. package/corpus/templates/calendar/app/lib/utils.ts +1 -1
  570. package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +1 -1
  571. package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +3 -1
  572. package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -3
  573. package/corpus/templates/calendar/app/pages/BookingsList.tsx +1 -1
  574. package/corpus/templates/calendar/app/pages/CalendarView.tsx +3 -5
  575. package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +1 -1
  576. package/corpus/templates/calendar/app/pages/NotFound.tsx +1 -1
  577. package/corpus/templates/calendar/app/pages/Settings.tsx +9 -8
  578. package/corpus/templates/calendar/app/root.tsx +15 -9
  579. package/corpus/templates/calendar/app/routes/_app.agent.tsx +2 -1
  580. package/corpus/templates/calendar/app/routes/_app.settings.tsx +1 -1
  581. package/corpus/templates/calendar/app/routes/event.tsx +3 -3
  582. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +3 -3
  583. package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
  584. package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  585. package/corpus/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  586. package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
  587. package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  588. package/corpus/templates/chat/app/components/layout/Header.tsx +2 -1
  589. package/corpus/templates/chat/app/components/layout/Layout.tsx +2 -2
  590. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +4 -4
  591. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -4
  592. package/corpus/templates/chat/app/i18n/index.ts +1 -1
  593. package/corpus/templates/chat/app/i18n-data.ts +1 -1
  594. package/corpus/templates/chat/app/lib/utils.ts +1 -1
  595. package/corpus/templates/chat/app/root.tsx +10 -9
  596. package/corpus/templates/chat/app/routes/_index.tsx +2 -2
  597. package/corpus/templates/chat/app/routes/agent.tsx +10 -3
  598. package/corpus/templates/chat/app/routes/database.tsx +1 -1
  599. package/corpus/templates/chat/app/routes/observability.tsx +2 -1
  600. package/corpus/templates/chat/app/routes/settings.tsx +4 -5
  601. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +3 -3
  602. package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  603. package/corpus/templates/clips/.agents/skills/feature-flags/SKILL.md +1 -1
  604. package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  605. package/corpus/templates/clips/app/components/capture-install-options.tsx +2 -1
  606. package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +2 -2
  607. package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -1
  608. package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +2 -1
  609. package/corpus/templates/clips/app/components/editor/editor-layout.tsx +4 -14
  610. package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +2 -1
  611. package/corpus/templates/clips/app/components/editor/split-button.tsx +2 -1
  612. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +3 -3
  613. package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +2 -1
  614. package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +1 -1
  615. package/corpus/templates/clips/app/components/layout/Header.tsx +2 -1
  616. package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +1 -1
  617. package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +1 -1
  618. package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +1 -1
  619. package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -1
  620. package/corpus/templates/clips/app/components/library/folder-tree.tsx +1 -1
  621. package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -2
  622. package/corpus/templates/clips/app/components/library/library-layout.tsx +6 -6
  623. package/corpus/templates/clips/app/components/library/organization-switcher.tsx +1 -1
  624. package/corpus/templates/clips/app/components/library/recording-card.tsx +1 -1
  625. package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
  626. package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -17
  627. package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +1 -1
  628. package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -1
  629. package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -20
  630. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +3 -1
  631. package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +1 -1
  632. package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +1 -1
  633. package/corpus/templates/clips/app/components/player/captions-overlay.tsx +1 -1
  634. package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -1
  635. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +2 -1
  636. package/corpus/templates/clips/app/components/player/insights-panel.tsx +2 -1
  637. package/corpus/templates/clips/app/components/player/player-controls.tsx +1 -1
  638. package/corpus/templates/clips/app/components/player/settings-panel.tsx +2 -2
  639. package/corpus/templates/clips/app/components/player/share-dialog.tsx +3 -3
  640. package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +1 -1
  641. package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -1
  642. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -6
  643. package/corpus/templates/clips/app/components/player/video-player.tsx +3 -5
  644. package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
  645. package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +1 -1
  646. package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
  647. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -1
  648. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -13
  649. package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +1 -1
  650. package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +3 -6
  651. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
  652. package/corpus/templates/clips/app/components/sharing/viewed-by-popover.tsx +2 -1
  653. package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +3 -5
  654. package/corpus/templates/clips/app/components/workspace/engagement-chart.tsx +1 -1
  655. package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +3 -1
  656. package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -1
  657. package/corpus/templates/clips/app/components/workspace/members-list.tsx +2 -1
  658. package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -1
  659. package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +1 -1
  660. package/corpus/templates/clips/app/entry.client.tsx +2 -4
  661. package/corpus/templates/clips/app/hooks/use-auto-title.ts +3 -17
  662. package/corpus/templates/clips/app/hooks/use-library.ts +4 -1
  663. package/corpus/templates/clips/app/hooks/use-navigation-state.ts +2 -1
  664. package/corpus/templates/clips/app/hooks/use-video-storage-status.ts +1 -1
  665. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +1 -1
  666. package/corpus/templates/clips/app/i18n/index.ts +5 -5
  667. package/corpus/templates/clips/app/lib/camera-blur.ts +1 -1
  668. package/corpus/templates/clips/app/lib/capture-install-options.ts +1 -1
  669. package/corpus/templates/clips/app/lib/thumbnail-capture.ts +1 -1
  670. package/corpus/templates/clips/app/lib/utils.ts +1 -1
  671. package/corpus/templates/clips/app/root.tsx +13 -9
  672. package/corpus/templates/clips/app/routes/_app.agent.tsx +2 -1
  673. package/corpus/templates/clips/app/routes/_app.archive.tsx +1 -1
  674. package/corpus/templates/clips/app/routes/_app.dictate.tsx +2 -2
  675. package/corpus/templates/clips/app/routes/_app.extensions.$id.tsx +1 -1
  676. package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
  677. package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
  678. package/corpus/templates/clips/app/routes/_app.library.folder.$folderId.tsx +1 -1
  679. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +2 -2
  680. package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -5
  681. package/corpus/templates/clips/app/routes/_app.notifications.tsx +2 -2
  682. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +7 -7
  683. package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +2 -1
  684. package/corpus/templates/clips/app/routes/_app.shared.tsx +1 -1
  685. package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.folder.$folderId.tsx +1 -1
  686. package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.tsx +1 -1
  687. package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
  688. package/corpus/templates/clips/app/routes/_app.trash.tsx +2 -1
  689. package/corpus/templates/clips/app/routes/_index.tsx +1 -1
  690. package/corpus/templates/clips/app/routes/bug-report.done.tsx +2 -1
  691. package/corpus/templates/clips/app/routes/bug-report.tsx +2 -1
  692. package/corpus/templates/clips/app/routes/download.tsx +2 -1
  693. package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -1
  694. package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -1
  695. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +4 -5
  696. package/corpus/templates/clips/app/routes/record.tsx +4 -4
  697. package/corpus/templates/clips/app/routes/share.$shareId.tsx +5 -6
  698. package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +3 -1
  699. package/corpus/templates/content/.agents/skills/actions/SKILL.md +3 -3
  700. package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  701. package/corpus/templates/content/.agents/skills/feature-flags/SKILL.md +1 -1
  702. package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +4 -4
  703. package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +1 -1
  704. package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  705. package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +1 -1
  706. package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +1 -1
  707. package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
  708. package/corpus/templates/content/app/components/QueryErrorState.tsx +1 -1
  709. package/corpus/templates/content/app/components/ThemeToggle.tsx +1 -1
  710. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -1
  711. package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +3 -1
  712. package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
  713. package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +1 -1
  714. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +7 -5
  715. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +3 -6
  716. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +7 -9
  717. package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +1 -1
  718. package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
  719. package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
  720. package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +1 -1
  721. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +2 -1
  722. package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +1 -1
  723. package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +2 -1
  724. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +10 -6
  725. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -6
  726. package/corpus/templates/content/app/components/editor/database/FormView.tsx +1 -1
  727. package/corpus/templates/content/app/components/editor/database/settings.tsx +2 -2
  728. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +1 -1
  729. package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +2 -1
  730. package/corpus/templates/content/app/components/editor/extensions/CodeBlockNode.tsx +1 -1
  731. package/corpus/templates/content/app/components/editor/extensions/DragHandle.tsx +4 -4
  732. package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -1
  733. package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +1 -1
  734. package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +2 -1
  735. package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +1 -1
  736. package/corpus/templates/content/app/components/editor/image-upload.ts +1 -1
  737. package/corpus/templates/content/app/components/editor/registrySlashItems.ts +1 -1
  738. package/corpus/templates/content/app/components/layout/Header.tsx +1 -1
  739. package/corpus/templates/content/app/components/layout/Layout.tsx +3 -1
  740. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +9 -9
  741. package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +1 -1
  742. package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +5 -1
  743. package/corpus/templates/content/app/entry.client.tsx +2 -4
  744. package/corpus/templates/content/app/hooks/use-comments.ts +4 -1
  745. package/corpus/templates/content/app/hooks/use-content-database.ts +4 -1
  746. package/corpus/templates/content/app/hooks/use-content-spaces.ts +4 -1
  747. package/corpus/templates/content/app/hooks/use-db-sync.ts +1 -1
  748. package/corpus/templates/content/app/hooks/use-document-properties.ts +4 -1
  749. package/corpus/templates/content/app/hooks/use-document-versions.ts +4 -1
  750. package/corpus/templates/content/app/hooks/use-documents.ts +4 -1
  751. package/corpus/templates/content/app/hooks/use-mention-members.ts +1 -1
  752. package/corpus/templates/content/app/hooks/use-navigation-state.ts +2 -1
  753. package/corpus/templates/content/app/hooks/use-notion.ts +2 -2
  754. package/corpus/templates/content/app/i18n/index.ts +1 -1
  755. package/corpus/templates/content/app/i18n-data.ts +1 -1
  756. package/corpus/templates/content/app/lib/local-control-resources.ts +1 -1
  757. package/corpus/templates/content/app/lib/utils.ts +1 -1
  758. package/corpus/templates/content/app/root.tsx +15 -9
  759. package/corpus/templates/content/app/routes/_app.agent.tsx +2 -1
  760. package/corpus/templates/content/app/routes/_app.local-files.tsx +2 -1
  761. package/corpus/templates/content/app/routes/_app.page.$id.tsx +1 -1
  762. package/corpus/templates/content/app/routes/_app.settings.tsx +4 -5
  763. package/corpus/templates/content/app/routes/p.$id.tsx +2 -1
  764. package/corpus/templates/content/package.json +25 -25
  765. package/corpus/templates/design/.agents/skills/actions/SKILL.md +3 -3
  766. package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  767. package/corpus/templates/design/.agents/skills/feature-flags/SKILL.md +1 -1
  768. package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  769. package/corpus/templates/design/app/components/QueryErrorState.tsx +1 -1
  770. package/corpus/templates/design/app/components/ThemeToggle.tsx +1 -1
  771. package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +1 -1
  772. package/corpus/templates/design/app/components/design/BreakpointBar.tsx +1 -30
  773. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +4 -3
  774. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +4 -4
  775. package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +2 -5
  776. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
  777. package/corpus/templates/design/app/components/design/EditPanel.tsx +2 -2
  778. package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +4 -1
  779. package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +1 -1
  780. package/corpus/templates/design/app/components/design/LayersPanel.tsx +1 -1
  781. package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +1 -1
  782. package/corpus/templates/design/app/components/design/MotionDock.tsx +1 -19
  783. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2 -2
  784. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +2 -2
  785. package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +1 -1
  786. package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +2 -2
  787. package/corpus/templates/design/app/components/design/ReviewPanel.tsx +1 -22
  788. package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +2 -2
  789. package/corpus/templates/design/app/components/design/StatesPanel.tsx +4 -14
  790. package/corpus/templates/design/app/components/design/TokensPanel.tsx +2 -17
  791. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
  792. package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -1
  793. package/corpus/templates/design/app/components/design/code-workbench/editor/BufferSync.tsx +1 -1
  794. package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -1
  795. package/corpus/templates/design/app/components/design/code-workbench/workspace/inline-provider.ts +1 -1
  796. package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +1 -1
  797. package/corpus/templates/design/app/components/design/design-canvas/annotation-snapshot.ts +1 -1
  798. package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
  799. package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +2 -2
  800. package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +1 -1
  801. package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +1 -1
  802. package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +1 -1
  803. package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -1
  804. package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +1 -1
  805. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -1
  806. package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +1 -1
  807. package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +1 -1
  808. package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +1 -16
  809. package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +2 -34
  810. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +2 -1
  811. package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +1 -25
  812. package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +1 -30
  813. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +1 -1
  814. package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +1 -1
  815. package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +1 -1
  816. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
  817. package/corpus/templates/design/app/components/layout/Header.tsx +4 -4
  818. package/corpus/templates/design/app/components/layout/Layout.tsx +4 -5
  819. package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -6
  820. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +1 -1
  821. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
  822. package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +2 -2
  823. package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +3 -4
  824. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
  825. package/corpus/templates/design/app/hooks/use-agent-generating.ts +1 -1
  826. package/corpus/templates/design/app/hooks/use-design-system.ts +1 -1
  827. package/corpus/templates/design/app/hooks/use-design-systems.ts +1 -1
  828. package/corpus/templates/design/app/hooks/use-navigation-state.ts +2 -2
  829. package/corpus/templates/design/app/hooks/use-question-flow.ts +1 -1
  830. package/corpus/templates/design/app/i18n/index.ts +1 -1
  831. package/corpus/templates/design/app/i18n-data.ts +1 -1
  832. package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +1 -1
  833. package/corpus/templates/design/app/lib/agent-chat.ts +1 -1
  834. package/corpus/templates/design/app/lib/design-save-outbox.ts +1 -1
  835. package/corpus/templates/design/app/lib/desktop-design-preview.ts +1 -1
  836. package/corpus/templates/design/app/lib/figma-connection.ts +2 -1
  837. package/corpus/templates/design/app/lib/figma-svg-copy.ts +1 -1
  838. package/corpus/templates/design/app/lib/pending-generation.ts +1 -1
  839. package/corpus/templates/design/app/lib/utils.ts +1 -1
  840. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +4 -6
  841. package/corpus/templates/design/app/pages/DesignSystems.tsx +4 -4
  842. package/corpus/templates/design/app/pages/Index.tsx +5 -5
  843. package/corpus/templates/design/app/pages/NotFound.tsx +3 -5
  844. package/corpus/templates/design/app/pages/Present.tsx +7 -6
  845. package/corpus/templates/design/app/pages/Templates.tsx +4 -4
  846. package/corpus/templates/design/app/pages/VisualEdit.tsx +3 -1
  847. package/corpus/templates/design/app/pages/design-editor/editor-session.ts +1 -1
  848. package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +1 -1
  849. package/corpus/templates/design/app/root.tsx +10 -9
  850. package/corpus/templates/design/app/routes/agent.tsx +2 -1
  851. package/corpus/templates/design/app/routes/observability.tsx +1 -1
  852. package/corpus/templates/design/app/routes/settings.tsx +4 -5
  853. package/corpus/templates/design/package.json +1 -1
  854. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +3 -3
  855. package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  856. package/corpus/templates/dispatch/.agents/skills/feature-flags/SKILL.md +1 -1
  857. package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  858. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +3 -4
  859. package/corpus/templates/dispatch/app/i18n/index.ts +1 -1
  860. package/corpus/templates/dispatch/app/i18n-data.ts +1 -1
  861. package/corpus/templates/dispatch/app/root.tsx +10 -9
  862. package/corpus/templates/dispatch/app/routes/agent.tsx +2 -1
  863. package/corpus/templates/dispatch/app/routes/integrations.tsx +3 -3
  864. package/corpus/templates/dispatch/app/routes/settings.tsx +4 -5
  865. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +3 -3
  866. package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  867. package/corpus/templates/forms/.agents/skills/feature-flags/SKILL.md +1 -1
  868. package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +4 -4
  869. package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +1 -1
  870. package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  871. package/corpus/templates/forms/app/components/CloudUpgrade.tsx +1 -1
  872. package/corpus/templates/forms/app/components/ThemeToggle.tsx +1 -1
  873. package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +1 -1
  874. package/corpus/templates/forms/app/components/layout/Header.tsx +2 -1
  875. package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -2
  876. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +5 -5
  877. package/corpus/templates/forms/app/hooks/use-db-status.ts +1 -1
  878. package/corpus/templates/forms/app/hooks/use-forms.ts +2 -2
  879. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +3 -3
  880. package/corpus/templates/forms/app/hooks/use-responses.ts +1 -1
  881. package/corpus/templates/forms/app/i18n/index.ts +1 -1
  882. package/corpus/templates/forms/app/lib/utils.ts +1 -1
  883. package/corpus/templates/forms/app/pages/AskPage.tsx +2 -2
  884. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +5 -6
  885. package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -1
  886. package/corpus/templates/forms/app/pages/FormsListPage.tsx +3 -6
  887. package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +1 -1
  888. package/corpus/templates/forms/app/pages/ResponsesPage.tsx +1 -1
  889. package/corpus/templates/forms/app/root.tsx +15 -12
  890. package/corpus/templates/forms/app/routes/_app.agent.tsx +2 -1
  891. package/corpus/templates/forms/app/routes/_app.settings.tsx +4 -5
  892. package/corpus/templates/forms/app/routes/_index.tsx +1 -1
  893. package/corpus/templates/forms/app/routes/form-preview.tsx +5 -1
  894. package/corpus/templates/macros/.agents/skills/feature-flags/SKILL.md +1 -1
  895. package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  896. package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +2 -1
  897. package/corpus/templates/macros/app/components/AddMealDialog.tsx +2 -1
  898. package/corpus/templates/macros/app/components/AddWeightDialog.tsx +2 -1
  899. package/corpus/templates/macros/app/components/DailyProgress.tsx +2 -1
  900. package/corpus/templates/macros/app/components/ExerciseCard.tsx +1 -1
  901. package/corpus/templates/macros/app/components/MealCard.tsx +1 -1
  902. package/corpus/templates/macros/app/components/QueryErrorState.tsx +1 -1
  903. package/corpus/templates/macros/app/components/VoiceDictation.tsx +2 -1
  904. package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
  905. package/corpus/templates/macros/app/components/WeightCard.tsx +1 -1
  906. package/corpus/templates/macros/app/components/WeightTracker.tsx +2 -2
  907. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -8
  908. package/corpus/templates/macros/app/components/layout/Header.tsx +2 -1
  909. package/corpus/templates/macros/app/i18n/index.ts +1 -1
  910. package/corpus/templates/macros/app/lib/api.ts +1 -1
  911. package/corpus/templates/macros/app/lib/utils.ts +1 -1
  912. package/corpus/templates/macros/app/root.tsx +10 -9
  913. package/corpus/templates/macros/app/routes/_index.tsx +2 -2
  914. package/corpus/templates/macros/app/routes/agent.tsx +2 -1
  915. package/corpus/templates/macros/app/routes/analytics.tsx +2 -1
  916. package/corpus/templates/macros/app/routes/settings.tsx +4 -5
  917. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +3 -3
  918. package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  919. package/corpus/templates/mail/.agents/skills/feature-flags/SKILL.md +1 -1
  920. package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +4 -4
  921. package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +1 -1
  922. package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  923. package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +3 -3
  924. package/corpus/templates/mail/app/components/ThemeToggle.tsx +1 -1
  925. package/corpus/templates/mail/app/components/agent-engine-picker.tsx +2 -1
  926. package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +1 -1
  927. package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +1 -1
  928. package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +1 -1
  929. package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +1 -1
  930. package/corpus/templates/mail/app/components/email/ComposeModal.tsx +2 -1
  931. package/corpus/templates/mail/app/components/email/ComposeSlashMenu.tsx +1 -1
  932. package/corpus/templates/mail/app/components/email/EmailList.tsx +1 -1
  933. package/corpus/templates/mail/app/components/email/EmailListItem.tsx +1 -1
  934. package/corpus/templates/mail/app/components/email/EmailThread.tsx +2 -1
  935. package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +2 -1
  936. package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +2 -1
  937. package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +1 -1
  938. package/corpus/templates/mail/app/components/email/RecipientInput.tsx +1 -1
  939. package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +1 -1
  940. package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
  941. package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +1 -1
  942. package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +1 -1
  943. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -6
  944. package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +2 -1
  945. package/corpus/templates/mail/app/components/layout/SearchBar.tsx +1 -1
  946. package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
  947. package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
  948. package/corpus/templates/mail/app/entry.client.tsx +1 -6
  949. package/corpus/templates/mail/app/hooks/use-aliases.ts +1 -1
  950. package/corpus/templates/mail/app/hooks/use-apollo.ts +1 -1
  951. package/corpus/templates/mail/app/hooks/use-automations.ts +1 -1
  952. package/corpus/templates/mail/app/hooks/use-compose-state.ts +2 -2
  953. package/corpus/templates/mail/app/hooks/use-draft-queue.ts +4 -1
  954. package/corpus/templates/mail/app/hooks/use-emails.ts +3 -1
  955. package/corpus/templates/mail/app/hooks/use-gmail-filters.ts +1 -1
  956. package/corpus/templates/mail/app/hooks/use-google-auth.ts +2 -1
  957. package/corpus/templates/mail/app/hooks/use-integrations.ts +2 -2
  958. package/corpus/templates/mail/app/hooks/use-navigation-state.ts +1 -1
  959. package/corpus/templates/mail/app/hooks/use-scheduled-jobs.ts +2 -2
  960. package/corpus/templates/mail/app/hooks/use-snippets.ts +1 -1
  961. package/corpus/templates/mail/app/i18n/index.ts +1 -1
  962. package/corpus/templates/mail/app/lib/agent-generate.ts +1 -1
  963. package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +1 -10
  964. package/corpus/templates/mail/app/lib/mcp-chat-bridge.ts +1 -1
  965. package/corpus/templates/mail/app/lib/thread-cache.ts +1 -1
  966. package/corpus/templates/mail/app/lib/upload.ts +1 -1
  967. package/corpus/templates/mail/app/lib/utils.ts +1 -1
  968. package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +1 -1
  969. package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
  970. package/corpus/templates/mail/app/pages/NotFound.tsx +1 -1
  971. package/corpus/templates/mail/app/pages/SettingsPage.tsx +9 -8
  972. package/corpus/templates/mail/app/root.tsx +11 -8
  973. package/corpus/templates/mail/app/routes/agent.tsx +2 -1
  974. package/corpus/templates/mail/app/routes/email.tsx +5 -1
  975. package/corpus/templates/mail/package.json +9 -9
  976. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +3 -3
  977. package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +1 -1
  978. package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  979. package/corpus/templates/plan/.agents/skills/feature-flags/SKILL.md +1 -1
  980. package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +4 -4
  981. package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  982. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +2 -0
  983. package/corpus/templates/plan/app/components/editor/PlanBlockNode.tsx +2 -2
  984. package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +8 -8
  985. package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +7 -7
  986. package/corpus/templates/plan/app/components/layout/Header.tsx +2 -1
  987. package/corpus/templates/plan/app/components/layout/Layout.tsx +2 -2
  988. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +8 -9
  989. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +1 -1
  990. package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +3 -5
  991. package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -1
  992. package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +2 -1
  993. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +7 -5
  994. package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +5 -7
  995. package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +1 -1
  996. package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +7 -5
  997. package/corpus/templates/plan/app/components/plan/PlanMarkdownReader.tsx +1 -1
  998. package/corpus/templates/plan/app/components/plan/PlanTableOfContents.tsx +1 -1
  999. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +2 -2
  1000. package/corpus/templates/plan/app/components/plan/PrototypeViewer.tsx +1 -1
  1001. package/corpus/templates/plan/app/components/plan/VisualAnswerInline.tsx +1 -1
  1002. package/corpus/templates/plan/app/components/plan/planBlocks.tsx +3 -5
  1003. package/corpus/templates/plan/app/components/plan/wireframe/LegacyRegionWireframe.tsx +1 -1
  1004. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
  1005. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -3
  1006. package/corpus/templates/plan/app/hooks/use-plan-presence.ts +2 -2
  1007. package/corpus/templates/plan/app/hooks/use-plans.ts +4 -1
  1008. package/corpus/templates/plan/app/i18n/ar-SA.ts +4 -0
  1009. package/corpus/templates/plan/app/i18n/de-DE.ts +4 -0
  1010. package/corpus/templates/plan/app/i18n/en-US.ts +4 -0
  1011. package/corpus/templates/plan/app/i18n/es-ES.ts +4 -0
  1012. package/corpus/templates/plan/app/i18n/fr-FR.ts +4 -0
  1013. package/corpus/templates/plan/app/i18n/hi-IN.ts +4 -0
  1014. package/corpus/templates/plan/app/i18n/index.ts +1 -1
  1015. package/corpus/templates/plan/app/i18n/ja-JP.ts +4 -0
  1016. package/corpus/templates/plan/app/i18n/ko-KR.ts +4 -0
  1017. package/corpus/templates/plan/app/i18n/pt-BR.ts +4 -0
  1018. package/corpus/templates/plan/app/i18n/zh-CN.ts +4 -0
  1019. package/corpus/templates/plan/app/i18n/zh-TW.ts +4 -0
  1020. package/corpus/templates/plan/app/lib/local-codebase-context.ts +1 -1
  1021. package/corpus/templates/plan/app/lib/local-control-resources.ts +1 -1
  1022. package/corpus/templates/plan/app/lib/plan-comment-editor-helpers.ts +1 -1
  1023. package/corpus/templates/plan/app/lib/plan-local-bridge.ts +1 -1
  1024. package/corpus/templates/plan/app/lib/register-chat-renderers.tsx +1 -1
  1025. package/corpus/templates/plan/app/lib/utils.ts +1 -1
  1026. package/corpus/templates/plan/app/pages/PlanChatPage.tsx +2 -2
  1027. package/corpus/templates/plan/app/pages/PlansPage.tsx +13 -14
  1028. package/corpus/templates/plan/app/root.tsx +11 -10
  1029. package/corpus/templates/plan/app/routes/agent.tsx +2 -1
  1030. package/corpus/templates/plan/app/routes/settings.tsx +4 -5
  1031. package/corpus/templates/plan/changelog/2026-07-18-visual-plans-now-open-on-wireframes-by-default-when-a-protot.md +6 -0
  1032. package/corpus/templates/plan/package.json +3 -3
  1033. package/corpus/templates/plan/shared/plan-doc.ts +2 -47
  1034. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +3 -3
  1035. package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1036. package/corpus/templates/slides/.agents/skills/feature-flags/SKILL.md +1 -1
  1037. package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1038. package/corpus/templates/slides/app/components/CloudUpgrade.tsx +1 -1
  1039. package/corpus/templates/slides/app/components/ThemeToggle.tsx +1 -1
  1040. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
  1041. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -1
  1042. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
  1043. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -1
  1044. package/corpus/templates/slides/app/components/design-system/DesignSystemPreview.tsx +1 -1
  1045. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +5 -5
  1046. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +1 -1
  1047. package/corpus/templates/slides/app/components/editor/AssetLibraryPanel.tsx +2 -1
  1048. package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +1 -1
  1049. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
  1050. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +6 -8
  1051. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +2 -1
  1052. package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -1
  1053. package/corpus/templates/slides/app/components/editor/GeneratingOverlay.tsx +1 -1
  1054. package/corpus/templates/slides/app/components/editor/GoogleDocImportHint.tsx +3 -5
  1055. package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +1 -1
  1056. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -1
  1057. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
  1058. package/corpus/templates/slides/app/components/editor/ImageOverlay.tsx +1 -1
  1059. package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +2 -1
  1060. package/corpus/templates/slides/app/components/editor/ImportButton.tsx +5 -1
  1061. package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +2 -1
  1062. package/corpus/templates/slides/app/components/editor/MermaidToExcalidrawPanel.tsx +1 -1
  1063. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +3 -1
  1064. package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +1 -1
  1065. package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +2 -1
  1066. package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +1 -1
  1067. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +12 -8
  1068. package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +2 -1
  1069. package/corpus/templates/slides/app/components/editor/SlideSlashMenu.tsx +1 -1
  1070. package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +2 -2
  1071. package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +1 -1
  1072. package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +2 -2
  1073. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +2 -1
  1074. package/corpus/templates/slides/app/components/layout/Header.tsx +2 -1
  1075. package/corpus/templates/slides/app/components/layout/Layout.tsx +2 -1
  1076. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +4 -6
  1077. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +1 -1
  1078. package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +2 -1
  1079. package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +1 -1
  1080. package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
  1081. package/corpus/templates/slides/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
  1082. package/corpus/templates/slides/app/context/DeckContext.tsx +5 -3
  1083. package/corpus/templates/slides/app/entry.client.tsx +2 -4
  1084. package/corpus/templates/slides/app/hooks/use-agent-generating.ts +1 -1
  1085. package/corpus/templates/slides/app/hooks/use-db-status.ts +1 -1
  1086. package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +1 -1
  1087. package/corpus/templates/slides/app/hooks/use-deck-presence.ts +1 -1
  1088. package/corpus/templates/slides/app/hooks/use-deck-role.ts +1 -1
  1089. package/corpus/templates/slides/app/hooks/use-deck-versions.ts +4 -1
  1090. package/corpus/templates/slides/app/hooks/use-design-systems.ts +1 -1
  1091. package/corpus/templates/slides/app/hooks/use-navigation-state.ts +1 -1
  1092. package/corpus/templates/slides/app/hooks/use-slide-comments.ts +2 -2
  1093. package/corpus/templates/slides/app/i18n/index.ts +1 -1
  1094. package/corpus/templates/slides/app/lib/utils.ts +1 -1
  1095. package/corpus/templates/slides/app/pages/DeckEditor.tsx +5 -6
  1096. package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -1
  1097. package/corpus/templates/slides/app/pages/Index.tsx +4 -7
  1098. package/corpus/templates/slides/app/pages/NotFound.tsx +1 -1
  1099. package/corpus/templates/slides/app/pages/Presentation.tsx +1 -1
  1100. package/corpus/templates/slides/app/pages/SharedPresentation.tsx +2 -1
  1101. package/corpus/templates/slides/app/root.tsx +13 -11
  1102. package/corpus/templates/slides/app/routes/agent.tsx +2 -1
  1103. package/corpus/templates/slides/app/routes/settings.tsx +4 -5
  1104. package/corpus/templates/slides/app/routes/slide.tsx +3 -3
  1105. package/corpus/templates/slides/package.json +13 -13
  1106. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +3 -3
  1107. package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1108. package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1109. package/corpus/templates/tasks/.agents/skills/feature-flags/SKILL.md +1 -1
  1110. package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +4 -4
  1111. package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1112. package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +1 -1
  1113. package/corpus/templates/tasks/app/components/layout/Header.tsx +1 -1
  1114. package/corpus/templates/tasks/app/components/layout/Layout.tsx +4 -1
  1115. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +2 -1
  1116. package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +1 -1
  1117. package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +1 -1
  1118. package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +4 -1
  1119. package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +4 -1
  1120. package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +2 -1
  1121. package/corpus/templates/tasks/app/hooks/use-tasks.ts +4 -1
  1122. package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +4 -1
  1123. package/corpus/templates/tasks/app/lib/utils.ts +1 -1
  1124. package/corpus/templates/tasks/app/root.tsx +9 -7
  1125. package/dist/catalog.json +39 -1
  1126. package/dist/cli/create.d.ts.map +1 -1
  1127. package/dist/cli/create.js +32 -3
  1128. package/dist/cli/create.js.map +1 -1
  1129. package/dist/cli/doctor.d.ts +4 -1
  1130. package/dist/cli/doctor.d.ts.map +1 -1
  1131. package/dist/cli/doctor.js +57 -5
  1132. package/dist/cli/doctor.js.map +1 -1
  1133. package/dist/cli/migration-codemod.d.ts +21 -0
  1134. package/dist/cli/migration-codemod.d.ts.map +1 -0
  1135. package/dist/cli/migration-codemod.js +363 -0
  1136. package/dist/cli/migration-codemod.js.map +1 -0
  1137. package/dist/cli/package-lifecycle.d.ts.map +1 -1
  1138. package/dist/cli/package-lifecycle.js +2 -0
  1139. package/dist/cli/package-lifecycle.js.map +1 -1
  1140. package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
  1141. package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
  1142. package/dist/cli/skills-content/visual-plan-skill.js +2 -0
  1143. package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
  1144. package/dist/cli/upgrade.d.ts +7 -0
  1145. package/dist/cli/upgrade.d.ts.map +1 -1
  1146. package/dist/cli/upgrade.js +52 -7
  1147. package/dist/cli/upgrade.js.map +1 -1
  1148. package/dist/client/agent-chat/index.d.ts +40 -0
  1149. package/dist/client/agent-chat/index.d.ts.map +1 -0
  1150. package/dist/client/agent-chat/index.js +39 -0
  1151. package/dist/client/agent-chat/index.js.map +1 -0
  1152. package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -1
  1153. package/dist/client/agent-page/AgentContextTab.js +3 -1
  1154. package/dist/client/agent-page/AgentContextTab.js.map +1 -1
  1155. package/dist/client/analytics/index.d.ts +3 -0
  1156. package/dist/client/analytics/index.d.ts.map +1 -0
  1157. package/dist/client/analytics/index.js +3 -0
  1158. package/dist/client/analytics/index.js.map +1 -0
  1159. package/dist/client/api-path.js +2 -2
  1160. package/dist/client/api-path.js.map +1 -1
  1161. package/dist/client/automation/index.d.ts +2 -0
  1162. package/dist/client/automation/index.d.ts.map +1 -0
  1163. package/dist/client/automation/index.js +2 -0
  1164. package/dist/client/automation/index.js.map +1 -0
  1165. package/dist/client/changelog/index.d.ts +2 -0
  1166. package/dist/client/changelog/index.d.ts.map +1 -0
  1167. package/dist/client/changelog/index.js +2 -0
  1168. package/dist/client/changelog/index.js.map +1 -0
  1169. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts +1 -12
  1170. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
  1171. package/dist/client/chat/widgets/InlineExtensionWidget.js +2 -66
  1172. package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
  1173. package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
  1174. package/dist/client/chat/widgets/builtin-tool-renderers.js +21 -8
  1175. package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
  1176. package/dist/client/chat/widgets/inline-extension-result.d.ts +14 -0
  1177. package/dist/client/chat/widgets/inline-extension-result.d.ts.map +1 -0
  1178. package/dist/client/chat/widgets/inline-extension-result.js +67 -0
  1179. package/dist/client/chat/widgets/inline-extension-result.js.map +1 -0
  1180. package/dist/client/client-bootstrap.d.ts +2 -0
  1181. package/dist/client/client-bootstrap.d.ts.map +1 -0
  1182. package/dist/client/client-bootstrap.js +7 -0
  1183. package/dist/client/client-bootstrap.js.map +1 -0
  1184. package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
  1185. package/dist/client/context-xray/ContextMeter.js +8 -23
  1186. package/dist/client/context-xray/ContextMeter.js.map +1 -1
  1187. package/dist/client/context-xray/ContextSegmentRow.d.ts.map +1 -1
  1188. package/dist/client/context-xray/ContextSegmentRow.js +3 -19
  1189. package/dist/client/context-xray/ContextSegmentRow.js.map +1 -1
  1190. package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
  1191. package/dist/client/context-xray/ContextTreemap.js +3 -54
  1192. package/dist/client/context-xray/ContextTreemap.js.map +1 -1
  1193. package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
  1194. package/dist/client/context-xray/ContextXRayPanel.js +21 -163
  1195. package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
  1196. package/dist/client/context-xray/SegmentProvenancePopover.d.ts.map +1 -1
  1197. package/dist/client/context-xray/SegmentProvenancePopover.js +3 -4
  1198. package/dist/client/context-xray/SegmentProvenancePopover.js.map +1 -1
  1199. package/dist/client/context-xray/format.d.ts +0 -4
  1200. package/dist/client/context-xray/format.d.ts.map +1 -1
  1201. package/dist/client/context-xray/format.js +0 -49
  1202. package/dist/client/context-xray/format.js.map +1 -1
  1203. package/dist/client/hooks/index.d.ts +13 -0
  1204. package/dist/client/hooks/index.d.ts.map +1 -0
  1205. package/dist/client/hooks/index.js +13 -0
  1206. package/dist/client/hooks/index.js.map +1 -0
  1207. package/dist/client/host/index.d.ts +20 -0
  1208. package/dist/client/host/index.d.ts.map +1 -0
  1209. package/dist/client/host/index.js +18 -0
  1210. package/dist/client/host/index.js.map +1 -0
  1211. package/dist/client/index.d.ts +19 -100
  1212. package/dist/client/index.d.ts.map +1 -1
  1213. package/dist/client/index.js +19 -106
  1214. package/dist/client/index.js.map +1 -1
  1215. package/dist/client/navigation/index.d.ts +6 -0
  1216. package/dist/client/navigation/index.d.ts.map +1 -0
  1217. package/dist/client/navigation/index.js +6 -0
  1218. package/dist/client/navigation/index.js.map +1 -0
  1219. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  1220. package/dist/client/resources/ResourcesPanel.js +2 -1
  1221. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  1222. package/dist/client/resources/index.d.ts +2 -1
  1223. package/dist/client/resources/index.d.ts.map +1 -1
  1224. package/dist/client/resources/index.js +1 -0
  1225. package/dist/client/resources/index.js.map +1 -1
  1226. package/dist/client/resources/use-resources.d.ts +0 -1
  1227. package/dist/client/resources/use-resources.d.ts.map +1 -1
  1228. package/dist/client/resources/use-resources.js +0 -17
  1229. package/dist/client/resources/use-resources.js.map +1 -1
  1230. package/dist/client/rich-markdown-editor/index.d.ts +1 -12
  1231. package/dist/client/rich-markdown-editor/index.d.ts.map +1 -1
  1232. package/dist/client/rich-markdown-editor/index.js +1 -12
  1233. package/dist/client/rich-markdown-editor/index.js.map +1 -1
  1234. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +1 -1
  1235. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -1
  1236. package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -1
  1237. package/dist/client/route-chunk-recovery/index.d.ts +2 -0
  1238. package/dist/client/route-chunk-recovery/index.d.ts.map +1 -0
  1239. package/dist/client/route-chunk-recovery/index.js +2 -0
  1240. package/dist/client/route-chunk-recovery/index.js.map +1 -0
  1241. package/dist/client/ui/index.d.ts +18 -0
  1242. package/dist/client/ui/index.d.ts.map +1 -0
  1243. package/dist/client/ui/index.js +18 -0
  1244. package/dist/client/ui/index.js.map +1 -0
  1245. package/dist/client/uploads/index.d.ts +2 -0
  1246. package/dist/client/uploads/index.d.ts.map +1 -0
  1247. package/dist/client/uploads/index.js +2 -0
  1248. package/dist/client/uploads/index.js.map +1 -0
  1249. package/dist/client/uploads/use-upload-resource.d.ts +3 -0
  1250. package/dist/client/uploads/use-upload-resource.d.ts.map +1 -0
  1251. package/dist/client/uploads/use-upload-resource.js +20 -0
  1252. package/dist/client/uploads/use-upload-resource.js.map +1 -0
  1253. package/dist/client/visual-style-controls.d.ts +1 -89
  1254. package/dist/client/visual-style-controls.d.ts.map +1 -1
  1255. package/dist/client/visual-style-controls.js +1 -498
  1256. package/dist/client/visual-style-controls.js.map +1 -1
  1257. package/dist/client/widgets/index.d.ts +3 -0
  1258. package/dist/client/widgets/index.d.ts.map +1 -0
  1259. package/dist/client/widgets/index.js +3 -0
  1260. package/dist/client/widgets/index.js.map +1 -0
  1261. package/dist/collab/agent-identity.d.ts +1 -14
  1262. package/dist/collab/agent-identity.d.ts.map +1 -1
  1263. package/dist/collab/agent-identity.js +1 -13
  1264. package/dist/collab/agent-identity.js.map +1 -1
  1265. package/dist/collab/client.d.ts +1 -19
  1266. package/dist/collab/client.d.ts.map +1 -1
  1267. package/dist/collab/client.js +1 -53
  1268. package/dist/collab/client.js.map +1 -1
  1269. package/dist/collab/routes.d.ts +1 -1
  1270. package/dist/collab/struct-routes.d.ts +1 -1
  1271. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  1272. package/dist/localization/default-messages.d.ts +2 -1
  1273. package/dist/localization/default-messages.d.ts.map +1 -1
  1274. package/dist/localization/default-messages.js +2 -1
  1275. package/dist/localization/default-messages.js.map +1 -1
  1276. package/dist/notifications/routes.d.ts +2 -2
  1277. package/dist/package-lifecycle/deprecated-imports.d.ts +15 -0
  1278. package/dist/package-lifecycle/deprecated-imports.d.ts.map +1 -0
  1279. package/dist/package-lifecycle/deprecated-imports.js +141 -0
  1280. package/dist/package-lifecycle/deprecated-imports.js.map +1 -0
  1281. package/dist/package-lifecycle/index.d.ts +5 -0
  1282. package/dist/package-lifecycle/index.d.ts.map +1 -1
  1283. package/dist/package-lifecycle/index.js +5 -0
  1284. package/dist/package-lifecycle/index.js.map +1 -1
  1285. package/dist/package-lifecycle/migration-manifest.d.ts +28 -0
  1286. package/dist/package-lifecycle/migration-manifest.d.ts.map +1 -0
  1287. package/dist/package-lifecycle/migration-manifest.js +102 -0
  1288. package/dist/package-lifecycle/migration-manifest.js.map +1 -0
  1289. package/dist/package-lifecycle/migration-message.d.ts +3 -0
  1290. package/dist/package-lifecycle/migration-message.d.ts.map +1 -0
  1291. package/dist/package-lifecycle/migration-message.js +5 -0
  1292. package/dist/package-lifecycle/migration-message.js.map +1 -0
  1293. package/dist/package-lifecycle/tombstone.d.ts +10 -0
  1294. package/dist/package-lifecycle/tombstone.d.ts.map +1 -0
  1295. package/dist/package-lifecycle/tombstone.js +23 -0
  1296. package/dist/package-lifecycle/tombstone.js.map +1 -0
  1297. package/dist/package-lifecycle/upgrade-error.d.ts +11 -0
  1298. package/dist/package-lifecycle/upgrade-error.d.ts.map +1 -0
  1299. package/dist/package-lifecycle/upgrade-error.js +11 -0
  1300. package/dist/package-lifecycle/upgrade-error.js.map +1 -0
  1301. package/dist/secrets/routes.d.ts +9 -9
  1302. package/dist/server/transcribe-voice.d.ts +1 -1
  1303. package/dist/styles/rich-markdown-editor.css +1 -510
  1304. package/dist/templates/chat/.agents/skills/actions/SKILL.md +3 -3
  1305. package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1306. package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1307. package/dist/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  1308. package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
  1309. package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1310. package/dist/templates/chat/app/components/layout/Header.tsx +2 -1
  1311. package/dist/templates/chat/app/components/layout/Layout.tsx +2 -2
  1312. package/dist/templates/chat/app/components/layout/Sidebar.tsx +4 -4
  1313. package/dist/templates/chat/app/hooks/use-navigation-state.ts +3 -4
  1314. package/dist/templates/chat/app/i18n/index.ts +1 -1
  1315. package/dist/templates/chat/app/i18n-data.ts +1 -1
  1316. package/dist/templates/chat/app/lib/utils.ts +1 -1
  1317. package/dist/templates/chat/app/root.tsx +10 -9
  1318. package/dist/templates/chat/app/routes/_index.tsx +2 -2
  1319. package/dist/templates/chat/app/routes/agent.tsx +10 -3
  1320. package/dist/templates/chat/app/routes/database.tsx +1 -1
  1321. package/dist/templates/chat/app/routes/observability.tsx +2 -1
  1322. package/dist/templates/chat/app/routes/settings.tsx +4 -5
  1323. package/dist/templates/default/.agents/skills/actions/SKILL.md +3 -3
  1324. package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1325. package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1326. package/dist/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  1327. package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
  1328. package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
  1329. package/dist/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
  1330. package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1331. package/dist/templates/default/app/hooks/use-navigation-state.ts +2 -5
  1332. package/dist/templates/default/app/i18n/index.ts +1 -1
  1333. package/dist/templates/default/app/lib/utils.ts +1 -1
  1334. package/dist/templates/default/app/root.tsx +8 -6
  1335. package/dist/templates/default/app/routes/_index.tsx +2 -1
  1336. package/dist/templates/default/app/routes/agent.tsx +2 -1
  1337. package/dist/templates/default/app/routes/settings.tsx +2 -3
  1338. package/dist/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  1339. package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1340. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
  1341. package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1342. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
  1343. package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
  1344. package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
  1345. package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
  1346. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1347. package/dist/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  1348. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
  1349. package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
  1350. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
  1351. package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
  1352. package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
  1353. package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1354. package/dist/testing.d.ts +1 -1
  1355. package/dist/testing.d.ts.map +1 -1
  1356. package/dist/testing.js +1 -1
  1357. package/dist/testing.js.map +1 -1
  1358. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  1359. package/dist/vite/action-types-plugin.js +4 -0
  1360. package/dist/vite/action-types-plugin.js.map +1 -1
  1361. package/dist/vite/client.d.ts.map +1 -1
  1362. package/dist/vite/client.js +35 -61
  1363. package/dist/vite/client.js.map +1 -1
  1364. package/docs/content/actions.mdx +2 -4
  1365. package/docs/content/agent-native-toolkit.mdx +46 -13
  1366. package/docs/content/agent-surfaces.mdx +2 -4
  1367. package/docs/content/audit-log.mdx +1 -2
  1368. package/docs/content/authentication.mdx +3 -2
  1369. package/docs/content/client.mdx +19 -18
  1370. package/docs/content/components.mdx +1 -1
  1371. package/docs/content/context-awareness.mdx +4 -7
  1372. package/docs/content/creating-templates.mdx +7 -5
  1373. package/docs/content/doctor.mdx +27 -6
  1374. package/docs/content/drop-in-agent.mdx +6 -11
  1375. package/docs/content/embedding-sdk.mdx +8 -10
  1376. package/docs/content/getting-started.mdx +4 -2
  1377. package/docs/content/internationalization.mdx +9 -6
  1378. package/docs/content/key-concepts.mdx +2 -4
  1379. package/docs/content/locales/ar-SA/actions.mdx +2 -4
  1380. package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
  1381. package/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
  1382. package/docs/content/locales/ar-SA/audit-log.mdx +1 -2
  1383. package/docs/content/locales/ar-SA/authentication.mdx +3 -2
  1384. package/docs/content/locales/ar-SA/client.mdx +19 -18
  1385. package/docs/content/locales/ar-SA/components.mdx +1 -1
  1386. package/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
  1387. package/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
  1388. package/docs/content/locales/ar-SA/doctor.mdx +10 -0
  1389. package/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
  1390. package/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
  1391. package/docs/content/locales/ar-SA/internationalization.mdx +9 -6
  1392. package/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
  1393. package/docs/content/locales/ar-SA/observability.mdx +1 -2
  1394. package/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
  1395. package/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
  1396. package/docs/content/locales/ar-SA/sharing.mdx +1 -2
  1397. package/docs/content/locales/ar-SA/template-chat.mdx +1 -2
  1398. package/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
  1399. package/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
  1400. package/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
  1401. package/docs/content/locales/ar-SA/tracking.mdx +2 -4
  1402. package/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
  1403. package/docs/content/locales/de-DE/actions.mdx +2 -4
  1404. package/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
  1405. package/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
  1406. package/docs/content/locales/de-DE/audit-log.mdx +1 -2
  1407. package/docs/content/locales/de-DE/authentication.mdx +3 -2
  1408. package/docs/content/locales/de-DE/client.mdx +19 -18
  1409. package/docs/content/locales/de-DE/components.mdx +1 -1
  1410. package/docs/content/locales/de-DE/context-awareness.mdx +4 -7
  1411. package/docs/content/locales/de-DE/creating-templates.mdx +7 -5
  1412. package/docs/content/locales/de-DE/doctor.mdx +10 -0
  1413. package/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
  1414. package/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
  1415. package/docs/content/locales/de-DE/internationalization.mdx +9 -6
  1416. package/docs/content/locales/de-DE/key-concepts.mdx +2 -4
  1417. package/docs/content/locales/de-DE/observability.mdx +1 -2
  1418. package/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
  1419. package/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
  1420. package/docs/content/locales/de-DE/sharing.mdx +1 -2
  1421. package/docs/content/locales/de-DE/template-chat.mdx +1 -2
  1422. package/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
  1423. package/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
  1424. package/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
  1425. package/docs/content/locales/de-DE/tracking.mdx +2 -4
  1426. package/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
  1427. package/docs/content/locales/es-ES/actions.mdx +2 -4
  1428. package/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
  1429. package/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
  1430. package/docs/content/locales/es-ES/audit-log.mdx +1 -2
  1431. package/docs/content/locales/es-ES/authentication.mdx +3 -2
  1432. package/docs/content/locales/es-ES/client.mdx +19 -18
  1433. package/docs/content/locales/es-ES/components.mdx +1 -1
  1434. package/docs/content/locales/es-ES/context-awareness.mdx +4 -7
  1435. package/docs/content/locales/es-ES/creating-templates.mdx +7 -5
  1436. package/docs/content/locales/es-ES/doctor.mdx +10 -0
  1437. package/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
  1438. package/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
  1439. package/docs/content/locales/es-ES/internationalization.mdx +9 -6
  1440. package/docs/content/locales/es-ES/key-concepts.mdx +2 -4
  1441. package/docs/content/locales/es-ES/observability.mdx +1 -2
  1442. package/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
  1443. package/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
  1444. package/docs/content/locales/es-ES/sharing.mdx +1 -2
  1445. package/docs/content/locales/es-ES/template-chat.mdx +1 -2
  1446. package/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
  1447. package/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
  1448. package/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
  1449. package/docs/content/locales/es-ES/tracking.mdx +2 -4
  1450. package/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
  1451. package/docs/content/locales/fr-FR/actions.mdx +2 -4
  1452. package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
  1453. package/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
  1454. package/docs/content/locales/fr-FR/audit-log.mdx +1 -2
  1455. package/docs/content/locales/fr-FR/authentication.mdx +3 -2
  1456. package/docs/content/locales/fr-FR/client.mdx +19 -18
  1457. package/docs/content/locales/fr-FR/components.mdx +1 -1
  1458. package/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
  1459. package/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
  1460. package/docs/content/locales/fr-FR/doctor.mdx +10 -0
  1461. package/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
  1462. package/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
  1463. package/docs/content/locales/fr-FR/internationalization.mdx +9 -6
  1464. package/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
  1465. package/docs/content/locales/fr-FR/observability.mdx +1 -2
  1466. package/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
  1467. package/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
  1468. package/docs/content/locales/fr-FR/sharing.mdx +1 -2
  1469. package/docs/content/locales/fr-FR/template-chat.mdx +1 -2
  1470. package/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
  1471. package/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
  1472. package/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
  1473. package/docs/content/locales/fr-FR/tracking.mdx +2 -4
  1474. package/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
  1475. package/docs/content/locales/hi-IN/actions.mdx +2 -4
  1476. package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
  1477. package/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
  1478. package/docs/content/locales/hi-IN/audit-log.mdx +1 -2
  1479. package/docs/content/locales/hi-IN/authentication.mdx +3 -2
  1480. package/docs/content/locales/hi-IN/client.mdx +19 -18
  1481. package/docs/content/locales/hi-IN/components.mdx +1 -1
  1482. package/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
  1483. package/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
  1484. package/docs/content/locales/hi-IN/doctor.mdx +10 -0
  1485. package/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
  1486. package/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
  1487. package/docs/content/locales/hi-IN/internationalization.mdx +9 -6
  1488. package/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
  1489. package/docs/content/locales/hi-IN/observability.mdx +1 -2
  1490. package/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
  1491. package/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
  1492. package/docs/content/locales/hi-IN/sharing.mdx +1 -2
  1493. package/docs/content/locales/hi-IN/template-chat.mdx +1 -2
  1494. package/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
  1495. package/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
  1496. package/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
  1497. package/docs/content/locales/hi-IN/tracking.mdx +2 -4
  1498. package/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
  1499. package/docs/content/locales/ja-JP/actions.mdx +2 -4
  1500. package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
  1501. package/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
  1502. package/docs/content/locales/ja-JP/audit-log.mdx +1 -2
  1503. package/docs/content/locales/ja-JP/authentication.mdx +3 -2
  1504. package/docs/content/locales/ja-JP/client.mdx +19 -18
  1505. package/docs/content/locales/ja-JP/components.mdx +1 -1
  1506. package/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
  1507. package/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
  1508. package/docs/content/locales/ja-JP/doctor.mdx +10 -0
  1509. package/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
  1510. package/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
  1511. package/docs/content/locales/ja-JP/internationalization.mdx +9 -6
  1512. package/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
  1513. package/docs/content/locales/ja-JP/observability.mdx +1 -2
  1514. package/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
  1515. package/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
  1516. package/docs/content/locales/ja-JP/sharing.mdx +1 -2
  1517. package/docs/content/locales/ja-JP/template-chat.mdx +1 -2
  1518. package/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
  1519. package/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
  1520. package/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
  1521. package/docs/content/locales/ja-JP/tracking.mdx +2 -4
  1522. package/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
  1523. package/docs/content/locales/ko-KR/actions.mdx +2 -4
  1524. package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
  1525. package/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
  1526. package/docs/content/locales/ko-KR/audit-log.mdx +1 -2
  1527. package/docs/content/locales/ko-KR/authentication.mdx +3 -2
  1528. package/docs/content/locales/ko-KR/client.mdx +19 -18
  1529. package/docs/content/locales/ko-KR/components.mdx +1 -1
  1530. package/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
  1531. package/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
  1532. package/docs/content/locales/ko-KR/doctor.mdx +10 -0
  1533. package/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
  1534. package/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
  1535. package/docs/content/locales/ko-KR/internationalization.mdx +9 -6
  1536. package/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
  1537. package/docs/content/locales/ko-KR/observability.mdx +1 -2
  1538. package/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
  1539. package/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
  1540. package/docs/content/locales/ko-KR/sharing.mdx +1 -2
  1541. package/docs/content/locales/ko-KR/template-chat.mdx +1 -2
  1542. package/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
  1543. package/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
  1544. package/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
  1545. package/docs/content/locales/ko-KR/tracking.mdx +2 -4
  1546. package/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
  1547. package/docs/content/locales/pt-BR/actions.mdx +2 -4
  1548. package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
  1549. package/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
  1550. package/docs/content/locales/pt-BR/audit-log.mdx +1 -2
  1551. package/docs/content/locales/pt-BR/authentication.mdx +3 -2
  1552. package/docs/content/locales/pt-BR/client.mdx +19 -18
  1553. package/docs/content/locales/pt-BR/components.mdx +1 -1
  1554. package/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
  1555. package/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
  1556. package/docs/content/locales/pt-BR/doctor.mdx +10 -0
  1557. package/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
  1558. package/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
  1559. package/docs/content/locales/pt-BR/internationalization.mdx +9 -6
  1560. package/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
  1561. package/docs/content/locales/pt-BR/observability.mdx +1 -2
  1562. package/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
  1563. package/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
  1564. package/docs/content/locales/pt-BR/sharing.mdx +1 -2
  1565. package/docs/content/locales/pt-BR/template-chat.mdx +1 -2
  1566. package/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
  1567. package/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
  1568. package/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
  1569. package/docs/content/locales/pt-BR/tracking.mdx +2 -4
  1570. package/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
  1571. package/docs/content/locales/zh-CN/actions.mdx +2 -4
  1572. package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
  1573. package/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
  1574. package/docs/content/locales/zh-CN/audit-log.mdx +1 -2
  1575. package/docs/content/locales/zh-CN/authentication.mdx +3 -2
  1576. package/docs/content/locales/zh-CN/client.mdx +19 -18
  1577. package/docs/content/locales/zh-CN/components.mdx +1 -1
  1578. package/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
  1579. package/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
  1580. package/docs/content/locales/zh-CN/doctor.mdx +10 -0
  1581. package/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
  1582. package/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
  1583. package/docs/content/locales/zh-CN/internationalization.mdx +9 -6
  1584. package/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
  1585. package/docs/content/locales/zh-CN/observability.mdx +1 -2
  1586. package/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
  1587. package/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
  1588. package/docs/content/locales/zh-CN/sharing.mdx +1 -2
  1589. package/docs/content/locales/zh-CN/template-chat.mdx +1 -2
  1590. package/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
  1591. package/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
  1592. package/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
  1593. package/docs/content/locales/zh-CN/tracking.mdx +2 -4
  1594. package/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
  1595. package/docs/content/locales/zh-TW/actions.mdx +2 -4
  1596. package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
  1597. package/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
  1598. package/docs/content/locales/zh-TW/audit-log.mdx +1 -2
  1599. package/docs/content/locales/zh-TW/authentication.mdx +3 -2
  1600. package/docs/content/locales/zh-TW/client.mdx +19 -18
  1601. package/docs/content/locales/zh-TW/components.mdx +1 -1
  1602. package/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
  1603. package/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
  1604. package/docs/content/locales/zh-TW/doctor.mdx +10 -0
  1605. package/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
  1606. package/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
  1607. package/docs/content/locales/zh-TW/internationalization.mdx +9 -6
  1608. package/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
  1609. package/docs/content/locales/zh-TW/observability.mdx +1 -2
  1610. package/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
  1611. package/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
  1612. package/docs/content/locales/zh-TW/sharing.mdx +1 -2
  1613. package/docs/content/locales/zh-TW/template-chat.mdx +1 -2
  1614. package/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
  1615. package/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
  1616. package/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
  1617. package/docs/content/locales/zh-TW/tracking.mdx +2 -4
  1618. package/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
  1619. package/docs/content/observability.mdx +1 -2
  1620. package/docs/content/package-lifecycle.mdx +29 -0
  1621. package/docs/content/real-time-collaboration.mdx +8 -7
  1622. package/docs/content/sharing.mdx +1 -2
  1623. package/docs/content/template-chat.mdx +1 -2
  1624. package/docs/content/toolkit-agent-ux.mdx +3 -2
  1625. package/docs/content/toolkit-capability-packages.mdx +52 -0
  1626. package/docs/content/toolkit-context-knowledge.mdx +46 -0
  1627. package/docs/content/toolkit-editors-canvases.mdx +55 -0
  1628. package/docs/content/toolkit-observability.mdx +1 -2
  1629. package/docs/content/toolkit-settings.mdx +2 -2
  1630. package/docs/content/toolkit-sharing.mdx +5 -2
  1631. package/docs/content/tracking.mdx +2 -4
  1632. package/docs/content/what-is-agent-native.mdx +1 -2
  1633. package/migration-manifest.json +1353 -0
  1634. package/package.json +46 -27
  1635. package/src/templates/chat/.agents/skills/actions/SKILL.md +3 -3
  1636. package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1637. package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1638. package/src/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  1639. package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
  1640. package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1641. package/src/templates/chat/app/components/layout/Header.tsx +2 -1
  1642. package/src/templates/chat/app/components/layout/Layout.tsx +2 -2
  1643. package/src/templates/chat/app/components/layout/Sidebar.tsx +4 -4
  1644. package/src/templates/chat/app/hooks/use-navigation-state.ts +3 -4
  1645. package/src/templates/chat/app/i18n/index.ts +1 -1
  1646. package/src/templates/chat/app/i18n-data.ts +1 -1
  1647. package/src/templates/chat/app/lib/utils.ts +1 -1
  1648. package/src/templates/chat/app/root.tsx +10 -9
  1649. package/src/templates/chat/app/routes/_index.tsx +2 -2
  1650. package/src/templates/chat/app/routes/agent.tsx +10 -3
  1651. package/src/templates/chat/app/routes/database.tsx +1 -1
  1652. package/src/templates/chat/app/routes/observability.tsx +2 -1
  1653. package/src/templates/chat/app/routes/settings.tsx +4 -5
  1654. package/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
  1655. package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1656. package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1657. package/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  1658. package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
  1659. package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
  1660. package/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
  1661. package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1662. package/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
  1663. package/src/templates/default/app/i18n/index.ts +1 -1
  1664. package/src/templates/default/app/lib/utils.ts +1 -1
  1665. package/src/templates/default/app/root.tsx +8 -6
  1666. package/src/templates/default/app/routes/_index.tsx +2 -1
  1667. package/src/templates/default/app/routes/agent.tsx +2 -1
  1668. package/src/templates/default/app/routes/settings.tsx +2 -3
  1669. package/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  1670. package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1671. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
  1672. package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
  1673. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
  1674. package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
  1675. package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
  1676. package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
  1677. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
  1678. package/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  1679. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
  1680. package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
  1681. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
  1682. package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
  1683. package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
  1684. package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
  1685. package/corpus/core/src/client/rich-markdown-editor/BubbleToolbar.tsx +0 -253
  1686. package/corpus/core/src/client/rich-markdown-editor/CodeBlockNode.tsx +0 -258
  1687. package/corpus/core/src/client/rich-markdown-editor/DragHandle.ts +0 -1437
  1688. package/corpus/core/src/client/rich-markdown-editor/ImageExtension.ts +0 -306
  1689. package/corpus/core/src/client/rich-markdown-editor/RichMarkdownEditor.tsx +0 -80
  1690. package/corpus/core/src/client/rich-markdown-editor/RunId.ts +0 -61
  1691. package/corpus/core/src/client/rich-markdown-editor/SharedRichEditor.tsx +0 -321
  1692. package/corpus/core/src/client/rich-markdown-editor/SlashCommandMenu.tsx +0 -310
  1693. package/corpus/core/src/client/rich-markdown-editor/extensions.ts +0 -402
  1694. package/corpus/core/src/client/rich-markdown-editor/gfmDoc.ts +0 -92
  1695. package/corpus/core/src/client/rich-markdown-editor/surgical-apply.ts +0 -192
  1696. package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +0 -590
  1697. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +0 -37
  1698. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +0 -1
  1699. package/dist/client/rich-markdown-editor/BubbleToolbar.js +0 -171
  1700. package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +0 -1
  1701. package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts +0 -49
  1702. package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts.map +0 -1
  1703. package/dist/client/rich-markdown-editor/CodeBlockNode.js +0 -127
  1704. package/dist/client/rich-markdown-editor/CodeBlockNode.js.map +0 -1
  1705. package/dist/client/rich-markdown-editor/DragHandle.d.ts +0 -97
  1706. package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +0 -1
  1707. package/dist/client/rich-markdown-editor/DragHandle.js +0 -1066
  1708. package/dist/client/rich-markdown-editor/DragHandle.js.map +0 -1
  1709. package/dist/client/rich-markdown-editor/ImageExtension.d.ts +0 -63
  1710. package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +0 -1
  1711. package/dist/client/rich-markdown-editor/ImageExtension.js +0 -243
  1712. package/dist/client/rich-markdown-editor/ImageExtension.js.map +0 -1
  1713. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +0 -51
  1714. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +0 -1
  1715. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +0 -37
  1716. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +0 -1
  1717. package/dist/client/rich-markdown-editor/RunId.d.ts +0 -28
  1718. package/dist/client/rich-markdown-editor/RunId.d.ts.map +0 -1
  1719. package/dist/client/rich-markdown-editor/RunId.js +0 -60
  1720. package/dist/client/rich-markdown-editor/RunId.js.map +0 -1
  1721. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +0 -110
  1722. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +0 -1
  1723. package/dist/client/rich-markdown-editor/SharedRichEditor.js +0 -144
  1724. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +0 -1
  1725. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +0 -41
  1726. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +0 -1
  1727. package/dist/client/rich-markdown-editor/SlashCommandMenu.js +0 -221
  1728. package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +0 -1
  1729. package/dist/client/rich-markdown-editor/extensions.d.ts +0 -178
  1730. package/dist/client/rich-markdown-editor/extensions.d.ts.map +0 -1
  1731. package/dist/client/rich-markdown-editor/extensions.js +0 -224
  1732. package/dist/client/rich-markdown-editor/extensions.js.map +0 -1
  1733. package/dist/client/rich-markdown-editor/gfmDoc.d.ts +0 -24
  1734. package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +0 -1
  1735. package/dist/client/rich-markdown-editor/gfmDoc.js +0 -83
  1736. package/dist/client/rich-markdown-editor/gfmDoc.js.map +0 -1
  1737. package/dist/client/rich-markdown-editor/surgical-apply.d.ts +0 -66
  1738. package/dist/client/rich-markdown-editor/surgical-apply.d.ts.map +0 -1
  1739. package/dist/client/rich-markdown-editor/surgical-apply.js +0 -147
  1740. package/dist/client/rich-markdown-editor/surgical-apply.js.map +0 -1
  1741. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +0 -110
  1742. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +0 -1
  1743. package/dist/client/rich-markdown-editor/useCollabReconcile.js +0 -441
  1744. package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-extension-result.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/inline-extension-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAe5D,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,CAAC,SAAS,CAAC;AAC7C,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CA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G,OAAO,CAAC,UAAU,CAAC;IAClC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAEnC,MAAM,MAAM,GAAG,wBAAwB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IAChE,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,IAAI,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAC9B,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,EAAE;YACF,IAAI;YACJ,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC;YACtD,IAAI,EACF,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;gBAClC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;gBACxB,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC;YACzB,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;YAClD,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC;YACpC,aAAa,EAAE,kBAAkB,CAAC,MAAM,CAAC,aAAa,CAAC;SACxD,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { extensionPath } from \"../../../extensions/path.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"]}
@@ -0,0 +1,2 @@
1
+ export declare function initializeAgentNativeClient(): void;
2
+ //# sourceMappingURL=client-bootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-bootstrap.d.ts","sourceRoot":"","sources":["../../src/client/client-bootstrap.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD"}
@@ -0,0 +1,7 @@
1
+ import { ensureEmbedAuthFetchInterceptor } from "./embed-auth.js";
2
+ import { installRouteChunkRecovery } from "./route-chunk-recovery.js";
3
+ export function initializeAgentNativeClient() {
4
+ ensureEmbedAuthFetchInterceptor();
5
+ installRouteChunkRecovery();
6
+ }
7
+ //# sourceMappingURL=client-bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-bootstrap.js","sourceRoot":"","sources":["../../src/client/client-bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,UAAU,2BAA2B;IACzC,+BAA+B,EAAE,CAAC;IAClC,yBAAyB,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import { ensureEmbedAuthFetchInterceptor } from \"./embed-auth.js\";\nimport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\n\nexport function initializeAgentNativeClient(): void {\n ensureEmbedAuthFetchInterceptor();\n installRouteChunkRecovery();\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMeter.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextMeter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,8BAA8B,CAAC;AA4DtC,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EAAE,gBAAgB,EAC1B,OAAc,GACf,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,sCAkIA"}
1
+ {"version":3,"file":"ContextMeter.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextMeter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,8BAA8B,CAAC;AActC,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EAAE,gBAAgB,EAC1B,OAAc,GACf,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,sCA+FA"}
@@ -1,21 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ContextMeterView } from "@agent-native/toolkit/context-ui";
2
3
  import { lazy, Suspense, useEffect, useRef, useState } from "react";
3
4
  import { manifestConversationTokens, manifestSystemTokens, } from "../../shared/context-xray.js";
4
- import { Popover, PopoverContent, PopoverTrigger, } from "../components/ui/popover.js";
5
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../components/ui/tooltip.js";
6
5
  import { useActionMutation, useActionQuery } from "../use-action.js";
7
- import { cn } from "../utils.js";
8
- import { formatTokens, resolveContextWindow } from "./format.js";
6
+ import { resolveContextWindow } from "./format.js";
9
7
  const ContextXRayPanel = lazy(() => import("./ContextXRayPanel.js").then((m) => ({
10
8
  default: m.ContextXRayPanel,
11
9
  })));
12
- function ContextDonut({ pct, advisory }) {
13
- const radius = 7.5;
14
- const circumference = 2 * Math.PI * radius;
15
- const displayPct = Math.max(3, Math.min(100, pct));
16
- const dashOffset = circumference - (displayPct / 100) * circumference;
17
- return (_jsxs("span", { className: "relative flex size-5 items-center justify-center", children: [_jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "-rotate-90 size-5", children: [_jsx("circle", { cx: "10", cy: "10", r: radius, className: "stroke-muted", fill: "none", strokeWidth: "3" }), _jsx("circle", { cx: "10", cy: "10", r: radius, className: cn(advisory ? "stroke-amber-500" : "stroke-[#00B5FF]"), fill: "none", strokeLinecap: "round", strokeWidth: "3", strokeDasharray: circumference, strokeDashoffset: dashOffset })] }), _jsx("span", { className: "absolute size-2 rounded-full bg-background" })] }));
18
- }
19
10
  export function ContextMeter({ threadId, manifest: providedManifest, enabled = true, }) {
20
11
  const [open, setOpen] = useState(false);
21
12
  const [optimistic, setOptimistic] = useState(new Map());
@@ -43,14 +34,6 @@ export function ContextMeter({ threadId, manifest: providedManifest, enabled = t
43
34
  }
44
35
  }, [enabled, threadId]);
45
36
  const manifest = providedManifest ?? query.data;
46
- const contextWindow = resolveContextWindow(manifest?.model);
47
- const pct = manifest
48
- ? Math.min(100, Math.round((manifest.totalTokens / contextWindow) * 100))
49
- : 0;
50
- const systemTokens = manifest ? manifestSystemTokens(manifest) : 0;
51
- const conversationTokens = manifest
52
- ? manifestConversationTokens(manifest)
53
- : 0;
54
37
  if ((!shouldQuery && !providedManifest) ||
55
38
  !manifest ||
56
39
  (manifest.rawTokens <= 0 && manifest.totalTokens <= 0)) {
@@ -74,8 +57,10 @@ export function ContextMeter({ threadId, manifest: providedManifest, enabled = t
74
57
  if (action === "restore")
75
58
  restore.mutate(params, options);
76
59
  };
77
- return (_jsx(TooltipProvider, { delayDuration: 200, children: _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": `Context ${pct}%, ${formatTokens(manifest.totalTokens)}${systemTokens > 0 ? ` total: ${formatTokens(systemTokens)} system + ${formatTokens(conversationTokens)} conversation` : ""}. Open Context X-Ray.`, className: cn("flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", open && "bg-accent/60 text-foreground"), children: _jsx(ContextDonut, { pct: pct, advisory: !manifest.enforceable }) }) }) }), _jsxs(TooltipContent, { children: ["Context ", pct, "% \u00B7 ", formatTokens(manifest.totalTokens), systemTokens > 0
78
- ? ` (${formatTokens(systemTokens)} system + ${formatTokens(conversationTokens)} conversation)`
79
- : ""] })] }), _jsx(PopoverContent, { align: "end", side: "top", sideOffset: 8, className: "w-[min(92vw,380px)] overflow-hidden border-border/70 p-0", children: open ? (_jsx(Suspense, { fallback: _jsx("div", { className: "flex h-52 items-center justify-center text-xs text-muted-foreground", children: "Loading context view\u2026" }), children: _jsx(ContextXRayPanel, { manifest: manifest, optimistic: optimistic, onPin: (segmentId) => mutateStatus(segmentId, "pinned", "pin"), onEvict: (segmentId) => mutateStatus(segmentId, "evicted", "evict"), onRestore: (segmentId) => mutateStatus(segmentId, "active", "restore") }) })) : null })] }) }));
60
+ return (_jsx(ContextMeterView, { manifest: {
61
+ ...manifest,
62
+ systemTokens: manifestSystemTokens(manifest),
63
+ conversationTokens: manifestConversationTokens(manifest),
64
+ }, contextWindow: resolveContextWindow(manifest.model), open: open, onOpenChange: setOpen, children: open ? (_jsx(Suspense, { fallback: _jsx("div", { className: "flex h-52 items-center justify-center text-xs text-muted-foreground", children: "Loading context view\u2026" }), children: _jsx(ContextXRayPanel, { manifest: manifest, optimistic: optimistic, onPin: (segmentId) => mutateStatus(segmentId, "pinned", "pin"), onEvict: (segmentId) => mutateStatus(segmentId, "evicted", "evict"), onRestore: (segmentId) => mutateStatus(segmentId, "active", "restore") }) })) : null }));
80
65
  }
81
66
  //# sourceMappingURL=ContextMeter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMeter.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextMeter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMpE,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BA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AY,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,uBAAuB,EACpJ,SAAS,EAAE,EAAE,CACX,qOAAqO,EACrO,IAAI,IAAI,8BAA8B,CACvC,YAED,KAAC,YAAY,IAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,GAAI,GACpD,GACM,GACF,EACjB,MAAC,cAAc,2BACJ,GAAG,eAAM,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,EACnD,YAAY,GAAG,CAAC;oCACf,CAAC,CAAC,KAAK,YAAY,CAAC,YAAY,CAAC,aAAa,YAAY,CAAC,kBAAkB,CAAC,gBAAgB;oCAC9F,CAAC,CAAC,EAAE,IACS,IACT,EACV,KAAC,cAAc,IACb,KAAK,EAAC,KAAK,EACX,IAAI,EAAC,KAAK,EACV,UAAU,EAAE,CAAC,EACb,SAAS,EAAC,0DAA0D,YAEnE,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,QAAQ,IACP,QAAQ,EACN,cAAK,SAAS,EAAC,qEAAqE,2CAE9E,YAGR,KAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,EAC9D,OAAO,EAAE,CAAC,SAAS,EAAE,EAAE,CACrB,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAE7C,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE,CACvB,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,GAE9C,GACO,CACZ,CAAC,CAAC,CAAC,IAAI,GACO,IACT,GACM,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { lazy, Suspense, useEffect, useRef, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextSegmentStatus,\n} from \"../../shared/context-xray.js\";\nimport {\n manifestConversationTokens,\n manifestSystemTokens,\n} from \"../../shared/context-xray.js\";\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"../components/ui/popover.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useActionMutation, useActionQuery } from \"../use-action.js\";\nimport { cn } from \"../utils.js\";\nimport { formatTokens, resolveContextWindow } from \"./format.js\";\n\nconst ContextXRayPanel = lazy(() =>\n import(\"./ContextXRayPanel.js\").then((m) => ({\n default: m.ContextXRayPanel,\n })),\n);\n\nfunction ContextDonut({ pct, advisory }: { pct: number; advisory: boolean }) {\n const radius = 7.5;\n const circumference = 2 * Math.PI * radius;\n const displayPct = Math.max(3, Math.min(100, pct));\n const dashOffset = circumference - (displayPct / 100) * circumference;\n\n return (\n <span className=\"relative flex size-5 items-center justify-center\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" className=\"-rotate-90 size-5\">\n <circle\n cx=\"10\"\n cy=\"10\"\n r={radius}\n className=\"stroke-muted\"\n fill=\"none\"\n strokeWidth=\"3\"\n />\n <circle\n cx=\"10\"\n cy=\"10\"\n r={radius}\n className={cn(advisory ? \"stroke-amber-500\" : \"stroke-[#00B5FF]\")}\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeWidth=\"3\"\n strokeDasharray={circumference}\n strokeDashoffset={dashOffset}\n />\n </svg>\n <span className=\"absolute size-2 rounded-full bg-background\" />\n </span>\n );\n}\n\nexport function ContextMeter({\n threadId,\n manifest: providedManifest,\n enabled = true,\n}: {\n threadId?: string | null;\n manifest?: ContextManifest | null;\n enabled?: boolean;\n}) {\n const [open, setOpen] = useState(false);\n const [optimistic, setOptimistic] = useState<\n Map<string, ContextSegmentStatus>\n >(new Map());\n const currentThreadId = useRef(threadId);\n const shouldQuery = Boolean(threadId && enabled && !providedManifest);\n const query = useActionQuery(\n \"context-manifest-get\",\n shouldQuery && threadId ? { threadId } : undefined,\n {\n enabled: shouldQuery,\n staleTime: 1000,\n },\n ) as { data?: ContextManifest };\n const pin = useActionMutation(\"context-pin\");\n const evict = useActionMutation(\"context-evict\");\n const restore = useActionMutation(\"context-restore\");\n\n useEffect(() => {\n currentThreadId.current = threadId;\n setOptimistic(new Map());\n }, [threadId]);\n\n useEffect(() => {\n if (!threadId || !enabled || typeof window === \"undefined\") return;\n const params = new URLSearchParams(window.location.search);\n const wantsXray = params.get(\"contextXray\") === \"1\";\n const targetThread = params.get(\"threadId\");\n if (wantsXray && (!targetThread || targetThread === threadId)) {\n setOpen(true);\n }\n }, [enabled, threadId]);\n\n const manifest = providedManifest ?? query.data;\n const contextWindow = resolveContextWindow(manifest?.model);\n const pct = manifest\n ? Math.min(100, Math.round((manifest.totalTokens / contextWindow) * 100))\n : 0;\n const systemTokens = manifest ? manifestSystemTokens(manifest) : 0;\n const conversationTokens = manifest\n ? manifestConversationTokens(manifest)\n : 0;\n\n if (\n (!shouldQuery && !providedManifest) ||\n !manifest ||\n (manifest.rawTokens <= 0 && manifest.totalTokens <= 0)\n ) {\n return null;\n }\n\n const mutateStatus = (\n segmentId: string,\n status: ContextSegmentStatus,\n action: \"pin\" | \"evict\" | \"restore\",\n ) => {\n const previous = new Map(optimistic);\n setOptimistic((prev) => new Map(prev).set(segmentId, status));\n const params = { threadId, segmentId };\n const options = {\n onError: () => {\n if (currentThreadId.current === threadId) {\n setOptimistic(previous);\n }\n },\n };\n if (action === \"pin\") pin.mutate(params, options);\n if (action === \"evict\") evict.mutate(params, options);\n if (action === \"restore\") restore.mutate(params, options);\n };\n\n return (\n <TooltipProvider delayDuration={200}>\n <Popover open={open} onOpenChange={setOpen}>\n <Tooltip>\n <TooltipTrigger asChild>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label={`Context ${pct}%, ${formatTokens(\n manifest.totalTokens,\n )}${systemTokens > 0 ? ` total: ${formatTokens(systemTokens)} system + ${formatTokens(conversationTokens)} conversation` : \"\"}. Open Context X-Ray.`}\n className={cn(\n \"flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n open && \"bg-accent/60 text-foreground\",\n )}\n >\n <ContextDonut pct={pct} advisory={!manifest.enforceable} />\n </button>\n </PopoverTrigger>\n </TooltipTrigger>\n <TooltipContent>\n Context {pct}% · {formatTokens(manifest.totalTokens)}\n {systemTokens > 0\n ? ` (${formatTokens(systemTokens)} system + ${formatTokens(conversationTokens)} conversation)`\n : \"\"}\n </TooltipContent>\n </Tooltip>\n <PopoverContent\n align=\"end\"\n side=\"top\"\n sideOffset={8}\n className=\"w-[min(92vw,380px)] overflow-hidden border-border/70 p-0\"\n >\n {open ? (\n <Suspense\n fallback={\n <div className=\"flex h-52 items-center justify-center text-xs text-muted-foreground\">\n Loading context view…\n </div>\n }\n >\n <ContextXRayPanel\n manifest={manifest}\n optimistic={optimistic}\n onPin={(segmentId) => mutateStatus(segmentId, \"pinned\", \"pin\")}\n onEvict={(segmentId) =>\n mutateStatus(segmentId, \"evicted\", \"evict\")\n }\n onRestore={(segmentId) =>\n mutateStatus(segmentId, \"active\", \"restore\")\n }\n />\n </Suspense>\n ) : null}\n </PopoverContent>\n </Popover>\n </TooltipProvider>\n );\n}\n"]}
1
+ {"version":3,"file":"ContextMeter.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextMeter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMpE,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aA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C,CAAC;gBAC1B,CAAC;YACH,CAAC;SACF,CAAC;QACF,IAAI,MAAM,KAAK,KAAK;YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,OAAO;YAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtD,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,gBAAgB,IACf,QAAQ,EAAE;YACR,GAAG,QAAQ;YACX,YAAY,EAAE,oBAAoB,CAAC,QAAQ,CAAC;YAC5C,kBAAkB,EAAE,0BAA0B,CAAC,QAAQ,CAAC;SACzD,EACD,aAAa,EAAE,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,EACnD,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,YAEpB,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,QAAQ,IACP,QAAQ,EACN,cAAK,SAAS,EAAC,qEAAqE,2CAE9E,YAGR,KAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,EAC9D,OAAO,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EACnE,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE,CACvB,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,GAE9C,GACO,CACZ,CAAC,CAAC,CAAC,IAAI,GACS,CACpB,CAAC;AACJ,CAAC","sourcesContent":["import { ContextMeterView } from \"@agent-native/toolkit/context-ui\";\nimport { lazy, Suspense, useEffect, useRef, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextSegmentStatus,\n} from \"../../shared/context-xray.js\";\nimport {\n manifestConversationTokens,\n manifestSystemTokens,\n} from \"../../shared/context-xray.js\";\nimport { useActionMutation, useActionQuery } from \"../use-action.js\";\nimport { resolveContextWindow } from \"./format.js\";\n\nconst ContextXRayPanel = lazy(() =>\n import(\"./ContextXRayPanel.js\").then((m) => ({\n default: m.ContextXRayPanel,\n })),\n);\n\nexport function ContextMeter({\n threadId,\n manifest: providedManifest,\n enabled = true,\n}: {\n threadId?: string | null;\n manifest?: ContextManifest | null;\n enabled?: boolean;\n}) {\n const [open, setOpen] = useState(false);\n const [optimistic, setOptimistic] = useState<\n Map<string, ContextSegmentStatus>\n >(new Map());\n const currentThreadId = useRef(threadId);\n const shouldQuery = Boolean(threadId && enabled && !providedManifest);\n const query = useActionQuery(\n \"context-manifest-get\",\n shouldQuery && threadId ? { threadId } : undefined,\n {\n enabled: shouldQuery,\n staleTime: 1000,\n },\n ) as { data?: ContextManifest };\n const pin = useActionMutation(\"context-pin\");\n const evict = useActionMutation(\"context-evict\");\n const restore = useActionMutation(\"context-restore\");\n\n useEffect(() => {\n currentThreadId.current = threadId;\n setOptimistic(new Map());\n }, [threadId]);\n\n useEffect(() => {\n if (!threadId || !enabled || typeof window === \"undefined\") return;\n const params = new URLSearchParams(window.location.search);\n const wantsXray = params.get(\"contextXray\") === \"1\";\n const targetThread = params.get(\"threadId\");\n if (wantsXray && (!targetThread || targetThread === threadId)) {\n setOpen(true);\n }\n }, [enabled, threadId]);\n\n const manifest = providedManifest ?? query.data;\n if (\n (!shouldQuery && !providedManifest) ||\n !manifest ||\n (manifest.rawTokens <= 0 && manifest.totalTokens <= 0)\n ) {\n return null;\n }\n\n const mutateStatus = (\n segmentId: string,\n status: ContextSegmentStatus,\n action: \"pin\" | \"evict\" | \"restore\",\n ) => {\n const previous = new Map(optimistic);\n setOptimistic((prev) => new Map(prev).set(segmentId, status));\n const params = { threadId, segmentId };\n const options = {\n onError: () => {\n if (currentThreadId.current === threadId) {\n setOptimistic(previous);\n }\n },\n };\n if (action === \"pin\") pin.mutate(params, options);\n if (action === \"evict\") evict.mutate(params, options);\n if (action === \"restore\") restore.mutate(params, options);\n };\n\n return (\n <ContextMeterView\n manifest={{\n ...manifest,\n systemTokens: manifestSystemTokens(manifest),\n conversationTokens: manifestConversationTokens(manifest),\n }}\n contextWindow={resolveContextWindow(manifest.model)}\n open={open}\n onOpenChange={setOpen}\n >\n {open ? (\n <Suspense\n fallback={\n <div className=\"flex h-52 items-center justify-center text-xs text-muted-foreground\">\n Loading context view…\n </div>\n }\n >\n <ContextXRayPanel\n manifest={manifest}\n optimistic={optimistic}\n onPin={(segmentId) => mutateStatus(segmentId, \"pinned\", \"pin\")}\n onEvict={(segmentId) => mutateStatus(segmentId, \"evicted\", \"evict\")}\n onRestore={(segmentId) =>\n mutateStatus(segmentId, \"active\", \"restore\")\n }\n />\n </Suspense>\n ) : null}\n </ContextMeterView>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSegmentRow.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextSegmentRow.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAU3E,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,sBAAsB,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,+BAyGA"}
1
+ {"version":3,"file":"ContextSegmentRow.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextSegmentRow.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,sBAAsB,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,+BAUA"}
@@ -1,22 +1,6 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconLock, IconPin, IconRotate2, IconX } from "@tabler/icons-react";
3
- import { Tooltip, TooltipContent, TooltipTrigger, } from "../components/ui/tooltip.js";
4
- import { cn } from "../utils.js";
5
- import { formatTokens, statusLabel } from "./format.js";
6
- import { SegmentProvenancePopover } from "./SegmentProvenancePopover.js";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ContextSegmentRowView } from "@agent-native/toolkit/context-ui";
7
3
  export function ContextSegmentRow({ segment, advisory, onPin, onEvict, onRestore, }) {
8
- const disabled = segment.protected || segment.status === "evicted";
9
- return (_jsxs("div", { tabIndex: 0, onKeyDown: (event) => {
10
- if (event.key === "p")
11
- onPin();
12
- if (event.key === "e" && !disabled)
13
- onEvict();
14
- if (event.key === "u" && segment.status !== "active")
15
- onRestore();
16
- }, className: cn("group flex min-h-11 items-center gap-2 rounded-sm px-2 py-1.5 outline-none transition-colors hover:bg-accent/35 focus-visible:bg-accent/35 focus-visible:ring-1 focus-visible:ring-ring", segment.status === "evicted" && "opacity-60"), children: [_jsx(SegmentProvenancePopover, { segment: segment, children: _jsxs("button", { type: "button", className: "min-w-0 flex-1 text-left", "aria-label": `Inspect ${segment.label}`, children: [_jsx("div", { className: cn("truncate text-[13px] font-medium leading-5 text-foreground", segment.status === "evicted" && "line-through"), children: segment.label }), _jsxs("div", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [_jsx("span", { children: formatTokens(segment.tokenCount) }), segment.tokenMethod === "estimate" && _jsx("span", { children: "~" }), _jsx("span", { children: "\u00B7" }), _jsx("span", { children: statusLabel(segment) }), advisory && _jsx("span", { children: "\u00B7 advisory" })] })] }) }), _jsx("div", { className: "flex shrink-0 items-center gap-1 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100", children: segment.protected ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { className: "flex size-6 items-center justify-center rounded-md text-muted-foreground", children: _jsx(IconLock, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Protected during active turn" })] })) : segment.status === "evicted" ||
17
- segment.status === "summarized" ||
18
- segment.status === "pinned" ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: onRestore, className: "flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground", "aria-label": segment.status === "pinned"
19
- ? "Unpin segment"
20
- : "Restore segment", children: _jsx(IconRotate2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: segment.status === "pinned" ? "Unpin" : "Restore" })] })) : (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: onPin, className: "flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground", "aria-label": "Pin segment", children: _jsx(IconPin, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Pin" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: onEvict, className: "flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-destructive", "aria-label": "Evict segment", children: _jsx(IconX, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: advisory ? "Record eviction intent" : "Evict" })] })] })) })] }));
4
+ return (_jsx(ContextSegmentRowView, { segment: segment, advisory: advisory, onPin: onPin, onEvict: onEvict, onRestore: onRestore }));
21
5
  }
22
6
  //# sourceMappingURL=ContextSegmentRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSegmentRow.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextSegmentRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5E,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,SAAS,GAOV;IACC,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC;IACnE,OAAO,CACL,eACE,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;YACnB,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;gBAAE,KAAK,EAAE,CAAC;YAC/B,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,QAAQ;gBAAE,OAAO,EAAE,CAAC;YAC9C,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ;gBAAE,SAAS,EAAE,CAAC;QACpE,CAAC,EACD,SAAS,EAAE,EAAE,CACX,yLAAyL,EACzL,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI,YAAY,CAC7C,aAED,KAAC,wBAAwB,IAAC,OAAO,EAAE,OAAO,YACxC,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,E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C,CAAC,CACF,8BACE,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,KAAK,EACd,SAAS,EAAC,oHAAoH,gBACnH,aAAa,YAExB,KAAC,OAAO,IAAC,SAAS,EAAC,aAAa,GAAG,GAC5B,GACM,EACjB,KAAC,cAAc,sBAAqB,IAC5B,EACV,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,qHAAqH,gBACpH,eAAe,YAE1B,KAAC,KAAK,IAAC,SAAS,EAAC,aAAa,GAAG,GAC1B,GACM,EACjB,KAAC,cAAc,cACZ,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,OAAO,GAC/B,IACT,IACT,CACJ,GACG,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconLock, IconPin, IconRotate2, IconX } from \"@tabler/icons-react\";\n\nimport type { ContextManifestSegment } from \"../../shared/context-xray.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { cn } from \"../utils.js\";\nimport { formatTokens, statusLabel } from \"./format.js\";\nimport { SegmentProvenancePopover } from \"./SegmentProvenancePopover.js\";\n\nexport function ContextSegmentRow({\n segment,\n advisory,\n onPin,\n onEvict,\n onRestore,\n}: {\n segment: ContextManifestSegment;\n advisory: boolean;\n onPin: () => void;\n onEvict: () => void;\n onRestore: () => void;\n}) {\n const disabled = segment.protected || segment.status === \"evicted\";\n return (\n <div\n tabIndex={0}\n onKeyDown={(event) => {\n if (event.key === \"p\") onPin();\n if (event.key === \"e\" && !disabled) onEvict();\n if (event.key === \"u\" && segment.status !== \"active\") onRestore();\n }}\n className={cn(\n \"group flex min-h-11 items-center gap-2 rounded-sm px-2 py-1.5 outline-none transition-colors hover:bg-accent/35 focus-visible:bg-accent/35 focus-visible:ring-1 focus-visible:ring-ring\",\n segment.status === \"evicted\" && \"opacity-60\",\n )}\n >\n <SegmentProvenancePopover segment={segment}>\n <button\n type=\"button\"\n className=\"min-w-0 flex-1 text-left\"\n aria-label={`Inspect ${segment.label}`}\n >\n <div\n className={cn(\n \"truncate text-[13px] font-medium leading-5 text-foreground\",\n segment.status === \"evicted\" && \"line-through\",\n )}\n >\n {segment.label}\n </div>\n <div className=\"flex items-center gap-1.5 text-[11px] text-muted-foreground\">\n <span>{formatTokens(segment.tokenCount)}</span>\n {segment.tokenMethod === \"estimate\" && <span>~</span>}\n <span>·</span>\n <span>{statusLabel(segment)}</span>\n {advisory && <span>· advisory</span>}\n </div>\n </button>\n </SegmentProvenancePopover>\n <div className=\"flex shrink-0 items-center gap-1 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100\">\n {segment.protected ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex size-6 items-center justify-center rounded-md text-muted-foreground\">\n <IconLock className=\"h-3.5 w-3.5\" />\n </span>\n </TooltipTrigger>\n <TooltipContent>Protected during active turn</TooltipContent>\n </Tooltip>\n ) : segment.status === \"evicted\" ||\n segment.status === \"summarized\" ||\n segment.status === \"pinned\" ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={onRestore}\n className=\"flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground\"\n aria-label={\n segment.status === \"pinned\"\n ? \"Unpin segment\"\n : \"Restore segment\"\n }\n >\n <IconRotate2 className=\"h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {segment.status === \"pinned\" ? \"Unpin\" : \"Restore\"}\n </TooltipContent>\n </Tooltip>\n ) : (\n <>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={onPin}\n className=\"flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground\"\n aria-label=\"Pin segment\"\n >\n <IconPin className=\"h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>Pin</TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={onEvict}\n className=\"flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-destructive\"\n aria-label=\"Evict segment\"\n >\n <IconX className=\"h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {advisory ? \"Record eviction intent\" : \"Evict\"}\n </TooltipContent>\n </Tooltip>\n </>\n )}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ContextSegmentRow.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextSegmentRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAIzE,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,SAAS,GAOV;IACC,OAAO,CACL,KAAC,qBAAqB,IACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { ContextSegmentRowView } from \"@agent-native/toolkit/context-ui\";\n\nimport type { ContextManifestSegment } from \"../../shared/context-xray.js\";\n\nexport function ContextSegmentRow({\n segment,\n advisory,\n onPin,\n onEvict,\n onRestore,\n}: {\n segment: ContextManifestSegment;\n advisory: boolean;\n onPin: () => void;\n onEvict: () => void;\n onRestore: () => void;\n}) {\n return (\n <ContextSegmentRowView\n segment={segment}\n advisory={advisory}\n onPin={onPin}\n onEvict={onEvict}\n onRestore={onRestore}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextTreemap.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextTreemap.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AA4CtC,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,cAAmB,EACnB,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,+BAsEA"}
1
+ {"version":3,"file":"ContextTreemap.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextTreemap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AAEtC,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,cAAmB,EACnB,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,+BAQA"}
@@ -1,57 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from "react";
3
- import { Treemap } from "recharts";
4
- import { formatTokens, groupFill } from "./format.js";
5
- function TreemapContent(props) {
6
- const { x, y, width, height, name, group, size } = props;
7
- if (width < 8 || height < 8)
8
- return null;
9
- const showLabel = width > 90 && height > 42;
10
- return (_jsxs("g", { children: [_jsx("rect", { x: x, y: y, width: width, height: height, rx: 3, ry: 3, fill: groupFill(group), stroke: "var(--background)", strokeWidth: 2 }), showLabel && (_jsx("foreignObject", { x: x + 6, y: y + 6, width: width - 12, height: height - 12, children: _jsxs("div", { className: "flex h-full flex-col justify-between overflow-hidden text-[11px] leading-tight text-white", children: [_jsx("div", { className: "truncate font-medium", children: name }), _jsx("div", { className: "text-white/85", children: formatTokens(size) })] }) }))] }));
11
- }
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ContextTreemapView } from "@agent-native/toolkit/context-ui";
12
3
  export function ContextTreemap({ segments, systemSections = [], onSelect, }) {
13
- const containerRef = useRef(null);
14
- const [chartWidth, setChartWidth] = useState(0);
15
- const data = segments
16
- .filter((segment) => segment.status !== "evicted" && segment.tokenCount > 0)
17
- .map((segment) => ({
18
- name: segment.label,
19
- size: segment.tokenCount,
20
- group: segment.group,
21
- segmentId: segment.segmentId,
22
- }));
23
- data.push(...systemSections
24
- .filter((section) => section.tokenCount > 0)
25
- .map((section) => ({
26
- name: section.label,
27
- size: section.tokenCount,
28
- group: `System · ${section.governance}`,
29
- segmentId: section.segmentId,
30
- })));
31
- useEffect(() => {
32
- const element = containerRef.current;
33
- if (!element)
34
- return;
35
- const updateWidth = () => {
36
- setChartWidth(Math.max(0, Math.floor(element.clientWidth - 8)));
37
- };
38
- updateWidth();
39
- const observer = typeof ResizeObserver !== "undefined"
40
- ? new ResizeObserver(updateWidth)
41
- : null;
42
- observer?.observe(element);
43
- window.addEventListener("resize", updateWidth);
44
- return () => {
45
- observer?.disconnect();
46
- window.removeEventListener("resize", updateWidth);
47
- };
48
- }, []);
49
- if (data.length === 0) {
50
- return (_jsx("div", { className: "flex h-52 items-center justify-center rounded-md bg-muted/30 text-xs text-muted-foreground", children: "No active segments" }));
51
- }
52
- return (_jsx("div", { ref: containerRef, className: "h-56 min-w-0 rounded-md bg-muted/25 p-1", children: chartWidth > 0 && (_jsx(Treemap, { width: chartWidth, height: 216, data: data, dataKey: "size", nameKey: "name", aspectRatio: 4 / 3, isAnimationActive: false, content: _jsx(TreemapContent, {}), onClick: (datum) => {
53
- if (datum?.segmentId)
54
- onSelect?.(datum.segmentId);
55
- } })) }));
4
+ return (_jsx(ContextTreemapView, { segments: segments, systemSections: systemSections, onSelect: onSelect }));
56
5
  }
57
6
  //# sourceMappingURL=ContextTreemap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextTreemap.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextTreemap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAMnC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAStD,SAAS,cAAc,CAAC,KAAU;IAChC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACzD,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,SAAS,GAAG,KAAK,GAAG,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;IAC5C,OAAO,CACL,wBACE,eACE,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,CAAC,EACL,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,EACtB,MAAM,EAAC,mBAAmB,EAC1B,WAAW,EAAE,CAAC,GACd,EACD,SAAS,IAAI,CACZ,wBACE,CAAC,EAAE,CAAC,GAAG,CAAC,EACR,CAAC,EAAE,CAAC,GAAG,CAAC,EACR,KAAK,EAAE,KAAK,GAAG,EAAE,EACjB,MAAM,EAAE,MAAM,GAAG,EAAE,YAEnB,eAAK,SAAS,EAAC,2FAA2F,aACxG,cAAK,SAAS,EAAC,sBAAsB,YAAE,IAAI,GAAO,EAClD,cAAK,SAAS,EAAC,eAAe,YAAE,YAAY,CAAC,IAAI,CAAC,GAAO,IACrD,GACQ,CACjB,IACC,CACL,CAAC;AACJ,CAAC;AAED,MAAM,UA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ClE,CAAC,CAAC;QACF,WAAW,EAAE,CAAC;QAEd,MAAM,QAAQ,GACZ,OAAO,cAAc,KAAK,WAAW;YACnC,CAAC,CAAC,IAAI,cAAc,CAAC,WAAW,CAAC;YACjC,CAAC,CAAC,IAAI,CAAC;QACX,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3B,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAC/C,OAAO,GAAG,EAAE;YACV,QAAQ,EAAE,UAAU,EAAE,CAAC;YACvB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QACpD,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,CACL,cAAK,SAAS,EAAC,4FAA4F,mCAErG,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,yCAAyC,YACxE,UAAU,GAAG,CAAC,IAAI,CACjB,KAAC,OAAO,IACN,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,GAAG,EACX,IAAI,EAAE,IAAW,EACjB,OAAO,EAAC,MAAM,EACd,OAAO,EAAC,MAAM,EACd,WAAW,EAAE,CAAC,GAAG,CAAC,EAClB,iBAAiB,EAAE,KAAK,EACxB,OAAO,EAAE,KAAC,cAAc,KAAG,EAC3B,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE;gBACtB,IAAI,KAAK,EAAE,SAAS;oBAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACpD,CAAC,GACD,CACH,GACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { Treemap } from \"recharts\";\n\nimport type {\n ContextManifestSegment,\n ContextManifestSystemSection,\n} from \"../../shared/context-xray.js\";\nimport { formatTokens, groupFill } from \"./format.js\";\n\ninterface TreemapDatum {\n name: string;\n size: number;\n group: string;\n segmentId: string;\n}\n\nfunction TreemapContent(props: any) {\n const { x, y, width, height, name, group, size } = props;\n if (width < 8 || height < 8) return null;\n const showLabel = width > 90 && height > 42;\n return (\n <g>\n <rect\n x={x}\n y={y}\n width={width}\n height={height}\n rx={3}\n ry={3}\n fill={groupFill(group)}\n stroke=\"var(--background)\"\n strokeWidth={2}\n />\n {showLabel && (\n <foreignObject\n x={x + 6}\n y={y + 6}\n width={width - 12}\n height={height - 12}\n >\n <div className=\"flex h-full flex-col justify-between overflow-hidden text-[11px] leading-tight text-white\">\n <div className=\"truncate font-medium\">{name}</div>\n <div className=\"text-white/85\">{formatTokens(size)}</div>\n </div>\n </foreignObject>\n )}\n </g>\n );\n}\n\nexport function ContextTreemap({\n segments,\n systemSections = [],\n onSelect,\n}: {\n segments: ContextManifestSegment[];\n systemSections?: ContextManifestSystemSection[];\n onSelect?: (segmentId: string) => void;\n}) {\n const containerRef = useRef<HTMLDivElement>(null);\n const [chartWidth, setChartWidth] = useState(0);\n const data: TreemapDatum[] = segments\n .filter((segment) => segment.status !== \"evicted\" && segment.tokenCount > 0)\n .map((segment) => ({\n name: segment.label,\n size: segment.tokenCount,\n group: segment.group,\n segmentId: segment.segmentId,\n }));\n data.push(\n ...systemSections\n .filter((section) => section.tokenCount > 0)\n .map((section) => ({\n name: section.label,\n size: section.tokenCount,\n group: `System · ${section.governance}`,\n segmentId: section.segmentId,\n })),\n );\n\n useEffect(() => {\n const element = containerRef.current;\n if (!element) return;\n\n const updateWidth = () => {\n setChartWidth(Math.max(0, Math.floor(element.clientWidth - 8)));\n };\n updateWidth();\n\n const observer =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(updateWidth)\n : null;\n observer?.observe(element);\n window.addEventListener(\"resize\", updateWidth);\n return () => {\n observer?.disconnect();\n window.removeEventListener(\"resize\", updateWidth);\n };\n }, []);\n\n if (data.length === 0) {\n return (\n <div className=\"flex h-52 items-center justify-center rounded-md bg-muted/30 text-xs text-muted-foreground\">\n No active segments\n </div>\n );\n }\n\n return (\n <div ref={containerRef} className=\"h-56 min-w-0 rounded-md bg-muted/25 p-1\">\n {chartWidth > 0 && (\n <Treemap\n width={chartWidth}\n height={216}\n data={data as any}\n dataKey=\"size\"\n nameKey=\"name\"\n aspectRatio={4 / 3}\n isAnimationActive={false}\n content={<TreemapContent />}\n onClick={(datum: any) => {\n if (datum?.segmentId) onSelect?.(datum.segmentId);\n }}\n />\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ContextTreemap.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextTreemap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAOtE,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,cAAc,GAAG,EAAE,EACnB,QAAQ,GAKT;IACC,OAAO,CACL,KAAC,kBAAkB,IACjB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { ContextTreemapView } from \"@agent-native/toolkit/context-ui\";\n\nimport type {\n ContextManifestSegment,\n ContextManifestSystemSection,\n} from \"../../shared/context-xray.js\";\n\nexport function ContextTreemap({\n segments,\n systemSections = [],\n onSelect,\n}: {\n segments: ContextManifestSegment[];\n systemSections?: ContextManifestSystemSection[];\n onSelect?: (segmentId: string) => void;\n}) {\n return (\n <ContextTreemapView\n segments={segments}\n systemSections={systemSections}\n onSelect={onSelect}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextXRayPanel.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextXRayPanel.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,eAAe,EAGf,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AAkItC,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,EACV,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC9C,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,+BAsQA"}
1
+ {"version":3,"file":"ContextXRayPanel.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/ContextXRayPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AAQtC,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,EACV,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC9C,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,+BAiCA"}
@@ -1,170 +1,28 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconChartTreemap, IconChevronDown, IconChevronRight, IconLock, IconListDetails, } from "@tabler/icons-react";
3
- import { useMemo, useState } from "react";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ContextXRayPanelView } from "@agent-native/toolkit/context-ui";
4
3
  import { manifestConversationTokens, manifestSystemTokens, } from "../../shared/context-xray.js";
5
- import { Tooltip, TooltipContent, TooltipTrigger, } from "../components/ui/tooltip.js";
6
4
  import { useT } from "../i18n.js";
7
- import { cn } from "../utils.js";
8
- import { ContextSegmentRow } from "./ContextSegmentRow.js";
9
- import { ContextTreemap } from "./ContextTreemap.js";
10
- import { formatTokens, groupColor, resolveContextWindow } from "./format.js";
11
- function applyOptimisticStatus(segments, optimistic) {
12
- if (optimistic.size === 0)
13
- return segments;
14
- return segments.map((segment) => {
15
- const status = optimistic.get(segment.segmentId);
16
- return status ? { ...segment, status } : segment;
17
- });
18
- }
19
- function groupedSegments(segments) {
20
- const map = new Map();
21
- for (const segment of segments) {
22
- const groupName = segment.status === "pinned"
23
- ? "Pinned"
24
- : segment.status === "evicted"
25
- ? "Evicted"
26
- : segment.group;
27
- const group = map.get(groupName) ?? {
28
- name: groupName,
29
- tokens: 0,
30
- segments: [],
31
- };
32
- group.tokens += segment.tokenCount;
33
- group.segments.push(segment);
34
- map.set(groupName, group);
35
- }
36
- const order = [
37
- "Pinned",
38
- "Tool results",
39
- "Files read",
40
- "Conversation",
41
- "Thinking",
42
- "Evicted",
43
- ];
44
- return [...map.values()].sort((a, b) => {
45
- const ai = order.indexOf(a.name);
46
- const bi = order.indexOf(b.name);
47
- if (ai >= 0 || bi >= 0)
48
- return (ai < 0 ? 99 : ai) - (bi < 0 ? 99 : bi);
49
- return b.tokens - a.tokens;
50
- });
51
- }
52
- const GOVERNANCE_ORDER = ["required", "inherited", "user"];
53
- function governanceLabel(governance, t) {
54
- switch (governance) {
55
- case "required":
56
- return t("contextXray.governance.required", {
5
+ import { resolveContextWindow } from "./format.js";
6
+ export function ContextXRayPanel({ manifest, optimistic, onPin, onEvict, onRestore, }) {
7
+ const t = useT();
8
+ return (_jsx(ContextXRayPanelView, { manifest: {
9
+ ...manifest,
10
+ systemTokens: manifestSystemTokens(manifest),
11
+ conversationTokens: manifestConversationTokens(manifest),
12
+ }, contextWindow: resolveContextWindow(manifest.model), optimistic: optimistic, onPin: onPin, onEvict: onEvict, onRestore: onRestore, titleLabel: t("contextXray.panelTitle", {
13
+ defaultValue: "Context X-Ray",
14
+ }), systemOrderedLabel: t("contextXray.systemOrdered", {
15
+ defaultValue: "System · ordered, not evictable",
16
+ }), governanceLabels: {
17
+ required: t("contextXray.governance.required", {
57
18
  defaultValue: "Required",
58
- });
59
- case "inherited":
60
- return t("contextXray.governance.inherited", {
19
+ }),
20
+ inherited: t("contextXray.governance.inherited", {
61
21
  defaultValue: "Inherited",
62
- });
63
- case "user":
64
- return t("contextXray.governance.user", {
22
+ }),
23
+ user: t("contextXray.governance.user", {
65
24
  defaultValue: "Your context",
66
- });
67
- }
68
- }
69
- function sourceLabel(section) {
70
- return (section.sourceRef?.path ??
71
- section.sourceRef?.resourceId ??
72
- section.sourceRef?.scope ??
73
- "framework");
74
- }
75
- function SystemSectionRow({ section, totalTokens, }) {
76
- const share = totalTokens > 0 ? Math.round((section.tokenCount / totalTokens) * 100) : 0;
77
- return (_jsxs("div", { className: "flex min-h-12 items-start gap-2 rounded-sm px-2 py-1.5", children: [_jsx("span", { className: "mt-1 flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground", children: _jsx(IconLock, { className: "h-3.5 w-3.5" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-[13px] font-medium leading-5 text-foreground", children: section.label }), _jsxs("div", { className: "truncate text-[11px] text-muted-foreground", children: [sourceLabel(section), " \u00B7 ", formatTokens(section.tokenCount), " tokens \u00B7", " ", share, "%", section.tokenMethod === "estimate" ? " · estimated" : ""] }), section.preview ? (_jsx("div", { className: "mt-0.5 line-clamp-2 text-[11px] text-muted-foreground/80", children: section.preview })) : null] })] }));
78
- }
79
- export function ContextXRayPanel({ manifest, optimistic, onPin, onEvict, onRestore, }) {
80
- const t = useT();
81
- const [mode, setMode] = useState("list");
82
- const [collapsed, setCollapsed] = useState(new Set());
83
- const segments = useMemo(() => applyOptimisticStatus(manifest.segments, optimistic), [manifest.segments, optimistic]);
84
- const groups = useMemo(() => groupedSegments(segments), [segments]);
85
- const systemSections = manifest.systemSections ?? [];
86
- const systemGroups = useMemo(() => {
87
- const grouped = new Map();
88
- for (const section of systemSections) {
89
- const list = grouped.get(section.governance) ?? [];
90
- list.push(section);
91
- grouped.set(section.governance, list);
92
- }
93
- return GOVERNANCE_ORDER.flatMap((governance) => {
94
- const sections = grouped.get(governance);
95
- return sections && sections.length > 0
96
- ? [
97
- {
98
- governance,
99
- sections,
100
- tokens: sections.reduce((sum, section) => sum + section.tokenCount, 0),
101
- },
102
- ]
103
- : [];
104
- });
105
- }, [systemSections]);
106
- const contextWindow = resolveContextWindow(manifest.model);
107
- const pct = Math.min(100, Math.round((manifest.totalTokens / contextWindow) * 100));
108
- const headroom = Math.max(0, contextWindow - manifest.totalTokens);
109
- const pinned = segments.filter((s) => s.status === "pinned").length;
110
- const evicted = segments.filter((s) => s.status === "evicted").length;
111
- const systemTokens = manifestSystemTokens(manifest);
112
- const conversationTokens = manifestConversationTokens(manifest);
113
- const details = [
114
- `${formatTokens(headroom)} free`,
115
- systemTokens > 0 ? `${formatTokens(systemTokens)} system` : null,
116
- `${formatTokens(conversationTokens)} conversation`,
117
- pinned > 0 ? `${pinned} pinned` : null,
118
- evicted > 0 ? `${evicted} evicted` : null,
119
- manifest.tokenCountMethod === "estimate" ? "estimated" : null,
120
- !manifest.enforceable ? "advisory" : null,
121
- ].filter((item) => Boolean(item));
122
- return (_jsxs("div", { className: "flex max-h-[min(72vh,520px)] flex-col", children: [_jsxs("div", { className: "border-b border-border/60 px-3 py-2.5", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("h2", { className: "min-w-0 truncate text-sm font-medium text-foreground", children: "Context X-Ray" }), _jsxs("div", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: [formatTokens(manifest.totalTokens), " \u00B7 ", pct, "%"] })] }), _jsx("div", { className: "mt-2 h-1 overflow-hidden rounded-full bg-muted/70", children: _jsx("div", { className: "h-full rounded-full bg-foreground origin-left transition-transform duration-200", style: {
123
- transform: `scaleX(${Math.min(1, pct / 100)})`,
124
- width: "100%",
125
- } }) }), _jsxs("div", { className: "mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-muted-foreground", children: [details.map((detail) => (_jsx("span", { children: detail }, detail))), manifest.reclaimedTokens > 0 && (_jsxs("span", { className: "font-medium text-emerald-600 dark:text-emerald-400", children: ["-", formatTokens(manifest.reclaimedTokens)] }))] })] }), _jsxs("div", { className: "overflow-y-auto px-2 py-2", children: [_jsx("div", { className: "mb-1 flex items-center justify-end", children: _jsxs("div", { className: "inline-flex rounded-md bg-muted/40 p-0.5", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => setMode("list"), "aria-label": "Show context list", className: cn("flex size-7 cursor-pointer items-center justify-center rounded text-muted-foreground", mode === "list"
126
- ? "bg-background text-foreground shadow-sm"
127
- : "hover:text-foreground"), children: _jsx(IconListDetails, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "List" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => setMode("map"), "aria-label": "Show context map", className: cn("flex size-7 cursor-pointer items-center justify-center rounded text-muted-foreground", mode === "map"
128
- ? "bg-background text-foreground shadow-sm"
129
- : "hover:text-foreground"), children: _jsx(IconChartTreemap, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Map" })] })] }) }), mode === "map" ? (_jsx(ContextTreemap, { segments: segments, systemSections: systemSections, onSelect: (segmentId) => {
130
- const segment = segments.find((s) => s.segmentId === segmentId);
131
- if (segment)
132
- setCollapsed(new Set());
133
- } })) : (_jsxs("div", { className: "divide-y divide-border/60", children: [systemGroups.length > 0 && (_jsxs("div", { children: [_jsx("div", { className: "px-1.5 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-muted-foreground", children: t("contextXray.systemOrdered", {
134
- defaultValue: "System · ordered, not evictable",
135
- }) }), systemGroups.map((group) => {
136
- const groupKey = `system:${group.governance}`;
137
- const isCollapsed = collapsed.has(groupKey);
138
- return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => {
139
- setCollapsed((prev) => {
140
- const next = new Set(prev);
141
- if (next.has(groupKey))
142
- next.delete(groupKey);
143
- else
144
- next.add(groupKey);
145
- return next;
146
- });
147
- }, className: "flex w-full cursor-pointer items-center gap-2 rounded-sm px-1.5 py-2 text-left hover:bg-accent/35", children: [isCollapsed ? (_jsx(IconChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground" })) : (_jsx(IconChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" })), _jsx(IconLock, { className: "h-3 w-3 text-muted-foreground" }), _jsx("span", { className: "min-w-0 flex-1 truncate text-xs font-medium", children: governanceLabel(group.governance, t) }), _jsxs("span", { className: "text-[11px] text-muted-foreground", children: [formatTokens(group.tokens), " \u00B7", " ", manifest.totalTokens > 0
148
- ? Math.round((group.tokens / manifest.totalTokens) * 100)
149
- : 0, "%"] })] }), !isCollapsed && (_jsx("div", { className: "pb-1", children: group.sections
150
- .slice()
151
- .sort((a, b) => b.tokenCount - a.tokenCount)
152
- .map((section) => (_jsx(SystemSectionRow, { section: section, totalTokens: manifest.totalTokens }, section.segmentId))) }))] }, groupKey));
153
- })] })), groups.map((group) => {
154
- const isCollapsed = collapsed.has(group.name);
155
- return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => {
156
- setCollapsed((prev) => {
157
- const next = new Set(prev);
158
- if (next.has(group.name))
159
- next.delete(group.name);
160
- else
161
- next.add(group.name);
162
- return next;
163
- });
164
- }, className: "flex w-full cursor-pointer items-center gap-2 rounded-sm px-1.5 py-2 text-left hover:bg-accent/35", children: [isCollapsed ? (_jsx(IconChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground" })) : (_jsx(IconChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" })), _jsx("span", { className: cn("h-2 w-2 rounded-full", groupColor(group.name)) }), _jsx("span", { className: "min-w-0 flex-1 truncate text-xs font-medium", children: group.name }), _jsx("span", { className: "text-[11px] text-muted-foreground", children: formatTokens(group.tokens) })] }), !isCollapsed && (_jsx("div", { className: "pb-1", children: group.segments
165
- .slice()
166
- .sort((a, b) => b.tokenCount - a.tokenCount)
167
- .map((segment) => (_jsx(ContextSegmentRow, { segment: segment, advisory: !manifest.enforceable, onPin: () => onPin(segment.segmentId), onEvict: () => onEvict(segment.segmentId), onRestore: () => onRestore(segment.segmentId) }, segment.segmentId))) }))] }, group.name));
168
- })] }))] })] }));
25
+ }),
26
+ } }));
169
27
  }
170
28
  //# sourceMappingURL=ContextXRayPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextXRayPanel.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextXRayPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQ1C,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAQ7E,SAAS,qBAAqB,CAC5B,QAAkC,EAClC,UAA6C;IAE7C,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC3C,OAA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hB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,EAC/B,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EACrC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EACzC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IALxC,OAAO,CAAC,SAAS,CAMtB,CACH,CAAC,GACA,CACP,KA/CO,KAAK,CAAC,IAAI,CAgDd,CACP,CAAC;4BACJ,CAAC,CAAC,IACE,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconChartTreemap,\n IconChevronDown,\n IconChevronRight,\n IconLock,\n IconListDetails,\n} from \"@tabler/icons-react\";\nimport { useMemo, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextManifestSegment,\n ContextManifestSystemSection,\n ContextSegmentStatus,\n} from \"../../shared/context-xray.js\";\nimport {\n manifestConversationTokens,\n manifestSystemTokens,\n} from \"../../shared/context-xray.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport { cn } from \"../utils.js\";\nimport { ContextSegmentRow } from \"./ContextSegmentRow.js\";\nimport { ContextTreemap } from \"./ContextTreemap.js\";\nimport { formatTokens, groupColor, resolveContextWindow } from \"./format.js\";\n\ninterface Group {\n name: string;\n tokens: number;\n segments: ContextManifestSegment[];\n}\n\nfunction applyOptimisticStatus(\n segments: ContextManifestSegment[],\n optimistic: Map<string, ContextSegmentStatus>,\n): ContextManifestSegment[] {\n if (optimistic.size === 0) return segments;\n return segments.map((segment) => {\n const status = optimistic.get(segment.segmentId);\n return status ? { ...segment, status } : segment;\n });\n}\n\nfunction groupedSegments(segments: ContextManifestSegment[]): Group[] {\n const map = new Map<string, Group>();\n for (const segment of segments) {\n const groupName =\n segment.status === \"pinned\"\n ? \"Pinned\"\n : segment.status === \"evicted\"\n ? \"Evicted\"\n : segment.group;\n const group = map.get(groupName) ?? {\n name: groupName,\n tokens: 0,\n segments: [],\n };\n group.tokens += segment.tokenCount;\n group.segments.push(segment);\n map.set(groupName, group);\n }\n const order = [\n \"Pinned\",\n \"Tool results\",\n \"Files read\",\n \"Conversation\",\n \"Thinking\",\n \"Evicted\",\n ];\n return [...map.values()].sort((a, b) => {\n const ai = order.indexOf(a.name);\n const bi = order.indexOf(b.name);\n if (ai >= 0 || bi >= 0) return (ai < 0 ? 99 : ai) - (bi < 0 ? 99 : bi);\n return b.tokens - a.tokens;\n });\n}\n\nconst GOVERNANCE_ORDER = [\"required\", \"inherited\", \"user\"] as const;\n\nfunction governanceLabel(\n governance: ContextManifestSystemSection[\"governance\"],\n t: (key: string, options?: Record<string, unknown>) => string,\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 SystemSectionRow({\n section,\n totalTokens,\n}: {\n section: ContextManifestSystemSection;\n totalTokens: number;\n}) {\n const share =\n totalTokens > 0 ? Math.round((section.tokenCount / totalTokens) * 100) : 0;\n return (\n <div className=\"flex min-h-12 items-start gap-2 rounded-sm px-2 py-1.5\">\n <span className=\"mt-1 flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground\">\n <IconLock className=\"h-3.5 w-3.5\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-[13px] font-medium leading-5 text-foreground\">\n {section.label}\n </div>\n <div className=\"truncate text-[11px] text-muted-foreground\">\n {sourceLabel(section)} · {formatTokens(section.tokenCount)} tokens ·{\" \"}\n {share}%{section.tokenMethod === \"estimate\" ? \" · estimated\" : \"\"}\n </div>\n {section.preview ? (\n <div className=\"mt-0.5 line-clamp-2 text-[11px] text-muted-foreground/80\">\n {section.preview}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n\nexport function ContextXRayPanel({\n manifest,\n optimistic,\n onPin,\n onEvict,\n onRestore,\n}: {\n manifest: ContextManifest;\n optimistic: Map<string, ContextSegmentStatus>;\n onPin: (segmentId: string) => void;\n onEvict: (segmentId: string) => void;\n onRestore: (segmentId: string) => void;\n}) {\n const t = useT();\n const [mode, setMode] = useState<\"list\" | \"map\">(\"list\");\n const [collapsed, setCollapsed] = useState<Set<string>>(new Set());\n const segments = useMemo(\n () => applyOptimisticStatus(manifest.segments, optimistic),\n [manifest.segments, optimistic],\n );\n const groups = useMemo(() => groupedSegments(segments), [segments]);\n const systemSections = manifest.systemSections ?? [];\n const systemGroups = useMemo(() => {\n const grouped = new Map<\n ContextManifestSystemSection[\"governance\"],\n ContextManifestSystemSection[]\n >();\n for (const section of systemSections) {\n const list = grouped.get(section.governance) ?? [];\n list.push(section);\n grouped.set(section.governance, list);\n }\n return GOVERNANCE_ORDER.flatMap((governance) => {\n const sections = grouped.get(governance);\n return sections && sections.length > 0\n ? [\n {\n governance,\n sections,\n tokens: sections.reduce(\n (sum, section) => sum + section.tokenCount,\n 0,\n ),\n },\n ]\n : [];\n });\n }, [systemSections]);\n const contextWindow = resolveContextWindow(manifest.model);\n const pct = Math.min(\n 100,\n Math.round((manifest.totalTokens / contextWindow) * 100),\n );\n const headroom = Math.max(0, contextWindow - manifest.totalTokens);\n const pinned = segments.filter((s) => s.status === \"pinned\").length;\n const evicted = segments.filter((s) => s.status === \"evicted\").length;\n const systemTokens = manifestSystemTokens(manifest);\n const conversationTokens = manifestConversationTokens(manifest);\n const details = [\n `${formatTokens(headroom)} free`,\n systemTokens > 0 ? `${formatTokens(systemTokens)} system` : null,\n `${formatTokens(conversationTokens)} conversation`,\n pinned > 0 ? `${pinned} pinned` : null,\n evicted > 0 ? `${evicted} evicted` : null,\n manifest.tokenCountMethod === \"estimate\" ? \"estimated\" : null,\n !manifest.enforceable ? \"advisory\" : null,\n ].filter((item): item is string => Boolean(item));\n\n return (\n <div className=\"flex max-h-[min(72vh,520px)] flex-col\">\n <div className=\"border-b border-border/60 px-3 py-2.5\">\n <div className=\"flex items-center justify-between gap-3\">\n <h2 className=\"min-w-0 truncate text-sm font-medium text-foreground\">\n Context X-Ray\n </h2>\n <div className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(manifest.totalTokens)} · {pct}%\n </div>\n </div>\n <div className=\"mt-2 h-1 overflow-hidden rounded-full bg-muted/70\">\n <div\n className=\"h-full rounded-full bg-foreground origin-left transition-transform duration-200\"\n style={{\n transform: `scaleX(${Math.min(1, pct / 100)})`,\n width: \"100%\",\n }}\n />\n </div>\n <div className=\"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-muted-foreground\">\n {details.map((detail) => (\n <span key={detail}>{detail}</span>\n ))}\n {manifest.reclaimedTokens > 0 && (\n <span className=\"font-medium text-emerald-600 dark:text-emerald-400\">\n -{formatTokens(manifest.reclaimedTokens)}\n </span>\n )}\n </div>\n </div>\n\n <div className=\"overflow-y-auto px-2 py-2\">\n <div className=\"mb-1 flex items-center justify-end\">\n <div className=\"inline-flex rounded-md bg-muted/40 p-0.5\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n aria-label=\"Show context list\"\n className={cn(\n \"flex size-7 cursor-pointer items-center justify-center rounded text-muted-foreground\",\n mode === \"list\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"hover:text-foreground\",\n )}\n >\n <IconListDetails className=\"h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>List</TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => setMode(\"map\")}\n aria-label=\"Show context map\"\n className={cn(\n \"flex size-7 cursor-pointer items-center justify-center rounded text-muted-foreground\",\n mode === \"map\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"hover:text-foreground\",\n )}\n >\n <IconChartTreemap className=\"h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>Map</TooltipContent>\n </Tooltip>\n </div>\n </div>\n\n {mode === \"map\" ? (\n <ContextTreemap\n segments={segments}\n systemSections={systemSections}\n onSelect={(segmentId) => {\n const segment = segments.find((s) => s.segmentId === segmentId);\n if (segment) setCollapsed(new Set());\n }}\n />\n ) : (\n <div className=\"divide-y divide-border/60\">\n {systemGroups.length > 0 && (\n <div>\n <div className=\"px-1.5 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {t(\"contextXray.systemOrdered\", {\n defaultValue: \"System · ordered, not evictable\",\n })}\n </div>\n {systemGroups.map((group) => {\n const groupKey = `system:${group.governance}`;\n const isCollapsed = collapsed.has(groupKey);\n return (\n <div key={groupKey}>\n <button\n type=\"button\"\n onClick={() => {\n setCollapsed((prev) => {\n const next = new Set(prev);\n if (next.has(groupKey)) next.delete(groupKey);\n else next.add(groupKey);\n return next;\n });\n }}\n className=\"flex w-full cursor-pointer items-center gap-2 rounded-sm px-1.5 py-2 text-left hover:bg-accent/35\"\n >\n {isCollapsed ? (\n <IconChevronRight className=\"h-3.5 w-3.5 text-muted-foreground\" />\n ) : (\n <IconChevronDown className=\"h-3.5 w-3.5 text-muted-foreground\" />\n )}\n <IconLock className=\"h-3 w-3 text-muted-foreground\" />\n <span className=\"min-w-0 flex-1 truncate text-xs font-medium\">\n {governanceLabel(group.governance, t)}\n </span>\n <span className=\"text-[11px] text-muted-foreground\">\n {formatTokens(group.tokens)} ·{\" \"}\n {manifest.totalTokens > 0\n ? Math.round(\n (group.tokens / manifest.totalTokens) * 100,\n )\n : 0}\n %\n </span>\n </button>\n {!isCollapsed && (\n <div className=\"pb-1\">\n {group.sections\n .slice()\n .sort((a, b) => b.tokenCount - a.tokenCount)\n .map((section) => (\n <SystemSectionRow\n key={section.segmentId}\n section={section}\n totalTokens={manifest.totalTokens}\n />\n ))}\n </div>\n )}\n </div>\n );\n })}\n </div>\n )}\n {groups.map((group) => {\n const isCollapsed = collapsed.has(group.name);\n return (\n <div key={group.name}>\n <button\n type=\"button\"\n onClick={() => {\n setCollapsed((prev) => {\n const next = new Set(prev);\n if (next.has(group.name)) next.delete(group.name);\n else next.add(group.name);\n return next;\n });\n }}\n className=\"flex w-full cursor-pointer items-center gap-2 rounded-sm px-1.5 py-2 text-left hover:bg-accent/35\"\n >\n {isCollapsed ? (\n <IconChevronRight className=\"h-3.5 w-3.5 text-muted-foreground\" />\n ) : (\n <IconChevronDown className=\"h-3.5 w-3.5 text-muted-foreground\" />\n )}\n <span\n className={cn(\n \"h-2 w-2 rounded-full\",\n groupColor(group.name),\n )}\n />\n <span className=\"min-w-0 flex-1 truncate text-xs font-medium\">\n {group.name}\n </span>\n <span className=\"text-[11px] text-muted-foreground\">\n {formatTokens(group.tokens)}\n </span>\n </button>\n {!isCollapsed && (\n <div className=\"pb-1\">\n {group.segments\n .slice()\n .sort((a, b) => b.tokenCount - a.tokenCount)\n .map((segment) => (\n <ContextSegmentRow\n key={segment.segmentId}\n segment={segment}\n advisory={!manifest.enforceable}\n onPin={() => onPin(segment.segmentId)}\n onEvict={() => onEvict(segment.segmentId)}\n onRestore={() => onRestore(segment.segmentId)}\n />\n ))}\n </div>\n )}\n </div>\n );\n })}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ContextXRayPanel.js","sourceRoot":"","sources":["../../../src/client/context-xray/ContextXRayPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAMxE,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,EACV,KAAK,EACL,OAAO,EACP,SAAS,GAOV;IACC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,OAAO,CACL,KAAC,oBAAoB,IACnB,QAAQ,EAAE;YACR,GAAG,QAAQ;YACX,YAAY,EAAE,oBAAoB,CAAC,QAAQ,CAAC;YAC5C,kBAAkB,EAAE,0BAA0B,CAAC,QAAQ,CAAC;SACzD,EACD,aAAa,EAAE,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,EACnD,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,CAAC,CAAC,wBAAwB,EAAE;YACtC,YAAY,EAAE,eAAe;SAC9B,CAAC,EACF,kBAAkB,EAAE,CAAC,CAAC,2BAA2B,EAAE;YACjD,YAAY,EAAE,iCAAiC;SAChD,CAAC,EACF,gBAAgB,EAAE;YAChB,QAAQ,EAAE,CAAC,CAAC,iCAAiC,EAAE;gBAC7C,YAAY,EAAE,UAAU;aACzB,CAAC;YACF,SAAS,EAAE,CAAC,CAAC,kCAAkC,EAAE;gBAC/C,YAAY,EAAE,WAAW;aAC1B,CAAC;YACF,IAAI,EAAE,CAAC,CAAC,6BAA6B,EAAE;gBACrC,YAAY,EAAE,cAAc;aAC7B,CAAC;SACH,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { ContextXRayPanelView } from \"@agent-native/toolkit/context-ui\";\n\nimport type {\n ContextManifest,\n ContextSegmentStatus,\n} from \"../../shared/context-xray.js\";\nimport {\n manifestConversationTokens,\n manifestSystemTokens,\n} from \"../../shared/context-xray.js\";\nimport { useT } from \"../i18n.js\";\nimport { resolveContextWindow } from \"./format.js\";\n\nexport function ContextXRayPanel({\n manifest,\n optimistic,\n onPin,\n onEvict,\n onRestore,\n}: {\n manifest: ContextManifest;\n optimistic: Map<string, ContextSegmentStatus>;\n onPin: (segmentId: string) => void;\n onEvict: (segmentId: string) => void;\n onRestore: (segmentId: string) => void;\n}) {\n const t = useT();\n return (\n <ContextXRayPanelView\n manifest={{\n ...manifest,\n systemTokens: manifestSystemTokens(manifest),\n conversationTokens: manifestConversationTokens(manifest),\n }}\n contextWindow={resolveContextWindow(manifest.model)}\n optimistic={optimistic}\n onPin={onPin}\n onEvict={onEvict}\n onRestore={onRestore}\n titleLabel={t(\"contextXray.panelTitle\", {\n defaultValue: \"Context X-Ray\",\n })}\n systemOrderedLabel={t(\"contextXray.systemOrdered\", {\n defaultValue: \"System · ordered, not evictable\",\n })}\n governanceLabels={{\n required: t(\"contextXray.governance.required\", {\n defaultValue: \"Required\",\n }),\n inherited: t(\"contextXray.governance.inherited\", {\n defaultValue: \"Inherited\",\n }),\n user: t(\"contextXray.governance.user\", {\n defaultValue: \"Your context\",\n }),\n }}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentProvenancePopover.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/SegmentProvenancePopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAQ3E,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,sBAAsB,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAiDA"}
1
+ {"version":3,"file":"SegmentProvenancePopover.d.ts","sourceRoot":"","sources":["../../../src/client/context-xray/SegmentProvenancePopover.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,sBAAsB,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAMA"}