@codemieai/code 0.0.58 → 0.2.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 (507) hide show
  1. package/README.md +69 -15
  2. package/bin/codebase-memory-ui-daemon.js +10 -0
  3. package/bin/codemie-codex.js +18 -0
  4. package/dist/agents/core/AgentCLI.d.ts +1 -0
  5. package/dist/agents/core/AgentCLI.d.ts.map +1 -1
  6. package/dist/agents/core/AgentCLI.js +29 -4
  7. package/dist/agents/core/AgentCLI.js.map +1 -1
  8. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  9. package/dist/agents/core/BaseAgentAdapter.js +3 -0
  10. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  11. package/dist/agents/core/session/sync-state-utils.d.ts +11 -0
  12. package/dist/agents/core/session/sync-state-utils.d.ts.map +1 -0
  13. package/dist/agents/core/session/sync-state-utils.js +99 -0
  14. package/dist/agents/core/session/sync-state-utils.js.map +1 -0
  15. package/dist/agents/core/session/types.d.ts +8 -0
  16. package/dist/agents/core/session/types.d.ts.map +1 -1
  17. package/dist/agents/core/session/utils/jsonl-reader.d.ts +8 -0
  18. package/dist/agents/core/session/utils/jsonl-reader.d.ts.map +1 -1
  19. package/dist/agents/core/session/utils/jsonl-reader.js +37 -0
  20. package/dist/agents/core/session/utils/jsonl-reader.js.map +1 -1
  21. package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
  22. package/dist/agents/plugins/claude/claude.plugin.js +18 -0
  23. package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
  24. package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
  25. package/dist/agents/plugins/claude/plugin/commands/README.md +2 -31
  26. package/dist/agents/plugins/claude/plugin/commands/codemie-catchup.md +5 -0
  27. package/dist/agents/plugins/claude/plugin/commands/codemie-subagents.md +5 -0
  28. package/dist/agents/plugins/claude/plugin/hooks/hooks.json +0 -15
  29. package/dist/agents/plugins/claude/plugin/skills/msgraph/README.md +4 -1
  30. package/dist/agents/plugins/claude/plugin/skills/msgraph/SKILL.md +27 -8
  31. package/dist/agents/plugins/claude/plugin/skills/msgraph/scripts/msgraph.js +63 -3
  32. package/dist/agents/plugins/claude/plugin/skills/report-issue/SKILL.md +1 -0
  33. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
  34. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +2 -0
  35. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
  36. package/dist/agents/plugins/codex/codex-message-types.d.ts +80 -0
  37. package/dist/agents/plugins/codex/codex-message-types.d.ts.map +1 -0
  38. package/dist/agents/plugins/codex/codex-message-types.js +36 -0
  39. package/dist/agents/plugins/codex/codex-message-types.js.map +1 -0
  40. package/dist/agents/plugins/codex/codex-models.d.ts +9 -0
  41. package/dist/agents/plugins/codex/codex-models.d.ts.map +1 -0
  42. package/dist/agents/plugins/codex/codex-models.js +227 -0
  43. package/dist/agents/plugins/codex/codex-models.js.map +1 -0
  44. package/dist/agents/plugins/codex/codex.incremental-sync.d.ts +39 -0
  45. package/dist/agents/plugins/codex/codex.incremental-sync.d.ts.map +1 -0
  46. package/dist/agents/plugins/codex/codex.incremental-sync.js +147 -0
  47. package/dist/agents/plugins/codex/codex.incremental-sync.js.map +1 -0
  48. package/dist/agents/plugins/codex/codex.paths.d.ts +29 -0
  49. package/dist/agents/plugins/codex/codex.paths.d.ts.map +1 -0
  50. package/dist/agents/plugins/codex/codex.paths.js +43 -0
  51. package/dist/agents/plugins/codex/codex.paths.js.map +1 -0
  52. package/dist/agents/plugins/codex/codex.plugin.d.ts +80 -0
  53. package/dist/agents/plugins/codex/codex.plugin.d.ts.map +1 -0
  54. package/dist/agents/plugins/codex/codex.plugin.js +474 -0
  55. package/dist/agents/plugins/codex/codex.plugin.js.map +1 -0
  56. package/dist/agents/plugins/codex/codex.reconciliation.d.ts +43 -0
  57. package/dist/agents/plugins/codex/codex.reconciliation.d.ts.map +1 -0
  58. package/dist/agents/plugins/codex/codex.reconciliation.js +141 -0
  59. package/dist/agents/plugins/codex/codex.reconciliation.js.map +1 -0
  60. package/dist/agents/plugins/codex/codex.session.d.ts +58 -0
  61. package/dist/agents/plugins/codex/codex.session.d.ts.map +1 -0
  62. package/dist/agents/plugins/codex/codex.session.js +326 -0
  63. package/dist/agents/plugins/codex/codex.session.js.map +1 -0
  64. package/dist/agents/plugins/codex/codex.storage-utils.d.ts +15 -0
  65. package/dist/agents/plugins/codex/codex.storage-utils.d.ts.map +1 -0
  66. package/dist/agents/plugins/codex/codex.storage-utils.js +19 -0
  67. package/dist/agents/plugins/codex/codex.storage-utils.js.map +1 -0
  68. package/dist/agents/plugins/codex/index.d.ts +7 -0
  69. package/dist/agents/plugins/codex/index.d.ts.map +1 -0
  70. package/dist/agents/plugins/codex/index.js +9 -0
  71. package/dist/agents/plugins/codex/index.js.map +1 -0
  72. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.d.ts +24 -0
  73. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.d.ts.map +1 -0
  74. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.js +613 -0
  75. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.js.map +1 -0
  76. package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.d.ts +21 -0
  77. package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.d.ts.map +1 -0
  78. package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.js +124 -0
  79. package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.js.map +1 -0
  80. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts.map +1 -1
  81. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js +1 -0
  82. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -1
  83. package/dist/agents/plugins/opencode/opencode.storage-utils.d.ts.map +1 -1
  84. package/dist/agents/plugins/opencode/opencode.storage-utils.js +2 -29
  85. package/dist/agents/plugins/opencode/opencode.storage-utils.js.map +1 -1
  86. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts.map +1 -1
  87. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js.map +1 -1
  88. package/dist/agents/registry.d.ts.map +1 -1
  89. package/dist/agents/registry.js +2 -0
  90. package/dist/agents/registry.js.map +1 -1
  91. package/dist/assets/demo.gif +0 -0
  92. package/dist/assets/skills-sh-egress-guard.cjs +166 -0
  93. package/dist/bin/codebase-memory-ui-daemon.d.ts +2 -0
  94. package/dist/bin/codebase-memory-ui-daemon.d.ts.map +1 -0
  95. package/dist/bin/codebase-memory-ui-daemon.js +141 -0
  96. package/dist/bin/codebase-memory-ui-daemon.js.map +1 -0
  97. package/dist/bin/proxy-daemon.js +4 -0
  98. package/dist/bin/proxy-daemon.js.map +1 -1
  99. package/dist/cli/commands/assistants/constants.js +2 -2
  100. package/dist/cli/commands/assistants/constants.js.map +1 -1
  101. package/dist/cli/commands/assistants/setup/configuration/constants.js +4 -4
  102. package/dist/cli/commands/assistants/setup/configuration/constants.js.map +1 -1
  103. package/dist/cli/commands/assistants/setup/configuration/ui.d.ts.map +1 -1
  104. package/dist/cli/commands/assistants/setup/configuration/ui.js +10 -13
  105. package/dist/cli/commands/assistants/setup/configuration/ui.js.map +1 -1
  106. package/dist/cli/commands/assistants/setup/constants.d.ts +1 -25
  107. package/dist/cli/commands/assistants/setup/constants.d.ts.map +1 -1
  108. package/dist/cli/commands/assistants/setup/constants.js +1 -20
  109. package/dist/cli/commands/assistants/setup/constants.js.map +1 -1
  110. package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.d.ts +4 -4
  111. package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.d.ts.map +1 -1
  112. package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.js +11 -10
  113. package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.js.map +1 -1
  114. package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.d.ts +4 -4
  115. package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.d.ts.map +1 -1
  116. package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js +11 -9
  117. package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js.map +1 -1
  118. package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.d.ts +4 -0
  119. package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.d.ts.map +1 -0
  120. package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.js +76 -0
  121. package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.js.map +1 -0
  122. package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.d.ts +4 -0
  123. package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.d.ts.map +1 -0
  124. package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.js +68 -0
  125. package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.js.map +1 -0
  126. package/dist/cli/commands/assistants/setup/helpers.d.ts +5 -18
  127. package/dist/cli/commands/assistants/setup/helpers.d.ts.map +1 -1
  128. package/dist/cli/commands/assistants/setup/helpers.js +45 -60
  129. package/dist/cli/commands/assistants/setup/helpers.js.map +1 -1
  130. package/dist/cli/commands/assistants/setup/index.d.ts +3 -9
  131. package/dist/cli/commands/assistants/setup/index.d.ts.map +1 -1
  132. package/dist/cli/commands/assistants/setup/index.js +26 -167
  133. package/dist/cli/commands/assistants/setup/index.js.map +1 -1
  134. package/dist/cli/commands/assistants/setup/manualConfiguration/types.d.ts +2 -2
  135. package/dist/cli/commands/assistants/setup/manualConfiguration/ui.js +2 -2
  136. package/dist/cli/commands/assistants/setup/manualConfiguration/ui.js.map +1 -1
  137. package/dist/cli/commands/assistants/setup/selection/actions.d.ts +1 -30
  138. package/dist/cli/commands/assistants/setup/selection/actions.d.ts.map +1 -1
  139. package/dist/cli/commands/assistants/setup/selection/actions.js +1 -320
  140. package/dist/cli/commands/assistants/setup/selection/actions.js.map +1 -1
  141. package/dist/cli/commands/assistants/setup/selection/constants.d.ts +3 -65
  142. package/dist/cli/commands/assistants/setup/selection/constants.d.ts.map +1 -1
  143. package/dist/cli/commands/assistants/setup/selection/constants.js +4 -81
  144. package/dist/cli/commands/assistants/setup/selection/constants.js.map +1 -1
  145. package/dist/cli/commands/assistants/setup/selection/index.d.ts +1 -9
  146. package/dist/cli/commands/assistants/setup/selection/index.d.ts.map +1 -1
  147. package/dist/cli/commands/assistants/setup/selection/index.js +14 -34
  148. package/dist/cli/commands/assistants/setup/selection/index.js.map +1 -1
  149. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts +1 -19
  150. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts.map +1 -1
  151. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js +1 -338
  152. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js.map +1 -1
  153. package/dist/cli/commands/assistants/setup/selection/types.d.ts +7 -23
  154. package/dist/cli/commands/assistants/setup/selection/types.d.ts.map +1 -1
  155. package/dist/cli/commands/assistants/setup/selection/ui.d.ts +0 -8
  156. package/dist/cli/commands/assistants/setup/selection/ui.d.ts.map +1 -1
  157. package/dist/cli/commands/assistants/setup/selection/ui.js +14 -135
  158. package/dist/cli/commands/assistants/setup/selection/ui.js.map +1 -1
  159. package/dist/cli/commands/assistants/setup/summary/index.d.ts.map +1 -1
  160. package/dist/cli/commands/assistants/setup/summary/index.js +14 -8
  161. package/dist/cli/commands/assistants/setup/summary/index.js.map +1 -1
  162. package/dist/cli/commands/codebase/daemon-manager.d.ts +24 -0
  163. package/dist/cli/commands/codebase/daemon-manager.d.ts.map +1 -0
  164. package/dist/cli/commands/codebase/daemon-manager.js +112 -0
  165. package/dist/cli/commands/codebase/daemon-manager.js.map +1 -0
  166. package/dist/cli/commands/codebase/index.d.ts +3 -0
  167. package/dist/cli/commands/codebase/index.d.ts.map +1 -0
  168. package/dist/cli/commands/codebase/index.js +130 -0
  169. package/dist/cli/commands/codebase/index.js.map +1 -0
  170. package/dist/cli/commands/doctor/index.d.ts.map +1 -1
  171. package/dist/cli/commands/doctor/index.js +10 -1
  172. package/dist/cli/commands/doctor/index.js.map +1 -1
  173. package/dist/cli/commands/hook.d.ts.map +1 -1
  174. package/dist/cli/commands/hook.js +15 -2
  175. package/dist/cli/commands/hook.js.map +1 -1
  176. package/dist/cli/commands/install.js +2 -2
  177. package/dist/cli/commands/install.js.map +1 -1
  178. package/dist/cli/commands/profile/index.d.ts +14 -0
  179. package/dist/cli/commands/profile/index.d.ts.map +1 -1
  180. package/dist/cli/commands/profile/index.js +110 -27
  181. package/dist/cli/commands/profile/index.js.map +1 -1
  182. package/dist/cli/commands/proxy/connectors/desktop-managed-mcp-servers.json +50 -0
  183. package/dist/cli/commands/proxy/connectors/desktop.d.ts +17 -9
  184. package/dist/cli/commands/proxy/connectors/desktop.d.ts.map +1 -1
  185. package/dist/cli/commands/proxy/connectors/desktop.js +139 -19
  186. package/dist/cli/commands/proxy/connectors/desktop.js.map +1 -1
  187. package/dist/cli/commands/proxy/daemon-manager.d.ts +1 -0
  188. package/dist/cli/commands/proxy/daemon-manager.d.ts.map +1 -1
  189. package/dist/cli/commands/proxy/daemon-manager.js +2 -0
  190. package/dist/cli/commands/proxy/daemon-manager.js.map +1 -1
  191. package/dist/cli/commands/proxy/index.d.ts.map +1 -1
  192. package/dist/cli/commands/proxy/index.js +131 -52
  193. package/dist/cli/commands/proxy/index.js.map +1 -1
  194. package/dist/cli/commands/setup.d.ts.map +1 -1
  195. package/dist/cli/commands/setup.js +3 -1
  196. package/dist/cli/commands/setup.js.map +1 -1
  197. package/dist/cli/commands/shared/agent-targets.d.ts +10 -0
  198. package/dist/cli/commands/shared/agent-targets.d.ts.map +1 -0
  199. package/dist/cli/commands/shared/agent-targets.js +220 -0
  200. package/dist/cli/commands/shared/agent-targets.js.map +1 -0
  201. package/dist/cli/commands/shared/constants.d.ts +15 -0
  202. package/dist/cli/commands/shared/constants.d.ts.map +1 -0
  203. package/dist/cli/commands/shared/constants.js +10 -0
  204. package/dist/cli/commands/shared/constants.js.map +1 -0
  205. package/dist/cli/commands/shared/helpers.d.ts +12 -0
  206. package/dist/cli/commands/shared/helpers.d.ts.map +1 -0
  207. package/dist/cli/commands/shared/helpers.js +54 -0
  208. package/dist/cli/commands/shared/helpers.js.map +1 -0
  209. package/dist/cli/commands/shared/prompts/storage-scope.d.ts +6 -0
  210. package/dist/cli/commands/shared/prompts/storage-scope.d.ts.map +1 -0
  211. package/dist/cli/commands/shared/prompts/storage-scope.js +91 -0
  212. package/dist/cli/commands/shared/prompts/storage-scope.js.map +1 -0
  213. package/dist/cli/commands/shared/selection/actions.d.ts +40 -0
  214. package/dist/cli/commands/shared/selection/actions.d.ts.map +1 -0
  215. package/dist/cli/commands/shared/selection/actions.js +264 -0
  216. package/dist/cli/commands/shared/selection/actions.js.map +1 -0
  217. package/dist/cli/commands/shared/selection/constants.d.ts +68 -0
  218. package/dist/cli/commands/shared/selection/constants.d.ts.map +1 -0
  219. package/dist/cli/commands/shared/selection/constants.js +70 -0
  220. package/dist/cli/commands/shared/selection/constants.js.map +1 -0
  221. package/dist/cli/commands/shared/selection/interactive-prompt.d.ts +16 -0
  222. package/dist/cli/commands/shared/selection/interactive-prompt.d.ts.map +1 -0
  223. package/dist/cli/commands/shared/selection/interactive-prompt.js +276 -0
  224. package/dist/cli/commands/shared/selection/interactive-prompt.js.map +1 -0
  225. package/dist/cli/commands/shared/selection/types.d.ts +31 -0
  226. package/dist/cli/commands/shared/selection/types.d.ts.map +1 -0
  227. package/dist/cli/commands/shared/selection/types.js +2 -0
  228. package/dist/cli/commands/shared/selection/types.js.map +1 -0
  229. package/dist/cli/commands/shared/selection/ui.d.ts +31 -0
  230. package/dist/cli/commands/shared/selection/ui.d.ts.map +1 -0
  231. package/dist/cli/commands/shared/selection/ui.js +126 -0
  232. package/dist/cli/commands/shared/selection/ui.js.map +1 -0
  233. package/dist/cli/commands/skills/add.d.ts +9 -0
  234. package/dist/cli/commands/skills/add.d.ts.map +1 -0
  235. package/dist/cli/commands/skills/add.js +187 -0
  236. package/dist/cli/commands/skills/add.js.map +1 -0
  237. package/dist/cli/commands/skills/find.d.ts +17 -0
  238. package/dist/cli/commands/skills/find.d.ts.map +1 -0
  239. package/dist/cli/commands/skills/find.js +94 -0
  240. package/dist/cli/commands/skills/find.js.map +1 -0
  241. package/dist/cli/commands/skills/index.d.ts +10 -0
  242. package/dist/cli/commands/skills/index.d.ts.map +1 -0
  243. package/dist/cli/commands/skills/index.js +23 -0
  244. package/dist/cli/commands/skills/index.js.map +1 -0
  245. package/dist/cli/commands/skills/lib/agent-detection.d.ts +27 -0
  246. package/dist/cli/commands/skills/lib/agent-detection.d.ts.map +1 -0
  247. package/dist/cli/commands/skills/lib/agent-detection.js +50 -0
  248. package/dist/cli/commands/skills/lib/agent-detection.js.map +1 -0
  249. package/dist/cli/commands/skills/lib/error-classify.d.ts +14 -0
  250. package/dist/cli/commands/skills/lib/error-classify.d.ts.map +1 -0
  251. package/dist/cli/commands/skills/lib/error-classify.js +64 -0
  252. package/dist/cli/commands/skills/lib/error-classify.js.map +1 -0
  253. package/dist/cli/commands/skills/lib/require-auth.d.ts +17 -0
  254. package/dist/cli/commands/skills/lib/require-auth.d.ts.map +1 -0
  255. package/dist/cli/commands/skills/lib/require-auth.js +44 -0
  256. package/dist/cli/commands/skills/lib/require-auth.js.map +1 -0
  257. package/dist/cli/commands/skills/lib/result-render.d.ts +26 -0
  258. package/dist/cli/commands/skills/lib/result-render.d.ts.map +1 -0
  259. package/dist/cli/commands/skills/lib/result-render.js +77 -0
  260. package/dist/cli/commands/skills/lib/result-render.js.map +1 -0
  261. package/dist/cli/commands/skills/lib/run-skills-cli.d.ts +46 -0
  262. package/dist/cli/commands/skills/lib/run-skills-cli.d.ts.map +1 -0
  263. package/dist/cli/commands/skills/lib/run-skills-cli.js +217 -0
  264. package/dist/cli/commands/skills/lib/run-skills-cli.js.map +1 -0
  265. package/dist/cli/commands/skills/lib/sanitize.d.ts +17 -0
  266. package/dist/cli/commands/skills/lib/sanitize.d.ts.map +1 -0
  267. package/dist/cli/commands/skills/lib/sanitize.js +73 -0
  268. package/dist/cli/commands/skills/lib/sanitize.js.map +1 -0
  269. package/dist/cli/commands/skills/lib/skills-metrics.d.ts +74 -0
  270. package/dist/cli/commands/skills/lib/skills-metrics.d.ts.map +1 -0
  271. package/dist/cli/commands/skills/lib/skills-metrics.js +304 -0
  272. package/dist/cli/commands/skills/lib/skills-metrics.js.map +1 -0
  273. package/dist/cli/commands/skills/lib/skills-search-client.d.ts +36 -0
  274. package/dist/cli/commands/skills/lib/skills-search-client.d.ts.map +1 -0
  275. package/dist/cli/commands/skills/lib/skills-search-client.js +147 -0
  276. package/dist/cli/commands/skills/lib/skills-search-client.js.map +1 -0
  277. package/dist/cli/commands/skills/lib/skills-sh-telemetry.d.ts +10 -0
  278. package/dist/cli/commands/skills/lib/skills-sh-telemetry.d.ts.map +1 -0
  279. package/dist/cli/commands/skills/lib/skills-sh-telemetry.js +33 -0
  280. package/dist/cli/commands/skills/lib/skills-sh-telemetry.js.map +1 -0
  281. package/dist/cli/commands/skills/list.d.ts +13 -0
  282. package/dist/cli/commands/skills/list.d.ts.map +1 -0
  283. package/dist/cli/commands/skills/list.js +55 -0
  284. package/dist/cli/commands/skills/list.js.map +1 -0
  285. package/dist/cli/commands/skills/remove.d.ts +11 -0
  286. package/dist/cli/commands/skills/remove.d.ts.map +1 -0
  287. package/dist/cli/commands/skills/remove.js +93 -0
  288. package/dist/cli/commands/skills/remove.js.map +1 -0
  289. package/dist/cli/commands/skills/setup/constants.d.ts +2 -0
  290. package/dist/cli/commands/skills/setup/constants.d.ts.map +1 -0
  291. package/dist/cli/commands/skills/setup/constants.js +2 -0
  292. package/dist/cli/commands/skills/setup/constants.js.map +1 -0
  293. package/dist/cli/commands/skills/setup/data.d.ts +28 -0
  294. package/dist/cli/commands/skills/setup/data.d.ts.map +1 -0
  295. package/dist/cli/commands/skills/setup/data.js +79 -0
  296. package/dist/cli/commands/skills/setup/data.js.map +1 -0
  297. package/dist/cli/commands/skills/setup/generators/claude-skill-generator.d.ts +12 -0
  298. package/dist/cli/commands/skills/setup/generators/claude-skill-generator.d.ts.map +1 -0
  299. package/dist/cli/commands/skills/setup/generators/claude-skill-generator.js +94 -0
  300. package/dist/cli/commands/skills/setup/generators/claude-skill-generator.js.map +1 -0
  301. package/dist/cli/commands/skills/setup/generators/codex-skill-generator.d.ts +4 -0
  302. package/dist/cli/commands/skills/setup/generators/codex-skill-generator.d.ts.map +1 -0
  303. package/dist/cli/commands/skills/setup/generators/codex-skill-generator.js +51 -0
  304. package/dist/cli/commands/skills/setup/generators/codex-skill-generator.js.map +1 -0
  305. package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.d.ts +4 -0
  306. package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.d.ts.map +1 -0
  307. package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.js +51 -0
  308. package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.js.map +1 -0
  309. package/dist/cli/commands/skills/setup/helpers.d.ts +13 -0
  310. package/dist/cli/commands/skills/setup/helpers.d.ts.map +1 -0
  311. package/dist/cli/commands/skills/setup/helpers.js +56 -0
  312. package/dist/cli/commands/skills/setup/helpers.js.map +1 -0
  313. package/dist/cli/commands/skills/setup/index.d.ts +6 -0
  314. package/dist/cli/commands/skills/setup/index.d.ts.map +1 -0
  315. package/dist/cli/commands/skills/setup/index.js +140 -0
  316. package/dist/cli/commands/skills/setup/index.js.map +1 -0
  317. package/dist/cli/commands/skills/setup/selection/actions.d.ts +2 -0
  318. package/dist/cli/commands/skills/setup/selection/actions.d.ts.map +1 -0
  319. package/dist/cli/commands/skills/setup/selection/actions.js +2 -0
  320. package/dist/cli/commands/skills/setup/selection/actions.js.map +1 -0
  321. package/dist/cli/commands/skills/setup/selection/constants.d.ts +11 -0
  322. package/dist/cli/commands/skills/setup/selection/constants.d.ts.map +1 -0
  323. package/dist/cli/commands/skills/setup/selection/constants.js +11 -0
  324. package/dist/cli/commands/skills/setup/selection/constants.js.map +1 -0
  325. package/dist/cli/commands/skills/setup/selection/index.d.ts +13 -0
  326. package/dist/cli/commands/skills/setup/selection/index.d.ts.map +1 -0
  327. package/dist/cli/commands/skills/setup/selection/index.js +113 -0
  328. package/dist/cli/commands/skills/setup/selection/index.js.map +1 -0
  329. package/dist/cli/commands/skills/setup/selection/interactive-prompt.d.ts +2 -0
  330. package/dist/cli/commands/skills/setup/selection/interactive-prompt.d.ts.map +1 -0
  331. package/dist/cli/commands/skills/setup/selection/interactive-prompt.js +2 -0
  332. package/dist/cli/commands/skills/setup/selection/interactive-prompt.js.map +1 -0
  333. package/dist/cli/commands/skills/setup/selection/types.d.ts +13 -0
  334. package/dist/cli/commands/skills/setup/selection/types.d.ts.map +1 -0
  335. package/dist/cli/commands/skills/setup/selection/types.js +2 -0
  336. package/dist/cli/commands/skills/setup/selection/types.js.map +1 -0
  337. package/dist/cli/commands/skills/setup/selection/ui.d.ts +3 -0
  338. package/dist/cli/commands/skills/setup/selection/ui.d.ts.map +1 -0
  339. package/dist/cli/commands/skills/setup/selection/ui.js +63 -0
  340. package/dist/cli/commands/skills/setup/selection/ui.js.map +1 -0
  341. package/dist/cli/commands/skills/setup/sync.d.ts +13 -0
  342. package/dist/cli/commands/skills/setup/sync.d.ts.map +1 -0
  343. package/dist/cli/commands/skills/setup/sync.js +46 -0
  344. package/dist/cli/commands/skills/setup/sync.js.map +1 -0
  345. package/dist/cli/commands/skills/update.d.ts +7 -0
  346. package/dist/cli/commands/skills/update.d.ts.map +1 -0
  347. package/dist/cli/commands/skills/update.js +71 -0
  348. package/dist/cli/commands/skills/update.js.map +1 -0
  349. package/dist/cli/commands/test-metrics.js +3 -4
  350. package/dist/cli/commands/test-metrics.js.map +1 -1
  351. package/dist/cli/first-time.d.ts.map +1 -1
  352. package/dist/cli/first-time.js +4 -0
  353. package/dist/cli/first-time.js.map +1 -1
  354. package/dist/cli/index.js +5 -0
  355. package/dist/cli/index.js.map +1 -1
  356. package/dist/env/types.d.ts +16 -0
  357. package/dist/env/types.d.ts.map +1 -1
  358. package/dist/env/types.js.map +1 -1
  359. package/dist/frameworks/plugins/bmad.plugin.d.ts +10 -1
  360. package/dist/frameworks/plugins/bmad.plugin.d.ts.map +1 -1
  361. package/dist/frameworks/plugins/bmad.plugin.js +108 -9
  362. package/dist/frameworks/plugins/bmad.plugin.js.map +1 -1
  363. package/dist/frameworks/plugins/codebase-memory.plugin.d.ts +18 -0
  364. package/dist/frameworks/plugins/codebase-memory.plugin.d.ts.map +1 -0
  365. package/dist/frameworks/plugins/codebase-memory.plugin.js +131 -0
  366. package/dist/frameworks/plugins/codebase-memory.plugin.js.map +1 -0
  367. package/dist/frameworks/plugins/index.d.ts +1 -0
  368. package/dist/frameworks/plugins/index.d.ts.map +1 -1
  369. package/dist/frameworks/plugins/index.js +3 -0
  370. package/dist/frameworks/plugins/index.js.map +1 -1
  371. package/dist/providers/core/types.d.ts +1 -1
  372. package/dist/providers/core/types.d.ts.map +1 -1
  373. package/dist/providers/plugins/anthropic-subscription/anthropic-subscription.template.d.ts.map +1 -1
  374. package/dist/providers/plugins/anthropic-subscription/anthropic-subscription.template.js +26 -2
  375. package/dist/providers/plugins/anthropic-subscription/anthropic-subscription.template.js.map +1 -1
  376. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts +31 -0
  377. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts.map +1 -0
  378. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js +148 -0
  379. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js.map +1 -0
  380. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts +20 -0
  381. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts.map +1 -0
  382. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js +104 -0
  383. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js.map +1 -0
  384. package/dist/providers/plugins/sso/proxy/plugins/gateway-key.plugin.d.ts.map +1 -1
  385. package/dist/providers/plugins/sso/proxy/plugins/gateway-key.plugin.js +24 -3
  386. package/dist/providers/plugins/sso/proxy/plugins/gateway-key.plugin.js.map +1 -1
  387. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +5 -0
  388. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
  389. package/dist/providers/plugins/sso/proxy/plugins/index.d.ts +14 -13
  390. package/dist/providers/plugins/sso/proxy/plugins/index.d.ts.map +1 -1
  391. package/dist/providers/plugins/sso/proxy/plugins/index.js +19 -17
  392. package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
  393. package/dist/providers/plugins/sso/proxy/plugins/logging.plugin.js +10 -3
  394. package/dist/providers/plugins/sso/proxy/plugins/logging.plugin.js.map +1 -1
  395. package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.d.ts.map +1 -1
  396. package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.js +26 -8
  397. package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.js.map +1 -1
  398. package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts.map +1 -1
  399. package/dist/providers/plugins/sso/proxy/sso.proxy.js +21 -4
  400. package/dist/providers/plugins/sso/proxy/sso.proxy.js.map +1 -1
  401. package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
  402. package/dist/providers/plugins/sso/session/SessionSyncer.js +5 -72
  403. package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
  404. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts +1 -1
  405. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts.map +1 -1
  406. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js +95 -4
  407. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js.map +1 -1
  408. package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts +2 -2
  409. package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts.map +1 -1
  410. package/dist/providers/plugins/sso/session/processors/conversations/constants.js +2 -2
  411. package/dist/providers/plugins/sso/session/processors/conversations/constants.js.map +1 -1
  412. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -1
  413. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +85 -21
  414. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
  415. package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts +10 -2
  416. package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts.map +1 -1
  417. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts +1 -1
  418. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts.map +1 -1
  419. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js +80 -46
  420. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js.map +1 -1
  421. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts +1 -9
  422. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts.map +1 -1
  423. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js +94 -30
  424. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js.map +1 -1
  425. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts +4 -6
  426. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts.map +1 -1
  427. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js +24 -25
  428. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js.map +1 -1
  429. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -1
  430. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js +140 -99
  431. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -1
  432. package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts +11 -3
  433. package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts.map +1 -1
  434. package/dist/providers/plugins/sso/sso.auth.d.ts.map +1 -1
  435. package/dist/providers/plugins/sso/sso.auth.js +22 -4
  436. package/dist/providers/plugins/sso/sso.auth.js.map +1 -1
  437. package/dist/providers/plugins/sso/sso.http-client.d.ts +1 -1
  438. package/dist/providers/plugins/sso/sso.http-client.js +3 -3
  439. package/dist/providers/plugins/sso/sso.http-client.js.map +1 -1
  440. package/dist/providers/plugins/sso/sso.models.js +2 -2
  441. package/dist/providers/plugins/sso/sso.models.js.map +1 -1
  442. package/dist/providers/plugins/sso/sso.setup-steps.d.ts.map +1 -1
  443. package/dist/providers/plugins/sso/sso.setup-steps.js +8 -12
  444. package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
  445. package/dist/telemetry/clients/claude-desktop/claude-desktop.paths.d.ts.map +1 -1
  446. package/dist/telemetry/clients/claude-desktop/claude-desktop.paths.js +4 -1
  447. package/dist/telemetry/clients/claude-desktop/claude-desktop.paths.js.map +1 -1
  448. package/dist/telemetry/runtime/DesktopTelemetryRuntime.d.ts.map +1 -1
  449. package/dist/telemetry/runtime/DesktopTelemetryRuntime.js +1 -3
  450. package/dist/telemetry/runtime/DesktopTelemetryRuntime.js.map +1 -1
  451. package/dist/utils/browser.d.ts +7 -0
  452. package/dist/utils/browser.d.ts.map +1 -0
  453. package/dist/utils/browser.js +10 -0
  454. package/dist/utils/browser.js.map +1 -0
  455. package/dist/utils/config.d.ts +14 -3
  456. package/dist/utils/config.d.ts.map +1 -1
  457. package/dist/utils/config.js +102 -6
  458. package/dist/utils/config.js.map +1 -1
  459. package/dist/utils/paths.d.ts +8 -0
  460. package/dist/utils/paths.d.ts.map +1 -1
  461. package/dist/utils/paths.js +15 -0
  462. package/dist/utils/paths.js.map +1 -1
  463. package/package.json +23 -10
  464. package/scripts/compare-codex-conversations.mjs +894 -0
  465. package/scripts/copy-plugins.js +5 -0
  466. package/scripts/sonar/package.json +3 -0
  467. package/scripts/sonar/run-local-sonar.js +405 -0
  468. package/scripts/validate-secrets.js +7 -3
  469. package/dist/agents/plugins/claude/plugin/claude-templates/README.md +0 -539
  470. package/dist/agents/plugins/claude/plugin/claude-templates/templates/CLAUDE.md.template +0 -252
  471. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/code-review-agent-template.md.template +0 -433
  472. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/refactor-cleaner-agent.md.template +0 -337
  473. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/solution-architect-agent.md.template +0 -197
  474. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/unit-tester-agent.md.template +0 -258
  475. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/api/api-patterns.md.template +0 -179
  476. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/architecture.md.template +0 -197
  477. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/data/database-patterns.md.template +0 -248
  478. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/development/development-practices.md.template +0 -298
  479. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/integration/external-integrations.md.template +0 -160
  480. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/security/security-practices.md.template +0 -295
  481. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/code-quality.md.template +0 -186
  482. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/git-workflow.md.template +0 -177
  483. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/testing/testing-patterns.md.template +0 -315
  484. package/dist/agents/plugins/claude/plugin/commands/codemie-commit.md +0 -31
  485. package/dist/agents/plugins/claude/plugin/commands/codemie-init.md +0 -523
  486. package/dist/agents/plugins/claude/plugin/commands/memory-refresh.md +0 -544
  487. package/dist/agents/plugins/claude/plugin/scripts/bash/rtk-auto-wrapper.sh +0 -81
  488. package/dist/agents/plugins/claude/plugin/scripts/bash/rtk-baseline.sh +0 -39
  489. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/SKILL.md +0 -206
  490. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-agent.md +0 -45
  491. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-claude-md-snippet.md +0 -40
  492. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-command.md +0 -30
  493. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-hooks.json +0 -23
  494. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-skill.md +0 -48
  495. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-agent.md +0 -145
  496. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-claude-md-snippet.md +0 -126
  497. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-command.md +0 -170
  498. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-hooks.json +0 -46
  499. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-skill.md +0 -144
  500. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/sample-report.md +0 -223
  501. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/best-practices.md +0 -510
  502. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/component-checklists.md +0 -413
  503. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/scripts/scan-repo.sh +0 -162
  504. package/dist/providers/plugins/sso/proxy/plugins/claude-thinking-transformer.plugin.d.ts +0 -30
  505. package/dist/providers/plugins/sso/proxy/plugins/claude-thinking-transformer.plugin.d.ts.map +0 -1
  506. package/dist/providers/plugins/sso/proxy/plugins/claude-thinking-transformer.plugin.js +0 -111
  507. package/dist/providers/plugins/sso/proxy/plugins/claude-thinking-transformer.plugin.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-render.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/skills/lib/result-render.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AASlF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAC;IAC/D,MAAM,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAC;CAC9D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAiBzD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAMzD"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Pure formatters for `codemie skills find` output.
3
+ *
4
+ * Two surfaces:
5
+ * - `renderSections` — chalk-colored two-section text for humans.
6
+ * - `renderJson` — machine-readable shape for `--json`.
7
+ *
8
+ * Both are deterministic given the same input. The orchestrator owns
9
+ * stdout/stderr writes and exit codes.
10
+ */
11
+ import chalk from 'chalk';
12
+ const PLACEHOLDER_INTERNAL_NOT_CONFIGURED = 'No internal results yet — internal catalog coming soon.';
13
+ const PUBLIC_UNAVAILABLE = 'Public search unavailable. Try again later.';
14
+ const NO_INTERNAL_RESULTS = 'No internal results.';
15
+ const NO_PUBLIC_RESULTS = 'No public results.';
16
+ const INSTALL_HINT = 'Install with: codemie skills add <owner/repo@skill>';
17
+ export function renderSections(input) {
18
+ const lines = [];
19
+ lines.push('');
20
+ lines.push(`${chalk.dim('Searching for')} ${chalk.bold(`"${input.query}"`)}${chalk.dim('…')}`);
21
+ lines.push('');
22
+ lines.push(chalk.bold('EPAM Internal'));
23
+ lines.push(...renderInternalBody(input));
24
+ lines.push('');
25
+ lines.push(chalk.bold('Public (skills.sh)'));
26
+ lines.push(...renderPublicBody(input.public));
27
+ lines.push('');
28
+ lines.push(chalk.dim(INSTALL_HINT));
29
+ lines.push('');
30
+ return lines.join('\n');
31
+ }
32
+ export function renderJson(input) {
33
+ return {
34
+ query: input.query,
35
+ internal: { available: input.internal.available, results: input.internal.results },
36
+ public: { available: input.public.available, results: input.public.results },
37
+ };
38
+ }
39
+ function renderInternalBody(input) {
40
+ if (!input.internalConfigured) {
41
+ return [` ${chalk.dim(PLACEHOLDER_INTERNAL_NOT_CONFIGURED)}`];
42
+ }
43
+ if (!input.internal.available || input.internal.results.length === 0) {
44
+ return [` ${chalk.dim(NO_INTERNAL_RESULTS)}`];
45
+ }
46
+ return formatResultBlock(input.internal.results);
47
+ }
48
+ function renderPublicBody(section) {
49
+ if (!section.available) {
50
+ return [` ${chalk.dim(PUBLIC_UNAVAILABLE)}`];
51
+ }
52
+ if (section.results.length === 0) {
53
+ return [` ${chalk.dim(NO_PUBLIC_RESULTS)}`];
54
+ }
55
+ return formatResultBlock(section.results);
56
+ }
57
+ function formatResultBlock(results) {
58
+ return results.flatMap((result) => {
59
+ const label = result.source && result.name ? `${result.source}@${result.name}` : result.slug;
60
+ const installs = formatInstalls(result.installs);
61
+ const headLine = installs ? ` ${label} ${chalk.cyan(installs)}` : ` ${label}`;
62
+ const detailLine = ` ${chalk.dim(`└ https://skills.sh/${result.slug}`)}`;
63
+ return [headLine, detailLine];
64
+ });
65
+ }
66
+ function formatInstalls(count) {
67
+ if (!count || count <= 0)
68
+ return '';
69
+ if (count >= 1_000_000) {
70
+ return `${(count / 1_000_000).toFixed(1).replace(/\.0$/, '')}M installs`;
71
+ }
72
+ if (count >= 1_000) {
73
+ return `${(count / 1_000).toFixed(1).replace(/\.0$/, '')}K installs`;
74
+ }
75
+ return `${count} install${count === 1 ? '' : 's'}`;
76
+ }
77
+ //# sourceMappingURL=result-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-render.js","sourceRoot":"","sources":["../../../../../src/cli/commands/skills/lib/result-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,mCAAmC,GACvC,yDAAyD,CAAC;AAC5D,MAAM,kBAAkB,GAAG,6CAA6C,CAAC;AACzE,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AACnD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAC/C,MAAM,YAAY,GAAG,qDAAqD,CAAC;AAoB3E,MAAM,UAAU,cAAc,CAAC,KAAkB;IAC/C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/F,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACxC,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7C,KAAK,CAAC,IAAI,CA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AAE,EAAE,CAAC,YAAY,CAAC;IAC3E,CAAC;IACD,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;QACnB,OAAO,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC;IACvE,CAAC;IACD,OAAO,GAAG,KAAK,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACrD,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Spawns the upstream `skills` CLI as a child Node process with safe defaults:
3
+ *
4
+ * - Blocks upstream telemetry/audit egress to `add-skill.vercel.sh` via a
5
+ * `NODE_OPTIONS=--require <shim>` injection.
6
+ * - Sets `DO_NOT_TRACK` / `DISABLE_TELEMETRY` / `CI` so the upstream
7
+ * `track()` env gate is closed.
8
+ * - Inherits stdio so interactive prompts from `skills.sh` keep working.
9
+ *
10
+ * Resolution rules:
11
+ *
12
+ * - The skills bin is resolved from the project's `node_modules`
13
+ * (`skills/bin/cli.mjs`).
14
+ * - The egress shim is resolved from this module's own directory; both the
15
+ * source layout (`<repo>/src/cli/commands/skills/lib`) and the dist layout
16
+ * (`<repo>/dist/cli/commands/skills/lib`) are supported by walking up to
17
+ * the package root and checking `dist/assets/...` first, then
18
+ * `assets/...` as a fallback for ts-node / dev runs.
19
+ */
20
+ import type { ExecResult } from '../../../../utils/exec.js';
21
+ export interface RunSkillsCliOptions {
22
+ cwd?: string;
23
+ /**
24
+ * When false, output is captured (used for non-interactive CLI flows like
25
+ * `list --json`). When true (default), stdio is inherited so the child can
26
+ * prompt the user.
27
+ */
28
+ interactive?: boolean;
29
+ /** Additional env to merge in (caller may override telemetry vars too). */
30
+ env?: Record<string, string>;
31
+ /** Maximum runtime before terminating the upstream CLI. */
32
+ timeoutMs?: number;
33
+ }
34
+ /**
35
+ * Spawn the upstream `skills` CLI directly (not via the project `exec()` helper)
36
+ * because that helper rejects on non-zero exit when `interactive: true`. We need
37
+ * to surface the real exit code so `classifySkillError()` can map upstream
38
+ * failures to stable `error_code` values; rejection collapses everything to
39
+ * `unknown`.
40
+ *
41
+ * Even in interactive mode, child stderr is captured (in addition to being
42
+ * tee'd to the parent terminal) so that markers like
43
+ * `CODEMIE_SKILL_EGRESS_BLOCKED` remain visible to the classifier.
44
+ */
45
+ export declare function runSkillsCli(args: string[], options?: RunSkillsCliOptions): Promise<ExecResult>;
46
+ //# sourceMappingURL=run-skills-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-skills-cli.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/skills/lib/run-skills-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAOlD,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,UAAU,CAAC,CAmJrB"}
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Spawns the upstream `skills` CLI as a child Node process with safe defaults:
3
+ *
4
+ * - Blocks upstream telemetry/audit egress to `add-skill.vercel.sh` via a
5
+ * `NODE_OPTIONS=--require <shim>` injection.
6
+ * - Sets `DO_NOT_TRACK` / `DISABLE_TELEMETRY` / `CI` so the upstream
7
+ * `track()` env gate is closed.
8
+ * - Inherits stdio so interactive prompts from `skills.sh` keep working.
9
+ *
10
+ * Resolution rules:
11
+ *
12
+ * - The skills bin is resolved from the project's `node_modules`
13
+ * (`skills/bin/cli.mjs`).
14
+ * - The egress shim is resolved from this module's own directory; both the
15
+ * source layout (`<repo>/src/cli/commands/skills/lib`) and the dist layout
16
+ * (`<repo>/dist/cli/commands/skills/lib`) are supported by walking up to
17
+ * the package root and checking `dist/assets/...` first, then
18
+ * `assets/...` as a fallback for ts-node / dev runs.
19
+ */
20
+ import { spawn } from 'node:child_process';
21
+ import { createRequire } from 'node:module';
22
+ import { existsSync } from 'node:fs';
23
+ import path from 'node:path';
24
+ import os from 'node:os';
25
+ import { logger } from '../../../../utils/logger.js';
26
+ import { getDirname } from '../../../../utils/paths.js';
27
+ import { SKILLS_SH_TELEMETRY_MARKER } from './skills-sh-telemetry.js';
28
+ const SHIM_FILENAME = 'skills-sh-egress-guard.cjs';
29
+ /**
30
+ * Spawn the upstream `skills` CLI directly (not via the project `exec()` helper)
31
+ * because that helper rejects on non-zero exit when `interactive: true`. We need
32
+ * to surface the real exit code so `classifySkillError()` can map upstream
33
+ * failures to stable `error_code` values; rejection collapses everything to
34
+ * `unknown`.
35
+ *
36
+ * Even in interactive mode, child stderr is captured (in addition to being
37
+ * tee'd to the parent terminal) so that markers like
38
+ * `CODEMIE_SKILL_EGRESS_BLOCKED` remain visible to the classifier.
39
+ */
40
+ export async function runSkillsCli(args, options = {}) {
41
+ const skillsBin = resolveSkillsBin();
42
+ const shimPath = resolveShimPath();
43
+ const interactive = options.interactive !== false;
44
+ const baseEnv = {
45
+ NODE_OPTIONS: buildNodeOptions(shimPath),
46
+ };
47
+ if (args[0] === 'add' || args[0] === 'remove' || args[0] === 'update') {
48
+ // We temporarily reopen upstream's telemetry gate only after resolving
49
+ // NODE_OPTIONS with the CodeMie egress guard shim. The shim captures the
50
+ // selected-skill payload locally and blocks add-skill.vercel.sh, so the
51
+ // request never leaves the machine.
52
+ baseEnv.DO_NOT_TRACK = '';
53
+ baseEnv.DISABLE_TELEMETRY = '';
54
+ baseEnv.CODEMIE_CAPTURE_SKILLS_SH_INSTALL_TELEMETRY = '1';
55
+ if (args[0] === 'update') {
56
+ baseEnv.CODEMIE_CAPTURE_SKILLS_SH_UPDATE_STDOUT = '1';
57
+ }
58
+ }
59
+ else {
60
+ baseEnv.DO_NOT_TRACK = '1';
61
+ baseEnv.DISABLE_TELEMETRY = '1';
62
+ }
63
+ // Force CI=1 only for non-interactive runs to suppress any prompts the
64
+ // upstream might fire. Forcing it on interactive runs interferes with
65
+ // Clack/inquirer prompt + spinner behavior; DO_NOT_TRACK / DISABLE_TELEMETRY
66
+ // already cover the telemetry gate.
67
+ if (!interactive) {
68
+ baseEnv.CI = process.env.CI ?? '1';
69
+ }
70
+ const env = { ...process.env, ...baseEnv, ...options.env };
71
+ const timeoutMs = options.timeoutMs;
72
+ logger.debug('[skills] Spawning skills CLI', {
73
+ bin: skillsBin,
74
+ args,
75
+ interactive,
76
+ shimPath,
77
+ });
78
+ return new Promise((resolve, reject) => {
79
+ // Interactive runs inherit stdout so the child sees a real TTY: Clack's
80
+ // multiselect renderer (used by skills.sh) computes visible rows from
81
+ // process.stdout.rows, which is undefined when stdout is a pipe — turning
82
+ // every prompt into an empty list. stderr stays piped so error markers
83
+ // (e.g. CODEMIE_SKILL_EGRESS_BLOCKED) still reach classifySkillError().
84
+ // Non-interactive callers (e.g. `list --json`) need captured stdout, so
85
+ // both streams pipe in that mode.
86
+ const stdio = interactive
87
+ ? ['inherit', 'inherit', 'pipe']
88
+ : ['inherit', 'pipe', 'pipe'];
89
+ const child = spawn(process.execPath, [skillsBin, ...args], {
90
+ cwd: options.cwd ?? process.cwd(),
91
+ env,
92
+ stdio,
93
+ windowsHide: os.platform() === 'win32',
94
+ });
95
+ let stdout = '';
96
+ let stderr = '';
97
+ let interactiveStderrBuffer = '';
98
+ let timedOut = false;
99
+ let timeout;
100
+ let forceKillTimeout;
101
+ let settled = false;
102
+ const cleanup = () => {
103
+ if (timeout) {
104
+ clearTimeout(timeout);
105
+ timeout = undefined;
106
+ }
107
+ if (forceKillTimeout) {
108
+ clearTimeout(forceKillTimeout);
109
+ forceKillTimeout = undefined;
110
+ }
111
+ };
112
+ const timeoutMessage = () => {
113
+ const seconds = Math.ceil((timeoutMs ?? 0) / 1000);
114
+ return `CODEMIE_SKILLS_TIMEOUT: skills CLI did not finish within ${seconds}s.`;
115
+ };
116
+ // stdout is null when inherited (interactive mode); only fires when piped.
117
+ child.stdout?.on('data', (data) => {
118
+ stdout += data.toString();
119
+ });
120
+ child.stderr?.on('data', (data) => {
121
+ const text = data.toString();
122
+ stderr += text;
123
+ if (interactive) {
124
+ interactiveStderrBuffer += text;
125
+ const lines = interactiveStderrBuffer.split(/\r?\n/);
126
+ interactiveStderrBuffer = lines.pop() ?? '';
127
+ for (const line of lines) {
128
+ if (!line.startsWith(`${SKILLS_SH_TELEMETRY_MARKER} `)) {
129
+ process.stderr.write(`${line}\n`);
130
+ }
131
+ }
132
+ }
133
+ });
134
+ child.on('error', (error) => {
135
+ if (settled) {
136
+ return;
137
+ }
138
+ settled = true;
139
+ cleanup();
140
+ reject(new Error(`Failed to spawn skills CLI: ${error.message}`));
141
+ });
142
+ child.on('close', (code, signal) => {
143
+ if (settled) {
144
+ return;
145
+ }
146
+ settled = true;
147
+ cleanup();
148
+ if (interactive &&
149
+ interactiveStderrBuffer.length > 0 &&
150
+ !interactiveStderrBuffer.startsWith(`${SKILLS_SH_TELEMETRY_MARKER} `)) {
151
+ process.stderr.write(interactiveStderrBuffer);
152
+ }
153
+ resolve({
154
+ code: timedOut ? 124 : code ?? (signal ? 130 : 1),
155
+ stdout: stdout.trim(),
156
+ stderr: stderr.trim(),
157
+ signal,
158
+ });
159
+ });
160
+ if (timeoutMs && timeoutMs > 0) {
161
+ timeout = setTimeout(() => {
162
+ timedOut = true;
163
+ const message = timeoutMessage();
164
+ stderr += stderr.length > 0 ? `\n${message}` : message;
165
+ child.kill('SIGTERM');
166
+ forceKillTimeout = setTimeout(() => {
167
+ if (!settled) {
168
+ child.kill('SIGKILL');
169
+ }
170
+ }, 5000);
171
+ }, timeoutMs);
172
+ }
173
+ });
174
+ }
175
+ function resolveSkillsBin() {
176
+ // Test-only override: e2e tests point this at a stub bin so they exercise
177
+ // the wrapper end-to-end without touching the network. Production code must
178
+ // never set this — it is intentionally undocumented to users.
179
+ const override = process.env.CODEMIE_SKILLS_BIN_OVERRIDE;
180
+ if (override && existsSync(override)) {
181
+ return override;
182
+ }
183
+ const requireFromHere = createRequire(import.meta.url);
184
+ try {
185
+ return requireFromHere.resolve('skills/bin/cli.mjs');
186
+ }
187
+ catch (error) {
188
+ throw new Error(`Failed to resolve "skills" CLI binary. Run "npm install" in the codemie-code package. Underlying error: ${error instanceof Error ? error.message : String(error)}`);
189
+ }
190
+ }
191
+ function resolveShimPath() {
192
+ const here = getDirname(import.meta.url);
193
+ // Walk up from <root>/src/cli/commands/skills/lib (or its dist twin) to <root>.
194
+ // Five "../" hops cover both layouts.
195
+ const projectRoot = path.resolve(here, '..', '..', '..', '..', '..');
196
+ const candidates = [
197
+ path.join(projectRoot, 'dist', 'assets', SHIM_FILENAME),
198
+ path.join(projectRoot, 'assets', SHIM_FILENAME),
199
+ ];
200
+ for (const candidate of candidates) {
201
+ if (existsSync(candidate)) {
202
+ return candidate;
203
+ }
204
+ }
205
+ throw new Error(`Failed to locate skills.sh egress guard shim "${SHIM_FILENAME}". Looked in: ${candidates.join(', ')}`);
206
+ }
207
+ function buildNodeOptions(shimAbsPath) {
208
+ // Forward slashes work on all platforms (Node accepts them on Windows too)
209
+ // and avoid backslash-handling edge cases in NODE_OPTIONS on Windows.
210
+ const normalizedPath = shimAbsPath.replaceAll('\\', '/');
211
+ const ours = `--require "${normalizedPath}"`;
212
+ const inherited = process.env.NODE_OPTIONS;
213
+ // Preserve user-supplied NODE_OPTIONS (e.g., --max-old-space-size) but
214
+ // append our require so the shim runs first in child processes.
215
+ return inherited ? `${inherited} ${ours}` : ours;
216
+ }
217
+ //# sourceMapping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- strip user:pass credentials from URLs
6
+ * - normalize the user's home directory to `~/...`
7
+ * - strip control characters
8
+ * - cap string length and list size
9
+ *
10
+ * Non-goals:
11
+ * - classifying source as GitHub/GitLab/internal/public
12
+ * - resolving aliases or catalog metadata
13
+ */
14
+ export declare function sanitizeSource(source: string | undefined): string | undefined;
15
+ export declare function capList(values: readonly string[] | undefined, max?: number): string[] | undefined;
16
+ export declare function stripControlChars(value: string): string;
17
+ //# sourceMappingURL=sanitize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/skills/lib/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAgB7E;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,GAAE,MAAuB,GAAG,MAAM,EAAE,GAAG,SAAS,CAejH;AAqBD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Sanitizers for optional wrapper-known metric values.
3
+ *
4
+ * Strict goals:
5
+ * - strip user:pass credentials from URLs
6
+ * - normalize the user's home directory to `~/...`
7
+ * - strip control characters
8
+ * - cap string length and list size
9
+ *
10
+ * Non-goals:
11
+ * - classifying source as GitHub/GitLab/internal/public
12
+ * - resolving aliases or catalog metadata
13
+ */
14
+ import os from 'node:os';
15
+ const MAX_SOURCE_LENGTH = 256;
16
+ const MAX_LIST_ITEMS = 20;
17
+ const MAX_LIST_ITEM_LENGTH = 128;
18
+ // eslint-disable-next-line no-control-regex
19
+ const CONTROL_CHARS = /[\u0000-\u001F\u007F]/g;
20
+ export function sanitizeSource(source) {
21
+ if (!source) {
22
+ return undefined;
23
+ }
24
+ const trimmed = source.trim();
25
+ if (trimmed.length === 0) {
26
+ return undefined;
27
+ }
28
+ let cleaned = stripCredentials(trimmed);
29
+ cleaned = normalizeHome(cleaned);
30
+ cleaned = stripControlChars(cleaned);
31
+ cleaned = capLength(cleaned, MAX_SOURCE_LENGTH);
32
+ return cleaned.length > 0 ? cleaned : undefined;
33
+ }
34
+ export function capList(values, max = MAX_LIST_ITEMS) {
35
+ if (!values || values.length === 0) {
36
+ return undefined;
37
+ }
38
+ const cleaned = values
39
+ .map((value) => stripControlChars(value).trim())
40
+ .filter((value) => value.length > 0)
41
+ .map((value) => capLength(value, MAX_LIST_ITEM_LENGTH));
42
+ if (cleaned.length === 0) {
43
+ return undefined;
44
+ }
45
+ return cleaned.slice(0, max);
46
+ }
47
+ function stripCredentials(value) {
48
+ // Match scheme://user:pass@host or scheme://user@host and remove the user info
49
+ return value.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^/@\s]+@)/, '$1');
50
+ }
51
+ function normalizeHome(value) {
52
+ const home = os.homedir();
53
+ if (!home) {
54
+ return value;
55
+ }
56
+ if (value === home) {
57
+ return '~';
58
+ }
59
+ if (value.startsWith(`${home}/`) || value.startsWith(`${home}\\`)) {
60
+ return `~${value.slice(home.length)}`;
61
+ }
62
+ return value;
63
+ }
64
+ export function stripControlChars(value) {
65
+ return value.replace(CONTROL_CHARS, '');
66
+ }
67
+ function capLength(value, max) {
68
+ if (value.length <= max) {
69
+ return value;
70
+ }
71
+ return `${value.slice(0, max - 1)}…`;
72
+ }
73
+ //# sourceMappingURL=sanitize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../../../../../src/cli/commands/skills/lib/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,oBAAoB,GAAG,GAAG,CAAC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AAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,+EAA+E;IAC/E,OAAO,KAAK,CAAC,OAAO,CAAC,4CAA4C,EAAE,IAAI,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;QAClE,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,GAAW;IAC3C,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;AACvC,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Lifecycle event emitter for `codemie skills *` commands.
3
+ *
4
+ * Each event is POSTed to the CodeMie backend at `/v1/skills/events`, where
5
+ * it is persisted in Postgres (authoritative, durable) and mirrored to the
6
+ * legacy Elastic-backed metrics path. Postgres survives Elastic retention,
7
+ * so install-count / popularity queries remain accurate forever.
8
+ *
9
+ * Behaviour:
10
+ * - **Auth-gated (spec §7).** If no SSO credentials are present, the helper
11
+ * becomes a no-op silently — no event is sent.
12
+ * - **Fan-out per skill.** When the wrapper knows which skills the operation
13
+ * targets (explicit `--skill foo bar`), one POST is emitted per skill so
14
+ * the backend stores `(event, skill)` rows and trivial COUNT(*) queries
15
+ * work. For ops without a specific skill (bare `list`, interactive `add`),
16
+ * a single POST is sent with `skill_*` fields null.
17
+ * - **Best-effort.** Any failure to load credentials, resolve the API URL,
18
+ * or POST is logged at debug level and swallowed — telemetry must never
19
+ * block a real user command.
20
+ */
21
+ export type SkillCommand = 'add' | 'update' | 'remove' | 'list' | 'find';
22
+ export type SkillStatus = 'started' | 'completed' | 'failed';
23
+ export type SkillScope = 'global' | 'project' | 'unknown';
24
+ export type AgentSelectionMode = 'explicit' | 'auto_detected' | 'prompted' | 'upstream';
25
+ interface PartialAttributes {
26
+ scope?: SkillScope;
27
+ source?: string;
28
+ skill_names?: string[];
29
+ skill_count?: number;
30
+ target_agents?: string[];
31
+ agent_selection_mode?: AgentSelectionMode;
32
+ error_code?: string;
33
+ /**
34
+ * Forward-compat escape hatch matching the backend `attributes` JSONB
35
+ * field on `SkillEventRequest`. Use this for command-specific telemetry
36
+ * that does not fit the strict top-level schema.
37
+ */
38
+ attributes?: Record<string, unknown>;
39
+ }
40
+ export interface SkillMetricSession {
41
+ command: SkillCommand;
42
+ sessionId: string;
43
+ agentVersion: string;
44
+ workingDirectory: string;
45
+ /**
46
+ * Resolved transport. `null` when no SSO credentials are available — every
47
+ * `emit*` becomes a no-op.
48
+ */
49
+ transport: SkillEventTransport | null;
50
+ }
51
+ interface SkillEventTransport {
52
+ apiUrl: string;
53
+ cookieHeader: string;
54
+ cliVersion: string;
55
+ }
56
+ /**
57
+ * Build a metric session for a single `codemie skills <command>` invocation.
58
+ * Loads SSO credentials best-effort; if anything fails, returns a session
59
+ * whose `transport` is null and the lifecycle helpers become no-ops.
60
+ */
61
+ export declare function startSkillMetric(command: SkillCommand, workingDirectory?: string): Promise<SkillMetricSession>;
62
+ export declare function emitStarted(session: SkillMetricSession, partial: Pick<PartialAttributes, 'scope' | 'source' | 'skill_names' | 'skill_count' | 'target_agents' | 'agent_selection_mode'>): Promise<void>;
63
+ export declare function emitCompleted(session: SkillMetricSession, partial: PartialAttributes): Promise<void>;
64
+ export declare function emitFailed(session: SkillMetricSession, partial: PartialAttributes): Promise<void>;
65
+ /**
66
+ * Mirror of upstream `skills` CLI `toSkillSlug`. Keeping the algorithm
67
+ * byte-for-byte identical means the canonical `<source>/<slug>` we send
68
+ * matches whatever the upstream tooling computes, so cross-system joins
69
+ * (e.g. comparing our install counts to skills.sh download counts) work
70
+ * without a translation layer.
71
+ */
72
+ export declare function toSkillSlug(name: string): string;
73
+ export {};
74
+ //# sourceMappingURL=skills-metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-metrics.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/skills/lib/skills-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAwBH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,eAAe,GAAG,UAAU,GAAG,UAAU,CAAC;AAExF,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,oBAAoB,CAAC,EAAE,kBAAkB,CAA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