@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
@@ -1 +0,0 @@
1
- {"version":3,"file":"surgical-apply.js","sourceRoot":"","sources":["../../../src/client/rich-markdown-editor/surgical-apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GACjD,qCAAqC,CAAC;AAexC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAuB,EACvB,MAAuB;IAEvB,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;IAEnC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/C,OAAO,MAAM,GAAG,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC3E,MAAM,EAAE,CAAC;IACX,CAAC;IAED,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,CAAC,YAAY;IAEzE,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,MAAM,CAAC;IACxD,OACE,MAAM,GAAG,SAAS;QAClB,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAC3E,CAAC;QACD,MAAM,EAAE,CAAC;IACX,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC;IACzB,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IAErC,4EAA4E;IAC5E,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE;QAAE,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACxE,IAAI,KAAK,GAAG,OAAO,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,SAAS,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACpC,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,eAAe,CACtB,MAAuB,EACvB,IAAkB;IAElB,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CACvB,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,EACvC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CACzC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,GAAoB,EAAE,KAAa;IAC1D,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE;QAAE,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7D,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,gBAAgB,CAAC,IAA4B;IACpD,OAAO,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC;AAC7E,CAAC;AAED;;;;;;GAMG;AACH,SAAS,8BAA8B,CACrC,MAAuB,EACvB,MAAuB;IAEvB,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC;IAC9C,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,IAAI,gBAAgB,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAc,EACd,MAAuB;IAEvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QAChC,yEAAyE;QACzE,2EAA2E;QAC3E,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC;YACxE,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI;YAAE,OAAO,MAAM,CAAC;QAEzB,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/C,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACnD,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAClC,EAAE,CAAC,OAAO,CAAC,sCAAsC,EAAE,IAAI,CAAC,CAAC;QACzD,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAc,EACd,KAAa;IAEb,IAAI,CAAC;QACH,MAAM,OAAO,GAAI,MAAM,CAAC,OAA+B,CAAC,QAAQ,CAAC;QACjE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAClE,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACvD,MAAM,IAAI,GAAG,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;YACxD,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QACH,mEAAmE;QACnE,OAAQ,IAAwB,IAAI,IAAI,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["/**\n * Surgical reconcile — apply an authoritative external document into the live\n * editor by replacing only the changed top-level node run, instead of a\n * whole-document `setContent`.\n *\n * Why: under the Collaboration extension, `setContent` routes through\n * y-prosemirror and rewrites the ENTIRE `Y.XmlFragment`. Every block-level\n * NodeView is torn down and recreated (each `ReactRenderer` constructor calls\n * `flushSync`, firing inside a React lifecycle), remote carets jump, and the\n * CRDT sees a delete-all + insert-all instead of a small edit. Diffing the\n * top-level children and dispatching one `tr.replaceWith(from, to, changed)`\n * leaves unchanged NodeViews untouched and produces minimal Yjs ops.\n *\n * This is the core mechanism behind re-enabling single-doc collab in the plan\n * editor (see templates/plan/shared/plan-doc.collab-stability.spec.ts, \"Option\n * B\") and removing agent-edit NodeView churn in content.\n */\n\nimport { createNodeFromContent } from \"@tiptap/core\";\nimport type { Fragment, Node as ProseMirrorNode } from \"@tiptap/pm/model\";\nimport type { Editor } from \"@tiptap/react\";\n\n/**\n * Transaction meta marking programmatic (non-user) rich-markdown transactions.\n * Declared here (not in useCollabReconcile) so the module dependency stays\n * one-directional; useCollabReconcile re-exports it for consumers.\n */\nexport const RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION =\n \"an-rich-md-programmatic-transaction\";\n\nexport interface TopLevelDiff {\n /** Index of the first differing top-level child. */\n fromIndex: number;\n /** Exclusive end index of the differing run in the OLD doc. */\n oldToIndex: number;\n /** Exclusive end index of the differing run in the NEW doc. */\n newToIndex: number;\n /** Document position where the differing run starts. */\n fromPos: number;\n /** Document position where the differing run ends in the OLD doc. */\n toPos: number;\n}\n\n/**\n * Diff two documents at top-level-node granularity: trim the common prefix and\n * suffix (node equality via ProseMirror's `Node.eq`, which is deep) and return\n * the remaining changed run. Returns null when the documents are equal.\n */\nexport function diffTopLevel(\n oldDoc: ProseMirrorNode,\n newDoc: ProseMirrorNode,\n): TopLevelDiff | null {\n const oldCount = oldDoc.childCount;\n const newCount = newDoc.childCount;\n\n let prefix = 0;\n const maxPrefix = Math.min(oldCount, newCount);\n while (prefix < maxPrefix && oldDoc.child(prefix).eq(newDoc.child(prefix))) {\n prefix++;\n }\n\n if (prefix === oldCount && prefix === newCount) return null; // identical\n\n let suffix = 0;\n const maxSuffix = Math.min(oldCount, newCount) - prefix;\n while (\n suffix < maxSuffix &&\n oldDoc.child(oldCount - 1 - suffix).eq(newDoc.child(newCount - 1 - suffix))\n ) {\n suffix++;\n }\n\n const fromIndex = prefix;\n const oldToIndex = oldCount - suffix;\n const newToIndex = newCount - suffix;\n\n // Positions: sum nodeSize of the preserved prefix, then of the changed run.\n let fromPos = 0;\n for (let i = 0; i < fromIndex; i++) fromPos += oldDoc.child(i).nodeSize;\n let toPos = fromPos;\n for (let i = fromIndex; i < oldToIndex; i++) {\n toPos += oldDoc.child(i).nodeSize;\n }\n\n return { fromIndex, oldToIndex, newToIndex, fromPos, toPos };\n}\n\nfunction changedFragment(\n newDoc: ProseMirrorNode,\n diff: TopLevelDiff,\n): Fragment {\n return newDoc.content.cut(\n positionOfChild(newDoc, diff.fromIndex),\n positionOfChild(newDoc, diff.newToIndex),\n );\n}\n\nfunction positionOfChild(doc: ProseMirrorNode, index: number): number {\n let pos = 0;\n for (let i = 0; i < index; i++) pos += doc.child(i).nodeSize;\n return pos;\n}\n\nfunction isEmptyParagraph(node: ProseMirrorNode | null): boolean {\n return !!node && node.type.name === \"paragraph\" && node.content.size === 0;\n}\n\n/**\n * Markdown can't represent a trailing empty paragraph (the cursor line users\n * keep below a list/code block), so a parsed authoritative value never has\n * one — but the live doc often does, and the legacy `setContent` path\n * preserves it. Without this, every surgical reconcile whose old doc ends\n * with an empty paragraph would DELETE the user's trailing cursor line.\n */\nfunction withPreservedTrailingParagraph(\n oldDoc: ProseMirrorNode,\n newDoc: ProseMirrorNode,\n): ProseMirrorNode {\n const oldLast =\n oldDoc.childCount > 0 ? oldDoc.child(oldDoc.childCount - 1) : null;\n if (!isEmptyParagraph(oldLast)) return newDoc;\n const newLast =\n newDoc.childCount > 0 ? newDoc.child(newDoc.childCount - 1) : null;\n if (isEmptyParagraph(newLast)) return newDoc;\n return newDoc.copy(newDoc.content.addToEnd(oldLast!.type.create()));\n}\n\n/**\n * Replace only the changed top-level run of the live document with the\n * corresponding run from `newDoc`, in one programmatic, history-free\n * transaction. Returns:\n * - \"applied\" — a targeted replacement was dispatched\n * - \"noop\" — the documents were already equal (nothing dispatched)\n * - \"failed\" — the diff/transaction could not be applied (schema mismatch,\n * invalid content, …); caller should fall back to setContent.\n */\nexport function applyDocSurgically(\n editor: Editor,\n newDoc: ProseMirrorNode,\n): \"applied\" | \"noop\" | \"failed\" {\n try {\n const oldDoc = editor.state.doc;\n // The parsed doc MUST come from this editor's schema — NodeType identity\n // is per-Schema-instance, so a foreign-schema doc can never diff or apply.\n if (newDoc.type.schema !== editor.schema || newDoc.type !== oldDoc.type) {\n return \"failed\";\n }\n\n const target = withPreservedTrailingParagraph(oldDoc, newDoc);\n const diff = diffTopLevel(oldDoc, target);\n if (!diff) return \"noop\";\n\n const fragment = changedFragment(target, diff);\n const tr = editor.state.tr;\n tr.replaceWith(diff.fromPos, diff.toPos, fragment);\n tr.setMeta(\"addToHistory\", false);\n tr.setMeta(RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION, true);\n editor.view.dispatch(tr);\n return \"applied\";\n } catch {\n return \"failed\";\n }\n}\n\n/**\n * Best-effort default parser for the surgical path: use the tiptap-markdown\n * storage parser (present when the shared editor's `features.markdown` is on)\n * to turn the authoritative markdown into a ProseMirror document. Returns null\n * when unavailable or when parsing fails — the caller falls back to the full\n * `setContent` path.\n *\n * Apps with their own serializers (Content's NFM, Plan's blocks[] doc) should\n * pass an explicit `parseValue` producing the exact doc their `setContent`\n * would have written.\n */\nexport function defaultParseValue(\n editor: Editor,\n value: string,\n): ProseMirrorNode | null {\n try {\n const storage = (editor.storage as Record<string, any>).markdown;\n const parsed = storage?.parser?.parse?.(value, { inline: false });\n if (typeof parsed !== \"string\" || !parsed) return null;\n const node = createNodeFromContent(parsed, editor.schema, {\n slice: false,\n });\n // createNodeFromContent with slice:false returns a Node (the doc).\n return (node as ProseMirrorNode) ?? null;\n } catch {\n return null;\n }\n}\n"]}
@@ -1,110 +0,0 @@
1
- import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
2
- import type { Transaction } from "@tiptap/pm/state";
3
- import type { Editor } from "@tiptap/react";
4
- import { type MutableRefObject } from "react";
5
- import type { Awareness } from "y-protocols/awareness";
6
- import type { Doc as YDoc } from "yjs";
7
- import { RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION } from "./surgical-apply.js";
8
- export { RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION };
9
- /** Reads the current markdown out of the tiptap-markdown storage. */
10
- export declare function getEditorMarkdown(editor: Editor): string;
11
- export interface UseCollabReconcileOptions {
12
- /** The live editor, or null until it mounts. */
13
- editor: Editor | null;
14
- /** Shared Y.Doc when collaborating; null disables all collab paths. */
15
- ydoc?: YDoc | null;
16
- /** True after the collab provider has loaded the persisted initial Y.Doc state. */
17
- collabSynced?: boolean;
18
- /** Shared awareness; null keeps the sole-client lead path. */
19
- awareness?: Awareness | null;
20
- /** Authoritative markdown value (SQL source of truth). */
21
- value: string;
22
- /** Timestamp of the authoritative value; gates newer-than reconcile. */
23
- contentUpdatedAt?: string | null;
24
- /** Whether the editor accepts edits. Reconcile/seed only run for the live editor. */
25
- editable: boolean;
26
- /**
27
- * Reads the current markdown from the editor. Injected so a dialect could
28
- * swap serializers; defaults to the tiptap-markdown storage reader. For an app
29
- * with a custom serializer (e.g. Content's `docToNfm(editor.getJSON())`), pass
30
- * it here so the seed/reconcile equality checks compare like-for-like.
31
- */
32
- getMarkdown?: (editor: Editor) => string;
33
- /**
34
- * Applies the authoritative `value` into the editor. Defaults to passing the
35
- * raw markdown string to `editor.commands.setContent`. Apps whose serializer
36
- * is NOT tiptap-markdown (Content parses `nfmToDoc(value)` into a PM doc)
37
- * override this so seed + reconcile write the correct content shape. The
38
- * supplied `options` carry the history/whitespace flags the default path uses;
39
- * a custom implementation should forward them when relevant.
40
- */
41
- setContent?: (editor: Editor, value: string, options: {
42
- emitUpdate?: boolean;
43
- addToHistory?: boolean;
44
- }) => void;
45
- /**
46
- * Parses the authoritative `value` into a full ProseMirror document for the
47
- * SURGICAL reconcile path: instead of a whole-document `setContent` (which
48
- * under Collaboration rewrites the entire Y.XmlFragment and tears down every
49
- * block NodeView), the reconcile diffs the parsed doc against the live doc
50
- * and replaces only the changed top-level run. Return null to skip the
51
- * surgical path for a given value (falls back to `setContent`).
52
- *
53
- * Defaults to a best-effort tiptap-markdown parse; apps with their own
54
- * serializers (Content's NFM, Plan's blocks[] doc) should supply the exact
55
- * doc their `setContent` would write. Pass `false` to disable surgical
56
- * application entirely.
57
- */
58
- parseValue?: ((editor: Editor, value: string) => ProseMirrorNode | null) | false;
59
- /**
60
- * Normalizes the authoritative `value` to the canonical markdown the editor
61
- * would emit, so the "already in sync / our own echo" equality checks match a
62
- * serializer that re-canonicalizes (Content's `canonicalizeNfm`). Defaults to
63
- * identity (GFM already round-trips byte-stably).
64
- */
65
- normalizeValue?: (value: string) => string;
66
- /**
67
- * Decides whether the empty-doc seed should run for the current shared
68
- * fragment. Defaults to "fragment has no nodes, or the editor holds no
69
- * semantic markdown". Apps with sentinel-empty content (Content's
70
- * `<empty-block/>` filler) override this. Receives the live fragment length
71
- * and the editor's current markdown.
72
- */
73
- shouldSeed?: (info: {
74
- value: string;
75
- currentMarkdown: string;
76
- fragmentLength: number;
77
- }) => boolean;
78
- /**
79
- * The initial "applied" watermark. Default mirrors `contentUpdatedAt`, so a
80
- * fresh mount whose Y.Doc already matches SQL doesn't re-apply. Pass `null`
81
- * to force the first reconcile pass to adopt authoritative SQL even at the
82
- * same timestamp — Content does this so a stale persisted Y.Doc (an agent that
83
- * edited the CLOSED doc) is corrected on open. The editor is keyed per
84
- * document upstream, so this only affects the first mount of each doc.
85
- */
86
- initialAppliedUpdatedAt?: string | null;
87
- }
88
- export interface UseCollabReconcileResult {
89
- /** True when a Y.Doc is bound (collaborative editing active). */
90
- collab: boolean;
91
- /**
92
- * Set true around any programmatic `setContent` so the editor's `onUpdate`
93
- * can ignore the resulting transaction (it isn't a user edit).
94
- */
95
- isSettingContentRef: MutableRefObject<boolean>;
96
- /**
97
- * Call from `onUpdate` BEFORE serializing. Returns true when the update must
98
- * be ignored: editor not editable, mid-programmatic-setContent, or (in collab
99
- * mode) a remote-origin transaction. Also records the local typing time.
100
- */
101
- shouldIgnoreUpdate: (transaction: Transaction) => boolean;
102
- /**
103
- * Call from `onUpdate` AFTER computing the markdown to emit. Returns false
104
- * when the value must NOT be persisted yet (an empty collab doc before the
105
- * seed has run); records it as the last-emitted value otherwise.
106
- */
107
- registerEmitted: (markdown: string) => boolean;
108
- }
109
- export declare function useCollabReconcile({ editor, ydoc, collabSynced, awareness, value, contentUpdatedAt, editable, getMarkdown, setContent, parseValue, normalizeValue, shouldSeed, initialAppliedUpdatedAt, }: UseCollabReconcileOptions): UseCollabReconcileResult;
110
- //# sourceMappingURL=useCollabReconcile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCollabReconcile.d.ts","sourceRoot":"","sources":["../../../src/client/rich-markdown-editor/useCollabReconcile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAA+B,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,EACL,sCAAsC,EAGvC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,sCAAsC,EAAE,CAAC;AAElD,qEAAqE;AACrE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKxD;AAqBD,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uEAAuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,qFAAqF;IACrF,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CACX,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KACtD,IAAI,CAAC;IACV;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,GAAG,IAAI,CAAC,GAC3D,KAAK,CAAC;IACV;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;KACxB,KAAK,OAAO,CAAC;IACd;;;;;;;OAOG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,mBAAmB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC;IAC1D;;;;OAIG;IACH,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAChD;AAoED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAW,EACX,YAAmB,EACnB,SAAgB,EAChB,KAAK,EACL,gBAAgB,EAChB,QAAQ,EACR,WAA+B,EAC/B,UAA8B,EAC9B,UAAU,EACV,cAAyB,EACzB,UAA8B,EAC9B,uBAAuB,GACxB,EAAE,yBAAyB,GAAG,wBAAwB,CAyWtD"}
@@ -1,441 +0,0 @@
1
- import { isChangeOrigin } from "@tiptap/extension-collaboration";
2
- import { useEffect, useRef, useState } from "react";
3
- import { AGENT_CLIENT_ID } from "../../collab/agent-identity.js";
4
- import { isReconcileLeadClient } from "../../collab/client.js";
5
- import { RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION, applyDocSurgically, defaultParseValue, } from "./surgical-apply.js";
6
- export { RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION };
7
- /** Reads the current markdown out of the tiptap-markdown storage. */
8
- export function getEditorMarkdown(editor) {
9
- const markdownStorage = editor.storage;
10
- return markdownStorage.markdown?.getMarkdown?.() ?? "";
11
- }
12
- /**
13
- * Push a value onto the bounded ring of recently-emitted markdown (most recent
14
- * last, deduped, capped). The reconcile uses this to recognize a stale-but-recent
15
- * echo of OUR OWN edits: a debounced autosave can persist a PARTIAL burst, and
16
- * the next poll re-supplies that partial value with a newer timestamp — applying
17
- * it would clobber the freshly-typed tail. An external change (agent/peer) never
18
- * byte-matches one of our own recent emissions, and if it somehow did the content
19
- * is identical, so skipping it is safe by construction.
20
- */
21
- const EMITTED_RING_MAX = 16;
22
- function pushEmittedRing(ring, value) {
23
- if (!value)
24
- return;
25
- if (ring[ring.length - 1] === value)
26
- return;
27
- const dupe = ring.indexOf(value);
28
- if (dupe !== -1)
29
- ring.splice(dupe, 1);
30
- ring.push(value);
31
- if (ring.length > EMITTED_RING_MAX)
32
- ring.shift();
33
- }
34
- /**
35
- * The subtle seed / reconcile / lead-client logic for the shared markdown
36
- * editor, extracted once so it can never be duplicated across embedders.
37
- *
38
- * Responsibilities (reproducing the Plan editor's behavior exactly):
39
- * - Track whether THIS client is the reconcile lead (sole client always leads;
40
- * otherwise elected via {@link isReconcileLeadClient}) and how many other
41
- * visible human peers are present.
42
- * - Seed an empty shared Y.Doc once from `value` — lead client only — so two
43
- * clients opening a brand-new block don't both insert the content.
44
- * - Reconcile authoritative external markdown (agent edit, source patch, peer
45
- * edit mirrored to SQL) into the editor: in collab mode only the lead client
46
- * applies it through `setContent` and Yjs propagates; in non-collab mode this
47
- * is the original controlled-value reconcile.
48
- * - Provide the `onUpdate` guards (`shouldIgnoreUpdate`, `registerEmitted`) so
49
- * the component never persists remote-origin or pre-seed empty content.
50
- */
51
- /** Default seed predicate: seed only when the shared doc is genuinely empty. */
52
- function defaultShouldSeed({ currentMarkdown, fragmentLength, }) {
53
- return fragmentLength === 0 || !currentMarkdown.trim();
54
- }
55
- /**
56
- * Default content writer: hand the raw markdown string to `setContent`, which
57
- * tiptap-markdown overrides to parse the markdown into a ProseMirror doc.
58
- *
59
- * IMPORTANT: do NOT pass `parseOptions: { preserveWhitespace: "full" }` here.
60
- * In tiptap v3 the core `setContent` command routes `preserveWhitespace: "full"`
61
- * through `insertContentAt`, which tiptap-markdown ALSO overrides to re-run its
62
- * markdown parser. That double-parse stringifies the already-parsed PM doc and
63
- * re-parses it as HTML, so a clean heading/list/code block comes back as the
64
- * escaped, non-idempotent `&lt;h1&gt;…` — which then escalates every reconcile
65
- * cycle (`<p>` → `&lt;p&gt;` → `&amp;lt;p&amp;gt;` …). Letting the markdown
66
- * override parse the string directly (no `parseOptions`) round-trips byte-stably
67
- * for the GFM corpus, including code-block and empty-line whitespace. Content's
68
- * NFM path supplies its own `setContent` (it passes a pre-parsed PM doc) and is
69
- * unaffected by this default.
70
- */
71
- function defaultSetContent(editor, value, options) {
72
- if (options.addToHistory === false) {
73
- editor
74
- .chain()
75
- .command(({ tr }) => {
76
- // addToHistory:false so cmd+z (or Yjs undo) doesn't erase
77
- // externally-loaded content.
78
- tr.setMeta("addToHistory", false);
79
- return true;
80
- })
81
- .setContent(value, { emitUpdate: options.emitUpdate })
82
- .run();
83
- return;
84
- }
85
- editor.commands.setContent(value);
86
- }
87
- export function useCollabReconcile({ editor, ydoc = null, collabSynced = true, awareness = null, value, contentUpdatedAt, editable, getMarkdown = getEditorMarkdown, setContent = defaultSetContent, parseValue, normalizeValue = (v) => v, shouldSeed = defaultShouldSeed, initialAppliedUpdatedAt, }) {
88
- const collab = !!ydoc;
89
- const isSettingContentRef = useRef(false);
90
- const lastEmittedRef = useRef("");
91
- // Ring of recent local emissions (see pushEmittedRing). Lets the reconcile
92
- // recognize a stale-but-recent echo of our OWN (possibly partial, debounced)
93
- // save so a lagging poll never clobbers freshly-typed text.
94
- const recentEmittedRef = useRef([]);
95
- const lastTypedAtRef = useRef(0);
96
- // The raw authoritative `value` string the reconcile last applied. When the
97
- // SAME raw string is re-fetched (a lagging poll, or a source-sync that keeps
98
- // re-supplying the same stored markdown), applying it again would only
99
- // reproduce the doc we already hold — and if `value` is NON-idempotent
100
- // (serialize(parse(value)) !== value) re-applying compounds the divergence
101
- // every cycle (`<p>` → `&lt;p&gt;` → `&amp;lt;p&amp;gt;` …). Tracked so the
102
- // identical re-fetch is recognized and skipped.
103
- const lastAppliedValueRef = useRef(null);
104
- // The editor's SERIALIZED output captured right AFTER the last reconcile/seed
105
- // apply (`getMarkdown(editor)` once the content settled). For non-idempotent
106
- // input this is what autosave actually persists, so the NEXT poll hands it
107
- // back as the new `value`. Comparing the incoming value against this lets the
108
- // reconcile recognize its own echo even when the raw string changed once, so
109
- // it never re-parses content the editor already represents. This is the
110
- // doc-equivalence guard that breaks the escalation loop.
111
- const lastAppliedSerializedRef = useRef(null);
112
- const lastAppliedUpdatedAtRef = useRef(initialAppliedUpdatedAt !== undefined
113
- ? initialAppliedUpdatedAt
114
- : (contentUpdatedAt ?? null));
115
- // Whether THIS client is the one that seeds the empty shared doc / applies an
116
- // authoritative external snapshot into it. Exactly one client does, so the
117
- // content isn't inserted once per open editor. A sole client always leads.
118
- const [isLeadClient, setIsLeadClient] = useState(true);
119
- // Count of OTHER visible human collaborators. When >0, a peer's edit also
120
- // arrives via Yjs, so external markdown reconcile must defer (avoid applying
121
- // the same change through both Yjs and setContent).
122
- const peerCountRef = useRef(0);
123
- useEffect(() => {
124
- if (!collab || !awareness || !ydoc) {
125
- setIsLeadClient(true);
126
- peerCountRef.current = 0;
127
- return;
128
- }
129
- const update = () => {
130
- setIsLeadClient(isReconcileLeadClient(awareness, ydoc.clientID));
131
- let peers = 0;
132
- awareness.getStates().forEach((state, clientId) => {
133
- if (clientId === ydoc.clientID)
134
- return; // self
135
- if (clientId === AGENT_CLIENT_ID)
136
- return; // agent isn't a Yjs editor
137
- const s = state;
138
- if (s && s.user && s.visible !== false)
139
- peers += 1;
140
- });
141
- peerCountRef.current = peers;
142
- };
143
- update();
144
- awareness.on("change", update);
145
- document.addEventListener("visibilitychange", update);
146
- return () => {
147
- awareness.off("change", update);
148
- document.removeEventListener("visibilitychange", update);
149
- };
150
- }, [collab, awareness, ydoc]);
151
- // Collab seed: populate an empty shared Y.Doc from the markdown `value` once.
152
- // The Collaboration extension does NOT auto-seed; only the lead client does,
153
- // so two clients opening a brand-new block at once don't both seed (which
154
- // would duplicate the content via concurrent inserts at the same position).
155
- const seededRef = useRef(false);
156
- useEffect(() => {
157
- if (!collab || !editor || editor.isDestroyed || !ydoc)
158
- return;
159
- if (seededRef.current)
160
- return;
161
- if (!collabSynced)
162
- return;
163
- if (!isLeadClient)
164
- return;
165
- if (!value.trim())
166
- return;
167
- const fragment = ydoc.getXmlFragment("default");
168
- const currentMarkdown = getMarkdown(editor);
169
- // Seed only when the shared doc is genuinely empty — either the fragment has
170
- // no nodes yet, or it holds no semantic markdown (an empty paragraph, or an
171
- // app's sentinel-empty filler via a custom `shouldSeed`).
172
- if (!shouldSeed({ value, currentMarkdown, fragmentLength: fragment.length })) {
173
- seededRef.current = true;
174
- return;
175
- }
176
- let cancelled = false;
177
- // Defer via a timer task (NOT a microtask — microtasks can still run
178
- // inside React's commit and trigger flushSync-from-lifecycle warnings).
179
- const seedTimer = setTimeout(() => {
180
- if (cancelled || editor.isDestroyed)
181
- return;
182
- isSettingContentRef.current = true;
183
- try {
184
- setContent(editor, value, {});
185
- }
186
- finally {
187
- isSettingContentRef.current = false;
188
- }
189
- const serialized = getMarkdown(editor);
190
- lastEmittedRef.current = serialized;
191
- pushEmittedRing(recentEmittedRef.current, serialized);
192
- lastAppliedValueRef.current = value;
193
- lastAppliedSerializedRef.current = serialized;
194
- if (contentUpdatedAt)
195
- lastAppliedUpdatedAtRef.current = contentUpdatedAt;
196
- seededRef.current = true;
197
- }, 0);
198
- return () => {
199
- cancelled = true;
200
- clearTimeout(seedTimer);
201
- };
202
- }, [
203
- collab,
204
- collabSynced,
205
- editor,
206
- ydoc,
207
- value,
208
- isLeadClient,
209
- contentUpdatedAt,
210
- getMarkdown,
211
- setContent,
212
- shouldSeed,
213
- ]);
214
- // Reconcile authoritative external markdown (agent edit, source patch, or a
215
- // peer edit mirrored to SQL) into the live editor. In collab mode only the
216
- // lead client applies it through setContent; Yjs propagates the result to
217
- // every other client. In non-collab mode this is the original controlled-value
218
- // reconcile, unchanged.
219
- useEffect(() => {
220
- if (!editor || editor.isDestroyed)
221
- return;
222
- let cancelled = false;
223
- let retry = null;
224
- // With peers present, a peer's edit also arrives via Yjs. Defer one poll
225
- // cycle (+margin) and re-check before applying via setContent so the same
226
- // change isn't inserted twice (Yjs + setContent → duplicated region).
227
- const PEER_SETTLE_MS = 2500;
228
- const apply = (deferred = false) => {
229
- if (cancelled || editor.isDestroyed)
230
- return;
231
- // In collab mode, defer all reconcile until the shared doc is seeded so we
232
- // never setContent over an unseeded fragment.
233
- if (collab && (!collabSynced || !seededRef.current)) {
234
- retry = setTimeout(() => apply(deferred), 300);
235
- return;
236
- }
237
- const currentMarkdown = getMarkdown(editor);
238
- // Compare against the canonical form the editor would emit so a serializer
239
- // that re-normalizes (Content's NFM) still recognizes "already in sync".
240
- const normalizedValue = normalizeValue(value);
241
- // Whether the editor still holds exactly what THIS hook last applied (the
242
- // user hasn't edited since). Only then are the round-trip echo guards
243
- // below safe: if the user has since edited away from the applied content,
244
- // an external snapshot equal to a previously-applied value is a real
245
- // revert and must NOT be swallowed as an echo.
246
- const editorUnchangedSinceApply = lastAppliedSerializedRef.current !== null &&
247
- currentMarkdown === lastAppliedSerializedRef.current;
248
- const typingRecently = editor.isFocused && Date.now() - lastTypedAtRef.current < 1500;
249
- // Doc-equivalence skip. Never re-apply content the editor already
250
- // represents — comparing by DOC EQUIVALENCE, not raw strings/timestamps:
251
- // 1. `currentMarkdown === normalizedValue` — the editor's CURRENT
252
- // serialized doc already equals the (normalized) incoming value.
253
- // 2. `value === lastEmittedRef.current` — the incoming value is our own
254
- // just-emitted markdown echoing back.
255
- // 3. `value === lastAppliedValueRef.current` — the SAME raw value we
256
- // already applied is being re-supplied (a lagging poll or a
257
- // source-sync re-handing the same stored markdown). Applying it again
258
- // would only reproduce the doc we hold; for NON-idempotent input it
259
- // would compound divergence. Guarded by `editorUnchangedSinceApply`
260
- // so a deliberate revert-to-previous after a local edit still lands.
261
- // 4. `normalizedValue === lastAppliedSerializedRef.current` — the
262
- // incoming value round-trips to the serialized output we last
263
- // produced (our own autosaved echo coming back from SQL). For
264
- // non-idempotent input the raw string differs from what we were
265
- // handed, but it is doc-equivalent to what the editor already shows,
266
- // so re-parsing it must be skipped. This is the guard that stops the
267
- // `<p>` → `&lt;p&gt;` → `&amp;lt;p&amp;gt;` escalation.
268
- if (currentMarkdown === normalizedValue ||
269
- (typingRecently &&
270
- // A stale echo of our own (possibly partial) save while the user is
271
- // actively typing would clobber the fresh tail. Outside active
272
- // typing, the same bytes can be a deliberate newer external revert
273
- // (history restore / provider conflict choice) and must be allowed
274
- // through even if mount-time normalization emitted them.
275
- (value === lastEmittedRef.current ||
276
- recentEmittedRef.current.includes(value) ||
277
- recentEmittedRef.current.includes(normalizedValue))) ||
278
- (editorUnchangedSinceApply &&
279
- (value === lastAppliedValueRef.current ||
280
- normalizedValue === lastAppliedSerializedRef.current))) {
281
- if (contentUpdatedAt) {
282
- lastAppliedUpdatedAtRef.current = contentUpdatedAt;
283
- }
284
- return;
285
- }
286
- const externalNewer = !lastAppliedUpdatedAtRef.current ||
287
- !contentUpdatedAt ||
288
- contentUpdatedAt > lastAppliedUpdatedAtRef.current;
289
- // Only the lead client applies an authoritative snapshot into the shared
290
- // Y.Doc; peers receive it through Yjs sync.
291
- if (collab && !isLeadClient) {
292
- if (contentUpdatedAt && !externalNewer) {
293
- lastAppliedUpdatedAtRef.current = contentUpdatedAt;
294
- }
295
- return;
296
- }
297
- // Never clobber an in-progress edit. While the user is actively typing
298
- // (focused and a keystroke landed within the window) defer and re-check —
299
- // applying external content now would yank text out from under them and,
300
- // for non-idempotent input, fight every keystroke. Newer external content
301
- // retries so it still lands once they pause; older-or-equal content is a
302
- // stale poll and is dropped outright while focused.
303
- if (typingRecently) {
304
- if (externalNewer) {
305
- retry = setTimeout(() => apply(deferred), 700);
306
- }
307
- return;
308
- }
309
- // Older-or-equal content is a stale poll / lagging echo. Drop it while
310
- // focused (a peer/agent edit would be NEWER and retries above). In
311
- // NON-COLLAB mode there is no peer, so older-or-equal external content is
312
- // ALWAYS stale — dropping it regardless of focus stops a lagging
313
- // `get-visual-plan` poll from reverting a just-applied local structural
314
- // change (drag-to-columns) while the editor is blurred (the drag grips the
315
- // handle, not the prose, so `isFocused` is false at drop time). Gated on
316
- // `lastAppliedSerializedRef` so the very first seed (nothing applied yet,
317
- // also not-newer) still lands.
318
- const seeded = lastAppliedSerializedRef.current !== null;
319
- if (!externalNewer && (editor.isFocused || (!collab && seeded)))
320
- return;
321
- // Race guard: with peers present, let Yjs deliver a peer's edit first.
322
- // Defer once and re-check — a peer edit makes the equality check above
323
- // no-op next pass; an agent/source edit still differs and applies.
324
- if (collab && externalNewer && !deferred && peerCountRef.current > 0) {
325
- retry = setTimeout(() => apply(true), PEER_SETTLE_MS);
326
- return;
327
- }
328
- const applyTimer = setTimeout(() => {
329
- if (cancelled || editor.isDestroyed)
330
- return;
331
- // Re-check doc-equivalence at apply time. Between the decision above and
332
- // this task a peer/Yjs edit (or our own prior apply) may have made
333
- // the editor already represent this value — re-applying would be a
334
- // wasted setContent that, for non-idempotent input, re-triggers the
335
- // loop. Skip when the editor's current serialization already matches the
336
- // normalized value, or the value round-trips to what we last produced.
337
- const beforeMarkdown = getMarkdown(editor);
338
- const normalized = normalizeValue(value);
339
- const unchangedSinceApply = lastAppliedSerializedRef.current !== null &&
340
- beforeMarkdown === lastAppliedSerializedRef.current;
341
- if (beforeMarkdown === normalized ||
342
- (unchangedSinceApply &&
343
- normalized === lastAppliedSerializedRef.current)) {
344
- lastAppliedValueRef.current = value;
345
- if (contentUpdatedAt) {
346
- lastAppliedUpdatedAtRef.current = contentUpdatedAt;
347
- }
348
- return;
349
- }
350
- isSettingContentRef.current = true;
351
- // Surgical path first: replace only the changed top-level run so
352
- // unchanged block NodeViews are never torn down and (under
353
- // Collaboration) Yjs sees a minimal edit instead of a full-fragment
354
- // rewrite. Falls back to the classic whole-document setContent when no
355
- // parser is available or the targeted transaction cannot be applied.
356
- let appliedSurgically = false;
357
- if (parseValue !== false) {
358
- const parse = parseValue ?? defaultParseValue;
359
- const parsedDoc = parse(editor, value);
360
- if (parsedDoc) {
361
- const result = applyDocSurgically(editor, parsedDoc);
362
- appliedSurgically = result === "applied" || result === "noop";
363
- }
364
- }
365
- if (!appliedSurgically) {
366
- setContent(editor, value, { emitUpdate: false, addToHistory: false });
367
- }
368
- isSettingContentRef.current = false;
369
- // Capture the SERIALIZED result, not the raw value. For non-idempotent
370
- // input these differ; recording the serialized output is what lets the
371
- // next poll (which returns this serialized form) be recognized as our
372
- // own echo and skipped — stabilizing the doc after exactly one apply.
373
- const serialized = getMarkdown(editor);
374
- lastEmittedRef.current = serialized;
375
- pushEmittedRing(recentEmittedRef.current, serialized);
376
- lastAppliedValueRef.current = value;
377
- lastAppliedSerializedRef.current = serialized;
378
- if (contentUpdatedAt) {
379
- lastAppliedUpdatedAtRef.current = contentUpdatedAt;
380
- }
381
- }, 0);
382
- retry = applyTimer;
383
- };
384
- apply();
385
- return () => {
386
- cancelled = true;
387
- if (retry)
388
- clearTimeout(retry);
389
- };
390
- }, [
391
- contentUpdatedAt,
392
- editor,
393
- value,
394
- collab,
395
- collabSynced,
396
- isLeadClient,
397
- getMarkdown,
398
- setContent,
399
- parseValue,
400
- normalizeValue,
401
- ]);
402
- const shouldIgnoreUpdate = (transaction) => {
403
- if (!editable || isSettingContentRef.current)
404
- return true;
405
- // Collaboration can emit schema/default-paragraph transactions while the
406
- // persisted Y.Doc is still loading and before the authoritative value has
407
- // seeded/reconciled. Never let those transient pre-seed updates reach an
408
- // app's local mirror or autosave path (Content serializes an empty paragraph
409
- // as `<empty-block/>`, which is non-empty text and bypasses the generic
410
- // registerEmitted empty-string guard).
411
- if (collab && !seededRef.current)
412
- return true;
413
- if (transaction.getMeta(RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION)) {
414
- return true;
415
- }
416
- // In collab mode, never persist remote-originated changes (the initial Yjs
417
- // state load or a peer's edit arriving via sync). Each client saves only its
418
- // OWN local edits; a peer's edit is saved by that peer. Without this, a
419
- // lagging Y.Doc load would write stale markdown over newer SQL.
420
- if (collab && transaction && isChangeOrigin(transaction))
421
- return true;
422
- lastTypedAtRef.current = Date.now();
423
- return false;
424
- };
425
- const registerEmitted = (markdown) => {
426
- // Don't persist an empty doc before Collaboration has seeded — that would
427
- // clobber the saved block content with an empty string.
428
- if (collab && !markdown.trim())
429
- return false;
430
- lastEmittedRef.current = markdown;
431
- pushEmittedRing(recentEmittedRef.current, markdown);
432
- return true;
433
- };
434
- return {
435
- collab,
436
- isSettingContentRef,
437
- shouldIgnoreUpdate,
438
- registerEmitted,
439
- };
440
- }
441
- //# sourceMappingURL=useCollabReconcile.js.map