@claude-collective/cli 0.2.0 → 0.8.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 (190) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/README.md +1 -1
  3. package/dist/chunk-3HBTELJN.js +114 -0
  4. package/dist/chunk-3HBTELJN.js.map +1 -0
  5. package/dist/chunk-3ZCB5K33.js +54 -0
  6. package/dist/chunk-3ZCB5K33.js.map +1 -0
  7. package/dist/chunk-66UDJBF6.js +96 -0
  8. package/dist/chunk-66UDJBF6.js.map +1 -0
  9. package/dist/chunk-6LS7XO3H.js +31 -0
  10. package/dist/chunk-6LS7XO3H.js.map +1 -0
  11. package/dist/chunk-A3J6IAXK.js +57 -0
  12. package/dist/chunk-A3J6IAXK.js.map +1 -0
  13. package/dist/chunk-A65SBAAJ.js +69 -0
  14. package/dist/chunk-A65SBAAJ.js.map +1 -0
  15. package/dist/chunk-ALEPJ6YN.js +80 -0
  16. package/dist/chunk-ALEPJ6YN.js.map +1 -0
  17. package/dist/chunk-C4ZTIYFR.js +84 -0
  18. package/dist/chunk-C4ZTIYFR.js.map +1 -0
  19. package/dist/chunk-CIY5UBRB.js +453 -0
  20. package/dist/chunk-CIY5UBRB.js.map +1 -0
  21. package/dist/chunk-DHET7RCE.js +50 -0
  22. package/dist/chunk-DHET7RCE.js.map +1 -0
  23. package/dist/chunk-DHFFRMF6.js +31 -0
  24. package/dist/chunk-DHFFRMF6.js.map +1 -0
  25. package/dist/chunk-DKGL77IY.js +307 -0
  26. package/dist/chunk-DKGL77IY.js.map +1 -0
  27. package/dist/chunk-ED73HCW2.js +315 -0
  28. package/dist/chunk-ED73HCW2.js.map +1 -0
  29. package/dist/chunk-FNOYEXUE.js +308 -0
  30. package/dist/chunk-FNOYEXUE.js.map +1 -0
  31. package/dist/chunk-G2FBJOZG.js +141 -0
  32. package/dist/chunk-G2FBJOZG.js.map +1 -0
  33. package/dist/chunk-HNDT5QRB.js +120 -0
  34. package/dist/chunk-HNDT5QRB.js.map +1 -0
  35. package/dist/chunk-K7PTOVX4.js +158 -0
  36. package/dist/chunk-K7PTOVX4.js.map +1 -0
  37. package/dist/chunk-LQTST4WY.js +91 -0
  38. package/dist/chunk-LQTST4WY.js.map +1 -0
  39. package/dist/chunk-LVKRVFYR.js +54 -0
  40. package/dist/chunk-LVKRVFYR.js.map +1 -0
  41. package/dist/chunk-M7YCPFIX.js +108 -0
  42. package/dist/chunk-M7YCPFIX.js.map +1 -0
  43. package/dist/chunk-MJSFR562.js +57 -0
  44. package/dist/chunk-MJSFR562.js.map +1 -0
  45. package/dist/chunk-MMDXNZPF.js +69 -0
  46. package/dist/chunk-MMDXNZPF.js.map +1 -0
  47. package/dist/chunk-MYAVQ23U.js +356 -0
  48. package/dist/chunk-MYAVQ23U.js.map +1 -0
  49. package/dist/chunk-NGBFJJ7Q.js +124 -0
  50. package/dist/chunk-NGBFJJ7Q.js.map +1 -0
  51. package/dist/chunk-OLBOTK3O.js +64 -0
  52. package/dist/chunk-OLBOTK3O.js.map +1 -0
  53. package/dist/chunk-PPNTD5LO.js +330 -0
  54. package/dist/chunk-PPNTD5LO.js.map +1 -0
  55. package/dist/chunk-Q2LH2DAB.js +392 -0
  56. package/dist/chunk-Q2LH2DAB.js.map +1 -0
  57. package/dist/chunk-Q6DR5QUH.js +547 -0
  58. package/dist/chunk-Q6DR5QUH.js.map +1 -0
  59. package/dist/chunk-QESUUPOE.js +241 -0
  60. package/dist/chunk-QESUUPOE.js.map +1 -0
  61. package/dist/chunk-QGGSLMO3.js +607 -0
  62. package/dist/chunk-QGGSLMO3.js.map +1 -0
  63. package/dist/chunk-SEBPPFUW.js +478 -0
  64. package/dist/chunk-SEBPPFUW.js.map +1 -0
  65. package/dist/chunk-SYQ7R2JO.js +95 -0
  66. package/dist/chunk-SYQ7R2JO.js.map +1 -0
  67. package/dist/chunk-TOPAIL5W.js +22 -0
  68. package/dist/chunk-TOPAIL5W.js.map +1 -0
  69. package/dist/chunk-U4VYHKPM.js +110 -0
  70. package/dist/chunk-U4VYHKPM.js.map +1 -0
  71. package/dist/chunk-UOWHJ6BE.js +83 -0
  72. package/dist/chunk-UOWHJ6BE.js.map +1 -0
  73. package/dist/chunk-XKEG3SCV.js +86 -0
  74. package/dist/chunk-XKEG3SCV.js.map +1 -0
  75. package/dist/chunk-XY3XDVMI.js +15599 -0
  76. package/dist/chunk-XY3XDVMI.js.map +1 -0
  77. package/dist/chunk-Y3V43XCU.js +76 -0
  78. package/dist/chunk-Y3V43XCU.js.map +1 -0
  79. package/dist/chunk-YKXBGCFD.js +129 -0
  80. package/dist/chunk-YKXBGCFD.js.map +1 -0
  81. package/dist/cli-v2/defaults/agent-mappings.yaml +185 -0
  82. package/dist/commands/build/marketplace.js +254 -0
  83. package/dist/commands/build/marketplace.js.map +1 -0
  84. package/dist/commands/build/plugins.js +324 -0
  85. package/dist/commands/build/plugins.js.map +1 -0
  86. package/dist/commands/build/stack.js +169 -0
  87. package/dist/commands/build/stack.js.map +1 -0
  88. package/dist/commands/compile.js +461 -0
  89. package/dist/commands/compile.js.map +1 -0
  90. package/dist/commands/config/get.js +60 -0
  91. package/dist/commands/config/get.js.map +1 -0
  92. package/dist/commands/config/index.js +22 -0
  93. package/dist/commands/config/index.js.map +1 -0
  94. package/dist/commands/config/path.js +35 -0
  95. package/dist/commands/config/path.js.map +1 -0
  96. package/dist/commands/config/set-project.js +61 -0
  97. package/dist/commands/config/set-project.js.map +1 -0
  98. package/dist/commands/config/set.js +60 -0
  99. package/dist/commands/config/set.js.map +1 -0
  100. package/dist/commands/config/show.js +13 -0
  101. package/dist/commands/config/show.js.map +1 -0
  102. package/dist/commands/config/unset-project.js +57 -0
  103. package/dist/commands/config/unset-project.js.map +1 -0
  104. package/dist/commands/config/unset.js +56 -0
  105. package/dist/commands/config/unset.js.map +1 -0
  106. package/dist/commands/diff.js +755 -0
  107. package/dist/commands/diff.js.map +1 -0
  108. package/dist/commands/doctor.js +413 -0
  109. package/dist/commands/doctor.js.map +1 -0
  110. package/dist/commands/edit.js +254 -0
  111. package/dist/commands/edit.js.map +1 -0
  112. package/dist/commands/eject.js +208 -0
  113. package/dist/commands/eject.js.map +1 -0
  114. package/dist/commands/info.js +205 -0
  115. package/dist/commands/info.js.map +1 -0
  116. package/dist/commands/init.js +915 -0
  117. package/dist/commands/init.js.map +1 -0
  118. package/dist/commands/list.js +44 -0
  119. package/dist/commands/list.js.map +1 -0
  120. package/dist/commands/new/agent.js +230 -0
  121. package/dist/commands/new/agent.js.map +1 -0
  122. package/dist/commands/new/skill.js +204 -0
  123. package/dist/commands/new/skill.js.map +1 -0
  124. package/dist/commands/outdated.js +242 -0
  125. package/dist/commands/outdated.js.map +1 -0
  126. package/dist/commands/search.js +115 -0
  127. package/dist/commands/search.js.map +1 -0
  128. package/dist/commands/test-imports.js +92 -0
  129. package/dist/commands/test-imports.js.map +1 -0
  130. package/dist/commands/uninstall.js +309 -0
  131. package/dist/commands/uninstall.js.map +1 -0
  132. package/dist/commands/update.js +428 -0
  133. package/dist/commands/update.js.map +1 -0
  134. package/dist/commands/validate.js +375 -0
  135. package/dist/commands/validate.js.map +1 -0
  136. package/dist/commands/version/bump.js +95 -0
  137. package/dist/commands/version/bump.js.map +1 -0
  138. package/dist/commands/version/index.js +70 -0
  139. package/dist/commands/version/index.js.map +1 -0
  140. package/dist/commands/version/set.js +101 -0
  141. package/dist/commands/version/set.js.map +1 -0
  142. package/dist/commands/version/show.js +70 -0
  143. package/dist/commands/version/show.js.map +1 -0
  144. package/dist/components/common/confirm.js +9 -0
  145. package/dist/components/common/confirm.js.map +1 -0
  146. package/dist/components/common/message.js +24 -0
  147. package/dist/components/common/message.js.map +1 -0
  148. package/dist/components/common/spinner.js +14 -0
  149. package/dist/components/common/spinner.js.map +1 -0
  150. package/dist/components/wizard/category-grid.js +9 -0
  151. package/dist/components/wizard/category-grid.js.map +1 -0
  152. package/dist/components/wizard/category-grid.test.js +728 -0
  153. package/dist/components/wizard/category-grid.test.js.map +1 -0
  154. package/dist/components/wizard/section-progress.js +9 -0
  155. package/dist/components/wizard/section-progress.js.map +1 -0
  156. package/dist/components/wizard/section-progress.test.js +281 -0
  157. package/dist/components/wizard/section-progress.test.js.map +1 -0
  158. package/dist/components/wizard/step-approach.js +11 -0
  159. package/dist/components/wizard/step-approach.js.map +1 -0
  160. package/dist/components/wizard/step-build.js +15 -0
  161. package/dist/components/wizard/step-build.js.map +1 -0
  162. package/dist/components/wizard/step-build.test.js +729 -0
  163. package/dist/components/wizard/step-build.test.js.map +1 -0
  164. package/dist/components/wizard/step-confirm.js +9 -0
  165. package/dist/components/wizard/step-confirm.js.map +1 -0
  166. package/dist/components/wizard/step-refine.js +9 -0
  167. package/dist/components/wizard/step-refine.js.map +1 -0
  168. package/dist/components/wizard/step-refine.test.js +235 -0
  169. package/dist/components/wizard/step-refine.test.js.map +1 -0
  170. package/dist/components/wizard/step-stack-options.js +11 -0
  171. package/dist/components/wizard/step-stack-options.js.map +1 -0
  172. package/dist/components/wizard/step-stack.js +11 -0
  173. package/dist/components/wizard/step-stack.js.map +1 -0
  174. package/dist/components/wizard/wizard-tabs.js +11 -0
  175. package/dist/components/wizard/wizard-tabs.js.map +1 -0
  176. package/dist/components/wizard/wizard.js +20 -0
  177. package/dist/components/wizard/wizard.js.map +1 -0
  178. package/dist/hooks/init.js +41 -0
  179. package/dist/hooks/init.js.map +1 -0
  180. package/dist/index.js +10 -0
  181. package/dist/index.js.map +1 -0
  182. package/dist/magic-string.es-RGXYGAW3.js +1316 -0
  183. package/dist/magic-string.es-RGXYGAW3.js.map +1 -0
  184. package/dist/stores/wizard-store.js +10 -0
  185. package/dist/stores/wizard-store.js.map +1 -0
  186. package/dist/stores/wizard-store.test.js +405 -0
  187. package/dist/stores/wizard-store.test.js.map +1 -0
  188. package/package.json +44 -25
  189. package/dist/cli/index.js +0 -6314
  190. package/dist/cli/index.js.map +0 -1
@@ -0,0 +1,461 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ getAgentDefinitions
4
+ } from "../chunk-C4ZTIYFR.js";
5
+ import {
6
+ detectInstallation
7
+ } from "../chunk-3ZCB5K33.js";
8
+ import {
9
+ recompileAgents
10
+ } from "../chunk-FNOYEXUE.js";
11
+ import "../chunk-MYAVQ23U.js";
12
+ import "../chunk-Q2LH2DAB.js";
13
+ import "../chunk-LQTST4WY.js";
14
+ import "../chunk-MJSFR562.js";
15
+ import "../chunk-SEBPPFUW.js";
16
+ import {
17
+ getCollectivePluginDir,
18
+ getPluginAgentsDir,
19
+ getPluginManifestPath,
20
+ getProjectPluginsDir
21
+ } from "../chunk-3HBTELJN.js";
22
+ import {
23
+ loadPluginSkills
24
+ } from "../chunk-QGGSLMO3.js";
25
+ import "../chunk-NGBFJJ7Q.js";
26
+ import {
27
+ resolveSource
28
+ } from "../chunk-QESUUPOE.js";
29
+ import {
30
+ LOCAL_SKILLS_PATH
31
+ } from "../chunk-A3J6IAXK.js";
32
+ import {
33
+ BaseCommand,
34
+ EXIT_CODES
35
+ } from "../chunk-SYQ7R2JO.js";
36
+ import {
37
+ setVerbose,
38
+ verbose
39
+ } from "../chunk-TOPAIL5W.js";
40
+ import {
41
+ directoryExists,
42
+ ensureDir,
43
+ fileExists,
44
+ glob,
45
+ listDirectories,
46
+ readFile
47
+ } from "../chunk-MMDXNZPF.js";
48
+ import {
49
+ init_esm_shims
50
+ } from "../chunk-DHET7RCE.js";
51
+
52
+ // src/cli-v2/commands/compile.ts
53
+ init_esm_shims();
54
+ import { Flags } from "@oclif/core";
55
+ import path from "path";
56
+ import { parse as parseYaml } from "yaml";
57
+ async function loadSkillsFromDir(skillsDir, pathPrefix = "") {
58
+ const skills = {};
59
+ if (!await directoryExists(skillsDir)) {
60
+ return skills;
61
+ }
62
+ const skillFiles = await glob("**/SKILL.md", skillsDir);
63
+ for (const skillFile of skillFiles) {
64
+ const skillPath = path.join(skillsDir, skillFile);
65
+ const skillDir = path.dirname(skillPath);
66
+ const relativePath = path.relative(skillsDir, skillDir);
67
+ try {
68
+ const content = await readFile(skillPath);
69
+ let metadata = {};
70
+ if (content.startsWith("---")) {
71
+ const endIndex = content.indexOf("---", 3);
72
+ if (endIndex > 0) {
73
+ const yamlContent = content.slice(3, endIndex).trim();
74
+ const lines = yamlContent.split("\n");
75
+ for (const line of lines) {
76
+ const colonIndex = line.indexOf(":");
77
+ if (colonIndex > 0) {
78
+ const key = line.slice(0, colonIndex).trim();
79
+ const value = line.slice(colonIndex + 1).trim();
80
+ metadata[key] = value.replace(/^["']|["']$/g, "");
81
+ }
82
+ }
83
+ }
84
+ }
85
+ const skillName = metadata.name || path.basename(skillDir);
86
+ const canonicalId = skillName;
87
+ const skill = {
88
+ path: pathPrefix ? `${pathPrefix}/${relativePath}/` : `${relativePath}/`,
89
+ name: skillName,
90
+ description: metadata.description || "",
91
+ canonicalId
92
+ };
93
+ skills[canonicalId] = skill;
94
+ verbose(` Loaded skill: ${canonicalId}`);
95
+ } catch (error) {
96
+ verbose(` Failed to load skill: ${skillFile} - ${error}`);
97
+ }
98
+ }
99
+ return skills;
100
+ }
101
+ async function discoverPluginSkills(projectDir) {
102
+ const allSkills = {};
103
+ const pluginsDir = getProjectPluginsDir(projectDir);
104
+ if (!await directoryExists(pluginsDir)) {
105
+ verbose(`No plugins directory found at ${pluginsDir}`);
106
+ return allSkills;
107
+ }
108
+ const pluginDirs = await listDirectories(pluginsDir);
109
+ for (const pluginName of pluginDirs) {
110
+ const pluginDir = path.join(pluginsDir, pluginName);
111
+ const pluginSkillsDir = path.join(pluginDir, "skills");
112
+ if (await directoryExists(pluginSkillsDir)) {
113
+ verbose(`Discovering skills from plugin: ${pluginName}`);
114
+ const pluginSkills = await loadPluginSkills(pluginDir);
115
+ for (const [id, skill] of Object.entries(pluginSkills)) {
116
+ allSkills[id] = skill;
117
+ }
118
+ }
119
+ }
120
+ return allSkills;
121
+ }
122
+ async function discoverLocalProjectSkills(projectDir) {
123
+ const localSkillsDir = path.join(projectDir, LOCAL_SKILLS_PATH);
124
+ return loadSkillsFromDir(localSkillsDir, LOCAL_SKILLS_PATH);
125
+ }
126
+ function mergeSkills(...skillSources) {
127
+ const merged = {};
128
+ for (const source of skillSources) {
129
+ for (const [id, skill] of Object.entries(source)) {
130
+ merged[id] = skill;
131
+ }
132
+ }
133
+ return merged;
134
+ }
135
+ async function readPluginManifest(pluginDir) {
136
+ const manifestPath = getPluginManifestPath(pluginDir);
137
+ if (!await fileExists(manifestPath)) {
138
+ return null;
139
+ }
140
+ try {
141
+ const content = await readFile(manifestPath);
142
+ return JSON.parse(content);
143
+ } catch {
144
+ return null;
145
+ }
146
+ }
147
+ var Compile = class _Compile extends BaseCommand {
148
+ static summary = "Compile agents using local skills and agent definitions";
149
+ static description = "Compile agents with resolved skill references. By default, compiles to the Claude plugin directory. Use --output to compile to a custom directory.";
150
+ static examples = [
151
+ "<%= config.bin %> <%= command.id %>",
152
+ "<%= config.bin %> <%= command.id %> --verbose",
153
+ "<%= config.bin %> <%= command.id %> --output ./agents",
154
+ "<%= config.bin %> <%= command.id %> --dry-run",
155
+ "<%= config.bin %> <%= command.id %> --source /path/to/marketplace --refresh"
156
+ ];
157
+ static flags = {
158
+ ...BaseCommand.baseFlags,
159
+ verbose: Flags.boolean({
160
+ char: "v",
161
+ description: "Enable verbose logging",
162
+ default: false
163
+ }),
164
+ "agent-source": Flags.string({
165
+ description: "Remote agent partials source (default: local CLI)"
166
+ }),
167
+ refresh: Flags.boolean({
168
+ description: "Force refresh from remote sources",
169
+ default: false
170
+ }),
171
+ output: Flags.string({
172
+ char: "o",
173
+ description: "Output directory for compiled agents (skips plugin mode)"
174
+ })
175
+ };
176
+ async run() {
177
+ const { flags } = await this.parse(_Compile);
178
+ setVerbose(flags.verbose);
179
+ if (flags.output) {
180
+ await this.runCustomOutputCompile({
181
+ ...flags,
182
+ output: flags.output
183
+ });
184
+ return;
185
+ }
186
+ const installation = await detectInstallation();
187
+ if (!installation) {
188
+ this.error(
189
+ "No installation found. Run 'cc init' first to set up Claude Collective.",
190
+ { exit: EXIT_CODES.ERROR }
191
+ );
192
+ }
193
+ if (installation.mode === "local") {
194
+ this.log("");
195
+ this.log("Local Mode Compile (auto-detected)");
196
+ this.log("");
197
+ await this.runCustomOutputCompile({
198
+ ...flags,
199
+ output: installation.agentsDir
200
+ });
201
+ } else {
202
+ await this.runPluginModeCompile(flags);
203
+ }
204
+ }
205
+ async runPluginModeCompile(flags) {
206
+ this.log("");
207
+ this.log("Plugin Mode Compile");
208
+ this.log("");
209
+ const pluginDir = getCollectivePluginDir();
210
+ this.log("Finding plugin...");
211
+ if (!await directoryExists(pluginDir)) {
212
+ this.log("No plugin found");
213
+ this.error("No plugin found. Run 'cc init' first to create a plugin.", {
214
+ exit: EXIT_CODES.ERROR
215
+ });
216
+ }
217
+ const manifest = await readPluginManifest(pluginDir);
218
+ const pluginName = manifest?.name ?? "claude-collective";
219
+ this.log(`Found plugin: ${pluginName}`);
220
+ verbose(` Path: ${pluginDir}`);
221
+ const configPath = path.join(pluginDir, "config.yaml");
222
+ const hasConfig = await fileExists(configPath);
223
+ if (hasConfig) {
224
+ try {
225
+ const configContent = await readFile(configPath);
226
+ const config = parseYaml(configContent);
227
+ const agentCount = config.agents?.length ?? 0;
228
+ const configSkillCount = config.skills?.length ?? 0;
229
+ this.log(
230
+ `Using config.yaml (${agentCount} agents, ${configSkillCount} skills)`
231
+ );
232
+ verbose(` Config: ${configPath}`);
233
+ } catch {
234
+ this.warn("config.yaml found but could not be parsed - using defaults");
235
+ }
236
+ } else {
237
+ verbose(` No config.yaml found - using defaults`);
238
+ }
239
+ const projectDir = process.cwd();
240
+ this.log("Discovering skills...");
241
+ const pluginSkills = await discoverPluginSkills(projectDir);
242
+ const pluginSkillCount = Object.keys(pluginSkills).length;
243
+ verbose(` Found ${pluginSkillCount} skills from installed plugins`);
244
+ const localSkills = await discoverLocalProjectSkills(projectDir);
245
+ const localSkillCount = Object.keys(localSkills).length;
246
+ verbose(` Found ${localSkillCount} local skills from .claude/skills/`);
247
+ const allSkills = mergeSkills(pluginSkills, localSkills);
248
+ const totalSkillCount = Object.keys(allSkills).length;
249
+ if (totalSkillCount === 0) {
250
+ this.log("No skills found");
251
+ this.error(
252
+ "No skills found. Add skills with 'cc add <skill>' or create in .claude/skills/.",
253
+ { exit: EXIT_CODES.ERROR }
254
+ );
255
+ }
256
+ if (localSkillCount > 0 && pluginSkillCount > 0) {
257
+ this.log(
258
+ `Discovered ${totalSkillCount} skills (${pluginSkillCount} from plugins, ${localSkillCount} local)`
259
+ );
260
+ } else if (localSkillCount > 0) {
261
+ this.log(`Discovered ${localSkillCount} local skills`);
262
+ } else {
263
+ this.log(`Discovered ${pluginSkillCount} skills from plugins`);
264
+ }
265
+ this.log("Resolving marketplace source...");
266
+ let sourceConfig;
267
+ try {
268
+ sourceConfig = await resolveSource(flags.source);
269
+ this.log(`Source: ${sourceConfig.sourceOrigin}`);
270
+ } catch (error) {
271
+ this.log("Failed to resolve source");
272
+ this.error(error instanceof Error ? error.message : String(error), {
273
+ exit: EXIT_CODES.ERROR
274
+ });
275
+ }
276
+ this.log(
277
+ flags["agent-source"] ? "Fetching agent partials..." : "Loading agent partials..."
278
+ );
279
+ let agentDefs;
280
+ try {
281
+ agentDefs = await getAgentDefinitions(flags["agent-source"], {
282
+ forceRefresh: flags.refresh,
283
+ projectDir
284
+ });
285
+ this.log(
286
+ flags["agent-source"] ? "Agent partials fetched" : "Agent partials loaded"
287
+ );
288
+ verbose(` Agents: ${agentDefs.agentsDir}`);
289
+ verbose(` Templates: ${agentDefs.templatesDir}`);
290
+ } catch (error) {
291
+ this.log("Failed to load agent partials");
292
+ this.error(error instanceof Error ? error.message : String(error), {
293
+ exit: EXIT_CODES.ERROR
294
+ });
295
+ }
296
+ if (flags["dry-run"]) {
297
+ this.log("");
298
+ this.log(`[dry-run] Would compile ${totalSkillCount} skills`);
299
+ this.log(
300
+ `[dry-run] Would use agent partials from: ${agentDefs.sourcePath}`
301
+ );
302
+ this.log(`[dry-run] Would output to: ${getPluginAgentsDir(pluginDir)}`);
303
+ this.log("[dry-run] Preview complete - no files were written");
304
+ this.log("");
305
+ return;
306
+ }
307
+ this.log("Recompiling agents...");
308
+ try {
309
+ const recompileResult = await recompileAgents({
310
+ pluginDir,
311
+ sourcePath: agentDefs.sourcePath,
312
+ skills: allSkills,
313
+ projectDir
314
+ });
315
+ if (recompileResult.failed.length > 0) {
316
+ this.log(
317
+ `Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)`
318
+ );
319
+ for (const warning of recompileResult.warnings) {
320
+ this.warn(warning);
321
+ }
322
+ } else if (recompileResult.compiled.length > 0) {
323
+ this.log(`Recompiled ${recompileResult.compiled.length} agents`);
324
+ } else {
325
+ this.log("No agents to recompile");
326
+ }
327
+ if (recompileResult.compiled.length > 0) {
328
+ verbose(` Compiled: ${recompileResult.compiled.join(", ")}`);
329
+ }
330
+ } catch (error) {
331
+ this.log("Failed to recompile agents");
332
+ this.error(error instanceof Error ? error.message : String(error), {
333
+ exit: EXIT_CODES.ERROR
334
+ });
335
+ }
336
+ this.log("");
337
+ this.logSuccess("Plugin compile complete!");
338
+ this.log("");
339
+ }
340
+ async runCustomOutputCompile(flags) {
341
+ const outputDir = path.resolve(process.cwd(), flags.output);
342
+ this.log("");
343
+ this.log("Custom Output Compile");
344
+ this.log("");
345
+ this.log(`Output directory: ${outputDir}`);
346
+ this.log("");
347
+ const projectDir = process.cwd();
348
+ this.log("Discovering skills...");
349
+ const pluginSkills = await discoverPluginSkills(projectDir);
350
+ const pluginSkillCount = Object.keys(pluginSkills).length;
351
+ verbose(` Found ${pluginSkillCount} skills from installed plugins`);
352
+ const localSkills = await discoverLocalProjectSkills(projectDir);
353
+ const localSkillCount = Object.keys(localSkills).length;
354
+ verbose(` Found ${localSkillCount} local skills from .claude/skills/`);
355
+ const allSkills = mergeSkills(pluginSkills, localSkills);
356
+ const totalSkillCount = Object.keys(allSkills).length;
357
+ if (totalSkillCount === 0) {
358
+ this.log("No skills found");
359
+ this.error(
360
+ "No skills found. Add skills with 'cc add <skill>' or create in .claude/skills/.",
361
+ { exit: EXIT_CODES.ERROR }
362
+ );
363
+ }
364
+ if (localSkillCount > 0 && pluginSkillCount > 0) {
365
+ this.log(
366
+ `Discovered ${totalSkillCount} skills (${pluginSkillCount} from plugins, ${localSkillCount} local)`
367
+ );
368
+ } else if (localSkillCount > 0) {
369
+ this.log(`Discovered ${localSkillCount} local skills`);
370
+ } else {
371
+ this.log(`Discovered ${pluginSkillCount} skills from plugins`);
372
+ }
373
+ this.log("Resolving source...");
374
+ let sourceConfig;
375
+ try {
376
+ sourceConfig = await resolveSource(flags.source);
377
+ this.log(`Source: ${sourceConfig.sourceOrigin}`);
378
+ } catch (error) {
379
+ this.log("Failed to resolve source");
380
+ this.error(error instanceof Error ? error.message : String(error), {
381
+ exit: EXIT_CODES.ERROR
382
+ });
383
+ }
384
+ this.log(
385
+ flags["agent-source"] ? "Fetching agent partials..." : "Loading agent partials..."
386
+ );
387
+ let agentDefs;
388
+ try {
389
+ agentDefs = await getAgentDefinitions(flags["agent-source"], {
390
+ forceRefresh: flags.refresh,
391
+ projectDir
392
+ });
393
+ this.log(
394
+ flags["agent-source"] ? "Agent partials fetched" : "Agent partials loaded"
395
+ );
396
+ verbose(` Agents: ${agentDefs.agentsDir}`);
397
+ verbose(` Templates: ${agentDefs.templatesDir}`);
398
+ } catch (error) {
399
+ this.log("Failed to load agent partials");
400
+ this.error(error instanceof Error ? error.message : String(error), {
401
+ exit: EXIT_CODES.ERROR
402
+ });
403
+ }
404
+ if (flags["dry-run"]) {
405
+ this.log("");
406
+ this.log(`[dry-run] Would compile agents with ${totalSkillCount} skills`);
407
+ this.log(
408
+ `[dry-run] Would use agent definitions from: ${agentDefs.sourcePath}`
409
+ );
410
+ this.log(`[dry-run] Would output to: ${outputDir}`);
411
+ this.log("[dry-run] Preview complete - no files were written");
412
+ this.log("");
413
+ return;
414
+ }
415
+ const pluginDir = getCollectivePluginDir();
416
+ this.log("Compiling agents...");
417
+ try {
418
+ await ensureDir(outputDir);
419
+ const recompileResult = await recompileAgents({
420
+ pluginDir,
421
+ sourcePath: agentDefs.sourcePath,
422
+ skills: allSkills,
423
+ outputDir,
424
+ projectDir
425
+ });
426
+ if (recompileResult.failed.length > 0) {
427
+ this.log(
428
+ `Compiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)`
429
+ );
430
+ for (const warning of recompileResult.warnings) {
431
+ this.warn(warning);
432
+ }
433
+ } else if (recompileResult.compiled.length > 0) {
434
+ this.log(`Compiled ${recompileResult.compiled.length} agents`);
435
+ } else {
436
+ this.log("No agents to compile");
437
+ }
438
+ if (recompileResult.compiled.length > 0) {
439
+ verbose(` Compiled: ${recompileResult.compiled.join(", ")}`);
440
+ this.log("");
441
+ this.log("Agents compiled to:");
442
+ this.log(` ${outputDir}`);
443
+ for (const agentName of recompileResult.compiled) {
444
+ this.log(` ${agentName}.md`);
445
+ }
446
+ }
447
+ } catch (error) {
448
+ this.log("Failed to compile agents");
449
+ this.error(error instanceof Error ? error.message : String(error), {
450
+ exit: EXIT_CODES.ERROR
451
+ });
452
+ }
453
+ this.log("");
454
+ this.logSuccess("Custom output compile complete!");
455
+ this.log("");
456
+ }
457
+ };
458
+ export {
459
+ Compile as default
460
+ };
461
+ //# sourceMappingURL=compile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli-v2/commands/compile.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\nimport path from \"path\";\nimport { parse as parseYaml } from \"yaml\";\nimport { BaseCommand } from \"../base-command\";\nimport { setVerbose, verbose } from \"../utils/logger\";\nimport {\n getCollectivePluginDir,\n getPluginAgentsDir,\n getPluginManifestPath,\n getProjectPluginsDir,\n} from \"../lib/plugin-finder\";\nimport { getAgentDefinitions } from \"../lib/agent-fetcher\";\nimport { resolveSource } from \"../lib/config\";\nimport {\n directoryExists,\n ensureDir,\n glob,\n readFile,\n fileExists,\n listDirectories,\n} from \"../utils/fs\";\nimport { recompileAgents } from \"../lib/agent-recompiler\";\nimport { loadPluginSkills } from \"../lib/loader\";\nimport { LOCAL_SKILLS_PATH } from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\nimport { detectInstallation } from \"../lib/installation\";\nimport type {\n AgentSourcePaths,\n PluginManifest,\n StackConfig,\n SkillDefinition,\n} from \"../../types\";\n\nasync function loadSkillsFromDir(\n skillsDir: string,\n pathPrefix: string = \"\",\n): Promise<Record<string, SkillDefinition>> {\n const skills: Record<string, SkillDefinition> = {};\n\n if (!(await directoryExists(skillsDir))) {\n return skills;\n }\n\n const skillFiles = await glob(\"**/SKILL.md\", skillsDir);\n\n for (const skillFile of skillFiles) {\n const skillPath = path.join(skillsDir, skillFile);\n const skillDir = path.dirname(skillPath);\n const relativePath = path.relative(skillsDir, skillDir);\n\n try {\n const content = await readFile(skillPath);\n let metadata: Record<string, unknown> = {};\n\n if (content.startsWith(\"---\")) {\n const endIndex = content.indexOf(\"---\", 3);\n if (endIndex > 0) {\n const yamlContent = content.slice(3, endIndex).trim();\n const lines = yamlContent.split(\"\\n\");\n for (const line of lines) {\n const colonIndex = line.indexOf(\":\");\n if (colonIndex > 0) {\n const key = line.slice(0, colonIndex).trim();\n const value = line.slice(colonIndex + 1).trim();\n metadata[key] = value.replace(/^[\"']|[\"']$/g, \"\");\n }\n }\n }\n }\n\n const skillName = (metadata.name as string) || path.basename(skillDir);\n const canonicalId = skillName;\n\n const skill: SkillDefinition = {\n path: pathPrefix\n ? `${pathPrefix}/${relativePath}/`\n : `${relativePath}/`,\n name: skillName,\n description: (metadata.description as string) || \"\",\n canonicalId,\n };\n\n skills[canonicalId] = skill;\n verbose(` Loaded skill: ${canonicalId}`);\n } catch (error) {\n verbose(` Failed to load skill: ${skillFile} - ${error}`);\n }\n }\n\n return skills;\n}\n\nasync function discoverPluginSkills(\n projectDir: string,\n): Promise<Record<string, SkillDefinition>> {\n const allSkills: Record<string, SkillDefinition> = {};\n const pluginsDir = getProjectPluginsDir(projectDir);\n\n if (!(await directoryExists(pluginsDir))) {\n verbose(`No plugins directory found at ${pluginsDir}`);\n return allSkills;\n }\n\n const pluginDirs = await listDirectories(pluginsDir);\n\n for (const pluginName of pluginDirs) {\n const pluginDir = path.join(pluginsDir, pluginName);\n const pluginSkillsDir = path.join(pluginDir, \"skills\");\n\n if (await directoryExists(pluginSkillsDir)) {\n verbose(`Discovering skills from plugin: ${pluginName}`);\n const pluginSkills = await loadPluginSkills(pluginDir);\n\n for (const [id, skill] of Object.entries(pluginSkills)) {\n allSkills[id] = skill;\n }\n }\n }\n\n return allSkills;\n}\n\nasync function discoverLocalProjectSkills(\n projectDir: string,\n): Promise<Record<string, SkillDefinition>> {\n const localSkillsDir = path.join(projectDir, LOCAL_SKILLS_PATH);\n return loadSkillsFromDir(localSkillsDir, LOCAL_SKILLS_PATH);\n}\n\n/** Merge skills from multiple sources. Later sources take precedence. */\nfunction mergeSkills(\n ...skillSources: Record<string, SkillDefinition>[]\n): Record<string, SkillDefinition> {\n const merged: Record<string, SkillDefinition> = {};\n\n for (const source of skillSources) {\n for (const [id, skill] of Object.entries(source)) {\n merged[id] = skill;\n }\n }\n\n return merged;\n}\n\nasync function readPluginManifest(\n pluginDir: string,\n): Promise<PluginManifest | null> {\n const manifestPath = getPluginManifestPath(pluginDir);\n\n if (!(await fileExists(manifestPath))) {\n return null;\n }\n\n try {\n const content = await readFile(manifestPath);\n return JSON.parse(content) as PluginManifest;\n } catch {\n return null;\n }\n}\n\nexport default class Compile extends BaseCommand {\n static summary = \"Compile agents using local skills and agent definitions\";\n\n static description =\n \"Compile agents with resolved skill references. By default, compiles to the Claude plugin directory. Use --output to compile to a custom directory.\";\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> --verbose\",\n \"<%= config.bin %> <%= command.id %> --output ./agents\",\n \"<%= config.bin %> <%= command.id %> --dry-run\",\n \"<%= config.bin %> <%= command.id %> --source /path/to/marketplace --refresh\",\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n verbose: Flags.boolean({\n char: \"v\",\n description: \"Enable verbose logging\",\n default: false,\n }),\n \"agent-source\": Flags.string({\n description: \"Remote agent partials source (default: local CLI)\",\n }),\n refresh: Flags.boolean({\n description: \"Force refresh from remote sources\",\n default: false,\n }),\n output: Flags.string({\n char: \"o\",\n description: \"Output directory for compiled agents (skips plugin mode)\",\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Compile);\n\n setVerbose(flags.verbose);\n\n // If --output provided explicitly, use custom output mode\n if (flags.output) {\n await this.runCustomOutputCompile({\n ...flags,\n output: flags.output,\n });\n return;\n }\n\n // Auto-detect installation mode\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(\n \"No installation found. Run 'cc init' first to set up Claude Collective.\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n if (installation.mode === \"local\") {\n // Use local mode - output to .claude/agents\n this.log(\"\");\n this.log(\"Local Mode Compile (auto-detected)\");\n this.log(\"\");\n await this.runCustomOutputCompile({\n ...flags,\n output: installation.agentsDir,\n });\n } else {\n // Use plugin mode\n await this.runPluginModeCompile(flags);\n }\n }\n\n private async runPluginModeCompile(flags: {\n source?: string;\n \"agent-source\"?: string;\n refresh: boolean;\n verbose: boolean;\n \"dry-run\": boolean;\n }): Promise<void> {\n this.log(\"\");\n this.log(\"Plugin Mode Compile\");\n this.log(\"\");\n\n // 1. Get the collective plugin directory (always ~/.claude/plugins/claude-collective/)\n const pluginDir = getCollectivePluginDir();\n this.log(\"Finding plugin...\");\n\n // Check if plugin exists\n if (!(await directoryExists(pluginDir))) {\n this.log(\"No plugin found\");\n this.error(\"No plugin found. Run 'cc init' first to create a plugin.\", {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n const manifest = await readPluginManifest(pluginDir);\n const pluginName = manifest?.name ?? \"claude-collective\";\n\n this.log(`Found plugin: ${pluginName}`);\n verbose(` Path: ${pluginDir}`);\n\n const configPath = path.join(pluginDir, \"config.yaml\");\n const hasConfig = await fileExists(configPath);\n if (hasConfig) {\n try {\n const configContent = await readFile(configPath);\n const config = parseYaml(configContent) as StackConfig;\n const agentCount = config.agents?.length ?? 0;\n const configSkillCount = config.skills?.length ?? 0;\n this.log(\n `Using config.yaml (${agentCount} agents, ${configSkillCount} skills)`,\n );\n verbose(` Config: ${configPath}`);\n } catch {\n this.warn(\"config.yaml found but could not be parsed - using defaults\");\n }\n } else {\n verbose(` No config.yaml found - using defaults`);\n }\n\n const projectDir = process.cwd();\n this.log(\"Discovering skills...\");\n\n const pluginSkills = await discoverPluginSkills(projectDir);\n const pluginSkillCount = Object.keys(pluginSkills).length;\n verbose(` Found ${pluginSkillCount} skills from installed plugins`);\n\n const localSkills = await discoverLocalProjectSkills(projectDir);\n const localSkillCount = Object.keys(localSkills).length;\n verbose(` Found ${localSkillCount} local skills from .claude/skills/`);\n\n const allSkills = mergeSkills(pluginSkills, localSkills);\n const totalSkillCount = Object.keys(allSkills).length;\n\n if (totalSkillCount === 0) {\n this.log(\"No skills found\");\n this.error(\n \"No skills found. Add skills with 'cc add <skill>' or create in .claude/skills/.\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n if (localSkillCount > 0 && pluginSkillCount > 0) {\n this.log(\n `Discovered ${totalSkillCount} skills (${pluginSkillCount} from plugins, ${localSkillCount} local)`,\n );\n } else if (localSkillCount > 0) {\n this.log(`Discovered ${localSkillCount} local skills`);\n } else {\n this.log(`Discovered ${pluginSkillCount} skills from plugins`);\n }\n\n this.log(\"Resolving marketplace source...\");\n let sourceConfig;\n try {\n sourceConfig = await resolveSource(flags.source);\n this.log(`Source: ${sourceConfig.sourceOrigin}`);\n } catch (error) {\n this.log(\"Failed to resolve source\");\n this.error(error instanceof Error ? error.message : String(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n this.log(\n flags[\"agent-source\"]\n ? \"Fetching agent partials...\"\n : \"Loading agent partials...\",\n );\n let agentDefs: AgentSourcePaths;\n try {\n agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n projectDir,\n });\n this.log(\n flags[\"agent-source\"]\n ? \"Agent partials fetched\"\n : \"Agent partials loaded\",\n );\n verbose(` Agents: ${agentDefs.agentsDir}`);\n verbose(` Templates: ${agentDefs.templatesDir}`);\n } catch (error) {\n this.log(\"Failed to load agent partials\");\n this.error(error instanceof Error ? error.message : String(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n if (flags[\"dry-run\"]) {\n this.log(\"\");\n this.log(`[dry-run] Would compile ${totalSkillCount} skills`);\n this.log(\n `[dry-run] Would use agent partials from: ${agentDefs.sourcePath}`,\n );\n this.log(`[dry-run] Would output to: ${getPluginAgentsDir(pluginDir)}`);\n this.log(\"[dry-run] Preview complete - no files were written\");\n this.log(\"\");\n return;\n }\n\n this.log(\"Recompiling agents...\");\n try {\n const recompileResult = await recompileAgents({\n pluginDir,\n sourcePath: agentDefs.sourcePath,\n skills: allSkills,\n projectDir,\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`Recompiled ${recompileResult.compiled.length} agents`);\n } else {\n this.log(\"No agents to recompile\");\n }\n\n if (recompileResult.compiled.length > 0) {\n verbose(` Compiled: ${recompileResult.compiled.join(\", \")}`);\n }\n } catch (error) {\n this.log(\"Failed to recompile agents\");\n this.error(error instanceof Error ? error.message : String(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n this.log(\"\");\n this.logSuccess(\"Plugin compile complete!\");\n this.log(\"\");\n }\n\n private async runCustomOutputCompile(flags: {\n source?: string;\n \"agent-source\"?: string;\n refresh: boolean;\n verbose: boolean;\n output: string;\n \"dry-run\": boolean;\n }): Promise<void> {\n const outputDir = path.resolve(process.cwd(), flags.output);\n this.log(\"\");\n this.log(\"Custom Output Compile\");\n this.log(\"\");\n this.log(`Output directory: ${outputDir}`);\n this.log(\"\");\n\n const projectDir = process.cwd();\n this.log(\"Discovering skills...\");\n\n const pluginSkills = await discoverPluginSkills(projectDir);\n const pluginSkillCount = Object.keys(pluginSkills).length;\n verbose(` Found ${pluginSkillCount} skills from installed plugins`);\n\n const localSkills = await discoverLocalProjectSkills(projectDir);\n const localSkillCount = Object.keys(localSkills).length;\n verbose(` Found ${localSkillCount} local skills from .claude/skills/`);\n\n const allSkills = mergeSkills(pluginSkills, localSkills);\n const totalSkillCount = Object.keys(allSkills).length;\n\n if (totalSkillCount === 0) {\n this.log(\"No skills found\");\n this.error(\n \"No skills found. Add skills with 'cc add <skill>' or create in .claude/skills/.\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n if (localSkillCount > 0 && pluginSkillCount > 0) {\n this.log(\n `Discovered ${totalSkillCount} skills (${pluginSkillCount} from plugins, ${localSkillCount} local)`,\n );\n } else if (localSkillCount > 0) {\n this.log(`Discovered ${localSkillCount} local skills`);\n } else {\n this.log(`Discovered ${pluginSkillCount} skills from plugins`);\n }\n\n this.log(\"Resolving source...\");\n let sourceConfig;\n try {\n sourceConfig = await resolveSource(flags.source);\n this.log(`Source: ${sourceConfig.sourceOrigin}`);\n } catch (error) {\n this.log(\"Failed to resolve source\");\n this.error(error instanceof Error ? error.message : String(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n this.log(\n flags[\"agent-source\"]\n ? \"Fetching agent partials...\"\n : \"Loading agent partials...\",\n );\n let agentDefs: AgentSourcePaths;\n try {\n agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n projectDir,\n });\n this.log(\n flags[\"agent-source\"]\n ? \"Agent partials fetched\"\n : \"Agent partials loaded\",\n );\n verbose(` Agents: ${agentDefs.agentsDir}`);\n verbose(` Templates: ${agentDefs.templatesDir}`);\n } catch (error) {\n this.log(\"Failed to load agent partials\");\n this.error(error instanceof Error ? error.message : String(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n if (flags[\"dry-run\"]) {\n this.log(\"\");\n this.log(`[dry-run] Would compile agents with ${totalSkillCount} skills`);\n this.log(\n `[dry-run] Would use agent definitions from: ${agentDefs.sourcePath}`,\n );\n this.log(`[dry-run] Would output to: ${outputDir}`);\n this.log(\"[dry-run] Preview complete - no files were written\");\n this.log(\"\");\n return;\n }\n\n const pluginDir = getCollectivePluginDir();\n\n this.log(\"Compiling agents...\");\n try {\n await ensureDir(outputDir);\n\n const recompileResult = await recompileAgents({\n pluginDir,\n sourcePath: agentDefs.sourcePath,\n skills: allSkills,\n outputDir,\n projectDir,\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `Compiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`Compiled ${recompileResult.compiled.length} agents`);\n } else {\n this.log(\"No agents to compile\");\n }\n\n if (recompileResult.compiled.length > 0) {\n verbose(` Compiled: ${recompileResult.compiled.join(\", \")}`);\n this.log(\"\");\n this.log(\"Agents compiled to:\");\n this.log(` ${outputDir}`);\n for (const agentName of recompileResult.compiled) {\n this.log(` ${agentName}.md`);\n }\n }\n } catch (error) {\n this.log(\"Failed to compile agents\");\n this.error(error instanceof Error ? error.message : String(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n this.log(\"\");\n this.logSuccess(\"Custom output compile complete!\");\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,aAAa;AACtB,OAAO,UAAU;AACjB,SAAS,SAAS,iBAAiB;AA+BnC,eAAe,kBACb,WACA,aAAqB,IACqB;AAC1C,QAAM,SAA0C,CAAC;AAEjD,MAAI,CAAE,MAAM,gBAAgB,SAAS,GAAI;AACvC,WAAO;AAAA,EACT;AAEA,QAAM,aAAa,MA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,aAAK,IAAI,KAAK,SAAS,EAAE;AACzB,mBAAW,aAAa,gBAAgB,UAAU;AAChD,eAAK,IAAI,OAAO,SAAS,KAAK;AAAA,QAChC;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,WAAK,IAAI,0BAA0B;AACnC,WAAK,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG;AAAA,QACjE,MAAM,WAAW;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,SAAK,IAAI,EAAE;AACX,SAAK,WAAW,iCAAiC;AACjD,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ loadGlobalConfig,
4
+ resolveAgentsSource,
5
+ resolveSource
6
+ } from "../../chunk-QESUUPOE.js";
7
+ import {
8
+ BaseCommand,
9
+ EXIT_CODES
10
+ } from "../../chunk-SYQ7R2JO.js";
11
+ import "../../chunk-TOPAIL5W.js";
12
+ import "../../chunk-MMDXNZPF.js";
13
+ import {
14
+ init_esm_shims
15
+ } from "../../chunk-DHET7RCE.js";
16
+
17
+ // src/cli-v2/commands/config/get.ts
18
+ init_esm_shims();
19
+ import { Args } from "@oclif/core";
20
+ var ConfigGet = class _ConfigGet extends BaseCommand {
21
+ static summary = "Get a configuration value";
22
+ static description = "Get the effective value of a configuration key (source, author, marketplace, agents_source)";
23
+ static args = {
24
+ key: Args.string({
25
+ description: "Configuration key (source, author, marketplace, agents_source)",
26
+ required: true
27
+ })
28
+ };
29
+ static flags = {
30
+ ...BaseCommand.baseFlags
31
+ };
32
+ async run() {
33
+ const { args } = await this.parse(_ConfigGet);
34
+ const projectDir = process.cwd();
35
+ const { key } = args;
36
+ if (key === "source") {
37
+ const resolved = await resolveSource(void 0, projectDir);
38
+ this.log(resolved.source);
39
+ } else if (key === "author") {
40
+ const globalConfig = await loadGlobalConfig();
41
+ this.log(globalConfig?.author || "");
42
+ } else if (key === "marketplace") {
43
+ const resolved = await resolveSource(void 0, projectDir);
44
+ this.log(resolved.marketplace || "");
45
+ } else if (key === "agents_source") {
46
+ const resolved = await resolveAgentsSource(void 0, projectDir);
47
+ this.log(resolved.agentsSource || "");
48
+ } else {
49
+ this.error(
50
+ `Unknown configuration key: ${key}
51
+ Valid keys: source, author, marketplace, agents_source`,
52
+ { exit: EXIT_CODES.INVALID_ARGS }
53
+ );
54
+ }
55
+ }
56
+ };
57
+ export {
58
+ ConfigGet as default
59
+ };
60
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/cli-v2/commands/config/get.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {\n resolveSource,\n resolveAgentsSource,\n loadGlobalConfig,\n} from \"../../lib/config.js\";\nimport { EXIT_CODES } from \"../../lib/exit-codes.js\";\n\nexport default class ConfigGet extends BaseCommand {\n static summary = \"Get a configuration value\";\n static description =\n \"Get the effective value of a configuration key (source, author, marketplace, agents_source)\";\n\n static args = {\n key: Args.string({\n description:\n \"Configuration key (source, author, marketplace, agents_source)\",\n required: true,\n }),\n };\n\n static flags = {\n ...BaseCommand.baseFlags,\n };\n\n async run(): Promise<void> {\n const { args } = await this.parse(ConfigGet);\n const projectDir = process.cwd();\n\n const { key } = args;\n\n if (key === \"source\") {\n const resolved = await resolveSource(undefined, projectDir);\n this.log(resolved.source);\n } else if (key === \"author\") {\n const globalConfig = await loadGlobalConfig();\n this.log(globalConfig?.author || \"\");\n } else if (key === \"marketplace\") {\n const resolved = await resolveSource(undefined, projectDir);\n this.log(resolved.marketplace || \"\");\n } else if (key === \"agents_source\") {\n const resolved = await resolveAgentsSource(undefined, projectDir);\n this.log(resolved.agentsSource || \"\");\n } else {\n this.error(\n `Unknown configuration key: ${key}\\nValid keys: source, author, marketplace, agents_source`,\n { exit: EXIT_CODES.INVALID_ARGS },\n );\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,YAAY;AASrB,IAAqB,YAArB,MAAqB,mBAAkB,YAAY;AAAA,EACjD,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,OAAO,OAAO;AAAA,IACZ,KAAK,KAAK,OAAO;AAAA,MACf,aACE;AAAA,MACF,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,EACjB;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,KAAK,IAAI,MAAM,KAAK,MAAM,UAAS;AAC3C,UAAM,aAAa,QAAQ,IAAI;AAE/B,UAAM,EAAE,IAAI,IAAI;AAEhB,QAAI,QAAQ,UAAU;AACpB,YAAM,WAAW,MAAM,cAAc,QAAW,UAAU;AAC1D,WAAK,IAAI,SAAS,MAAM;AAAA,IAC1B,WAAW,QAAQ,UAAU;AAC3B,YAAM,eAAe,MAAM,iBAAiB;AAC5C,WAAK,IAAI,cAAc,UAAU,EAAE;AAAA,IACrC,WAAW,QAAQ,eAAe;AAChC,YAAM,WAAW,MAAM,cAAc,QAAW,UAAU;AAC1D,WAAK,IAAI,SAAS,eAAe,EAAE;AAAA,IACrC,WAAW,QAAQ,iBAAiB;AAClC,YAAM,WAAW,MAAM,oBAAoB,QAAW,UAAU;AAChE,WAAK,IAAI,SAAS,gBAAgB,EAAE;AAAA,IACtC,OAAO;AACL,WAAK;AAAA,QACH,8BAA8B,GAAG;AAAA;AAAA,QACjC,EAAE,MAAM,WAAW,aAAa;AAAA,MAClC;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ConfigShow
4
+ } from "../../chunk-U4VYHKPM.js";
5
+ import "../../chunk-QESUUPOE.js";
6
+ import "../../chunk-SYQ7R2JO.js";
7
+ import "../../chunk-TOPAIL5W.js";
8
+ import "../../chunk-MMDXNZPF.js";
9
+ import {
10
+ init_esm_shims
11
+ } from "../../chunk-DHET7RCE.js";
12
+
13
+ // src/cli-v2/commands/config/index.ts
14
+ init_esm_shims();
15
+ var Config = class extends ConfigShow {
16
+ static summary = "Show current effective configuration";
17
+ static description = "Display the current effective configuration with all layers (env, project, global, default)";
18
+ };
19
+ export {
20
+ Config as default
21
+ };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/cli-v2/commands/config/index.ts"],"sourcesContent":["import ConfigShow from \"./show.js\";\n\n/**\n * Default config command - aliases to config:show\n * When user runs \"cc config\", this runs the show subcommand\n */\nexport default class Config extends ConfigShow {\n static summary = \"Show current effective configuration\";\n static description =\n \"Display the current effective configuration with all layers (env, project, global, default)\";\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;AAMA,IAAqB,SAArB,cAAoC,WAAW;AAAA,EAC7C,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AACJ;","names":[]}
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ getGlobalConfigPath,
4
+ getProjectConfigPath
5
+ } from "../../chunk-QESUUPOE.js";
6
+ import {
7
+ BaseCommand
8
+ } from "../../chunk-SYQ7R2JO.js";
9
+ import "../../chunk-TOPAIL5W.js";
10
+ import "../../chunk-MMDXNZPF.js";
11
+ import {
12
+ init_esm_shims
13
+ } from "../../chunk-DHET7RCE.js";
14
+
15
+ // src/cli-v2/commands/config/path.ts
16
+ init_esm_shims();
17
+ var ConfigPath = class _ConfigPath extends BaseCommand {
18
+ static summary = "Show configuration file paths";
19
+ static description = "Display the file paths for global and project configuration files";
20
+ static flags = {
21
+ ...BaseCommand.baseFlags
22
+ };
23
+ async run() {
24
+ await this.parse(_ConfigPath);
25
+ const projectDir = process.cwd();
26
+ this.log("\nConfiguration File Paths:\n");
27
+ this.log(`Global: ${getGlobalConfigPath()}`);
28
+ this.log(`Project: ${getProjectConfigPath(projectDir)}`);
29
+ this.log("");
30
+ }
31
+ };
32
+ export {
33
+ ConfigPath as default
34
+ };
35
+ //# sourceMappingURL=path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/cli-v2/commands/config/path.ts"],"sourcesContent":["import { BaseCommand } from \"../../base-command.js\";\nimport { getGlobalConfigPath, getProjectConfigPath } from \"../../lib/config.js\";\n\nexport default class ConfigPath extends BaseCommand {\n static summary = \"Show configuration file paths\";\n static description =\n \"Display the file paths for global and project configuration files\";\n\n static flags = {\n ...BaseCommand.baseFlags,\n };\n\n async run(): Promise<void> {\n await this.parse(ConfigPath);\n\n const projectDir = process.cwd();\n\n this.log(\"\\nConfiguration File Paths:\\n\");\n this.log(`Global: ${getGlobalConfigPath()}`);\n this.log(`Project: ${getProjectConfigPath(projectDir)}`);\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAGA,IAAqB,aAArB,MAAqB,oBAAmB,YAAY;AAAA,EAClD,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,EACjB;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,KAAK,MAAM,WAAU;AAE3B,UAAM,aAAa,QAAQ,IAAI;AAE/B,SAAK,IAAI,+BAA+B;AACxC,SAAK,IAAI,YAAY,oBAAoB,CAAC,EAAE;AAC5C,SAAK,IAAI,YAAY,qBAAqB,UAAU,CAAC,EAAE;AACvD,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}