@selvakumaresra/specship 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (624) hide show
  1. package/.claude-plugin/plugin.json +6 -0
  2. package/LICENSE +21 -0
  3. package/README.md +573 -0
  4. package/agents/specship-explorer.md +29 -0
  5. package/commands/cg-drifted.md +23 -0
  6. package/commands/cg-explore.md +13 -0
  7. package/commands/cg-fix.md +21 -0
  8. package/commands/cg-impact.md +13 -0
  9. package/commands/cg-implement.md +23 -0
  10. package/commands/cg-relink.md +21 -0
  11. package/commands/cg-spec.md +19 -0
  12. package/commands/cg-sync.md +8 -0
  13. package/commands/cg-trace.md +13 -0
  14. package/dist/bin/node-version-check.d.ts +37 -0
  15. package/dist/bin/node-version-check.d.ts.map +1 -0
  16. package/dist/bin/node-version-check.js +79 -0
  17. package/dist/bin/node-version-check.js.map +1 -0
  18. package/dist/bin/specship.d.ts +25 -0
  19. package/dist/bin/specship.d.ts.map +1 -0
  20. package/dist/bin/specship.js +2018 -0
  21. package/dist/bin/specship.js.map +1 -0
  22. package/dist/bin/uninstall.d.ts +13 -0
  23. package/dist/bin/uninstall.d.ts.map +1 -0
  24. package/dist/bin/uninstall.js +35 -0
  25. package/dist/bin/uninstall.js.map +1 -0
  26. package/dist/context/formatter.d.ts +30 -0
  27. package/dist/context/formatter.d.ts.map +1 -0
  28. package/dist/context/formatter.js +263 -0
  29. package/dist/context/formatter.js.map +1 -0
  30. package/dist/context/index.d.ts +119 -0
  31. package/dist/context/index.d.ts.map +1 -0
  32. package/dist/context/index.js +1289 -0
  33. package/dist/context/index.js.map +1 -0
  34. package/dist/context/markers.d.ts +19 -0
  35. package/dist/context/markers.d.ts.map +1 -0
  36. package/dist/context/markers.js +22 -0
  37. package/dist/context/markers.js.map +1 -0
  38. package/dist/db/index.d.ts +101 -0
  39. package/dist/db/index.d.ts.map +1 -0
  40. package/dist/db/index.js +276 -0
  41. package/dist/db/index.js.map +1 -0
  42. package/dist/db/migrations.d.ts +44 -0
  43. package/dist/db/migrations.d.ts.map +1 -0
  44. package/dist/db/migrations.js +427 -0
  45. package/dist/db/migrations.js.map +1 -0
  46. package/dist/db/queries.d.ts +357 -0
  47. package/dist/db/queries.d.ts.map +1 -0
  48. package/dist/db/queries.js +1504 -0
  49. package/dist/db/queries.js.map +1 -0
  50. package/dist/db/schema.sql +410 -0
  51. package/dist/db/spec-queries.d.ts +101 -0
  52. package/dist/db/spec-queries.d.ts.map +1 -0
  53. package/dist/db/spec-queries.js +675 -0
  54. package/dist/db/spec-queries.js.map +1 -0
  55. package/dist/db/sqlite-adapter.d.ts +65 -0
  56. package/dist/db/sqlite-adapter.d.ts.map +1 -0
  57. package/dist/db/sqlite-adapter.js +214 -0
  58. package/dist/db/sqlite-adapter.js.map +1 -0
  59. package/dist/directory.d.ts +57 -0
  60. package/dist/directory.d.ts.map +1 -0
  61. package/dist/directory.js +253 -0
  62. package/dist/directory.js.map +1 -0
  63. package/dist/errors.d.ts +136 -0
  64. package/dist/errors.d.ts.map +1 -0
  65. package/dist/errors.js +219 -0
  66. package/dist/errors.js.map +1 -0
  67. package/dist/extraction/dfm-extractor.d.ts +31 -0
  68. package/dist/extraction/dfm-extractor.d.ts.map +1 -0
  69. package/dist/extraction/dfm-extractor.js +151 -0
  70. package/dist/extraction/dfm-extractor.js.map +1 -0
  71. package/dist/extraction/generated-detection.d.ts +30 -0
  72. package/dist/extraction/generated-detection.d.ts.map +1 -0
  73. package/dist/extraction/generated-detection.js +80 -0
  74. package/dist/extraction/generated-detection.js.map +1 -0
  75. package/dist/extraction/grammars.d.ts +100 -0
  76. package/dist/extraction/grammars.d.ts.map +1 -0
  77. package/dist/extraction/grammars.js +426 -0
  78. package/dist/extraction/grammars.js.map +1 -0
  79. package/dist/extraction/index.d.ts +138 -0
  80. package/dist/extraction/index.d.ts.map +1 -0
  81. package/dist/extraction/index.js +1394 -0
  82. package/dist/extraction/index.js.map +1 -0
  83. package/dist/extraction/languages/c-cpp.d.ts +4 -0
  84. package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  85. package/dist/extraction/languages/c-cpp.js +171 -0
  86. package/dist/extraction/languages/c-cpp.js.map +1 -0
  87. package/dist/extraction/languages/csharp.d.ts +3 -0
  88. package/dist/extraction/languages/csharp.d.ts.map +1 -0
  89. package/dist/extraction/languages/csharp.js +73 -0
  90. package/dist/extraction/languages/csharp.js.map +1 -0
  91. package/dist/extraction/languages/dart.d.ts +3 -0
  92. package/dist/extraction/languages/dart.d.ts.map +1 -0
  93. package/dist/extraction/languages/dart.js +192 -0
  94. package/dist/extraction/languages/dart.js.map +1 -0
  95. package/dist/extraction/languages/go.d.ts +3 -0
  96. package/dist/extraction/languages/go.d.ts.map +1 -0
  97. package/dist/extraction/languages/go.js +74 -0
  98. package/dist/extraction/languages/go.js.map +1 -0
  99. package/dist/extraction/languages/index.d.ts +10 -0
  100. package/dist/extraction/languages/index.d.ts.map +1 -0
  101. package/dist/extraction/languages/index.js +51 -0
  102. package/dist/extraction/languages/index.js.map +1 -0
  103. package/dist/extraction/languages/java.d.ts +3 -0
  104. package/dist/extraction/languages/java.d.ts.map +1 -0
  105. package/dist/extraction/languages/java.js +70 -0
  106. package/dist/extraction/languages/java.js.map +1 -0
  107. package/dist/extraction/languages/javascript.d.ts +3 -0
  108. package/dist/extraction/languages/javascript.d.ts.map +1 -0
  109. package/dist/extraction/languages/javascript.js +90 -0
  110. package/dist/extraction/languages/javascript.js.map +1 -0
  111. package/dist/extraction/languages/kotlin.d.ts +3 -0
  112. package/dist/extraction/languages/kotlin.d.ts.map +1 -0
  113. package/dist/extraction/languages/kotlin.js +259 -0
  114. package/dist/extraction/languages/kotlin.js.map +1 -0
  115. package/dist/extraction/languages/lua.d.ts +3 -0
  116. package/dist/extraction/languages/lua.d.ts.map +1 -0
  117. package/dist/extraction/languages/lua.js +150 -0
  118. package/dist/extraction/languages/lua.js.map +1 -0
  119. package/dist/extraction/languages/luau.d.ts +3 -0
  120. package/dist/extraction/languages/luau.d.ts.map +1 -0
  121. package/dist/extraction/languages/luau.js +37 -0
  122. package/dist/extraction/languages/luau.js.map +1 -0
  123. package/dist/extraction/languages/objc.d.ts +3 -0
  124. package/dist/extraction/languages/objc.d.ts.map +1 -0
  125. package/dist/extraction/languages/objc.js +133 -0
  126. package/dist/extraction/languages/objc.js.map +1 -0
  127. package/dist/extraction/languages/pascal.d.ts +3 -0
  128. package/dist/extraction/languages/pascal.d.ts.map +1 -0
  129. package/dist/extraction/languages/pascal.js +66 -0
  130. package/dist/extraction/languages/pascal.js.map +1 -0
  131. package/dist/extraction/languages/php.d.ts +3 -0
  132. package/dist/extraction/languages/php.d.ts.map +1 -0
  133. package/dist/extraction/languages/php.js +107 -0
  134. package/dist/extraction/languages/php.js.map +1 -0
  135. package/dist/extraction/languages/python.d.ts +3 -0
  136. package/dist/extraction/languages/python.d.ts.map +1 -0
  137. package/dist/extraction/languages/python.js +56 -0
  138. package/dist/extraction/languages/python.js.map +1 -0
  139. package/dist/extraction/languages/ruby.d.ts +3 -0
  140. package/dist/extraction/languages/ruby.d.ts.map +1 -0
  141. package/dist/extraction/languages/ruby.js +114 -0
  142. package/dist/extraction/languages/ruby.js.map +1 -0
  143. package/dist/extraction/languages/rust.d.ts +3 -0
  144. package/dist/extraction/languages/rust.d.ts.map +1 -0
  145. package/dist/extraction/languages/rust.js +109 -0
  146. package/dist/extraction/languages/rust.js.map +1 -0
  147. package/dist/extraction/languages/scala.d.ts +3 -0
  148. package/dist/extraction/languages/scala.d.ts.map +1 -0
  149. package/dist/extraction/languages/scala.js +139 -0
  150. package/dist/extraction/languages/scala.js.map +1 -0
  151. package/dist/extraction/languages/swift.d.ts +3 -0
  152. package/dist/extraction/languages/swift.d.ts.map +1 -0
  153. package/dist/extraction/languages/swift.js +91 -0
  154. package/dist/extraction/languages/swift.js.map +1 -0
  155. package/dist/extraction/languages/typescript.d.ts +3 -0
  156. package/dist/extraction/languages/typescript.d.ts.map +1 -0
  157. package/dist/extraction/languages/typescript.js +129 -0
  158. package/dist/extraction/languages/typescript.js.map +1 -0
  159. package/dist/extraction/liquid-extractor.d.ts +52 -0
  160. package/dist/extraction/liquid-extractor.d.ts.map +1 -0
  161. package/dist/extraction/liquid-extractor.js +313 -0
  162. package/dist/extraction/liquid-extractor.js.map +1 -0
  163. package/dist/extraction/mybatis-extractor.d.ts +48 -0
  164. package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
  165. package/dist/extraction/mybatis-extractor.js +198 -0
  166. package/dist/extraction/mybatis-extractor.js.map +1 -0
  167. package/dist/extraction/parse-worker.d.ts +8 -0
  168. package/dist/extraction/parse-worker.d.ts.map +1 -0
  169. package/dist/extraction/parse-worker.js +94 -0
  170. package/dist/extraction/parse-worker.js.map +1 -0
  171. package/dist/extraction/specs/markdown-spec-extractor.d.ts +59 -0
  172. package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -0
  173. package/dist/extraction/specs/markdown-spec-extractor.js +327 -0
  174. package/dist/extraction/specs/markdown-spec-extractor.js.map +1 -0
  175. package/dist/extraction/specs/types.d.ts +39 -0
  176. package/dist/extraction/specs/types.d.ts.map +1 -0
  177. package/dist/extraction/specs/types.js +8 -0
  178. package/dist/extraction/specs/types.js.map +1 -0
  179. package/dist/extraction/svelte-extractor.d.ts +56 -0
  180. package/dist/extraction/svelte-extractor.d.ts.map +1 -0
  181. package/dist/extraction/svelte-extractor.js +272 -0
  182. package/dist/extraction/svelte-extractor.js.map +1 -0
  183. package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  184. package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  185. package/dist/extraction/tree-sitter-helpers.js +103 -0
  186. package/dist/extraction/tree-sitter-helpers.js.map +1 -0
  187. package/dist/extraction/tree-sitter-types.d.ts +193 -0
  188. package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  189. package/dist/extraction/tree-sitter-types.js +10 -0
  190. package/dist/extraction/tree-sitter-types.js.map +1 -0
  191. package/dist/extraction/tree-sitter.d.ts +317 -0
  192. package/dist/extraction/tree-sitter.d.ts.map +1 -0
  193. package/dist/extraction/tree-sitter.js +3092 -0
  194. package/dist/extraction/tree-sitter.js.map +1 -0
  195. package/dist/extraction/vue-extractor.d.ts +51 -0
  196. package/dist/extraction/vue-extractor.d.ts.map +1 -0
  197. package/dist/extraction/vue-extractor.js +251 -0
  198. package/dist/extraction/vue-extractor.js.map +1 -0
  199. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  200. package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  201. package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  202. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  203. package/dist/extraction/wasm-runtime-flags.d.ts +38 -0
  204. package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
  205. package/dist/extraction/wasm-runtime-flags.js +106 -0
  206. package/dist/extraction/wasm-runtime-flags.js.map +1 -0
  207. package/dist/graph/index.d.ts +8 -0
  208. package/dist/graph/index.d.ts.map +1 -0
  209. package/dist/graph/index.js +13 -0
  210. package/dist/graph/index.js.map +1 -0
  211. package/dist/graph/queries.d.ts +106 -0
  212. package/dist/graph/queries.d.ts.map +1 -0
  213. package/dist/graph/queries.js +366 -0
  214. package/dist/graph/queries.js.map +1 -0
  215. package/dist/graph/traversal.d.ts +127 -0
  216. package/dist/graph/traversal.d.ts.map +1 -0
  217. package/dist/graph/traversal.js +531 -0
  218. package/dist/graph/traversal.js.map +1 -0
  219. package/dist/index.d.ts +551 -0
  220. package/dist/index.d.ts.map +1 -0
  221. package/dist/index.js +1165 -0
  222. package/dist/index.js.map +1 -0
  223. package/dist/installer/config-writer.d.ts +28 -0
  224. package/dist/installer/config-writer.d.ts.map +1 -0
  225. package/dist/installer/config-writer.js +91 -0
  226. package/dist/installer/config-writer.js.map +1 -0
  227. package/dist/installer/index.d.ts +87 -0
  228. package/dist/installer/index.d.ts.map +1 -0
  229. package/dist/installer/index.js +409 -0
  230. package/dist/installer/index.js.map +1 -0
  231. package/dist/installer/instructions-template.d.ts +18 -0
  232. package/dist/installer/instructions-template.d.ts.map +1 -0
  233. package/dist/installer/instructions-template.js +21 -0
  234. package/dist/installer/instructions-template.js.map +1 -0
  235. package/dist/installer/targets/claude.d.ts +88 -0
  236. package/dist/installer/targets/claude.d.ts.map +1 -0
  237. package/dist/installer/targets/claude.js +582 -0
  238. package/dist/installer/targets/claude.js.map +1 -0
  239. package/dist/installer/targets/registry.d.ts +19 -0
  240. package/dist/installer/targets/registry.d.ts.map +1 -0
  241. package/dist/installer/targets/registry.js +31 -0
  242. package/dist/installer/targets/registry.js.map +1 -0
  243. package/dist/installer/targets/shared.d.ts +62 -0
  244. package/dist/installer/targets/shared.d.ts.map +1 -0
  245. package/dist/installer/targets/shared.js +207 -0
  246. package/dist/installer/targets/shared.js.map +1 -0
  247. package/dist/installer/targets/types.d.ts +76 -0
  248. package/dist/installer/targets/types.d.ts.map +1 -0
  249. package/dist/installer/targets/types.js +12 -0
  250. package/dist/installer/targets/types.js.map +1 -0
  251. package/dist/isolation/worktree.d.ts +65 -0
  252. package/dist/isolation/worktree.d.ts.map +1 -0
  253. package/dist/isolation/worktree.js +231 -0
  254. package/dist/isolation/worktree.js.map +1 -0
  255. package/dist/mcp/daemon-paths.d.ts +46 -0
  256. package/dist/mcp/daemon-paths.d.ts.map +1 -0
  257. package/dist/mcp/daemon-paths.js +125 -0
  258. package/dist/mcp/daemon-paths.js.map +1 -0
  259. package/dist/mcp/daemon.d.ts +161 -0
  260. package/dist/mcp/daemon.d.ts.map +1 -0
  261. package/dist/mcp/daemon.js +403 -0
  262. package/dist/mcp/daemon.js.map +1 -0
  263. package/dist/mcp/engine.d.ts +105 -0
  264. package/dist/mcp/engine.d.ts.map +1 -0
  265. package/dist/mcp/engine.js +270 -0
  266. package/dist/mcp/engine.js.map +1 -0
  267. package/dist/mcp/index.d.ts +112 -0
  268. package/dist/mcp/index.d.ts.map +1 -0
  269. package/dist/mcp/index.js +477 -0
  270. package/dist/mcp/index.js.map +1 -0
  271. package/dist/mcp/proxy.d.ts +81 -0
  272. package/dist/mcp/proxy.d.ts.map +1 -0
  273. package/dist/mcp/proxy.js +510 -0
  274. package/dist/mcp/proxy.js.map +1 -0
  275. package/dist/mcp/server-instructions.d.ts +18 -0
  276. package/dist/mcp/server-instructions.d.ts.map +1 -0
  277. package/dist/mcp/server-instructions.js +77 -0
  278. package/dist/mcp/server-instructions.js.map +1 -0
  279. package/dist/mcp/session.d.ts +77 -0
  280. package/dist/mcp/session.d.ts.map +1 -0
  281. package/dist/mcp/session.js +294 -0
  282. package/dist/mcp/session.js.map +1 -0
  283. package/dist/mcp/spec-tools.d.ts +39 -0
  284. package/dist/mcp/spec-tools.d.ts.map +1 -0
  285. package/dist/mcp/spec-tools.js +326 -0
  286. package/dist/mcp/spec-tools.js.map +1 -0
  287. package/dist/mcp/tools.d.ts +404 -0
  288. package/dist/mcp/tools.d.ts.map +1 -0
  289. package/dist/mcp/tools.js +3066 -0
  290. package/dist/mcp/tools.js.map +1 -0
  291. package/dist/mcp/transport.d.ts +188 -0
  292. package/dist/mcp/transport.d.ts.map +1 -0
  293. package/dist/mcp/transport.js +343 -0
  294. package/dist/mcp/transport.js.map +1 -0
  295. package/dist/mcp/version.d.ts +19 -0
  296. package/dist/mcp/version.d.ts.map +1 -0
  297. package/dist/mcp/version.js +71 -0
  298. package/dist/mcp/version.js.map +1 -0
  299. package/dist/resolution/callback-synthesizer.d.ts +10 -0
  300. package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  301. package/dist/resolution/callback-synthesizer.js +1300 -0
  302. package/dist/resolution/callback-synthesizer.js.map +1 -0
  303. package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  304. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  305. package/dist/resolution/frameworks/cargo-workspace.js +225 -0
  306. package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  307. package/dist/resolution/frameworks/csharp.d.ts +8 -0
  308. package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  309. package/dist/resolution/frameworks/csharp.js +241 -0
  310. package/dist/resolution/frameworks/csharp.js.map +1 -0
  311. package/dist/resolution/frameworks/drupal.d.ts +51 -0
  312. package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
  313. package/dist/resolution/frameworks/drupal.js +367 -0
  314. package/dist/resolution/frameworks/drupal.js.map +1 -0
  315. package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  316. package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  317. package/dist/resolution/frameworks/expo-modules.js +143 -0
  318. package/dist/resolution/frameworks/expo-modules.js.map +1 -0
  319. package/dist/resolution/frameworks/express.d.ts +8 -0
  320. package/dist/resolution/frameworks/express.d.ts.map +1 -0
  321. package/dist/resolution/frameworks/express.js +308 -0
  322. package/dist/resolution/frameworks/express.js.map +1 -0
  323. package/dist/resolution/frameworks/fabric.d.ts +3 -0
  324. package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  325. package/dist/resolution/frameworks/fabric.js +354 -0
  326. package/dist/resolution/frameworks/fabric.js.map +1 -0
  327. package/dist/resolution/frameworks/go.d.ts +8 -0
  328. package/dist/resolution/frameworks/go.d.ts.map +1 -0
  329. package/dist/resolution/frameworks/go.js +161 -0
  330. package/dist/resolution/frameworks/go.js.map +1 -0
  331. package/dist/resolution/frameworks/index.d.ts +48 -0
  332. package/dist/resolution/frameworks/index.d.ts.map +1 -0
  333. package/dist/resolution/frameworks/index.js +161 -0
  334. package/dist/resolution/frameworks/index.js.map +1 -0
  335. package/dist/resolution/frameworks/java.d.ts +8 -0
  336. package/dist/resolution/frameworks/java.d.ts.map +1 -0
  337. package/dist/resolution/frameworks/java.js +504 -0
  338. package/dist/resolution/frameworks/java.js.map +1 -0
  339. package/dist/resolution/frameworks/laravel.d.ts +13 -0
  340. package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  341. package/dist/resolution/frameworks/laravel.js +257 -0
  342. package/dist/resolution/frameworks/laravel.js.map +1 -0
  343. package/dist/resolution/frameworks/nestjs.d.ts +26 -0
  344. package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  345. package/dist/resolution/frameworks/nestjs.js +698 -0
  346. package/dist/resolution/frameworks/nestjs.js.map +1 -0
  347. package/dist/resolution/frameworks/play.d.ts +19 -0
  348. package/dist/resolution/frameworks/play.d.ts.map +1 -0
  349. package/dist/resolution/frameworks/play.js +111 -0
  350. package/dist/resolution/frameworks/play.js.map +1 -0
  351. package/dist/resolution/frameworks/python.d.ts +10 -0
  352. package/dist/resolution/frameworks/python.d.ts.map +1 -0
  353. package/dist/resolution/frameworks/python.js +396 -0
  354. package/dist/resolution/frameworks/python.js.map +1 -0
  355. package/dist/resolution/frameworks/react-native.d.ts +3 -0
  356. package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  357. package/dist/resolution/frameworks/react-native.js +360 -0
  358. package/dist/resolution/frameworks/react-native.js.map +1 -0
  359. package/dist/resolution/frameworks/react.d.ts +8 -0
  360. package/dist/resolution/frameworks/react.d.ts.map +1 -0
  361. package/dist/resolution/frameworks/react.js +365 -0
  362. package/dist/resolution/frameworks/react.js.map +1 -0
  363. package/dist/resolution/frameworks/ruby.d.ts +8 -0
  364. package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  365. package/dist/resolution/frameworks/ruby.js +302 -0
  366. package/dist/resolution/frameworks/ruby.js.map +1 -0
  367. package/dist/resolution/frameworks/rust.d.ts +8 -0
  368. package/dist/resolution/frameworks/rust.d.ts.map +1 -0
  369. package/dist/resolution/frameworks/rust.js +304 -0
  370. package/dist/resolution/frameworks/rust.js.map +1 -0
  371. package/dist/resolution/frameworks/svelte.d.ts +9 -0
  372. package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  373. package/dist/resolution/frameworks/svelte.js +249 -0
  374. package/dist/resolution/frameworks/svelte.js.map +1 -0
  375. package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  376. package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  377. package/dist/resolution/frameworks/swift-objc.js +252 -0
  378. package/dist/resolution/frameworks/swift-objc.js.map +1 -0
  379. package/dist/resolution/frameworks/swift.d.ts +10 -0
  380. package/dist/resolution/frameworks/swift.d.ts.map +1 -0
  381. package/dist/resolution/frameworks/swift.js +400 -0
  382. package/dist/resolution/frameworks/swift.js.map +1 -0
  383. package/dist/resolution/frameworks/vue.d.ts +9 -0
  384. package/dist/resolution/frameworks/vue.d.ts.map +1 -0
  385. package/dist/resolution/frameworks/vue.js +306 -0
  386. package/dist/resolution/frameworks/vue.js.map +1 -0
  387. package/dist/resolution/go-module.d.ts +26 -0
  388. package/dist/resolution/go-module.d.ts.map +1 -0
  389. package/dist/resolution/go-module.js +78 -0
  390. package/dist/resolution/go-module.js.map +1 -0
  391. package/dist/resolution/import-resolver.d.ts +68 -0
  392. package/dist/resolution/import-resolver.d.ts.map +1 -0
  393. package/dist/resolution/import-resolver.js +1275 -0
  394. package/dist/resolution/import-resolver.js.map +1 -0
  395. package/dist/resolution/index.d.ts +117 -0
  396. package/dist/resolution/index.d.ts.map +1 -0
  397. package/dist/resolution/index.js +895 -0
  398. package/dist/resolution/index.js.map +1 -0
  399. package/dist/resolution/lru-cache.d.ts +24 -0
  400. package/dist/resolution/lru-cache.d.ts.map +1 -0
  401. package/dist/resolution/lru-cache.js +62 -0
  402. package/dist/resolution/lru-cache.js.map +1 -0
  403. package/dist/resolution/name-matcher.d.ts +32 -0
  404. package/dist/resolution/name-matcher.d.ts.map +1 -0
  405. package/dist/resolution/name-matcher.js +596 -0
  406. package/dist/resolution/name-matcher.js.map +1 -0
  407. package/dist/resolution/path-aliases.d.ts +68 -0
  408. package/dist/resolution/path-aliases.d.ts.map +1 -0
  409. package/dist/resolution/path-aliases.js +238 -0
  410. package/dist/resolution/path-aliases.js.map +1 -0
  411. package/dist/resolution/spec-link-resolver.d.ts +103 -0
  412. package/dist/resolution/spec-link-resolver.d.ts.map +1 -0
  413. package/dist/resolution/spec-link-resolver.js +259 -0
  414. package/dist/resolution/spec-link-resolver.js.map +1 -0
  415. package/dist/resolution/strip-comments.d.ts +27 -0
  416. package/dist/resolution/strip-comments.d.ts.map +1 -0
  417. package/dist/resolution/strip-comments.js +441 -0
  418. package/dist/resolution/strip-comments.js.map +1 -0
  419. package/dist/resolution/swift-objc-bridge.d.ts +134 -0
  420. package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  421. package/dist/resolution/swift-objc-bridge.js +256 -0
  422. package/dist/resolution/swift-objc-bridge.js.map +1 -0
  423. package/dist/resolution/types.d.ts +216 -0
  424. package/dist/resolution/types.d.ts.map +1 -0
  425. package/dist/resolution/types.js +8 -0
  426. package/dist/resolution/types.js.map +1 -0
  427. package/dist/resolution/workspace-packages.d.ts +48 -0
  428. package/dist/resolution/workspace-packages.d.ts.map +1 -0
  429. package/dist/resolution/workspace-packages.js +208 -0
  430. package/dist/resolution/workspace-packages.js.map +1 -0
  431. package/dist/search/query-parser.d.ts +57 -0
  432. package/dist/search/query-parser.d.ts.map +1 -0
  433. package/dist/search/query-parser.js +177 -0
  434. package/dist/search/query-parser.js.map +1 -0
  435. package/dist/search/query-utils.d.ts +71 -0
  436. package/dist/search/query-utils.d.ts.map +1 -0
  437. package/dist/search/query-utils.js +380 -0
  438. package/dist/search/query-utils.js.map +1 -0
  439. package/dist/server/cli.js +152 -0
  440. package/dist/server/index.js +12 -0
  441. package/dist/server/ingest/index.js +18 -0
  442. package/dist/server/ingest/ingestor.js +406 -0
  443. package/dist/server/ingest/parser.js +104 -0
  444. package/dist/server/ingest/pricing.js +78 -0
  445. package/dist/server/ingest/types.js +9 -0
  446. package/dist/server/ingest/watcher.js +77 -0
  447. package/dist/server/package.json +3 -0
  448. package/dist/server/project-registry.js +101 -0
  449. package/dist/server/routes/claude.js +480 -0
  450. package/dist/server/routes/graph.js +149 -0
  451. package/dist/server/routes/memory.js +272 -0
  452. package/dist/server/routes/projects.js +197 -0
  453. package/dist/server/routes/spec.js +105 -0
  454. package/dist/server/routes/status.js +35 -0
  455. package/dist/server/routes/workflow.js +184 -0
  456. package/dist/server/server.js +202 -0
  457. package/dist/sync/git-hooks.d.ts +45 -0
  458. package/dist/sync/git-hooks.d.ts.map +1 -0
  459. package/dist/sync/git-hooks.js +225 -0
  460. package/dist/sync/git-hooks.js.map +1 -0
  461. package/dist/sync/index.d.ts +19 -0
  462. package/dist/sync/index.d.ts.map +1 -0
  463. package/dist/sync/index.js +35 -0
  464. package/dist/sync/index.js.map +1 -0
  465. package/dist/sync/watch-policy.d.ts +48 -0
  466. package/dist/sync/watch-policy.d.ts.map +1 -0
  467. package/dist/sync/watch-policy.js +124 -0
  468. package/dist/sync/watch-policy.js.map +1 -0
  469. package/dist/sync/watcher.d.ts +283 -0
  470. package/dist/sync/watcher.d.ts.map +1 -0
  471. package/dist/sync/watcher.js +606 -0
  472. package/dist/sync/watcher.js.map +1 -0
  473. package/dist/sync/worktree.d.ts +54 -0
  474. package/dist/sync/worktree.d.ts.map +1 -0
  475. package/dist/sync/worktree.js +137 -0
  476. package/dist/sync/worktree.js.map +1 -0
  477. package/dist/types.d.ts +623 -0
  478. package/dist/types.d.ts.map +1 -0
  479. package/dist/types.js +108 -0
  480. package/dist/types.js.map +1 -0
  481. package/dist/ui/glyphs.d.ts +42 -0
  482. package/dist/ui/glyphs.d.ts.map +1 -0
  483. package/dist/ui/glyphs.js +78 -0
  484. package/dist/ui/glyphs.js.map +1 -0
  485. package/dist/ui/shimmer-progress.d.ts +11 -0
  486. package/dist/ui/shimmer-progress.d.ts.map +1 -0
  487. package/dist/ui/shimmer-progress.js +90 -0
  488. package/dist/ui/shimmer-progress.js.map +1 -0
  489. package/dist/ui/shimmer-worker.d.ts +2 -0
  490. package/dist/ui/shimmer-worker.d.ts.map +1 -0
  491. package/dist/ui/shimmer-worker.js +118 -0
  492. package/dist/ui/shimmer-worker.js.map +1 -0
  493. package/dist/ui/types.d.ts +17 -0
  494. package/dist/ui/types.d.ts.map +1 -0
  495. package/dist/ui/types.js +3 -0
  496. package/dist/ui/types.js.map +1 -0
  497. package/dist/utils.d.ts +205 -0
  498. package/dist/utils.d.ts.map +1 -0
  499. package/dist/utils.js +549 -0
  500. package/dist/utils.js.map +1 -0
  501. package/dist/web/chunk-2YZXEHZ2.js +1 -0
  502. package/dist/web/chunk-3GIC555L.js +18 -0
  503. package/dist/web/chunk-3IIIGRMT.js +1 -0
  504. package/dist/web/chunk-47QYKLE5.js +1 -0
  505. package/dist/web/chunk-4LHBWWP7.js +1 -0
  506. package/dist/web/chunk-4OAZLD5W.js +1 -0
  507. package/dist/web/chunk-5OQKAJAE.js +1 -0
  508. package/dist/web/chunk-7B525GKQ.js +1 -0
  509. package/dist/web/chunk-BPDXCOOZ.js +1 -0
  510. package/dist/web/chunk-DT37HTZB.js +1 -0
  511. package/dist/web/chunk-EIMUHJND.js +1 -0
  512. package/dist/web/chunk-FTESTUEO.js +1 -0
  513. package/dist/web/chunk-GLJZV6MU.js +1 -0
  514. package/dist/web/chunk-I7LS67U5.js +1 -0
  515. package/dist/web/chunk-L4TVIPSR.js +1 -0
  516. package/dist/web/chunk-MASCULC2.js +1 -0
  517. package/dist/web/chunk-MW7ICSRM.js +1 -0
  518. package/dist/web/chunk-OI5VP2A3.js +1 -0
  519. package/dist/web/chunk-RA6EBF6I.js +1 -0
  520. package/dist/web/chunk-RP3WU5Y6.js +1 -0
  521. package/dist/web/chunk-RQDRMTXN.js +1 -0
  522. package/dist/web/chunk-TQMT6UDU.js +1 -0
  523. package/dist/web/chunk-U7IYOV7T.js +1 -0
  524. package/dist/web/chunk-UE227MWF.js +1 -0
  525. package/dist/web/chunk-WV573J4K.js +1 -0
  526. package/dist/web/chunk-WVCKOJZL.js +4 -0
  527. package/dist/web/chunk-XZKLVPHE.js +1 -0
  528. package/dist/web/chunk-ZABKKHJ3.js +1 -0
  529. package/dist/web/favicon-16.png +0 -0
  530. package/dist/web/favicon-180.png +0 -0
  531. package/dist/web/favicon-32.png +0 -0
  532. package/dist/web/favicon-512.png +0 -0
  533. package/dist/web/favicon-small.svg +15 -0
  534. package/dist/web/favicon.ico +0 -0
  535. package/dist/web/favicon.svg +20 -0
  536. package/dist/web/index.html +145 -0
  537. package/dist/web/main-RI5CO5Z4.js +1 -0
  538. package/dist/web/styles-CYN7IKT4.css +1 -0
  539. package/dist/workflows/condition-evaluator.d.ts +75 -0
  540. package/dist/workflows/condition-evaluator.d.ts.map +1 -0
  541. package/dist/workflows/condition-evaluator.js +282 -0
  542. package/dist/workflows/condition-evaluator.js.map +1 -0
  543. package/dist/workflows/defaults/index.d.ts +26 -0
  544. package/dist/workflows/defaults/index.d.ts.map +1 -0
  545. package/dist/workflows/defaults/index.js +94 -0
  546. package/dist/workflows/defaults/index.js.map +1 -0
  547. package/dist/workflows/defaults/spec-fix.yaml +110 -0
  548. package/dist/workflows/defaults/spec-implement.yaml +150 -0
  549. package/dist/workflows/defaults/spec-relink.yaml +81 -0
  550. package/dist/workflows/defaults/spec-verify.yaml +51 -0
  551. package/dist/workflows/discovery.d.ts +46 -0
  552. package/dist/workflows/discovery.d.ts.map +1 -0
  553. package/dist/workflows/discovery.js +193 -0
  554. package/dist/workflows/discovery.js.map +1 -0
  555. package/dist/workflows/executor.d.ts +83 -0
  556. package/dist/workflows/executor.d.ts.map +1 -0
  557. package/dist/workflows/executor.js +623 -0
  558. package/dist/workflows/executor.js.map +1 -0
  559. package/dist/workflows/runners/approval.d.ts +18 -0
  560. package/dist/workflows/runners/approval.d.ts.map +1 -0
  561. package/dist/workflows/runners/approval.js +34 -0
  562. package/dist/workflows/runners/approval.js.map +1 -0
  563. package/dist/workflows/runners/bash.d.ts +13 -0
  564. package/dist/workflows/runners/bash.d.ts.map +1 -0
  565. package/dist/workflows/runners/bash.js +143 -0
  566. package/dist/workflows/runners/bash.js.map +1 -0
  567. package/dist/workflows/runners/cancel.d.ts +10 -0
  568. package/dist/workflows/runners/cancel.d.ts.map +1 -0
  569. package/dist/workflows/runners/cancel.js +19 -0
  570. package/dist/workflows/runners/cancel.js.map +1 -0
  571. package/dist/workflows/runners/prompt.d.ts +28 -0
  572. package/dist/workflows/runners/prompt.d.ts.map +1 -0
  573. package/dist/workflows/runners/prompt.js +212 -0
  574. package/dist/workflows/runners/prompt.js.map +1 -0
  575. package/dist/workflows/runners/script.d.ts +17 -0
  576. package/dist/workflows/runners/script.d.ts.map +1 -0
  577. package/dist/workflows/runners/script.js +155 -0
  578. package/dist/workflows/runners/script.js.map +1 -0
  579. package/dist/workflows/runners/types.d.ts +51 -0
  580. package/dist/workflows/runners/types.d.ts.map +1 -0
  581. package/dist/workflows/runners/types.js +13 -0
  582. package/dist/workflows/runners/types.js.map +1 -0
  583. package/dist/workflows/schemas/workflow.d.ts +166 -0
  584. package/dist/workflows/schemas/workflow.d.ts.map +1 -0
  585. package/dist/workflows/schemas/workflow.js +437 -0
  586. package/dist/workflows/schemas/workflow.js.map +1 -0
  587. package/hooks/hooks.json +27 -0
  588. package/package.json +67 -0
  589. package/scripts/add-lang/bench.sh +60 -0
  590. package/scripts/add-lang/check-grammar.mjs +75 -0
  591. package/scripts/add-lang/dump-ast.mjs +103 -0
  592. package/scripts/add-lang/verify-extraction.mjs +70 -0
  593. package/scripts/agent-eval/arms-F.sh +21 -0
  594. package/scripts/agent-eval/arms-matrix.sh +37 -0
  595. package/scripts/agent-eval/audit.sh +68 -0
  596. package/scripts/agent-eval/bench-readme.sh +28 -0
  597. package/scripts/agent-eval/bench-why-repo.sh +22 -0
  598. package/scripts/agent-eval/block-read-hook.sh +19 -0
  599. package/scripts/agent-eval/hook-settings.json +15 -0
  600. package/scripts/agent-eval/itrun.sh +120 -0
  601. package/scripts/agent-eval/parse-arms.mjs +116 -0
  602. package/scripts/agent-eval/parse-bench-readme.mjs +84 -0
  603. package/scripts/agent-eval/parse-run.mjs +45 -0
  604. package/scripts/agent-eval/parse-session.mjs +93 -0
  605. package/scripts/agent-eval/probe-context.mjs +21 -0
  606. package/scripts/agent-eval/probe-explore.mjs +40 -0
  607. package/scripts/agent-eval/probe-node.mjs +20 -0
  608. package/scripts/agent-eval/probe-sweep.mjs +119 -0
  609. package/scripts/agent-eval/probe-trace.mjs +20 -0
  610. package/scripts/agent-eval/run-agent.sh +34 -0
  611. package/scripts/agent-eval/run-all.sh +67 -0
  612. package/scripts/agent-eval/run-arms.sh +56 -0
  613. package/scripts/agent-eval/seq-matrix.mjs +137 -0
  614. package/scripts/build-bundle.sh +118 -0
  615. package/scripts/build-server-bundle.mjs +80 -0
  616. package/scripts/build-web-bundle.mjs +66 -0
  617. package/scripts/extract-release-notes.mjs +130 -0
  618. package/scripts/local-install.sh +41 -0
  619. package/scripts/npm-sdk.js +75 -0
  620. package/scripts/npm-shim.js +246 -0
  621. package/scripts/offline-install.ps1 +148 -0
  622. package/scripts/offline-install.sh +136 -0
  623. package/scripts/pack-npm.sh +119 -0
  624. package/scripts/prepare-release.mjs +270 -0
@@ -0,0 +1,582 @@
1
+ "use strict";
2
+ /**
3
+ * Claude Code target. Writes:
4
+ *
5
+ * - MCP server entry to `~/.claude.json` (global = user scope, loads
6
+ * in every project) or `./.mcp.json` (local = project scope, the
7
+ * file Claude Code actually reads for a single project). See the
8
+ * scope table at https://code.claude.com/docs/en/mcp.
9
+ * - Permissions to `~/.claude/settings.json` (global) or
10
+ * `./.claude/settings.json` (local), gated on `autoAllow`.
11
+ * - Instructions to `~/.claude/CLAUDE.md` (global) or
12
+ * `./.claude/CLAUDE.md` (local).
13
+ *
14
+ * Earlier versions wrote the local MCP entry to `./.claude.json` — a
15
+ * file Claude Code never reads — so the server silently never loaded
16
+ * until the user manually renamed it to `.mcp.json` (issue #207). We
17
+ * now write `./.mcp.json` and migrate any stale `./.claude.json` entry
18
+ * out of the way on install and uninstall.
19
+ */
20
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ var desc = Object.getOwnPropertyDescriptor(m, k);
23
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
+ desc = { enumerable: true, get: function() { return m[k]; } };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
27
+ }) : (function(o, m, k, k2) {
28
+ if (k2 === undefined) k2 = k;
29
+ o[k2] = m[k];
30
+ }));
31
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
32
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
33
+ }) : function(o, v) {
34
+ o["default"] = v;
35
+ });
36
+ var __importStar = (this && this.__importStar) || (function () {
37
+ var ownKeys = function(o) {
38
+ ownKeys = Object.getOwnPropertyNames || function (o) {
39
+ var ar = [];
40
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
41
+ return ar;
42
+ };
43
+ return ownKeys(o);
44
+ };
45
+ return function (mod) {
46
+ if (mod && mod.__esModule) return mod;
47
+ var result = {};
48
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
49
+ __setModuleDefault(result, mod);
50
+ return result;
51
+ };
52
+ })();
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.claudeTarget = void 0;
55
+ exports.writeMcpEntry = writeMcpEntry;
56
+ exports.cleanupLegacyHooks = cleanupLegacyHooks;
57
+ exports.cleanupCurrentHooks = cleanupCurrentHooks;
58
+ exports.writePermissionsEntry = writePermissionsEntry;
59
+ exports.removeInstructionsEntry = removeInstructionsEntry;
60
+ exports.writeHooksEntry = writeHooksEntry;
61
+ exports.writeCommandsEntries = writeCommandsEntries;
62
+ exports.writeAgentsEntries = writeAgentsEntries;
63
+ exports.removeCommandsEntries = removeCommandsEntries;
64
+ exports.removeAgentsEntries = removeAgentsEntries;
65
+ const fs = __importStar(require("fs"));
66
+ const path = __importStar(require("path"));
67
+ const os = __importStar(require("os"));
68
+ const shared_1 = require("./shared");
69
+ const instructions_template_1 = require("../instructions-template");
70
+ function configDir(loc) {
71
+ return loc === 'global'
72
+ ? path.join(os.homedir(), '.claude')
73
+ : path.join(process.cwd(), '.claude');
74
+ }
75
+ function mcpJsonPath(loc) {
76
+ // global → ~/.claude.json (user scope: visible in every project).
77
+ // local → ./.mcp.json (project scope: the ONLY project-level MCP
78
+ // file Claude Code reads — NOT ./.claude.json, which it ignores).
79
+ return loc === 'global'
80
+ ? path.join(os.homedir(), '.claude.json')
81
+ : path.join(process.cwd(), '.mcp.json');
82
+ }
83
+ /**
84
+ * Where pre-#207 installers wrote the local MCP entry. Claude Code
85
+ * never reads a project-level `./.claude.json`, so we migrate the
86
+ * specship entry out of it on install and strip it on uninstall.
87
+ * Only the project-local path is legacy — global `~/.claude.json` is
88
+ * the correct user-scope location and is left untouched.
89
+ */
90
+ function legacyLocalMcpPath() {
91
+ return path.join(process.cwd(), '.claude.json');
92
+ }
93
+ function settingsJsonPath(loc) {
94
+ return path.join(configDir(loc), 'settings.json');
95
+ }
96
+ function instructionsPath(loc) {
97
+ return path.join(configDir(loc), 'CLAUDE.md');
98
+ }
99
+ function commandsDir(loc) {
100
+ return path.join(configDir(loc), 'commands');
101
+ }
102
+ function agentsDir(loc) {
103
+ return path.join(configDir(loc), 'agents');
104
+ }
105
+ /**
106
+ * Plugin-asset source dir at the package root — same `commands/`,
107
+ * `agents/`, `hooks/` directories that ship the plugin manifest path.
108
+ * Resolves identically from `src/installer/targets/claude.ts` (dev /
109
+ * test) and `dist/installer/targets/claude.js` (installed npm package).
110
+ */
111
+ function packageAssetPath(...segments) {
112
+ return path.join(__dirname, '..', '..', '..', ...segments);
113
+ }
114
+ /** Slash commands the installer copies into Claude's commands dir. */
115
+ const SHIPPED_COMMANDS = [
116
+ 'cg-sync.md',
117
+ 'cg-trace.md',
118
+ 'cg-explore.md',
119
+ 'cg-impact.md',
120
+ // Spec-layer commands (v5):
121
+ 'cg-spec.md',
122
+ 'cg-implement.md',
123
+ 'cg-drifted.md',
124
+ 'cg-fix.md',
125
+ 'cg-relink.md',
126
+ ];
127
+ /** Subagents the installer copies into Claude's agents dir. */
128
+ const SHIPPED_AGENTS = ['specship-explorer.md'];
129
+ /** The PostToolUse + SessionStart hooks the installer writes. */
130
+ const SPECSHIP_HOOKS = [
131
+ {
132
+ event: 'PostToolUse',
133
+ matcher: 'Edit|Write|MultiEdit',
134
+ hook: { type: 'command', command: 'specship sync --quiet', async: true },
135
+ },
136
+ {
137
+ event: 'SessionStart',
138
+ matcher: 'startup|resume',
139
+ hook: { type: 'command', command: 'specship sync --quiet' },
140
+ },
141
+ ];
142
+ class ClaudeCodeTarget {
143
+ id = 'claude';
144
+ displayName = 'Claude Code';
145
+ docsUrl = 'https://docs.claude.com/en/docs/claude-code';
146
+ supportsLocation(_loc) {
147
+ return true;
148
+ }
149
+ detect(loc) {
150
+ const mcpPath = mcpJsonPath(loc);
151
+ const config = (0, shared_1.readJsonFile)(mcpPath);
152
+ const alreadyConfigured = !!config.mcpServers?.specship;
153
+ // For "installed" we infer from the existence of either the dir
154
+ // (global) or the project marker file (local). Cheap and avoids
155
+ // shelling out to `claude --version`.
156
+ const installed = loc === 'global'
157
+ ? fs.existsSync(configDir(loc)) || fs.existsSync(mcpPath)
158
+ : fs.existsSync(mcpPath) || fs.existsSync(configDir(loc));
159
+ return { installed, alreadyConfigured, configPath: mcpPath };
160
+ }
161
+ install(loc, opts) {
162
+ const files = [];
163
+ // 1. MCP server entry
164
+ files.push(writeMcpEntry(loc));
165
+ // 1b. Migrate away any stale ./.claude.json left by a pre-#207
166
+ // local install, so the project isn't left with two competing
167
+ // (one dead) MCP configs.
168
+ if (loc === 'local') {
169
+ const migrated = cleanupLegacyLocalMcp();
170
+ if (migrated)
171
+ files.push(migrated);
172
+ }
173
+ // 2. Permissions (only when autoAllow)
174
+ if (opts.autoAllow) {
175
+ files.push(writePermissionsEntry(loc));
176
+ }
177
+ // 2b. Strip stale auto-sync hooks left by a pre-0.8 install. Those
178
+ // versions wrote `specship mark-dirty` / `sync-if-dirty` hooks to
179
+ // settings.json; both subcommands are gone from the CLI, so the
180
+ // Stop hook now fails every turn with "unknown command
181
+ // 'sync-if-dirty'". Cleaning up on install makes an upgrade
182
+ // self-healing. Only surfaced when something was actually removed.
183
+ const hookCleanup = cleanupLegacyHooks(loc);
184
+ if (hookCleanup.action === 'removed')
185
+ files.push(hookCleanup);
186
+ // 2c. Write the current auto-sync hooks (PostToolUse + SessionStart
187
+ // running `specship sync --quiet`). Gated on autoAllow — same
188
+ // posture as the permissions list since both auto-execute commands
189
+ // without prompting. Idempotent: re-running with identical hooks
190
+ // already in settings.json returns 'unchanged'.
191
+ if (opts.autoAllow) {
192
+ files.push(writeHooksEntry(loc));
193
+ }
194
+ // 3. CLAUDE.md instructions — no longer written. The specship
195
+ // usage guidance now ships solely in the MCP server's `initialize`
196
+ // response (see `mcp/server-instructions.ts`), which Claude Code
197
+ // surfaces in the system prompt automatically. Writing it into
198
+ // CLAUDE.md as well meant the agent read the same playbook twice
199
+ // every turn (issue #529). Strip any block a previous install left
200
+ // behind so an upgrade self-heals — same idiom as the hook cleanup.
201
+ const instrCleanup = removeInstructionsEntry(loc);
202
+ if (instrCleanup.action === 'removed')
203
+ files.push(instrCleanup);
204
+ // 4. Slash commands + the specship-explorer subagent. NOT gated on
205
+ // autoAllow — these only execute when the user / agent invokes them
206
+ // explicitly. Copies the same .md files that ship for the plugin
207
+ // install path, so the two flows can't drift apart.
208
+ for (const f of writeCommandsEntries(loc))
209
+ files.push(f);
210
+ for (const f of writeAgentsEntries(loc))
211
+ files.push(f);
212
+ return { files };
213
+ }
214
+ uninstall(loc) {
215
+ const files = [];
216
+ // 1. MCP server entry
217
+ const mcpPath = mcpJsonPath(loc);
218
+ const config = (0, shared_1.readJsonFile)(mcpPath);
219
+ if (config.mcpServers?.specship) {
220
+ delete config.mcpServers.specship;
221
+ if (Object.keys(config.mcpServers).length === 0) {
222
+ delete config.mcpServers;
223
+ }
224
+ (0, shared_1.writeJsonFile)(mcpPath, config);
225
+ files.push({ path: mcpPath, action: 'removed' });
226
+ }
227
+ else {
228
+ files.push({ path: mcpPath, action: 'not-found' });
229
+ }
230
+ // 1b. Also strip the specship entry from a legacy ./.claude.json
231
+ // so uninstall fully reverses a pre-#207 local install.
232
+ if (loc === 'local') {
233
+ const migrated = cleanupLegacyLocalMcp();
234
+ if (migrated)
235
+ files.push(migrated);
236
+ }
237
+ // 2. Permissions
238
+ const settingsPath = settingsJsonPath(loc);
239
+ const settings = (0, shared_1.readJsonFile)(settingsPath);
240
+ if (Array.isArray(settings.permissions?.allow)) {
241
+ const before = settings.permissions.allow.length;
242
+ settings.permissions.allow = settings.permissions.allow.filter((p) => !p.startsWith('mcp__specship__'));
243
+ if (settings.permissions.allow.length !== before) {
244
+ if (settings.permissions.allow.length === 0) {
245
+ delete settings.permissions.allow;
246
+ }
247
+ if (Object.keys(settings.permissions).length === 0) {
248
+ delete settings.permissions;
249
+ }
250
+ (0, shared_1.writeJsonFile)(settingsPath, settings);
251
+ files.push({ path: settingsPath, action: 'removed' });
252
+ }
253
+ else {
254
+ files.push({ path: settingsPath, action: 'not-found' });
255
+ }
256
+ }
257
+ else {
258
+ files.push({ path: settingsPath, action: 'not-found' });
259
+ }
260
+ // 2b. Strip auto-sync hooks the installer wrote — both the
261
+ // current `specship sync --quiet` form (writeHooksEntry) and the
262
+ // legacy `mark-dirty`/`sync-if-dirty` forms (pre-0.8). Two passes
263
+ // so each predicate stays narrow and we never accidentally strip a
264
+ // user-written hook.
265
+ const currentCleanup = cleanupCurrentHooks(loc);
266
+ if (currentCleanup.action === 'removed')
267
+ files.push(currentCleanup);
268
+ const legacyCleanup = cleanupLegacyHooks(loc);
269
+ if (legacyCleanup.action === 'removed')
270
+ files.push(legacyCleanup);
271
+ // 3. Instructions — strip the legacy SpecShip block if present.
272
+ files.push(removeInstructionsEntry(loc));
273
+ // 4. Slash commands + subagent — remove our shipped files; sibling
274
+ // user-written .md files in the same dir are left untouched.
275
+ for (const f of removeCommandsEntries(loc))
276
+ files.push(f);
277
+ for (const f of removeAgentsEntries(loc))
278
+ files.push(f);
279
+ return { files };
280
+ }
281
+ printConfig(loc) {
282
+ const target = mcpJsonPath(loc);
283
+ const snippet = JSON.stringify({ mcpServers: { specship: (0, shared_1.getMcpServerConfig)() } }, null, 2);
284
+ return `# Add to ${target}\n\n${snippet}\n`;
285
+ }
286
+ describePaths(loc) {
287
+ return [
288
+ mcpJsonPath(loc),
289
+ settingsJsonPath(loc),
290
+ instructionsPath(loc),
291
+ ...SHIPPED_COMMANDS.map((f) => path.join(commandsDir(loc), f)),
292
+ ...SHIPPED_AGENTS.map((f) => path.join(agentsDir(loc), f)),
293
+ ];
294
+ }
295
+ }
296
+ /**
297
+ * Per-file write helpers, exported so the legacy `config-writer.ts`
298
+ * shim can call only the named operation (writeMcpConfig writes ONLY
299
+ * the MCP entry, etc.) instead of `claudeTarget.install()` which
300
+ * writes all three files. Without this split the shims silently
301
+ * cause side effects callers don't expect.
302
+ */
303
+ function writeMcpEntry(loc) {
304
+ const file = mcpJsonPath(loc);
305
+ const existing = (0, shared_1.readJsonFile)(file);
306
+ const before = existing.mcpServers?.specship;
307
+ const after = (0, shared_1.getMcpServerConfig)();
308
+ if ((0, shared_1.jsonDeepEqual)(before, after)) {
309
+ // Already exactly what we'd write — preserve byte-identical file.
310
+ return { path: file, action: 'unchanged' };
311
+ }
312
+ // 'created' here means: the file itself did not exist before this
313
+ // write. A pre-existing MCP JSON file (`~/.claude.json` globally,
314
+ // `./.mcp.json` locally) containing other MCP servers (no
315
+ // `specship` key) is 'updated', not 'created' — we're adding an
316
+ // entry to a file that was already there. Codex uses a different
317
+ // idiom (empty-content => 'created') because its config.toml is
318
+ // ours alone to manage.
319
+ const action = before ? 'updated' : (fs.existsSync(file) ? 'updated' : 'created');
320
+ if (!existing.mcpServers)
321
+ existing.mcpServers = {};
322
+ existing.mcpServers.specship = after;
323
+ (0, shared_1.writeJsonFile)(file, existing);
324
+ return { path: file, action };
325
+ }
326
+ /**
327
+ * Strip the specship entry from a legacy project-local
328
+ * `./.claude.json` (written by pre-#207 installers, which Claude Code
329
+ * never read). Surgical: only our `specship` key is removed; sibling
330
+ * MCP servers and any unrelated keys are preserved, and the file is
331
+ * deleted only when removal leaves it completely empty. Returns the
332
+ * file action for reporting, or `null` when there's nothing to migrate.
333
+ */
334
+ function cleanupLegacyLocalMcp() {
335
+ const file = legacyLocalMcpPath();
336
+ if (!fs.existsSync(file))
337
+ return null;
338
+ const config = (0, shared_1.readJsonFile)(file);
339
+ if (!config.mcpServers?.specship)
340
+ return null;
341
+ delete config.mcpServers.specship;
342
+ if (Object.keys(config.mcpServers).length === 0)
343
+ delete config.mcpServers;
344
+ if (Object.keys(config).length === 0) {
345
+ try {
346
+ fs.unlinkSync(file);
347
+ }
348
+ catch { /* ignore */ }
349
+ }
350
+ else {
351
+ (0, shared_1.writeJsonFile)(file, config);
352
+ }
353
+ return { path: file, action: 'removed' };
354
+ }
355
+ /**
356
+ * True when a Claude Code hook `command` is one of the **pre-0.8**
357
+ * specship auto-sync hooks: `specship mark-dirty` (PostToolUse) /
358
+ * `specship sync-if-dirty` (Stop). Both subcommands have since been
359
+ * removed from the CLI, so the Stop hook fails every turn with
360
+ * "unknown command 'sync-if-dirty'" — stripping them on install
361
+ * (self-heal on upgrade) is what keeps the upgrade quiet. Local builds
362
+ * also wrote the npx form, which still contains the `specship
363
+ * <subcommand>` substring; the substring match covers both. Sibling
364
+ * user hooks (e.g. GitKraken's `gk ai hook run`) match nothing here.
365
+ *
366
+ * The **current** auto-sync hook form (`specship sync --quiet`) is
367
+ * NOT matched here — install writes those and would re-strip its own
368
+ * work if this predicate covered them. The uninstall flow uses
369
+ * `isCurrentSpecshipHookCommand` for those, on top of this one.
370
+ */
371
+ function isLegacySpecshipHookCommand(command) {
372
+ if (typeof command !== 'string')
373
+ return false;
374
+ return (command.includes('specship mark-dirty') ||
375
+ command.includes('specship sync-if-dirty'));
376
+ }
377
+ /**
378
+ * True when a hook `command` is one of the auto-sync hooks
379
+ * `writeHooksEntry` writes in this release (`specship sync --quiet`).
380
+ * Uninstall-only — install must NOT match these or it would destroy
381
+ * the entries it just wrote.
382
+ */
383
+ function isCurrentSpecshipHookCommand(command) {
384
+ if (typeof command !== 'string')
385
+ return false;
386
+ return SPECSHIP_HOOKS.some(({ hook }) => command === hook.command);
387
+ }
388
+ /**
389
+ * Strip specship hook commands matched by `predicate` from Claude
390
+ * `settings.json`. Surgical at the individual-command level: only
391
+ * matched entries are dropped, so a sibling hook sharing a matcher
392
+ * group (or the Stop event) survives. Matcher groups are pruned only
393
+ * once their `hooks` array is empty, events only once they have no
394
+ * groups left, and `hooks` itself only once every event is gone — and
395
+ * none of that runs unless we actually removed a command, so a
396
+ * settings.json with no matching hooks is left byte-for-byte untouched
397
+ * and reported `unchanged`.
398
+ */
399
+ function stripHooksMatching(loc, predicate) {
400
+ const file = settingsJsonPath(loc);
401
+ if (!fs.existsSync(file))
402
+ return { path: file, action: 'not-found' };
403
+ const settings = (0, shared_1.readJsonFile)(file);
404
+ const hooks = settings.hooks;
405
+ if (!hooks || typeof hooks !== 'object' || Array.isArray(hooks)) {
406
+ return { path: file, action: 'unchanged' };
407
+ }
408
+ let removedAny = false;
409
+ for (const event of Object.keys(hooks)) {
410
+ const groups = hooks[event];
411
+ if (!Array.isArray(groups))
412
+ continue;
413
+ for (const group of groups) {
414
+ if (!group || !Array.isArray(group.hooks))
415
+ continue;
416
+ const before = group.hooks.length;
417
+ group.hooks = group.hooks.filter((h) => !predicate(h?.command));
418
+ if (group.hooks.length !== before)
419
+ removedAny = true;
420
+ }
421
+ }
422
+ if (!removedAny)
423
+ return { path: file, action: 'unchanged' };
424
+ for (const event of Object.keys(hooks)) {
425
+ const groups = hooks[event];
426
+ if (!Array.isArray(groups))
427
+ continue;
428
+ hooks[event] = groups.filter((g) => !(g && Array.isArray(g.hooks) && g.hooks.length === 0));
429
+ if (hooks[event].length === 0)
430
+ delete hooks[event];
431
+ }
432
+ if (Object.keys(hooks).length === 0)
433
+ delete settings.hooks;
434
+ (0, shared_1.writeJsonFile)(file, settings);
435
+ return { path: file, action: 'removed' };
436
+ }
437
+ /**
438
+ * Remove stale **pre-0.8** specship auto-sync hooks
439
+ * (`specship mark-dirty` / `specship sync-if-dirty`) from Claude
440
+ * `settings.json`. Safe to call from both `install` (self-heal on
441
+ * upgrade) and `uninstall`. Exported so it can be unit-tested directly.
442
+ */
443
+ function cleanupLegacyHooks(loc) {
444
+ return stripHooksMatching(loc, isLegacySpecshipHookCommand);
445
+ }
446
+ /**
447
+ * Remove the current-release auto-sync hooks (`specship sync --quiet`)
448
+ * written by `writeHooksEntry`. Uninstall-only — install would
449
+ * destroy its own write if this ran there.
450
+ */
451
+ function cleanupCurrentHooks(loc) {
452
+ return stripHooksMatching(loc, isCurrentSpecshipHookCommand);
453
+ }
454
+ function writePermissionsEntry(loc) {
455
+ const file = settingsJsonPath(loc);
456
+ const settings = (0, shared_1.readJsonFile)(file);
457
+ const created = !fs.existsSync(file);
458
+ if (!settings.permissions)
459
+ settings.permissions = {};
460
+ if (!Array.isArray(settings.permissions.allow))
461
+ settings.permissions.allow = [];
462
+ const want = (0, shared_1.getSpecShipPermissions)();
463
+ const before = [...settings.permissions.allow];
464
+ for (const perm of want) {
465
+ if (!settings.permissions.allow.includes(perm)) {
466
+ settings.permissions.allow.push(perm);
467
+ }
468
+ }
469
+ if ((0, shared_1.jsonDeepEqual)(before, settings.permissions.allow) && !created) {
470
+ return { path: file, action: 'unchanged' };
471
+ }
472
+ (0, shared_1.writeJsonFile)(file, settings);
473
+ return { path: file, action: created ? 'created' : 'updated' };
474
+ }
475
+ /**
476
+ * Strip the marker-delimited SpecShip block from CLAUDE.md if a prior
477
+ * install wrote one. Specship no longer maintains an instructions file
478
+ * (issue #529) — the MCP server's `initialize` instructions are the
479
+ * single source of truth — so both install (self-heal on upgrade) and
480
+ * uninstall call this. `removeMarkedSection` returns `not-found`/`kept`
481
+ * when there's nothing to strip; the install caller drops those from
482
+ * the report so a fresh install stays quiet.
483
+ */
484
+ function removeInstructionsEntry(loc) {
485
+ const file = instructionsPath(loc);
486
+ const action = (0, shared_1.removeMarkedSection)(file, instructions_template_1.SPECSHIP_SECTION_START, instructions_template_1.SPECSHIP_SECTION_END);
487
+ return { path: file, action };
488
+ }
489
+ /**
490
+ * Write specship's auto-sync hooks into Claude `settings.json`. Merges
491
+ * idempotently into any user-defined hooks: a matcher group sharing our
492
+ * exact matcher string is reused; sibling matchers / events / events are
493
+ * untouched. Returns `unchanged` when our two hook commands are already
494
+ * present byte-for-byte in the right places.
495
+ *
496
+ * Gated by `install()` on `autoAllow` — same posture as the permissions
497
+ * list. The matching uninstall lives in `cleanupLegacyHooks` (whose
498
+ * matcher predicate covers BOTH the new `specship sync --quiet` form
499
+ * and the legacy `specship mark-dirty`/`sync-if-dirty` forms).
500
+ */
501
+ function writeHooksEntry(loc) {
502
+ const file = settingsJsonPath(loc);
503
+ const created = !fs.existsSync(file);
504
+ const settings = (0, shared_1.readJsonFile)(file);
505
+ const beforeJson = JSON.stringify(settings);
506
+ if (!settings.hooks || typeof settings.hooks !== 'object' || Array.isArray(settings.hooks)) {
507
+ settings.hooks = {};
508
+ }
509
+ for (const { event, matcher, hook } of SPECSHIP_HOOKS) {
510
+ if (!Array.isArray(settings.hooks[event]))
511
+ settings.hooks[event] = [];
512
+ let group = settings.hooks[event].find((g) => g && g.matcher === matcher);
513
+ if (!group) {
514
+ group = { matcher, hooks: [] };
515
+ settings.hooks[event].push(group);
516
+ }
517
+ if (!Array.isArray(group.hooks))
518
+ group.hooks = [];
519
+ // Idempotent: skip if a command-equal entry is already there.
520
+ if (!group.hooks.some((h) => h && h.command === hook.command)) {
521
+ group.hooks.push({ ...hook });
522
+ }
523
+ }
524
+ const afterJson = JSON.stringify(settings);
525
+ if (beforeJson === afterJson && !created) {
526
+ return { path: file, action: 'unchanged' };
527
+ }
528
+ (0, shared_1.writeJsonFile)(file, settings);
529
+ return { path: file, action: created ? 'created' : 'updated' };
530
+ }
531
+ /**
532
+ * Copy our shipped slash commands (commands/cg-*.md) into the user's
533
+ * commands dir (~/.claude/commands/ globally, ./.claude/commands/
534
+ * locally). Per-file idempotent: a destination with identical bytes is
535
+ * reported `unchanged`. Sibling user-written .md files in the same dir
536
+ * are never touched.
537
+ */
538
+ function writeCommandsEntries(loc) {
539
+ return SHIPPED_COMMANDS.map((name) => copyAsset(packageAssetPath('commands', name), path.join(commandsDir(loc), name)));
540
+ }
541
+ /**
542
+ * Copy our shipped subagent (agents/specship-explorer.md) into the
543
+ * user's agents dir. Same idempotency contract as writeCommandsEntries.
544
+ */
545
+ function writeAgentsEntries(loc) {
546
+ return SHIPPED_AGENTS.map((name) => copyAsset(packageAssetPath('agents', name), path.join(agentsDir(loc), name)));
547
+ }
548
+ /**
549
+ * Inverse of writeCommandsEntries: delete each cg-*.md we shipped, if
550
+ * present. A file the user replaced with their own content is still
551
+ * removed — match the existing uninstall posture for files specship
552
+ * owns (the user can re-add their version after).
553
+ */
554
+ function removeCommandsEntries(loc) {
555
+ return SHIPPED_COMMANDS.map((name) => removeFile(path.join(commandsDir(loc), name)));
556
+ }
557
+ /** Inverse of writeAgentsEntries. */
558
+ function removeAgentsEntries(loc) {
559
+ return SHIPPED_AGENTS.map((name) => removeFile(path.join(agentsDir(loc), name)));
560
+ }
561
+ function copyAsset(src, dest) {
562
+ const body = fs.readFileSync(src, 'utf-8');
563
+ if (fs.existsSync(dest)) {
564
+ const existing = fs.readFileSync(dest, 'utf-8');
565
+ if (existing === body)
566
+ return { path: dest, action: 'unchanged' };
567
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
568
+ fs.writeFileSync(dest, body);
569
+ return { path: dest, action: 'updated' };
570
+ }
571
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
572
+ fs.writeFileSync(dest, body);
573
+ return { path: dest, action: 'created' };
574
+ }
575
+ function removeFile(p) {
576
+ if (!fs.existsSync(p))
577
+ return { path: p, action: 'not-found' };
578
+ fs.unlinkSync(p);
579
+ return { path: p, action: 'removed' };
580
+ }
581
+ exports.claudeTarget = new ClaudeCodeTarget();
582
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/installer/targets/claude.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiRH,sCAsBC;AAsHD,gDAEC;AAOD,kDAEC;AAED,sDAoBC;AAWD,0DAIC;AAcD,0CA+BC;AASD,oDAEC;AAMD,gDAEC;AAQD,sDAEC;AAGD,kDAEC;AA1hBD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAQzB,qCAOkB;AAClB,oEAGkC;AAElC,SAAS,SAAS,CAAC,GAAa;IAC9B,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC;QACpC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC;AACD,SAAS,WAAW,CAAC,GAAa;IAChC,kEAAkE;IAClE,kEAAkE;IAClE,kEAAkE;IAClE,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC;QACzC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC;AACD;;;;;;GAMG;AACH,SAAS,kBAAkB;IACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;AAClD,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAa;IACrC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC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AAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACxC,CAAC;AAEY,QAAA,YAAY,GAAgB,IAAI,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Registry of supported agent targets.
3
+ *
4
+ * Currently Claude-only. The interface is preserved so re-adding another
5
+ * agent is one new file in `targets/` plus one entry below.
6
+ */
7
+ import { AgentTarget, Location, TargetId } from './types';
8
+ export declare const ALL_TARGETS: readonly AgentTarget[];
9
+ export declare function getTarget(id: string): AgentTarget | undefined;
10
+ export declare function listTargetIds(): TargetId[];
11
+ /**
12
+ * Run `detect()` for every target at the given location. Returns the
13
+ * registry zipped with detection results.
14
+ */
15
+ export declare function detectAll(loc: Location): Array<{
16
+ target: AgentTarget;
17
+ detection: ReturnType<AgentTarget['detect']>;
18
+ }>;
19
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG1D,eAAO,MAAM,WAAW,EAAE,SAAS,WAAW,EAAkC,CAAC;AAEjF,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE7D;AAED,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAE1C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC9C,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC9C,CAAC,CAKD"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * Registry of supported agent targets.
4
+ *
5
+ * Currently Claude-only. The interface is preserved so re-adding another
6
+ * agent is one new file in `targets/` plus one entry below.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ALL_TARGETS = void 0;
10
+ exports.getTarget = getTarget;
11
+ exports.listTargetIds = listTargetIds;
12
+ exports.detectAll = detectAll;
13
+ const claude_1 = require("./claude");
14
+ exports.ALL_TARGETS = Object.freeze([claude_1.claudeTarget]);
15
+ function getTarget(id) {
16
+ return exports.ALL_TARGETS.find((t) => t.id === id);
17
+ }
18
+ function listTargetIds() {
19
+ return exports.ALL_TARGETS.map((t) => t.id);
20
+ }
21
+ /**
22
+ * Run `detect()` for every target at the given location. Returns the
23
+ * registry zipped with detection results.
24
+ */
25
+ function detectAll(loc) {
26
+ return exports.ALL_TARGETS.map((target) => ({
27
+ target,
28
+ detection: target.detect(loc),
29
+ }));
30
+ }
31
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,8BAEC;AAED,sCAEC;AAMD,8BAQC;AAxBD,qCAAwC;AAE3B,QAAA,WAAW,GAA2B,MAAM,CAAC,MAAM,CAAC,CAAC,qBAAY,CAAC,CAAC,CAAC;AAEjF,SAAgB,SAAS,CAAC,EAAU;IAClC,OAAO,mBAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,aAAa;IAC3B,OAAO,mBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,GAAa;IAIrC,OAAO,mBAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAClC,MAAM;QACN,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;KAC9B,CAAC,CAAC,CAAC;AACN,CAAC"}