@andrew.ng/symbion 0.1.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 (417) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -0
  3. package/apps/daemon/dist/boot/menu.d.ts +11 -0
  4. package/apps/daemon/dist/boot/menu.d.ts.map +1 -0
  5. package/apps/daemon/dist/boot/menu.js +32 -0
  6. package/apps/daemon/dist/boot/menu.js.map +1 -0
  7. package/apps/daemon/dist/fs/folderPick.d.ts +13 -0
  8. package/apps/daemon/dist/fs/folderPick.d.ts.map +1 -0
  9. package/apps/daemon/dist/fs/folderPick.js +4 -0
  10. package/apps/daemon/dist/fs/folderPick.js.map +1 -0
  11. package/apps/daemon/dist/fs/listDir.d.ts +13 -0
  12. package/apps/daemon/dist/fs/listDir.d.ts.map +1 -0
  13. package/apps/daemon/dist/fs/listDir.js +121 -0
  14. package/apps/daemon/dist/fs/listDir.js.map +1 -0
  15. package/apps/daemon/dist/fs/readTargetFiles.d.ts +20 -0
  16. package/apps/daemon/dist/fs/readTargetFiles.d.ts.map +1 -0
  17. package/apps/daemon/dist/fs/readTargetFiles.js +76 -0
  18. package/apps/daemon/dist/fs/readTargetFiles.js.map +1 -0
  19. package/apps/daemon/dist/fs/writeFiles.d.ts +32 -0
  20. package/apps/daemon/dist/fs/writeFiles.d.ts.map +1 -0
  21. package/apps/daemon/dist/fs/writeFiles.js +93 -0
  22. package/apps/daemon/dist/fs/writeFiles.js.map +1 -0
  23. package/apps/daemon/dist/git/status.d.ts +11 -0
  24. package/apps/daemon/dist/git/status.d.ts.map +1 -0
  25. package/apps/daemon/dist/git/status.js +30 -0
  26. package/apps/daemon/dist/git/status.js.map +1 -0
  27. package/apps/daemon/dist/index.d.ts +2 -0
  28. package/apps/daemon/dist/index.d.ts.map +1 -0
  29. package/apps/daemon/dist/index.js +69 -0
  30. package/apps/daemon/dist/index.js.map +1 -0
  31. package/apps/daemon/dist/llm/anthropicProvider.d.ts +26 -0
  32. package/apps/daemon/dist/llm/anthropicProvider.d.ts.map +1 -0
  33. package/apps/daemon/dist/llm/anthropicProvider.js +90 -0
  34. package/apps/daemon/dist/llm/anthropicProvider.js.map +1 -0
  35. package/apps/daemon/dist/llm/geminiProvider.d.ts +25 -0
  36. package/apps/daemon/dist/llm/geminiProvider.d.ts.map +1 -0
  37. package/apps/daemon/dist/llm/geminiProvider.js +89 -0
  38. package/apps/daemon/dist/llm/geminiProvider.js.map +1 -0
  39. package/apps/daemon/dist/llm/installInstructions.d.ts +40 -0
  40. package/apps/daemon/dist/llm/installInstructions.d.ts.map +1 -0
  41. package/apps/daemon/dist/llm/installInstructions.js +80 -0
  42. package/apps/daemon/dist/llm/installInstructions.js.map +1 -0
  43. package/apps/daemon/dist/llm/ollamaProvider.d.ts +55 -0
  44. package/apps/daemon/dist/llm/ollamaProvider.d.ts.map +1 -0
  45. package/apps/daemon/dist/llm/ollamaProvider.js +213 -0
  46. package/apps/daemon/dist/llm/ollamaProvider.js.map +1 -0
  47. package/apps/daemon/dist/llm/openaiProvider.d.ts +25 -0
  48. package/apps/daemon/dist/llm/openaiProvider.d.ts.map +1 -0
  49. package/apps/daemon/dist/llm/openaiProvider.js +90 -0
  50. package/apps/daemon/dist/llm/openaiProvider.js.map +1 -0
  51. package/apps/daemon/dist/llm/providerStatus.d.ts +60 -0
  52. package/apps/daemon/dist/llm/providerStatus.d.ts.map +1 -0
  53. package/apps/daemon/dist/llm/providerStatus.js +88 -0
  54. package/apps/daemon/dist/llm/providerStatus.js.map +1 -0
  55. package/apps/daemon/dist/llm/registry.d.ts +14 -0
  56. package/apps/daemon/dist/llm/registry.d.ts.map +1 -0
  57. package/apps/daemon/dist/llm/registry.js +35 -0
  58. package/apps/daemon/dist/llm/registry.js.map +1 -0
  59. package/apps/daemon/dist/llm/remoteProvider.d.ts +25 -0
  60. package/apps/daemon/dist/llm/remoteProvider.d.ts.map +1 -0
  61. package/apps/daemon/dist/llm/remoteProvider.js +88 -0
  62. package/apps/daemon/dist/llm/remoteProvider.js.map +1 -0
  63. package/apps/daemon/dist/llm/secrets.d.ts +55 -0
  64. package/apps/daemon/dist/llm/secrets.d.ts.map +1 -0
  65. package/apps/daemon/dist/llm/secrets.js +167 -0
  66. package/apps/daemon/dist/llm/secrets.js.map +1 -0
  67. package/apps/daemon/dist/llm/types.d.ts +50 -0
  68. package/apps/daemon/dist/llm/types.d.ts.map +1 -0
  69. package/apps/daemon/dist/llm/types.js +16 -0
  70. package/apps/daemon/dist/llm/types.js.map +1 -0
  71. package/apps/daemon/dist/net/findOpenPort.d.ts +26 -0
  72. package/apps/daemon/dist/net/findOpenPort.d.ts.map +1 -0
  73. package/apps/daemon/dist/net/findOpenPort.js +37 -0
  74. package/apps/daemon/dist/net/findOpenPort.js.map +1 -0
  75. package/apps/daemon/dist/rpc/contract.d.ts +10 -0
  76. package/apps/daemon/dist/rpc/contract.d.ts.map +1 -0
  77. package/apps/daemon/dist/rpc/contract.js +2 -0
  78. package/apps/daemon/dist/rpc/contract.js.map +1 -0
  79. package/apps/daemon/dist/rpc/guard.d.ts +18 -0
  80. package/apps/daemon/dist/rpc/guard.d.ts.map +1 -0
  81. package/apps/daemon/dist/rpc/guard.js +75 -0
  82. package/apps/daemon/dist/rpc/guard.js.map +1 -0
  83. package/apps/daemon/dist/rpc/handlers.d.ts +118 -0
  84. package/apps/daemon/dist/rpc/handlers.d.ts.map +1 -0
  85. package/apps/daemon/dist/rpc/handlers.js +694 -0
  86. package/apps/daemon/dist/rpc/handlers.js.map +1 -0
  87. package/apps/daemon/dist/rpc/pathStyle.d.ts +27 -0
  88. package/apps/daemon/dist/rpc/pathStyle.d.ts.map +1 -0
  89. package/apps/daemon/dist/rpc/pathStyle.js +43 -0
  90. package/apps/daemon/dist/rpc/pathStyle.js.map +1 -0
  91. package/apps/daemon/dist/rpc/rpcError.d.ts +13 -0
  92. package/apps/daemon/dist/rpc/rpcError.d.ts.map +1 -0
  93. package/apps/daemon/dist/rpc/rpcError.js +16 -0
  94. package/apps/daemon/dist/rpc/rpcError.js.map +1 -0
  95. package/apps/daemon/dist/server.d.ts +18 -0
  96. package/apps/daemon/dist/server.d.ts.map +1 -0
  97. package/apps/daemon/dist/server.js +208 -0
  98. package/apps/daemon/dist/server.js.map +1 -0
  99. package/apps/daemon/dist/store/publishLog.d.ts +6 -0
  100. package/apps/daemon/dist/store/publishLog.d.ts.map +1 -0
  101. package/apps/daemon/dist/store/publishLog.js +27 -0
  102. package/apps/daemon/dist/store/publishLog.js.map +1 -0
  103. package/apps/daemon/dist/store/store.d.ts +35 -0
  104. package/apps/daemon/dist/store/store.d.ts.map +1 -0
  105. package/apps/daemon/dist/store/store.js +129 -0
  106. package/apps/daemon/dist/store/store.js.map +1 -0
  107. package/apps/daemon/dist/templates/githubFetch.d.ts +49 -0
  108. package/apps/daemon/dist/templates/githubFetch.d.ts.map +1 -0
  109. package/apps/daemon/dist/templates/githubFetch.js +168 -0
  110. package/apps/daemon/dist/templates/githubFetch.js.map +1 -0
  111. package/apps/web/out/404.html +1 -0
  112. package/apps/web/out/_next/static/IIw50lkv8jQuwHOBZJifS/_buildManifest.js +1 -0
  113. package/apps/web/out/_next/static/IIw50lkv8jQuwHOBZJifS/_ssgManifest.js +1 -0
  114. package/apps/web/out/_next/static/chunks/1dd3208c-6a745fea7bd2124a.js +1 -0
  115. package/apps/web/out/_next/static/chunks/426-deb95a16531d3b4b.js +25 -0
  116. package/apps/web/out/_next/static/chunks/528-6e64508688610bfe.js +2 -0
  117. package/apps/web/out/_next/static/chunks/656-fd1628581ad77b01.js +1 -0
  118. package/apps/web/out/_next/static/chunks/777-d587bc7cc0fc6be8.js +1 -0
  119. package/apps/web/out/_next/static/chunks/990-f2445c68c17fa077.js +1 -0
  120. package/apps/web/out/_next/static/chunks/app/_not-found/page-e0d77774c4eb9aef.js +1 -0
  121. package/apps/web/out/_next/static/chunks/app/layout-e5023aba6634ce53.js +1 -0
  122. package/apps/web/out/_next/static/chunks/app/page-a545c902535ac2e3.js +1 -0
  123. package/apps/web/out/_next/static/chunks/app/settings/page-a68ed4ae2ccb8840.js +1 -0
  124. package/apps/web/out/_next/static/chunks/app/templates/page-e5f0cefb905e5b72.js +1 -0
  125. package/apps/web/out/_next/static/chunks/baeaa4ff-28d2e32e4dd119b9.js +1 -0
  126. package/apps/web/out/_next/static/chunks/eb0351e1-329719bc902eaf71.js +1 -0
  127. package/apps/web/out/_next/static/chunks/framework-3664cab31236a9fa.js +1 -0
  128. package/apps/web/out/_next/static/chunks/main-app-d515c42ecb17b8e8.js +1 -0
  129. package/apps/web/out/_next/static/chunks/main-ff24788874d4ec1b.js +1 -0
  130. package/apps/web/out/_next/static/chunks/pages/_app-10a93ab5b7c32eb3.js +1 -0
  131. package/apps/web/out/_next/static/chunks/pages/_error-2d792b2a41857be4.js +1 -0
  132. package/apps/web/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  133. package/apps/web/out/_next/static/chunks/webpack-ae7ee8fe97fdceba.js +1 -0
  134. package/apps/web/out/_next/static/css/0a42edcfc2beb916.css +3 -0
  135. package/apps/web/out/_next/static/css/a275cc2b185e04f8.css +1 -0
  136. package/apps/web/out/_next/static/media/011e180705008d6f-s.woff2 +0 -0
  137. package/apps/web/out/_next/static/media/20535187d867b7b9-s.woff2 +0 -0
  138. package/apps/web/out/_next/static/media/26d4368bf94c0ec4-s.p.woff2 +0 -0
  139. package/apps/web/out/_next/static/media/2801417b65625cf5-s.woff2 +0 -0
  140. package/apps/web/out/_next/static/media/28793f5c5e3d822d-s.woff2 +0 -0
  141. package/apps/web/out/_next/static/media/5356a6a4f2c8c8d8-s.woff2 +0 -0
  142. package/apps/web/out/_next/static/media/58f386aa6b1a2a92-s.woff2 +0 -0
  143. package/apps/web/out/_next/static/media/73cb51aac9c97f90-s.woff2 +0 -0
  144. package/apps/web/out/_next/static/media/7b19b489dc6743ba-s.woff2 +0 -0
  145. package/apps/web/out/_next/static/media/7ba5fb2a8c88521c-s.woff2 +0 -0
  146. package/apps/web/out/_next/static/media/92eeb95d069020cc-s.woff2 +0 -0
  147. package/apps/web/out/_next/static/media/98e207f02528a563-s.p.woff2 +0 -0
  148. package/apps/web/out/_next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
  149. package/apps/web/out/_next/static/media/b3bf17a9041d9433-s.woff2 +0 -0
  150. package/apps/web/out/_next/static/media/c9c3823090ec8b55-s.woff2 +0 -0
  151. package/apps/web/out/_next/static/media/d26bbd13d6b70f89-s.woff2 +0 -0
  152. package/apps/web/out/_next/static/media/d29838c109ef09b4-s.woff2 +0 -0
  153. package/apps/web/out/_next/static/media/d3ebbfd689654d3a-s.p.woff2 +0 -0
  154. package/apps/web/out/_next/static/media/db96af6b531dc71f-s.p.woff2 +0 -0
  155. package/apps/web/out/_next/static/media/e40af3453d7c920a-s.woff2 +0 -0
  156. package/apps/web/out/_next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
  157. package/apps/web/out/index.html +1 -0
  158. package/apps/web/out/index.txt +6 -0
  159. package/apps/web/out/settings.html +1 -0
  160. package/apps/web/out/settings.txt +6 -0
  161. package/apps/web/out/templates.html +1 -0
  162. package/apps/web/out/templates.txt +6 -0
  163. package/bin/symbion.mjs +41 -0
  164. package/node_modules/@symbion/core/dist/adapters/claude.d.ts +3 -0
  165. package/node_modules/@symbion/core/dist/adapters/claude.d.ts.map +1 -0
  166. package/node_modules/@symbion/core/dist/adapters/claude.js +43 -0
  167. package/node_modules/@symbion/core/dist/adapters/claude.js.map +1 -0
  168. package/node_modules/@symbion/core/dist/adapters/codex.d.ts +3 -0
  169. package/node_modules/@symbion/core/dist/adapters/codex.d.ts.map +1 -0
  170. package/node_modules/@symbion/core/dist/adapters/codex.js +58 -0
  171. package/node_modules/@symbion/core/dist/adapters/codex.js.map +1 -0
  172. package/node_modules/@symbion/core/dist/adapters/registry.d.ts +5 -0
  173. package/node_modules/@symbion/core/dist/adapters/registry.d.ts.map +1 -0
  174. package/node_modules/@symbion/core/dist/adapters/registry.js +14 -0
  175. package/node_modules/@symbion/core/dist/adapters/registry.js.map +1 -0
  176. package/node_modules/@symbion/core/dist/adapters/types.d.ts +34 -0
  177. package/node_modules/@symbion/core/dist/adapters/types.d.ts.map +1 -0
  178. package/node_modules/@symbion/core/dist/adapters/types.js +2 -0
  179. package/node_modules/@symbion/core/dist/adapters/types.js.map +1 -0
  180. package/node_modules/@symbion/core/dist/diff/conflict.d.ts +19 -0
  181. package/node_modules/@symbion/core/dist/diff/conflict.d.ts.map +1 -0
  182. package/node_modules/@symbion/core/dist/diff/conflict.js +20 -0
  183. package/node_modules/@symbion/core/dist/diff/conflict.js.map +1 -0
  184. package/node_modules/@symbion/core/dist/diff/diff.d.ts +44 -0
  185. package/node_modules/@symbion/core/dist/diff/diff.d.ts.map +1 -0
  186. package/node_modules/@symbion/core/dist/diff/diff.js +124 -0
  187. package/node_modules/@symbion/core/dist/diff/diff.js.map +1 -0
  188. package/node_modules/@symbion/core/dist/generate/bodyPrompt.d.ts +27 -0
  189. package/node_modules/@symbion/core/dist/generate/bodyPrompt.d.ts.map +1 -0
  190. package/node_modules/@symbion/core/dist/generate/bodyPrompt.js +55 -0
  191. package/node_modules/@symbion/core/dist/generate/bodyPrompt.js.map +1 -0
  192. package/node_modules/@symbion/core/dist/generate/description.d.ts +18 -0
  193. package/node_modules/@symbion/core/dist/generate/description.d.ts.map +1 -0
  194. package/node_modules/@symbion/core/dist/generate/description.js +164 -0
  195. package/node_modules/@symbion/core/dist/generate/description.js.map +1 -0
  196. package/node_modules/@symbion/core/dist/index.d.ts +23 -0
  197. package/node_modules/@symbion/core/dist/index.d.ts.map +1 -0
  198. package/node_modules/@symbion/core/dist/index.js +24 -0
  199. package/node_modules/@symbion/core/dist/index.js.map +1 -0
  200. package/node_modules/@symbion/core/dist/ir/refs.d.ts +11 -0
  201. package/node_modules/@symbion/core/dist/ir/refs.d.ts.map +1 -0
  202. package/node_modules/@symbion/core/dist/ir/refs.js +25 -0
  203. package/node_modules/@symbion/core/dist/ir/refs.js.map +1 -0
  204. package/node_modules/@symbion/core/dist/ir/types.d.ts +107 -0
  205. package/node_modules/@symbion/core/dist/ir/types.d.ts.map +1 -0
  206. package/node_modules/@symbion/core/dist/ir/types.js +19 -0
  207. package/node_modules/@symbion/core/dist/ir/types.js.map +1 -0
  208. package/node_modules/@symbion/core/dist/ir/validate.d.ts +13 -0
  209. package/node_modules/@symbion/core/dist/ir/validate.d.ts.map +1 -0
  210. package/node_modules/@symbion/core/dist/ir/validate.js +114 -0
  211. package/node_modules/@symbion/core/dist/ir/validate.js.map +1 -0
  212. package/node_modules/@symbion/core/dist/parse/scan.d.ts +47 -0
  213. package/node_modules/@symbion/core/dist/parse/scan.d.ts.map +1 -0
  214. package/node_modules/@symbion/core/dist/parse/scan.js +109 -0
  215. package/node_modules/@symbion/core/dist/parse/scan.js.map +1 -0
  216. package/node_modules/@symbion/core/dist/render/frontmatter.d.ts +29 -0
  217. package/node_modules/@symbion/core/dist/render/frontmatter.d.ts.map +1 -0
  218. package/node_modules/@symbion/core/dist/render/frontmatter.js +99 -0
  219. package/node_modules/@symbion/core/dist/render/frontmatter.js.map +1 -0
  220. package/node_modules/@symbion/core/dist/render/marker.d.ts +30 -0
  221. package/node_modules/@symbion/core/dist/render/marker.d.ts.map +1 -0
  222. package/node_modules/@symbion/core/dist/render/marker.js +48 -0
  223. package/node_modules/@symbion/core/dist/render/marker.js.map +1 -0
  224. package/node_modules/@symbion/core/dist/render/render.d.ts +12 -0
  225. package/node_modules/@symbion/core/dist/render/render.d.ts.map +1 -0
  226. package/node_modules/@symbion/core/dist/render/render.js +10 -0
  227. package/node_modules/@symbion/core/dist/render/render.js.map +1 -0
  228. package/node_modules/@symbion/core/dist/runcommand/render.d.ts +13 -0
  229. package/node_modules/@symbion/core/dist/runcommand/render.d.ts.map +1 -0
  230. package/node_modules/@symbion/core/dist/runcommand/render.js +19 -0
  231. package/node_modules/@symbion/core/dist/runcommand/render.js.map +1 -0
  232. package/node_modules/@symbion/core/dist/templates/authorSource.d.ts +55 -0
  233. package/node_modules/@symbion/core/dist/templates/authorSource.d.ts.map +1 -0
  234. package/node_modules/@symbion/core/dist/templates/authorSource.js +24 -0
  235. package/node_modules/@symbion/core/dist/templates/authorSource.js.map +1 -0
  236. package/node_modules/@symbion/core/dist/templates/matchAuthorFolders.d.ts +28 -0
  237. package/node_modules/@symbion/core/dist/templates/matchAuthorFolders.d.ts.map +1 -0
  238. package/node_modules/@symbion/core/dist/templates/matchAuthorFolders.js +54 -0
  239. package/node_modules/@symbion/core/dist/templates/matchAuthorFolders.js.map +1 -0
  240. package/node_modules/@symbion/core/dist/templates/parseTemplate.d.ts +42 -0
  241. package/node_modules/@symbion/core/dist/templates/parseTemplate.d.ts.map +1 -0
  242. package/node_modules/@symbion/core/dist/templates/parseTemplate.js +56 -0
  243. package/node_modules/@symbion/core/dist/templates/parseTemplate.js.map +1 -0
  244. package/node_modules/@symbion/core/dist/templates/templateListItem.d.ts +39 -0
  245. package/node_modules/@symbion/core/dist/templates/templateListItem.d.ts.map +1 -0
  246. package/node_modules/@symbion/core/dist/templates/templateListItem.js +2 -0
  247. package/node_modules/@symbion/core/dist/templates/templateListItem.js.map +1 -0
  248. package/node_modules/@symbion/core/dist/util/sha256.d.ts +9 -0
  249. package/node_modules/@symbion/core/dist/util/sha256.d.ts.map +1 -0
  250. package/node_modules/@symbion/core/dist/util/sha256.js +91 -0
  251. package/node_modules/@symbion/core/dist/util/sha256.js.map +1 -0
  252. package/node_modules/@symbion/core/dist/version/semver.d.ts +18 -0
  253. package/node_modules/@symbion/core/dist/version/semver.d.ts.map +1 -0
  254. package/node_modules/@symbion/core/dist/version/semver.js +53 -0
  255. package/node_modules/@symbion/core/dist/version/semver.js.map +1 -0
  256. package/node_modules/@symbion/core/package.json +14 -0
  257. package/node_modules/@symbion/rpc-types/dist/index.d.ts +444 -0
  258. package/node_modules/@symbion/rpc-types/dist/index.d.ts.map +1 -0
  259. package/node_modules/@symbion/rpc-types/dist/index.js +2 -0
  260. package/node_modules/@symbion/rpc-types/dist/index.js.map +1 -0
  261. package/node_modules/@symbion/rpc-types/package.json +11 -0
  262. package/node_modules/yaml/dist/cli.d.ts +8 -0
  263. package/node_modules/yaml/dist/cli.mjs +201 -0
  264. package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
  265. package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  266. package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
  267. package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  268. package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
  269. package/node_modules/yaml/dist/compose/compose-node.js +112 -0
  270. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  271. package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  272. package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
  273. package/node_modules/yaml/dist/compose/composer.js +224 -0
  274. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  275. package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  276. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
  277. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  278. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
  279. package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  280. package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  281. package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  282. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
  283. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  284. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  285. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
  286. package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
  287. package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  288. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  289. package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  290. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  291. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  292. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  293. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  294. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  295. package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  296. package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
  297. package/node_modules/yaml/dist/doc/Document.js +337 -0
  298. package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  299. package/node_modules/yaml/dist/doc/anchors.js +76 -0
  300. package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  301. package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  302. package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  303. package/node_modules/yaml/dist/doc/createNode.js +90 -0
  304. package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
  305. package/node_modules/yaml/dist/doc/directives.js +178 -0
  306. package/node_modules/yaml/dist/errors.d.ts +21 -0
  307. package/node_modules/yaml/dist/errors.js +62 -0
  308. package/node_modules/yaml/dist/index.d.ts +25 -0
  309. package/node_modules/yaml/dist/index.js +50 -0
  310. package/node_modules/yaml/dist/log.d.ts +3 -0
  311. package/node_modules/yaml/dist/log.js +19 -0
  312. package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
  313. package/node_modules/yaml/dist/nodes/Alias.js +118 -0
  314. package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  315. package/node_modules/yaml/dist/nodes/Collection.js +151 -0
  316. package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  317. package/node_modules/yaml/dist/nodes/Node.js +40 -0
  318. package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
  319. package/node_modules/yaml/dist/nodes/Pair.js +39 -0
  320. package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
  321. package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  322. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
  323. package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  324. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
  325. package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  326. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
  327. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  328. package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
  329. package/node_modules/yaml/dist/nodes/identity.js +53 -0
  330. package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
  331. package/node_modules/yaml/dist/nodes/toJS.js +39 -0
  332. package/node_modules/yaml/dist/options.d.ts +350 -0
  333. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  334. package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  335. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  336. package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  337. package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  338. package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  339. package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
  340. package/node_modules/yaml/dist/parse/cst.js +112 -0
  341. package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  342. package/node_modules/yaml/dist/parse/lexer.js +723 -0
  343. package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  344. package/node_modules/yaml/dist/parse/line-counter.js +41 -0
  345. package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  346. package/node_modules/yaml/dist/parse/parser.js +980 -0
  347. package/node_modules/yaml/dist/public-api.d.ts +44 -0
  348. package/node_modules/yaml/dist/public-api.js +107 -0
  349. package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
  350. package/node_modules/yaml/dist/schema/Schema.js +39 -0
  351. package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  352. package/node_modules/yaml/dist/schema/common/map.js +19 -0
  353. package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  354. package/node_modules/yaml/dist/schema/common/null.js +17 -0
  355. package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  356. package/node_modules/yaml/dist/schema/common/seq.js +19 -0
  357. package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  358. package/node_modules/yaml/dist/schema/common/string.js +16 -0
  359. package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  360. package/node_modules/yaml/dist/schema/core/bool.js +21 -0
  361. package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  362. package/node_modules/yaml/dist/schema/core/float.js +47 -0
  363. package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  364. package/node_modules/yaml/dist/schema/core/int.js +42 -0
  365. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  366. package/node_modules/yaml/dist/schema/core/schema.js +25 -0
  367. package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  368. package/node_modules/yaml/dist/schema/json/schema.js +64 -0
  369. package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  370. package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
  371. package/node_modules/yaml/dist/schema/tags.js +99 -0
  372. package/node_modules/yaml/dist/schema/types.d.ts +92 -0
  373. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  374. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  375. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  376. package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  377. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  378. package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  379. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  380. package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  381. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
  382. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
  383. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
  384. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  385. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  386. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  387. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  388. package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  389. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
  390. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  391. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  392. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  393. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  394. package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  395. package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
  396. package/node_modules/yaml/dist/stringify/stringify.js +132 -0
  397. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  398. package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  399. package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  400. package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  401. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
  402. package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  403. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  404. package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
  405. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  406. package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  407. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
  408. package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  409. package/node_modules/yaml/dist/test-events.d.ts +4 -0
  410. package/node_modules/yaml/dist/test-events.js +134 -0
  411. package/node_modules/yaml/dist/util.d.ts +16 -0
  412. package/node_modules/yaml/dist/util.js +28 -0
  413. package/node_modules/yaml/dist/visit.d.ts +102 -0
  414. package/node_modules/yaml/dist/visit.js +236 -0
  415. package/node_modules/yaml/package.json +20 -0
  416. package/node_modules/yaml/util.js +2 -0
  417. package/package.json +39 -0
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html lang="vi" class="__variable_c8daab __variable_595324"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/26d4368bf94c0ec4-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/98e207f02528a563-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/d3ebbfd689654d3a-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/db96af6b531dc71f-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/0a42edcfc2beb916.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ae7ee8fe97fdceba.js"/><script src="/_next/static/chunks/1dd3208c-6a745fea7bd2124a.js" async=""></script><script src="/_next/static/chunks/528-6e64508688610bfe.js" async=""></script><script src="/_next/static/chunks/main-app-d515c42ecb17b8e8.js" async=""></script><script src="/_next/static/chunks/baeaa4ff-28d2e32e4dd119b9.js" async=""></script><script src="/_next/static/chunks/990-f2445c68c17fa077.js" async=""></script><script src="/_next/static/chunks/426-deb95a16531d3b4b.js" async=""></script><script src="/_next/static/chunks/777-d587bc7cc0fc6be8.js" async=""></script><script src="/_next/static/chunks/app/templates/page-e5f0cefb905e5b72.js" async=""></script><title>Symbion</title><meta name="description" content="Visual builder for AI-coding autoworkflows"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div class="flex h-screen bg-bg-app text-text-body"><aside class="relative flex h-full shrink-0 flex-col border-r border-border-hairline bg-bg-rail" style="width:236px"><div class="flex items-center gap-2 px-4 pb-[14px] pt-[18px]"><span class="flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-nav-item bg-brand-accent text-sm font-bold text-white">S</span><span class="flex min-w-0 flex-col"><span class="truncate text-[13.5px] font-semibold text-text-strong">Symbion</span><span class="truncate font-mono text-[10.5px] text-text-faint">v0.3.0 · daemon</span></span></div><nav class="flex flex-col gap-0.5 border-t border-border-hairline px-2 py-2"><a class="relative flex w-full items-center gap-2 rounded-nav-item px-3 py-2 text-left transition-colors hover:bg-white/[.03]" href="/"><span class="absolute left-0 top-1/2 w-[3px] -translate-y-1/2 rounded-[3px] transition-colors h-4 bg-transparent" aria-hidden="true"></span><span class="flex min-w-0 flex-1 flex-col"><span class="flex items-center gap-2 truncate text-[13px] font-medium text-text-dim">Builder</span></span></a><a class="relative flex w-full items-center gap-2 rounded-nav-item px-3 py-2 text-left transition-colors bg-white/[.055]" href="/templates"><span class="absolute left-0 top-1/2 w-[3px] -translate-y-1/2 rounded-[3px] transition-colors h-4 bg-brand-accent" aria-hidden="true"></span><span class="flex min-w-0 flex-1 flex-col"><span class="flex items-center gap-2 truncate text-[13px] font-semibold text-text-strong">Templates</span></span></a><a class="relative flex w-full items-center gap-2 rounded-nav-item px-3 py-2 text-left transition-colors hover:bg-white/[.03]" href="/settings"><span class="absolute left-0 top-1/2 w-[3px] -translate-y-1/2 rounded-[3px] transition-colors h-4 bg-transparent" aria-hidden="true"></span><span class="flex min-w-0 flex-1 flex-col"><span class="flex items-center gap-2 truncate text-[13px] font-medium text-text-dim">Settings</span></span></a></nav><div class="flex min-h-0 flex-1 flex-col border-t border-border-hairline px-2 py-2"><div class="mb-1 flex items-center justify-between px-1"><span class="text-[10.5px] font-bold uppercase tracking-[.11em] text-text-faint">Projects</span><button type="button" aria-label="Tạo dự án mới" class="flex h-5 w-5 items-center justify-center rounded-sm text-text-faint hover:bg-white/[.06] hover:text-text-dim">+</button></div><p class="px-1 py-1 text-xs text-text-faint">∅ chưa có dự án</p><ul class="flex-1 space-y-0.5 overflow-y-auto"></ul></div><div class="mt-auto border-t border-border-hairline"><div class="px-3 py-2.5 font-mono text-[11.5px] text-text-dim"><span class="text-success">●</span> daemon · connected</div></div><div role="separator" aria-orientation="vertical" aria-label="Resize rail" class="absolute right-0 top-0 h-full w-1 cursor-col-resize select-none hover:bg-border-hairline active:bg-border-hairline"></div></aside><main class="flex-1 overflow-auto p-6"><div class="mx-auto max-w-4xl space-y-6"><div><h1 class="text-lg font-semibold">Templates</h1><p class="text-sm text-muted-foreground">Thư viện mẫu agent / command / skill có sẵn — xem trước rồi áp dụng vào dự án của bạn.</p></div><div class="flex gap-4 border-b border-border" role="tablist" aria-label="Tác giả mẫu"><button role="tab" aria-selected="true" class="-mb-px border-b-2 px-1 pb-2 text-sm font-medium transition-colors border-primary text-foreground">Symbion</button><button role="tab" aria-selected="false" class="-mb-px border-b-2 px-1 pb-2 text-sm font-medium transition-colors border-transparent text-muted-foreground hover:text-foreground">ECC</button></div><section class="space-y-2"><h2 class="border-b border-border pb-1 text-sm font-semibold text-muted-foreground">Skills</h2><div class="grid grid-cols-1 gap-2 sm:grid-cols-2"><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">commit-message</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Skill</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Soạn commit message theo Conventional Commits từ staged diff.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">pr-description</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Skill</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Tạo mô tả PR từ diff theo chuẩn dự án (Summary + Test plan).</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">api-error-message</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Skill</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Soạn message lỗi API rõ ràng, nhất quán, không lộ thông tin nội bộ.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">migration-checklist</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Skill</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Tạo checklist an toàn trước khi chạy một database migration.</p></button></div></section><section class="space-y-2"><h2 class="border-b border-border pb-1 text-sm font-semibold text-muted-foreground">Agents</h2><div class="grid grid-cols-1 gap-2 sm:grid-cols-2"><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">code-reviewer</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Agent</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Rà soát code, gắn nhãn rủi ro bảo mật &amp; style trước khi merge.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">test-coverage-auditor</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Agent</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Đối chiếu code thay đổi với test hiện có, chỉ ra phần thiếu coverage.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">dependency-upgrade-scout</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Agent</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Khảo sát các dependency lỗi thời/có lỗ hổng, đề xuất kế hoạch nâng cấp an toàn.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">onboarding-doc-writer</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Agent</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Đọc codebase và viết tài liệu onboarding ngắn gọn cho dev mới.</p></button></div></section><section class="space-y-2"><h2 class="border-b border-border pb-1 text-sm font-semibold text-muted-foreground">Commands</h2><div class="grid grid-cols-1 gap-2 sm:grid-cols-2"><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">/test-writer</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Command</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Sinh test case cho hàm/module vừa thay đổi trong working tree.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">/release-notes</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Command</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Tổng hợp release notes từ commit log kể từ tag gần nhất.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">/changelog-entry</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Command</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Soạn một mục CHANGELOG.md cho thay đổi hiện tại theo Keep a Changelog.</p></button><button class="flex flex-col items-start gap-1 rounded-md border border-border p-3 text-left hover:bg-muted"><div class="flex w-full items-center justify-between gap-2"><span class="truncate text-sm font-medium">/bug-repro</span><span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground">Command</span></div><p class="line-clamp-2 text-xs text-muted-foreground">Viết một test tái hiện lỗi (failing test) trước khi sửa.</p></button></div></section><div class="border-t border-border pt-3 text-xs text-muted-foreground">Lấy cảm hứng từ các bộ template cộng đồng (vd. ECC)<!-- --> <a href="https://github.com/affaan-m/ecc" target="_blank" rel="noreferrer" class="underline hover:text-foreground">↗</a></div></div></main></div><script src="/_next/static/chunks/webpack-ae7ee8fe97fdceba.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/26d4368bf94c0ec4-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/98e207f02528a563-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/d3ebbfd689654d3a-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/db96af6b531dc71f-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/css/0a42edcfc2beb916.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"6:I[1815,[],\"\"]\n8:I[3097,[\"906\",\"static/chunks/baeaa4ff-28d2e32e4dd119b9.js\",\"990\",\"static/chunks/990-f2445c68c17fa077.js\",\"426\",\"static/chunks/426-deb95a16531d3b4b.js\",\"777\",\"static/chunks/777-d587bc7cc0fc6be8.js\",\"0\",\"static/chunks/app/templates/page-e5f0cefb905e5b72.js\"],\"TemplatesView\"]\n9:I[5092,[],\"\"]\na:I[2023,[],\"\"]\nc:I[1584,[],\"\"]\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L6\",null,{\"buildId\":\"IIw50lkv8jQuwHOBZJifS\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"templates\"],\"initialTree\":[\"\",{\"children\":[\"templates\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"templates\",{\"children\":[\"__PAGE__\",{},[[\"$L7\",[\"$\",\"$L8\",null,{}],null],null],null]},[null,[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"templates\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/0a42edcfc2beb916.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"vi\",\"className\":\"__variable_c8daab __variable_595324\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Symbion\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Visual builder for AI-coding autoworkflows\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n7:null\n"])</script></body></html>
@@ -0,0 +1,6 @@
1
+ 2:I[3097,["906","static/chunks/baeaa4ff-28d2e32e4dd119b9.js","990","static/chunks/990-f2445c68c17fa077.js","426","static/chunks/426-deb95a16531d3b4b.js","777","static/chunks/777-d587bc7cc0fc6be8.js","0","static/chunks/app/templates/page-e5f0cefb905e5b72.js"],"TemplatesView"]
2
+ 3:I[5092,[],""]
3
+ 4:I[2023,[],""]
4
+ 0:["IIw50lkv8jQuwHOBZJifS",[[["",{"children":["templates",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["templates",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{}],null],null],null]},[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","templates","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/0a42edcfc2beb916.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"vi","className":"__variable_c8daab __variable_595324","children":["$","body",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L5",null]]]]
5
+ 5:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Symbion"}],["$","meta","3",{"name":"description","content":"Visual builder for AI-coding autoworkflows"}],["$","meta","4",{"name":"next-size-adjust"}]]
6
+ 1:null
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const here = dirname(fileURLToPath(import.meta.url));
7
+ const pkg = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
8
+ const VERSION = pkg.version;
9
+
10
+ const HELP = `Symbion v${VERSION} — local-daemon + web UI for authoring AI-coding autoworkflows
11
+
12
+ Usage:
13
+ symbion Start the daemon and open the boot menu
14
+ symbion --version, -v Print the installed version
15
+ symbion --help, -h Show this help message
16
+
17
+ Install: npm i -g ${pkg.name}
18
+
19
+ Once running, the boot menu lets you open the Web UI in your browser,
20
+ hide the daemon to run in the background, or exit.
21
+
22
+ Docs: https://github.com/Quanghuy128/Symbion
23
+ `;
24
+
25
+ const args = process.argv.slice(2);
26
+
27
+ if (args.includes("--version") || args.includes("-v")) {
28
+ console.log(VERSION);
29
+ process.exit(0);
30
+ }
31
+
32
+ if (args.includes("--help") || args.includes("-h")) {
33
+ console.log(HELP);
34
+ process.exit(0);
35
+ }
36
+
37
+ // Unknown/no flags: fall through to normal boot (design.md §3, §6 #2 locked).
38
+ process.env.SYMBION_VERSION = VERSION; // single source read once, passed down — daemon's
39
+ // own index.ts prints the banner using this instead
40
+ // of its own hardcoded literal (11.1.1).
41
+ await import("../apps/daemon/dist/index.js");
@@ -0,0 +1,3 @@
1
+ import type { TargetAdapter } from "./types.js";
2
+ export declare const claudeAdapter: TargetAdapter;
3
+ //# sourceMappingURL=claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA+B,aAAa,EAAoB,MAAM,YAAY,CAAC;AA6C/F,eAAO,MAAM,aAAa,EAAE,aAI3B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { artifactToFrontmatterFields, serializeFrontmatter } from "../render/frontmatter.js";
2
+ import { buildMarker, computeContentHash, parseMarker } from "../render/marker.js";
3
+ const capability = {
4
+ id: "claude",
5
+ label: "Claude",
6
+ supportsCommands: true,
7
+ supportsPerAgentFile: true,
8
+ fileFormat: "md-per-file",
9
+ lossy: false,
10
+ };
11
+ function relPathFor(artifact) {
12
+ return artifact.kind === "agent"
13
+ ? `.claude/agents/${artifact.name}.md`
14
+ : `.claude/commands/${artifact.name}.md`;
15
+ }
16
+ /** Render the frontmatter+body for one artifact, WITHOUT the trailing marker. */
17
+ function renderBodyWithFrontmatter(artifact) {
18
+ const fields = artifactToFrontmatterFields(artifact);
19
+ const fm = serializeFrontmatter(fields);
20
+ return `---\n${fm}\n---\n${artifact.body}`;
21
+ }
22
+ function renderOne(artifact, version) {
23
+ const base = renderBodyWithFrontmatter(artifact);
24
+ // Hash is computed over the canonical content WITHOUT any marker present.
25
+ const fullHash = computeContentHash(base);
26
+ const marker = buildMarker(artifact.id, artifact.kind, version, fullHash);
27
+ const content = `${base}\n${marker}\n`;
28
+ return {
29
+ relPath: relPathFor(artifact),
30
+ content,
31
+ artifactIds: [artifact.id],
32
+ contentHash: fullHash,
33
+ };
34
+ }
35
+ function render(artifacts, opts) {
36
+ return artifacts.map((artifact) => renderOne(artifact, opts.version));
37
+ }
38
+ export const claudeAdapter = {
39
+ capability,
40
+ render,
41
+ parseMarker,
42
+ };
43
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","s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7B,OAAO;QACP,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,WAAW,EAAE,QAAQ;KACtB,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,SAA8B,EAAE,IAAmB;IACjE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,UAAU;IACV,MAAM;IACN,WAAW;CACZ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TargetAdapter } from "./types.js";
2
+ export declare const codexAdapter: TargetAdapter;
3
+ //# sourceMappingURL=codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/adapters/codex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA+B,aAAa,EAAoB,MAAM,YAAY,CAAC;AAmE/F,eAAO,MAAM,YAAY,EAAE,aAI1B,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { buildRegionEnd, buildRegionStart, computeContentHash, parseRegionMarker, } from "../render/marker.js";
2
+ const capability = {
3
+ id: "codex",
4
+ label: "Codex",
5
+ supportsCommands: false,
6
+ supportsPerAgentFile: false,
7
+ fileFormat: "md-merged",
8
+ lossy: true,
9
+ };
10
+ function renderAgentSection(artifact) {
11
+ const toolsLine = artifact.tools && artifact.tools.length > 0
12
+ ? `\n> tools: ${artifact.tools.join(", ")} (note: Codex ignores per-agent tools)`
13
+ : "";
14
+ return `## Agent: ${artifact.name}${toolsLine}\n${artifact.body}\n`;
15
+ }
16
+ function renderCommandSection(artifact) {
17
+ return `## Command: /${artifact.name}\n> Slash command (flattened — Codex has no command primitive)\n${artifact.body}\n`;
18
+ }
19
+ /** Build the managed region body (sections only, no fence) — deterministic ordering. */
20
+ function buildRegionBody(artifacts) {
21
+ const agents = artifacts
22
+ .filter((a) => a.kind === "agent")
23
+ .slice()
24
+ .sort((a, b) => a.name.localeCompare(b.name));
25
+ const commands = artifacts
26
+ .filter((a) => a.kind === "command")
27
+ .slice()
28
+ .sort((a, b) => a.name.localeCompare(b.name));
29
+ const sections = ["# Symbion-managed workflows\n"];
30
+ for (const agent of agents)
31
+ sections.push(renderAgentSection(agent));
32
+ for (const command of commands)
33
+ sections.push(renderCommandSection(command));
34
+ return sections.join("\n");
35
+ }
36
+ function render(artifacts, opts) {
37
+ const regionBody = buildRegionBody(artifacts);
38
+ const fullHash = computeContentHash(regionBody);
39
+ const start = buildRegionStart(opts.version, fullHash);
40
+ const end = buildRegionEnd();
41
+ const managedRegion = `${start}\n${regionBody}\n${end}`;
42
+ const foreign = opts.existingForeignContent?.trim();
43
+ const content = foreign && foreign.length > 0 ? `${foreign}\n\n${managedRegion}\n` : `${managedRegion}\n`;
44
+ return [
45
+ {
46
+ relPath: "AGENTS.md",
47
+ content,
48
+ artifactIds: artifacts.map((a) => a.id),
49
+ contentHash: fullHash,
50
+ },
51
+ ];
52
+ }
53
+ export const codexAdapter = {
54
+ capability,
55
+ render,
56
+ parseMarker: parseRegionMarker,
57
+ };
58
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/adapters/codex.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,UAAU,GAAqB;IACnC,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,OAAO;IACd,gBAAgB,EAAE,KAAK;IACvB,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE,WAAW;IACvB,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,SAAS,kBAAkB,CAAC,QAA2B;IACrD,MAAM,SAAS,GACb,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CA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C,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,MAAM,CAAC,SAA8B,EAAE,IAAmB;IACjE,MAAM,UAAU,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACvD,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;IAC7B,MAAM,aAAa,GAAG,GAAG,KAAK,KAAK,UAAU,KAAK,GAAG,EAAE,CAAC;IAExD,MAAM,OAAO,GAAG,IAAI,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC;IACpD,MAAM,OAAO,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,OAAO,aAAa,IAAI,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,CAAC;IAE1G,OAAO;QACL;YACE,OAAO,EAAE,WAAW;YACpB,OAAO;YACP,WAAW,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,WAAW,EAAE,QAAQ;SACtB;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAkB;IACzC,UAAU;IACV,MAAM;IACN,WAAW,EAAE,iBAAiB;CAC/B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { TargetId } from "../ir/types.js";
2
+ import type { TargetAdapter } from "./types.js";
3
+ export declare const ADAPTERS: Record<TargetId, TargetAdapter>;
4
+ export declare function getAdapter(id: TargetId): TargetAdapter;
5
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/adapters/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,CAGpD,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,aAAa,CAMtD"}
@@ -0,0 +1,14 @@
1
+ import { claudeAdapter } from "./claude.js";
2
+ import { codexAdapter } from "./codex.js";
3
+ export const ADAPTERS = {
4
+ claude: claudeAdapter,
5
+ codex: codexAdapter,
6
+ };
7
+ export function getAdapter(id) {
8
+ const adapter = ADAPTERS[id];
9
+ if (!adapter) {
10
+ throw new Error(`Unknown target adapter: ${id}`);
11
+ }
12
+ return adapter;
13
+ }
14
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/adapters/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,QAAQ,GAAoC;IACvD,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;CACpB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EAAY;IACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { CanonicalArtifact, TargetId } from "../ir/types.js";
2
+ import type { ManagedMarker, RegionMarker } from "../render/marker.js";
3
+ export interface TargetCapability {
4
+ id: TargetId;
5
+ label: string;
6
+ supportsCommands: boolean;
7
+ supportsPerAgentFile: boolean;
8
+ fileFormat: "md-per-file" | "md-merged";
9
+ lossy: boolean;
10
+ }
11
+ export interface RenderedFile {
12
+ relPath: string;
13
+ content: string;
14
+ artifactIds: string[];
15
+ contentHash: string;
16
+ }
17
+ export interface RenderOptions {
18
+ version: string;
19
+ /**
20
+ * For merged/lossy targets (Codex): pre-existing on-disk content outside the
21
+ * managed fence, to be preserved verbatim around the regenerated region.
22
+ * Pure render only NEEDS this to reproduce the splice; daemon supplies it
23
+ * from a prior read. Undefined => no existing foreign content to preserve.
24
+ */
25
+ existingForeignContent?: string;
26
+ }
27
+ export interface TargetAdapter {
28
+ capability: TargetCapability;
29
+ /** PURE: IR -> files. Merged adapters fold many artifacts into one RenderedFile. */
30
+ render(artifacts: CanonicalArtifact[], opts: RenderOptions): RenderedFile[];
31
+ /** PURE: given an on-disk file's content, extract the managed marker (id/version/hash), or null if foreign. */
32
+ parseMarker(content: string): ManagedMarker | RegionMarker | null;
33
+ }
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,QAAQ,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,aAAa,GAAG,WAAW,CAAC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,oFAAoF;IACpF,MAAM,CAAC,SAAS,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,aAAa,GAAG,YAAY,EAAE,CAAC;IAC5E,+GAA+G;IAC/G,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,YAAY,GAAG,IAAI,CAAC;CACnE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export type ConflictClass = "clean" | "conflict" | "foreign";
2
+ export interface ClassifyInput {
3
+ /** marker found on the on-disk file's hash (truncated 12-char), or undefined if no marker. */
4
+ onDiskMarkerHash?: string;
5
+ /** recomputed truncated hash (12-char) of the on-disk content's marker-stripped body, compared against onDiskMarkerHash. */
6
+ onDiskRecomputedHash?: string;
7
+ }
8
+ /**
9
+ * classify — given an on-disk file's marker presence + hash comparison, determine
10
+ * whether it's safe to update ("clean"), hand-edited since last publish ("conflict"),
11
+ * or entirely unmanaged ("foreign").
12
+ *
13
+ * Rules (STATE §3.4):
14
+ * - No marker -> "foreign".
15
+ * - Marker present, recomputed hash == marker hash -> "clean" (untouched since Studio wrote it).
16
+ * - Marker present, recomputed hash != marker hash -> "conflict" (hand-edited after last publish).
17
+ */
18
+ export declare function classify(input: ClassifyInput): ConflictClass;
19
+ //# sourceMappingURL=conflict.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../src/diff/conflict.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4HAA4H;IAC5H,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAQ5D"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * classify — given an on-disk file's marker presence + hash comparison, determine
3
+ * whether it's safe to update ("clean"), hand-edited since last publish ("conflict"),
4
+ * or entirely unmanaged ("foreign").
5
+ *
6
+ * Rules (STATE §3.4):
7
+ * - No marker -> "foreign".
8
+ * - Marker present, recomputed hash == marker hash -> "clean" (untouched since Studio wrote it).
9
+ * - Marker present, recomputed hash != marker hash -> "conflict" (hand-edited after last publish).
10
+ */
11
+ export function classify(input) {
12
+ if (input.onDiskMarkerHash === undefined) {
13
+ return "foreign";
14
+ }
15
+ if (input.onDiskRecomputedHash === input.onDiskMarkerHash) {
16
+ return "clean";
17
+ }
18
+ return "conflict";
19
+ }
20
+ //# sourceMappingURL=conflict.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflict.js","sourceRoot":"","sources":["../../src/diff/conflict.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,KAAK,CAAC,oBAAoB,KAAK,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC1D,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { RenderedFile } from "../adapters/types.js";
2
+ import { type ConflictClass } from "./conflict.js";
3
+ export type DiffStatus = "new" | "update" | "same" | "conflict";
4
+ export interface DiffFile {
5
+ relPath: string;
6
+ status: DiffStatus;
7
+ /** undefined when the file doesn't exist on disk yet. */
8
+ onDiskContent?: string;
9
+ renderedContent: string;
10
+ onDiskHash?: string;
11
+ managedMarkerOk: boolean;
12
+ conflictClass: ConflictClass;
13
+ /**
14
+ * true exactly when this is the resolved STATE §3.4 ambiguity case: a
15
+ * merged/lossy target's single file (e.g. AGENTS.md) already exists on
16
+ * disk with foreign (non-Symbion-marked) content and is being modified
17
+ * by Symbion for the first time. Distinct from a regular `conflict` —
18
+ * this is treated as a normal new/update, but the UI should show a
19
+ * dedicated one-time notice (separate from the Codex-lossy "Tôi hiểu"
20
+ * acknowledgment) since the user's pre-existing file is about to gain a
21
+ * managed region for the first time.
22
+ */
23
+ firstPublishIntoForeignMergedFile: boolean;
24
+ }
25
+ export interface OnDiskFile {
26
+ relPath: string;
27
+ /** undefined => file does not exist. */
28
+ content?: string;
29
+ /**
30
+ * true for merged/lossy targets' single file (e.g. AGENTS.md) where the render
31
+ * pass has ALREADY folded any pre-existing foreign content into `renderedContent`
32
+ * (STATE §3.3 splice). An unmarked on-disk file at this relPath is therefore the
33
+ * expected first-publish case, not a name-collision conflict — treated as
34
+ * new/update rather than the defensive "foreign" conflict block.
35
+ */
36
+ isMergedTarget?: boolean;
37
+ }
38
+ /**
39
+ * computeDiff — pure: compare freshly rendered files against on-disk files, classify
40
+ * each into new|update|same|conflict. Files on disk with no corresponding rendered
41
+ * file and no marker ("foreign") are simply absent from this list (never touched).
42
+ */
43
+ export declare function computeDiff(rendered: RenderedFile[], onDisk: OnDiskFile[]): DiffFile[];
44
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/diff/diff.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B;;;;;;;;;OASG;IACH,iCAAiC,EAAE,OAAO,CAAC;CAC5C;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6CD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAmFtF"}
@@ -0,0 +1,124 @@
1
+ import { computeContentHash, parseMarker, parseRegionMarker, truncateHash } from "../render/marker.js";
2
+ import { classify } from "./conflict.js";
3
+ /** Strip the trailing per-file marker comment from content, returning the marker-less body. */
4
+ function stripFileMarker(content) {
5
+ return content.replace(/\n*<!--\s*managed-by:\s*symbion\s+id=[\s\S]*?-->\s*$/, "");
6
+ }
7
+ /** Strip the region fence (start+body+end) leaving foreign content + the bare region body for rehash. */
8
+ function stripRegionMarkerForHash(content) {
9
+ const startMatch = /<!--\s*managed-by:\s*symbion\s+region-start\s+v=\S+\s+hash=\S+\s*-->\n?/.exec(content);
10
+ const endMatch = /\n?<!--\s*managed-by:\s*symbion\s+region-end\s*-->/.exec(content);
11
+ if (!startMatch || !endMatch)
12
+ return null;
13
+ const bodyStart = startMatch.index + startMatch[0].length;
14
+ const bodyEnd = endMatch.index;
15
+ if (bodyEnd < bodyStart)
16
+ return null;
17
+ return { body: content.slice(bodyStart, bodyEnd) };
18
+ }
19
+ /**
20
+ * recomputeOnDiskHash — given on-disk content, find its marker (per-file or region)
21
+ * and recompute the truncated hash over the marker-stripped canonical body to compare
22
+ * against the hash stored in the marker.
23
+ */
24
+ function recomputeOnDiskHash(content) {
25
+ const fileMarker = parseMarker(content);
26
+ if (fileMarker) {
27
+ const stripped = stripFileMarker(content).replace(/\n+$/, "");
28
+ const recomputed = truncateHash(computeContentHash(stripped));
29
+ return { markerHash: fileMarker.hash, recomputedHash: recomputed };
30
+ }
31
+ const regionMarker = parseRegionMarker(content);
32
+ if (regionMarker) {
33
+ const stripped = stripRegionMarkerForHash(content);
34
+ if (stripped) {
35
+ const recomputed = truncateHash(computeContentHash(stripped.body));
36
+ return { markerHash: regionMarker.hash, recomputedHash: recomputed };
37
+ }
38
+ }
39
+ return {};
40
+ }
41
+ /**
42
+ * computeDiff — pure: compare freshly rendered files against on-disk files, classify
43
+ * each into new|update|same|conflict. Files on disk with no corresponding rendered
44
+ * file and no marker ("foreign") are simply absent from this list (never touched).
45
+ */
46
+ export function computeDiff(rendered, onDisk) {
47
+ const onDiskByPath = new Map(onDisk.map((f) => [f.relPath, f]));
48
+ return rendered.map((file) => {
49
+ const onDiskFile = onDiskByPath.get(file.relPath);
50
+ const existing = onDiskFile?.content;
51
+ if (existing === undefined) {
52
+ return {
53
+ relPath: file.relPath,
54
+ status: "new",
55
+ renderedContent: file.content,
56
+ managedMarkerOk: true,
57
+ conflictClass: "foreign", // semantically irrelevant for "new"; no on-disk file to classify
58
+ firstPublishIntoForeignMergedFile: false,
59
+ };
60
+ }
61
+ const { markerHash, recomputedHash } = recomputeOnDiskHash(existing);
62
+ const conflictClass = classify({ onDiskMarkerHash: markerHash, onDiskRecomputedHash: recomputedHash });
63
+ if (conflictClass === "foreign") {
64
+ if (onDiskFile?.isMergedTarget) {
65
+ // First publish of a merged target (e.g. AGENTS.md): render already spliced
66
+ // any pre-existing foreign content in, so this is an expected update, not a
67
+ // name-collision conflict.
68
+ const sameContent = existing === file.content;
69
+ return {
70
+ relPath: file.relPath,
71
+ status: sameContent ? "same" : "update",
72
+ onDiskContent: existing,
73
+ renderedContent: file.content,
74
+ managedMarkerOk: true,
75
+ conflictClass: "clean",
76
+ // STATE §3.4: first-ever Symbion modification of a pre-existing,
77
+ // non-Symbion-marked merged-target file (e.g. AGENTS.md). Only
78
+ // relevant (and only worth flagging) when the file actually
79
+ // changes — a "same" result here would mean the existing file
80
+ // byte-matches what Symbion would render, which doesn't happen
81
+ // on a true first publish since there's no marker yet.
82
+ firstPublishIntoForeignMergedFile: !sameContent,
83
+ };
84
+ }
85
+ // Should not normally happen (we only diff against rendered relPaths the daemon
86
+ // is about to manage), but guard defensively: never overwrite — treat as conflict
87
+ // so it surfaces rather than silently writing over an unmarked file.
88
+ return {
89
+ relPath: file.relPath,
90
+ status: "conflict",
91
+ onDiskContent: existing,
92
+ renderedContent: file.content,
93
+ managedMarkerOk: false,
94
+ conflictClass: "foreign",
95
+ firstPublishIntoForeignMergedFile: false,
96
+ };
97
+ }
98
+ if (conflictClass === "conflict") {
99
+ return {
100
+ relPath: file.relPath,
101
+ status: "conflict",
102
+ onDiskContent: existing,
103
+ renderedContent: file.content,
104
+ onDiskHash: markerHash,
105
+ managedMarkerOk: false,
106
+ conflictClass: "conflict",
107
+ firstPublishIntoForeignMergedFile: false,
108
+ };
109
+ }
110
+ // clean: safe to compare rendered vs on-disk for same/update
111
+ const sameContent = existing === file.content;
112
+ return {
113
+ relPath: file.relPath,
114
+ status: sameContent ? "same" : "update",
115
+ onDiskContent: existing,
116
+ renderedContent: file.content,
117
+ onDiskHash: markerHash,
118
+ managedMarkerOk: true,
119
+ conflictClass: "clean",
120
+ firstPublishIntoForeignMergedFile: false,
121
+ };
122
+ });
123
+ }
124
+ //# sourceMappingURL=diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/diff/diff.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kB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W,GAAG,QAAQ,KAAK,IAAI,CAAC,OAAO,CAAC;QAC9C,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;YACvC,aAAa,EAAE,QAAQ;YACvB,eAAe,EAAE,IAAI,CAAC,OAAO;YAC7B,UAAU,EAAE,UAAU;YACtB,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,OAAO;YACtB,iCAAiC,EAAE,KAAK;SACzC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * buildBodyGenerationPrompt — pure string assembly, no fs/net/Node imports.
3
+ * Builds the system+user prompt sent to a real LLM provider (apps/daemon's
4
+ * `generateBody` RPC handler) to draft "Nội dung" (the body/system-prompt
5
+ * field) for an agent or command artifact. See docs/loops/auto-generate-body-STATE.md
6
+ * §10.1 for the architecture rationale.
7
+ *
8
+ * This module must stay pure: it only assembles strings from its input and
9
+ * never touches the network or filesystem. The daemon is the only place the
10
+ * actual model-inference call is made.
11
+ */
12
+ export interface BodyPromptInput {
13
+ kind: "agent" | "command";
14
+ name: string;
15
+ description: string;
16
+ existingBody: string;
17
+ }
18
+ /**
19
+ * buildBodyGenerationPrompt — deterministic, pure. Same input (deep-equal) always
20
+ * produces the same `{ system, user }` output. Never throws for any well-formed
21
+ * BodyPromptInput, including the all-empty-except-kind degenerate case (EC-1).
22
+ */
23
+ export declare function buildBodyGenerationPrompt(input: BodyPromptInput): {
24
+ system: string;
25
+ user: string;
26
+ };
27
+ //# sourceMappingURL=bodyPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bodyPrompt.d.ts","sourceRoot":"","sources":["../../src/generate/bodyPrompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAYD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,eAAe,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAmClG"}