@blulotus/trellis 0.7.0 → 0.7.2

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 (343) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/index.js +2 -29
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/commands/init.d.ts +0 -22
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +5 -12
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/mem.d.ts +2 -2
  9. package/dist/commands/mem.d.ts.map +1 -1
  10. package/dist/commands/mem.js +7 -40
  11. package/dist/commands/mem.js.map +1 -1
  12. package/dist/commands/uninstall.d.ts +1 -1
  13. package/dist/commands/uninstall.d.ts.map +1 -1
  14. package/dist/commands/uninstall.js +4 -34
  15. package/dist/commands/uninstall.js.map +1 -1
  16. package/dist/commands/update.d.ts.map +1 -1
  17. package/dist/commands/update.js +2 -28
  18. package/dist/commands/update.js.map +1 -1
  19. package/dist/configurators/index.d.ts.map +1 -1
  20. package/dist/configurators/index.js +7 -73
  21. package/dist/configurators/index.js.map +1 -1
  22. package/dist/configurators/shared.d.ts +18 -70
  23. package/dist/configurators/shared.d.ts.map +1 -1
  24. package/dist/configurators/shared.js +20 -299
  25. package/dist/configurators/shared.js.map +1 -1
  26. package/dist/configurators/workflow.d.ts +0 -14
  27. package/dist/configurators/workflow.d.ts.map +1 -1
  28. package/dist/configurators/workflow.js +1 -37
  29. package/dist/configurators/workflow.js.map +1 -1
  30. package/dist/migrations/manifests/0.1.9.json +0 -12
  31. package/dist/migrations/manifests/0.2.14.json +0 -84
  32. package/dist/migrations/manifests/0.3.0-beta.0.json +0 -87
  33. package/dist/migrations/manifests/0.3.4.json +1 -13
  34. package/dist/migrations/manifests/0.4.0-beta.1.json +24 -176
  35. package/dist/migrations/manifests/0.5.0-beta.0.json +67 -1203
  36. package/dist/migrations/manifests/0.5.0-beta.15.json +0 -96
  37. package/dist/migrations/manifests/0.5.0-beta.5.json +0 -168
  38. package/dist/migrations/manifests/0.5.0-beta.9.json +0 -20
  39. package/dist/migrations/manifests/0.6.0-beta.23.json +0 -66
  40. package/dist/migrations/manifests/0.6.3.json +1 -16
  41. package/dist/migrations/manifests/0.6.6.json +1 -9
  42. package/dist/migrations/manifests/0.7.0.json +9 -0
  43. package/dist/migrations/manifests/0.7.1.json +9 -0
  44. package/dist/migrations/manifests/0.7.2.json +9 -0
  45. package/dist/migrations/manifests/0.8.0.json +9 -0
  46. package/dist/templates/codex/hooks/session-start.py +37 -13
  47. package/dist/templates/codex/hooks.json +5 -0
  48. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +5 -5
  49. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +0 -10
  50. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +1 -1
  51. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +1 -13
  52. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +2 -2
  53. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +9 -28
  54. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +5 -5
  55. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +1 -1
  56. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +1 -17
  57. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +4 -12
  58. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +6 -6
  59. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +5 -75
  60. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +0 -16
  61. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  62. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +2 -3
  63. package/dist/templates/common/commands/continue.md +24 -4
  64. package/dist/templates/common/commands/finish-work.md +19 -9
  65. package/dist/templates/common/commands/start.md +38 -29
  66. package/dist/templates/extract.d.ts +0 -10
  67. package/dist/templates/extract.d.ts.map +1 -1
  68. package/dist/templates/extract.js +0 -24
  69. package/dist/templates/extract.js.map +1 -1
  70. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +7 -9
  71. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +4 -8
  72. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +5 -5
  73. package/dist/templates/shared-hooks/index.d.ts +11 -43
  74. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  75. package/dist/templates/shared-hooks/index.js +9 -86
  76. package/dist/templates/shared-hooks/index.js.map +1 -1
  77. package/dist/templates/shared-hooks/inject-spec-context.py +1 -1
  78. package/dist/templates/shared-hooks/inject-subagent-context.py +23 -85
  79. package/dist/templates/shared-hooks/inject-workflow-state.py +56 -86
  80. package/dist/templates/shared-hooks/session-start.py +76 -98
  81. package/dist/templates/trellis/config.yaml +8 -8
  82. package/dist/templates/trellis/index.d.ts +1 -4
  83. package/dist/templates/trellis/index.d.ts.map +1 -1
  84. package/dist/templates/trellis/index.js +1 -5
  85. package/dist/templates/trellis/index.js.map +1 -1
  86. package/dist/templates/trellis/scripts/add_session.py +12 -11
  87. package/dist/templates/trellis/scripts/common/__init__.py +2 -0
  88. package/dist/templates/trellis/scripts/common/active_task.py +80 -152
  89. package/dist/templates/trellis/scripts/common/config.py +7 -7
  90. package/dist/templates/trellis/scripts/common/git_context.py +1 -1
  91. package/dist/templates/trellis/scripts/common/session_context.py +2 -2
  92. package/dist/templates/trellis/scripts/common/spec_inject.py +2 -2
  93. package/dist/templates/trellis/scripts/common/task_store.py +8 -28
  94. package/dist/templates/trellis/scripts/common/workflow_phase.py +4 -8
  95. package/dist/templates/trellis/scripts/get_context.py +2 -2
  96. package/dist/templates/trellis/scripts/init_developer.py +1 -1
  97. package/dist/templates/trellis/scripts/task.py +90 -57
  98. package/dist/templates/trellis/workflow.md +44 -66
  99. package/dist/types/ai-tools.d.ts +10 -10
  100. package/dist/types/ai-tools.d.ts.map +1 -1
  101. package/dist/types/ai-tools.js +3 -434
  102. package/dist/types/ai-tools.js.map +1 -1
  103. package/dist/utils/uninstall-scrubbers.d.ts +3 -18
  104. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  105. package/dist/utils/uninstall-scrubbers.js +24 -154
  106. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  107. package/package.json +2 -2
  108. package/dist/configurators/antigravity.d.ts +0 -7
  109. package/dist/configurators/antigravity.d.ts.map +0 -1
  110. package/dist/configurators/antigravity.js +0 -11
  111. package/dist/configurators/antigravity.js.map +0 -1
  112. package/dist/configurators/codebuddy.d.ts +0 -10
  113. package/dist/configurators/codebuddy.d.ts.map +0 -1
  114. package/dist/configurators/codebuddy.js +0 -24
  115. package/dist/configurators/codebuddy.js.map +0 -1
  116. package/dist/configurators/copilot.d.ts +0 -14
  117. package/dist/configurators/copilot.d.ts.map +0 -1
  118. package/dist/configurators/copilot.js +0 -46
  119. package/dist/configurators/copilot.js.map +0 -1
  120. package/dist/configurators/cursor.d.ts +0 -10
  121. package/dist/configurators/cursor.d.ts.map +0 -1
  122. package/dist/configurators/cursor.js +0 -23
  123. package/dist/configurators/cursor.js.map +0 -1
  124. package/dist/configurators/devin.d.ts +0 -8
  125. package/dist/configurators/devin.d.ts.map +0 -1
  126. package/dist/configurators/devin.js +0 -12
  127. package/dist/configurators/devin.js.map +0 -1
  128. package/dist/configurators/droid.d.ts +0 -10
  129. package/dist/configurators/droid.d.ts.map +0 -1
  130. package/dist/configurators/droid.js +0 -24
  131. package/dist/configurators/droid.js.map +0 -1
  132. package/dist/configurators/dsh.d.ts +0 -26
  133. package/dist/configurators/dsh.d.ts.map +0 -1
  134. package/dist/configurators/dsh.js +0 -76
  135. package/dist/configurators/dsh.js.map +0 -1
  136. package/dist/configurators/gemini.d.ts +0 -18
  137. package/dist/configurators/gemini.d.ts.map +0 -1
  138. package/dist/configurators/gemini.js +0 -39
  139. package/dist/configurators/gemini.js.map +0 -1
  140. package/dist/configurators/grok.d.ts +0 -17
  141. package/dist/configurators/grok.d.ts.map +0 -1
  142. package/dist/configurators/grok.js +0 -38
  143. package/dist/configurators/grok.js.map +0 -1
  144. package/dist/configurators/kilo.d.ts +0 -7
  145. package/dist/configurators/kilo.d.ts.map +0 -1
  146. package/dist/configurators/kilo.js +0 -11
  147. package/dist/configurators/kilo.js.map +0 -1
  148. package/dist/configurators/kimi.d.ts +0 -26
  149. package/dist/configurators/kimi.d.ts.map +0 -1
  150. package/dist/configurators/kimi.js +0 -74
  151. package/dist/configurators/kimi.js.map +0 -1
  152. package/dist/configurators/kiro.d.ts +0 -11
  153. package/dist/configurators/kiro.d.ts.map +0 -1
  154. package/dist/configurators/kiro.js +0 -30
  155. package/dist/configurators/kiro.js.map +0 -1
  156. package/dist/configurators/omp.d.ts +0 -6
  157. package/dist/configurators/omp.d.ts.map +0 -1
  158. package/dist/configurators/omp.js +0 -28
  159. package/dist/configurators/omp.js.map +0 -1
  160. package/dist/configurators/opencode.d.ts +0 -5
  161. package/dist/configurators/opencode.d.ts.map +0 -1
  162. package/dist/configurators/opencode.js +0 -84
  163. package/dist/configurators/opencode.js.map +0 -1
  164. package/dist/configurators/pi.d.ts +0 -5
  165. package/dist/configurators/pi.d.ts.map +0 -1
  166. package/dist/configurators/pi.js +0 -39
  167. package/dist/configurators/pi.js.map +0 -1
  168. package/dist/configurators/qoder.d.ts +0 -12
  169. package/dist/configurators/qoder.d.ts.map +0 -1
  170. package/dist/configurators/qoder.js +0 -30
  171. package/dist/configurators/qoder.js.map +0 -1
  172. package/dist/configurators/reasonix.d.ts +0 -17
  173. package/dist/configurators/reasonix.d.ts.map +0 -1
  174. package/dist/configurators/reasonix.js +0 -37
  175. package/dist/configurators/reasonix.js.map +0 -1
  176. package/dist/configurators/snow.d.ts +0 -25
  177. package/dist/configurators/snow.d.ts.map +0 -1
  178. package/dist/configurators/snow.js +0 -69
  179. package/dist/configurators/snow.js.map +0 -1
  180. package/dist/configurators/trae.d.ts +0 -16
  181. package/dist/configurators/trae.d.ts.map +0 -1
  182. package/dist/configurators/trae.js +0 -34
  183. package/dist/configurators/trae.js.map +0 -1
  184. package/dist/configurators/zcode.d.ts +0 -23
  185. package/dist/configurators/zcode.d.ts.map +0 -1
  186. package/dist/configurators/zcode.js +0 -63
  187. package/dist/configurators/zcode.js.map +0 -1
  188. package/dist/templates/codebuddy/agents/trellis-check.md +0 -115
  189. package/dist/templates/codebuddy/agents/trellis-implement.md +0 -115
  190. package/dist/templates/codebuddy/agents/trellis-research.md +0 -137
  191. package/dist/templates/codebuddy/index.d.ts +0 -15
  192. package/dist/templates/codebuddy/index.d.ts.map +0 -1
  193. package/dist/templates/codebuddy/index.js +0 -15
  194. package/dist/templates/codebuddy/index.js.map +0 -1
  195. package/dist/templates/codebuddy/settings.json +0 -69
  196. package/dist/templates/copilot/copilot-instructions.md +0 -11
  197. package/dist/templates/copilot/hooks/session-start.py +0 -564
  198. package/dist/templates/copilot/hooks.json +0 -19
  199. package/dist/templates/copilot/index.d.ts +0 -28
  200. package/dist/templates/copilot/index.d.ts.map +0 -1
  201. package/dist/templates/copilot/index.js +0 -61
  202. package/dist/templates/copilot/index.js.map +0 -1
  203. package/dist/templates/copilot/prompts/before-dev.prompt.md +0 -39
  204. package/dist/templates/copilot/prompts/brainstorm.prompt.md +0 -173
  205. package/dist/templates/copilot/prompts/break-loop.prompt.md +0 -129
  206. package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +0 -170
  207. package/dist/templates/copilot/prompts/check.prompt.md +0 -110
  208. package/dist/templates/copilot/prompts/create-command.prompt.md +0 -116
  209. package/dist/templates/copilot/prompts/finish-work.prompt.md +0 -99
  210. package/dist/templates/copilot/prompts/integrate-skill.prompt.md +0 -223
  211. package/dist/templates/copilot/prompts/onboard.prompt.md +0 -362
  212. package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
  213. package/dist/templates/copilot/prompts/record-session.prompt.md +0 -66
  214. package/dist/templates/copilot/prompts/start.prompt.md +0 -63
  215. package/dist/templates/copilot/prompts/update-spec.prompt.md +0 -358
  216. package/dist/templates/cursor/agents/trellis-check.md +0 -114
  217. package/dist/templates/cursor/agents/trellis-implement.md +0 -114
  218. package/dist/templates/cursor/agents/trellis-research.md +0 -136
  219. package/dist/templates/cursor/hooks.json +0 -24
  220. package/dist/templates/cursor/index.d.ts +0 -13
  221. package/dist/templates/cursor/index.d.ts.map +0 -1
  222. package/dist/templates/cursor/index.js +0 -13
  223. package/dist/templates/cursor/index.js.map +0 -1
  224. package/dist/templates/droid/droids/trellis-check.md +0 -107
  225. package/dist/templates/droid/droids/trellis-implement.md +0 -107
  226. package/dist/templates/droid/droids/trellis-research.md +0 -137
  227. package/dist/templates/droid/index.d.ts +0 -15
  228. package/dist/templates/droid/index.d.ts.map +0 -1
  229. package/dist/templates/droid/index.js +0 -15
  230. package/dist/templates/droid/index.js.map +0 -1
  231. package/dist/templates/droid/settings.json +0 -69
  232. package/dist/templates/dsh/DSH.md +0 -80
  233. package/dist/templates/dsh/agents/trellis-check.md +0 -99
  234. package/dist/templates/dsh/agents/trellis-implement.md +0 -106
  235. package/dist/templates/dsh/agents/trellis-research.md +0 -134
  236. package/dist/templates/dsh/index.d.ts +0 -22
  237. package/dist/templates/dsh/index.d.ts.map +0 -1
  238. package/dist/templates/dsh/index.js +0 -27
  239. package/dist/templates/dsh/index.js.map +0 -1
  240. package/dist/templates/gemini/agents/trellis-check.md +0 -107
  241. package/dist/templates/gemini/agents/trellis-implement.md +0 -107
  242. package/dist/templates/gemini/agents/trellis-research.md +0 -136
  243. package/dist/templates/gemini/index.d.ts +0 -13
  244. package/dist/templates/gemini/index.d.ts.map +0 -1
  245. package/dist/templates/gemini/index.js +0 -13
  246. package/dist/templates/gemini/index.js.map +0 -1
  247. package/dist/templates/gemini/settings.json +0 -40
  248. package/dist/templates/grok/agents/trellis-check.md +0 -106
  249. package/dist/templates/grok/agents/trellis-implement.md +0 -121
  250. package/dist/templates/grok/agents/trellis-research.md +0 -146
  251. package/dist/templates/grok/index.d.ts +0 -16
  252. package/dist/templates/grok/index.d.ts.map +0 -1
  253. package/dist/templates/grok/index.js +0 -19
  254. package/dist/templates/grok/index.js.map +0 -1
  255. package/dist/templates/kimi/agents/trellis-check.md +0 -104
  256. package/dist/templates/kimi/agents/trellis-implement.md +0 -120
  257. package/dist/templates/kimi/agents/trellis-research.md +0 -144
  258. package/dist/templates/kimi/index.d.ts +0 -20
  259. package/dist/templates/kimi/index.d.ts.map +0 -1
  260. package/dist/templates/kimi/index.js +0 -23
  261. package/dist/templates/kimi/index.js.map +0 -1
  262. package/dist/templates/kiro/agents/trellis-check.json +0 -26
  263. package/dist/templates/kiro/agents/trellis-implement.json +0 -26
  264. package/dist/templates/kiro/agents/trellis-research.json +0 -30
  265. package/dist/templates/kiro/agents/trellis.json +0 -34
  266. package/dist/templates/kiro/hooks/trellis-workflow-state.kiro.hook +0 -14
  267. package/dist/templates/kiro/index.d.ts +0 -32
  268. package/dist/templates/kiro/index.d.ts.map +0 -1
  269. package/dist/templates/kiro/index.js +0 -28
  270. package/dist/templates/kiro/index.js.map +0 -1
  271. package/dist/templates/omp/agents/trellis-check.md +0 -41
  272. package/dist/templates/omp/agents/trellis-implement.md +0 -55
  273. package/dist/templates/omp/agents/trellis-research.md +0 -30
  274. package/dist/templates/omp/extensions/trellis/index.ts.txt +0 -592
  275. package/dist/templates/omp/index.d.ts +0 -4
  276. package/dist/templates/omp/index.d.ts.map +0 -1
  277. package/dist/templates/omp/index.js +0 -9
  278. package/dist/templates/omp/index.js.map +0 -1
  279. package/dist/templates/opencode/agents/trellis-check.md +0 -122
  280. package/dist/templates/opencode/agents/trellis-implement.md +0 -123
  281. package/dist/templates/opencode/agents/trellis-research.md +0 -145
  282. package/dist/templates/opencode/lib/context-visibility.js +0 -86
  283. package/dist/templates/opencode/lib/session-utils.js +0 -526
  284. package/dist/templates/opencode/lib/trellis-context.js +0 -627
  285. package/dist/templates/opencode/package.json +0 -5
  286. package/dist/templates/opencode/plugins/inject-spec-context.js +0 -121
  287. package/dist/templates/opencode/plugins/inject-subagent-context.js +0 -569
  288. package/dist/templates/opencode/plugins/inject-workflow-state.js +0 -340
  289. package/dist/templates/opencode/plugins/session-start.js +0 -74
  290. package/dist/templates/pi/agents/trellis-check.md +0 -37
  291. package/dist/templates/pi/agents/trellis-implement.md +0 -52
  292. package/dist/templates/pi/agents/trellis-research.md +0 -25
  293. package/dist/templates/pi/extensions/trellis/index.ts.txt +0 -2033
  294. package/dist/templates/pi/index.d.ts +0 -5
  295. package/dist/templates/pi/index.d.ts.map +0 -1
  296. package/dist/templates/pi/index.js +0 -12
  297. package/dist/templates/pi/index.js.map +0 -1
  298. package/dist/templates/pi/settings.json +0 -9
  299. package/dist/templates/qoder/agents/trellis-check.md +0 -108
  300. package/dist/templates/qoder/agents/trellis-implement.md +0 -108
  301. package/dist/templates/qoder/agents/trellis-research.md +0 -137
  302. package/dist/templates/qoder/index.d.ts +0 -15
  303. package/dist/templates/qoder/index.d.ts.map +0 -1
  304. package/dist/templates/qoder/index.js +0 -15
  305. package/dist/templates/qoder/index.js.map +0 -1
  306. package/dist/templates/qoder/settings.json +0 -59
  307. package/dist/templates/reasonix/agents/trellis-check.md +0 -36
  308. package/dist/templates/reasonix/agents/trellis-implement.md +0 -51
  309. package/dist/templates/reasonix/index.d.ts +0 -13
  310. package/dist/templates/reasonix/index.d.ts.map +0 -1
  311. package/dist/templates/reasonix/index.js +0 -16
  312. package/dist/templates/reasonix/index.js.map +0 -1
  313. package/dist/templates/shared-hooks/inject-shell-session-context.py +0 -292
  314. package/dist/templates/snow/SNOW.md +0 -86
  315. package/dist/templates/snow/agents/trellis-check.md +0 -136
  316. package/dist/templates/snow/agents/trellis-implement.md +0 -158
  317. package/dist/templates/snow/agents/trellis-research.md +0 -114
  318. package/dist/templates/snow/hooks/beforeSubAgentStart.json +0 -15
  319. package/dist/templates/snow/hooks/onSessionStart.json +0 -15
  320. package/dist/templates/snow/hooks/onUserMessage.json +0 -15
  321. package/dist/templates/snow/hooks/write-trellis-context.py +0 -644
  322. package/dist/templates/snow/index.d.ts +0 -26
  323. package/dist/templates/snow/index.d.ts.map +0 -1
  324. package/dist/templates/snow/index.js +0 -36
  325. package/dist/templates/snow/index.js.map +0 -1
  326. package/dist/templates/trae/agents/trellis-check.md +0 -108
  327. package/dist/templates/trae/agents/trellis-implement.md +0 -108
  328. package/dist/templates/trae/agents/trellis-research.md +0 -137
  329. package/dist/templates/trae/hooks.json +0 -39
  330. package/dist/templates/trae/index.d.ts +0 -15
  331. package/dist/templates/trae/index.d.ts.map +0 -1
  332. package/dist/templates/trae/index.js +0 -15
  333. package/dist/templates/trae/index.js.map +0 -1
  334. package/dist/templates/trellis/gitattributes.txt +0 -9
  335. package/dist/templates/trellis/scripts/common/cli_adapter.py +0 -982
  336. package/dist/templates/zcode/agents/trellis-check.md +0 -110
  337. package/dist/templates/zcode/agents/trellis-implement.md +0 -116
  338. package/dist/templates/zcode/agents/trellis-research.md +0 -133
  339. package/dist/templates/zcode/config.json +0 -52
  340. package/dist/templates/zcode/index.d.ts +0 -25
  341. package/dist/templates/zcode/index.d.ts.map +0 -1
  342. package/dist/templates/zcode/index.js +0 -29
  343. package/dist/templates/zcode/index.js.map +0 -1
@@ -1,76 +0,0 @@
1
- /**
2
- * DeepSeek Harness (dsh) configurator.
3
- *
4
- * dsh is a class-2 pull-based platform (agentCapable via the `subagent` tool,
5
- * no shipped session-start hook, no project-level hooks/settings Trellis may
6
- * write). Three output paths:
7
- * - `.agents/skills/` — workflow + bundled skills, written via the NEUTRAL
8
- * resolver so the files stay byte-identical to Codex/Gemini/Pi/Kimi writes
9
- * into the same shared root (dsh discovers `.agents/skills/` natively).
10
- * - `.dsh/skills/` — dsh-private entry skills (trellis-start /
11
- * trellis-continue / trellis-finish-work) plus collision-free Trellis role
12
- * skills (trellis-agent-implement / trellis-agent-check /
13
- * trellis-agent-research) with the pull-based prelude on implement/check.
14
- * - `.dsh/DSH.md` — operator guide and a configDir-owned tracked file for
15
- * platform detection and uninstall scoping.
16
- *
17
- * dsh has no project-level hooks/settings file Trellis may write and no
18
- * declarative custom sub-agent definitions (dispatch goes through the
19
- * `subagent` tool), so no hooks, settings, or extension files are written and
20
- * the agent prompts ship as skills.
21
- */
22
- import { AI_TOOLS } from "../types/ai-tools.js";
23
- import { getAllAgents, getDshGuide } from "../templates/dsh/index.js";
24
- import { applyPullBasedPreludeMarkdown, collectSkillTemplates, replacePythonCommandLiterals, resolveAllAsSkills, resolveBundledSkills, resolveSkillsNeutral, } from "./shared.js";
25
- /**
26
- * Command templates that become user-invocable dsh skills
27
- * (loaded by their `trellis-<name>` skill names). The session-boundary
28
- * commands are delivered as SKILL.md files in DSH's private project root.
29
- */
30
- const DSH_COMMAND_SKILL_NAMES = new Set([
31
- "trellis-start",
32
- "trellis-continue",
33
- "trellis-finish-work",
34
- ]);
35
- /** Session-boundary commands resolved as dsh skills (dsh-private root, so
36
- * platform-specific `{{CLI_FLAG}}` / `{{CMD_REF}}` resolution is correct). */
37
- function resolveDshCommandSkills() {
38
- const ctx = AI_TOOLS.dsh.templateContext;
39
- return resolveAllAsSkills(ctx).filter((skill) => DSH_COMMAND_SKILL_NAMES.has(skill.name));
40
- }
41
- /** Trellis agent prompts as DSH-private skills. The `trellis-agent-*` names
42
- * intentionally do not collide with shared main-session workflow skills such
43
- * as `.agents/skills/trellis-check`. */
44
- function resolveDshAgentSkills() {
45
- return applyPullBasedPreludeMarkdown(getAllAgents()).map((agent) => {
46
- const name = agent.name.replace(/^trellis-/, "trellis-agent-");
47
- return {
48
- ...agent,
49
- name,
50
- content: replacePythonCommandLiterals(agent.content).replace(/^name:\s*trellis-[^\r\n]+$/m, `name: ${name}`),
51
- };
52
- });
53
- }
54
- /**
55
- * The DeepSeek Harness file set — written at init and diffed by `trellis update`.
56
- */
57
- export function collectDshTemplates() {
58
- const ctx = AI_TOOLS.dsh.templateContext;
59
- const files = new Map();
60
- // 1. Workflow + bundled skills → shared `.agents/skills/` (neutral
61
- // rendering, byte-identical to Codex/Gemini/Pi/Kimi writes).
62
- for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
63
- files.set(filePath, content);
64
- }
65
- // 2. Commands-as-skills + Trellis agent prompts → `.dsh/skills/`.
66
- for (const [filePath, content] of collectSkillTemplates(".dsh/skills", [
67
- ...resolveDshCommandSkills(),
68
- ...resolveDshAgentSkills(),
69
- ])) {
70
- files.set(filePath, content);
71
- }
72
- // 3. Operator guide → `.dsh/DSH.md`.
73
- files.set(".dsh/DSH.md", getDshGuide());
74
- return files;
75
- }
76
- //# sourceMappingURL=dsh.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dsh.js","sourceRoot":"","sources":["../../src/configurators/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,eAAe;IACf,kBAAkB;IAClB,qBAAqB;CACtB,CAAC,CAAC;AAEH;+EAC+E;AAC/E,SAAS,uBAAuB;IAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC;IACzC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAC9C,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CA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+0,0 @@
1
- /**
2
- * The Gemini CLI file set — written at init and diffed by `trellis update`.
3
- * Gemini is a pull-based class-2 platform.
4
- * - commands/trellis/ — start + finish-work as TOML slash commands
5
- * - .agents/skills/trellis-{name}/SKILL.md — auto-triggered shared skills
6
- * written to the cross-platform `.agents/skills/` workspace alias (Gemini
7
- * CLI 0.40+ reads it natively; previously `.gemini/skills/` was used,
8
- * which collided with Codex's identical write target and caused
9
- * duplicate-skill warnings — issue #224). The neutral resolver keeps content
10
- * byte-identical to Codex's writes for the same skill names.
11
- * - agents/{name}.md — sub-agent definitions, with pull-based prelude
12
- * - hooks/*.py — session-start only (no inject-subagent-context.py — Gemini
13
- * BeforeTool can fire but #18128 limits chain-of-thought visibility; sub-agents
14
- * Read jsonl/prd themselves)
15
- * - settings.json — hook configuration (SessionStart + BeforeAgent)
16
- */
17
- export declare function collectGeminiTemplates(): Map<string, string>;
18
- //# sourceMappingURL=gemini.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/configurators/gemini.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAyB5D"}
@@ -1,39 +0,0 @@
1
- import { AI_TOOLS } from "../types/ai-tools.js";
2
- import { resolvePlaceholders, resolveCommands, resolveSkillsNeutral, resolveBundledSkills, collectSkillTemplates, collectSharedHooks, applyPullBasedPreludeMarkdown, } from "./shared.js";
3
- import { getAllAgents, getSettingsTemplate, } from "../templates/gemini/index.js";
4
- /**
5
- * The Gemini CLI file set — written at init and diffed by `trellis update`.
6
- * Gemini is a pull-based class-2 platform.
7
- * - commands/trellis/ — start + finish-work as TOML slash commands
8
- * - .agents/skills/trellis-{name}/SKILL.md — auto-triggered shared skills
9
- * written to the cross-platform `.agents/skills/` workspace alias (Gemini
10
- * CLI 0.40+ reads it natively; previously `.gemini/skills/` was used,
11
- * which collided with Codex's identical write target and caused
12
- * duplicate-skill warnings — issue #224). The neutral resolver keeps content
13
- * byte-identical to Codex's writes for the same skill names.
14
- * - agents/{name}.md — sub-agent definitions, with pull-based prelude
15
- * - hooks/*.py — session-start only (no inject-subagent-context.py — Gemini
16
- * BeforeTool can fire but #18128 limits chain-of-thought visibility; sub-agents
17
- * Read jsonl/prd themselves)
18
- * - settings.json — hook configuration (SessionStart + BeforeAgent)
19
- */
20
- export function collectGeminiTemplates() {
21
- const ctx = AI_TOOLS.gemini.templateContext;
22
- const files = new Map();
23
- for (const cmd of resolveCommands(ctx)) {
24
- const toml = `description = "Trellis: ${cmd.name}"\n\nprompt = """\n${cmd.content}\n"""\n`;
25
- files.set(`.gemini/commands/trellis/${cmd.name}.toml`, toml);
26
- }
27
- for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
28
- files.set(filePath, content);
29
- }
30
- for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
31
- files.set(`.gemini/agents/${agent.name}.md`, agent.content);
32
- }
33
- for (const [k, v] of collectSharedHooks(".gemini/hooks", "gemini")) {
34
- files.set(k, v);
35
- }
36
- files.set(".gemini/settings.json", resolvePlaceholders(getSettingsTemplate()));
37
- return files;
38
- }
39
- //# sourceMappingURL=gemini.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/configurators/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,YAAY,EACZ,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC;IAC5C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,2BAA2B,GAAG,CAAC,IAAI,sBAAsB,GAAG,CAAC,OAAO,SAAS,CAAC;QAC3F,KAAK,CAAC,GAAG,CAAC,4BAA4B,GAAG,CAAC,IAAI,OAAO,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;IACD,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,gBAAgB,EAChB,oBAAoB,CAAC,GAAG,CAAC,EACzB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,6BAA6B,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC;QAClE,KAAK,CAAC,GAAG,CAAC,kBAAkB,KAAK,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,kBAAkB,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,CAAC;QACnE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,KAAK,CAAC,GAAG,CACP,uBAAuB,EACvB,mBAAmB,CAAC,mBAAmB,EAAE,CAAC,CAC3C,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Grok Build configurator.
3
- *
4
- * Grok Build (xAI) is a pull-based class-2 platform (agentCapable, no hooks).
5
- * Three output paths:
6
- * - `.grok/skills/` — workflow and bundled skills
7
- * - `.grok/commands/trellis-*.md` — flat slash commands (Grok layout)
8
- * - `.grok/agents/` — sub-agent definitions with pull-based prelude
9
- *
10
- * Do not install SessionStart/UserPromptSubmit injection hooks here until Grok
11
- * consumes hook stdout additionalContext (verified absent on 0.2.x).
12
- */
13
- /**
14
- * The Grok Build file set — written at init and diffed by `trellis update`.
15
- */
16
- export declare function collectGrokTemplates(): Map<string, string>;
17
- //# sourceMappingURL=grok.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grok.d.ts","sourceRoot":"","sources":["../../src/configurators/grok.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA0B1D"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Grok Build configurator.
3
- *
4
- * Grok Build (xAI) is a pull-based class-2 platform (agentCapable, no hooks).
5
- * Three output paths:
6
- * - `.grok/skills/` — workflow and bundled skills
7
- * - `.grok/commands/trellis-*.md` — flat slash commands (Grok layout)
8
- * - `.grok/agents/` — sub-agent definitions with pull-based prelude
9
- *
10
- * Do not install SessionStart/UserPromptSubmit injection hooks here until Grok
11
- * consumes hook stdout additionalContext (verified absent on 0.2.x).
12
- */
13
- import { AI_TOOLS } from "../types/ai-tools.js";
14
- import { getAllAgents } from "../templates/grok/index.js";
15
- import { collectSkillTemplates, resolveBundledSkills, resolveCommands, resolveSkills, applyPullBasedPreludeMarkdown, } from "./shared.js";
16
- /**
17
- * The Grok Build file set — written at init and diffed by `trellis update`.
18
- */
19
- export function collectGrokTemplates() {
20
- const config = AI_TOOLS.grok;
21
- const ctx = config.templateContext;
22
- const files = new Map();
23
- // 1. Workflow + bundled skills → .grok/skills/
24
- for (const [filePath, content] of collectSkillTemplates(".grok/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
25
- files.set(filePath, content);
26
- }
27
- // 2. Commands → flat .grok/commands/trellis-<name>.md
28
- // Grok discovers slash commands as flat *.md under commands/ (stem = name).
29
- for (const cmd of resolveCommands(ctx)) {
30
- files.set(`.grok/commands/trellis-${cmd.name}.md`, cmd.content);
31
- }
32
- // 3. Sub-agents → .grok/agents/ (with pull-based prelude on implement/check)
33
- for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
34
- files.set(`.grok/agents/${agent.name}.md`, agent.content);
35
- }
36
- return files;
37
- }
38
- //# sourceMappingURL=grok.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grok.js","sourceRoot":"","sources":["../../src/configurators/grok.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,+CAA+C;IAC/C,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,cAAc,EACd,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,sDAAsD;IACtD,+EAA+E;IAC/E,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,KAAK,CAAC,GAAG,CAAC,0BAA0B,GAAG,CAAC,IAAI,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,6EAA6E;IAC7E,KAAK,MAAM,KAAK,IAAI,6BAA6B,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC;QAClE,KAAK,CAAC,GAAG,CAAC,gBAAgB,KAAK,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * The Kilo CLI file set — written at init and diffed by `trellis update`.
3
- * - workflows/ — start + finish-work as slash commands
4
- * - skills/trellis-{name}/SKILL.md — auto-triggered skills from `common/skills/`
5
- */
6
- export declare function collectKiloTemplates(): Map<string, string>;
7
- //# sourceMappingURL=kilo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kilo.d.ts","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1D"}
@@ -1,11 +0,0 @@
1
- import { AI_TOOLS } from "../types/ai-tools.js";
2
- import { collectBothTemplates } from "./shared.js";
3
- /**
4
- * The Kilo CLI file set — written at init and diffed by `trellis update`.
5
- * - workflows/ — start + finish-work as slash commands
6
- * - skills/trellis-{name}/SKILL.md — auto-triggered skills from `common/skills/`
7
- */
8
- export function collectKiloTemplates() {
9
- return collectBothTemplates(AI_TOOLS.kilo.templateContext, (n) => `.kilocode/workflows/${n}.md`, ".kilocode/skills");
10
- }
11
- //# sourceMappingURL=kilo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kilo.js","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,oBAAoB,CACzB,QAAQ,CAAC,IAAI,CAAC,eAAe,EAC7B,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EACpC,kBAAkB,CACnB,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Kimi Code configurator.
3
- *
4
- * Kimi Code is a class-2 pull-based platform (agentCapable, no hooks, no
5
- * project-level settings/extensions). Two output paths:
6
- * - `.agents/skills/` — workflow + bundled skills, written via the NEUTRAL
7
- * resolver so the files stay byte-identical to Codex/Gemini/Pi writes into
8
- * the same shared root (Kimi discovers `.agents/skills/` natively).
9
- * - `.kimi-code/skills/` — Kimi-private entry points: the user-invocable
10
- * commands as skills (`/skill:trellis-start`, `/skill:trellis-continue`,
11
- * `/skill:trellis-finish-work`) plus the Trellis agent prompts
12
- * (trellis-implement / trellis-check / trellis-research) with the
13
- * pull-based prelude on implement/check.
14
- * - `.kimi-code/agents/` — the same Trellis agent prompts as project-level
15
- * custom sub-agent definitions (Claude Code-compatible frontmatter), so
16
- * the main session can dispatch `trellis-<name>` sub-agents directly.
17
- *
18
- * Trellis does not generate project-local Kimi settings or hooks.
19
- * Project-local Kimi settings go in `.kimi-code/local.toml`; hooks are
20
- * configured in `$KIMI_CODE_HOME/config.toml`.
21
- */
22
- /**
23
- * The Kimi Code file set — written at init and diffed by `trellis update`.
24
- */
25
- export declare function collectKimiTemplates(): Map<string, string>;
26
- //# sourceMappingURL=kimi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kimi.d.ts","sourceRoot":"","sources":["../../src/configurators/kimi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAuCH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAgC1D"}
@@ -1,74 +0,0 @@
1
- /**
2
- * Kimi Code configurator.
3
- *
4
- * Kimi Code is a class-2 pull-based platform (agentCapable, no hooks, no
5
- * project-level settings/extensions). Two output paths:
6
- * - `.agents/skills/` — workflow + bundled skills, written via the NEUTRAL
7
- * resolver so the files stay byte-identical to Codex/Gemini/Pi writes into
8
- * the same shared root (Kimi discovers `.agents/skills/` natively).
9
- * - `.kimi-code/skills/` — Kimi-private entry points: the user-invocable
10
- * commands as skills (`/skill:trellis-start`, `/skill:trellis-continue`,
11
- * `/skill:trellis-finish-work`) plus the Trellis agent prompts
12
- * (trellis-implement / trellis-check / trellis-research) with the
13
- * pull-based prelude on implement/check.
14
- * - `.kimi-code/agents/` — the same Trellis agent prompts as project-level
15
- * custom sub-agent definitions (Claude Code-compatible frontmatter), so
16
- * the main session can dispatch `trellis-<name>` sub-agents directly.
17
- *
18
- * Trellis does not generate project-local Kimi settings or hooks.
19
- * Project-local Kimi settings go in `.kimi-code/local.toml`; hooks are
20
- * configured in `$KIMI_CODE_HOME/config.toml`.
21
- */
22
- import { AI_TOOLS } from "../types/ai-tools.js";
23
- import { getAllAgents } from "../templates/kimi/index.js";
24
- import { applyPullBasedPreludeMarkdown, collectSkillTemplates, resolveAllAsSkills, resolveBundledSkills, resolveSkillsNeutral, } from "./shared.js";
25
- /**
26
- * Command templates that become user-invocable Kimi skills
27
- * (`/skill:trellis-<name>`). Kimi has no slash-command mechanism besides
28
- * skills, so the session-boundary commands are delivered as SKILL.md files.
29
- */
30
- const KIMI_COMMAND_SKILL_NAMES = new Set([
31
- "trellis-start",
32
- "trellis-continue",
33
- "trellis-finish-work",
34
- ]);
35
- /** Session-boundary commands resolved as Kimi skills (Kimi-private root, so
36
- * platform-specific `{{CLI_FLAG}}` / `{{CMD_REF}}` resolution is correct). */
37
- function resolveKimiCommandSkills() {
38
- const ctx = AI_TOOLS.kimi.templateContext;
39
- return resolveAllAsSkills(ctx).filter((skill) => KIMI_COMMAND_SKILL_NAMES.has(skill.name));
40
- }
41
- /** Trellis agent prompts as Kimi skills (and `.kimi-code/agents/` sub-agent
42
- * definitions), with the pull-based prelude on implement/check. */
43
- function resolveKimiAgentSkills() {
44
- return applyPullBasedPreludeMarkdown(getAllAgents());
45
- }
46
- /**
47
- * The Kimi Code file set — written at init and diffed by `trellis update`.
48
- */
49
- export function collectKimiTemplates() {
50
- const ctx = AI_TOOLS.kimi.templateContext;
51
- const files = new Map();
52
- // 1. Workflow + bundled skills → shared `.agents/skills/` (neutral
53
- // rendering, byte-identical to Codex/Gemini/Pi writes).
54
- for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
55
- files.set(filePath, content);
56
- }
57
- // 2. Commands-as-skills + Trellis agent prompts → `.kimi-code/skills/`.
58
- const agentPrompts = resolveKimiAgentSkills();
59
- for (const [filePath, content] of collectSkillTemplates(".kimi-code/skills", [
60
- ...resolveKimiCommandSkills(),
61
- ...agentPrompts,
62
- ])) {
63
- files.set(filePath, content);
64
- }
65
- // 3. Custom sub-agent definitions → `.kimi-code/agents/`. Kimi Code
66
- // discovers project-level agents there (Claude Code-compatible
67
- // frontmatter); content mirrors the skill copies, pull-based prelude
68
- // included, so dispatching `trellis-<name>` directly behaves the same.
69
- for (const agent of agentPrompts) {
70
- files.set(`.kimi-code/agents/${agent.name}.md`, agent.content);
71
- }
72
- return files;
73
- }
74
- //# sourceMappingURL=kimi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kimi.js","sourceRoot":"","sources":["../../src/configurators/kimi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,eAAe;IACf,kBAAkB;IAClB,qBAAqB;CACtB,CAAC,CAAC;AAEH;+EAC+E;AAC/E,SAAS,wBAAwB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ACjE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * The Kiro Code file set — written at init and diffed by `trellis update`.
3
- * Kiro's configDir is ".kiro/skills"; agents and hooks go under ".kiro/".
4
- * - skills/trellis-{name}/SKILL.md — all templates as auto-triggered skills
5
- * - agents/{name}.json — main `trellis` agent (per-turn workflow-state +
6
- * session-start hooks) plus 3 sub-agents (agentSpawn → inject-subagent-context)
7
- * - hooks/*.py — shared hook scripts (referenced by agent JSON / .kiro.hook)
8
- * - hooks/*.kiro.hook — IDE hook definitions (promptSubmit → inject-workflow-state)
9
- */
10
- export declare function collectKiroTemplates(): Map<string, string>;
11
- //# sourceMappingURL=kiro.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kiro.d.ts","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAuB1D"}
@@ -1,30 +0,0 @@
1
- import { AI_TOOLS } from "../types/ai-tools.js";
2
- import { resolvePlaceholders, resolveAllAsSkills, resolveBundledSkills, collectSkillTemplates, collectSharedHooks, } from "./shared.js";
3
- import { getAllAgents, getIdeHooks } from "../templates/kiro/index.js";
4
- /**
5
- * The Kiro Code file set — written at init and diffed by `trellis update`.
6
- * Kiro's configDir is ".kiro/skills"; agents and hooks go under ".kiro/".
7
- * - skills/trellis-{name}/SKILL.md — all templates as auto-triggered skills
8
- * - agents/{name}.json — main `trellis` agent (per-turn workflow-state +
9
- * session-start hooks) plus 3 sub-agents (agentSpawn → inject-subagent-context)
10
- * - hooks/*.py — shared hook scripts (referenced by agent JSON / .kiro.hook)
11
- * - hooks/*.kiro.hook — IDE hook definitions (promptSubmit → inject-workflow-state)
12
- */
13
- export function collectKiroTemplates() {
14
- const files = new Map();
15
- const ctx = AI_TOOLS.kiro.templateContext;
16
- for (const [filePath, content] of collectSkillTemplates(".kiro/skills", resolveAllAsSkills(ctx), resolveBundledSkills(ctx))) {
17
- files.set(filePath, content);
18
- }
19
- for (const agent of getAllAgents()) {
20
- files.set(`.kiro/agents/${agent.name}.json`, resolvePlaceholders(agent.content));
21
- }
22
- for (const [k, v] of collectSharedHooks(".kiro/hooks", "kiro")) {
23
- files.set(k, v);
24
- }
25
- for (const hook of getIdeHooks()) {
26
- files.set(`.kiro/hooks/${hook.name}`, resolvePlaceholders(hook.content));
27
- }
28
- return files;
29
- }
30
- //# sourceMappingURL=kiro.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;IAC1C,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,cAAc,EACd,kBAAkB,CAAC,GAAG,CAAC,EACvB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,CACP,gBAAgB,KAAK,CAAC,IAAI,OAAO,EACjC,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CACnC,CAAC;IACJ,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,kBAAkB,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE,CAAC;QAC/D,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,EAAE,CAAC;QACjC,KAAK,CAAC,GAAG,CAAC,eAAe,IAAI,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * The OMP file set — written at init and diffed by `trellis update`.
3
- * OMP has no settings.json — the native provider auto-discovers all capabilities.
4
- */
5
- export declare function collectOmpTemplates(): Map<string, string>;
6
- //# sourceMappingURL=omp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"omp.d.ts","sourceRoot":"","sources":["../../src/configurators/omp.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCzD"}
@@ -1,28 +0,0 @@
1
- import { AI_TOOLS } from "../types/ai-tools.js";
2
- import { collectSkillTemplates, replacePythonCommandLiterals, resolveCommands, resolveBundledSkills, resolveSkills, wrapWithOmpFrontmatter, } from "./shared.js";
3
- import { getAllAgents, getExtensionTemplate } from "../templates/omp/index.js";
4
- /**
5
- * The OMP file set — written at init and diffed by `trellis update`.
6
- * OMP has no settings.json — the native provider auto-discovers all capabilities.
7
- */
8
- export function collectOmpTemplates() {
9
- const config = AI_TOOLS.omp;
10
- const ctx = config.templateContext;
11
- const files = new Map();
12
- // Commands → .omp/commands/
13
- for (const command of resolveCommands(ctx)) {
14
- files.set(`.omp/commands/trellis-${command.name}.md`, wrapWithOmpFrontmatter(command.name, command.content));
15
- }
16
- // Skills → .omp/skills/
17
- for (const [filePath, content] of collectSkillTemplates(".omp/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
18
- files.set(filePath, content);
19
- }
20
- // Agents (class-1: no pull-based prelude)
21
- for (const agent of getAllAgents()) {
22
- files.set(`.omp/agents/${agent.name}.md`, agent.content);
23
- }
24
- // Extension
25
- files.set(".omp/extensions/trellis/index.ts", replacePythonCommandLiterals(getExtensionTemplate()));
26
- return files;
27
- }
28
- //# sourceMappingURL=omp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"omp.js","sourceRoot":"","sources":["../../src/configurators/omp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE/E;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC;IAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,4BAA4B;IAC5B,KAAK,MAAM,OAAO,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3C,KAAK,CAAC,GAAG,CACP,yBAAyB,OAAO,CAAC,IAAI,KAAK,EAC1C,sBAAsB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CACtD,CAAC;IACJ,CAAC;IAED,wBAAwB;IACxB,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,aAAa,EACb,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,0CAA0C;IAC1C,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,YAAY;IACZ,KAAK,CAAC,GAAG,CACP,kCAAkC,EAClC,4BAA4B,CAAC,oBAAoB,EAAE,CAAC,CACrD,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * The opencode file set — written at init and diffed by `trellis update`.
3
- */
4
- export declare function collectOpenCodeTemplates(): Map<string, string>;
5
- //# sourceMappingURL=opencode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AA8EA;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAoB9D"}
@@ -1,84 +0,0 @@
1
- import { readFileSync, readdirSync, statSync } from "node:fs";
2
- import path from "node:path";
3
- import { AI_TOOLS } from "../types/ai-tools.js";
4
- import { getOpenCodeTemplatePath } from "../templates/extract.js";
5
- import { getSharedHookScriptsForPlatform } from "../templates/shared-hooks/index.js";
6
- import { toPosix } from "../utils/posix.js";
7
- import { collectSkillTemplates, replacePythonCommandLiterals, resolveBundledSkills, resolveCommands, resolveSkills, } from "./shared.js";
8
- /**
9
- * Files under packages/cli/src/templates/opencode/ that are NOT user-facing
10
- * assets (build artifacts, runtime caches, etc.). The template dir has a
11
- * real package.json that declares the @opencode-ai/plugin dep — that one
12
- * IS user-facing and must be shipped.
13
- */
14
- const EXCLUDE_PATTERNS = [
15
- ".d.ts",
16
- ".d.ts.map",
17
- ".js.map",
18
- "__pycache__",
19
- "node_modules",
20
- "bun.lock",
21
- ".gitignore",
22
- ];
23
- function shouldExclude(filename) {
24
- for (const pattern of EXCLUDE_PATTERNS) {
25
- if (filename.endsWith(pattern) || filename === pattern) {
26
- return true;
27
- }
28
- }
29
- return false;
30
- }
31
- /**
32
- * Walk the opencode template directory and produce a `Map<relPath, content>`
33
- * rooted at `.opencode/`. Shared by both `configureOpenCode` (init-time write)
34
- * and `collectOpenCodeTemplates` (update-time hash tracking) so the two paths
35
- * always agree on the exact file set. `commands/` is handled separately (sourced
36
- * from common template context, not from this directory tree).
37
- */
38
- function walkOpenCodeTemplateDir() {
39
- const files = new Map();
40
- const sourcePath = getOpenCodeTemplatePath();
41
- function walk(relDir) {
42
- const absDir = path.join(sourcePath, relDir);
43
- for (const entry of readdirSync(absDir)) {
44
- if (shouldExclude(entry))
45
- continue;
46
- const absEntry = path.join(absDir, entry);
47
- const relEntry = relDir ? path.join(relDir, entry) : entry;
48
- const stat = statSync(absEntry);
49
- if (stat.isDirectory()) {
50
- // Skip commands/ — that's sourced from common/ templates, not the
51
- // opencode/ dir. Including both paths would double-write.
52
- if (relEntry === "commands")
53
- continue;
54
- walk(relEntry);
55
- }
56
- else {
57
- const content = readFileSync(absEntry, "utf-8");
58
- // Map keys are logical paths used as cross-platform hash keys / lookup
59
- // keys downstream. Always POSIX, regardless of host OS.
60
- files.set(toPosix(path.join(".opencode", relEntry)), replacePythonCommandLiterals(content));
61
- }
62
- }
63
- }
64
- walk("");
65
- return files;
66
- }
67
- /**
68
- * The opencode file set — written at init and diffed by `trellis update`.
69
- */
70
- export function collectOpenCodeTemplates() {
71
- const files = walkOpenCodeTemplateDir();
72
- for (const hook of getSharedHookScriptsForPlatform("opencode")) {
73
- files.set(`.opencode/hooks/${hook.name}`, replacePythonCommandLiterals(hook.content));
74
- }
75
- const ctx = AI_TOOLS.opencode.templateContext;
76
- for (const cmd of resolveCommands(ctx)) {
77
- files.set(`.opencode/commands/trellis/${cmd.name}.md`, cmd.content);
78
- }
79
- for (const [filePath, content] of collectSkillTemplates(".opencode/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
80
- files.set(filePath, content);
81
- }
82
- return files;
83
- }
84
- //# sourceMappingURL=opencode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,eAAe,EACf,aAAa,GACd,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG;IACvB,OAAO;IACP,WAAW;IACX,SAAS;IACT,aAAa;IACb,cAAc;IACd,UAAU;IACV,YAAY;CACb,CAAC;AAEF,SAAS,aAAa,CAAC,QAAgB;IACrC,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;QACvC,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YACvD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,SAAS,uBAAuB;IAC9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,MAAM,UAAU,GAAG,uBAAuB,EAAE,CAAC;IAE7C,SAAS,IAAI,CAAC,MAAc;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC7C,KAAK,MAAM,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Ae,CAAC;IAC9C,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,KAAK,CAAC,GAAG,CAAC,8BAA8B,GAAG,CAAC,IAAI,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,kBAAkB,EAClB,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * The Pi file set — written at init and diffed by `trellis update`.
3
- */
4
- export declare function collectPiTemplates(): Map<string, string>;
5
- //# sourceMappingURL=pi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pi.d.ts","sourceRoot":"","sources":["../../src/configurators/pi.ts"],"names":[],"mappings":"AA6BA;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAiCxD"}
@@ -1,39 +0,0 @@
1
- import { AI_TOOLS } from "../types/ai-tools.js";
2
- import { applyPullBasedPreludeMarkdown, collectSkillTemplates, resolveCommands, resolveBundledSkills, resolvePlaceholders, resolveSkillsNeutral, } from "./shared.js";
3
- import { getAllAgents, getExtensionTemplate, getSettingsTemplate, } from "../templates/pi/index.js";
4
- function resolvePiCommands() {
5
- const ctx = AI_TOOLS.pi.templateContext;
6
- const commands = resolveCommands(ctx);
7
- if (commands.some((command) => command.name === "start"))
8
- return commands;
9
- // Pi has extension hooks, so the shared command resolver filters `start`.
10
- // Keep a manual fallback because Pi's `session_start` event cannot mutate
11
- // model context; the strong startup injection happens later at agent start.
12
- const start = resolveCommands({ ...ctx, hasHooks: false }).find((command) => command.name === "start");
13
- return start ? [start, ...commands] : commands;
14
- }
15
- /**
16
- * The Pi file set — written at init and diffed by `trellis update`.
17
- */
18
- export function collectPiTemplates() {
19
- const files = new Map();
20
- const ctx = AI_TOOLS.pi.templateContext;
21
- for (const command of resolvePiCommands()) {
22
- files.set(`.pi/prompts/trellis-${command.name}.md`, command.content);
23
- }
24
- // Shared skills go to `.agents/skills/` (Pi discovers this cross-platform
25
- // workspace alias natively). Neutral resolver keeps content byte-identical
26
- // to Codex's/Gemini's writes for the same skill names, avoiding the
27
- // duplicate/conflicting-skill installs reported in #447.
28
- for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
29
- files.set(filePath, content);
30
- }
31
- for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
32
- files.set(`.pi/agents/${agent.name}.md`, agent.content);
33
- }
34
- files.set(".pi/extensions/trellis/index.ts", getExtensionTemplate());
35
- const settings = getSettingsTemplate();
36
- files.set(`.pi/${settings.targetPath}`, resolvePlaceholders(settings.content));
37
- return files;
38
- }
39
- //# sourceMappingURL=pi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pi.js","sourceRoot":"","sources":["../../src/configurators/pi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,SAAS,iBAAiB;IACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAC,eAAe,CAAC;IACxC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC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