@agents-inc/cli 0.60.1 → 0.61.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 +12 -0
- package/dist/{chunk-6G3KZSO4.js → chunk-46DQG2N7.js} +9 -9
- package/dist/{chunk-BMJZBLP7.js → chunk-6DAZG54T.js} +2 -2
- package/dist/{chunk-TZXYBG3R.js → chunk-FWMWWE3X.js} +2 -3
- package/dist/{chunk-52M2XF3W.js → chunk-GH2RQ4MI.js} +2 -2
- package/dist/{chunk-MKCHLXMY.js → chunk-H5DASUX5.js} +4 -4
- package/dist/{chunk-RO6LX3UV.js → chunk-IEEVXLJB.js} +2 -2
- package/dist/{chunk-WF6RM73R.js → chunk-IGM6HA3S.js} +2 -2
- package/dist/{chunk-TC3NHO34.js → chunk-KD2YS76O.js} +2 -2
- package/dist/{chunk-TGLRDEEL.js → chunk-KDO6WU76.js} +2 -2
- package/dist/{chunk-SZRK3VOR.js → chunk-M6YWRMXH.js} +3 -3
- package/dist/{chunk-K6OLORQL.js → chunk-SDLDPFNV.js} +2 -2
- package/dist/{chunk-YHCYKUA3.js → chunk-SRBN6RRD.js} +2 -2
- package/dist/{chunk-EMIUPGPL.js → chunk-WHISPMAQ.js} +2 -2
- package/dist/{chunk-G6WHCALR.js → chunk-YHOHLNHM.js} +3 -3
- package/dist/{chunk-SEJF7CGJ.js → chunk-Z3TM4N37.js} +2 -2
- package/dist/commands/build/plugins.js +2 -2
- package/dist/commands/build/stack.js +2 -2
- package/dist/commands/compile.js +84 -74
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/index.js +2 -2
- package/dist/commands/config/path.js +1 -1
- package/dist/commands/config/show.js +2 -2
- package/dist/commands/diff.js +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/edit.js +12 -12
- package/dist/commands/eject.js +1 -1
- package/dist/commands/import/skill.js +1 -1
- package/dist/commands/info.js +1 -1
- package/dist/commands/init.js +12 -12
- package/dist/commands/list.js +1 -1
- package/dist/commands/new/agent.js +2 -2
- package/dist/commands/new/marketplace.js +2 -2
- package/dist/commands/new/skill.js +2 -2
- package/dist/commands/outdated.js +1 -1
- package/dist/commands/search.js +1 -1
- package/dist/commands/uninstall.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/validate.js +1 -1
- package/dist/components/wizard/domain-selection.js +3 -3
- package/dist/components/wizard/stack-selection.js +3 -3
- package/dist/components/wizard/step-agents.js +3 -3
- package/dist/components/wizard/step-agents.test.js +3 -3
- package/dist/components/wizard/step-build.js +3 -3
- package/dist/components/wizard/step-build.test.js +3 -3
- package/dist/components/wizard/step-confirm.test.js +2 -2
- package/dist/components/wizard/step-settings.js +2 -2
- package/dist/components/wizard/step-settings.test.js +5 -5
- package/dist/components/wizard/step-sources.js +3 -3
- package/dist/components/wizard/step-sources.test.js +3 -3
- package/dist/components/wizard/step-stack.js +5 -5
- package/dist/components/wizard/step-stack.test.js +5 -5
- package/dist/components/wizard/wizard-layout.js +3 -3
- package/dist/components/wizard/wizard.js +11 -11
- package/dist/hooks/init.js +12 -12
- package/dist/{source-loader-A6B3NDI4.js → source-loader-KMEBBZCQ.js} +2 -2
- package/dist/{source-manager-Q7IQSGIX.js → source-manager-5XBSPJNR.js} +2 -2
- package/dist/stores/wizard-store.js +2 -2
- package/dist/stores/wizard-store.test.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-6G3KZSO4.js.map → chunk-46DQG2N7.js.map} +0 -0
- /package/dist/{chunk-BMJZBLP7.js.map → chunk-6DAZG54T.js.map} +0 -0
- /package/dist/{chunk-TZXYBG3R.js.map → chunk-FWMWWE3X.js.map} +0 -0
- /package/dist/{chunk-52M2XF3W.js.map → chunk-GH2RQ4MI.js.map} +0 -0
- /package/dist/{chunk-MKCHLXMY.js.map → chunk-H5DASUX5.js.map} +0 -0
- /package/dist/{chunk-RO6LX3UV.js.map → chunk-IEEVXLJB.js.map} +0 -0
- /package/dist/{chunk-WF6RM73R.js.map → chunk-IGM6HA3S.js.map} +0 -0
- /package/dist/{chunk-TC3NHO34.js.map → chunk-KD2YS76O.js.map} +0 -0
- /package/dist/{chunk-TGLRDEEL.js.map → chunk-KDO6WU76.js.map} +0 -0
- /package/dist/{chunk-SZRK3VOR.js.map → chunk-M6YWRMXH.js.map} +0 -0
- /package/dist/{chunk-K6OLORQL.js.map → chunk-SDLDPFNV.js.map} +0 -0
- /package/dist/{chunk-YHCYKUA3.js.map → chunk-SRBN6RRD.js.map} +0 -0
- /package/dist/{chunk-EMIUPGPL.js.map → chunk-WHISPMAQ.js.map} +0 -0
- /package/dist/{chunk-G6WHCALR.js.map → chunk-YHOHLNHM.js.map} +0 -0
- /package/dist/{chunk-SEJF7CGJ.js.map → chunk-Z3TM4N37.js.map} +0 -0
- /package/dist/{source-loader-A6B3NDI4.js.map → source-loader-KMEBBZCQ.js.map} +0 -0
- /package/dist/{source-manager-Q7IQSGIX.js.map → source-manager-5XBSPJNR.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## [0.61.0] - 2026-03-08
|
|
13
|
+
|
|
14
|
+
**Dual-pass compile for global and project installations**
|
|
15
|
+
|
|
16
|
+
- `compile` detects both global and project installations, runs independent passes for each
|
|
17
|
+
- `writeProjectConfig()` E2E helper with `ProjectConfig` typing, all inline config writes migrated
|
|
18
|
+
- 6 new dual-scope E2E tests covering scope isolation, single-installation fallbacks, and verbose output
|
|
19
|
+
|
|
20
|
+
See [changelogs/0.61.0.md](./changelogs/0.61.0.md) for full details.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
12
24
|
## [0.60.1] - 2026-03-08
|
|
13
25
|
|
|
14
26
|
**Type redundancy cleanup and test infrastructure improvements**
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GH2RQ4MI.js";
|
|
5
5
|
import {
|
|
6
6
|
StepSources
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M6YWRMXH.js";
|
|
8
8
|
import {
|
|
9
9
|
StepStack
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H5DASUX5.js";
|
|
11
11
|
import {
|
|
12
12
|
WizardLayout
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WHISPMAQ.js";
|
|
14
14
|
import {
|
|
15
15
|
StepAgents
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Z3TM4N37.js";
|
|
17
17
|
import {
|
|
18
18
|
StepBuild
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KD2YS76O.js";
|
|
20
20
|
import {
|
|
21
21
|
StepConfirm
|
|
22
22
|
} from "./chunk-KIWFEBKH.js";
|
|
@@ -25,14 +25,14 @@ import {
|
|
|
25
25
|
} from "./chunk-BKJHAJQW.js";
|
|
26
26
|
import {
|
|
27
27
|
useWizardStore
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IGM6HA3S.js";
|
|
29
29
|
import {
|
|
30
30
|
cliTheme
|
|
31
31
|
} from "./chunk-XUDTFI4M.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveAlias,
|
|
34
34
|
validateSelection
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-FWMWWE3X.js";
|
|
36
36
|
import {
|
|
37
37
|
warn
|
|
38
38
|
} from "./chunk-LWXRUR6B.js";
|
|
@@ -342,4 +342,4 @@ var Wizard = ({
|
|
|
342
342
|
export {
|
|
343
343
|
Wizard
|
|
344
344
|
};
|
|
345
|
-
//# sourceMappingURL=chunk-
|
|
345
|
+
//# sourceMappingURL=chunk-46DQG2N7.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-BNQ5O6LE.js";
|
|
8
8
|
import {
|
|
9
9
|
useWizardStore
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IGM6HA3S.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_SCRATCH_DOMAINS
|
|
13
13
|
} from "./chunk-6OWHQ7HM.js";
|
|
@@ -108,4 +108,4 @@ var StackSelection = ({
|
|
|
108
108
|
export {
|
|
109
109
|
StackSelection
|
|
110
110
|
};
|
|
111
|
-
//# sourceMappingURL=chunk-
|
|
111
|
+
//# sourceMappingURL=chunk-6DAZG54T.js.map
|
|
@@ -3150,7 +3150,7 @@ function loadConfigTypesDataInBackground(sourceFlag, projectDir) {
|
|
|
3150
3150
|
if (!await directoryExists(claudeSrcDir)) {
|
|
3151
3151
|
throw new Error(`${CLAUDE_SRC_DIR}/ not found \u2014 run '${CLI_BIN_NAME} init' first`);
|
|
3152
3152
|
}
|
|
3153
|
-
const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-
|
|
3153
|
+
const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-KMEBBZCQ.js");
|
|
3154
3154
|
const { loadAllAgents: loadAllAgents2 } = await import("./loader-2O32KKAQ.js");
|
|
3155
3155
|
const sourceResult = await loadSkillsMatrixFromSource2({
|
|
3156
3156
|
sourceFlag,
|
|
@@ -5285,7 +5285,6 @@ export {
|
|
|
5285
5285
|
splitConfigByScope,
|
|
5286
5286
|
loadStacks,
|
|
5287
5287
|
getStackSkillIds,
|
|
5288
|
-
loadProjectConfigFromDir,
|
|
5289
5288
|
loadProjectConfig,
|
|
5290
5289
|
validateProjectConfig,
|
|
5291
5290
|
saveSourceToProjectConfig,
|
|
@@ -5358,4 +5357,4 @@ export {
|
|
|
5358
5357
|
validateAllPlugins,
|
|
5359
5358
|
printPluginValidationResult
|
|
5360
5359
|
};
|
|
5361
|
-
//# sourceMappingURL=chunk-
|
|
5360
|
+
//# sourceMappingURL=chunk-FWMWWE3X.js.map
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
addSource,
|
|
20
20
|
getSourceSummary,
|
|
21
21
|
removeSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FWMWWE3X.js";
|
|
23
23
|
import {
|
|
24
24
|
getErrorMessage,
|
|
25
25
|
verbose
|
|
@@ -262,4 +262,4 @@ var StepSettings = ({
|
|
|
262
262
|
export {
|
|
263
263
|
StepSettings
|
|
264
264
|
};
|
|
265
|
-
//# sourceMappingURL=chunk-
|
|
265
|
+
//# sourceMappingURL=chunk-GH2RQ4MI.js.map
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-K77I4XGL.js";
|
|
5
5
|
import {
|
|
6
6
|
StackSelection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6DAZG54T.js";
|
|
8
8
|
import {
|
|
9
9
|
DomainSelection
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KDO6WU76.js";
|
|
11
11
|
import {
|
|
12
12
|
ViewTitle
|
|
13
13
|
} from "./chunk-MGNYPVOJ.js";
|
|
14
14
|
import {
|
|
15
15
|
useWizardStore
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IGM6HA3S.js";
|
|
17
17
|
import {
|
|
18
18
|
init_esm_shims
|
|
19
19
|
} from "./chunk-DHET7RCE.js";
|
|
@@ -37,4 +37,4 @@ var StepStack = ({ matrix, onCancel }) => {
|
|
|
37
37
|
export {
|
|
38
38
|
StepStack
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-H5DASUX5.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadConfigTypesDataInBackground,
|
|
8
8
|
regenerateConfigTypes,
|
|
9
9
|
resolveAuthor
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FWMWWE3X.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseCommand,
|
|
13
13
|
EXIT_CODES
|
|
@@ -339,4 +339,4 @@ export {
|
|
|
339
339
|
generateSkillRulesTs,
|
|
340
340
|
NewSkill
|
|
341
341
|
};
|
|
342
|
-
//# sourceMappingURL=chunk-
|
|
342
|
+
//# sourceMappingURL=chunk-IEEVXLJB.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
deriveInstallMode,
|
|
4
4
|
getAvailableSkills,
|
|
5
5
|
resolveAlias
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWMWWE3X.js";
|
|
7
7
|
import {
|
|
8
8
|
typedEntries,
|
|
9
9
|
typedKeys
|
|
@@ -635,4 +635,4 @@ export {
|
|
|
635
635
|
buildCategoriesForDomain,
|
|
636
636
|
useWizardStore
|
|
637
637
|
};
|
|
638
|
-
//# sourceMappingURL=chunk-
|
|
638
|
+
//# sourceMappingURL=chunk-IGM6HA3S.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
buildCategoriesForDomain,
|
|
17
17
|
useWizardStore,
|
|
18
18
|
validateBuildStep
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IGM6HA3S.js";
|
|
20
20
|
import {
|
|
21
21
|
CLI_COLORS
|
|
22
22
|
} from "./chunk-6OWHQ7HM.js";
|
|
@@ -148,4 +148,4 @@ var StepBuild = ({
|
|
|
148
148
|
export {
|
|
149
149
|
StepBuild
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-KD2YS76O.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-CIG7IKX3.js";
|
|
9
9
|
import {
|
|
10
10
|
useWizardStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IGM6HA3S.js";
|
|
12
12
|
import {
|
|
13
13
|
typedEntries
|
|
14
14
|
} from "./chunk-T4EXUIBY.js";
|
|
@@ -62,4 +62,4 @@ var DomainSelection = ({ matrix }) => {
|
|
|
62
62
|
export {
|
|
63
63
|
DomainSelection
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-KDO6WU76.js.map
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
} from "./chunk-MGNYPVOJ.js";
|
|
17
17
|
import {
|
|
18
18
|
useWizardStore
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IGM6HA3S.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveAllSources,
|
|
22
22
|
searchExtraSources
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FWMWWE3X.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_COLORS,
|
|
26
26
|
DEFAULT_BRANDING
|
|
@@ -169,4 +169,4 @@ var StepSources = ({
|
|
|
169
169
|
export {
|
|
170
170
|
StepSources
|
|
171
171
|
};
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
172
|
+
//# sourceMappingURL=chunk-M6YWRMXH.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadProjectSourceConfig,
|
|
8
8
|
resolveAgentsSource,
|
|
9
9
|
resolveSource
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FWMWWE3X.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseCommand
|
|
13
13
|
} from "./chunk-VR3CDXDT.js";
|
|
@@ -90,4 +90,4 @@ ${DEFAULT_BRANDING.NAME} Configuration
|
|
|
90
90
|
export {
|
|
91
91
|
ConfigShow
|
|
92
92
|
};
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-SDLDPFNV.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveAgents,
|
|
18
18
|
writeContentHash,
|
|
19
19
|
writePluginManifest
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FWMWWE3X.js";
|
|
21
21
|
import {
|
|
22
22
|
loadAllAgents,
|
|
23
23
|
loadProjectAgents
|
|
@@ -319,4 +319,4 @@ export {
|
|
|
319
319
|
compileAllAgentPlugins,
|
|
320
320
|
printAgentCompilationSummary
|
|
321
321
|
};
|
|
322
|
-
//# sourceMappingURL=chunk-
|
|
322
|
+
//# sourceMappingURL=chunk-SRBN6RRD.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-52XO4ULK.js";
|
|
12
12
|
import {
|
|
13
13
|
useWizardStore
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IGM6HA3S.js";
|
|
15
15
|
import {
|
|
16
16
|
CLI_COLORS,
|
|
17
17
|
DEFAULT_PLUGIN_NAME
|
|
@@ -184,4 +184,4 @@ var WizardLayout = ({
|
|
|
184
184
|
export {
|
|
185
185
|
WizardLayout
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-WHISPMAQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
Wizard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-46DQG2N7.js";
|
|
5
5
|
import {
|
|
6
6
|
STATUS_MESSAGES,
|
|
7
7
|
SUCCESS_MESSAGES
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
installPluginConfig,
|
|
22
22
|
loadProjectConfig,
|
|
23
23
|
loadSkillsMatrixFromSource
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FWMWWE3X.js";
|
|
25
25
|
import {
|
|
26
26
|
BaseCommand,
|
|
27
27
|
EXIT_CODES
|
|
@@ -590,4 +590,4 @@ export {
|
|
|
590
590
|
showDashboard,
|
|
591
591
|
Init
|
|
592
592
|
};
|
|
593
|
-
//# sourceMappingURL=chunk-
|
|
593
|
+
//# sourceMappingURL=chunk-YHOHLNHM.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-MGNYPVOJ.js";
|
|
14
14
|
import {
|
|
15
15
|
useWizardStore
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IGM6HA3S.js";
|
|
17
17
|
import {
|
|
18
18
|
typedKeys
|
|
19
19
|
} from "./chunk-T4EXUIBY.js";
|
|
@@ -268,4 +268,4 @@ var StepAgents = ({ matrix }) => {
|
|
|
268
268
|
export {
|
|
269
269
|
StepAgents
|
|
270
270
|
};
|
|
271
|
-
//# sourceMappingURL=chunk-
|
|
271
|
+
//# sourceMappingURL=chunk-Z3TM4N37.js.map
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
compileAllAgentPlugins,
|
|
4
4
|
printAgentCompilationSummary
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-SRBN6RRD.js";
|
|
6
6
|
import {
|
|
7
7
|
compileAllSkillPlugins,
|
|
8
8
|
compileSkillPlugin,
|
|
9
9
|
printCompilationSummary
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-FWMWWE3X.js";
|
|
11
11
|
import "../../chunk-OCEFD7V6.js";
|
|
12
12
|
import "../../chunk-T4EXUIBY.js";
|
|
13
13
|
import {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
getAgentDefinitions
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-SRBN6RRD.js";
|
|
5
5
|
import {
|
|
6
6
|
compileStackPlugin,
|
|
7
7
|
loadStacks,
|
|
8
8
|
printStackCompilationSummary
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-FWMWWE3X.js";
|
|
10
10
|
import "../../chunk-OCEFD7V6.js";
|
|
11
11
|
import "../../chunk-T4EXUIBY.js";
|
|
12
12
|
import {
|
package/dist/commands/compile.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getAgentDefinitions,
|
|
4
4
|
recompileAgents
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-SRBN6RRD.js";
|
|
6
6
|
import {
|
|
7
7
|
ERROR_MESSAGES,
|
|
8
8
|
INFO_MESSAGES,
|
|
@@ -10,12 +10,11 @@ import {
|
|
|
10
10
|
SUCCESS_MESSAGES
|
|
11
11
|
} from "../chunk-MR6OBL3B.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
detectGlobalInstallation,
|
|
14
|
+
detectProjectInstallation,
|
|
14
15
|
discoverAllPluginSkills,
|
|
15
|
-
getStackSkillIds,
|
|
16
|
-
loadProjectConfigFromDir,
|
|
17
16
|
resolveSource
|
|
18
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-FWMWWE3X.js";
|
|
19
18
|
import {
|
|
20
19
|
parseFrontmatter
|
|
21
20
|
} from "../chunk-OCEFD7V6.js";
|
|
@@ -138,25 +137,43 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
138
137
|
});
|
|
139
138
|
return;
|
|
140
139
|
}
|
|
141
|
-
const
|
|
142
|
-
|
|
140
|
+
const cwd = process.cwd();
|
|
141
|
+
const homeDir = os.homedir();
|
|
142
|
+
const globalInstallation = await detectGlobalInstallation();
|
|
143
|
+
const projectInstallation = cwd === homeDir ? null : await detectProjectInstallation(cwd);
|
|
144
|
+
if (!globalInstallation && !projectInstallation) {
|
|
143
145
|
this.error(ERROR_MESSAGES.NO_INSTALLATION, {
|
|
144
146
|
exit: EXIT_CODES.ERROR
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
await this.resolveSourceForCompile(flags);
|
|
150
|
+
const agentDefs = await this.loadAgentDefsForCompile(flags);
|
|
151
|
+
let totalPassesWithSkills = 0;
|
|
152
|
+
if (globalInstallation) {
|
|
153
|
+
const hadSkills = await this.runCompilePass({
|
|
154
|
+
label: "Global",
|
|
155
|
+
projectDir: homeDir,
|
|
156
|
+
installation: globalInstallation,
|
|
157
|
+
agentDefs,
|
|
158
|
+
flags
|
|
159
|
+
});
|
|
160
|
+
if (hadSkills) totalPassesWithSkills++;
|
|
149
161
|
}
|
|
150
|
-
if (
|
|
151
|
-
this.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
if (projectInstallation) {
|
|
163
|
+
const hadSkills = await this.runCompilePass({
|
|
164
|
+
label: "Project",
|
|
165
|
+
projectDir: cwd,
|
|
166
|
+
installation: projectInstallation,
|
|
167
|
+
agentDefs,
|
|
168
|
+
flags
|
|
157
169
|
});
|
|
158
|
-
|
|
159
|
-
|
|
170
|
+
if (hadSkills) totalPassesWithSkills++;
|
|
171
|
+
}
|
|
172
|
+
if (totalPassesWithSkills === 0) {
|
|
173
|
+
this.error(
|
|
174
|
+
`No skills found. Add skills with '${CLI_BIN_NAME} add <skill>' or create in .claude/skills/.`,
|
|
175
|
+
{ exit: EXIT_CODES.ERROR }
|
|
176
|
+
);
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
179
|
async discoverAllSkills(projectDir = process.cwd()) {
|
|
@@ -177,11 +194,7 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
177
194
|
const allSkills = mergeSkills(pluginSkills, globalLocalSkills, localSkills);
|
|
178
195
|
const totalSkillCount = typedKeys(allSkills).length;
|
|
179
196
|
if (totalSkillCount === 0) {
|
|
180
|
-
|
|
181
|
-
this.error(
|
|
182
|
-
`No skills found. Add skills with '${CLI_BIN_NAME} add <skill>' or create in .claude/skills/.`,
|
|
183
|
-
{ exit: EXIT_CODES.ERROR }
|
|
184
|
-
);
|
|
197
|
+
return { allSkills, totalSkillCount };
|
|
185
198
|
}
|
|
186
199
|
if (pluginSkillCount > 0 && totalSkillCount > pluginSkillCount) {
|
|
187
200
|
const localCount = totalSkillCount - pluginSkillCount;
|
|
@@ -195,56 +208,18 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
195
208
|
}
|
|
196
209
|
return { allSkills, totalSkillCount };
|
|
197
210
|
}
|
|
198
|
-
async
|
|
199
|
-
|
|
200
|
-
try {
|
|
201
|
-
const sourceConfig = await resolveSource(flags.source);
|
|
202
|
-
this.log(`Source: ${sourceConfig.sourceOrigin}`);
|
|
203
|
-
} catch (error) {
|
|
204
|
-
this.log(ERROR_MESSAGES.FAILED_RESOLVE_SOURCE);
|
|
205
|
-
this.handleError(error);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
async loadAgentDefsForCompile(flags) {
|
|
209
|
-
const projectDir = process.cwd();
|
|
210
|
-
this.log(
|
|
211
|
-
flags["agent-source"] ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS : STATUS_MESSAGES.LOADING_AGENT_PARTIALS
|
|
212
|
-
);
|
|
213
|
-
try {
|
|
214
|
-
const agentDefs = await getAgentDefinitions(flags["agent-source"], {
|
|
215
|
-
projectDir
|
|
216
|
-
});
|
|
217
|
-
this.log(flags["agent-source"] ? "Agent partials fetched" : "Agent partials loaded");
|
|
218
|
-
verbose(` Agents: ${agentDefs.agentsDir}`);
|
|
219
|
-
verbose(` Templates: ${agentDefs.templatesDir}`);
|
|
220
|
-
return agentDefs;
|
|
221
|
-
} catch (error) {
|
|
222
|
-
this.log(ERROR_MESSAGES.FAILED_LOAD_AGENT_PARTIALS);
|
|
223
|
-
return this.handleError(error);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
async runPluginModeCompile(flags, installation) {
|
|
211
|
+
async runCompilePass(params) {
|
|
212
|
+
const { label, projectDir, installation, agentDefs, flags } = params;
|
|
227
213
|
this.log("");
|
|
228
|
-
this.log(
|
|
214
|
+
this.log(`Compiling ${label.toLowerCase()} agents...`);
|
|
229
215
|
this.log("");
|
|
230
|
-
const projectDir = installation.projectDir;
|
|
231
|
-
const agentsDir = installation.agentsDir;
|
|
232
|
-
this.log("Using individual plugin mode");
|
|
233
216
|
verbose(` Project: ${projectDir}`);
|
|
234
|
-
verbose(` Agents: ${agentsDir}`);
|
|
235
|
-
const
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const stackSkillCount = config.stack ? getStackSkillIds(config.stack).length : 0;
|
|
240
|
-
this.log(`Using config (${agentCount} agents, ${stackSkillCount} skills)`);
|
|
241
|
-
verbose(` Config: ${loaded.configPath}`);
|
|
242
|
-
} else {
|
|
243
|
-
verbose(` No config found - using defaults`);
|
|
217
|
+
verbose(` Agents: ${installation.agentsDir}`);
|
|
218
|
+
const { allSkills, totalSkillCount } = await this.discoverAllSkills(projectDir);
|
|
219
|
+
if (totalSkillCount === 0) {
|
|
220
|
+
this.log(`No skills found for ${label.toLowerCase()} pass, skipping`);
|
|
221
|
+
return false;
|
|
244
222
|
}
|
|
245
|
-
const { allSkills } = await this.discoverAllSkills(projectDir);
|
|
246
|
-
await this.resolveSourceForCompile(flags);
|
|
247
|
-
const agentDefs = await this.loadAgentDefsForCompile(flags);
|
|
248
223
|
this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);
|
|
249
224
|
try {
|
|
250
225
|
const recompileResult = await recompileAgents({
|
|
@@ -252,17 +227,17 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
252
227
|
sourcePath: agentDefs.sourcePath,
|
|
253
228
|
skills: allSkills,
|
|
254
229
|
projectDir,
|
|
255
|
-
outputDir: agentsDir
|
|
230
|
+
outputDir: installation.agentsDir
|
|
256
231
|
});
|
|
257
232
|
if (recompileResult.failed.length > 0) {
|
|
258
233
|
this.log(
|
|
259
|
-
`Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)`
|
|
234
|
+
`Recompiled ${recompileResult.compiled.length} ${label.toLowerCase()} agents (${recompileResult.failed.length} failed)`
|
|
260
235
|
);
|
|
261
236
|
for (const warning of recompileResult.warnings) {
|
|
262
237
|
this.warn(warning);
|
|
263
238
|
}
|
|
264
239
|
} else if (recompileResult.compiled.length > 0) {
|
|
265
|
-
this.log(`Recompiled ${recompileResult.compiled.length} agents`);
|
|
240
|
+
this.log(`Recompiled ${recompileResult.compiled.length} ${label.toLowerCase()} agents`);
|
|
266
241
|
} else {
|
|
267
242
|
this.log(INFO_MESSAGES.NO_AGENTS_TO_RECOMPILE);
|
|
268
243
|
}
|
|
@@ -274,8 +249,37 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
274
249
|
this.handleError(error);
|
|
275
250
|
}
|
|
276
251
|
this.log("");
|
|
277
|
-
this.logSuccess(
|
|
252
|
+
this.logSuccess(`${label} compile complete!`);
|
|
278
253
|
this.log("");
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
async resolveSourceForCompile(flags) {
|
|
257
|
+
this.log(STATUS_MESSAGES.RESOLVING_SOURCE);
|
|
258
|
+
try {
|
|
259
|
+
const sourceConfig = await resolveSource(flags.source);
|
|
260
|
+
this.log(`Source: ${sourceConfig.sourceOrigin}`);
|
|
261
|
+
} catch (error) {
|
|
262
|
+
this.log(ERROR_MESSAGES.FAILED_RESOLVE_SOURCE);
|
|
263
|
+
this.handleError(error);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async loadAgentDefsForCompile(flags) {
|
|
267
|
+
const projectDir = process.cwd();
|
|
268
|
+
this.log(
|
|
269
|
+
flags["agent-source"] ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS : STATUS_MESSAGES.LOADING_AGENT_PARTIALS
|
|
270
|
+
);
|
|
271
|
+
try {
|
|
272
|
+
const agentDefs = await getAgentDefinitions(flags["agent-source"], {
|
|
273
|
+
projectDir
|
|
274
|
+
});
|
|
275
|
+
this.log(flags["agent-source"] ? "Agent partials fetched" : "Agent partials loaded");
|
|
276
|
+
verbose(` Agents: ${agentDefs.agentsDir}`);
|
|
277
|
+
verbose(` Templates: ${agentDefs.templatesDir}`);
|
|
278
|
+
return agentDefs;
|
|
279
|
+
} catch (error) {
|
|
280
|
+
this.log(ERROR_MESSAGES.FAILED_LOAD_AGENT_PARTIALS);
|
|
281
|
+
return this.handleError(error);
|
|
282
|
+
}
|
|
279
283
|
}
|
|
280
284
|
async runCustomOutputCompile(flags) {
|
|
281
285
|
const outputDir = path.resolve(process.cwd(), flags.output);
|
|
@@ -285,7 +289,13 @@ var Compile = class _Compile extends BaseCommand {
|
|
|
285
289
|
this.log(`Output directory: ${outputDir}`);
|
|
286
290
|
this.log("");
|
|
287
291
|
await ensureDir(outputDir);
|
|
288
|
-
const { allSkills } = await this.discoverAllSkills();
|
|
292
|
+
const { allSkills, totalSkillCount } = await this.discoverAllSkills();
|
|
293
|
+
if (totalSkillCount === 0) {
|
|
294
|
+
this.error(
|
|
295
|
+
`No skills found. Add skills with '${CLI_BIN_NAME} add <skill>' or create in .claude/skills/.`,
|
|
296
|
+
{ exit: EXIT_CODES.ERROR }
|
|
297
|
+
);
|
|
298
|
+
}
|
|
289
299
|
await this.resolveSourceForCompile(flags);
|
|
290
300
|
const agentDefs = await this.loadAgentDefsForCompile(flags);
|
|
291
301
|
const projectDir = process.cwd();
|