@claude-collective/cli 0.21.0 → 0.26.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.
- package/CHANGELOG.md +192 -0
- package/README.md +41 -27
- package/config/skills-matrix.yaml +38 -37
- package/config/stacks.yaml +8 -14
- package/dist/{chunk-ZNIDWLL5.js → chunk-3X5D7RM5.js} +4 -3
- package/dist/chunk-3X5D7RM5.js.map +1 -0
- package/dist/chunk-4357L7VK.js +251 -0
- package/dist/chunk-4357L7VK.js.map +1 -0
- package/dist/chunk-4S4FCAA2.js +100 -0
- package/dist/chunk-4S4FCAA2.js.map +1 -0
- package/dist/chunk-7UPXT32F.js +197 -0
- package/dist/chunk-7UPXT32F.js.map +1 -0
- package/dist/{chunk-DHET7RCE.js → chunk-AWKZ5BDL.js} +9 -2
- package/dist/{chunk-DHET7RCE.js.map → chunk-AWKZ5BDL.js.map} +1 -1
- package/dist/{chunk-6Q3Y7KVB.js → chunk-DBRUQQUF.js} +8 -2
- package/dist/chunk-DBRUQQUF.js.map +1 -0
- package/dist/{chunk-OQYYMQJR.js → chunk-ETCVEV3S.js} +8 -11
- package/dist/chunk-ETCVEV3S.js.map +1 -0
- package/dist/chunk-ETQ3BPGU.js +4204 -0
- package/dist/chunk-ETQ3BPGU.js.map +1 -0
- package/dist/{chunk-ZSVMS677.js → chunk-F4RD5FYM.js} +2 -2
- package/dist/chunk-F4RD5FYM.js.map +1 -0
- package/dist/{chunk-5KXUDHAB.js → chunk-GGFOD5PK.js} +6 -9
- package/dist/chunk-GGFOD5PK.js.map +1 -0
- package/dist/{chunk-UMORK7OK.js → chunk-H7SSBSPR.js} +2 -2
- package/dist/chunk-H7SSBSPR.js.map +1 -0
- package/dist/chunk-HWD32NP7.js +19 -0
- package/dist/chunk-HWD32NP7.js.map +1 -0
- package/dist/{chunk-HGCBZUH5.js → chunk-I3YYG5IO.js} +9 -10
- package/dist/chunk-I3YYG5IO.js.map +1 -0
- package/dist/{chunk-RTE64SJA.js → chunk-IXBCRT3F.js} +2 -2
- package/dist/chunk-IXBCRT3F.js.map +1 -0
- package/dist/{chunk-WFEFICFM.js → chunk-KWYO3M5Q.js} +5 -5
- package/dist/chunk-KWYO3M5Q.js.map +1 -0
- package/dist/{chunk-HEOHU5EZ.js → chunk-MCTSHLAF.js} +22 -11
- package/dist/chunk-MCTSHLAF.js.map +1 -0
- package/dist/chunk-NQJ47R4N.js +1092 -0
- package/dist/chunk-NQJ47R4N.js.map +1 -0
- package/dist/{chunk-FJFEKPXF.js → chunk-O6ZTD7ZI.js} +14 -3
- package/dist/chunk-O6ZTD7ZI.js.map +1 -0
- package/dist/chunk-OBXAY23Y.js +56 -0
- package/dist/chunk-OBXAY23Y.js.map +1 -0
- package/dist/{chunk-XY3XDVMI.js → chunk-QR2EBWL2.js} +3 -3
- package/dist/chunk-R5KJVI54.js +311 -0
- package/dist/chunk-R5KJVI54.js.map +1 -0
- package/dist/{chunk-2LSGX6R4.js → chunk-R7B63JAP.js} +83 -25
- package/dist/chunk-R7B63JAP.js.map +1 -0
- package/dist/{chunk-66UDJBF6.js → chunk-REJGRCVQ.js} +2 -2
- package/dist/chunk-TDZE4TDG.js +220 -0
- package/dist/chunk-TDZE4TDG.js.map +1 -0
- package/dist/{chunk-CBLPAMZO.js → chunk-TMED5DQ2.js} +68 -42
- package/dist/chunk-TMED5DQ2.js.map +1 -0
- package/dist/{chunk-Q3J43SF3.js → chunk-U7HFKR74.js} +2 -2
- package/dist/chunk-U7HFKR74.js.map +1 -0
- package/dist/{chunk-3EHUF54X.js → chunk-UEMRJI2K.js} +17 -4
- package/dist/chunk-UEMRJI2K.js.map +1 -0
- package/dist/{chunk-Z2CWURZ6.js → chunk-UNN7523L.js} +2 -2
- package/dist/chunk-V2ZIH7HV.js +29 -0
- package/dist/chunk-V2ZIH7HV.js.map +1 -0
- package/dist/{chunk-ZEI3ZUDU.js → chunk-VVYNZZUX.js} +7 -15
- package/dist/chunk-VVYNZZUX.js.map +1 -0
- package/dist/{chunk-A46TPNBJ.js → chunk-XENOESJZ.js} +7 -16
- package/dist/chunk-XENOESJZ.js.map +1 -0
- package/dist/chunk-ZDREFYD2.js +696 -0
- package/dist/chunk-ZDREFYD2.js.map +1 -0
- package/dist/chunk-ZW2PELOH.js +197 -0
- package/dist/chunk-ZW2PELOH.js.map +1 -0
- package/dist/cli/defaults/agent-mappings.yaml +0 -1
- package/dist/commands/build/marketplace.js +22 -21
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +35 -231
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/build/stack.js +11 -18
- package/dist/commands/build/stack.js.map +1 -1
- package/dist/commands/compile.js +36 -58
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/get.js +8 -8
- package/dist/commands/config/get.js.map +1 -1
- package/dist/commands/config/index.js +7 -7
- package/dist/commands/config/index.js.map +1 -1
- package/dist/commands/config/path.js +6 -6
- package/dist/commands/config/path.js.map +1 -1
- package/dist/commands/config/set-project.js +8 -8
- package/dist/commands/config/set-project.js.map +1 -1
- package/dist/commands/config/show.js +7 -7
- package/dist/commands/config/unset-project.js +8 -8
- package/dist/commands/config/unset-project.js.map +1 -1
- package/dist/commands/diff.js +10 -16
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +18 -51
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +112 -57
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +17 -49
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/import/skill.js +26 -26
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/info.js +15 -17
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/init.js +103 -727
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +8 -87
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/agent.js +8 -12
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/skill.js +6 -6
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +15 -19
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +21 -34
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/uninstall.js +15 -14
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +13 -24
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +44 -487
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/version/bump.js +11 -11
- package/dist/commands/version/bump.js.map +1 -1
- package/dist/commands/version/index.js +9 -10
- package/dist/commands/version/index.js.map +1 -1
- package/dist/commands/version/set.js +10 -8
- package/dist/commands/version/set.js.map +1 -1
- package/dist/commands/version/show.js +9 -10
- package/dist/commands/version/show.js.map +1 -1
- package/dist/components/common/confirm.js +2 -2
- package/dist/components/common/confirm.test.js +203 -0
- package/dist/components/common/confirm.test.js.map +1 -0
- package/dist/components/common/message.js +1 -1
- package/dist/components/common/spinner.js +1 -1
- package/dist/components/common/spinner.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +2 -2
- package/dist/components/wizard/category-grid.test.js +132 -78
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/menu-item.js +2 -2
- package/dist/components/wizard/search-modal.js +9 -0
- package/dist/components/wizard/search-modal.js.map +1 -0
- package/dist/components/wizard/search-modal.test.js +216 -0
- package/dist/components/wizard/search-modal.test.js.map +1 -0
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +4 -4
- package/dist/components/wizard/section-progress.test.js.map +1 -1
- package/dist/components/wizard/source-grid.js +10 -0
- package/dist/components/wizard/source-grid.js.map +1 -0
- package/dist/components/wizard/source-grid.test.js +500 -0
- package/dist/components/wizard/source-grid.test.js.map +1 -0
- package/dist/components/wizard/step-approach.js +7 -6
- package/dist/components/wizard/step-approach.test.js +115 -0
- package/dist/components/wizard/step-approach.test.js.map +1 -0
- package/dist/components/wizard/step-build.js +9 -4
- package/dist/components/wizard/step-build.test.js +103 -122
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +3 -2
- package/dist/components/wizard/step-confirm.test.js +364 -0
- package/dist/components/wizard/step-confirm.test.js.map +1 -0
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +19 -13
- package/dist/components/wizard/step-refine.test.js.map +1 -1
- package/dist/components/wizard/step-settings.js +14 -0
- package/dist/components/wizard/step-settings.js.map +1 -0
- package/dist/components/wizard/step-settings.test.js +240 -0
- package/dist/components/wizard/step-settings.test.js.map +1 -0
- package/dist/components/wizard/step-sources.js +17 -0
- package/dist/components/wizard/step-sources.js.map +1 -0
- package/dist/components/wizard/step-sources.test.js +290 -0
- package/dist/components/wizard/step-sources.test.js.map +1 -0
- package/dist/components/wizard/step-stack.js +7 -6
- package/dist/components/wizard/step-stack.test.js +344 -0
- package/dist/components/wizard/step-stack.test.js.map +1 -0
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +6 -5
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +292 -0
- package/dist/components/wizard/wizard-tabs.test.js.map +1 -0
- package/dist/components/wizard/wizard.js +22 -14
- package/dist/config/skills-matrix.yaml +38 -37
- package/dist/config/stacks.yaml +8 -14
- package/dist/hooks/init.js +5 -5
- package/dist/hooks/init.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{magic-string.es-RGXYGAW3.js → magic-string.es-PAH2SOTR.js} +2 -2
- package/dist/source-manager-EYO3F2DV.js +16 -0
- package/dist/source-manager-EYO3F2DV.js.map +1 -0
- package/dist/src/agents/_templates/agent.liquid +1 -1
- package/dist/src/agents/developer/api-developer/agent.yaml +1 -1
- package/dist/src/agents/developer/cli-developer/agent.yaml +1 -1
- package/dist/src/agents/developer/web-architecture/agent.yaml +1 -1
- package/dist/src/agents/developer/web-developer/agent.yaml +1 -1
- package/dist/src/agents/meta/agent-summoner/agent.yaml +1 -1
- package/dist/src/agents/meta/documentor/agent.yaml +1 -1
- package/dist/src/agents/meta/skill-summoner/agent.yaml +1 -1
- package/dist/src/agents/migration/cli-migrator/agent.yaml +1 -1
- package/dist/src/agents/pattern/pattern-scout/agent.yaml +1 -1
- package/dist/src/agents/pattern/web-pattern-critique/agent.yaml +1 -1
- package/dist/src/agents/planning/web-pm/agent.yaml +1 -1
- package/dist/src/agents/researcher/api-researcher/agent.yaml +1 -1
- package/dist/src/agents/researcher/web-researcher/agent.yaml +1 -1
- package/dist/src/agents/reviewer/api-reviewer/agent.yaml +1 -1
- package/dist/src/agents/reviewer/cli-reviewer/agent.yaml +1 -1
- package/dist/src/agents/reviewer/web-reviewer/agent.yaml +1 -1
- package/dist/src/agents/tester/cli-tester/agent.yaml +1 -1
- package/dist/src/agents/tester/web-tester/agent.yaml +1 -1
- package/dist/stores/wizard-store.js +4 -3
- package/dist/stores/wizard-store.test.js +51 -82
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +5 -3
- package/src/agents/_templates/agent.liquid +1 -1
- package/src/agents/developer/api-developer/agent.yaml +1 -1
- package/src/agents/developer/cli-developer/agent.yaml +1 -1
- package/src/agents/developer/web-architecture/agent.yaml +1 -1
- package/src/agents/developer/web-developer/agent.yaml +1 -1
- package/src/agents/meta/agent-summoner/agent.yaml +1 -1
- package/src/agents/meta/documentor/agent.yaml +1 -1
- package/src/agents/meta/skill-summoner/agent.yaml +1 -1
- package/src/agents/migration/cli-migrator/agent.yaml +1 -1
- package/src/agents/pattern/pattern-scout/agent.yaml +1 -1
- package/src/agents/pattern/web-pattern-critique/agent.yaml +1 -1
- package/src/agents/planning/web-pm/agent.yaml +1 -1
- package/src/agents/researcher/api-researcher/agent.yaml +1 -1
- package/src/agents/researcher/web-researcher/agent.yaml +1 -1
- package/src/agents/reviewer/api-reviewer/agent.yaml +1 -1
- package/src/agents/reviewer/cli-reviewer/agent.yaml +1 -1
- package/src/agents/reviewer/web-reviewer/agent.yaml +1 -1
- package/src/agents/tester/cli-tester/agent.yaml +1 -1
- package/src/agents/tester/web-tester/agent.yaml +1 -1
- package/dist/chunk-2LSGX6R4.js.map +0 -1
- package/dist/chunk-2OKUEELH.js +0 -32
- package/dist/chunk-2OKUEELH.js.map +0 -1
- package/dist/chunk-374JNMR6.js +0 -212
- package/dist/chunk-374JNMR6.js.map +0 -1
- package/dist/chunk-3EHUF54X.js.map +0 -1
- package/dist/chunk-3XR4PALU.js +0 -529
- package/dist/chunk-3XR4PALU.js.map +0 -1
- package/dist/chunk-5K2ZLUO5.js +0 -57
- package/dist/chunk-5K2ZLUO5.js.map +0 -1
- package/dist/chunk-5KXUDHAB.js.map +0 -1
- package/dist/chunk-6Q3Y7KVB.js.map +0 -1
- package/dist/chunk-7SLV7CMF.js +0 -615
- package/dist/chunk-7SLV7CMF.js.map +0 -1
- package/dist/chunk-A46TPNBJ.js.map +0 -1
- package/dist/chunk-AL74GBW4.js +0 -69
- package/dist/chunk-AL74GBW4.js.map +0 -1
- package/dist/chunk-BQX23RBV.js +0 -191
- package/dist/chunk-BQX23RBV.js.map +0 -1
- package/dist/chunk-CA4LH4LI.js +0 -132
- package/dist/chunk-CA4LH4LI.js.map +0 -1
- package/dist/chunk-CBLPAMZO.js.map +0 -1
- package/dist/chunk-CKPQHGXR.js +0 -417
- package/dist/chunk-CKPQHGXR.js.map +0 -1
- package/dist/chunk-CXOFOJCN.js +0 -80
- package/dist/chunk-CXOFOJCN.js.map +0 -1
- package/dist/chunk-EHGD7HIE.js +0 -104
- package/dist/chunk-EHGD7HIE.js.map +0 -1
- package/dist/chunk-EHS3TWWP.js +0 -95
- package/dist/chunk-EHS3TWWP.js.map +0 -1
- package/dist/chunk-FJFEKPXF.js.map +0 -1
- package/dist/chunk-HEOHU5EZ.js.map +0 -1
- package/dist/chunk-HGCBZUH5.js.map +0 -1
- package/dist/chunk-HPGFY5ZN.js +0 -114
- package/dist/chunk-HPGFY5ZN.js.map +0 -1
- package/dist/chunk-INJ2EFRW.js +0 -127
- package/dist/chunk-INJ2EFRW.js.map +0 -1
- package/dist/chunk-IOBFMF6X.js +0 -61
- package/dist/chunk-IOBFMF6X.js.map +0 -1
- package/dist/chunk-KH3HA7J7.js +0 -116
- package/dist/chunk-KH3HA7J7.js.map +0 -1
- package/dist/chunk-N6JNE326.js +0 -261
- package/dist/chunk-N6JNE326.js.map +0 -1
- package/dist/chunk-NAGU7TVZ.js +0 -36
- package/dist/chunk-NAGU7TVZ.js.map +0 -1
- package/dist/chunk-OQYYMQJR.js.map +0 -1
- package/dist/chunk-PLZOUVDD.js +0 -419
- package/dist/chunk-PLZOUVDD.js.map +0 -1
- package/dist/chunk-Q3J43SF3.js.map +0 -1
- package/dist/chunk-RTE64SJA.js.map +0 -1
- package/dist/chunk-T25OEQFI.js +0 -26
- package/dist/chunk-T25OEQFI.js.map +0 -1
- package/dist/chunk-UMORK7OK.js.map +0 -1
- package/dist/chunk-VFHWU7JU.js +0 -287
- package/dist/chunk-VFHWU7JU.js.map +0 -1
- package/dist/chunk-VS4GVTZE.js +0 -91
- package/dist/chunk-VS4GVTZE.js.map +0 -1
- package/dist/chunk-WFEFICFM.js.map +0 -1
- package/dist/chunk-WG6KIAPK.js +0 -54
- package/dist/chunk-WG6KIAPK.js.map +0 -1
- package/dist/chunk-ZEI3ZUDU.js.map +0 -1
- package/dist/chunk-ZNIDWLL5.js.map +0 -1
- package/dist/chunk-ZSVMS677.js.map +0 -1
- /package/dist/{chunk-XY3XDVMI.js.map → chunk-QR2EBWL2.js.map} +0 -0
- /package/dist/{chunk-66UDJBF6.js.map → chunk-REJGRCVQ.js.map} +0 -0
- /package/dist/{chunk-Z2CWURZ6.js.map → chunk-UNN7523L.js.map} +0 -0
- /package/dist/{magic-string.es-RGXYGAW3.js.map → magic-string.es-PAH2SOTR.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/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 { AgentSourcePaths, PluginManifest, ProjectConfig, SkillDefinition } 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 ? `${pathPrefix}/${relativePath}/` : `${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(projectDir: string): 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(pluginDir: string): 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(\"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 ProjectConfig;\n const agentCount = config.agents?.length ?? 0;\n const configSkillCount = config.skills?.length ?? 0;\n this.log(`Using config.yaml (${agentCount} agents, ${configSkillCount} skills)`);\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(flags[\"agent-source\"] ? \"Fetching agent partials...\" : \"Loading agent partials...\");\n let agentDefs: AgentSourcePaths;\n try {\n agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n projectDir,\n });\n this.log(flags[\"agent-source\"] ? \"Agent partials fetched\" : \"Agent partials loaded\");\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(`[dry-run] Would use agent partials from: ${agentDefs.sourcePath}`);\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(flags[\"agent-source\"] ? \"Fetching agent partials...\" : \"Loading agent partials...\");\n let agentDefs: AgentSourcePaths;\n try {\n agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n projectDir,\n });\n this.log(flags[\"agent-source\"] ? \"Agent partials fetched\" : \"Agent partials loaded\");\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(`[dry-run] Would use agent definitions from: ${agentDefs.sourcePath}`);\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":";;;;;;;;;;;;;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AgB,SAAS,MAAM,SAAS;AAAA,MAC/D,OAAO;AACL,aAAK,IAAI,sBAAsB;AAAA,MACjC;AAEA,UAAI,gBAAgB,SAAS,SAAS,GAAG;AACvC,gBAAQ,eAAe,gBAAgB,SAAS,KAAK,IAAI,CAAC,EAAE;AAC5D,aAAK,IAAI,EAAE;AACX,aAAK,IAAI,qBAAqB;AAC9B,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":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/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/plugins\";\nimport { getAgentDefinitions } from \"../lib/agents\";\nimport { resolveSource } from \"../lib/configuration\";\nimport {\n directoryExists,\n ensureDir,\n glob,\n readFile,\n fileExists,\n listDirectories,\n} from \"../utils/fs\";\nimport { recompileAgents } from \"../lib/agents\";\nimport { loadPluginSkills, parseFrontmatter } from \"../lib/loading\";\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 ProjectConfig,\n SkillDefinition,\n SkillId,\n} from \"../types\";\nimport { pluginManifestSchema, projectConfigLoaderSchema } from \"../lib/schemas\";\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 const frontmatter = parseFrontmatter(content, skillPath);\n\n const skillName = frontmatter?.name || path.basename(skillDir);\n const canonicalId = skillName as SkillId;\n\n const skill: SkillDefinition = {\n id: canonicalId,\n path: pathPrefix ? `${pathPrefix}/${relativePath}/` : `${relativePath}/`,\n description: frontmatter?.description || \"\",\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(projectDir: string): 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(pluginDir: string): 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 pluginManifestSchema.parse(JSON.parse(content));\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 (flags.output) {\n await this.runCustomOutputCompile({\n ...flags,\n output: flags.output,\n });\n return;\n }\n\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(\"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 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 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 const pluginDir = getCollectivePluginDir();\n this.log(\"Finding plugin...\");\n\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 parsed = parseYaml(configContent);\n const configResult = projectConfigLoaderSchema.safeParse(parsed);\n if (configResult.success) {\n const config = configResult.data as ProjectConfig;\n const agentCount = config.agents?.length ?? 0;\n const stackSkillCount = config.stack\n ? new Set(Object.values(config.stack).flatMap((a) => Object.values(a))).size\n : 0;\n this.log(`Using config.yaml (${agentCount} agents, ${stackSkillCount} skills)`);\n verbose(` Config: ${configPath}`);\n } else {\n this.warn(\"config.yaml found but has invalid structure - using defaults\");\n }\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(flags[\"agent-source\"] ? \"Fetching agent partials...\" : \"Loading agent partials...\");\n let agentDefs: AgentSourcePaths;\n try {\n agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n projectDir,\n });\n this.log(flags[\"agent-source\"] ? \"Agent partials fetched\" : \"Agent partials loaded\");\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(`[dry-run] Would use agent partials from: ${agentDefs.sourcePath}`);\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(flags[\"agent-source\"] ? \"Fetching agent partials...\" : \"Loading agent partials...\");\n let agentDefs: AgentSourcePaths;\n try {\n agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n projectDir,\n });\n this.log(flags[\"agent-source\"] ? \"Agent partials fetched\" : \"Agent partials loaded\");\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(`[dry-run] Would use agent definitions from: ${agentDefs.sourcePath}`);\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;AAiCnC,eAAe,kBACb,WACA,aAAqB,IACqB;AAC1C,QAAM,SAA0C,CAAC;AAEjD,MAAI,CAAE,MAAM,gBAAgB,SAAS,GAAI;AACvC,WAAO;AAAA,EACT;AAEA,QAAM,aAAa,MAAM,KAAK,eAAe,SAAS;AAEtD,aAAW,aAAa,YAAY;AAClC,UAAM,YAAY,KAAK,KAAK,WAAW,SAAS;AAChD,UAAM,WAAW,KAAK,QAAQ,SAAS;AACvC,UAAM,eAAe,KAAK,SAAS,WAAW,QAAQ;AAEtD,QAAI;AACF,YAAM,UAAU,MAAM,SAAS,SAAS;AACxC,YAAM,cAAc,iBAAiB,SAAS,SAAS;AAEvD,YAAM,YAAY,aAAa,QAAQ,KAAK,SAAS,QAAQ;AAC7D,YAAM,cAAc;AAEpB,YAAM,QAAyB;AAAA,QAC7B,IAAI;AAAA,QACJ,MAAM,aAAa,GAAG,UAAU,IAAI,YAAY,MAAM,GAAG,YAAY;AAAA,QACrE,aAAa,aAAa,eAAe;AAAA,MAC3C;AAEA,aAAO,WAAW,IAAI;AACtB,cA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UACH,YAAY,gBAAgB,SAAS,MAAM,YAAY,gBAAgB,OAAO,MAAM;AAAA,QACtF;AACA,mBAAW,WAAW,gBAAgB,UAAU;AAC9C,eAAK,KAAK,OAAO;AAAA,QACnB;AAAA,MACF,WAAW,gBAAgB,SAAS,SAAS,GAAG;AAC9C,aAAK,IAAI,YAAY,gBAAgB,SAAS,MAAM,SAAS;AAAA,MAC/D,OAAO;AACL,aAAK,IAAI,sBAAsB;AAAA,MACjC;AAEA,UAAI,gBAAgB,SAAS,SAAS,GAAG;AACvC,gBAAQ,eAAe,gBAAgB,SAAS,KAAK,IAAI,CAAC,EAAE;AAC5D,aAAK,IAAI,EAAE;AACX,aAAK,IAAI,qBAAqB;AAC9B,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":[]}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-OBXAY23Y.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
7
|
+
loadProjectSourceConfig,
|
|
8
8
|
resolveAgentsSource,
|
|
9
9
|
resolveSource
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-ETQ3BPGU.js";
|
|
11
|
+
import "../../chunk-ZDREFYD2.js";
|
|
12
|
+
import "../../chunk-HWD32NP7.js";
|
|
13
|
+
import "../../chunk-O6ZTD7ZI.js";
|
|
14
14
|
import {
|
|
15
15
|
init_esm_shims
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-AWKZ5BDL.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/config/get.ts
|
|
19
19
|
init_esm_shims();
|
|
@@ -38,7 +38,7 @@ var ConfigGet = class _ConfigGet extends BaseCommand {
|
|
|
38
38
|
const resolved = await resolveSource(void 0, projectDir);
|
|
39
39
|
this.log(resolved.source);
|
|
40
40
|
} else if (key === "author") {
|
|
41
|
-
const projectConfig = await
|
|
41
|
+
const projectConfig = await loadProjectSourceConfig(projectDir);
|
|
42
42
|
this.log(projectConfig?.author || "");
|
|
43
43
|
} else if (key === "marketplace") {
|
|
44
44
|
const resolved = await resolveSource(void 0, projectDir);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/config/get.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/config/get.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {\n resolveSource,\n resolveAgentsSource,\n loadProjectSourceConfig,\n} from \"../../lib/configuration/index.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: \"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 projectConfig = await loadProjectSourceConfig(projectDir);\n this.log(projectConfig?.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,aAAa;AAAA,MACb,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,gBAAgB,MAAM,wBAAwB,UAAU;AAC9D,WAAK,IAAI,eAAe,UAAU,EAAE;AAAA,IACtC,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":[]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigShow
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-I3YYG5IO.js";
|
|
5
|
+
import "../../chunk-OBXAY23Y.js";
|
|
6
|
+
import "../../chunk-ETQ3BPGU.js";
|
|
7
|
+
import "../../chunk-ZDREFYD2.js";
|
|
8
|
+
import "../../chunk-HWD32NP7.js";
|
|
9
|
+
import "../../chunk-O6ZTD7ZI.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esm_shims
|
|
12
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-AWKZ5BDL.js";
|
|
13
13
|
|
|
14
14
|
// src/cli/commands/config/index.ts
|
|
15
15
|
init_esm_shims();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/config/index.ts"],"sourcesContent":["import ConfigShow from \"./show.js\";\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/config/index.ts"],"sourcesContent":["import ConfigShow from \"./show.js\";\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, default)\";\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAEA,IAAqB,SAArB,cAAoC,WAAW;AAAA,EAC7C,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AACJ;","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-OBXAY23Y.js";
|
|
5
5
|
import {
|
|
6
6
|
getProjectConfigPath
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
7
|
+
} from "../../chunk-ETQ3BPGU.js";
|
|
8
|
+
import "../../chunk-ZDREFYD2.js";
|
|
9
|
+
import "../../chunk-HWD32NP7.js";
|
|
10
|
+
import "../../chunk-O6ZTD7ZI.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esm_shims
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-AWKZ5BDL.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/commands/config/path.ts
|
|
16
16
|
init_esm_shims();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/config/path.ts"],"sourcesContent":["import { BaseCommand } from \"../../base-command.js\";\nimport { getProjectConfigPath } from \"../../lib/
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/config/path.ts"],"sourcesContent":["import { BaseCommand } from \"../../base-command.js\";\nimport { getProjectConfigPath } from \"../../lib/configuration/index.js\";\n\nexport default class ConfigPath extends BaseCommand {\n static summary = \"Show configuration file paths\";\n static description = \"Display the file path for the project configuration file\";\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(`Project: ${getProjectConfigPath(projectDir)}`);\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAGA,IAAqB,aAArB,MAAqB,oBAAmB,YAAY;AAAA,EAClD,OAAO,UAAU;AAAA,EACjB,OAAO,cAAc;AAAA,EAErB,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,qBAAqB,UAAU,CAAC,EAAE;AACvD,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-OBXAY23Y.js";
|
|
6
6
|
import {
|
|
7
7
|
getProjectConfigPath,
|
|
8
|
-
|
|
8
|
+
loadProjectSourceConfig,
|
|
9
9
|
saveProjectConfig
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-ETQ3BPGU.js";
|
|
11
|
+
import "../../chunk-ZDREFYD2.js";
|
|
12
|
+
import "../../chunk-HWD32NP7.js";
|
|
13
|
+
import "../../chunk-O6ZTD7ZI.js";
|
|
14
14
|
import {
|
|
15
15
|
init_esm_shims
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-AWKZ5BDL.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/config/set-project.ts
|
|
19
19
|
init_esm_shims();
|
|
@@ -45,7 +45,7 @@ Valid keys: ${validKeys.join(", ")}`, {
|
|
|
45
45
|
exit: EXIT_CODES.INVALID_ARGS
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
const existingConfig = await
|
|
48
|
+
const existingConfig = await loadProjectSourceConfig(projectDir) || {};
|
|
49
49
|
const newConfig = {
|
|
50
50
|
...existingConfig,
|
|
51
51
|
[key]: value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/config/set-project.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/config/set-project.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {\n loadProjectSourceConfig,\n saveProjectConfig,\n getProjectConfigPath,\n type ProjectSourceConfig,\n} from \"../../lib/configuration/index.js\";\nimport { EXIT_CODES } from \"../../lib/exit-codes.js\";\n\nexport default class ConfigSetProject extends BaseCommand {\n static summary = \"Set a project-level configuration value\";\n static description =\n \"Set a project-level configuration value (source, marketplace, agents_source)\";\n\n static args = {\n key: Args.string({\n description: \"Configuration key (source, marketplace, agents_source)\",\n required: true,\n }),\n value: Args.string({\n description: \"Configuration value\",\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(ConfigSetProject);\n const projectDir = process.cwd();\n const { key, value } = args;\n\n const validKeys = [\"source\", \"marketplace\", \"agents_source\"];\n\n if (!validKeys.includes(key)) {\n this.error(`Unknown configuration key: ${key}\\nValid keys: ${validKeys.join(\", \")}`, {\n exit: EXIT_CODES.INVALID_ARGS,\n });\n }\n\n const existingConfig = (await loadProjectSourceConfig(projectDir)) || {};\n\n const newConfig: ProjectSourceConfig = {\n ...existingConfig,\n [key]: value,\n };\n\n await saveProjectConfig(projectDir, newConfig);\n\n this.logSuccess(`Set ${key} = ${value} (project-level)`);\n this.logInfo(`Saved to ${getProjectConfigPath(projectDir)}`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,YAAY;AAUrB,IAAqB,mBAArB,MAAqB,0BAAyB,YAAY;AAAA,EACxD,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,OAAO,OAAO;AAAA,IACZ,KAAK,KAAK,OAAO;AAAA,MACf,aAAa;AAAA,MACb,UAAU;AAAA,IACZ,CAAC;AAAA,IACD,OAAO,KAAK,OAAO;AAAA,MACjB,aAAa;AAAA,MACb,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,iBAAgB;AAClD,UAAM,aAAa,QAAQ,IAAI;AAC/B,UAAM,EAAE,KAAK,MAAM,IAAI;AAEvB,UAAM,YAAY,CAAC,UAAU,eAAe,eAAe;AAE3D,QAAI,CAAC,UAAU,SAAS,GAAG,GAAG;AAC5B,WAAK,MAAM,8BAA8B,GAAG;AAAA,cAAiB,UAAU,KAAK,IAAI,CAAC,IAAI;AAAA,QACnF,MAAM,WAAW;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,UAAM,iBAAkB,MAAM,wBAAwB,UAAU,KAAM,CAAC;AAEvE,UAAM,YAAiC;AAAA,MACrC,GAAG;AAAA,MACH,CAAC,GAAG,GAAG;AAAA,IACT;AAEA,UAAM,kBAAkB,YAAY,SAAS;AAE7C,SAAK,WAAW,OAAO,GAAG,MAAM,KAAK,kBAAkB;AACvD,SAAK,QAAQ,YAAY,qBAAqB,UAAU,CAAC,EAAE;AAAA,EAC7D;AACF;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigShow
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-I3YYG5IO.js";
|
|
5
|
+
import "../../chunk-OBXAY23Y.js";
|
|
6
|
+
import "../../chunk-ETQ3BPGU.js";
|
|
7
|
+
import "../../chunk-ZDREFYD2.js";
|
|
8
|
+
import "../../chunk-HWD32NP7.js";
|
|
9
|
+
import "../../chunk-O6ZTD7ZI.js";
|
|
10
|
+
import "../../chunk-AWKZ5BDL.js";
|
|
11
11
|
export {
|
|
12
12
|
ConfigShow as default
|
|
13
13
|
};
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-OBXAY23Y.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
7
|
+
loadProjectSourceConfig,
|
|
8
8
|
saveProjectConfig
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
9
|
+
} from "../../chunk-ETQ3BPGU.js";
|
|
10
|
+
import "../../chunk-ZDREFYD2.js";
|
|
11
|
+
import "../../chunk-HWD32NP7.js";
|
|
12
|
+
import "../../chunk-O6ZTD7ZI.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esm_shims
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-AWKZ5BDL.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/commands/config/unset-project.ts
|
|
18
18
|
init_esm_shims();
|
|
@@ -40,7 +40,7 @@ Valid keys: ${validKeys.join(", ")}`, {
|
|
|
40
40
|
exit: EXIT_CODES.INVALID_ARGS
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
const existingConfig = await
|
|
43
|
+
const existingConfig = await loadProjectSourceConfig(projectDir);
|
|
44
44
|
if (!existingConfig) {
|
|
45
45
|
this.logInfo("No project configuration exists.");
|
|
46
46
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/config/unset-project.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/config/unset-project.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../../base-command.js\";\nimport {\n loadProjectSourceConfig,\n saveProjectConfig,\n type ProjectSourceConfig,\n} from \"../../lib/configuration/index.js\";\nimport { EXIT_CODES } from \"../../lib/exit-codes.js\";\n\nexport default class ConfigUnsetProject extends BaseCommand {\n static summary = \"Remove a project-level configuration value\";\n static description = \"Remove a project-level configuration value\";\n\n static args = {\n key: Args.string({\n description: \"Configuration key to remove\",\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(ConfigUnsetProject);\n const projectDir = process.cwd();\n const { key } = args;\n\n const validKeys = [\"source\", \"marketplace\", \"agents_source\"];\n\n if (!validKeys.includes(key)) {\n this.error(`Unknown configuration key: ${key}\\nValid keys: ${validKeys.join(\", \")}`, {\n exit: EXIT_CODES.INVALID_ARGS,\n });\n }\n\n const existingConfig = await loadProjectSourceConfig(projectDir);\n\n if (!existingConfig) {\n this.logInfo(\"No project configuration exists.\");\n return;\n }\n\n const newConfig: ProjectSourceConfig = { ...existingConfig };\n delete newConfig[key as keyof ProjectSourceConfig];\n\n await saveProjectConfig(projectDir, newConfig);\n\n this.logSuccess(`Removed ${key} from project configuration`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,YAAY;AASrB,IAAqB,qBAArB,MAAqB,4BAA2B,YAAY;AAAA,EAC1D,OAAO,UAAU;AAAA,EACjB,OAAO,cAAc;AAAA,EAErB,OAAO,OAAO;AAAA,IACZ,KAAK,KAAK,OAAO;AAAA,MACf,aAAa;AAAA,MACb,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,mBAAkB;AACpD,UAAM,aAAa,QAAQ,IAAI;AAC/B,UAAM,EAAE,IAAI,IAAI;AAEhB,UAAM,YAAY,CAAC,UAAU,eAAe,eAAe;AAE3D,QAAI,CAAC,UAAU,SAAS,GAAG,GAAG;AAC5B,WAAK,MAAM,8BAA8B,GAAG;AAAA,cAAiB,UAAU,KAAK,IAAI,CAAC,IAAI;AAAA,QACnF,MAAM,WAAW;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,UAAM,iBAAiB,MAAM,wBAAwB,UAAU;AAE/D,QAAI,CAAC,gBAAgB;AACnB,WAAK,QAAQ,kCAAkC;AAC/C;AAAA,IACF;AAEA,UAAM,YAAiC,EAAE,GAAG,eAAe;AAC3D,WAAO,UAAU,GAAgC;AAEjD,UAAM,kBAAkB,YAAY,SAAS;AAE7C,SAAK,WAAW,WAAW,GAAG,6BAA6B;AAAA,EAC7D;AACF;","names":[]}
|
package/dist/commands/diff.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
readForkedFromMetadata
|
|
4
|
-
} from "../chunk-INJ2EFRW.js";
|
|
5
|
-
import "../chunk-IOBFMF6X.js";
|
|
6
|
-
import {
|
|
7
|
-
loadSkillsMatrixFromSource
|
|
8
|
-
} from "../chunk-PLZOUVDD.js";
|
|
9
|
-
import "../chunk-CKPQHGXR.js";
|
|
10
|
-
import "../chunk-CA4LH4LI.js";
|
|
11
|
-
import "../chunk-BQX23RBV.js";
|
|
12
2
|
import {
|
|
13
3
|
BaseCommand,
|
|
14
4
|
EXIT_CODES
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import
|
|
17
|
-
|
|
5
|
+
} from "../chunk-OBXAY23Y.js";
|
|
6
|
+
import {
|
|
7
|
+
loadSkillsMatrixFromSource,
|
|
8
|
+
readForkedFromMetadata
|
|
9
|
+
} from "../chunk-ETQ3BPGU.js";
|
|
18
10
|
import {
|
|
19
11
|
fileExists,
|
|
20
12
|
listDirectories,
|
|
21
13
|
readFile
|
|
22
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-ZDREFYD2.js";
|
|
15
|
+
import "../chunk-HWD32NP7.js";
|
|
23
16
|
import {
|
|
24
17
|
LOCAL_SKILLS_PATH
|
|
25
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-O6ZTD7ZI.js";
|
|
26
19
|
import {
|
|
27
20
|
init_esm_shims
|
|
28
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-AWKZ5BDL.js";
|
|
29
22
|
|
|
30
23
|
// src/cli/commands/diff.ts
|
|
31
24
|
init_esm_shims();
|
|
@@ -654,6 +647,7 @@ var Diff = class _Diff extends BaseCommand {
|
|
|
654
647
|
}
|
|
655
648
|
const sourceSkills = {};
|
|
656
649
|
for (const [skillId, skill] of Object.entries(matrix.skills)) {
|
|
650
|
+
if (!skill) continue;
|
|
657
651
|
if (!skill.local) {
|
|
658
652
|
sourceSkills[skillId] = { path: skill.path };
|
|
659
653
|
}
|