@codemieai/code 0.0.45 → 0.0.47

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 (398) hide show
  1. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  2. package/dist/agents/core/BaseAgentAdapter.js +20 -3
  3. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  4. package/dist/agents/core/metrics/types.d.ts +0 -6
  5. package/dist/agents/core/metrics/types.d.ts.map +1 -1
  6. package/dist/agents/core/session/BaseSessionAdapter.d.ts +0 -6
  7. package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
  8. package/dist/agents/plugins/claude/claude.plugin-installer.d.ts +0 -11
  9. package/dist/agents/plugins/claude/claude.plugin-installer.d.ts.map +1 -1
  10. package/dist/agents/plugins/claude/claude.plugin-installer.js +0 -32
  11. package/dist/agents/plugins/claude/claude.plugin-installer.js.map +1 -1
  12. package/dist/agents/plugins/claude/claude.plugin.js +1 -1
  13. package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -1
  14. package/dist/agents/plugins/claude/claude.session.js +1 -28
  15. package/dist/agents/plugins/claude/claude.session.js.map +1 -1
  16. package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
  17. package/dist/agents/plugins/claude/plugin/README.md +1 -14
  18. package/dist/agents/plugins/claude/plugin/hooks/hooks.json +4 -4
  19. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/SKILL.md +206 -0
  20. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-agent.md +45 -0
  21. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-claude-md-snippet.md +40 -0
  22. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-command.md +30 -0
  23. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-hooks.json +23 -0
  24. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-skill.md +48 -0
  25. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-agent.md +145 -0
  26. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-claude-md-snippet.md +126 -0
  27. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-command.md +170 -0
  28. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-hooks.json +46 -0
  29. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-skill.md +144 -0
  30. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/sample-report.md +223 -0
  31. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/best-practices.md +510 -0
  32. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/component-checklists.md +413 -0
  33. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/scripts/scan-repo.sh +162 -0
  34. package/dist/agents/plugins/claude/plugin/skills/msgraph/README.md +183 -0
  35. package/dist/agents/plugins/claude/plugin/skills/msgraph/SKILL.md +233 -0
  36. package/dist/agents/plugins/claude/plugin/skills/msgraph/scripts/msgraph.py +785 -0
  37. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
  38. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +3 -78
  39. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
  40. package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.d.ts.map +1 -1
  41. package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js +7 -16
  42. package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js.map +1 -1
  43. package/dist/agents/plugins/claude/sounds-installer.d.ts +1 -1
  44. package/dist/agents/plugins/claude/sounds-installer.d.ts.map +1 -1
  45. package/dist/agents/plugins/claude/sounds-installer.js +1 -4
  46. package/dist/agents/plugins/claude/sounds-installer.js.map +1 -1
  47. package/dist/agents/plugins/codemie-code.plugin.d.ts +1 -4
  48. package/dist/agents/plugins/codemie-code.plugin.d.ts.map +1 -1
  49. package/dist/agents/plugins/codemie-code.plugin.js +26 -81
  50. package/dist/agents/plugins/codemie-code.plugin.js.map +1 -1
  51. package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts +1 -8
  52. package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts.map +1 -1
  53. package/dist/agents/plugins/gemini/gemini.session-adapter.js +2 -30
  54. package/dist/agents/plugins/gemini/gemini.session-adapter.js.map +1 -1
  55. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts.map +1 -1
  56. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js +2 -8
  57. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -1
  58. package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.d.ts.map +1 -1
  59. package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js +0 -7
  60. package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js.map +1 -1
  61. package/dist/agents/plugins/opencode/index.d.ts +1 -1
  62. package/dist/agents/plugins/opencode/index.d.ts.map +1 -1
  63. package/dist/agents/plugins/opencode/index.js.map +1 -1
  64. package/dist/agents/plugins/opencode/opencode-message-types.d.ts +2 -22
  65. package/dist/agents/plugins/opencode/opencode-message-types.d.ts.map +1 -1
  66. package/dist/agents/plugins/opencode/opencode-message-types.js.map +1 -1
  67. package/dist/agents/plugins/opencode/opencode.session.d.ts.map +1 -1
  68. package/dist/agents/plugins/opencode/opencode.session.js +5 -30
  69. package/dist/agents/plugins/opencode/opencode.session.js.map +1 -1
  70. package/dist/agents/plugins/opencode/opencode.sqlite-reader.d.ts.map +1 -1
  71. package/dist/agents/plugins/opencode/opencode.sqlite-reader.js +0 -2
  72. package/dist/agents/plugins/opencode/opencode.sqlite-reader.js.map +1 -1
  73. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts +0 -8
  74. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts.map +1 -1
  75. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js +8 -97
  76. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js.map +1 -1
  77. package/dist/cli/commands/analytics/aggregator.d.ts +0 -8
  78. package/dist/cli/commands/analytics/aggregator.d.ts.map +1 -1
  79. package/dist/cli/commands/analytics/aggregator.js +5 -100
  80. package/dist/cli/commands/analytics/aggregator.js.map +1 -1
  81. package/dist/cli/commands/analytics/data-loader.d.ts +0 -7
  82. package/dist/cli/commands/analytics/data-loader.d.ts.map +1 -1
  83. package/dist/cli/commands/analytics/data-loader.js +3 -10
  84. package/dist/cli/commands/analytics/data-loader.js.map +1 -1
  85. package/dist/cli/commands/analytics/exporter.d.ts.map +1 -1
  86. package/dist/cli/commands/analytics/exporter.js +0 -12
  87. package/dist/cli/commands/analytics/exporter.js.map +1 -1
  88. package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
  89. package/dist/cli/commands/analytics/formatter.js +0 -9
  90. package/dist/cli/commands/analytics/formatter.js.map +1 -1
  91. package/dist/cli/commands/analytics/types.d.ts +0 -17
  92. package/dist/cli/commands/analytics/types.d.ts.map +1 -1
  93. package/dist/cli/commands/assistants/chat/historyLoader.d.ts +22 -0
  94. package/dist/cli/commands/assistants/chat/historyLoader.d.ts.map +1 -0
  95. package/dist/cli/commands/assistants/chat/historyLoader.js +80 -0
  96. package/dist/cli/commands/assistants/chat/historyLoader.js.map +1 -0
  97. package/dist/cli/commands/assistants/{chat.d.ts → chat/index.d.ts} +1 -1
  98. package/dist/cli/commands/assistants/chat/index.d.ts.map +1 -0
  99. package/dist/cli/commands/assistants/{chat.js → chat/index.js} +54 -45
  100. package/dist/cli/commands/assistants/chat/index.js.map +1 -0
  101. package/dist/cli/commands/assistants/chat/types.d.ts +27 -0
  102. package/dist/cli/commands/assistants/chat/types.d.ts.map +1 -0
  103. package/dist/cli/commands/assistants/chat/types.js +5 -0
  104. package/dist/cli/commands/assistants/chat/types.js.map +1 -0
  105. package/dist/cli/commands/assistants/chat/utils.d.ts +12 -0
  106. package/dist/cli/commands/assistants/chat/utils.d.ts.map +1 -0
  107. package/dist/cli/commands/assistants/chat/utils.js +24 -0
  108. package/dist/cli/commands/assistants/chat/utils.js.map +1 -0
  109. package/dist/cli/commands/assistants/constants.d.ts +1 -0
  110. package/dist/cli/commands/assistants/constants.d.ts.map +1 -1
  111. package/dist/cli/commands/assistants/constants.js.map +1 -1
  112. package/dist/cli/commands/assistants/index.js +2 -2
  113. package/dist/cli/commands/assistants/index.js.map +1 -1
  114. package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.js +1 -1
  115. package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js +1 -1
  116. package/dist/cli/commands/assistants/setup/index.js +4 -4
  117. package/dist/cli/commands/assistants/setup/index.js.map +1 -1
  118. package/dist/cli/commands/assistants/setup/selection/index.d.ts +1 -1
  119. package/dist/cli/commands/assistants/setup/selection/index.d.ts.map +1 -1
  120. package/dist/cli/commands/assistants/setup/selection/index.js +5 -3
  121. package/dist/cli/commands/assistants/setup/selection/index.js.map +1 -1
  122. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts.map +1 -1
  123. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js +7 -1
  124. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js.map +1 -1
  125. package/dist/cli/commands/assistants/setup/selection/types.d.ts +2 -0
  126. package/dist/cli/commands/assistants/setup/selection/types.d.ts.map +1 -1
  127. package/dist/cli/commands/assistants/setup/selection/ui.d.ts.map +1 -1
  128. package/dist/cli/commands/assistants/setup/selection/ui.js +15 -4
  129. package/dist/cli/commands/assistants/setup/selection/ui.js.map +1 -1
  130. package/dist/cli/commands/hook.js +1 -1
  131. package/dist/cli/commands/hook.js.map +1 -1
  132. package/dist/cli/commands/plugin.d.ts +16 -0
  133. package/dist/cli/commands/plugin.d.ts.map +1 -0
  134. package/dist/cli/commands/plugin.js +210 -0
  135. package/dist/cli/commands/plugin.js.map +1 -0
  136. package/dist/cli/commands/setup.js +1 -1
  137. package/dist/cli/commands/skill.d.ts.map +1 -1
  138. package/dist/cli/commands/skill.js +3 -1
  139. package/dist/cli/commands/skill.js.map +1 -1
  140. package/dist/cli/commands/sound.d.ts +3 -0
  141. package/dist/cli/commands/sound.d.ts.map +1 -0
  142. package/dist/cli/commands/sound.js +87 -0
  143. package/dist/cli/commands/sound.js.map +1 -0
  144. package/dist/cli/commands/test-metrics.js +3 -5
  145. package/dist/cli/commands/test-metrics.js.map +1 -1
  146. package/dist/cli/index.js +4 -0
  147. package/dist/cli/index.js.map +1 -1
  148. package/dist/env/types.d.ts +8 -0
  149. package/dist/env/types.d.ts.map +1 -1
  150. package/dist/env/types.js.map +1 -1
  151. package/dist/plugins/core/index.d.ts +13 -0
  152. package/dist/plugins/core/index.d.ts.map +1 -0
  153. package/dist/plugins/core/index.js +15 -0
  154. package/dist/plugins/core/index.js.map +1 -0
  155. package/dist/plugins/core/manifest-parser.d.ts +28 -0
  156. package/dist/plugins/core/manifest-parser.d.ts.map +1 -0
  157. package/dist/plugins/core/manifest-parser.js +137 -0
  158. package/dist/plugins/core/manifest-parser.js.map +1 -0
  159. package/dist/plugins/core/plugin-cache.d.ts +65 -0
  160. package/dist/plugins/core/plugin-cache.d.ts.map +1 -0
  161. package/dist/plugins/core/plugin-cache.js +170 -0
  162. package/dist/plugins/core/plugin-cache.js.map +1 -0
  163. package/dist/plugins/core/plugin-loader.d.ts +21 -0
  164. package/dist/plugins/core/plugin-loader.d.ts.map +1 -0
  165. package/dist/plugins/core/plugin-loader.js +55 -0
  166. package/dist/plugins/core/plugin-loader.js.map +1 -0
  167. package/dist/plugins/core/plugin-resolver.d.ts +33 -0
  168. package/dist/plugins/core/plugin-resolver.d.ts.map +1 -0
  169. package/dist/plugins/core/plugin-resolver.js +118 -0
  170. package/dist/plugins/core/plugin-resolver.js.map +1 -0
  171. package/dist/plugins/core/types.d.ts +183 -0
  172. package/dist/plugins/core/types.d.ts.map +1 -0
  173. package/dist/plugins/core/types.js +22 -0
  174. package/dist/plugins/core/types.js.map +1 -0
  175. package/dist/plugins/loaders/agents-loader.d.ts +19 -0
  176. package/dist/plugins/loaders/agents-loader.d.ts.map +1 -0
  177. package/dist/plugins/loaders/agents-loader.js +92 -0
  178. package/dist/plugins/loaders/agents-loader.js.map +1 -0
  179. package/dist/plugins/loaders/hooks-loader.d.ts +27 -0
  180. package/dist/plugins/loaders/hooks-loader.d.ts.map +1 -0
  181. package/dist/plugins/loaders/hooks-loader.js +94 -0
  182. package/dist/plugins/loaders/hooks-loader.js.map +1 -0
  183. package/dist/plugins/loaders/mcp-loader.d.ts +24 -0
  184. package/dist/plugins/loaders/mcp-loader.d.ts.map +1 -0
  185. package/dist/plugins/loaders/mcp-loader.js +86 -0
  186. package/dist/plugins/loaders/mcp-loader.js.map +1 -0
  187. package/dist/plugins/loaders/skills-loader.d.ts +30 -0
  188. package/dist/plugins/loaders/skills-loader.d.ts.map +1 -0
  189. package/dist/plugins/loaders/skills-loader.js +167 -0
  190. package/dist/plugins/loaders/skills-loader.js.map +1 -0
  191. package/dist/providers/plugins/bedrock/bedrock.template.js +1 -1
  192. package/dist/providers/plugins/jwt/jwt.setup-steps.js +1 -1
  193. package/dist/providers/plugins/jwt/jwt.template.js +1 -1
  194. package/dist/providers/plugins/litellm/litellm.template.js +1 -1
  195. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +10 -0
  196. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
  197. package/dist/providers/plugins/sso/proxy/proxy-types.d.ts +3 -0
  198. package/dist/providers/plugins/sso/proxy/proxy-types.d.ts.map +1 -1
  199. package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
  200. package/dist/providers/plugins/sso/session/SessionSyncer.js +2 -3
  201. package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
  202. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts +21 -0
  203. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts.map +1 -0
  204. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js +159 -0
  205. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js.map +1 -0
  206. package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts +24 -0
  207. package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts.map +1 -0
  208. package/dist/providers/plugins/sso/session/processors/conversations/constants.js +36 -0
  209. package/dist/providers/plugins/sso/session/processors/conversations/constants.js.map +1 -0
  210. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts +19 -0
  211. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -0
  212. package/dist/providers/plugins/sso/session/processors/conversations/{conversation-sync-processor.js → syncProcessor.js} +48 -33
  213. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -0
  214. package/dist/providers/plugins/sso/session/processors/conversations/{conversation-types.d.ts → types.d.ts} +14 -2
  215. package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts.map +1 -0
  216. package/dist/providers/plugins/sso/session/processors/conversations/types.js +14 -0
  217. package/dist/providers/plugins/sso/session/processors/conversations/types.js.map +1 -0
  218. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts.map +1 -1
  219. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js +16 -17
  220. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js.map +1 -1
  221. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts +3 -3
  222. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts.map +1 -1
  223. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js +8 -38
  224. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js.map +1 -1
  225. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -1
  226. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js +2 -6
  227. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -1
  228. package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts +49 -31
  229. package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts.map +1 -1
  230. package/dist/providers/plugins/sso/sso.template.js +1 -1
  231. package/dist/{agents/codemie-code/skills → skills}/core/SkillDiscovery.d.ts +10 -0
  232. package/dist/skills/core/SkillDiscovery.d.ts.map +1 -0
  233. package/dist/{agents/codemie-code/skills → skills}/core/SkillDiscovery.js +64 -7
  234. package/dist/skills/core/SkillDiscovery.js.map +1 -0
  235. package/dist/skills/core/SkillManager.d.ts.map +1 -0
  236. package/dist/{agents/codemie-code/skills → skills}/core/SkillManager.js +15 -10
  237. package/dist/skills/core/SkillManager.js.map +1 -0
  238. package/dist/{agents/codemie-code/skills → skills}/core/types.d.ts +3 -25
  239. package/dist/skills/core/types.d.ts.map +1 -0
  240. package/dist/skills/core/types.js.map +1 -0
  241. package/dist/{agents/codemie-code/skills → skills}/index.d.ts +3 -3
  242. package/dist/skills/index.d.ts.map +1 -0
  243. package/dist/{agents/codemie-code/skills → skills}/index.js +2 -2
  244. package/dist/skills/index.js.map +1 -0
  245. package/dist/skills/sync/SkillSync.d.ts.map +1 -0
  246. package/dist/{agents/codemie-code/skills → skills}/sync/SkillSync.js +5 -3
  247. package/dist/skills/sync/SkillSync.js.map +1 -0
  248. package/dist/{agents/codemie-code/skills → skills}/utils/content-loader.d.ts +2 -12
  249. package/dist/skills/utils/content-loader.d.ts.map +1 -0
  250. package/dist/{agents/codemie-code/skills → skills}/utils/content-loader.js +3 -8
  251. package/dist/skills/utils/content-loader.js.map +1 -0
  252. package/dist/skills/utils/pattern-matcher.d.ts.map +1 -0
  253. package/dist/skills/utils/pattern-matcher.js.map +1 -0
  254. package/dist/utils/frontmatter.d.ts.map +1 -0
  255. package/dist/utils/frontmatter.js.map +1 -0
  256. package/package.json +1 -1
  257. package/dist/agents/codemie-code/agent.d.ts +0 -129
  258. package/dist/agents/codemie-code/agent.d.ts.map +0 -1
  259. package/dist/agents/codemie-code/agent.js +0 -1106
  260. package/dist/agents/codemie-code/agent.js.map +0 -1
  261. package/dist/agents/codemie-code/config.d.ts +0 -40
  262. package/dist/agents/codemie-code/config.d.ts.map +0 -1
  263. package/dist/agents/codemie-code/config.js +0 -293
  264. package/dist/agents/codemie-code/config.js.map +0 -1
  265. package/dist/agents/codemie-code/filters.d.ts +0 -91
  266. package/dist/agents/codemie-code/filters.d.ts.map +0 -1
  267. package/dist/agents/codemie-code/filters.js +0 -328
  268. package/dist/agents/codemie-code/filters.js.map +0 -1
  269. package/dist/agents/codemie-code/index.d.ts +0 -93
  270. package/dist/agents/codemie-code/index.d.ts.map +0 -1
  271. package/dist/agents/codemie-code/index.js +0 -359
  272. package/dist/agents/codemie-code/index.js.map +0 -1
  273. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +0 -87
  274. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +0 -1
  275. package/dist/agents/codemie-code/modes/contextAwarePlanning.js +0 -957
  276. package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +0 -1
  277. package/dist/agents/codemie-code/modes/planMode.d.ts +0 -116
  278. package/dist/agents/codemie-code/modes/planMode.d.ts.map +0 -1
  279. package/dist/agents/codemie-code/modes/planMode.js +0 -537
  280. package/dist/agents/codemie-code/modes/planMode.js.map +0 -1
  281. package/dist/agents/codemie-code/prompts.d.ts +0 -47
  282. package/dist/agents/codemie-code/prompts.d.ts.map +0 -1
  283. package/dist/agents/codemie-code/prompts.js +0 -207
  284. package/dist/agents/codemie-code/prompts.js.map +0 -1
  285. package/dist/agents/codemie-code/skills/core/SkillDiscovery.d.ts.map +0 -1
  286. package/dist/agents/codemie-code/skills/core/SkillDiscovery.js.map +0 -1
  287. package/dist/agents/codemie-code/skills/core/SkillManager.d.ts.map +0 -1
  288. package/dist/agents/codemie-code/skills/core/SkillManager.js.map +0 -1
  289. package/dist/agents/codemie-code/skills/core/types.d.ts.map +0 -1
  290. package/dist/agents/codemie-code/skills/core/types.js.map +0 -1
  291. package/dist/agents/codemie-code/skills/index.d.ts.map +0 -1
  292. package/dist/agents/codemie-code/skills/index.js.map +0 -1
  293. package/dist/agents/codemie-code/skills/sync/SkillSync.d.ts.map +0 -1
  294. package/dist/agents/codemie-code/skills/sync/SkillSync.js.map +0 -1
  295. package/dist/agents/codemie-code/skills/utils/content-loader.d.ts.map +0 -1
  296. package/dist/agents/codemie-code/skills/utils/content-loader.js.map +0 -1
  297. package/dist/agents/codemie-code/skills/utils/frontmatter.d.ts.map +0 -1
  298. package/dist/agents/codemie-code/skills/utils/frontmatter.js.map +0 -1
  299. package/dist/agents/codemie-code/skills/utils/pattern-matcher.d.ts.map +0 -1
  300. package/dist/agents/codemie-code/skills/utils/pattern-matcher.js.map +0 -1
  301. package/dist/agents/codemie-code/storage/todoStorage.d.ts +0 -78
  302. package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +0 -1
  303. package/dist/agents/codemie-code/storage/todoStorage.js +0 -225
  304. package/dist/agents/codemie-code/storage/todoStorage.js.map +0 -1
  305. package/dist/agents/codemie-code/tokenUtils.d.ts +0 -108
  306. package/dist/agents/codemie-code/tokenUtils.d.ts.map +0 -1
  307. package/dist/agents/codemie-code/tokenUtils.js +0 -220
  308. package/dist/agents/codemie-code/tokenUtils.js.map +0 -1
  309. package/dist/agents/codemie-code/toolMetadata.d.ts +0 -15
  310. package/dist/agents/codemie-code/toolMetadata.d.ts.map +0 -1
  311. package/dist/agents/codemie-code/toolMetadata.js +0 -316
  312. package/dist/agents/codemie-code/toolMetadata.js.map +0 -1
  313. package/dist/agents/codemie-code/tools/assistant-invocation.d.ts +0 -47
  314. package/dist/agents/codemie-code/tools/assistant-invocation.d.ts.map +0 -1
  315. package/dist/agents/codemie-code/tools/assistant-invocation.js +0 -129
  316. package/dist/agents/codemie-code/tools/assistant-invocation.js.map +0 -1
  317. package/dist/agents/codemie-code/tools/index.d.ts +0 -111
  318. package/dist/agents/codemie-code/tools/index.d.ts.map +0 -1
  319. package/dist/agents/codemie-code/tools/index.js +0 -424
  320. package/dist/agents/codemie-code/tools/index.js.map +0 -1
  321. package/dist/agents/codemie-code/tools/planning.d.ts +0 -54
  322. package/dist/agents/codemie-code/tools/planning.d.ts.map +0 -1
  323. package/dist/agents/codemie-code/tools/planning.js +0 -226
  324. package/dist/agents/codemie-code/tools/planning.js.map +0 -1
  325. package/dist/agents/codemie-code/types.d.ts +0 -459
  326. package/dist/agents/codemie-code/types.d.ts.map +0 -1
  327. package/dist/agents/codemie-code/types.js +0 -59
  328. package/dist/agents/codemie-code/types.js.map +0 -1
  329. package/dist/agents/codemie-code/ui/autocomplete.d.ts +0 -98
  330. package/dist/agents/codemie-code/ui/autocomplete.d.ts.map +0 -1
  331. package/dist/agents/codemie-code/ui/autocomplete.js +0 -145
  332. package/dist/agents/codemie-code/ui/autocomplete.js.map +0 -1
  333. package/dist/agents/codemie-code/ui/keyHandlers.d.ts +0 -112
  334. package/dist/agents/codemie-code/ui/keyHandlers.d.ts.map +0 -1
  335. package/dist/agents/codemie-code/ui/keyHandlers.js +0 -415
  336. package/dist/agents/codemie-code/ui/keyHandlers.js.map +0 -1
  337. package/dist/agents/codemie-code/ui/mentions.d.ts +0 -86
  338. package/dist/agents/codemie-code/ui/mentions.d.ts.map +0 -1
  339. package/dist/agents/codemie-code/ui/mentions.js +0 -122
  340. package/dist/agents/codemie-code/ui/mentions.js.map +0 -1
  341. package/dist/agents/codemie-code/ui/progressTracker.d.ts +0 -125
  342. package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +0 -1
  343. package/dist/agents/codemie-code/ui/progressTracker.js +0 -343
  344. package/dist/agents/codemie-code/ui/progressTracker.js.map +0 -1
  345. package/dist/agents/codemie-code/ui/terminalCodes.d.ts +0 -38
  346. package/dist/agents/codemie-code/ui/terminalCodes.d.ts.map +0 -1
  347. package/dist/agents/codemie-code/ui/terminalCodes.js +0 -42
  348. package/dist/agents/codemie-code/ui/terminalCodes.js.map +0 -1
  349. package/dist/agents/codemie-code/ui/todoPanel.d.ts +0 -112
  350. package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +0 -1
  351. package/dist/agents/codemie-code/ui/todoPanel.js +0 -321
  352. package/dist/agents/codemie-code/ui/todoPanel.js.map +0 -1
  353. package/dist/agents/codemie-code/ui.d.ts +0 -180
  354. package/dist/agents/codemie-code/ui.d.ts.map +0 -1
  355. package/dist/agents/codemie-code/ui.js +0 -1345
  356. package/dist/agents/codemie-code/ui.js.map +0 -1
  357. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +0 -87
  358. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +0 -1
  359. package/dist/agents/codemie-code/utils/progressionEnforcer.js +0 -293
  360. package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +0 -1
  361. package/dist/agents/codemie-code/utils/todoParser.d.ts +0 -41
  362. package/dist/agents/codemie-code/utils/todoParser.d.ts.map +0 -1
  363. package/dist/agents/codemie-code/utils/todoParser.js +0 -305
  364. package/dist/agents/codemie-code/utils/todoParser.js.map +0 -1
  365. package/dist/agents/codemie-code/utils/todoValidator.d.ts +0 -65
  366. package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +0 -1
  367. package/dist/agents/codemie-code/utils/todoValidator.js +0 -249
  368. package/dist/agents/codemie-code/utils/todoValidator.js.map +0 -1
  369. package/dist/agents/codemie-code/validators/planValidator.d.ts +0 -94
  370. package/dist/agents/codemie-code/validators/planValidator.d.ts.map +0 -1
  371. package/dist/agents/codemie-code/validators/planValidator.js +0 -281
  372. package/dist/agents/codemie-code/validators/planValidator.js.map +0 -1
  373. package/dist/agents/plugins/claude/plugin/hooks/hooks.windows.json +0 -98
  374. package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.ps1 +0 -112
  375. package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.sh +0 -58
  376. package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts +0 -26
  377. package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts.map +0 -1
  378. package/dist/agents/plugins/gemini/session/utils/token-aggregator.js +0 -38
  379. package/dist/agents/plugins/gemini/session/utils/token-aggregator.js.map +0 -1
  380. package/dist/cli/commands/assistants/chat.d.ts.map +0 -1
  381. package/dist/cli/commands/assistants/chat.js.map +0 -1
  382. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts +0 -26
  383. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts.map +0 -1
  384. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js +0 -146
  385. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js.map +0 -1
  386. package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts +0 -22
  387. package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts.map +0 -1
  388. package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js.map +0 -1
  389. package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.d.ts.map +0 -1
  390. package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js +0 -7
  391. package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js.map +0 -1
  392. /package/dist/{agents/codemie-code/skills → skills}/core/SkillManager.d.ts +0 -0
  393. /package/dist/{agents/codemie-code/skills → skills}/core/types.js +0 -0
  394. /package/dist/{agents/codemie-code/skills → skills}/sync/SkillSync.d.ts +0 -0
  395. /package/dist/{agents/codemie-code/skills → skills}/utils/pattern-matcher.d.ts +0 -0
  396. /package/dist/{agents/codemie-code/skills → skills}/utils/pattern-matcher.js +0 -0
  397. /package/dist/{agents/codemie-code/skills/utils → utils}/frontmatter.d.ts +0 -0
  398. /package/dist/{agents/codemie-code/skills/utils → utils}/frontmatter.js +0 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Plugin Agents Loader
3
+ *
4
+ * Discovers agent definitions from a plugin's agents/ directory.
5
+ * Each agent is namespaced with the plugin name.
6
+ */
7
+ import type { PluginAgent, PluginManifest } from '../core/types.js';
8
+ /**
9
+ * Discover agents from a plugin directory
10
+ *
11
+ * Looks for *.md files in the plugin's agents/ directory (or custom paths from manifest).
12
+ * Each agent is namespaced as "plugin-name:agent-name".
13
+ *
14
+ * @param pluginDir - Absolute path to the plugin root
15
+ * @param manifest - Parsed plugin manifest
16
+ * @returns Array of discovered plugin agents
17
+ */
18
+ export declare function discoverPluginAgents(pluginDir: string, manifest: PluginManifest): Promise<PluginAgent[]>;
19
+ //# sourceMappingURL=agents-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-loader.d.ts","sourceRoot":"","sources":["../../../src/plugins/loaders/agents-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,EAAE,CAAC,CAiCxB"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Plugin Agents Loader
3
+ *
4
+ * Discovers agent definitions from a plugin's agents/ directory.
5
+ * Each agent is namespaced with the plugin name.
6
+ */
7
+ import { readFile } from 'fs/promises';
8
+ import { join, basename } from 'path';
9
+ import fg from 'fast-glob';
10
+ import { logger } from '../../utils/logger.js';
11
+ import { parseFrontmatter, hasFrontmatter } from '../../utils/frontmatter.js';
12
+ /**
13
+ * Discover agents from a plugin directory
14
+ *
15
+ * Looks for *.md files in the plugin's agents/ directory (or custom paths from manifest).
16
+ * Each agent is namespaced as "plugin-name:agent-name".
17
+ *
18
+ * @param pluginDir - Absolute path to the plugin root
19
+ * @param manifest - Parsed plugin manifest
20
+ * @returns Array of discovered plugin agents
21
+ */
22
+ export async function discoverPluginAgents(pluginDir, manifest) {
23
+ const agentsDirs = resolveAgentDirs(pluginDir, manifest.agents);
24
+ const agents = [];
25
+ for (const dir of agentsDirs) {
26
+ try {
27
+ const files = await fg('*.md', {
28
+ cwd: dir,
29
+ absolute: true,
30
+ caseSensitiveMatch: false,
31
+ deep: 1,
32
+ ignore: ['**/node_modules/**', '**/.git/**'],
33
+ onlyFiles: true,
34
+ });
35
+ for (const filePath of files) {
36
+ try {
37
+ const agent = await parsePluginAgentFile(filePath, manifest.name);
38
+ if (agent) {
39
+ agents.push(agent);
40
+ }
41
+ }
42
+ catch (error) {
43
+ logger.debug(`[plugin] Failed to parse agent ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
44
+ }
45
+ }
46
+ }
47
+ catch {
48
+ // Directory doesn't exist — skip silently
49
+ }
50
+ }
51
+ return agents;
52
+ }
53
+ /**
54
+ * Parse a single agent .md file into a PluginAgent
55
+ */
56
+ async function parsePluginAgentFile(filePath, pluginName) {
57
+ const fileContent = await readFile(filePath, 'utf-8');
58
+ let metadata = {};
59
+ let content;
60
+ if (hasFrontmatter(fileContent)) {
61
+ const parsed = parseFrontmatter(fileContent, filePath);
62
+ metadata = parsed.metadata;
63
+ content = parsed.content;
64
+ }
65
+ else {
66
+ content = fileContent.trim();
67
+ }
68
+ // Derive agent name from metadata or filename (without .md extension)
69
+ const agentName = metadata.name || basename(filePath, '.md');
70
+ if (!agentName) {
71
+ return null;
72
+ }
73
+ return {
74
+ pluginName,
75
+ agentName,
76
+ namespacedName: `${pluginName}:${agentName}`,
77
+ filePath,
78
+ content,
79
+ metadata,
80
+ };
81
+ }
82
+ /**
83
+ * Resolve agent directories from manifest field or defaults
84
+ */
85
+ function resolveAgentDirs(pluginDir, agentsField) {
86
+ if (!agentsField) {
87
+ return [join(pluginDir, 'agents')];
88
+ }
89
+ const paths = Array.isArray(agentsField) ? agentsField : [agentsField];
90
+ return paths.map(p => join(pluginDir, p));
91
+ }
92
+ //# sourceMappingURL=agents-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3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K,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACvE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Plugin Hooks Loader
3
+ *
4
+ * Discovers and merges hooks configuration from plugins.
5
+ * Supports both hooks/hooks.json files and inline manifest hooks config.
6
+ */
7
+ import type { HooksConfiguration } from '../../hooks/types.js';
8
+ import type { PluginManifest } from '../core/types.js';
9
+ /**
10
+ * Load hooks configuration from a plugin
11
+ *
12
+ * @param pluginDir - Absolute path to the plugin root
13
+ * @param manifest - Parsed plugin manifest
14
+ * @returns HooksConfiguration or null if no hooks found
15
+ */
16
+ export declare function loadPluginHooks(pluginDir: string, manifest: PluginManifest): Promise<HooksConfiguration | null>;
17
+ /**
18
+ * Merge plugin hooks into an existing hooks configuration
19
+ *
20
+ * Plugin hooks are appended to each event's matcher array (lower priority than profile hooks).
21
+ *
22
+ * @param base - Existing hooks configuration (from profile or defaults)
23
+ * @param pluginHooks - Hooks from a plugin
24
+ * @returns Merged hooks configuration
25
+ */
26
+ export declare function mergeHooks(base: HooksConfiguration, pluginHooks: HooksConfiguration): HooksConfiguration;
27
+ //# sourceMappingURL=hooks-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-loader.d.ts","sourceRoot":"","sources":["../../../src/plugins/loaders/hooks-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CA4BpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,kBAAkB,EACxB,WAAW,EAAE,kBAAkB,GAC9B,kBAAkB,CAapB"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Plugin Hooks Loader
3
+ *
4
+ * Discovers and merges hooks configuration from plugins.
5
+ * Supports both hooks/hooks.json files and inline manifest hooks config.
6
+ */
7
+ import { readFile } from 'fs/promises';
8
+ import { join } from 'path';
9
+ import { existsSync } from 'fs';
10
+ import { logger } from '../../utils/logger.js';
11
+ import { expandPluginRoot } from '../core/manifest-parser.js';
12
+ /**
13
+ * Load hooks configuration from a plugin
14
+ *
15
+ * @param pluginDir - Absolute path to the plugin root
16
+ * @param manifest - Parsed plugin manifest
17
+ * @returns HooksConfiguration or null if no hooks found
18
+ */
19
+ export async function loadPluginHooks(pluginDir, manifest) {
20
+ const hooksField = manifest.hooks;
21
+ // Inline hooks configuration in manifest
22
+ if (hooksField && typeof hooksField === 'object' && !Array.isArray(hooksField)) {
23
+ return hooksField;
24
+ }
25
+ // Path(s) to hooks config files
26
+ const hooksPaths = resolveHooksPaths(pluginDir, hooksField);
27
+ for (const hooksPath of hooksPaths) {
28
+ if (!existsSync(hooksPath))
29
+ continue;
30
+ try {
31
+ const raw = await readFile(hooksPath, 'utf-8');
32
+ const parsed = JSON.parse(raw);
33
+ // Expand ${CLAUDE_PLUGIN_ROOT} in command strings
34
+ return expandHooksCommands(parsed, pluginDir);
35
+ }
36
+ catch (error) {
37
+ logger.debug(`[plugin] Failed to parse hooks from ${hooksPath}: ${error instanceof Error ? error.message : String(error)}`);
38
+ }
39
+ }
40
+ return null;
41
+ }
42
+ /**
43
+ * Merge plugin hooks into an existing hooks configuration
44
+ *
45
+ * Plugin hooks are appended to each event's matcher array (lower priority than profile hooks).
46
+ *
47
+ * @param base - Existing hooks configuration (from profile or defaults)
48
+ * @param pluginHooks - Hooks from a plugin
49
+ * @returns Merged hooks configuration
50
+ */
51
+ export function mergeHooks(base, pluginHooks) {
52
+ const merged = { ...base };
53
+ const events = Object.keys(pluginHooks);
54
+ for (const event of events) {
55
+ const pluginMatchers = pluginHooks[event];
56
+ if (!pluginMatchers || pluginMatchers.length === 0)
57
+ continue;
58
+ const baseMatchers = merged[event] || [];
59
+ merged[event] = [...baseMatchers, ...pluginMatchers];
60
+ }
61
+ return merged;
62
+ }
63
+ /**
64
+ * Resolve hooks file paths from manifest field or defaults
65
+ */
66
+ function resolveHooksPaths(pluginDir, hooksField) {
67
+ if (!hooksField || typeof hooksField === 'object') {
68
+ // Default: check hooks/hooks.json
69
+ return [join(pluginDir, 'hooks', 'hooks.json')];
70
+ }
71
+ const paths = Array.isArray(hooksField) ? hooksField : [hooksField];
72
+ return paths.map(p => join(pluginDir, p));
73
+ }
74
+ /**
75
+ * Expand ${CLAUDE_PLUGIN_ROOT} in all hook command strings
76
+ */
77
+ function expandHooksCommands(hooks, pluginDir) {
78
+ const result = {};
79
+ const events = Object.keys(hooks);
80
+ for (const event of events) {
81
+ const matchers = hooks[event];
82
+ if (!matchers)
83
+ continue;
84
+ result[event] = matchers.map((matcher) => ({
85
+ ...matcher,
86
+ hooks: matcher.hooks.map(hook => ({
87
+ ...hook,
88
+ ...(hook.command && { command: expandPluginRoot(hook.command, pluginDir) }),
89
+ })),
90
+ }));
91
+ }
92
+ return result;
93
+ }
94
+ //# sourceMappingURL=hooks-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-loader.js","sourceRoot":"","sources":["../../../src/plugins/loaders/hooks-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,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E,EAAE,CAAC,CAAC;YACtD,GAAG,OAAO;YACV,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChC,GAAG,IAAI;gBACP,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;aAC5E,CAAC,CAAC;SACJ,CAAC,CAAC,CAAC;IACN,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Plugin MCP Loader
3
+ *
4
+ * Discovers and merges MCP (Model Context Protocol) server configurations from plugins.
5
+ * MCP servers are namespaced to avoid conflicts between plugins.
6
+ */
7
+ import type { McpConfig, PluginManifest } from '../core/types.js';
8
+ /**
9
+ * Load MCP server configuration from a plugin
10
+ *
11
+ * @param pluginDir - Absolute path to the plugin root
12
+ * @param manifest - Parsed plugin manifest
13
+ * @returns McpConfig with namespaced server names, or null if none found
14
+ */
15
+ export declare function loadPluginMcpServers(pluginDir: string, manifest: PluginManifest): Promise<McpConfig | null>;
16
+ /**
17
+ * Merge plugin MCP config into an existing MCP configuration
18
+ *
19
+ * @param base - Existing MCP config
20
+ * @param pluginMcp - MCP config from a plugin (already namespaced)
21
+ * @returns Merged MCP config
22
+ */
23
+ export declare function mergeMcpConfigs(base: McpConfig, pluginMcp: McpConfig): McpConfig;
24
+ //# sourceMappingURL=mcp-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-loader.d.ts","sourceRoot":"","sources":["../../../src/plugins/loaders/mcp-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAmB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEnF;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CA2B3B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,SAAS,CAOhF"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Plugin MCP Loader
3
+ *
4
+ * Discovers and merges MCP (Model Context Protocol) server configurations from plugins.
5
+ * MCP servers are namespaced to avoid conflicts between plugins.
6
+ */
7
+ import { readFile } from 'fs/promises';
8
+ import { join } from 'path';
9
+ import { existsSync } from 'fs';
10
+ import { logger } from '../../utils/logger.js';
11
+ import { expandPluginRootDeep } from '../core/manifest-parser.js';
12
+ /**
13
+ * Load MCP server configuration from a plugin
14
+ *
15
+ * @param pluginDir - Absolute path to the plugin root
16
+ * @param manifest - Parsed plugin manifest
17
+ * @returns McpConfig with namespaced server names, or null if none found
18
+ */
19
+ export async function loadPluginMcpServers(pluginDir, manifest) {
20
+ const mcpField = manifest.mcpServers;
21
+ // Inline MCP config in manifest
22
+ if (mcpField && typeof mcpField === 'object' && !Array.isArray(mcpField)) {
23
+ const config = mcpField;
24
+ return namespaceMcpServers(config, manifest.name, pluginDir);
25
+ }
26
+ // Path(s) to MCP config files
27
+ const mcpPaths = resolveMcpPaths(pluginDir, mcpField);
28
+ for (const mcpPath of mcpPaths) {
29
+ if (!existsSync(mcpPath))
30
+ continue;
31
+ try {
32
+ const raw = await readFile(mcpPath, 'utf-8');
33
+ const parsed = JSON.parse(raw);
34
+ return namespaceMcpServers(parsed, manifest.name, pluginDir);
35
+ }
36
+ catch (error) {
37
+ logger.debug(`[plugin] Failed to parse MCP config from ${mcpPath}: ${error instanceof Error ? error.message : String(error)}`);
38
+ }
39
+ }
40
+ return null;
41
+ }
42
+ /**
43
+ * Merge plugin MCP config into an existing MCP configuration
44
+ *
45
+ * @param base - Existing MCP config
46
+ * @param pluginMcp - MCP config from a plugin (already namespaced)
47
+ * @returns Merged MCP config
48
+ */
49
+ export function mergeMcpConfigs(base, pluginMcp) {
50
+ return {
51
+ mcpServers: {
52
+ ...base.mcpServers,
53
+ ...pluginMcp.mcpServers,
54
+ },
55
+ };
56
+ }
57
+ /**
58
+ * Namespace MCP server names to prevent conflicts between plugins
59
+ *
60
+ * E.g., a server named "filesystem" in plugin "my-tools" becomes "my-tools:filesystem"
61
+ */
62
+ function namespaceMcpServers(config, pluginName, pluginDir) {
63
+ if (!config.mcpServers) {
64
+ return { mcpServers: {} };
65
+ }
66
+ const namespacedServers = {};
67
+ for (const [serverName, serverConfig] of Object.entries(config.mcpServers)) {
68
+ const namespacedName = `${pluginName}:${serverName}`;
69
+ // Expand ${CLAUDE_PLUGIN_ROOT} in server config
70
+ const expanded = expandPluginRootDeep(serverConfig, pluginDir);
71
+ namespacedServers[namespacedName] = expanded;
72
+ }
73
+ return { mcpServers: namespacedServers };
74
+ }
75
+ /**
76
+ * Resolve MCP config file paths from manifest field or defaults
77
+ */
78
+ function resolveMcpPaths(pluginDir, mcpField) {
79
+ if (!mcpField || typeof mcpField === 'object') {
80
+ // Default: check .mcp.json at plugin root
81
+ return [join(pluginDir, '.mcp.json')];
82
+ }
83
+ const paths = Array.isArray(mcpField) ? mcpField : [mcpField];
84
+ return paths.map(p => join(pluginDir, p));
85
+ }
86
+ //# sourceMappingURL=mcp-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-loader.js","sourceRoot":"","sources":["../../../src/plugins/loaders/mcp-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,CAAC,K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AED;;;;GAIG;AACH,SAAS,mBAAmB,CAC1B,MAAiB,EACjB,UAAkB,EAClB,SAAiB;IAEjB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,iBAAiB,GAAoC,EAAE,CAAC;IAE9D,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3E,MAAM,cAAc,GAAG,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;QACrD,gDAAgD;QAChD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,YAAY,EAAE,SAAS,CAAoB,CAAC;QAClF,iBAAiB,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC;IAC/C,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CACtB,SAAiB,EACjB,QAAmD;IAEnD,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9C,0CAA0C;QAC1C,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC9D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Plugin Skills Loader
3
+ *
4
+ * Discovers skills from a plugin's skills/ and commands/ directories.
5
+ * Skills are namespaced with the plugin name to avoid conflicts.
6
+ */
7
+ import type { PluginSkill, PluginCommand, PluginManifest } from '../core/types.js';
8
+ /**
9
+ * Discover skills from a plugin directory
10
+ *
11
+ * Looks for SKILL.md files in the plugin's skills/ directory (or custom paths from manifest).
12
+ * Each skill is namespaced as "plugin-name:skill-name".
13
+ *
14
+ * @param pluginDir - Absolute path to the plugin root
15
+ * @param manifest - Parsed plugin manifest
16
+ * @returns Array of discovered plugin skills
17
+ */
18
+ export declare function discoverPluginSkills(pluginDir: string, manifest: PluginManifest): Promise<PluginSkill[]>;
19
+ /**
20
+ * Discover commands from a plugin directory
21
+ *
22
+ * Looks for *.md files in the plugin's commands/ directory (or custom paths from manifest).
23
+ * Each command is namespaced as "plugin-name:command-name".
24
+ *
25
+ * @param pluginDir - Absolute path to the plugin root
26
+ * @param manifest - Parsed plugin manifest
27
+ * @returns Array of discovered plugin commands
28
+ */
29
+ export declare function discoverPluginCommands(pluginDir: string, manifest: PluginManifest): Promise<PluginCommand[]>;
30
+ //# sourceMappingURL=skills-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-loader.d.ts","sourceRoot":"","sources":["../../../src/plugins/loaders/skills-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEnF;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,EAAE,CAAC,CAiCxB;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,EAAE,CAAC,CAiC1B"}
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Plugin Skills Loader
3
+ *
4
+ * Discovers skills from a plugin's skills/ and commands/ directories.
5
+ * Skills are namespaced with the plugin name to avoid conflicts.
6
+ */
7
+ import { readFile } from 'fs/promises';
8
+ import { join, basename, dirname } from 'path';
9
+ import fg from 'fast-glob';
10
+ import { logger } from '../../utils/logger.js';
11
+ import { parseFrontmatter, hasFrontmatter } from '../../utils/frontmatter.js';
12
+ /**
13
+ * Discover skills from a plugin directory
14
+ *
15
+ * Looks for SKILL.md files in the plugin's skills/ directory (or custom paths from manifest).
16
+ * Each skill is namespaced as "plugin-name:skill-name".
17
+ *
18
+ * @param pluginDir - Absolute path to the plugin root
19
+ * @param manifest - Parsed plugin manifest
20
+ * @returns Array of discovered plugin skills
21
+ */
22
+ export async function discoverPluginSkills(pluginDir, manifest) {
23
+ const skillsDirs = resolveComponentDirs(pluginDir, manifest.skills, 'skills');
24
+ const skills = [];
25
+ for (const dir of skillsDirs) {
26
+ try {
27
+ const files = await fg('**/SKILL.md', {
28
+ cwd: dir,
29
+ absolute: true,
30
+ caseSensitiveMatch: false,
31
+ deep: 3,
32
+ ignore: ['**/node_modules/**', '**/.git/**'],
33
+ onlyFiles: true,
34
+ });
35
+ for (const filePath of files) {
36
+ try {
37
+ const skill = await parsePluginSkillFile(filePath, manifest.name);
38
+ if (skill) {
39
+ skills.push(skill);
40
+ }
41
+ }
42
+ catch (error) {
43
+ logger.debug(`[plugin] Failed to parse skill ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
44
+ }
45
+ }
46
+ }
47
+ catch {
48
+ // Directory doesn't exist — skip silently
49
+ }
50
+ }
51
+ return skills;
52
+ }
53
+ /**
54
+ * Discover commands from a plugin directory
55
+ *
56
+ * Looks for *.md files in the plugin's commands/ directory (or custom paths from manifest).
57
+ * Each command is namespaced as "plugin-name:command-name".
58
+ *
59
+ * @param pluginDir - Absolute path to the plugin root
60
+ * @param manifest - Parsed plugin manifest
61
+ * @returns Array of discovered plugin commands
62
+ */
63
+ export async function discoverPluginCommands(pluginDir, manifest) {
64
+ const commandsDirs = resolveComponentDirs(pluginDir, manifest.commands, 'commands');
65
+ const commands = [];
66
+ for (const dir of commandsDirs) {
67
+ try {
68
+ const files = await fg('*.md', {
69
+ cwd: dir,
70
+ absolute: true,
71
+ caseSensitiveMatch: false,
72
+ deep: 1,
73
+ ignore: ['**/node_modules/**', '**/.git/**'],
74
+ onlyFiles: true,
75
+ });
76
+ for (const filePath of files) {
77
+ try {
78
+ const command = await parsePluginCommandFile(filePath, manifest.name);
79
+ if (command) {
80
+ commands.push(command);
81
+ }
82
+ }
83
+ catch (error) {
84
+ logger.debug(`[plugin] Failed to parse command ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
85
+ }
86
+ }
87
+ }
88
+ catch {
89
+ // Directory doesn't exist — skip silently
90
+ }
91
+ }
92
+ return commands;
93
+ }
94
+ /**
95
+ * Parse a single SKILL.md file into a PluginSkill
96
+ */
97
+ async function parsePluginSkillFile(filePath, pluginName) {
98
+ const fileContent = await readFile(filePath, 'utf-8');
99
+ let metadata = {};
100
+ let content;
101
+ if (hasFrontmatter(fileContent)) {
102
+ const parsed = parseFrontmatter(fileContent, filePath);
103
+ metadata = parsed.metadata;
104
+ content = parsed.content;
105
+ }
106
+ else {
107
+ content = fileContent.trim();
108
+ }
109
+ // Derive skill name from metadata or directory name
110
+ const skillName = metadata.name || basename(dirname(filePath));
111
+ if (!skillName) {
112
+ return null;
113
+ }
114
+ return {
115
+ pluginName,
116
+ skillName,
117
+ namespacedName: `${pluginName}:${skillName}`,
118
+ filePath,
119
+ content,
120
+ metadata,
121
+ };
122
+ }
123
+ /**
124
+ * Parse a single command .md file into a PluginCommand
125
+ */
126
+ async function parsePluginCommandFile(filePath, pluginName) {
127
+ const fileContent = await readFile(filePath, 'utf-8');
128
+ let metadata = {};
129
+ let content;
130
+ if (hasFrontmatter(fileContent)) {
131
+ const parsed = parseFrontmatter(fileContent, filePath);
132
+ metadata = parsed.metadata;
133
+ content = parsed.content;
134
+ }
135
+ else {
136
+ content = fileContent.trim();
137
+ }
138
+ // Derive command name from metadata or filename (without .md extension)
139
+ const commandName = metadata.name || basename(filePath, '.md');
140
+ if (!commandName) {
141
+ return null;
142
+ }
143
+ return {
144
+ pluginName,
145
+ commandName,
146
+ namespacedName: `${pluginName}:${commandName}`,
147
+ filePath,
148
+ content,
149
+ metadata,
150
+ };
151
+ }
152
+ /**
153
+ * Resolve component directories from manifest field or defaults
154
+ *
155
+ * @param pluginDir - Plugin root directory
156
+ * @param manifestField - Value from manifest (string, string[], or undefined)
157
+ * @param defaultDir - Default directory name (e.g., 'skills', 'commands')
158
+ * @returns Array of absolute directory paths to scan
159
+ */
160
+ function resolveComponentDirs(pluginDir, manifestField, defaultDir) {
161
+ if (!manifestField) {
162
+ return [join(pluginDir, defaultDir)];
163
+ }
164
+ const paths = Array.isArray(manifestField) ? manifestField : [manifestField];
165
+ return paths.map(p => join(pluginDir, p));
166
+ }
167
+ //# sourceMappingURL=skills-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-loader.js","sourceRoot":"","sources":["../../../src/plugins/loaders/skills-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG9E;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,SAAiB,EACjB,QAAwB;IAExB,MAAM,UAAU,GAAG,oBAAoB,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9E,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,aAAa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S,EAAE,UAAU,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAC7E,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC"}
@@ -17,7 +17,7 @@ export const BedrockTemplate = registerProvider({
17
17
  priority: 15,
18
18
  defaultProfileName: 'bedrock',
19
19
  recommendedModels: [
20
- 'claude-sonnet-4-5', // Latest Claude Sonnet 4.5
20
+ 'claude-sonnet-4-6', // Latest Claude Sonnet 4.6
21
21
  ],
22
22
  capabilities: ['streaming', 'tools', 'function-calling', 'vision'],
23
23
  supportsModelInstallation: false,
@@ -94,7 +94,7 @@ export const JWTBearerSetupSteps = {
94
94
  // Return default models - actual model list will be fetched at runtime with JWT token
95
95
  // User can override model selection via CLI or config
96
96
  return [
97
- 'claude-4-5-sonnet',
97
+ 'claude-sonnet-4-6',
98
98
  'claude-opus-4-6',
99
99
  'claude-4-5-haiku',
100
100
  'gpt-4-turbo',
@@ -19,7 +19,7 @@ export const JWTTemplate = registerProvider({
19
19
  hidden: true, // Not shown in interactive setup - used only for script/auto-configuration
20
20
  defaultProfileName: 'jwt-bearer',
21
21
  recommendedModels: [
22
- 'claude-4-5-sonnet',
22
+ 'claude-sonnet-4-6',
23
23
  'claude-opus-4-6',
24
24
  'gpt-4-turbo',
25
25
  ],
@@ -17,7 +17,7 @@ export const LiteLLMTemplate = registerProvider({
17
17
  priority: 14,
18
18
  defaultProfileName: 'litellm',
19
19
  recommendedModels: [
20
- 'claude-4-5-sonnet'
20
+ 'claude-sonnet-4-6'
21
21
  ],
22
22
  capabilities: ['streaming', 'tools', 'function-calling'],
23
23
  supportsModelInstallation: false,
@@ -49,6 +49,16 @@ class HeaderInjectionInterceptor {
49
49
  if (config.clientType) {
50
50
  context.headers['X-CodeMie-Client'] = config.clientType;
51
51
  }
52
+ // Add repository, branch and project headers
53
+ if (config.repository) {
54
+ context.headers['X-CodeMie-Repository'] = config.repository;
55
+ }
56
+ if (config.branch) {
57
+ context.headers['X-CodeMie-Branch'] = config.branch;
58
+ }
59
+ if (config.project) {
60
+ context.headers['X-CodeMie-Project'] = config.project;
61
+ }
52
62
  logger.debug(`[${this.name}] Injected CodeMie headers`);
53
63
  }
54
64
  }