@agents-inc/cli 0.74.7 → 0.74.8
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-HA35FGPO.js → chunk-4Q2JLBCX.js} +2 -2
- package/dist/{chunk-RO6BG4ZW.js → chunk-7JVDZFJG.js} +3 -5
- package/dist/chunk-7JVDZFJG.js.map +1 -0
- package/dist/{chunk-TJBOCGLR.js → chunk-7SKGMV7P.js} +11 -11
- package/dist/{chunk-JB2QTE7M.js → chunk-7W226BOV.js} +5 -6
- package/dist/chunk-7W226BOV.js.map +1 -0
- package/dist/{chunk-STC7IEVI.js → chunk-BQW4ONJE.js} +2 -2
- package/dist/{chunk-6VIOO74O.js → chunk-CBYRFAUN.js} +1 -3
- package/dist/{chunk-6VIOO74O.js.map → chunk-CBYRFAUN.js.map} +1 -1
- package/dist/{chunk-GFTBHBRQ.js → chunk-E3MF6GGS.js} +14 -3
- package/dist/chunk-E3MF6GGS.js.map +1 -0
- package/dist/{chunk-BKTPEATV.js → chunk-F7LOH754.js} +2 -2
- package/dist/{chunk-UKYWXIDT.js → chunk-FVMYBN5K.js} +85 -68
- package/dist/chunk-FVMYBN5K.js.map +1 -0
- package/dist/{chunk-HIVZDWJC.js → chunk-GNA6IOQZ.js} +2 -2
- package/dist/{chunk-VMTZ5WC5.js → chunk-HJY4354Y.js} +2 -2
- package/dist/{chunk-MVYJVKVT.js → chunk-HT5KOOUQ.js} +2 -2
- package/dist/{chunk-RHAZARG3.js → chunk-KZG3EQSH.js} +5 -5
- package/dist/{chunk-KYULKBFC.js → chunk-NA6I5P5P.js} +2 -2
- package/dist/{chunk-CJSCCLT5.js → chunk-PN65K3LH.js} +2 -2
- package/dist/{chunk-MOWZ2FLG.js → chunk-Q53GBFTO.js} +2 -2
- package/dist/{chunk-2GD57LQE.js → chunk-RBR355UI.js} +5 -5
- package/dist/{chunk-FDIKV4ON.js → chunk-SM4FX2IU.js} +4 -88
- package/dist/chunk-SM4FX2IU.js.map +1 -0
- package/dist/{chunk-COZ75NET.js → chunk-TPXDHJDB.js} +2 -2
- package/dist/{chunk-2ZQKORJI.js → chunk-TUGXTCGX.js} +3 -3
- package/dist/{chunk-2MHSOPIU.js → chunk-UFKDY45I.js} +2 -2
- package/dist/{chunk-W3GHDONP.js → chunk-ULP3GGXG.js} +4 -4
- package/dist/{chunk-JZPQI7YI.js → chunk-X6LXHVA6.js} +2 -2
- package/dist/commands/build/plugins.js +2 -2
- package/dist/commands/build/stack.js +2 -2
- package/dist/commands/compile.js +2 -2
- 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 +47 -40
- package/dist/commands/edit.js.map +1 -1
- 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 +18 -18
- 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 +3 -3
- package/dist/commands/uninstall.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/validate.js +62 -44
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +2 -2
- package/dist/components/wizard/category-grid.js +2 -2
- package/dist/components/wizard/category-grid.test.js +4 -4
- package/dist/components/wizard/domain-selection.js +3 -3
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/source-grid.js +3 -3
- package/dist/components/wizard/source-grid.test.js +5 -5
- 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 +5 -5
- package/dist/components/wizard/step-build.test.js +5 -5
- package/dist/components/wizard/step-confirm.js +2 -2
- package/dist/components/wizard/step-confirm.test.js +4 -4
- 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 +3 -3
- package/dist/components/wizard/step-settings.test.js +6 -6
- package/dist/components/wizard/step-sources.js +6 -6
- package/dist/components/wizard/step-sources.test.js +6 -6
- 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 +5 -5
- package/dist/components/wizard/wizard.js +17 -17
- package/dist/hooks/init.js +18 -18
- package/dist/source-loader-X46F4X2B.js +23 -0
- package/dist/{source-manager-A3QLBYCU.js → source-manager-WG7HJHVW.js} +2 -2
- package/dist/stores/wizard-store.js +2 -2
- package/dist/stores/wizard-store.test.js +26 -5
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FDIKV4ON.js.map +0 -1
- package/dist/chunk-GFTBHBRQ.js.map +0 -1
- package/dist/chunk-JB2QTE7M.js.map +0 -1
- package/dist/chunk-RO6BG4ZW.js.map +0 -1
- package/dist/chunk-UKYWXIDT.js.map +0 -1
- package/dist/source-loader-HQTTAMS7.js +0 -17
- /package/dist/{chunk-HA35FGPO.js.map → chunk-4Q2JLBCX.js.map} +0 -0
- /package/dist/{chunk-TJBOCGLR.js.map → chunk-7SKGMV7P.js.map} +0 -0
- /package/dist/{chunk-STC7IEVI.js.map → chunk-BQW4ONJE.js.map} +0 -0
- /package/dist/{chunk-BKTPEATV.js.map → chunk-F7LOH754.js.map} +0 -0
- /package/dist/{chunk-HIVZDWJC.js.map → chunk-GNA6IOQZ.js.map} +0 -0
- /package/dist/{chunk-VMTZ5WC5.js.map → chunk-HJY4354Y.js.map} +0 -0
- /package/dist/{chunk-MVYJVKVT.js.map → chunk-HT5KOOUQ.js.map} +0 -0
- /package/dist/{chunk-RHAZARG3.js.map → chunk-KZG3EQSH.js.map} +0 -0
- /package/dist/{chunk-KYULKBFC.js.map → chunk-NA6I5P5P.js.map} +0 -0
- /package/dist/{chunk-CJSCCLT5.js.map → chunk-PN65K3LH.js.map} +0 -0
- /package/dist/{chunk-MOWZ2FLG.js.map → chunk-Q53GBFTO.js.map} +0 -0
- /package/dist/{chunk-2GD57LQE.js.map → chunk-RBR355UI.js.map} +0 -0
- /package/dist/{chunk-COZ75NET.js.map → chunk-TPXDHJDB.js.map} +0 -0
- /package/dist/{chunk-2ZQKORJI.js.map → chunk-TUGXTCGX.js.map} +0 -0
- /package/dist/{chunk-2MHSOPIU.js.map → chunk-UFKDY45I.js.map} +0 -0
- /package/dist/{chunk-W3GHDONP.js.map → chunk-ULP3GGXG.js.map} +0 -0
- /package/dist/{chunk-JZPQI7YI.js.map → chunk-X6LXHVA6.js.map} +0 -0
- /package/dist/{source-loader-HQTTAMS7.js.map → source-loader-X46F4X2B.js.map} +0 -0
- /package/dist/{source-manager-A3QLBYCU.js.map → source-manager-WG7HJHVW.js.map} +0 -0
|
@@ -799,56 +799,60 @@ function validateProjectConfig(config) {
|
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
// src/cli/lib/configuration/config-merger.ts
|
|
802
|
+
function mergeConfigs(newConfig, existingConfig) {
|
|
803
|
+
const merged = { ...newConfig };
|
|
804
|
+
if (existingConfig.name) {
|
|
805
|
+
merged.name = existingConfig.name;
|
|
806
|
+
}
|
|
807
|
+
if (existingConfig.description) {
|
|
808
|
+
merged.description = existingConfig.description;
|
|
809
|
+
}
|
|
810
|
+
if (existingConfig.source) {
|
|
811
|
+
merged.source = existingConfig.source;
|
|
812
|
+
}
|
|
813
|
+
if (existingConfig.agents && existingConfig.agents.length > 0) {
|
|
814
|
+
const existingNames = new Set(existingConfig.agents.map((a) => a.name));
|
|
815
|
+
const newAgents = merged.agents.filter((a) => !existingNames.has(a.name));
|
|
816
|
+
merged.agents = [...existingConfig.agents, ...newAgents];
|
|
817
|
+
}
|
|
818
|
+
if (existingConfig.skills && existingConfig.skills.length > 0) {
|
|
819
|
+
const newSkillsById = indexBy(merged.skills, (s) => s.id);
|
|
820
|
+
const existingIds = new Set(existingConfig.skills.map((s) => s.id));
|
|
821
|
+
const updatedExisting = existingConfig.skills.map(
|
|
822
|
+
(existing) => newSkillsById[existing.id] ?? existing
|
|
823
|
+
);
|
|
824
|
+
const addedSkills = merged.skills.filter((s) => !existingIds.has(s.id));
|
|
825
|
+
merged.skills = [...updatedExisting, ...addedSkills];
|
|
826
|
+
}
|
|
827
|
+
if (existingConfig.stack) {
|
|
828
|
+
const mergedStack = { ...merged.stack };
|
|
829
|
+
for (const [agentId, agentConfig] of typedEntries(existingConfig.stack)) {
|
|
830
|
+
mergedStack[agentId] = { ...mergedStack[agentId], ...agentConfig };
|
|
831
|
+
}
|
|
832
|
+
merged.stack = mergedStack;
|
|
833
|
+
}
|
|
834
|
+
if (existingConfig.author) {
|
|
835
|
+
merged.author = existingConfig.author;
|
|
836
|
+
}
|
|
837
|
+
if (existingConfig.agentsSource) {
|
|
838
|
+
merged.agentsSource = existingConfig.agentsSource;
|
|
839
|
+
}
|
|
840
|
+
if (existingConfig.marketplace) {
|
|
841
|
+
merged.marketplace = existingConfig.marketplace;
|
|
842
|
+
}
|
|
843
|
+
return merged;
|
|
844
|
+
}
|
|
802
845
|
async function mergeWithExistingConfig(newConfig, context) {
|
|
803
|
-
const localConfig = { ...newConfig };
|
|
804
846
|
const existingFullConfig = await loadProjectConfig(context.projectDir);
|
|
805
847
|
if (existingFullConfig) {
|
|
806
|
-
const
|
|
807
|
-
if (existingConfig.name) {
|
|
808
|
-
localConfig.name = existingConfig.name;
|
|
809
|
-
}
|
|
810
|
-
if (existingConfig.description) {
|
|
811
|
-
localConfig.description = existingConfig.description;
|
|
812
|
-
}
|
|
813
|
-
if (existingConfig.source) {
|
|
814
|
-
localConfig.source = existingConfig.source;
|
|
815
|
-
}
|
|
816
|
-
if (existingConfig.agents && existingConfig.agents.length > 0) {
|
|
817
|
-
const existingNames = new Set(existingConfig.agents.map((a) => a.name));
|
|
818
|
-
const newAgents = localConfig.agents.filter((a) => !existingNames.has(a.name));
|
|
819
|
-
localConfig.agents = [...existingConfig.agents, ...newAgents];
|
|
820
|
-
}
|
|
821
|
-
if (existingConfig.skills && existingConfig.skills.length > 0) {
|
|
822
|
-
const newSkillsById = indexBy(localConfig.skills, (s) => s.id);
|
|
823
|
-
const existingIds = new Set(existingConfig.skills.map((s) => s.id));
|
|
824
|
-
const updatedExisting = existingConfig.skills.map(
|
|
825
|
-
(existing) => newSkillsById[existing.id] ?? existing
|
|
826
|
-
);
|
|
827
|
-
const addedSkills = localConfig.skills.filter((s) => !existingIds.has(s.id));
|
|
828
|
-
localConfig.skills = [...updatedExisting, ...addedSkills];
|
|
829
|
-
}
|
|
830
|
-
if (existingConfig.stack) {
|
|
831
|
-
const mergedStack = { ...localConfig.stack };
|
|
832
|
-
for (const [agentId, agentConfig] of typedEntries(existingConfig.stack)) {
|
|
833
|
-
mergedStack[agentId] = { ...mergedStack[agentId], ...agentConfig };
|
|
834
|
-
}
|
|
835
|
-
localConfig.stack = mergedStack;
|
|
836
|
-
}
|
|
837
|
-
if (existingConfig.author) {
|
|
838
|
-
localConfig.author = existingConfig.author;
|
|
839
|
-
}
|
|
840
|
-
if (existingConfig.agentsSource) {
|
|
841
|
-
localConfig.agentsSource = existingConfig.agentsSource;
|
|
842
|
-
}
|
|
843
|
-
if (existingConfig.marketplace) {
|
|
844
|
-
localConfig.marketplace = existingConfig.marketplace;
|
|
845
|
-
}
|
|
848
|
+
const config = mergeConfigs(newConfig, existingFullConfig.config);
|
|
846
849
|
return {
|
|
847
|
-
config
|
|
850
|
+
config,
|
|
848
851
|
merged: true,
|
|
849
852
|
existingConfigPath: existingFullConfig.configPath
|
|
850
853
|
};
|
|
851
854
|
}
|
|
855
|
+
const localConfig = { ...newConfig };
|
|
852
856
|
const existingProjectConfig = await loadProjectSourceConfig(context.projectDir);
|
|
853
857
|
if (existingProjectConfig?.author) {
|
|
854
858
|
localConfig.author = existingProjectConfig.author;
|
|
@@ -980,7 +984,7 @@ function loadConfigTypesDataInBackground(sourceFlag, projectDir) {
|
|
|
980
984
|
if (!await directoryExists(claudeSrcDir)) {
|
|
981
985
|
throw new Error(`${CLAUDE_SRC_DIR}/ not found \u2014 run '${CLI_BIN_NAME} init' first`);
|
|
982
986
|
}
|
|
983
|
-
const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-
|
|
987
|
+
const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-X46F4X2B.js");
|
|
984
988
|
const { loadAllAgents: loadAllAgents2 } = await import("./loader-NHUCFMFQ.js");
|
|
985
989
|
const sourceResult = await loadSkillsMatrixFromSource2({
|
|
986
990
|
sourceFlag,
|
|
@@ -3676,28 +3680,30 @@ async function buildLocalConfig(wizardResult, sourceResult) {
|
|
|
3676
3680
|
return { config: localConfig, loadedStack };
|
|
3677
3681
|
}
|
|
3678
3682
|
function setConfigMetadata(config, wizardResult, sourceResult, sourceFlag) {
|
|
3683
|
+
const result = { ...config };
|
|
3679
3684
|
if (wizardResult.selectedDomains && wizardResult.selectedDomains.length > 0) {
|
|
3680
|
-
|
|
3685
|
+
result.domains = wizardResult.selectedDomains;
|
|
3681
3686
|
}
|
|
3682
3687
|
if (wizardResult.selectedAgents && wizardResult.selectedAgents.length > 0) {
|
|
3683
|
-
|
|
3688
|
+
result.selectedAgents = wizardResult.selectedAgents;
|
|
3684
3689
|
}
|
|
3685
3690
|
if (sourceFlag) {
|
|
3686
|
-
|
|
3691
|
+
result.source = sourceFlag;
|
|
3687
3692
|
} else if (sourceResult.sourceConfig.source) {
|
|
3688
|
-
|
|
3693
|
+
result.source = sourceResult.sourceConfig.source;
|
|
3689
3694
|
}
|
|
3690
3695
|
if (sourceResult.marketplace) {
|
|
3691
|
-
|
|
3696
|
+
result.marketplace = sourceResult.marketplace;
|
|
3692
3697
|
}
|
|
3698
|
+
return result;
|
|
3693
3699
|
}
|
|
3694
3700
|
async function buildAndMergeConfig(wizardResult, sourceResult, projectDir, sourceFlag) {
|
|
3695
3701
|
const { config } = await buildLocalConfig(wizardResult, sourceResult);
|
|
3696
3702
|
verbose(
|
|
3697
3703
|
`buildAndMergeConfig: before merge \u2014 stack=${config.stack ? Object.keys(config.stack).length + " agents" : "UNDEFINED"}`
|
|
3698
3704
|
);
|
|
3699
|
-
setConfigMetadata(config, wizardResult, sourceResult, sourceFlag);
|
|
3700
|
-
const result = await mergeWithExistingConfig(
|
|
3705
|
+
const configWithMetadata = setConfigMetadata(config, wizardResult, sourceResult, sourceFlag);
|
|
3706
|
+
const result = await mergeWithExistingConfig(configWithMetadata, { projectDir });
|
|
3701
3707
|
verbose(
|
|
3702
3708
|
`buildAndMergeConfig: after merge \u2014 stack=${result.config.stack ? Object.keys(result.config.stack).length + " agents" : "UNDEFINED"}, merged=${result.merged}`
|
|
3703
3709
|
);
|
|
@@ -3783,7 +3789,7 @@ async function writeProjectConfigTypes(projectConfigPath, projectDir, projectCon
|
|
|
3783
3789
|
await writeFile(typesPath, source);
|
|
3784
3790
|
verbose("Using project config-types.ts that imports from global");
|
|
3785
3791
|
}
|
|
3786
|
-
async function writeScopedConfigs(finalConfig, matrix2, agents, projectDir, projectConfigPath) {
|
|
3792
|
+
async function writeScopedConfigs(finalConfig, matrix2, agents, projectDir, projectConfigPath, projectInstallationExists) {
|
|
3787
3793
|
const homeDir = os8.homedir();
|
|
3788
3794
|
const isProjectContext = path20.resolve(projectDir) !== path20.resolve(homeDir);
|
|
3789
3795
|
if (!isProjectContext) {
|
|
@@ -3798,10 +3804,17 @@ async function writeScopedConfigs(finalConfig, matrix2, agents, projectDir, proj
|
|
|
3798
3804
|
verbose(`Updated global config at ${globalConfigPath}`);
|
|
3799
3805
|
await writeStandaloneConfigTypes(globalConfigPath, matrix2, agents, globalConfig);
|
|
3800
3806
|
verbose("Updated global config-types.ts with actual types");
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3807
|
+
const hasProjectItems = projectSplitConfig.skills.length > 0 || projectSplitConfig.agents.length > 0;
|
|
3808
|
+
if (projectInstallationExists || hasProjectItems) {
|
|
3809
|
+
await ensureDir(path20.dirname(projectConfigPath));
|
|
3810
|
+
await writeConfigFile(projectSplitConfig, projectConfigPath, { isProjectConfig: true });
|
|
3811
|
+
verbose(`Updated project config at ${projectConfigPath}`);
|
|
3812
|
+
await writeProjectConfigTypes(projectConfigPath, projectDir, projectSplitConfig, matrix2);
|
|
3813
|
+
} else {
|
|
3814
|
+
verbose(
|
|
3815
|
+
"Skipped project config \u2014 no existing project installation and no project-scoped items"
|
|
3816
|
+
);
|
|
3817
|
+
}
|
|
3805
3818
|
}
|
|
3806
3819
|
async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceResult, projectDir, agentsDir, installMode, agentScopeMap) {
|
|
3807
3820
|
const engine = await createLiquidEngine(projectDir);
|
|
@@ -3812,6 +3825,7 @@ async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceR
|
|
|
3812
3825
|
sourceResult.sourcePath
|
|
3813
3826
|
);
|
|
3814
3827
|
const globalAgentsDir = path20.join(os8.homedir(), CLAUDE_DIR, "agents");
|
|
3828
|
+
await ensureDir(globalAgentsDir);
|
|
3815
3829
|
const compiledAgentNames = [];
|
|
3816
3830
|
for (const [name, agent] of typedEntries(resolvedAgents)) {
|
|
3817
3831
|
const output = await compileAgentForPlugin(
|
|
@@ -3823,9 +3837,6 @@ async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceR
|
|
|
3823
3837
|
);
|
|
3824
3838
|
const scope = agentScopeMap?.get(name) ?? "project";
|
|
3825
3839
|
const targetDir = scope === "global" ? globalAgentsDir : agentsDir;
|
|
3826
|
-
if (scope === "global") {
|
|
3827
|
-
await ensureDir(targetDir);
|
|
3828
|
-
}
|
|
3829
3840
|
await writeFile(path20.join(targetDir, `${name}.md`), output);
|
|
3830
3841
|
compiledAgentNames.push(name);
|
|
3831
3842
|
}
|
|
@@ -3834,20 +3845,22 @@ async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceR
|
|
|
3834
3845
|
async function installPluginConfig(options) {
|
|
3835
3846
|
const { wizardResult, sourceResult, projectDir, sourceFlag } = options;
|
|
3836
3847
|
const projectPaths = resolveInstallPaths(projectDir, "project");
|
|
3837
|
-
const
|
|
3838
|
-
if (
|
|
3848
|
+
const isProjectInstall = path20.resolve(projectDir) !== path20.resolve(os8.homedir());
|
|
3849
|
+
if (isProjectInstall) {
|
|
3839
3850
|
await ensureDir(projectPaths.agentsDir);
|
|
3840
3851
|
}
|
|
3841
3852
|
await ensureDir(path20.dirname(projectPaths.configPath));
|
|
3842
3853
|
const agents = await loadMergedAgents(sourceResult.sourcePath);
|
|
3843
3854
|
const mergeResult = await buildAndMergeConfig(wizardResult, sourceResult, projectDir, sourceFlag);
|
|
3844
3855
|
const finalConfig = mergeResult.config;
|
|
3856
|
+
const projectInstallationExists = path20.resolve(projectDir) !== path20.resolve(os8.homedir());
|
|
3845
3857
|
await writeScopedConfigs(
|
|
3846
3858
|
finalConfig,
|
|
3847
3859
|
sourceResult.matrix,
|
|
3848
3860
|
agents,
|
|
3849
3861
|
projectDir,
|
|
3850
|
-
projectPaths.configPath
|
|
3862
|
+
projectPaths.configPath,
|
|
3863
|
+
projectInstallationExists
|
|
3851
3864
|
);
|
|
3852
3865
|
const compileAgentsConfig = buildCompileAgents(finalConfig, agents);
|
|
3853
3866
|
const compileConfig = {
|
|
@@ -3885,15 +3898,14 @@ async function installLocal(options) {
|
|
|
3885
3898
|
const globalPaths = resolveInstallPaths(projectDir, "global");
|
|
3886
3899
|
const projectSkills = wizardResult.skills.filter((s) => s.scope !== "global");
|
|
3887
3900
|
const globalSkills = wizardResult.skills.filter((s) => s.scope === "global");
|
|
3888
|
-
const
|
|
3889
|
-
|
|
3901
|
+
const homeDir = os8.homedir();
|
|
3902
|
+
const isProjectInstall = path20.resolve(projectDir) !== path20.resolve(homeDir);
|
|
3903
|
+
if (isProjectInstall) {
|
|
3890
3904
|
await prepareDirectories(projectPaths);
|
|
3891
3905
|
} else {
|
|
3892
3906
|
await ensureDir(path20.dirname(projectPaths.configPath));
|
|
3893
3907
|
}
|
|
3894
|
-
|
|
3895
|
-
await ensureDir(globalPaths.skillsDir);
|
|
3896
|
-
}
|
|
3908
|
+
await ensureDir(globalPaths.skillsDir);
|
|
3897
3909
|
const projectCopied = projectSkills.length > 0 ? await deleteAndCopySkills(projectSkills, sourceResult, projectDir, projectPaths.skillsDir) : [];
|
|
3898
3910
|
const globalCopied = globalSkills.length > 0 ? await deleteAndCopySkills(globalSkills, sourceResult, projectDir, globalPaths.skillsDir) : [];
|
|
3899
3911
|
const copiedSkills = [...projectCopied, ...globalCopied];
|
|
@@ -3901,12 +3913,14 @@ async function installLocal(options) {
|
|
|
3901
3913
|
const agents = await loadMergedAgents(sourceResult.sourcePath);
|
|
3902
3914
|
const mergeResult = await buildAndMergeConfig(wizardResult, sourceResult, projectDir, sourceFlag);
|
|
3903
3915
|
const finalConfig = mergeResult.config;
|
|
3916
|
+
const isProjectContext = path20.resolve(projectDir) !== path20.resolve(os8.homedir());
|
|
3904
3917
|
await writeScopedConfigs(
|
|
3905
3918
|
finalConfig,
|
|
3906
3919
|
sourceResult.matrix,
|
|
3907
3920
|
agents,
|
|
3908
3921
|
projectDir,
|
|
3909
|
-
projectPaths.configPath
|
|
3922
|
+
projectPaths.configPath,
|
|
3923
|
+
isProjectContext
|
|
3910
3924
|
);
|
|
3911
3925
|
const compileAgentsConfig = buildCompileAgents(finalConfig, agents);
|
|
3912
3926
|
const compileConfig = {
|
|
@@ -5462,7 +5476,10 @@ export {
|
|
|
5462
5476
|
claudePluginMarketplaceAdd,
|
|
5463
5477
|
claudePluginUninstall,
|
|
5464
5478
|
loadSkillsMatrixFromSource,
|
|
5479
|
+
convertStackToResolvedStack,
|
|
5480
|
+
extractSourceName,
|
|
5465
5481
|
getMarketplaceLabel,
|
|
5482
|
+
mergeLocalSkillsIntoMatrix,
|
|
5466
5483
|
loadConfigTypesDataInBackground,
|
|
5467
5484
|
regenerateConfigTypes,
|
|
5468
5485
|
generateConfigSource,
|
|
@@ -5491,4 +5508,4 @@ export {
|
|
|
5491
5508
|
validateAllPlugins,
|
|
5492
5509
|
printPluginValidationResult
|
|
5493
5510
|
};
|
|
5494
|
-
//# sourceMappingURL=chunk-
|
|
5511
|
+
//# sourceMappingURL=chunk-FVMYBN5K.js.map
|