@agents-inc/cli 0.47.0 → 0.50.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 +39 -0
- package/README.md +113 -118
- package/config/skill-categories.yaml +344 -0
- package/config/skill-rules.yaml +740 -0
- package/config/stacks.yaml +0 -1
- package/dist/{chunk-CJFWO46A.js → chunk-26MXZUHU.js} +2 -2
- package/dist/{chunk-KQ27IDYL.js → chunk-2BWCR762.js} +2 -3
- package/dist/chunk-2BWCR762.js.map +1 -0
- package/dist/chunk-3VOL4WEG.js +31 -0
- package/dist/chunk-3VOL4WEG.js.map +1 -0
- package/dist/chunk-4QWDB2MD.js +571 -0
- package/dist/chunk-4QWDB2MD.js.map +1 -0
- package/dist/{chunk-LJ5E4GXC.js → chunk-4R52TQ3K.js} +2 -2
- package/dist/{chunk-SPSGZWTZ.js → chunk-5FCHJLM7.js} +34 -16
- package/dist/chunk-5FCHJLM7.js.map +1 -0
- package/dist/chunk-5FPIKTSA.js +40 -0
- package/dist/chunk-5FPIKTSA.js.map +1 -0
- package/dist/{chunk-HLTJK3XB.js → chunk-5L724R4C.js} +5 -6
- package/dist/{chunk-HLTJK3XB.js.map → chunk-5L724R4C.js.map} +1 -1
- package/dist/{chunk-JTTTXGHX.js → chunk-7LV4V6A4.js} +4 -4
- package/dist/{chunk-FTD5Z6QD.js → chunk-AWP5A6IM.js} +15 -7
- package/dist/chunk-AWP5A6IM.js.map +1 -0
- package/dist/chunk-C3Q43WLC.js +118 -0
- package/dist/chunk-C3Q43WLC.js.map +1 -0
- package/dist/{chunk-B4QYXVPZ.js → chunk-CMNKHDOX.js} +2 -2
- package/dist/{chunk-TBB3THSL.js → chunk-D72AFYQR.js} +8 -13
- package/dist/chunk-D72AFYQR.js.map +1 -0
- package/dist/{chunk-QR2TM4OY.js → chunk-DCE423KO.js} +46 -30
- package/dist/chunk-DCE423KO.js.map +1 -0
- package/dist/chunk-GBOW6FUW.js +74 -0
- package/dist/chunk-GBOW6FUW.js.map +1 -0
- package/dist/{chunk-GFDGYQ6M.js → chunk-HMSHB5EQ.js} +569 -269
- package/dist/chunk-HMSHB5EQ.js.map +1 -0
- package/dist/{chunk-NRCKIHND.js → chunk-HYEUETIC.js} +2 -2
- package/dist/{chunk-OEJDFGAF.js → chunk-I6IOGZSZ.js} +61 -52
- package/dist/chunk-I6IOGZSZ.js.map +1 -0
- package/dist/{chunk-3APMMQUA.js → chunk-JFF7P4LC.js} +30 -93
- package/dist/chunk-JFF7P4LC.js.map +1 -0
- package/dist/{chunk-N5OCAAXY.js → chunk-JWYRXE6C.js} +2 -2
- package/dist/{chunk-TWDVLTU6.js → chunk-KAO3LKB5.js} +3 -3
- package/dist/{chunk-XTRPYUWK.js → chunk-KQOU4POU.js} +26 -28
- package/dist/chunk-KQOU4POU.js.map +1 -0
- package/dist/{chunk-YTRFL3MR.js → chunk-M3GQ2R3E.js} +29 -28
- package/dist/chunk-M3GQ2R3E.js.map +1 -0
- package/dist/{chunk-LNA6M2IE.js → chunk-PGY5XROM.js} +2 -2
- package/dist/chunk-PGY5XROM.js.map +1 -0
- package/dist/{chunk-VAQJLHUW.js → chunk-QB5HHTAA.js} +8 -19
- package/dist/chunk-QB5HHTAA.js.map +1 -0
- package/dist/{chunk-VSZ5GDET.js → chunk-QYLCINGC.js} +2 -2
- package/dist/{chunk-IRJADQM7.js → chunk-RA2IPRO2.js} +2 -2
- package/dist/{chunk-DC333ZDC.js → chunk-RDWGYKDY.js} +4 -4
- package/dist/{chunk-FXQYEXLS.js → chunk-RFKDGJAJ.js} +26 -57
- package/dist/chunk-RFKDGJAJ.js.map +1 -0
- package/dist/{chunk-HPJP3HFD.js → chunk-SPFHPHYL.js} +7 -7
- package/dist/{chunk-EZ46ZTAQ.js → chunk-U2W5SENM.js} +3 -3
- package/dist/{chunk-MVEYK55V.js → chunk-U7X4V4HE.js} +2 -2
- package/dist/{chunk-INKJBMPJ.js → chunk-UAD3SC27.js} +4 -12
- package/dist/chunk-UAD3SC27.js.map +1 -0
- package/dist/{chunk-C4QI54PN.js → chunk-WBHPCBVN.js} +57 -34
- package/dist/chunk-WBHPCBVN.js.map +1 -0
- package/dist/chunk-WFFV254H.js +314 -0
- package/dist/chunk-WFFV254H.js.map +1 -0
- package/dist/{chunk-ZWAL2ZY7.js → chunk-WJHFV6RI.js} +3 -2
- package/dist/chunk-WJHFV6RI.js.map +1 -0
- package/dist/{chunk-2RQYJFKA.js → chunk-WLZHCM7O.js} +2 -2
- package/dist/{chunk-DVW6ASTO.js → chunk-XDSVV5GZ.js} +4 -4
- package/dist/{chunk-JZHIF3K7.js → chunk-YDYRAXSY.js} +57 -27
- package/dist/chunk-YDYRAXSY.js.map +1 -0
- package/dist/commands/build/marketplace.js +4 -4
- package/dist/commands/build/plugins.js +5 -5
- package/dist/commands/build/stack.js +5 -5
- package/dist/commands/compile.js +11 -9
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/get.js +4 -4
- package/dist/commands/config/index.js +5 -5
- package/dist/commands/config/path.js +4 -4
- package/dist/commands/config/set-project.js +4 -4
- package/dist/commands/config/show.js +5 -5
- package/dist/commands/config/unset-project.js +4 -4
- package/dist/commands/diff.js +4 -4
- package/dist/commands/doctor.js +4 -4
- package/dist/commands/edit.js +58 -52
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +4 -4
- package/dist/commands/import/skill.js +7 -8
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/info.js +5 -5
- package/dist/commands/init.js +40 -435
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +4 -4
- package/dist/commands/new/agent.js +11 -10
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/marketplace.js +24 -5
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/new/skill.js +15 -209
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +11 -7
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +7 -8
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/uninstall.js +6 -6
- package/dist/commands/update.js +6 -6
- package/dist/commands/validate.js +62 -250
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +3 -2
- package/dist/components/wizard/category-grid.test.js +112 -58
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +5 -3
- package/dist/components/wizard/checkbox-grid.test.js +5 -4
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -1
- package/dist/components/wizard/domain-selection.js +11 -9
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/menu-item.js +1 -1
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/selection-card.js +2 -2
- package/dist/components/wizard/source-grid.js +4 -3
- package/dist/components/wizard/source-grid.test.js +4 -3
- package/dist/components/wizard/source-grid.test.js.map +1 -1
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +10 -8
- package/dist/components/wizard/step-agents.test.js +18 -17
- package/dist/components/wizard/step-agents.test.js.map +1 -1
- package/dist/components/wizard/step-build.js +9 -8
- package/dist/components/wizard/step-build.test.js +17 -35
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +4 -4
- package/dist/components/wizard/step-confirm.test.js +8 -8
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +2 -2
- package/dist/components/wizard/step-settings.js +7 -5
- package/dist/components/wizard/step-settings.test.js +10 -8
- package/dist/components/wizard/step-settings.test.js.map +1 -1
- package/dist/components/wizard/step-sources.js +11 -10
- package/dist/components/wizard/step-sources.test.js +12 -11
- package/dist/components/wizard/step-sources.test.js.map +1 -1
- package/dist/components/wizard/step-stack.js +15 -12
- package/dist/components/wizard/step-stack.test.js +16 -13
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +8 -8
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +2 -2
- package/dist/components/wizard/wizard.js +27 -25
- package/dist/config/skill-categories.yaml +344 -0
- package/dist/config/skill-rules.yaml +740 -0
- package/dist/config/stacks.yaml +0 -1
- package/dist/hooks/init.js +55 -3
- package/dist/hooks/init.js.map +1 -1
- package/dist/{source-manager-Q34LTUVM.js → source-manager-BVB2SG73.js} +4 -4
- package/dist/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
- package/dist/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
- package/dist/src/agents/meta/agent-summoner/examples.md +2 -2
- package/dist/src/agents/meta/agent-summoner/output-format.md +1 -1
- package/dist/src/agents/meta/agent-summoner/workflow.md +5 -7
- package/{src/agents/meta/documentor/agent.yaml → dist/src/agents/meta/documentor/metadata.yaml} +1 -0
- package/dist/stores/wizard-store.js +5 -5
- package/dist/stores/wizard-store.test.js +79 -27
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +5 -1
- package/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
- package/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
- package/src/agents/meta/agent-summoner/examples.md +2 -2
- package/src/agents/meta/agent-summoner/output-format.md +1 -1
- package/src/agents/meta/agent-summoner/workflow.md +5 -7
- package/{dist/src/agents/meta/documentor/agent.yaml → src/agents/meta/documentor/metadata.yaml} +1 -0
- package/src/schemas/agent.schema.json +1 -1
- package/src/schemas/metadata.schema.json +2 -5
- package/src/schemas/project-config.schema.json +0 -3
- package/src/schemas/project-source-config.schema.json +4 -1
- package/config/skills-matrix.yaml +0 -918
- package/dist/chunk-3APMMQUA.js.map +0 -1
- package/dist/chunk-C4QI54PN.js.map +0 -1
- package/dist/chunk-FMQ3A7W4.js +0 -29
- package/dist/chunk-FMQ3A7W4.js.map +0 -1
- package/dist/chunk-FTD5Z6QD.js.map +0 -1
- package/dist/chunk-FXQYEXLS.js.map +0 -1
- package/dist/chunk-GFDGYQ6M.js.map +0 -1
- package/dist/chunk-INKJBMPJ.js.map +0 -1
- package/dist/chunk-JZHIF3K7.js.map +0 -1
- package/dist/chunk-KQ27IDYL.js.map +0 -1
- package/dist/chunk-LNA6M2IE.js.map +0 -1
- package/dist/chunk-M4P5YJ45.js +0 -99
- package/dist/chunk-M4P5YJ45.js.map +0 -1
- package/dist/chunk-OEJDFGAF.js.map +0 -1
- package/dist/chunk-QR2TM4OY.js.map +0 -1
- package/dist/chunk-SPSGZWTZ.js.map +0 -1
- package/dist/chunk-TBB3THSL.js.map +0 -1
- package/dist/chunk-VAQJLHUW.js.map +0 -1
- package/dist/chunk-XTRPYUWK.js.map +0 -1
- package/dist/chunk-YTRFL3MR.js.map +0 -1
- package/dist/chunk-ZWAL2ZY7.js.map +0 -1
- package/dist/config/skills-matrix.yaml +0 -918
- package/dist/src/agents/migration/cli-migrator/agent.yaml +0 -12
- package/dist/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
- package/dist/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
- package/dist/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
- package/dist/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
- package/dist/src/agents/migration/cli-migrator/intro.md +0 -15
- package/dist/src/agents/migration/cli-migrator/output-format.md +0 -164
- package/dist/src/agents/migration/cli-migrator/workflow.md +0 -230
- package/src/agents/migration/cli-migrator/agent.yaml +0 -12
- package/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
- package/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
- package/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
- package/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
- package/src/agents/migration/cli-migrator/intro.md +0 -15
- package/src/agents/migration/cli-migrator/output-format.md +0 -164
- package/src/agents/migration/cli-migrator/workflow.md +0 -230
- package/src/schemas/skills-matrix.schema.json +0 -179
- /package/dist/{chunk-CJFWO46A.js.map → chunk-26MXZUHU.js.map} +0 -0
- /package/dist/{chunk-LJ5E4GXC.js.map → chunk-4R52TQ3K.js.map} +0 -0
- /package/dist/{chunk-JTTTXGHX.js.map → chunk-7LV4V6A4.js.map} +0 -0
- /package/dist/{chunk-B4QYXVPZ.js.map → chunk-CMNKHDOX.js.map} +0 -0
- /package/dist/{chunk-NRCKIHND.js.map → chunk-HYEUETIC.js.map} +0 -0
- /package/dist/{chunk-N5OCAAXY.js.map → chunk-JWYRXE6C.js.map} +0 -0
- /package/dist/{chunk-TWDVLTU6.js.map → chunk-KAO3LKB5.js.map} +0 -0
- /package/dist/{chunk-VSZ5GDET.js.map → chunk-QYLCINGC.js.map} +0 -0
- /package/dist/{chunk-IRJADQM7.js.map → chunk-RA2IPRO2.js.map} +0 -0
- /package/dist/{chunk-DC333ZDC.js.map → chunk-RDWGYKDY.js.map} +0 -0
- /package/dist/{chunk-HPJP3HFD.js.map → chunk-SPFHPHYL.js.map} +0 -0
- /package/dist/{chunk-EZ46ZTAQ.js.map → chunk-U2W5SENM.js.map} +0 -0
- /package/dist/{chunk-MVEYK55V.js.map → chunk-U7X4V4HE.js.map} +0 -0
- /package/dist/{chunk-2RQYJFKA.js.map → chunk-WLZHCM7O.js.map} +0 -0
- /package/dist/{chunk-DVW6ASTO.js.map → chunk-XDSVV5GZ.js.map} +0 -0
- /package/dist/{source-manager-Q34LTUVM.js.map → source-manager-BVB2SG73.js.map} +0 -0
- /package/dist/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
package/dist/commands/compile.js
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getAgentDefinitions,
|
|
4
4
|
recompileAgents
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-7LV4V6A4.js";
|
|
6
6
|
import {
|
|
7
7
|
DRY_RUN_MESSAGES,
|
|
8
8
|
ERROR_MESSAGES,
|
|
9
9
|
INFO_MESSAGES,
|
|
10
10
|
STATUS_MESSAGES,
|
|
11
11
|
SUCCESS_MESSAGES
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-WLZHCM7O.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseCommand,
|
|
15
15
|
EXIT_CODES
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-PGY5XROM.js";
|
|
17
17
|
import {
|
|
18
18
|
detectInstallation,
|
|
19
19
|
discoverAllPluginSkills,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
normalizeStackRecord,
|
|
22
22
|
parseFrontmatter,
|
|
23
23
|
resolveSource
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-HMSHB5EQ.js";
|
|
25
25
|
import {
|
|
26
26
|
typedEntries,
|
|
27
27
|
typedKeys
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
setVerbose,
|
|
37
37
|
verbose,
|
|
38
38
|
warn
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-WBHPCBVN.js";
|
|
40
40
|
import {
|
|
41
41
|
CLI_BIN_NAME,
|
|
42
42
|
LOCAL_SKILLS_PATH,
|
|
43
43
|
STANDARD_FILES
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-AWP5A6IM.js";
|
|
45
45
|
import {
|
|
46
46
|
init_esm_shims
|
|
47
47
|
} from "../chunk-DHET7RCE.js";
|
|
@@ -143,6 +143,9 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
143
143
|
exit: EXIT_CODES.ERROR
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
+
if (installation.scope === "global") {
|
|
147
|
+
this.log("Using global installation from ~/.claude-src/");
|
|
148
|
+
}
|
|
146
149
|
if (installation.mode === "local") {
|
|
147
150
|
this.log("");
|
|
148
151
|
this.log("Local Mode Compile (auto-detected)");
|
|
@@ -155,8 +158,7 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
155
158
|
await this.runPluginModeCompile(flags, installation);
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
|
-
async discoverAllSkills() {
|
|
159
|
-
const projectDir = process.cwd();
|
|
161
|
+
async discoverAllSkills(projectDir = process.cwd()) {
|
|
160
162
|
this.log(STATUS_MESSAGES.DISCOVERING_SKILLS);
|
|
161
163
|
const pluginSkills = await discoverAllPluginSkills(projectDir);
|
|
162
164
|
const pluginSkillCount = typedKeys(pluginSkills).length;
|
|
@@ -248,7 +250,7 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
248
250
|
} else {
|
|
249
251
|
verbose(` No config.yaml found - using defaults`);
|
|
250
252
|
}
|
|
251
|
-
const { allSkills, totalSkillCount } = await this.discoverAllSkills();
|
|
253
|
+
const { allSkills, totalSkillCount } = await this.discoverAllSkills(projectDir);
|
|
252
254
|
await this.resolveSourceForCompile(flags);
|
|
253
255
|
const agentDefs = await this.loadAgentDefsForCompile(flags);
|
|
254
256
|
if (flags["dry-run"]) {
|
|
@@ -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, warn } from \"../utils/logger\";\nimport { discoverAllPluginSkills } from \"../lib/plugins\";\nimport { getAgentDefinitions } from \"../lib/agents\";\nimport { resolveSource } from \"../lib/configuration\";\nimport { directoryExists, ensureDir, glob, readFile, fileExists } from \"../utils/fs\";\nimport { recompileAgents } from \"../lib/agents\";\nimport { parseFrontmatter } from \"../lib/loading\";\nimport { CLI_BIN_NAME, LOCAL_SKILLS_PATH, STANDARD_FILES } from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\nimport {\n ERROR_MESSAGES,\n SUCCESS_MESSAGES,\n STATUS_MESSAGES,\n DRY_RUN_MESSAGES,\n INFO_MESSAGES,\n} from \"../utils/messages\";\nimport { detectInstallation, type Installation } from \"../lib/installation\";\nimport type { AgentSourcePaths, ProjectConfig, SkillDefinition, SkillId } from \"../types\";\nimport { projectConfigLoaderSchema } from \"../lib/schemas\";\nimport { normalizeStackRecord, getStackSkillIds } from \"../lib/stacks/stacks-loader\";\nimport { typedEntries, typedKeys } from \"../utils/typed-object\";\n\nasync function loadSkillsFromDir(\n skillsDir: string,\n pathPrefix = \"\",\n): Promise<Partial<Record<SkillId, SkillDefinition>>> {\n const skills: Partial<Record<SkillId, 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 const skillDirName = path.basename(skillDir);\n\n const metadataPath = path.join(skillDir, STANDARD_FILES.METADATA_YAML);\n if (!(await fileExists(metadataPath))) {\n const displayPath = pathPrefix ? `${pathPrefix}/${relativePath}/` : `${relativePath}/`;\n warn(\n `Skill '${skillDirName}' in '${displayPath}' is missing ${STANDARD_FILES.METADATA_YAML} — skipped. Add ${STANDARD_FILES.METADATA_YAML} to register it with the CLI.`,\n );\n continue;\n }\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 // Boundary cast: skill name from frontmatter/directory is an untyped string\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 discoverLocalProjectSkills(\n projectDir: string,\n): Promise<Partial<Record<SkillId, SkillDefinition>>> {\n const localSkillsDir = path.join(projectDir, LOCAL_SKILLS_PATH);\n return loadSkillsFromDir(localSkillsDir, LOCAL_SKILLS_PATH);\n}\n\n/** Later sources take precedence over earlier ones */\nfunction mergeSkills(\n ...skillSources: Partial<Record<SkillId, SkillDefinition>>[]\n): Partial<Record<SkillId, SkillDefinition>> {\n const merged: Partial<Record<SkillId, SkillDefinition>> = {};\n\n for (const source of skillSources) {\n for (const [id, skill] of typedEntries<SkillId, SkillDefinition | undefined>(source)) {\n if (skill) {\n merged[id] = skill;\n }\n }\n }\n\n return merged;\n}\n\ntype CompileFlags = {\n source?: string;\n \"agent-source\"?: string;\n verbose: boolean;\n \"dry-run\": boolean;\n};\n\ntype DiscoveredSkills = {\n allSkills: Partial<Record<SkillId, SkillDefinition>>;\n totalSkillCount: number;\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 ];\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 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(ERROR_MESSAGES.NO_INSTALLATION, {\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, installation);\n }\n }\n\n private async discoverAllSkills(): Promise<DiscoveredSkills> {\n const projectDir = process.cwd();\n this.log(STATUS_MESSAGES.DISCOVERING_SKILLS);\n\n const pluginSkills = await discoverAllPluginSkills(projectDir);\n const pluginSkillCount = typedKeys<SkillId>(pluginSkills).length;\n verbose(` Found ${pluginSkillCount} skills from installed plugins`);\n\n const localSkills = await discoverLocalProjectSkills(projectDir);\n const localSkillCount = typedKeys<SkillId>(localSkills).length;\n verbose(` Found ${localSkillCount} local skills from .claude/skills/`);\n\n const allSkills = mergeSkills(pluginSkills, localSkills);\n const totalSkillCount = typedKeys<SkillId>(allSkills).length;\n\n if (totalSkillCount === 0) {\n this.log(ERROR_MESSAGES.NO_SKILLS_FOUND);\n this.error(\n `No skills found. Add skills with '${CLI_BIN_NAME} 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 return { allSkills, totalSkillCount };\n }\n\n private async resolveSourceForCompile(flags: CompileFlags): Promise<void> {\n this.log(STATUS_MESSAGES.RESOLVING_SOURCE);\n try {\n const sourceConfig = await resolveSource(flags.source);\n this.log(`Source: ${sourceConfig.sourceOrigin}`);\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_RESOLVE_SOURCE);\n this.handleError(error);\n }\n }\n\n private async loadAgentDefsForCompile(flags: CompileFlags): Promise<AgentSourcePaths> {\n const projectDir = process.cwd();\n this.log(\n flags[\"agent-source\"]\n ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS\n : STATUS_MESSAGES.LOADING_AGENT_PARTIALS,\n );\n\n try {\n const agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\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 return agentDefs;\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_LOAD_AGENT_PARTIALS);\n return this.handleError(error);\n }\n }\n\n private async runPluginModeCompile(\n flags: CompileFlags,\n installation: Installation,\n ): Promise<void> {\n this.log(\"\");\n this.log(\"Plugin Mode Compile\");\n this.log(\"\");\n\n const projectDir = installation.projectDir;\n const agentsDir = installation.agentsDir;\n\n this.log(\"Using individual plugin mode\");\n verbose(` Project: ${projectDir}`);\n verbose(` Agents: ${agentsDir}`);\n\n const configPath = installation.configPath;\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 // Boundary cast: Zod loader schema validates structure; cast narrows passthrough output\n const config = configResult.data as ProjectConfig;\n // Normalize stack values to SkillAssignment[] (same as loadProjectConfig)\n if (config.stack) {\n config.stack = normalizeStackRecord(\n config.stack as unknown as Record<string, Record<string, unknown>>,\n );\n }\n const agentCount = config.agents?.length ?? 0;\n const stackSkillCount = config.stack ? getStackSkillIds(config.stack).length : 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 { allSkills, totalSkillCount } = await this.discoverAllSkills();\n await this.resolveSourceForCompile(flags);\n const agentDefs = await this.loadAgentDefsForCompile(flags);\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: ${agentsDir}`);\n this.log(DRY_RUN_MESSAGES.COMPLETE_NO_FILES_WRITTEN);\n this.log(\"\");\n return;\n }\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\n sourcePath: agentDefs.sourcePath,\n skills: allSkills,\n projectDir,\n outputDir: agentsDir,\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(INFO_MESSAGES.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(ERROR_MESSAGES.FAILED_COMPILE_AGENTS);\n this.handleError(error);\n }\n\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.PLUGIN_COMPILE_COMPLETE);\n this.log(\"\");\n }\n\n private async runCustomOutputCompile(flags: CompileFlags & { output: string }): 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 if (flags[\"dry-run\"]) {\n this.log(`[dry-run] Preview mode - no files will be written`);\n }\n\n await ensureDir(outputDir);\n\n const { allSkills, totalSkillCount } = await this.discoverAllSkills();\n await this.resolveSourceForCompile(flags);\n const agentDefs = await this.loadAgentDefsForCompile(flags);\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_MESSAGES.COMPLETE_NO_FILES_WRITTEN);\n this.log(\"\");\n return;\n }\n\n const projectDir = process.cwd();\n\n this.log(STATUS_MESSAGES.COMPILING_AGENTS);\n try {\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\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(INFO_MESSAGES.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(ERROR_MESSAGES.FAILED_COMPILE_AGENTS);\n this.handleError(error);\n }\n\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.CUSTOM_COMPILE_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;AAAA,QACA;AAAA,MACF,CAAC;AAED,UAAI,gBAAgB,OAAO,SAAS,GAAG;AACrC,aAAK;AAAA,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,cAAc,oBAAoB;AAAA,MAC7C;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,eAAe,qBAAqB;AAC7C,WAAK,YAAY,KAAK;AAAA,IACxB;AAEA,SAAK,IAAI,EAAE;AACX,SAAK,WAAW,iBAAiB,uBAAuB;AACxD,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, warn } from \"../utils/logger\";\nimport { discoverAllPluginSkills } from \"../lib/plugins\";\nimport { getAgentDefinitions } from \"../lib/agents\";\nimport { resolveSource } from \"../lib/configuration\";\nimport { directoryExists, ensureDir, glob, readFile, fileExists } from \"../utils/fs\";\nimport { recompileAgents } from \"../lib/agents\";\nimport { parseFrontmatter } from \"../lib/loading\";\nimport { CLI_BIN_NAME, LOCAL_SKILLS_PATH, STANDARD_FILES } from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\nimport {\n ERROR_MESSAGES,\n SUCCESS_MESSAGES,\n STATUS_MESSAGES,\n DRY_RUN_MESSAGES,\n INFO_MESSAGES,\n} from \"../utils/messages\";\nimport { detectInstallation, type Installation } from \"../lib/installation\";\nimport type { AgentSourcePaths, ProjectConfig, SkillDefinition, SkillId } from \"../types\";\nimport { projectConfigLoaderSchema } from \"../lib/schemas\";\nimport { normalizeStackRecord, getStackSkillIds } from \"../lib/stacks/stacks-loader\";\nimport { typedEntries, typedKeys } from \"../utils/typed-object\";\n\nasync function loadSkillsFromDir(\n skillsDir: string,\n pathPrefix = \"\",\n): Promise<Partial<Record<SkillId, SkillDefinition>>> {\n const skills: Partial<Record<SkillId, 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 const skillDirName = path.basename(skillDir);\n\n const metadataPath = path.join(skillDir, STANDARD_FILES.METADATA_YAML);\n if (!(await fileExists(metadataPath))) {\n const displayPath = pathPrefix ? `${pathPrefix}/${relativePath}/` : `${relativePath}/`;\n warn(\n `Skill '${skillDirName}' in '${displayPath}' is missing ${STANDARD_FILES.METADATA_YAML} — skipped. Add ${STANDARD_FILES.METADATA_YAML} to register it with the CLI.`,\n );\n continue;\n }\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 // Boundary cast: skill name from frontmatter/directory is an untyped string\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 discoverLocalProjectSkills(\n projectDir: string,\n): Promise<Partial<Record<SkillId, SkillDefinition>>> {\n const localSkillsDir = path.join(projectDir, LOCAL_SKILLS_PATH);\n return loadSkillsFromDir(localSkillsDir, LOCAL_SKILLS_PATH);\n}\n\n/** Later sources take precedence over earlier ones */\nfunction mergeSkills(\n ...skillSources: Partial<Record<SkillId, SkillDefinition>>[]\n): Partial<Record<SkillId, SkillDefinition>> {\n const merged: Partial<Record<SkillId, SkillDefinition>> = {};\n\n for (const source of skillSources) {\n for (const [id, skill] of typedEntries<SkillId, SkillDefinition | undefined>(source)) {\n if (skill) {\n merged[id] = skill;\n }\n }\n }\n\n return merged;\n}\n\ntype CompileFlags = {\n source?: string;\n \"agent-source\"?: string;\n verbose: boolean;\n \"dry-run\": boolean;\n};\n\ntype DiscoveredSkills = {\n allSkills: Partial<Record<SkillId, SkillDefinition>>;\n totalSkillCount: number;\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 ];\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 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(ERROR_MESSAGES.NO_INSTALLATION, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n if (installation.scope === \"global\") {\n this.log(\"Using global installation from ~/.claude-src/\");\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, installation);\n }\n }\n\n private async discoverAllSkills(projectDir: string = process.cwd()): Promise<DiscoveredSkills> {\n this.log(STATUS_MESSAGES.DISCOVERING_SKILLS);\n\n const pluginSkills = await discoverAllPluginSkills(projectDir);\n const pluginSkillCount = typedKeys<SkillId>(pluginSkills).length;\n verbose(` Found ${pluginSkillCount} skills from installed plugins`);\n\n const localSkills = await discoverLocalProjectSkills(projectDir);\n const localSkillCount = typedKeys<SkillId>(localSkills).length;\n verbose(` Found ${localSkillCount} local skills from .claude/skills/`);\n\n const allSkills = mergeSkills(pluginSkills, localSkills);\n const totalSkillCount = typedKeys<SkillId>(allSkills).length;\n\n if (totalSkillCount === 0) {\n this.log(ERROR_MESSAGES.NO_SKILLS_FOUND);\n this.error(\n `No skills found. Add skills with '${CLI_BIN_NAME} 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 return { allSkills, totalSkillCount };\n }\n\n private async resolveSourceForCompile(flags: CompileFlags): Promise<void> {\n this.log(STATUS_MESSAGES.RESOLVING_SOURCE);\n try {\n const sourceConfig = await resolveSource(flags.source);\n this.log(`Source: ${sourceConfig.sourceOrigin}`);\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_RESOLVE_SOURCE);\n this.handleError(error);\n }\n }\n\n private async loadAgentDefsForCompile(flags: CompileFlags): Promise<AgentSourcePaths> {\n const projectDir = process.cwd();\n this.log(\n flags[\"agent-source\"]\n ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS\n : STATUS_MESSAGES.LOADING_AGENT_PARTIALS,\n );\n\n try {\n const agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\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 return agentDefs;\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_LOAD_AGENT_PARTIALS);\n return this.handleError(error);\n }\n }\n\n private async runPluginModeCompile(\n flags: CompileFlags,\n installation: Installation,\n ): Promise<void> {\n this.log(\"\");\n this.log(\"Plugin Mode Compile\");\n this.log(\"\");\n\n const projectDir = installation.projectDir;\n const agentsDir = installation.agentsDir;\n\n this.log(\"Using individual plugin mode\");\n verbose(` Project: ${projectDir}`);\n verbose(` Agents: ${agentsDir}`);\n\n const configPath = installation.configPath;\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 // Boundary cast: Zod loader schema validates structure; cast narrows passthrough output\n const config = configResult.data as ProjectConfig;\n // Normalize stack values to SkillAssignment[] (same as loadProjectConfig)\n if (config.stack) {\n config.stack = normalizeStackRecord(\n config.stack as unknown as Record<string, Record<string, unknown>>,\n );\n }\n const agentCount = config.agents?.length ?? 0;\n const stackSkillCount = config.stack ? getStackSkillIds(config.stack).length : 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 { allSkills, totalSkillCount } = await this.discoverAllSkills(projectDir);\n await this.resolveSourceForCompile(flags);\n const agentDefs = await this.loadAgentDefsForCompile(flags);\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: ${agentsDir}`);\n this.log(DRY_RUN_MESSAGES.COMPLETE_NO_FILES_WRITTEN);\n this.log(\"\");\n return;\n }\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\n sourcePath: agentDefs.sourcePath,\n skills: allSkills,\n projectDir,\n outputDir: agentsDir,\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(INFO_MESSAGES.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(ERROR_MESSAGES.FAILED_COMPILE_AGENTS);\n this.handleError(error);\n }\n\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.PLUGIN_COMPILE_COMPLETE);\n this.log(\"\");\n }\n\n private async runCustomOutputCompile(flags: CompileFlags & { output: string }): 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 if (flags[\"dry-run\"]) {\n this.log(`[dry-run] Preview mode - no files will be written`);\n }\n\n await ensureDir(outputDir);\n\n const { allSkills, totalSkillCount } = await this.discoverAllSkills();\n await this.resolveSourceForCompile(flags);\n const agentDefs = await this.loadAgentDefsForCompile(flags);\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_MESSAGES.COMPLETE_NO_FILES_WRITTEN);\n this.log(\"\");\n return;\n }\n\n const projectDir = process.cwd();\n\n this.log(STATUS_MESSAGES.COMPILING_AGENTS);\n try {\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\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(INFO_MESSAGES.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(ERROR_MESSAGES.FAILED_COMPILE_AGENTS);\n this.handleError(error);\n }\n\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.CUSTOM_COMPILE_COMPLETE);\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,aAAa;AACtB,OAAO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GAAG;AACrC,aAAK;AAAA,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,cAAc,oBAAoB;AAAA,MAC7C;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,eAAe,qBAAqB;AAC7C,WAAK,YAAY,KAAK;AAAA,IACxB;AAEA,SAAK,IAAI,EAAE;AACX,SAAK,WAAW,iBAAiB,uBAAuB;AACxD,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-PGY5XROM.js";
|
|
6
6
|
import {
|
|
7
7
|
loadProjectSourceConfig,
|
|
8
8
|
resolveAgentsSource,
|
|
9
9
|
resolveSource
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-HMSHB5EQ.js";
|
|
11
11
|
import "../../chunk-T4EXUIBY.js";
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-WBHPCBVN.js";
|
|
13
|
+
import "../../chunk-AWP5A6IM.js";
|
|
14
14
|
import {
|
|
15
15
|
init_esm_shims
|
|
16
16
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigShow
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-RDWGYKDY.js";
|
|
5
|
+
import "../../chunk-PGY5XROM.js";
|
|
6
|
+
import "../../chunk-HMSHB5EQ.js";
|
|
7
7
|
import "../../chunk-T4EXUIBY.js";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-WBHPCBVN.js";
|
|
9
|
+
import "../../chunk-AWP5A6IM.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esm_shims
|
|
12
12
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-PGY5XROM.js";
|
|
5
5
|
import {
|
|
6
6
|
getProjectConfigPath
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-HMSHB5EQ.js";
|
|
8
8
|
import "../../chunk-T4EXUIBY.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-WBHPCBVN.js";
|
|
10
|
+
import "../../chunk-AWP5A6IM.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esm_shims
|
|
13
13
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-PGY5XROM.js";
|
|
6
6
|
import {
|
|
7
7
|
getProjectConfigPath,
|
|
8
8
|
loadProjectSourceConfig,
|
|
9
9
|
saveProjectConfig
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-HMSHB5EQ.js";
|
|
11
11
|
import "../../chunk-T4EXUIBY.js";
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-WBHPCBVN.js";
|
|
13
|
+
import "../../chunk-AWP5A6IM.js";
|
|
14
14
|
import {
|
|
15
15
|
init_esm_shims
|
|
16
16
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigShow
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-RDWGYKDY.js";
|
|
5
|
+
import "../../chunk-PGY5XROM.js";
|
|
6
|
+
import "../../chunk-HMSHB5EQ.js";
|
|
7
7
|
import "../../chunk-T4EXUIBY.js";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-WBHPCBVN.js";
|
|
9
|
+
import "../../chunk-AWP5A6IM.js";
|
|
10
10
|
import "../../chunk-DHET7RCE.js";
|
|
11
11
|
export {
|
|
12
12
|
ConfigShow as default
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-PGY5XROM.js";
|
|
6
6
|
import {
|
|
7
7
|
loadProjectSourceConfig,
|
|
8
8
|
saveProjectConfig
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-HMSHB5EQ.js";
|
|
10
10
|
import "../../chunk-T4EXUIBY.js";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-WBHPCBVN.js";
|
|
12
|
+
import "../../chunk-AWP5A6IM.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esm_shims
|
|
15
15
|
} from "../../chunk-DHET7RCE.js";
|
package/dist/commands/diff.js
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-PGY5XROM.js";
|
|
6
6
|
import {
|
|
7
7
|
loadSkillsMatrixFromSource,
|
|
8
8
|
readForkedFromMetadata
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-HMSHB5EQ.js";
|
|
10
10
|
import "../chunk-T4EXUIBY.js";
|
|
11
11
|
import {
|
|
12
12
|
fileExists,
|
|
13
13
|
getErrorMessage,
|
|
14
14
|
listDirectories,
|
|
15
15
|
readFile
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-WBHPCBVN.js";
|
|
17
17
|
import {
|
|
18
18
|
CLI_BIN_NAME,
|
|
19
19
|
LOCAL_SKILLS_PATH,
|
|
20
20
|
STANDARD_FILES
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-AWP5A6IM.js";
|
|
22
22
|
import {
|
|
23
23
|
init_esm_shims
|
|
24
24
|
} from "../chunk-DHET7RCE.js";
|
package/dist/commands/doctor.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-PGY5XROM.js";
|
|
6
6
|
import {
|
|
7
7
|
discoverLocalSkills,
|
|
8
8
|
getStackSkillIds,
|
|
9
9
|
loadProjectConfig,
|
|
10
10
|
loadSkillsMatrixFromSource,
|
|
11
11
|
validateProjectConfig
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-HMSHB5EQ.js";
|
|
13
13
|
import "../chunk-T4EXUIBY.js";
|
|
14
14
|
import {
|
|
15
15
|
directoryExists,
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
getErrorMessage,
|
|
18
18
|
glob,
|
|
19
19
|
setVerbose
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-WBHPCBVN.js";
|
|
21
21
|
import {
|
|
22
22
|
CLAUDE_DIR,
|
|
23
23
|
CLI_BIN_NAME,
|
|
24
24
|
DEFAULT_BRANDING
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-AWP5A6IM.js";
|
|
26
26
|
import {
|
|
27
27
|
init_esm_shims
|
|
28
28
|
} from "../chunk-DHET7RCE.js";
|
package/dist/commands/edit.js
CHANGED
|
@@ -2,49 +2,51 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getAgentDefinitions,
|
|
4
4
|
recompileAgents
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-7LV4V6A4.js";
|
|
6
6
|
import {
|
|
7
7
|
Wizard
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-KQOU4POU.js";
|
|
9
|
+
import "../chunk-I6IOGZSZ.js";
|
|
10
|
+
import "../chunk-U7X4V4HE.js";
|
|
11
|
+
import "../chunk-YDYRAXSY.js";
|
|
12
|
+
import "../chunk-SPFHPHYL.js";
|
|
13
|
+
import "../chunk-5FPIKTSA.js";
|
|
14
|
+
import "../chunk-DCE423KO.js";
|
|
15
|
+
import "../chunk-M3GQ2R3E.js";
|
|
16
|
+
import "../chunk-QB5HHTAA.js";
|
|
17
17
|
import "../chunk-K77I4XGL.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-XDSVV5GZ.js";
|
|
19
|
+
import "../chunk-2BWCR762.js";
|
|
20
|
+
import "../chunk-WJHFV6RI.js";
|
|
21
|
+
import "../chunk-RFKDGJAJ.js";
|
|
22
22
|
import "../chunk-7SOPVGDV.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-QYLCINGC.js";
|
|
24
24
|
import "../chunk-KUV24B5M.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-JFF7P4LC.js";
|
|
26
26
|
import "../chunk-GG4BSB6S.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-5L724R4C.js";
|
|
28
|
+
import "../chunk-HYEUETIC.js";
|
|
29
|
+
import "../chunk-C3Q43WLC.js";
|
|
30
|
+
import "../chunk-3VOL4WEG.js";
|
|
31
|
+
import "../chunk-CMNKHDOX.js";
|
|
32
|
+
import "../chunk-GBOW6FUW.js";
|
|
33
|
+
import "../chunk-JWYRXE6C.js";
|
|
32
34
|
import "../chunk-U3IGFMCY.js";
|
|
33
35
|
import {
|
|
34
36
|
claudePluginInstall,
|
|
35
37
|
claudePluginUninstall
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
38
|
+
} from "../chunk-26MXZUHU.js";
|
|
39
|
+
import "../chunk-5FCHJLM7.js";
|
|
40
|
+
import "../chunk-UAD3SC27.js";
|
|
39
41
|
import {
|
|
40
42
|
ERROR_MESSAGES,
|
|
41
43
|
INFO_MESSAGES,
|
|
42
44
|
STATUS_MESSAGES
|
|
43
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-WLZHCM7O.js";
|
|
44
46
|
import {
|
|
45
47
|
BaseCommand,
|
|
46
48
|
EXIT_CODES
|
|
47
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-PGY5XROM.js";
|
|
48
50
|
import {
|
|
49
51
|
archiveLocalSkill,
|
|
50
52
|
detectInstallation,
|
|
@@ -53,17 +55,22 @@ import {
|
|
|
53
55
|
loadProjectConfig,
|
|
54
56
|
loadSkillsMatrixFromSource,
|
|
55
57
|
restoreArchivedSkill
|
|
56
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-HMSHB5EQ.js";
|
|
57
59
|
import {
|
|
58
60
|
typedEntries
|
|
59
61
|
} from "../chunk-T4EXUIBY.js";
|
|
60
62
|
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
disableBuffering,
|
|
64
|
+
drainBuffer,
|
|
65
|
+
enableBuffering,
|
|
66
|
+
getErrorMessage,
|
|
67
|
+
pushBufferMessage
|
|
68
|
+
} from "../chunk-WBHPCBVN.js";
|
|
63
69
|
import {
|
|
64
70
|
ASCII_LOGO,
|
|
65
|
-
CLI_BIN_NAME
|
|
66
|
-
|
|
71
|
+
CLI_BIN_NAME,
|
|
72
|
+
SOURCE_DISPLAY_NAMES
|
|
73
|
+
} from "../chunk-AWP5A6IM.js";
|
|
67
74
|
import {
|
|
68
75
|
init_esm_shims
|
|
69
76
|
} from "../chunk-DHET7RCE.js";
|
|
@@ -73,10 +80,6 @@ init_esm_shims();
|
|
|
73
80
|
import { Flags } from "@oclif/core";
|
|
74
81
|
import { render } from "ink";
|
|
75
82
|
import { jsx } from "react/jsx-runtime";
|
|
76
|
-
var SOURCE_DISPLAY_NAMES = {
|
|
77
|
-
public: "Public",
|
|
78
|
-
local: "Local"
|
|
79
|
-
};
|
|
80
83
|
function formatSourceDisplayName(sourceName) {
|
|
81
84
|
return SOURCE_DISPLAY_NAMES[sourceName] ?? sourceName;
|
|
82
85
|
}
|
|
@@ -115,13 +118,15 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
115
118
|
exit: EXIT_CODES.ERROR
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
|
-
const projectDir =
|
|
121
|
+
const projectDir = installation.projectDir;
|
|
119
122
|
const isPluginMode = installation.mode === "plugin";
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
const pluginScope = installation.scope === "global" ? "user" : "project";
|
|
124
|
+
if (installation.scope === "global") {
|
|
125
|
+
this.log("No project installation found. Using global installation from ~/.claude-src/\n");
|
|
126
|
+
}
|
|
127
|
+
enableBuffering();
|
|
124
128
|
let sourceResult;
|
|
129
|
+
let startupMessages = [];
|
|
125
130
|
try {
|
|
126
131
|
sourceResult = await loadSkillsMatrixFromSource({
|
|
127
132
|
sourceFlag: flags.source,
|
|
@@ -129,30 +134,31 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
129
134
|
forceRefresh: flags.refresh
|
|
130
135
|
});
|
|
131
136
|
const sourceInfo = sourceResult.isLocal ? "local" : sourceResult.sourceConfig.sourceOrigin;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
`
|
|
137
|
+
pushBufferMessage(
|
|
138
|
+
"info",
|
|
139
|
+
`Loaded ${Object.keys(sourceResult.matrix.skills).length} skills (${sourceInfo})`
|
|
135
140
|
);
|
|
136
141
|
} catch (error) {
|
|
142
|
+
disableBuffering();
|
|
137
143
|
this.handleError(error);
|
|
138
144
|
}
|
|
139
145
|
const projectConfig = await loadProjectConfig(projectDir);
|
|
140
|
-
this.log("Reading current skills...");
|
|
141
146
|
let currentSkillIds;
|
|
142
147
|
try {
|
|
143
148
|
const discoveredSkills = await discoverAllPluginSkills(projectDir);
|
|
144
149
|
currentSkillIds = Object.keys(discoveredSkills);
|
|
145
150
|
if (currentSkillIds.length === 0 && projectConfig?.config?.skills?.length) {
|
|
146
151
|
currentSkillIds = projectConfig.config.skills;
|
|
147
|
-
|
|
148
|
-
`);
|
|
152
|
+
pushBufferMessage("info", `Found ${currentSkillIds.length} skills from project config`);
|
|
149
153
|
} else {
|
|
150
|
-
|
|
151
|
-
`);
|
|
154
|
+
pushBufferMessage("info", `Current plugin has ${currentSkillIds.length} skills`);
|
|
152
155
|
}
|
|
153
156
|
} catch (error) {
|
|
157
|
+
disableBuffering();
|
|
154
158
|
this.handleError(error);
|
|
155
159
|
}
|
|
160
|
+
startupMessages = drainBuffer();
|
|
161
|
+
disableBuffering();
|
|
156
162
|
let wizardResult = null;
|
|
157
163
|
const marketplaceLabel = getMarketplaceLabel(sourceResult);
|
|
158
164
|
const savedInstallMode = projectConfig?.config?.installMode;
|
|
@@ -167,11 +173,11 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
167
173
|
logo: ASCII_LOGO,
|
|
168
174
|
initialStep: "build",
|
|
169
175
|
initialInstallMode,
|
|
170
|
-
initialExpertMode: projectConfig?.config?.expertMode,
|
|
171
176
|
initialDomains: projectConfig?.config?.domains,
|
|
172
177
|
initialAgents: projectConfig?.config?.selectedAgents,
|
|
173
178
|
installedSkillIds: currentSkillIds,
|
|
174
|
-
projectDir
|
|
179
|
+
projectDir,
|
|
180
|
+
startupMessages,
|
|
175
181
|
onComplete: (result2) => {
|
|
176
182
|
wizardResult = result2;
|
|
177
183
|
},
|
|
@@ -249,7 +255,7 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
249
255
|
const pluginRef = `${skillId}@${sourceResult.marketplace}`;
|
|
250
256
|
this.log(`Installing plugin: ${pluginRef}...`);
|
|
251
257
|
try {
|
|
252
|
-
await claudePluginInstall(pluginRef,
|
|
258
|
+
await claudePluginInstall(pluginRef, pluginScope, projectDir);
|
|
253
259
|
} catch (error) {
|
|
254
260
|
this.warn(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`);
|
|
255
261
|
}
|
|
@@ -257,7 +263,7 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
257
263
|
for (const skillId of removedSkills) {
|
|
258
264
|
this.log(`Uninstalling plugin: ${skillId}...`);
|
|
259
265
|
try {
|
|
260
|
-
await claudePluginUninstall(skillId,
|
|
266
|
+
await claudePluginUninstall(skillId, pluginScope, projectDir);
|
|
261
267
|
} catch (error) {
|
|
262
268
|
this.warn(`Failed to uninstall plugin ${skillId}: ${getErrorMessage(error)}`);
|
|
263
269
|
}
|