infra-kit 0.1.113 → 0.1.115

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 (218) hide show
  1. package/.eslintcache +1 -1
  2. package/.omc/state/agent-replay-0d1515ce-4ebe-4ce8-a865-2897f68de168.jsonl +1 -0
  3. package/.omc/state/agent-replay-1fcfe0ec-7567-41c3-9bfd-501e99e86819.jsonl +19 -0
  4. package/.omc/state/agent-replay-38382db5-3088-4b5a-aff7-2561a60827c7.jsonl +17 -0
  5. package/.omc/state/agent-replay-50c36be9-a3a2-42b9-9c85-5a06d3e22f6a.jsonl +5 -0
  6. package/.omc/state/agent-replay-8198b3e5-fad6-4ee0-9c59-ef773ad89af4.jsonl +1 -0
  7. package/.omc/state/agent-replay-8cd7652a-b8b5-49cf-9b1f-bee8e5972458.jsonl +3 -0
  8. package/.omc/state/agent-replay-9bea518f-a9ee-4d14-bb53-a936ebaf647c.jsonl +7 -0
  9. package/.omc/state/agent-replay-b52d89fb-0e24-4901-bc66-27e3c1697126.jsonl +2 -0
  10. package/.omc/state/agent-replay-f581a1ae-0ee4-48a3-96f3-ce31a0633bb0.jsonl +1 -0
  11. package/.omc/state/agent-replay-f99d8dad-81d1-4987-8183-62edf0843d0c.jsonl +2 -0
  12. package/.omc/state/agent-replay-fe1057b4-9a25-4e8e-8c3f-3e11652ee697.jsonl +5 -0
  13. package/.omc/state/idle-notif-cooldown.json +1 -1
  14. package/.omc/state/sessions/0d1515ce-4ebe-4ce8-a865-2897f68de168/pre-tool-advisory-throttle.json +10 -0
  15. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/last-tool-error-state.json +7 -0
  16. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/mission-state.json +109 -0
  17. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/pre-tool-advisory-throttle.json +42 -0
  18. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/ralph-state.json +13 -0
  19. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/skill-active-state.json +15 -0
  20. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/subagent-tracking-state.json +62 -0
  21. package/.omc/state/sessions/1fcfe0ec-7567-41c3-9bfd-501e99e86819/ultrawork-state.json +11 -0
  22. package/.omc/state/sessions/23d0ff82-17e5-428b-8743-38f7979bb6f3/last-tool-error-state.json +7 -0
  23. package/.omc/state/sessions/23d0ff82-17e5-428b-8743-38f7979bb6f3/pre-tool-advisory-throttle.json +18 -0
  24. package/.omc/state/sessions/38382db5-3088-4b5a-aff7-2561a60827c7/last-tool-error-state.json +7 -0
  25. package/.omc/state/sessions/38382db5-3088-4b5a-aff7-2561a60827c7/mission-state.json +145 -0
  26. package/.omc/state/sessions/38382db5-3088-4b5a-aff7-2561a60827c7/pre-tool-advisory-throttle.json +38 -0
  27. package/.omc/state/sessions/38382db5-3088-4b5a-aff7-2561a60827c7/ralplan-state.json +11 -0
  28. package/.omc/state/sessions/38382db5-3088-4b5a-aff7-2561a60827c7/subagent-tracking-state.json +98 -0
  29. package/.omc/state/sessions/41336850-028c-476b-be1a-2164e1e46cac/last-tool-error-state.json +7 -0
  30. package/.omc/state/sessions/41336850-028c-476b-be1a-2164e1e46cac/pre-tool-advisory-throttle.json +18 -0
  31. package/.omc/state/sessions/50c36be9-a3a2-42b9-9c85-5a06d3e22f6a/mission-state.json +61 -0
  32. package/.omc/state/sessions/50c36be9-a3a2-42b9-9c85-5a06d3e22f6a/pre-tool-advisory-throttle.json +22 -0
  33. package/.omc/state/sessions/50c36be9-a3a2-42b9-9c85-5a06d3e22f6a/skill-active-state.json +15 -0
  34. package/.omc/state/sessions/50c36be9-a3a2-42b9-9c85-5a06d3e22f6a/subagent-tracking-state.json +26 -0
  35. package/.omc/state/sessions/560ea519-574a-4713-b134-5bf6cfaf3c33/pre-tool-advisory-throttle.json +18 -0
  36. package/.omc/state/sessions/8198b3e5-fad6-4ee0-9c59-ef773ad89af4/pre-tool-advisory-throttle.json +14 -0
  37. package/.omc/state/sessions/8198b3e5-fad6-4ee0-9c59-ef773ad89af4/subagent-tracking-state.json +17 -0
  38. package/.omc/state/sessions/8cd7652a-b8b5-49cf-9b1f-bee8e5972458/pre-tool-advisory-throttle.json +18 -0
  39. package/.omc/state/sessions/8cd7652a-b8b5-49cf-9b1f-bee8e5972458/ralplan-state.json +11 -0
  40. package/.omc/state/sessions/8cd7652a-b8b5-49cf-9b1f-bee8e5972458/subagent-tracking-state.json +35 -0
  41. package/.omc/state/sessions/9bea518f-a9ee-4d14-bb53-a936ebaf647c/last-tool-error-state.json +7 -0
  42. package/.omc/state/sessions/9bea518f-a9ee-4d14-bb53-a936ebaf647c/mission-state.json +79 -0
  43. package/.omc/state/sessions/9bea518f-a9ee-4d14-bb53-a936ebaf647c/pre-tool-advisory-throttle.json +22 -0
  44. package/.omc/state/sessions/9bea518f-a9ee-4d14-bb53-a936ebaf647c/progress.txt +7 -0
  45. package/.omc/state/sessions/9bea518f-a9ee-4d14-bb53-a936ebaf647c/skill-active-state.json +15 -0
  46. package/.omc/state/sessions/9bea518f-a9ee-4d14-bb53-a936ebaf647c/subagent-tracking-state.json +26 -0
  47. package/.omc/state/sessions/b52d89fb-0e24-4901-bc66-27e3c1697126/pre-tool-advisory-throttle.json +14 -0
  48. package/.omc/state/sessions/b52d89fb-0e24-4901-bc66-27e3c1697126/subagent-tracking-state.json +17 -0
  49. package/.omc/state/sessions/c513ef38-cc3e-4a29-9c4c-1e0137245dd5/pre-tool-advisory-throttle.json +18 -0
  50. package/.omc/state/sessions/ed3e2cfb-a666-4bb1-bcc1-569d5d0b837a/pre-tool-advisory-throttle.json +18 -0
  51. package/.omc/state/sessions/f581a1ae-0ee4-48a3-96f3-ce31a0633bb0/pre-tool-advisory-throttle.json +18 -0
  52. package/.omc/state/sessions/f581a1ae-0ee4-48a3-96f3-ce31a0633bb0/subagent-tracking-state.json +17 -0
  53. package/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json +14 -0
  54. package/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/ralph-state.json +13 -0
  55. package/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/ultrawork-state.json +11 -0
  56. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/last-tool-error-state.json +7 -0
  57. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/mission-state.json +61 -0
  58. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/prd.json +22 -0
  59. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/pre-tool-advisory-throttle.json +22 -0
  60. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/progress.txt +22 -0
  61. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/skill-active-state.json +15 -0
  62. package/.omc/state/sessions/fe1057b4-9a25-4e8e-8c3f-3e11652ee697/subagent-tracking-state.json +26 -0
  63. package/.turbo/turbo-build.log +3 -3
  64. package/.turbo/turbo-test.log +92 -44
  65. package/dist/boot-K4QUAFSP.js +2 -0
  66. package/dist/boot-K4QUAFSP.js.map +7 -0
  67. package/dist/chunk-RTSP2FCA.js +2 -0
  68. package/dist/chunk-RTSP2FCA.js.map +7 -0
  69. package/dist/chunk-VPBZR2PY.js +166 -0
  70. package/dist/chunk-VPBZR2PY.js.map +7 -0
  71. package/dist/cli.js +11 -107
  72. package/dist/cli.js.map +4 -4
  73. package/dist/entry/index.d.ts +2 -0
  74. package/dist/index.js +1 -1
  75. package/dist/index.js.map +4 -4
  76. package/dist/lib/vendor/config-schema.d.ts +58 -0
  77. package/dist/mcp.js +1 -54
  78. package/dist/mcp.js.map +4 -4
  79. package/eslint.config.js +33 -1
  80. package/package.json +5 -1
  81. package/scripts/build.js +11 -1
  82. package/src/.omc/state/agent-replay-c513ef38-cc3e-4a29-9c4c-1e0137245dd5.jsonl +4 -0
  83. package/src/.omc/state/agent-replay-ed3e2cfb-a666-4bb1-bcc1-569d5d0b837a.jsonl +2 -0
  84. package/src/.omc/state/idle-notif-cooldown.json +1 -1
  85. package/src/.omc/state/sessions/c513ef38-cc3e-4a29-9c4c-1e0137245dd5/mission-state.json +79 -0
  86. package/src/.omc/state/sessions/c513ef38-cc3e-4a29-9c4c-1e0137245dd5/pre-tool-advisory-throttle.json +22 -0
  87. package/src/.omc/state/sessions/c513ef38-cc3e-4a29-9c4c-1e0137245dd5/subagent-tracking-state.json +26 -0
  88. package/src/.omc/state/sessions/ed3e2cfb-a666-4bb1-bcc1-569d5d0b837a/pre-tool-advisory-throttle.json +18 -0
  89. package/src/.omc/state/sessions/ed3e2cfb-a666-4bb1-bcc1-569d5d0b837a/ralph-state.json +13 -0
  90. package/src/.omc/state/sessions/ed3e2cfb-a666-4bb1-bcc1-569d5d0b837a/ultrawork-state.json +11 -0
  91. package/src/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json +14 -0
  92. package/src/commands/config/.omc/state/sessions/41336850-028c-476b-be1a-2164e1e46cac/last-tool-error-state.json +7 -0
  93. package/src/commands/config/.omc/state/sessions/41336850-028c-476b-be1a-2164e1e46cac/pre-tool-advisory-throttle.json +18 -0
  94. package/src/commands/config/config.ts +7 -37
  95. package/src/commands/doctor/__tests__/agent-files.test.ts +8 -30
  96. package/src/commands/doctor/__tests__/check-legacy-user-global-config.test.ts +110 -0
  97. package/src/commands/doctor/doctor.ts +110 -44
  98. package/src/commands/env-autoload/env-autoload.ts +12 -0
  99. package/src/commands/env-autoload/index.ts +1 -0
  100. package/src/commands/env-clear/__tests__/env-clear.test.ts +27 -0
  101. package/src/commands/env-clear/env-clear.ts +22 -8
  102. package/src/commands/env-load/__tests__/env-load.test.ts +36 -1
  103. package/src/commands/env-load/env-load.ts +152 -35
  104. package/src/commands/env-load/index.ts +2 -1
  105. package/src/commands/env-status/__tests__/env-status.test.ts +78 -0
  106. package/src/commands/env-status/env-status.ts +19 -7
  107. package/src/commands/gh-release-deploy-all/gh-release-deploy-all.ts +45 -1
  108. package/src/commands/gh-release-deploy-selected/gh-release-deploy-selected.ts +46 -1
  109. package/src/commands/init/__tests__/agent-files.test.ts +145 -27
  110. package/src/commands/init/__tests__/migrate-config.test.ts +136 -5
  111. package/src/commands/init/__tests__/migrate-factory-config.test.ts +93 -0
  112. package/src/commands/init/__tests__/seed-user-global-config.test.ts +64 -0
  113. package/src/commands/init/__tests__/shell-body.test.ts +30 -0
  114. package/src/commands/init/agent-files.ts +65 -45
  115. package/src/commands/init/init.ts +140 -31
  116. package/src/commands/init/migrate-config.ts +160 -32
  117. package/src/commands/vendor-check/__tests__/runtime-isolation.test.ts +71 -0
  118. package/src/commands/vendor-check/__tests__/vendor-check.test.ts +87 -0
  119. package/src/commands/vendor-check/index.ts +1 -0
  120. package/src/commands/vendor-check/vendor-check.ts +127 -0
  121. package/src/commands/vendor-config/__tests__/vendor-config.test.ts +103 -0
  122. package/src/commands/vendor-config/index.ts +1 -0
  123. package/src/commands/vendor-config/vendor-config.ts +162 -0
  124. package/src/commands/vendor-diff/__tests__/vendor-diff.test.ts +74 -0
  125. package/src/commands/vendor-diff/index.ts +1 -0
  126. package/src/commands/vendor-diff/vendor-diff.ts +77 -0
  127. package/src/commands/vendor-manifest/index.ts +1 -0
  128. package/src/commands/vendor-manifest/vendor-manifest.ts +60 -0
  129. package/src/commands/vendor-sync/__tests__/vendor-write.test.ts +86 -0
  130. package/src/commands/vendor-sync/index.ts +1 -0
  131. package/src/commands/vendor-sync/vendor-sync.ts +90 -0
  132. package/src/commands/worktrees-add/worktrees-add.ts +1 -1
  133. package/src/commands/worktrees-reload/worktrees-reload.ts +6 -5
  134. package/src/commands/worktrees-remove/worktrees-remove.ts +10 -1
  135. package/src/commands/worktrees-sync/worktrees-sync.ts +9 -1
  136. package/src/entry/cli.ts +417 -210
  137. package/src/entry/index.ts +7 -1
  138. package/src/integrations/cmux/__tests__/open-workspace-with-layout.test.ts +127 -0
  139. package/src/integrations/cmux/close-workspace-by-title.ts +2 -2
  140. package/src/integrations/cmux/list-workspace-titles.ts +1 -1
  141. package/src/integrations/cmux/open-workspace-with-layout.ts +15 -4
  142. package/src/integrations/cursor/.omc/state/agent-replay-f99d8dad-81d1-4987-8183-62edf0843d0c.jsonl +2 -0
  143. package/src/integrations/cursor/.omc/state/idle-notif-cooldown.json +3 -0
  144. package/src/integrations/cursor/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json +18 -0
  145. package/src/integrations/cursor/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/subagent-tracking-state.json +17 -0
  146. package/src/integrations/cursor/index.ts +1 -0
  147. package/src/integrations/cursor/launch-cursor.ts +12 -0
  148. package/src/integrations/cursor/open-cursor-workspace.ts +8 -14
  149. package/src/integrations/doppler/__tests__/doppler-errors.test.ts +76 -0
  150. package/src/integrations/doppler/doppler-cli-auth.ts +12 -4
  151. package/src/integrations/doppler/doppler-errors.ts +88 -0
  152. package/src/integrations/doppler/doppler-project.ts +80 -0
  153. package/src/integrations/doppler/index.ts +3 -1
  154. package/src/integrations/gh/gh-cli-auth/gh-cli-auth.ts +9 -5
  155. package/src/integrations/gh/gh-release-prs/gh-release-prs.ts +16 -8
  156. package/src/integrations/ide/__tests__/ide-facade.test.ts +57 -10
  157. package/src/integrations/ide/add-ide-worktree-folders.ts +2 -4
  158. package/src/integrations/ide/open-ide-workspace.ts +6 -6
  159. package/src/integrations/ide/remove-ide-worktree-folders.ts +95 -30
  160. package/src/integrations/ide/types.ts +10 -1
  161. package/src/integrations/zed/__tests__/open-zed-workspace.test.ts +1 -17
  162. package/src/integrations/zed/__tests__/reuse-zed-workspace.test.ts +86 -0
  163. package/src/integrations/zed/index.ts +1 -0
  164. package/src/integrations/zed/open-zed-workspace.ts +4 -10
  165. package/src/integrations/zed/reuse-zed-workspace.ts +57 -0
  166. package/src/lib/command-catalog/__tests__/__snapshots__/command-catalog.test.ts.snap +212 -0
  167. package/src/lib/command-catalog/__tests__/command-catalog.test.ts +193 -0
  168. package/src/lib/command-catalog/command-catalog.ts +141 -0
  169. package/src/lib/command-catalog/index.ts +2 -0
  170. package/src/lib/command-echo/__tests__/command-echo.test.ts +127 -0
  171. package/src/lib/constants/constants.ts +13 -0
  172. package/src/lib/constants/index.ts +2 -0
  173. package/src/lib/env-autoload/__tests__/env-autoload.test.ts +288 -0
  174. package/src/lib/env-autoload/env-autoload.ts +294 -0
  175. package/src/lib/env-autoload/index.ts +9 -0
  176. package/src/lib/errors/operation-error.ts +1 -1
  177. package/src/lib/infra-kit-config/__tests__/env-autoload-schema.test.ts +71 -0
  178. package/src/lib/infra-kit-config/__tests__/infra-kit-config.test.ts +77 -6
  179. package/src/lib/infra-kit-config/index.ts +9 -1
  180. package/src/lib/infra-kit-config/infra-kit-config.ts +71 -11
  181. package/src/lib/json-output/__tests__/json-output.test.ts +139 -0
  182. package/src/lib/json-output/index.ts +1 -0
  183. package/src/lib/json-output/json-output.ts +47 -0
  184. package/src/lib/managed-block/managed-block.ts +4 -4
  185. package/src/lib/path-display/index.ts +1 -0
  186. package/src/lib/path-display/path-display.ts +42 -0
  187. package/src/lib/render/__tests__/render.test.ts +48 -0
  188. package/src/lib/render/index.ts +1 -0
  189. package/src/lib/render/render.ts +24 -0
  190. package/src/lib/vendor/__tests__/config-schema.test.ts +31 -0
  191. package/src/lib/vendor/__tests__/config.test.ts +63 -0
  192. package/src/lib/vendor/__tests__/factory-config.test.ts +92 -0
  193. package/src/lib/vendor/__tests__/vendor-lib.test.ts +158 -0
  194. package/src/lib/vendor/__tests__/zx-mock.ts +32 -0
  195. package/src/lib/vendor/config-schema.ts +78 -0
  196. package/src/lib/vendor/config.ts +58 -0
  197. package/src/lib/vendor/factory-config-schema.ts +35 -0
  198. package/src/lib/vendor/factory-config.ts +91 -0
  199. package/src/lib/vendor/hash.ts +16 -0
  200. package/src/lib/vendor/index.ts +23 -0
  201. package/src/lib/vendor/manifest.ts +151 -0
  202. package/src/lib/vendor/skip-sets.ts +48 -0
  203. package/src/lib/vendor/sync-ops.ts +290 -0
  204. package/src/lib/vendor/walk.ts +56 -0
  205. package/src/lib/worktrees/remove-worktrees.ts +15 -0
  206. package/src/mcp/tools/index.ts +5 -42
  207. package/src/sanity.test.tsx +1 -0
  208. package/src/tui/__tests__/no-react-boundary.test.ts +51 -0
  209. package/src/tui/boot.tsx +45 -0
  210. package/src/tui/screens/__tests__/command-palette.test.tsx +136 -0
  211. package/src/tui/screens/command-palette.tsx +159 -0
  212. package/src/tui/types.ts +8 -0
  213. package/tsconfig.json +1 -0
  214. package/tsconfig.tsbuildinfo +1 -1
  215. package/vitest.config.ts +8 -0
  216. package/src/commands/worktrees-open/__tests__/open-cmux.test.ts +0 -96
  217. package/src/commands/worktrees-open/index.ts +0 -1
  218. package/src/commands/worktrees-open/worktrees-open.ts +0 -195
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 1,
3
+ "entries": {
4
+ "79a93d4a2f8f50b95f852280616242fee1855dc99a3c75211917f55e72e95fae": {
5
+ "last_emitted_at_ms": 1782111838873,
6
+ "message": "Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests)."
7
+ },
8
+ "466399dafa2d20f60587180bad0a07358eb7f2bce724df0ff682f038ad33f5ad": {
9
+ "last_emitted_at_ms": 1782111836437,
10
+ "message": "Read multiple files in parallel when possible for faster analysis."
11
+ }
12
+ },
13
+ "updated_at": "2026-06-22T07:03:58.873Z"
14
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "active": true,
3
+ "iteration": 1,
4
+ "max_iterations": 100,
5
+ "started_at": "2026-06-22T07:07:31.606Z",
6
+ "prompt": "/ralph fix it",
7
+ "session_id": "f99d8dad-81d1-4987-8183-62edf0843d0c",
8
+ "project_path": "/Users/arthur/projects/infra-kit/apps/infra-kit/cli",
9
+ "linked_ultrawork": true,
10
+ "awaiting_confirmation": true,
11
+ "awaiting_confirmation_set_at": "2026-06-22T07:07:31.606Z",
12
+ "last_checked_at": "2026-06-22T07:07:31.606Z"
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "active": true,
3
+ "started_at": "2026-06-22T07:07:31.618Z",
4
+ "original_prompt": "/ralph fix it",
5
+ "session_id": "f99d8dad-81d1-4987-8183-62edf0843d0c",
6
+ "project_path": "/Users/arthur/projects/infra-kit/apps/infra-kit/cli",
7
+ "reinforcement_count": 0,
8
+ "awaiting_confirmation": true,
9
+ "awaiting_confirmation_set_at": "2026-06-22T07:07:31.618Z",
10
+ "last_checked_at": "2026-06-22T07:07:31.618Z"
11
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "tool_name": "Read",
3
+ "tool_input_preview": "{\"file_path\":\"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/release-utils/release-utils.test.ts\"}",
4
+ "error": "File does not exist. Note: your current working directory is /Users/arthur/projects/infra-kit/apps/infra-kit/cli.",
5
+ "timestamp": "2026-06-22T10:50:56.310Z",
6
+ "retry_count": 2
7
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "updatedAt": "2026-06-22T10:56:08.258Z",
3
+ "missions": [
4
+ {
5
+ "id": "session:fe1057b4-9a25-4e8e-8c3f-3e11652ee697:none",
6
+ "source": "session",
7
+ "name": "none",
8
+ "objective": "Session mission",
9
+ "createdAt": "2026-06-22T10:50:30.138Z",
10
+ "updatedAt": "2026-06-22T10:56:08.258Z",
11
+ "status": "done",
12
+ "workerCount": 1,
13
+ "taskCounts": {
14
+ "total": 1,
15
+ "pending": 0,
16
+ "blocked": 0,
17
+ "inProgress": 0,
18
+ "completed": 1,
19
+ "failed": 0
20
+ },
21
+ "agents": [
22
+ {
23
+ "name": "architect:a5b8b19",
24
+ "role": "architect",
25
+ "ownership": "a5b8b195fc9e1c552",
26
+ "status": "done",
27
+ "currentStep": null,
28
+ "latestUpdate": "completed",
29
+ "completedSummary": null,
30
+ "updatedAt": "2026-06-22T10:56:08.258Z"
31
+ }
32
+ ],
33
+ "timeline": [
34
+ {
35
+ "id": "session-start:a5b8b195fc9e1c552:2026-06-22T10:50:30.138Z",
36
+ "at": "2026-06-22T10:50:30.138Z",
37
+ "kind": "update",
38
+ "agent": "architect:a5b8b19",
39
+ "detail": "started architect:a5b8b19",
40
+ "sourceKey": "session-start:a5b8b195fc9e1c552"
41
+ },
42
+ {
43
+ "id": "session-stop:a5b8b195fc9e1c552:2026-06-22T10:51:50.153Z",
44
+ "at": "2026-06-22T10:51:50.153Z",
45
+ "kind": "completion",
46
+ "agent": "architect:a5b8b19",
47
+ "detail": "completed",
48
+ "sourceKey": "session-stop:a5b8b195fc9e1c552"
49
+ },
50
+ {
51
+ "id": "session-stop:a218b18d41dcf9eac:2026-06-22T10:56:08.258Z",
52
+ "at": "2026-06-22T10:56:08.258Z",
53
+ "kind": "completion",
54
+ "agent": "architect:a5b8b19",
55
+ "detail": "completed",
56
+ "sourceKey": "session-stop:a218b18d41dcf9eac"
57
+ }
58
+ ]
59
+ }
60
+ ]
61
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "task": "Add unit tests for the command-echo module (apps/infra-kit/cli/src/lib/command-echo).",
3
+ "stories": [
4
+ {
5
+ "id": "US-001",
6
+ "title": "Cover command-echo print()/addOption()/lifecycle formatting",
7
+ "passes": true,
8
+ "acceptanceCriteria": [
9
+ "Test file exists at src/lib/command-echo/__tests__/command-echo.test.ts",
10
+ "print() emits nothing when not interactive (logger.info not called)",
11
+ "print() emits nothing when interactive but zero options",
12
+ "boolean true option renders as a bare flag (e.g. --yes), boolean false is omitted",
13
+ "string option is quoted (--flag \"value\")",
14
+ "array option is joined and quoted (--flag \"a, b\")",
15
+ "full equivalent-command line matches 'pnpm exec infra-kit <name> <opts>' format including the description round-trip via --release spec",
16
+ "start()/reset() clear prior state",
17
+ "All command-echo tests pass under vitest",
18
+ "Existing CLI tests still pass (no regression)"
19
+ ]
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "version": 1,
3
+ "entries": {
4
+ "79a93d4a2f8f50b95f852280616242fee1855dc99a3c75211917f55e72e95fae": {
5
+ "last_emitted_at_ms": 1782125437533,
6
+ "message": "Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests)."
7
+ },
8
+ "f6cbe67e25c00ba9a0ead130929145ece91fc2e69e856c9f7113a46311d4f6be": {
9
+ "last_emitted_at_ms": 1782125430019,
10
+ "message": "Spawning agent: oh-my-claudecode:architect (sonnet) | Task: Verify command-echo tests"
11
+ },
12
+ "466399dafa2d20f60587180bad0a07358eb7f2bce724df0ff682f038ad33f5ad": {
13
+ "last_emitted_at_ms": 1782125415238,
14
+ "message": "Read multiple files in parallel when possible for faster analysis."
15
+ },
16
+ "445ed27a3872b681d98190bae61ccb84954e1bc4e140df5370be958dee776b3a": {
17
+ "last_emitted_at_ms": 1782125373373,
18
+ "message": "Verify changes work after editing. Test functionality before marking complete."
19
+ }
20
+ },
21
+ "updated_at": "2026-06-22T10:50:37.533Z"
22
+ }
@@ -0,0 +1,22 @@
1
+ US-001 — Add unit tests for command-echo: COMPLETE
2
+
3
+ Implemented:
4
+ - New test: apps/infra-kit/cli/src/lib/command-echo/__tests__/command-echo.test.ts (9 tests)
5
+ - Covers: not-interactive no-op, zero-options no-op, boolean true→bare flag / false→omitted,
6
+ string quoting, array join+quote, full equivalent-command format with --release description
7
+ round-trip, start()/reset() state clearing.
8
+
9
+ Verification (fresh evidence):
10
+ - command-echo tests: 9/9 pass
11
+ - full CLI suite: 365/365 pass across 32 files
12
+ - tsc --noEmit: clean
13
+ - architect review (sonnet): APPROVE — all 7 criteria covered by real assertions
14
+ - deslop pass: clean, no edits needed
15
+ - post-deslop regression: 9/9 pass
16
+
17
+ Learnings / patterns:
18
+ - Logger is mocked via vi.mock('src/lib/logger', () => ({ logger: { info: vi.fn(), ... } }));
19
+ capture print() output with vi.mocked(logger.info).
20
+ - command-echo is a singleton — tests reset() + mockClear() in beforeEach for isolation.
21
+ - Test setup is intentionally explicit (not DRY-abstracted) per repo conventions.
22
+ - Untested edge (optional, non-blocking): addOption() before start() yields empty command name.
@@ -0,0 +1,15 @@
1
+ {
2
+ "active": true,
3
+ "skill_name": "ai-slop-cleaner",
4
+ "session_id": "fe1057b4-9a25-4e8e-8c3f-3e11652ee697",
5
+ "started_at": "2026-06-22T10:51:56.134Z",
6
+ "last_checked_at": "2026-06-22T10:51:56.134Z",
7
+ "reinforcement_count": 0,
8
+ "max_reinforcements": 5,
9
+ "stale_ttl_ms": 900000,
10
+ "_meta": {
11
+ "written_at": "2026-06-22T10:51:56.134Z",
12
+ "mode": "skill-active",
13
+ "sessionId": "fe1057b4-9a25-4e8e-8c3f-3e11652ee697"
14
+ }
15
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "agents": [
3
+ {
4
+ "agent_id": "a5b8b195fc9e1c552",
5
+ "agent_type": "oh-my-claudecode:architect",
6
+ "started_at": "2026-06-22T10:50:30.138Z",
7
+ "parent_mode": "none",
8
+ "status": "completed",
9
+ "completed_at": "2026-06-22T10:51:50.153Z",
10
+ "duration_ms": 80015
11
+ },
12
+ {
13
+ "agent_id": "a218b18d41dcf9eac",
14
+ "agent_type": "unknown",
15
+ "started_at": "2026-06-22T10:56:08.258Z",
16
+ "parent_mode": "none",
17
+ "status": "completed",
18
+ "completed_at": "2026-06-22T10:56:08.258Z",
19
+ "duration_ms": 0
20
+ }
21
+ ],
22
+ "total_spawned": 1,
23
+ "total_completed": 2,
24
+ "total_failed": 0,
25
+ "last_updated": "2026-06-22T10:56:08.362Z"
26
+ }
@@ -1,6 +1,6 @@
1
1
  $ pnpm run clean-artifacts && node ./scripts/build.js
2
2
  $ rm -rf dist
3
- ✅ Build was completed successfully: cli.js - 0.112 MB
4
- ✅ Build was completed successfully: index.js - 0.0000687 MB
5
- ✅ Build was completed successfully: mcp.js - 0.0875 MB
3
+ ✅ Build was completed successfully: cli.js - 0.0168 MB
4
+ ✅ Build was completed successfully: index.js - 0.000126 MB
5
+ ✅ Build was completed successfully: mcp.js - 0.00182 MB
6
6
  ✅ Type declarations emitted: dist/entry/index.d.ts
@@ -2,6 +2,33 @@
2
2
  [?25l
3
3
   RUN  v4.1.9 /Users/arthur/projects/infra-kit/apps/infra-kit/cli
4
4
 
5
+ Sourcemap for "/Users/arthur/Library/pnpm/store/v11/links/@/ink-testing-library/4.0.0/990ef278cd16926ca8f94e3d73dd86da3c7d702a314086dabc7217c3d9b139d2/node_modules/ink-testing-library/build/index.js" points to missing source files
6
+ INFO:  created CLAUDE.md
7
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
8
+ INFO:  updated CLAUDE.md
9
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
10
+ INFO:  created CLAUDE.md
11
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
12
+ INFO:  unchanged CLAUDE.md
13
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
14
+ INFO: Skipped agent-instruction files — no infra-kit.json at the repo root
15
+ INFO:  updated CLAUDE.md
16
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
17
+ INFO:  updated CLAUDE.md
18
+ INFO:  removed AGENTS.md
19
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
20
+ INFO:  updated CLAUDE.md
21
+ INFO:  updated AGENTS.md
22
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
23
+ INFO:  created CLAUDE.md
24
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
25
+ INFO:  updated CLAUDE.md
26
+ INFO:  removed AGENTS.md
27
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
28
+ INFO:  unchanged CLAUDE.md
29
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
30
+ INFO:  created CLAUDE.md
31
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
5
32
  INFO: ✓ Migrated ~/infra-kit.yml → ~/infra-kit.json
6
33
  INFO: ⚠ Skipped ~/infra-kit.yml — ~/infra-kit.json already exists (remove the stale .yml manually)
7
34
  INFO: ✓ Migrated ~/infra-kit.yml → ~/infra-kit.json
@@ -12,68 +39,89 @@
12
39
  : : :
13
40
  ^
14
41
  
15
- INFO:  created AGENTS.md
16
42
  INFO: ✓ Migrated ~/infra-kit.yml → ~/infra-kit.json
17
- INFO:  created CLAUDE.md
18
- INFO:  created .cursor/rules/infra-kit.mdc
19
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
20
- INFO:  created AGENTS.md
21
- INFO:  updated CLAUDE.md
22
- INFO:  created .cursor/rules/infra-kit.mdc
23
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
24
- INFO:  created AGENTS.md
25
- INFO:  created CLAUDE.md
26
- INFO:  created .cursor/rules/infra-kit.mdc
27
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
28
- INFO:  unchanged AGENTS.md
29
- INFO:  unchanged CLAUDE.md
30
- INFO:  unchanged .cursor/rules/infra-kit.mdc
31
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
32
- INFO: Skipped agent-instruction files — no infra-kit.json at the repo root
33
- INFO:  updated AGENTS.md
34
- INFO:  created CLAUDE.md
35
- INFO:  created .cursor/rules/infra-kit.mdc
36
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
37
- INFO: ✓ Migrated ~/.infra-kit/config.yml → ~/.infra-kit/config.json
38
- INFO: ✓ Migrated ~/.infra-kit/projects/infra-kit-init-migrate-test-0UISIg/infra-kit.yml → ~/.infra-kit/projects/infra-kit-init-migrate-test-0UISIg/infra-kit.json
43
+ INFO: ✓ Migrated ~/.infra-kit/config.yml → ~/.infra-kit/infra-kit.json
44
+ INFO: Factory config: ~/.infra-kit/vendor.json [ ]
45
+ INFO: 
46
+ Not found — run `infra-kit vendor-config --init` to scaffold it.
47
+ INFO: Factory config: ~/.infra-kit/vendor.json [✓]
48
+ INFO: workspaceDir: /tmp/vendor-config-home-1leOPd/projects (resolved: /tmp/vendor-config-home-1leOPd/projects) [✓ exists]
49
+ INFO: Targets:
50
+ INFO:  [✓] repo-a ~/projects/repo-a
51
+ INFO: Factory config: ~/.infra-kit/vendor.json [✓]
52
+ INFO: workspaceDir: /tmp/vendor-config-home-ggiYiu/projects (resolved: /tmp/vendor-config-home-ggiYiu/projects) [✓ exists]
53
+ INFO: Targets:
54
+ INFO:  [ ] missing-repo ~/projects/missing-repo (not found — clone or remove)
55
+ INFO:  Created ~/.infra-kit/vendor.json
56
+ INFO:  Edit `workspaceDir` (placeholder: ~/projects) to point at where your repos live.
57
+ INFO:  Add at least one repo name to `targets` before running vendor sync/manifest/diff.
58
+ INFO: ✓ Migrated ~/.infra-kit/projects/infra-kit-init-migrate-test-QB1hTw/infra-kit.yml ~/.infra-kit/projects/infra-kit-init-migrate-test-QB1hTw/infra-kit.json
59
+ INFO: ✓ Created ~/.infra-kit/vendor.json
60
+ INFO:  Seeded 2 target(s) from the source vendor.config.ts.
61
+ INFO:  Edit `workspaceDir` (placeholder: ~/projects) to point at where your repos live.
39
62
  INFO: ✓ Normalized ide config in ~/infra-kit.json (removed legacy "mode")
63
+ INFO: Factory config already exists at ~/.infra-kit/vendor.json — leaving it untouched.
40
64
  INFO: ✓ Normalized ide config in ~/infra-kit.json (removed legacy "mode")
41
- INFO: ✓ Normalized ide config in ~/.infra-kit/config.json (removed legacy "mode")
42
- INFO: ✓ Normalized ide config in ~/.infra-kit/projects/infra-kit-init-migrate-test-RXzXc6/infra-kit.json (removed legacy "mode")
65
+ INFO: ✓ Normalized ide config in ~/.infra-kit/infra-kit.json (removed legacy "mode")
66
+ INFO: ✓ Normalized ide config in ~/.infra-kit/projects/infra-kit-init-migrate-test-kdR8XZ/infra-kit.json (removed legacy "mode")
43
67
  INFO: ⚠ Skipped normalizing ~/infra-kit.json — Expected property name or '}' in JSON at position 2 (line 1 column 3)
68
+ INFO: ✓ Renamed ~/.infra-kit/config.json → ~/.infra-kit/infra-kit.json
69
+ INFO: ✓ Renamed ~/.infra-kit/config.example.jsonc → ~/.infra-kit/infra-kit.example.jsonc
70
+ INFO: ⚠ Skipped ~/.infra-kit/config.json — ~/.infra-kit/infra-kit.json already exists (remove the stale file manually)
71
+ INFO: ✓ Renamed ~/.infra-kit/config.example.jsonc → ~/.infra-kit/infra-kit.example.jsonc
72
+ INFO: ✓ Migrated ~/.infra-kit/config.yml → ~/.infra-kit/infra-kit.json
73
+ INFO: ✓ Migrated ~/.infra-kit/config.yml → ~/.infra-kit/infra-kit.json
74
+ INFO: ⚠ Skipped ~/.infra-kit/config.json — ~/.infra-kit/infra-kit.json already exists (remove the stale file manually)
75
+ INFO: ❌ target-repo → vendor/configs (1 change(s)):
76
+ INFO:  >f.st..... configs/a.js
77
+ INFO: ✅ target-repo: copied 1/1 items + manifest
44
78
  INFO: 
45
79
  @x/ok — PASS
46
80
  INFO:  [PASS] infra-kit.config.ts: present and valid
47
81
  INFO: 
48
82
  ✅ All valid (1 checked)
83
+ INFO: 🎉 No drift detected.
49
84
  INFO: 
50
85
  @x/no-config — FAIL
51
- INFO:  [FAIL] infra-kit.config.ts: infra-kit.config.ts not found at /tmp/audit-cmd-7R4JqP/infra-kit.config.ts
86
+ INFO:  [FAIL] infra-kit.config.ts: infra-kit.config.ts not found at /tmp/audit-cmd-LG37cx/infra-kit.config.ts
52
87
  INFO: 
53
88
  ❌ Audit failed (1 checked)
54
- INFO:  created AGENTS.md
55
- INFO:  created CLAUDE.md
56
- INFO:  created .cursor/rules/infra-kit.mdc
57
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
58
- INFO:  created AGENTS.md
59
- INFO:  created CLAUDE.md
60
- INFO:  created .cursor/rules/infra-kit.mdc
61
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
62
- INFO:  created AGENTS.md
89
+ INFO: ⚠️ target-repo: target does not exist — skipped
90
+ INFO: ✅ vendor/ matches manifest (1 files).
91
+ ERROR: ❌ vendor/ has drifted from vendor/.sync-manifest.json.
92
+ ERROR:  These files are mirrored from the source repo — edit them upstream, not here.
93
+ INFO: 
94
+ Modified (1):
95
+ INFO:  configs/a.js
96
+ INFO: ℹ️ No vendor/ folder found — nothing to check.
97
+ ERROR: ❌ Missing vendor/.sync-manifest.json. Re-run the vendor sync to generate it.
98
+ INFO: ✅ vendor/ matches manifest (2 files).
99
+ ERROR: ❌ vendor/ has drifted from vendor/.sync-manifest.json.
100
+ ERROR:  These files are mirrored from the source repo — edit them upstream, not here.
101
+ INFO: 
102
+ Modified (1):
103
+ INFO:  a.js
104
+ INFO: 
105
+ Added (not in manifest) (1):
106
+ INFO:  c.js
107
+ INFO: 
108
+ Removed (in manifest, now missing) (1):
109
+ INFO:  b.js
110
+ ERROR: ❌ vendor/.sync-manifest.json has a newer schemaVersion (2) than this CLI supports. Upgrade infra-kit.
63
111
  INFO:  created CLAUDE.md
64
- INFO:  created .cursor/rules/infra-kit.mdc
65
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
66
- INFO:  created AGENTS.md
112
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
67
113
  INFO:  created CLAUDE.md
68
- INFO:  created .cursor/rules/infra-kit.mdc
69
- INFO: Agent-instruction files synced (infra-kit 0.1.112)
114
+ INFO: Agent-instruction files synced (infra-kit 0.1.114)
115
+ INFO: Wrote user-global config to /tmp/seed-user-global-test-bhoQdQ/.infra-kit/infra-kit.json (see the sibling .example.jsonc files for reference)
116
+ INFO: Wrote user-global config to /tmp/seed-user-global-test-nxcGED/.infra-kit/infra-kit.json (see the sibling .example.jsonc files for reference)
117
+ INFO: User-global config already present at /tmp/seed-user-global-test-a2bUF5/.infra-kit/infra-kit.json (refreshed reference examples)
70
118
  WARN: ⚠️ Failed to reopen cmux workspace for release/v1.48.0
71
119
  title: "hulyo-monorepo 1.48.0"
72
120
  error: {}
73
121
 
74
-  Test Files  31 passed (31)
75
-  Tests  356 passed (356)
76
-  Start at  16:26:28
77
-  Duration  3.70s (transform 6.10s, setup 1.19s, import 11.51s, tests 4.09s, environment 3ms)
122
+  Test Files  56 passed (56)
123
+  Tests  529 passed (529)
124
+  Start at  23:25:55
125
+  Duration  2.63s (transform 6.74s, setup 1.42s, import 15.02s, tests 2.47s, environment 15ms)
78
126
 
79
127
  [?25h
@@ -0,0 +1,2 @@
1
+ import{render as D}from"ink";import M from"node:process";import{Box as d,Text as o,useApp as E,useInput as v}from"ink";import{useEffect as A,useMemo as b,useState as h}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";var I=x=>{let{items:l,onSelect:s,onCancel:g}=x,m={hint:"Select a command \u2014 type to filter, \u2191\u2193 to move, Enter to run, Esc to cancel",prompt:"\u276F ",empty:"No matching commands"},y=24,{exit:C}=E(),[i,P]=h(""),[B,a]=h(0),[u,T]=h(!1);A(()=>{u&&C()},[u,C]);let c=b(()=>{let e=i.trim().toLowerCase();return e?l.filter(t=>`${t.name} ${t.description}`.toLowerCase().includes(e)):l},[l,i]),p=Math.min(B,Math.max(0,c.length-1));if(v((e,t)=>{if(!u){if(t.escape||t.ctrl&&e==="c"){g(),T(!0);return}if(t.return){let n=c[p];n&&(s(n.name),T(!0));return}if(t.upArrow){let n=c.length;n>0&&a((p-1+n)%n);return}if(t.downArrow){let n=c.length;n>0&&a((p+1)%n);return}if(t.backspace||t.delete){P(i.slice(0,-1)),a(0);return}e&&!t.ctrl&&!t.meta&&(P(i+e),a(0))}}),u)return null;let w="";return f(d,{flexDirection:"column",children:[r(o,{dimColor:!0,children:m.hint}),f(d,{children:[r(o,{color:"cyan",children:m.prompt}),r(o,{children:i})]}),r(d,{flexDirection:"column",marginTop:1,children:c.length===0?r(o,{dimColor:!0,children:m.empty}):c.map((e,t)=>{let n=t===p,S=e.group!==w;return w=e.group,f(d,{flexDirection:"column",children:[S&&t>0?r(o,{children:" "}):null,S?r(o,{color:"yellow",children:`\u2014 ${e.group} \u2014`}):null,f(o,{color:n?"green":void 0,children:[n?"\u203A ":" ",e.name.padEnd(y)," ",r(o,{dimColor:!0,children:e.description})]})]},e.name)})})]})};import{jsx as $}from"react/jsx-runtime";var U=async x=>new Promise(l=>{let s=null,{waitUntilExit:g}=D($(I,{items:x,onSelect:m=>{s=m},onCancel:()=>{s=null}}),{stdout:M.stderr});g().then(()=>{l(s)}).catch(()=>{l(null)})});export{U as runCommandPalette};
2
+ //# sourceMappingURL=boot-K4QUAFSP.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/tui/boot.tsx", "../src/tui/screens/command-palette.tsx"],
4
+ "sourcesContent": ["import { render } from 'ink'\nimport process from 'node:process'\n\nimport { CommandPalette } from './screens/command-palette'\nimport type { PaletteItem } from './types'\n\n/**\n * Entry point for the Ink TUI. This module (and everything under `src/tui/`) is\n * the ONLY place allowed to import `ink`/`react`; it is reached exclusively via a\n * dynamic `await import('src/tui/boot')` from the TTY branch of entry/cli.ts, so\n * React never loads on the MCP / `--json` / non-TTY paths. Build splitting keeps\n * it in a separate lazy chunk (see scripts/build.js).\n */\n\n/**\n * Render the command palette and resolve to the chosen command name, or `null`\n * if the user cancels. Frames are written to stderr so stdout stays clean for\n * the command that runs afterwards (mirrors the previous Inquirer menu).\n */\nexport const runCommandPalette = async (items: PaletteItem[]): Promise<string | null> => {\n return new Promise((resolve) => {\n let selected: string | null = null\n\n const { waitUntilExit } = render(\n <CommandPalette\n items={items}\n onSelect={(name) => {\n selected = name\n }}\n onCancel={() => {\n selected = null\n }}\n />,\n { stdout: process.stderr as unknown as NodeJS.WriteStream },\n )\n\n waitUntilExit()\n .then(() => {\n resolve(selected)\n })\n .catch(() => {\n resolve(null)\n })\n })\n}\n", "import { Box, Text, useApp, useInput } from 'ink'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport type { PaletteItem } from '../types'\n\ninterface CommandPaletteProps {\n items: PaletteItem[]\n /** Called with the chosen command name; the app then exits. */\n onSelect: (name: string) => void\n /** Called when the user cancels (Esc / Ctrl-C); the app then exits. */\n onCancel: () => void\n}\n\n/**\n * Fuzzy-ish command picker rendered with Ink. Pure presentation: it receives a\n * flat list of commands (already grouped/ordered by the catalog) and returns the\n * selected name. It never executes anything \u2014 the caller runs the command via\n * the existing Commander path.\n */\nexport const CommandPalette = (props: CommandPaletteProps) => {\n const { items, onSelect, onCancel } = props\n\n const T = {\n hint: 'Select a command \u2014 type to filter, \u2191\u2193 to move, Enter to run, Esc to cancel',\n prompt: '\u276F ',\n empty: 'No matching commands',\n }\n const nameWidth = 24\n\n const { exit } = useApp()\n const [query, setQuery] = useState('')\n const [index, setIndex] = useState(0)\n // When set, the component renders `null` for one frame so Ink erases the list\n // before unmount commits its final frame (Ink's `log.done()` would otherwise\n // freeze the last drawn frame \u2014 the command list \u2014 into the scrollback).\n const [submitted, setSubmitted] = useState(false)\n\n // Exit only after the empty frame has committed, so the list is wiped first.\n useEffect(() => {\n if (submitted) {\n exit()\n }\n }, [submitted, exit])\n\n const filtered = useMemo(() => {\n const q = query.trim().toLowerCase()\n\n if (!q) {\n return items\n }\n\n return items.filter((item) => {\n return `${item.name} ${item.description}`.toLowerCase().includes(q)\n })\n }, [items, query])\n\n const activeIndex = Math.min(index, Math.max(0, filtered.length - 1))\n\n useInput((input, key) => {\n if (submitted) {\n return\n }\n\n if (key.escape || (key.ctrl && input === 'c')) {\n onCancel()\n setSubmitted(true)\n\n return\n }\n\n if (key.return) {\n const selected = filtered[activeIndex]\n\n if (selected) {\n onSelect(selected.name)\n setSubmitted(true)\n }\n\n return\n }\n\n if (key.upArrow) {\n const n = filtered.length\n\n // Wrap to the bottom when stepping up past the first item. The `+ n`\n // sidesteps JS negative modulo (e.g. -1 % 5 === -1, not 4).\n if (n > 0) {\n setIndex((activeIndex - 1 + n) % n)\n }\n\n return\n }\n\n if (key.downArrow) {\n const n = filtered.length\n\n // Wrap to the top when stepping down past the last item.\n if (n > 0) {\n setIndex((activeIndex + 1) % n)\n }\n\n return\n }\n\n if (key.backspace || key.delete) {\n setQuery(query.slice(0, -1))\n setIndex(0)\n\n return\n }\n\n // Printable character: append to the filter.\n if (input && !key.ctrl && !key.meta) {\n setQuery(query + input)\n setIndex(0)\n }\n })\n\n // Final frame: render nothing so Ink erases the list on its way out.\n if (submitted) {\n return null\n }\n\n let lastGroup = ''\n\n return (\n <Box flexDirection=\"column\">\n <Text dimColor>{T.hint}</Text>\n <Box>\n <Text color=\"cyan\">{T.prompt}</Text>\n <Text>{query}</Text>\n </Box>\n <Box flexDirection=\"column\" marginTop={1}>\n {filtered.length === 0 ? (\n <Text dimColor>{T.empty}</Text>\n ) : (\n filtered.map((item, position) => {\n const isActive = position === activeIndex\n const showGroup = item.group !== lastGroup\n\n lastGroup = item.group\n\n return (\n <Box flexDirection=\"column\" key={item.name}>\n {/* Blank line between groups (not before the very first group). */}\n {showGroup && position > 0 ? <Text> </Text> : null}\n {showGroup ? <Text color=\"yellow\">{`\u2014 ${item.group} \u2014`}</Text> : null}\n <Text color={isActive ? 'green' : undefined}>\n {isActive ? '\u203A ' : ' '}\n {item.name.padEnd(nameWidth)} <Text dimColor>{item.description}</Text>\n </Text>\n </Box>\n )\n })\n )}\n </Box>\n </Box>\n )\n}\n"],
5
+ "mappings": "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",
6
+ "names": ["render", "process", "Box", "Text", "useApp", "useInput", "useEffect", "useMemo", "useState", "jsx", "jsxs", "CommandPalette", "props", "items", "onSelect", "onCancel", "T", "nameWidth", "exit", "query", "setQuery", "index", "setIndex", "submitted", "setSubmitted", "filtered", "q", "item", "activeIndex", "input", "key", "selected", "lastGroup", "position", "isActive", "showGroup", "jsx", "runCommandPalette", "items", "resolve", "selected", "waitUntilExit", "render", "CommandPalette", "name", "process"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var a=e=>e,n={requiredScripts:["build","ts-check","eslint-check","prettier-check","test"],requiredFiles:["tsconfig.json","eslint.config.js","readme.md"],turboTasks:[]},c={requiredScripts:["build","dev","test","qa","check","fix"],requiredFiles:["turbo.json","pnpm-workspace.yaml"],turboTasks:["build","test","ts-check","eslint-check","prettier-check","check"]},d=(e,t=n)=>({requiredScripts:e.requiredScripts??[...t.requiredScripts],requiredFiles:e.requiredFiles??[...t.requiredFiles],turboTasks:e.turbo?.requiredTasks??[...t.turboTasks]});import{z as r}from"zod";var p="vendor.config.ts",o=r.string().refine(e=>{let t=/^(?:[/\\]|[a-z]:)/i.test(e),i=e.split(/[\\/]/).includes("..");return!t&&!i&&e.trim().length>0},{message:'must be a non-empty repo-relative path without ".." segments'}),s=r.object({name:r.string(),source:o,target:o,type:r.enum(["file","directory"]),vendored:r.boolean().optional()}),f=r.object({copy:r.array(s)}).strict(),l=e=>e;export{a,n as b,c,d,p as e,f,l as g};
2
+ //# sourceMappingURL=chunk-RTSP2FCA.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/lib/package-config/package-config.ts", "../src/lib/vendor/config-schema.ts"],
4
+ "sourcesContent": ["/**\n * Validation rules for a single workspace package, declared in its\n * `infra-kit.config.js`. Every field is optional: a key left unset falls back to\n * the active baseline ({@link DEFAULT_RULES} for packages, {@link ROOT_DEFAULT_RULES}\n * for the monorepo root), and a key set replaces that default wholesale (per-key,\n * no array concatenation) so a package can opt out with an explicit empty array.\n *\n * Most packages need none of these \u2014 the standard rules live in the baseline, so\n * a typical config is just `defineConfig(() => ({}))`.\n *\n * @example\n * // infra-kit.config.js\n * import { defineConfig } from 'infra-kit'\n *\n * export default defineConfig(() => ({}))\n */\nexport interface InfraKitPackageConfig {\n /** Scripts that must be present in the package's package.json `scripts` map. */\n requiredScripts?: string[]\n /** Files (relative to the package root) that must exist on disk. */\n requiredFiles?: string[]\n /** Turborepo expectations \u2014 only meaningful where a turbo.json lives (the root). */\n turbo?: {\n /** Tasks that must be defined in turbo.json `tasks`. */\n requiredTasks?: string[]\n }\n}\n\n/**\n * Accepted shapes for a package config's default export \u2014 mirrors Vite's\n * `defineConfig` input: a plain object, a sync factory, or an async factory.\n */\nexport type InfraKitPackageConfigInput =\n | InfraKitPackageConfig\n | (() => InfraKitPackageConfig)\n | (() => Promise<InfraKitPackageConfig>)\n\n/**\n * Identity helper that gives `infra-kit.config.js` authors full type inference\n * and editor autocomplete without changing the value \u2014 exactly like Vite's\n * `defineConfig`. Resolution of the factory form happens in the loader, not here.\n *\n * @example\n * export default defineConfig(() => ({}))\n *\n * @example\n * export default defineConfig(() => ({ requiredScripts: [] }))\n */\nexport const defineConfig = (config: InfraKitPackageConfigInput): InfraKitPackageConfigInput => {\n return config\n}\n\n/** Fully-resolved rules with every defaultable field present. */\nexport interface ResolvedPackageRules {\n requiredScripts: string[]\n requiredFiles: string[]\n turboTasks: string[]\n}\n\n/**\n * Baseline rules for a standard TypeScript workspace package, applied to any key\n * a package leaves unset. These are the \"under the hood\" defaults so a conforming\n * package's config can stay empty; non-standard packages override the relevant key.\n */\nexport const DEFAULT_RULES: Readonly<ResolvedPackageRules> = {\n requiredScripts: ['build', 'ts-check', 'eslint-check', 'prettier-check', 'test'],\n requiredFiles: ['tsconfig.json', 'eslint.config.js', 'readme.md'],\n turboTasks: [],\n}\n\n/**\n * Baseline rules for the monorepo root (`infra-kit audit --root`). Checks the\n * root commands, the workspace/turbo files, and that the turbo pipeline defines\n * the expected tasks \u2014 so the root's own config can also stay empty.\n */\nexport const ROOT_DEFAULT_RULES: Readonly<ResolvedPackageRules> = {\n requiredScripts: ['build', 'dev', 'test', 'qa', 'check', 'fix'],\n requiredFiles: ['turbo.json', 'pnpm-workspace.yaml'],\n turboTasks: ['build', 'test', 'ts-check', 'eslint-check', 'prettier-check', 'check'],\n}\n\n/**\n * Merge a parsed package config over a baseline. Each key is replaced wholesale\n * when the package provides it, otherwise the baseline value is used.\n *\n * @example\n * resolvePackageConfig({ requiredScripts: [] })\n * // => { requiredScripts: [], requiredFiles: [...DEFAULT_RULES.requiredFiles], turboTasks: [] }\n */\nexport const resolvePackageConfig = (\n config: InfraKitPackageConfig,\n baseline: Readonly<ResolvedPackageRules> = DEFAULT_RULES,\n): ResolvedPackageRules => {\n return {\n requiredScripts: config.requiredScripts ?? [...baseline.requiredScripts],\n requiredFiles: config.requiredFiles ?? [...baseline.requiredFiles],\n turboTasks: config.turbo?.requiredTasks ?? [...baseline.turboTasks],\n }\n}\n", "import { z } from 'zod'\n\n/**\n * Pure (node-free) vendor config schema + authoring helper. Kept separate from\n * `config.ts` (which imports node builtins for the runtime loader) so the public\n * lib entry can re-export `defineVendorConfig` without dragging node types into\n * the emitted `.d.ts`.\n */\n\n/**\n * Filename a source repo provides at its root to declare WHAT `vendor sync`\n * copies (`copy[]`). Lives ONLY on the write path \u2014 `vendor check` never loads it.\n * WHERE/WHICH to stamp (`workspaceDir` + `targets`) is machine-local and lives in\n * the user-global factory config (`~/.infra-kit/vendor.json`).\n */\nexport const VENDOR_CONFIG_FILE = 'vendor.config.ts'\n\n/**\n * A non-empty, repo-relative path with no `..` segments and no absolute prefix\n * (POSIX `/`, UNC/`\\`, or a Windows drive like `C:`). Containment guard for\n * vendor copy items so a malicious/typo config can't read or write outside the\n * source/target repo roots. Kept as a string/regex check (no `node:path`) to\n * respect this file's node-free constraint \u2014 `sync-ops.ts` does the resolved\n * runtime containment assert as defense in depth.\n */\nconst safeRelPath = z.string().refine(\n (p) => {\n const isAbsolute = /^(?:[/\\\\]|[a-z]:)/i.test(p)\n const hasDotDotSegment = p.split(/[\\\\/]/).includes('..')\n\n return !isAbsolute && !hasDotDotSegment && p.trim().length > 0\n },\n { message: 'must be a non-empty repo-relative path without \"..\" segments' },\n)\n\n/**\n * One item to sync from the source repo into each target. `vendored: true` marks\n * workspace packages that must land under `vendor/` (the single-source-of-truth\n * code); everything else is root-level tooling that stays at the repo root.\n */\nexport const vendorCopyItemSchema = z.object({\n name: z.string(),\n source: safeRelPath,\n target: safeRelPath,\n type: z.enum(['file', 'directory']),\n vendored: z.boolean().optional(),\n})\n\nexport const vendorConfigSchema = z\n .object({\n /** Files/dirs to copy. Items with `vendored: true` land under `vendor/`. */\n copy: z.array(vendorCopyItemSchema),\n })\n // Reject stray keys so a leftover `targets` (now machine-local, in\n // ~/.infra-kit/vendor.json) yields a clear \"unrecognized key\" error rather\n // than being silently ignored.\n .strict()\n\nexport type VendorCopyItem = z.infer<typeof vendorCopyItemSchema>\nexport type VendorConfig = z.infer<typeof vendorConfigSchema>\n\n/**\n * Identity helper for authoring a type-safe `vendor.config.ts` in a source repo.\n * Re-exported from the public lib entry so a source repo can\n * `import { defineVendorConfig } from 'infra-kit'`.\n *\n * NOTE: a `vendor.config.ts` must be type-strippable \u2014 Node's native type\n * stripping (Node >= 24) loads it without a build step, which forbids `enum`,\n * `namespace`, and parameter properties.\n *\n * @example\n * export default defineVendorConfig({\n * copy: [{ name: 'Configs', source: 'vendor/configs', target: 'vendor/configs', type: 'directory', vendored: true }],\n * })\n */\nexport const defineVendorConfig = (config: VendorConfig): VendorConfig => {\n return config\n}\n"],
5
+ "mappings": "AAgDO,IAAMA,EAAgBC,GACpBA,EAeIC,EAAgD,CAC3D,gBAAiB,CAAC,QAAS,WAAY,eAAgB,iBAAkB,MAAM,EAC/E,cAAe,CAAC,gBAAiB,mBAAoB,WAAW,EAChE,WAAY,CAAC,CACf,EAOaC,EAAqD,CAChE,gBAAiB,CAAC,QAAS,MAAO,OAAQ,KAAM,QAAS,KAAK,EAC9D,cAAe,CAAC,aAAc,qBAAqB,EACnD,WAAY,CAAC,QAAS,OAAQ,WAAY,eAAgB,iBAAkB,OAAO,CACrF,EAUaC,EAAuB,CAClCH,EACAI,EAA2CH,KAEpC,CACL,gBAAiBD,EAAO,iBAAmB,CAAC,GAAGI,EAAS,eAAe,EACvE,cAAeJ,EAAO,eAAiB,CAAC,GAAGI,EAAS,aAAa,EACjE,WAAYJ,EAAO,OAAO,eAAiB,CAAC,GAAGI,EAAS,UAAU,CACpE,GCjGF,OAAS,KAAAC,MAAS,MAeX,IAAMC,EAAqB,mBAU5BC,EAAcF,EAAE,OAAO,EAAE,OAC5BG,GAAM,CACL,IAAMC,EAAa,qBAAqB,KAAKD,CAAC,EACxCE,EAAmBF,EAAE,MAAM,OAAO,EAAE,SAAS,IAAI,EAEvD,MAAO,CAACC,GAAc,CAACC,GAAoBF,EAAE,KAAK,EAAE,OAAS,CAC/D,EACA,CAAE,QAAS,8DAA+D,CAC5E,EAOaG,EAAuBN,EAAE,OAAO,CAC3C,KAAMA,EAAE,OAAO,EACf,OAAQE,EACR,OAAQA,EACR,KAAMF,EAAE,KAAK,CAAC,OAAQ,WAAW,CAAC,EAClC,SAAUA,EAAE,QAAQ,EAAE,SAAS,CACjC,CAAC,EAEYO,EAAqBP,EAC/B,OAAO,CAEN,KAAMA,EAAE,MAAMM,CAAoB,CACpC,CAAC,EAIA,OAAO,EAmBGE,EAAsBC,GAC1BA",
6
+ "names": ["defineConfig", "config", "DEFAULT_RULES", "ROOT_DEFAULT_RULES", "resolvePackageConfig", "baseline", "z", "VENDOR_CONFIG_FILE", "safeRelPath", "p", "isAbsolute", "hasDotDotSegment", "vendorCopyItemSchema", "vendorConfigSchema", "defineVendorConfig", "config"]
7
+ }