@agents-inc/cli 0.76.0 → 0.78.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 +23 -0
- package/dist/{chunk-Q4PJSAMP.js → chunk-32HX6UYI.js} +2 -1
- package/dist/chunk-32HX6UYI.js.map +1 -0
- package/dist/{chunk-CKU7FJNV.js → chunk-7HGMFJ4Y.js} +3 -3
- package/dist/{chunk-UBNHVBSV.js → chunk-7JQIMEUX.js} +3 -3
- package/dist/{chunk-XYZ7B5BY.js → chunk-7LBYURQR.js} +2 -2
- package/dist/{chunk-NWW3OJH5.js → chunk-A5JSBU65.js} +2 -2
- package/dist/{chunk-ODVQXXEO.js → chunk-B4C2S5LP.js} +17 -43
- package/dist/{chunk-ODVQXXEO.js.map → chunk-B4C2S5LP.js.map} +1 -1
- package/dist/{chunk-IDN2OZJY.js → chunk-C22ACAL2.js} +2 -2
- package/dist/{chunk-I2SUTL7S.js → chunk-D4T3HHE7.js} +5 -5
- package/dist/chunk-D4T3HHE7.js.map +1 -0
- package/dist/{chunk-7XUKTYVD.js → chunk-EO6KJI5D.js} +1038 -270
- package/dist/chunk-EO6KJI5D.js.map +1 -0
- package/dist/{chunk-WZ5S4LGX.js → chunk-F4IZ3UAS.js} +16 -22
- package/dist/chunk-F4IZ3UAS.js.map +1 -0
- package/dist/{chunk-JWMYAJHD.js → chunk-FSK4TQX7.js} +1236 -354
- package/dist/chunk-FSK4TQX7.js.map +1 -0
- package/dist/{chunk-WMMU5FOO.js → chunk-FUWUCKES.js} +2 -2
- package/dist/{chunk-WMMU5FOO.js.map → chunk-FUWUCKES.js.map} +1 -1
- package/dist/{chunk-S6DKM6MJ.js → chunk-HANGA633.js} +4 -8
- package/dist/{chunk-S6DKM6MJ.js.map → chunk-HANGA633.js.map} +1 -1
- package/dist/{chunk-CBYRFAUN.js → chunk-HK53FRMU.js} +3 -1
- package/dist/chunk-HK53FRMU.js.map +1 -0
- package/dist/{chunk-I534EWJQ.js → chunk-IFCASC6R.js} +2 -2
- package/dist/{chunk-2I5SXGXR.js → chunk-KQDGLEBF.js} +80 -5
- package/dist/chunk-KQDGLEBF.js.map +1 -0
- package/dist/{chunk-AE2QHAFO.js → chunk-KVRR4PEJ.js} +81 -73
- package/dist/chunk-KVRR4PEJ.js.map +1 -0
- package/dist/{chunk-R7F5YQMI.js → chunk-LVBRC2CP.js} +2 -6
- package/dist/chunk-LVBRC2CP.js.map +1 -0
- package/dist/{chunk-CCSU4R65.js → chunk-MG55NDVG.js} +2 -2
- package/dist/{chunk-M4ZDKHJV.js → chunk-MUCQ27HV.js} +2 -2
- package/dist/chunk-N2XGUAJU.js +34 -0
- package/dist/{chunk-7PZFDI46.js.map → chunk-N2XGUAJU.js.map} +1 -1
- package/dist/{chunk-PRG7PKZM.js → chunk-N34D3ROY.js} +14 -13
- package/dist/chunk-N34D3ROY.js.map +1 -0
- package/dist/{chunk-7PMFIL5L.js → chunk-NKLNT7N7.js} +4 -21
- package/dist/chunk-NKLNT7N7.js.map +1 -0
- package/dist/{chunk-WS3TL2AO.js → chunk-OIHZ2YH3.js} +172 -102
- package/dist/chunk-OIHZ2YH3.js.map +1 -0
- package/dist/chunk-OOWNDQCG.js +192 -0
- package/dist/chunk-OOWNDQCG.js.map +1 -0
- package/dist/{chunk-EEZSCHS2.js → chunk-OTMIGYBB.js} +52 -10
- package/dist/chunk-OTMIGYBB.js.map +1 -0
- package/dist/chunk-PZERKWE2.js +114 -0
- package/dist/chunk-PZERKWE2.js.map +1 -0
- package/dist/{chunk-O5CPXIC4.js → chunk-Q755X6QF.js} +4 -4
- package/dist/{chunk-36YW5E7G.js → chunk-QD3GQ2CH.js} +5 -5
- package/dist/{chunk-ERHTXNIF.js → chunk-RU5XLS5Q.js} +1 -5
- package/dist/{chunk-ERHTXNIF.js.map → chunk-RU5XLS5Q.js.map} +1 -1
- package/dist/{chunk-VQV3DSHD.js → chunk-SJNUTUSJ.js} +5 -5
- package/dist/{chunk-KPRCP3MZ.js → chunk-U2KFFRRX.js} +2 -2
- package/dist/{chunk-CBJTSEI2.js → chunk-VDVLM3KB.js} +54 -6
- package/dist/chunk-VDVLM3KB.js.map +1 -0
- package/dist/{chunk-7NACNRFG.js → chunk-W46L2PXK.js} +32 -23
- package/dist/chunk-W46L2PXK.js.map +1 -0
- package/dist/{chunk-6F3CZLD6.js → chunk-XA7WF3BI.js} +3 -3
- package/dist/{chunk-WN2TUP4M.js → chunk-XYPAOBBV.js} +2 -2
- package/dist/{chunk-LO5QGAP2.js → chunk-YFHVP3VA.js} +5 -12
- package/dist/chunk-YFHVP3VA.js.map +1 -0
- package/dist/commands/build/marketplace.js +4 -4
- package/dist/commands/build/plugins.js +8 -8
- package/dist/commands/build/stack.js +8 -8
- package/dist/commands/compile.js +38 -22
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/index.js +8 -8
- package/dist/commands/config/path.js +7 -7
- package/dist/commands/config/show.js +8 -8
- package/dist/commands/diff.js +35 -15
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +24 -12
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +47 -37
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +7 -7
- package/dist/commands/import/skill.js +7 -7
- package/dist/commands/info.js +7 -7
- package/dist/commands/init.js +28 -28
- package/dist/commands/list.js +7 -7
- package/dist/commands/new/agent.js +8 -8
- package/dist/commands/new/marketplace.js +9 -9
- package/dist/commands/new/skill.js +8 -8
- package/dist/commands/outdated.js +18 -10
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +9 -9
- package/dist/commands/uninstall.js +15 -27
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +26 -16
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +7 -7
- package/dist/components/skill-search/skill-search.js +2 -2
- package/dist/components/wizard/category-grid.js +3 -3
- package/dist/components/wizard/category-grid.test.js +18 -19
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +1 -2
- package/dist/components/wizard/checkbox-grid.test.js +2 -4
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -1
- package/dist/components/wizard/domain-selection.js +10 -11
- 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 +4 -4
- package/dist/components/wizard/source-grid.test.js +13 -13
- package/dist/components/wizard/stack-selection.js +10 -9
- package/dist/components/wizard/stats-panel.js +12 -0
- package/dist/components/wizard/step-agents.js +9 -10
- package/dist/components/wizard/step-agents.test.js +16 -15
- package/dist/components/wizard/step-agents.test.js.map +1 -1
- package/dist/components/wizard/step-build.js +11 -12
- package/dist/components/wizard/step-build.test.js +34 -32
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +4 -6
- package/dist/components/wizard/step-confirm.test.js +24 -23
- package/dist/components/wizard/step-confirm.test.js.map +1 -1
- package/dist/components/wizard/step-refine.js +2 -3
- package/dist/components/wizard/step-refine.test.js +2 -3
- package/dist/components/wizard/step-refine.test.js.map +1 -1
- package/dist/components/wizard/step-settings.js +8 -9
- package/dist/components/wizard/step-settings.test.js +14 -15
- package/dist/components/wizard/step-settings.test.js.map +1 -1
- package/dist/components/wizard/step-sources.js +11 -12
- package/dist/components/wizard/step-sources.test.js +17 -19
- package/dist/components/wizard/step-sources.test.js.map +1 -1
- package/dist/components/wizard/step-stack.js +12 -14
- package/dist/components/wizard/step-stack.test.js +26 -25
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +21 -3
- package/dist/components/wizard/view-title.js.map +1 -1
- package/dist/components/wizard/wizard-layout.js +12 -11
- package/dist/components/wizard/wizard-tabs.js +1 -1
- package/dist/components/wizard/wizard-tabs.test.js +1 -1
- package/dist/components/wizard/wizard.js +26 -26
- package/dist/config-exports.js +1 -1
- package/dist/hooks/init.js +28 -28
- package/dist/{loader-7RQ4G4TH.js → loader-JMOO2A7C.js} +4 -4
- package/dist/{source-loader-CXCIDGWV.js → source-loader-D3VIG3GM.js} +7 -7
- package/dist/source-manager-FPYFJRR7.js +19 -0
- package/dist/source-manager-FPYFJRR7.js.map +1 -0
- package/dist/stores/wizard-store.js +7 -7
- package/dist/stores/wizard-store.test.js +12 -12
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2I5SXGXR.js.map +0 -1
- package/dist/chunk-7NACNRFG.js.map +0 -1
- package/dist/chunk-7PMFIL5L.js.map +0 -1
- package/dist/chunk-7PZFDI46.js +0 -40
- package/dist/chunk-7XUKTYVD.js.map +0 -1
- package/dist/chunk-AE2QHAFO.js.map +0 -1
- package/dist/chunk-CBJTSEI2.js.map +0 -1
- package/dist/chunk-CBYRFAUN.js.map +0 -1
- package/dist/chunk-EEZSCHS2.js.map +0 -1
- package/dist/chunk-EWBNSS5Y.js +0 -113
- package/dist/chunk-EWBNSS5Y.js.map +0 -1
- package/dist/chunk-I2SUTL7S.js.map +0 -1
- package/dist/chunk-JNQKCZA3.js +0 -28
- package/dist/chunk-JNQKCZA3.js.map +0 -1
- package/dist/chunk-JWMYAJHD.js.map +0 -1
- package/dist/chunk-LO5QGAP2.js.map +0 -1
- package/dist/chunk-PRG7PKZM.js.map +0 -1
- package/dist/chunk-Q4PJSAMP.js.map +0 -1
- package/dist/chunk-R7F5YQMI.js.map +0 -1
- package/dist/chunk-WS3TL2AO.js.map +0 -1
- package/dist/chunk-WZ5S4LGX.js.map +0 -1
- package/dist/source-manager-TPLO2DVS.js +0 -19
- /package/dist/{chunk-CKU7FJNV.js.map → chunk-7HGMFJ4Y.js.map} +0 -0
- /package/dist/{chunk-UBNHVBSV.js.map → chunk-7JQIMEUX.js.map} +0 -0
- /package/dist/{chunk-XYZ7B5BY.js.map → chunk-7LBYURQR.js.map} +0 -0
- /package/dist/{chunk-NWW3OJH5.js.map → chunk-A5JSBU65.js.map} +0 -0
- /package/dist/{chunk-IDN2OZJY.js.map → chunk-C22ACAL2.js.map} +0 -0
- /package/dist/{chunk-I534EWJQ.js.map → chunk-IFCASC6R.js.map} +0 -0
- /package/dist/{chunk-CCSU4R65.js.map → chunk-MG55NDVG.js.map} +0 -0
- /package/dist/{chunk-M4ZDKHJV.js.map → chunk-MUCQ27HV.js.map} +0 -0
- /package/dist/{chunk-O5CPXIC4.js.map → chunk-Q755X6QF.js.map} +0 -0
- /package/dist/{chunk-36YW5E7G.js.map → chunk-QD3GQ2CH.js.map} +0 -0
- /package/dist/{chunk-VQV3DSHD.js.map → chunk-SJNUTUSJ.js.map} +0 -0
- /package/dist/{chunk-KPRCP3MZ.js.map → chunk-U2KFFRRX.js.map} +0 -0
- /package/dist/{chunk-6F3CZLD6.js.map → chunk-XA7WF3BI.js.map} +0 -0
- /package/dist/{chunk-WN2TUP4M.js.map → chunk-XYPAOBBV.js.map} +0 -0
- /package/dist/{loader-7RQ4G4TH.js.map → components/wizard/stats-panel.js.map} +0 -0
- /package/dist/{source-loader-CXCIDGWV.js.map → loader-JMOO2A7C.js.map} +0 -0
- /package/dist/{source-manager-TPLO2DVS.js.map → source-loader-D3VIG3GM.js.map} +0 -0
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
getDomainDisplayName
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
ViewTitle
|
|
7
|
-
} from "./chunk-JNQKCZA3.js";
|
|
8
|
-
import {
|
|
9
|
-
KEY_LABEL_ENTER,
|
|
10
|
-
KEY_LABEL_ESC
|
|
11
|
-
} from "./chunk-CBYRFAUN.js";
|
|
4
|
+
} from "./chunk-7JQIMEUX.js";
|
|
12
5
|
import {
|
|
13
6
|
CLI_COLORS
|
|
14
7
|
} from "./chunk-FMYAYX6W.js";
|
|
@@ -48,11 +41,7 @@ var StepConfirm = ({
|
|
|
48
41
|
onBack();
|
|
49
42
|
}
|
|
50
43
|
});
|
|
51
|
-
const domainsText = selectedDomains?.map(getDomainDisplayName).join(" + ") || "";
|
|
52
|
-
const title = stackName ? `Ready to install ${stackName}` : `Ready to install your custom stack${domainsText ? ` (${domainsText})` : ""}`;
|
|
53
44
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
|
|
54
|
-
/* @__PURE__ */ jsx(ViewTitle, { children: title }),
|
|
55
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
56
45
|
domainSelections && selectedDomains && !stackName && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 1, children: selectedDomains.map((domain) => {
|
|
57
46
|
const selections = domainSelections[domain] || {};
|
|
58
47
|
const techs = Object.values(selections).flat();
|
|
@@ -66,7 +55,7 @@ var StepConfirm = ({
|
|
|
66
55
|
/* @__PURE__ */ jsx(Text, { children: techs.join(", ") })
|
|
67
56
|
] }, domain);
|
|
68
57
|
}) }),
|
|
69
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column",
|
|
58
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
70
59
|
technologyCount !== void 0 && /* @__PURE__ */ jsxs(Text, { children: [
|
|
71
60
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Technologies:" }),
|
|
72
61
|
" ",
|
|
@@ -110,17 +99,11 @@ var StepConfirm = ({
|
|
|
110
99
|
] })
|
|
111
100
|
] })
|
|
112
101
|
] })
|
|
113
|
-
] })
|
|
114
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
115
|
-
KEY_LABEL_ENTER,
|
|
116
|
-
" install ",
|
|
117
|
-
KEY_LABEL_ESC,
|
|
118
|
-
" go back"
|
|
119
|
-
] }) })
|
|
102
|
+
] })
|
|
120
103
|
] });
|
|
121
104
|
};
|
|
122
105
|
|
|
123
106
|
export {
|
|
124
107
|
StepConfirm
|
|
125
108
|
};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-NKLNT7N7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/wizard/step-confirm.tsx"],"sourcesContent":["import { Box, Text, useInput } from \"ink\";\nimport React from \"react\";\nimport { CLI_COLORS } from \"../../consts.js\";\nimport type { AgentScopeConfig, SkillConfig } from \"../../types/config.js\";\nimport type { Domain, DomainSelections } from \"../../types/index.js\";\nimport { KEY_LABEL_ENTER, KEY_LABEL_ESC } from \"./hotkeys.js\";\nimport { getDomainDisplayName } from \"./utils.js\";\nimport { ViewTitle } from \"./view-title.js\";\n\ntype StepConfirmProps = {\n onComplete: () => void;\n stackName?: string;\n selectedDomains?: Domain[];\n domainSelections?: DomainSelections;\n technologyCount?: number;\n skillCount?: number;\n agentCount?: number;\n skillConfigs?: SkillConfig[];\n agentConfigs?: AgentScopeConfig[];\n onBack?: () => void;\n};\n\nconst getInstallModeLabel = (skillConfigs: SkillConfig[]): string => {\n if (skillConfigs.length === 0) return \"Local (editable copies)\";\n\n const localCount = skillConfigs.filter((s) => s.source === \"local\").length;\n const pluginCount = skillConfigs.length - localCount;\n\n if (localCount === 0) return \"Plugin\";\n if (pluginCount === 0) return \"Local (editable copies)\";\n return `Mixed (${localCount} local, ${pluginCount} plugin)`;\n};\n\nexport const StepConfirm: React.FC<StepConfirmProps> = ({\n onComplete,\n stackName,\n selectedDomains,\n domainSelections,\n technologyCount,\n skillCount,\n agentCount,\n skillConfigs,\n agentConfigs,\n onBack,\n}) => {\n useInput((_input, key) => {\n if (key.return) {\n onComplete();\n }\n if (key.escape && onBack) {\n onBack();\n }\n });\n\n return (\n <Box flexDirection=\"column\" paddingX={2}>\n {domainSelections && selectedDomains && !stackName && (\n <Box flexDirection=\"column\" marginBottom={1}>\n {selectedDomains.map((domain) => {\n const selections = domainSelections[domain] || {};\n const techs = Object.values(selections).flat();\n if (techs.length === 0) return null;\n return (\n <Text key={domain}>\n <Text bold>{getDomainDisplayName(domain)}:</Text> <Text>{techs.join(\", \")}</Text>\n </Text>\n );\n })}\n </Box>\n )}\n\n <Box flexDirection=\"column\">\n {technologyCount !== undefined && (\n <Text>\n <Text dimColor>Technologies:</Text> <Text bold>{technologyCount}</Text>\n </Text>\n )}\n {skillCount !== undefined && (\n <Text>\n <Text dimColor>Skills:</Text> <Text bold>{skillCount}</Text>{\" \"}\n <Text color={CLI_COLORS.PRIMARY}>(all verified)</Text>\n </Text>\n )}\n {agentCount !== undefined && (\n <Text>\n <Text dimColor>Agents:</Text> <Text bold>{agentCount}</Text>\n {agentConfigs && agentConfigs.length > 0 && (\n <Text>\n {\" \"}\n <Text dimColor>\n ({agentConfigs.filter((a) => a.scope === \"project\").length} project\n {agentConfigs.some((a) => a.scope === \"global\") &&\n `, ${agentConfigs.filter((a) => a.scope === \"global\").length} global`}\n )\n </Text>\n </Text>\n )}\n </Text>\n )}\n {skillConfigs && skillConfigs.length > 0 && (\n <>\n <Text>\n <Text dimColor>Install mode:</Text>{\" \"}\n <Text bold>{getInstallModeLabel(skillConfigs)}</Text>\n </Text>\n <Text>\n <Text dimColor>Scope:</Text>{\" \"}\n <Text bold>\n {skillConfigs.filter((s) => s.scope === \"project\").length} project\n {skillConfigs.some((s) => s.scope === \"global\") &&\n `, ${skillConfigs.filter((s) => s.scope === \"global\").length} global`}\n </Text>\n </Text>\n </>\n )}\n </Box>\n </Box>\n );\n};\n"],"mappings":"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","names":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
loadPluginSkills,
|
|
5
5
|
loadSkillsByIds,
|
|
6
6
|
parseFrontmatter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IFCASC6R.js";
|
|
8
8
|
import {
|
|
9
9
|
BUILT_IN_MATRIX,
|
|
10
10
|
getCategoryDomain,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
matrix,
|
|
15
15
|
typedEntries,
|
|
16
16
|
typedKeys
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FSK4TQX7.js";
|
|
18
18
|
import {
|
|
19
19
|
SKILL_ID_PATTERN,
|
|
20
20
|
agentFrontmatterValidationSchema,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
warn,
|
|
54
54
|
warnUnknownFields,
|
|
55
55
|
writeFile
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-XYPAOBBV.js";
|
|
57
57
|
import {
|
|
58
58
|
CACHE_DIR,
|
|
59
59
|
CACHE_HASH_LENGTH,
|
|
@@ -94,14 +94,14 @@ import {
|
|
|
94
94
|
defaultCategories,
|
|
95
95
|
defaultRules,
|
|
96
96
|
defaultStacks
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-EO6KJI5D.js";
|
|
98
98
|
import {
|
|
99
99
|
init_esm_shims
|
|
100
100
|
} from "./chunk-DHET7RCE.js";
|
|
101
101
|
|
|
102
102
|
// src/cli/lib/loading/source-loader.ts
|
|
103
103
|
init_esm_shims();
|
|
104
|
-
import
|
|
104
|
+
import os11 from "os";
|
|
105
105
|
import path28 from "path";
|
|
106
106
|
|
|
107
107
|
// src/cli/lib/metadata-keys.ts
|
|
@@ -580,12 +580,26 @@ function splitConfigByScope(config) {
|
|
|
580
580
|
const projectSkills = config.skills.filter((s) => s.scope === "project");
|
|
581
581
|
const globalAgents = config.agents.filter((a) => a.scope === "global");
|
|
582
582
|
const projectAgents = config.agents.filter((a) => a.scope === "project");
|
|
583
|
+
const globalSkillIds = new Set(globalSkills.map((s) => s.id));
|
|
583
584
|
const globalStack = {};
|
|
584
585
|
const projectStack = {};
|
|
585
586
|
if (config.stack) {
|
|
586
587
|
for (const agent of globalAgents) {
|
|
587
|
-
|
|
588
|
-
|
|
588
|
+
const agentStack = config.stack[agent.name];
|
|
589
|
+
if (agentStack) {
|
|
590
|
+
const filtered = {};
|
|
591
|
+
for (const [category, assignments] of typedEntries(
|
|
592
|
+
agentStack
|
|
593
|
+
)) {
|
|
594
|
+
if (!assignments) continue;
|
|
595
|
+
const globalOnly = assignments.filter((a) => globalSkillIds.has(a.id));
|
|
596
|
+
if (globalOnly.length > 0) {
|
|
597
|
+
filtered[category] = globalOnly;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
if (typedKeys(filtered).length > 0) {
|
|
601
|
+
globalStack[agent.name] = filtered;
|
|
602
|
+
}
|
|
589
603
|
}
|
|
590
604
|
}
|
|
591
605
|
for (const agent of projectAgents) {
|
|
@@ -597,29 +611,23 @@ function splitConfigByScope(config) {
|
|
|
597
611
|
const globalAgentNames = new Set(globalAgents.map((a) => a.name));
|
|
598
612
|
const globalSelectedAgents = config.selectedAgents?.filter((a) => globalAgentNames.has(a)) ?? [];
|
|
599
613
|
const projectSelectedAgents = config.selectedAgents?.filter((a) => !globalAgentNames.has(a)) ?? [];
|
|
600
|
-
const globalDomains = config.domains ?? [];
|
|
601
|
-
const globalDomainSet = new Set(globalDomains);
|
|
602
|
-
const projectOnlyDomains = (config.domains ?? []).filter((d) => !globalDomainSet.has(d));
|
|
603
614
|
const globalConfig = {
|
|
615
|
+
...config,
|
|
604
616
|
name: "global",
|
|
605
617
|
agents: globalAgents,
|
|
606
618
|
skills: globalSkills,
|
|
607
|
-
...Object.keys(globalStack).length > 0
|
|
608
|
-
|
|
609
|
-
|
|
619
|
+
...Object.keys(globalStack).length > 0 ? { stack: globalStack } : { stack: void 0 },
|
|
620
|
+
domains: config.domains,
|
|
621
|
+
selectedAgents: globalSelectedAgents.length > 0 ? globalSelectedAgents : void 0
|
|
610
622
|
};
|
|
611
623
|
const projectConfig = {
|
|
624
|
+
...config,
|
|
612
625
|
name: config.name,
|
|
613
626
|
agents: projectAgents,
|
|
614
627
|
skills: projectSkills,
|
|
615
|
-
...Object.keys(projectStack).length > 0
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
...config.source && { source: config.source },
|
|
619
|
-
...config.marketplace && { marketplace: config.marketplace },
|
|
620
|
-
...config.agentsSource && { agentsSource: config.agentsSource },
|
|
621
|
-
...projectOnlyDomains.length > 0 && { domains: projectOnlyDomains },
|
|
622
|
-
...projectSelectedAgents.length > 0 && { selectedAgents: projectSelectedAgents }
|
|
628
|
+
...Object.keys(projectStack).length > 0 ? { stack: projectStack } : { stack: void 0 },
|
|
629
|
+
domains: void 0,
|
|
630
|
+
selectedAgents: projectSelectedAgents.length > 0 ? projectSelectedAgents : void 0
|
|
623
631
|
};
|
|
624
632
|
return { global: globalConfig, project: projectConfig };
|
|
625
633
|
}
|
|
@@ -807,13 +815,17 @@ function mergeConfigs(newConfig, existingConfig) {
|
|
|
807
815
|
if (existingConfig.description) {
|
|
808
816
|
merged.description = existingConfig.description;
|
|
809
817
|
}
|
|
810
|
-
if (existingConfig.source) {
|
|
818
|
+
if (existingConfig.source && !newConfig.source) {
|
|
811
819
|
merged.source = existingConfig.source;
|
|
812
820
|
}
|
|
813
821
|
if (existingConfig.agents && existingConfig.agents.length > 0) {
|
|
822
|
+
const newAgentsByName = indexBy(merged.agents, (a) => a.name);
|
|
814
823
|
const existingNames = new Set(existingConfig.agents.map((a) => a.name));
|
|
815
|
-
const
|
|
816
|
-
|
|
824
|
+
const updatedExisting = existingConfig.agents.map(
|
|
825
|
+
(existing) => newAgentsByName[existing.name] ?? existing
|
|
826
|
+
);
|
|
827
|
+
const addedAgents = merged.agents.filter((a) => !existingNames.has(a.name));
|
|
828
|
+
merged.agents = [...updatedExisting, ...addedAgents];
|
|
817
829
|
}
|
|
818
830
|
if (existingConfig.skills && existingConfig.skills.length > 0) {
|
|
819
831
|
const newSkillsById = indexBy(merged.skills, (s) => s.id);
|
|
@@ -984,8 +996,8 @@ function loadConfigTypesDataInBackground(sourceFlag, projectDir) {
|
|
|
984
996
|
if (!await directoryExists(claudeSrcDir)) {
|
|
985
997
|
throw new Error(`${CLAUDE_SRC_DIR}/ not found \u2014 run '${CLI_BIN_NAME} init' first`);
|
|
986
998
|
}
|
|
987
|
-
const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-
|
|
988
|
-
const { loadAllAgents: loadAllAgents2 } = await import("./loader-
|
|
999
|
+
const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-D3VIG3GM.js");
|
|
1000
|
+
const { loadAllAgents: loadAllAgents2 } = await import("./loader-JMOO2A7C.js");
|
|
989
1001
|
const sourceResult = await loadSkillsMatrixFromSource2({
|
|
990
1002
|
sourceFlag,
|
|
991
1003
|
projectDir,
|
|
@@ -1041,7 +1053,7 @@ function generateConfigTypesSource(matrix2, agentNames, customAgentNames = [], e
|
|
|
1041
1053
|
const configCategories = deriveCategories(configSkillIds, matrix2);
|
|
1042
1054
|
categories = unique2([...configCategories, ...extraCategoriesArr]).sort();
|
|
1043
1055
|
const configDomains = deriveDomains(categories, matrix2);
|
|
1044
|
-
domains = unique2([...configDomains, ...extraDomainsArr]).sort();
|
|
1056
|
+
domains = unique2([...configDomains, ...config.domains ?? [], ...extraDomainsArr]).sort();
|
|
1045
1057
|
} else {
|
|
1046
1058
|
skillIds = unique2([...typedKeys(matrix2.skills), ...extraSkillIds]).sort();
|
|
1047
1059
|
sortedAgents = unique2([...agentNames, ...extraAgentNamesArr]).sort();
|
|
@@ -1946,30 +1958,25 @@ function initializeSelectionContext(currentSelections) {
|
|
|
1946
1958
|
const selectedSet = new Set(resolvedSelections);
|
|
1947
1959
|
return { resolvedSelections, selectedSet };
|
|
1948
1960
|
}
|
|
1949
|
-
function
|
|
1961
|
+
function getUnmetRequiredBy(skillId, currentSelections) {
|
|
1950
1962
|
const fullId = resolveAlias(skillId);
|
|
1951
|
-
const skill = matrix.skills[fullId];
|
|
1952
|
-
if (!skill) return [];
|
|
1953
1963
|
const { resolvedSelections, selectedSet } = initializeSelectionContext(currentSelections);
|
|
1954
|
-
|
|
1964
|
+
if (selectedSet.has(fullId)) return void 0;
|
|
1955
1965
|
for (const selectedId of resolvedSelections) {
|
|
1956
|
-
if (selectedId === fullId) continue;
|
|
1957
1966
|
const selectedSkill = matrix.skills[selectedId];
|
|
1958
1967
|
if (!selectedSkill) continue;
|
|
1959
|
-
for (const
|
|
1960
|
-
if (
|
|
1961
|
-
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1968
|
+
for (const req of selectedSkill.requires) {
|
|
1969
|
+
if (!req.skillIds.includes(fullId)) continue;
|
|
1970
|
+
if (req.needsAny) {
|
|
1971
|
+
if (!req.skillIds.some((id) => selectedSet.has(id))) {
|
|
1972
|
+
return selectedSkill.displayName;
|
|
1964
1973
|
}
|
|
1965
1974
|
} else {
|
|
1966
|
-
|
|
1967
|
-
dependents.push(selectedId);
|
|
1968
|
-
}
|
|
1975
|
+
return selectedSkill.displayName;
|
|
1969
1976
|
}
|
|
1970
1977
|
}
|
|
1971
1978
|
}
|
|
1972
|
-
return
|
|
1979
|
+
return void 0;
|
|
1973
1980
|
}
|
|
1974
1981
|
function isDiscouraged(skillId, currentSelections) {
|
|
1975
1982
|
const fullId = resolveAlias(skillId);
|
|
@@ -1992,12 +1999,25 @@ function isIncompatible(skillId, currentSelections) {
|
|
|
1992
1999
|
const skill = matrix.skills[fullId];
|
|
1993
2000
|
if (!skill) return false;
|
|
1994
2001
|
const { resolvedSelections } = initializeSelectionContext(currentSelections);
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2002
|
+
return hasDirectConflict(skill, resolvedSelections) || hasUnsatisfiableRequires(skill, resolvedSelections) || isIncompatibleByFramework(skill, resolvedSelections);
|
|
2003
|
+
}
|
|
2004
|
+
function hasDirectConflict(skill, selections) {
|
|
2005
|
+
return selections.some(
|
|
2006
|
+
(selectedId) => skill.conflictsWith.some((c) => c.skillId === selectedId) || matrix.skills[selectedId]?.conflictsWith.some((c) => c.skillId === skill.id)
|
|
2007
|
+
);
|
|
2008
|
+
}
|
|
2009
|
+
function isDepBlockedByConflict(depId, selections) {
|
|
2010
|
+
const depSkill = matrix.skills[depId];
|
|
2011
|
+
return depSkill ? hasDirectConflict(depSkill, selections) : false;
|
|
2012
|
+
}
|
|
2013
|
+
function hasUnsatisfiableRequires(skill, selections) {
|
|
2014
|
+
return skill.requires.some(
|
|
2015
|
+
(req) => req.needsAny ? req.skillIds.every((depId) => isDepBlockedByConflict(depId, selections)) : req.skillIds.some((depId) => isDepBlockedByConflict(depId, selections))
|
|
2016
|
+
);
|
|
2017
|
+
}
|
|
2018
|
+
function isIncompatibleByFramework(skill, selections) {
|
|
2019
|
+
if (skill.compatibleWith.length === 0) return false;
|
|
2020
|
+
return selections.length > 0 && !selections.some((id) => skill.compatibleWith.includes(id));
|
|
2001
2021
|
}
|
|
2002
2022
|
function hasUnmetRequirements(skillId, currentSelections) {
|
|
2003
2023
|
const fullId = resolveAlias(skillId);
|
|
@@ -2038,16 +2058,40 @@ function getIncompatibleReason(skillId, currentSelections) {
|
|
|
2038
2058
|
const skill = matrix.skills[fullId];
|
|
2039
2059
|
if (!skill) return void 0;
|
|
2040
2060
|
const { resolvedSelections } = initializeSelectionContext(currentSelections);
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2061
|
+
const directReason = findDirectConflictReason(skill, fullId, resolvedSelections);
|
|
2062
|
+
if (directReason) return directReason;
|
|
2063
|
+
const reqReason = findUnsatisfiableRequiresReason(skill, resolvedSelections);
|
|
2064
|
+
if (reqReason) return reqReason;
|
|
2065
|
+
if (isIncompatibleByFramework(skill, resolvedSelections)) {
|
|
2066
|
+
const compatLabels = skill.compatibleWith.map((id) => getLabel(getSkillById(id))).join(", ");
|
|
2067
|
+
return `only compatible with ${compatLabels}`;
|
|
2068
|
+
}
|
|
2069
|
+
return void 0;
|
|
2070
|
+
}
|
|
2071
|
+
function findDirectConflictReason(skill, fullId, selections) {
|
|
2072
|
+
for (const selectedId of selections) {
|
|
2073
|
+
if (skill.conflictsWith.some((c) => c.skillId === selectedId)) {
|
|
2044
2074
|
return `conflicts with ${getLabel(getSkillById(selectedId))}`;
|
|
2045
2075
|
}
|
|
2046
2076
|
const selectedSkill = matrix.skills[selectedId];
|
|
2047
|
-
if (selectedSkill) {
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2077
|
+
if (selectedSkill?.conflictsWith.some((c) => c.skillId === fullId)) {
|
|
2078
|
+
return `conflicts with ${getLabel(selectedSkill)}`;
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
return void 0;
|
|
2082
|
+
}
|
|
2083
|
+
function findUnsatisfiableRequiresReason(skill, selections) {
|
|
2084
|
+
for (const req of skill.requires) {
|
|
2085
|
+
if (req.needsAny) {
|
|
2086
|
+
const allBlocked = req.skillIds.every((depId) => isDepBlockedByConflict(depId, selections));
|
|
2087
|
+
if (allBlocked) {
|
|
2088
|
+
const labels = req.skillIds.map((id) => getLabel(getSkillById(id))).join(" or ");
|
|
2089
|
+
return `requires ${labels} (all conflict with current selection)`;
|
|
2090
|
+
}
|
|
2091
|
+
} else {
|
|
2092
|
+
const blockedDep = req.skillIds.find((depId) => isDepBlockedByConflict(depId, selections));
|
|
2093
|
+
if (blockedDep) {
|
|
2094
|
+
return `requires ${getLabel(getSkillById(blockedDep))} which conflicts with current selection`;
|
|
2051
2095
|
}
|
|
2052
2096
|
}
|
|
2053
2097
|
}
|
|
@@ -2451,20 +2495,13 @@ async function detectProjectInstallation(projectDir) {
|
|
|
2451
2495
|
}
|
|
2452
2496
|
const loaded = await loadProjectConfigFromDir(projectDir);
|
|
2453
2497
|
const mode = deriveInstallMode(loaded?.config?.skills ?? []);
|
|
2454
|
-
if (mode === "local") {
|
|
2455
|
-
return {
|
|
2456
|
-
mode: "local",
|
|
2457
|
-
configPath,
|
|
2458
|
-
agentsDir: path12.join(projectDir, CLAUDE_DIR, "agents"),
|
|
2459
|
-
skillsDir: path12.join(projectDir, CLAUDE_DIR, "skills"),
|
|
2460
|
-
projectDir
|
|
2461
|
-
};
|
|
2462
|
-
}
|
|
2463
2498
|
return {
|
|
2464
|
-
mode
|
|
2499
|
+
mode,
|
|
2465
2500
|
configPath,
|
|
2466
2501
|
agentsDir: path12.join(projectDir, CLAUDE_DIR, "agents"),
|
|
2467
|
-
|
|
2502
|
+
// Mixed mode has local skills in .claude/skills/ and plugins in cache;
|
|
2503
|
+
// use .claude/skills/ as the primary skillsDir (same as local mode)
|
|
2504
|
+
skillsDir: path12.join(projectDir, CLAUDE_DIR, mode === "plugin" ? PLUGINS_SUBDIR : "skills"),
|
|
2468
2505
|
projectDir
|
|
2469
2506
|
};
|
|
2470
2507
|
}
|
|
@@ -2476,20 +2513,11 @@ async function detectGlobalInstallation() {
|
|
|
2476
2513
|
}
|
|
2477
2514
|
const loaded = await loadProjectConfigFromDir(homeDir);
|
|
2478
2515
|
const mode = deriveInstallMode(loaded?.config?.skills ?? []);
|
|
2479
|
-
if (mode === "local") {
|
|
2480
|
-
return {
|
|
2481
|
-
mode: "local",
|
|
2482
|
-
configPath,
|
|
2483
|
-
agentsDir: path12.join(homeDir, CLAUDE_DIR, "agents"),
|
|
2484
|
-
skillsDir: path12.join(homeDir, CLAUDE_DIR, "skills"),
|
|
2485
|
-
projectDir: homeDir
|
|
2486
|
-
};
|
|
2487
|
-
}
|
|
2488
2516
|
return {
|
|
2489
|
-
mode
|
|
2517
|
+
mode,
|
|
2490
2518
|
configPath,
|
|
2491
2519
|
agentsDir: path12.join(homeDir, CLAUDE_DIR, "agents"),
|
|
2492
|
-
skillsDir: path12.join(homeDir, CLAUDE_DIR, PLUGINS_SUBDIR),
|
|
2520
|
+
skillsDir: path12.join(homeDir, CLAUDE_DIR, mode === "plugin" ? PLUGINS_SUBDIR : "skills"),
|
|
2493
2521
|
projectDir: homeDir
|
|
2494
2522
|
};
|
|
2495
2523
|
}
|
|
@@ -3607,6 +3635,20 @@ async function claudePluginMarketplaceAdd(source) {
|
|
|
3607
3635
|
throw new Error(`Failed to add marketplace: ${errorMessage.trim()}`);
|
|
3608
3636
|
}
|
|
3609
3637
|
}
|
|
3638
|
+
async function claudePluginMarketplaceUpdate(name) {
|
|
3639
|
+
validatePluginName(name);
|
|
3640
|
+
const args = ["plugin", "marketplace", "update", name];
|
|
3641
|
+
let result;
|
|
3642
|
+
try {
|
|
3643
|
+
result = await execCommand("claude", args, {});
|
|
3644
|
+
} catch (err) {
|
|
3645
|
+
throw new Error(`Failed to update marketplace: ${getErrorMessage(err)}`);
|
|
3646
|
+
}
|
|
3647
|
+
if (result.exitCode !== 0) {
|
|
3648
|
+
const errorMessage = result.stderr || result.stdout || "Unknown error";
|
|
3649
|
+
throw new Error(`Failed to update marketplace: ${errorMessage.trim()}`);
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3610
3652
|
async function claudePluginUninstall(pluginName, scope, projectDir) {
|
|
3611
3653
|
validatePluginName(pluginName);
|
|
3612
3654
|
const cwd = resolvePluginCwd(scope, projectDir);
|
|
@@ -3635,11 +3677,11 @@ async function prepareDirectories(paths) {
|
|
|
3635
3677
|
await ensureDir(paths.agentsDir);
|
|
3636
3678
|
await ensureDir(path20.dirname(paths.configPath));
|
|
3637
3679
|
}
|
|
3638
|
-
async function deleteAndCopySkills(skills, sourceResult,
|
|
3680
|
+
async function deleteAndCopySkills(skills, sourceResult, baseDir, skillsDir) {
|
|
3639
3681
|
for (const skill of skills) {
|
|
3640
3682
|
if (skill.source && skill.source !== "local") {
|
|
3641
3683
|
verbose(`Using alternate source '${skill.source}' for ${skill.id}`);
|
|
3642
|
-
await deleteLocalSkill(
|
|
3684
|
+
await deleteLocalSkill(baseDir, skill.id);
|
|
3643
3685
|
}
|
|
3644
3686
|
}
|
|
3645
3687
|
const skillIds = skills.map((s) => s.id);
|
|
@@ -3956,7 +3998,7 @@ async function installLocal(options) {
|
|
|
3956
3998
|
}
|
|
3957
3999
|
await ensureDir(globalPaths.skillsDir);
|
|
3958
4000
|
const projectCopied = projectSkills.length > 0 ? await deleteAndCopySkills(projectSkills, sourceResult, projectDir, projectPaths.skillsDir) : [];
|
|
3959
|
-
const globalCopied = globalSkills.length > 0 ? await deleteAndCopySkills(globalSkills, sourceResult,
|
|
4001
|
+
const globalCopied = globalSkills.length > 0 ? await deleteAndCopySkills(globalSkills, sourceResult, os8.homedir(), globalPaths.skillsDir) : [];
|
|
3960
4002
|
const copiedSkills = [...projectCopied, ...globalCopied];
|
|
3961
4003
|
const localSkillsForResolution = buildLocalSkillsMap(copiedSkills);
|
|
3962
4004
|
const agents = await loadMergedAgents(sourceResult.sourcePath);
|
|
@@ -4001,6 +4043,7 @@ async function installLocal(options) {
|
|
|
4001
4043
|
|
|
4002
4044
|
// src/cli/lib/installation/mode-migrator.ts
|
|
4003
4045
|
init_esm_shims();
|
|
4046
|
+
import os9 from "os";
|
|
4004
4047
|
import path21 from "path";
|
|
4005
4048
|
function detectMigrations(oldSkills, newSkills) {
|
|
4006
4049
|
const toLocal = [];
|
|
@@ -4036,16 +4079,31 @@ async function executeMigration(plan, projectDir, sourceResult) {
|
|
|
4036
4079
|
const pluginizedSkills = [];
|
|
4037
4080
|
if (plan.toLocal.length > 0) {
|
|
4038
4081
|
try {
|
|
4039
|
-
const
|
|
4040
|
-
const
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4082
|
+
const projectMigrations = plan.toLocal.filter((m) => m.newScope !== "global");
|
|
4083
|
+
const globalMigrations = plan.toLocal.filter((m) => m.newScope === "global");
|
|
4084
|
+
if (projectMigrations.length > 0) {
|
|
4085
|
+
const projectSkillsDir = path21.join(projectDir, LOCAL_SKILLS_PATH);
|
|
4086
|
+
const copied = await copySkillsToLocalFlattened(
|
|
4087
|
+
projectMigrations.map((m) => m.id),
|
|
4088
|
+
projectSkillsDir,
|
|
4089
|
+
sourceResult.matrix,
|
|
4090
|
+
sourceResult
|
|
4091
|
+
);
|
|
4092
|
+
for (const skill of copied) {
|
|
4093
|
+
localizedSkills.push(skill.skillId);
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4096
|
+
if (globalMigrations.length > 0) {
|
|
4097
|
+
const globalSkillsDir = path21.join(os9.homedir(), LOCAL_SKILLS_PATH);
|
|
4098
|
+
const copied = await copySkillsToLocalFlattened(
|
|
4099
|
+
globalMigrations.map((m) => m.id),
|
|
4100
|
+
globalSkillsDir,
|
|
4101
|
+
sourceResult.matrix,
|
|
4102
|
+
sourceResult
|
|
4103
|
+
);
|
|
4104
|
+
for (const skill of copied) {
|
|
4105
|
+
localizedSkills.push(skill.skillId);
|
|
4106
|
+
}
|
|
4049
4107
|
}
|
|
4050
4108
|
for (const migration of plan.toLocal) {
|
|
4051
4109
|
try {
|
|
@@ -4064,7 +4122,8 @@ async function executeMigration(plan, projectDir, sourceResult) {
|
|
|
4064
4122
|
}
|
|
4065
4123
|
if (plan.toPlugin.length > 0) {
|
|
4066
4124
|
for (const migration of plan.toPlugin) {
|
|
4067
|
-
|
|
4125
|
+
const baseDir = migration.oldScope === "global" ? os9.homedir() : projectDir;
|
|
4126
|
+
await deleteLocalSkill(baseDir, migration.id);
|
|
4068
4127
|
}
|
|
4069
4128
|
if (sourceResult.marketplace) {
|
|
4070
4129
|
for (const migration of plan.toPlugin) {
|
|
@@ -4093,7 +4152,7 @@ init_esm_shims();
|
|
|
4093
4152
|
// src/cli/lib/plugins/plugin-settings.ts
|
|
4094
4153
|
init_esm_shims();
|
|
4095
4154
|
import path22 from "path";
|
|
4096
|
-
import
|
|
4155
|
+
import os10 from "os";
|
|
4097
4156
|
import { z as z2 } from "zod";
|
|
4098
4157
|
var pluginSettingsSchema = z2.object({
|
|
4099
4158
|
enabledPlugins: z2.record(z2.string(), z2.unknown()).optional()
|
|
@@ -4144,7 +4203,7 @@ async function resolvePluginInstallPaths(pluginKeys, projectDir) {
|
|
|
4144
4203
|
if (pluginKeys.length === 0) {
|
|
4145
4204
|
return [];
|
|
4146
4205
|
}
|
|
4147
|
-
const registryPath = path22.join(
|
|
4206
|
+
const registryPath = path22.join(os10.homedir(), CLAUDE_DIR, PLUGINS_SUBDIR, INSTALLED_PLUGINS_FILE);
|
|
4148
4207
|
if (!await fileExists(registryPath)) {
|
|
4149
4208
|
verbose(`Plugin registry not found at '${registryPath}'`);
|
|
4150
4209
|
return [];
|
|
@@ -5207,6 +5266,7 @@ async function loadSkillsMatrixFromSource(options = {}) {
|
|
|
5207
5266
|
verbose(`Loading skills from source: ${source}`);
|
|
5208
5267
|
let result;
|
|
5209
5268
|
if (source === DEFAULT_SOURCE && !devMode) {
|
|
5269
|
+
const fetchResult = await fetchFromSource(source, { forceRefresh });
|
|
5210
5270
|
result = {
|
|
5211
5271
|
matrix: {
|
|
5212
5272
|
...BUILT_IN_MATRIX,
|
|
@@ -5215,7 +5275,7 @@ async function loadSkillsMatrixFromSource(options = {}) {
|
|
|
5215
5275
|
suggestedStacks: [...BUILT_IN_MATRIX.suggestedStacks]
|
|
5216
5276
|
},
|
|
5217
5277
|
sourceConfig,
|
|
5218
|
-
sourcePath:
|
|
5278
|
+
sourcePath: fetchResult.path,
|
|
5219
5279
|
isLocal: false,
|
|
5220
5280
|
marketplace: sourceConfig.marketplace
|
|
5221
5281
|
};
|
|
@@ -5228,16 +5288,22 @@ async function loadSkillsMatrixFromSource(options = {}) {
|
|
|
5228
5288
|
}
|
|
5229
5289
|
}
|
|
5230
5290
|
const resolvedProjectDir = projectDir || process.cwd();
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5291
|
+
const homeDir = os11.homedir();
|
|
5292
|
+
if (resolvedProjectDir !== homeDir) {
|
|
5293
|
+
const globalLocalSkillsResult = await discoverLocalSkills(homeDir);
|
|
5294
|
+
if (globalLocalSkillsResult && globalLocalSkillsResult.skills.length > 0) {
|
|
5295
|
+
verbose(
|
|
5296
|
+
`Found ${globalLocalSkillsResult.skills.length} global local skill(s) in ${globalLocalSkillsResult.localSkillsPath}`
|
|
5297
|
+
);
|
|
5298
|
+
result.matrix = mergeLocalSkillsIntoMatrix(result.matrix, globalLocalSkillsResult);
|
|
5299
|
+
}
|
|
5235
5300
|
}
|
|
5236
|
-
|
|
5301
|
+
const projectLocalSkillsResult = await discoverLocalSkills(resolvedProjectDir);
|
|
5302
|
+
if (projectLocalSkillsResult && projectLocalSkillsResult.skills.length > 0) {
|
|
5237
5303
|
verbose(
|
|
5238
|
-
`Found ${
|
|
5304
|
+
`Found ${projectLocalSkillsResult.skills.length} project local skill(s) in ${projectLocalSkillsResult.localSkillsPath}`
|
|
5239
5305
|
);
|
|
5240
|
-
result.matrix = mergeLocalSkillsIntoMatrix(result.matrix,
|
|
5306
|
+
result.matrix = mergeLocalSkillsIntoMatrix(result.matrix, projectLocalSkillsResult);
|
|
5241
5307
|
}
|
|
5242
5308
|
if (!options.skipExtraSources) {
|
|
5243
5309
|
await loadSkillsFromAllSources(
|
|
@@ -5469,6 +5535,7 @@ export {
|
|
|
5469
5535
|
resolveAllSources,
|
|
5470
5536
|
loadStacks,
|
|
5471
5537
|
getStackSkillIds,
|
|
5538
|
+
loadProjectConfigFromDir,
|
|
5472
5539
|
loadProjectConfig,
|
|
5473
5540
|
validateProjectConfig,
|
|
5474
5541
|
IMPORT_DEFAULTS,
|
|
@@ -5486,7 +5553,7 @@ export {
|
|
|
5486
5553
|
fetchFromSource,
|
|
5487
5554
|
fetchMarketplace,
|
|
5488
5555
|
resolveAlias,
|
|
5489
|
-
|
|
5556
|
+
getUnmetRequiredBy,
|
|
5490
5557
|
validateSelection,
|
|
5491
5558
|
getAvailableSkills,
|
|
5492
5559
|
checkMatrixHealth,
|
|
@@ -5508,6 +5575,7 @@ export {
|
|
|
5508
5575
|
isClaudeCLIAvailable,
|
|
5509
5576
|
claudePluginMarketplaceExists,
|
|
5510
5577
|
claudePluginMarketplaceAdd,
|
|
5578
|
+
claudePluginMarketplaceUpdate,
|
|
5511
5579
|
claudePluginUninstall,
|
|
5512
5580
|
loadSkillsMatrixFromSource,
|
|
5513
5581
|
convertStackToResolvedStack,
|
|
@@ -5527,7 +5595,9 @@ export {
|
|
|
5527
5595
|
detectProjectInstallation,
|
|
5528
5596
|
detectGlobalInstallation,
|
|
5529
5597
|
detectInstallation,
|
|
5598
|
+
resolveInstallPaths,
|
|
5530
5599
|
buildAndMergeConfig,
|
|
5600
|
+
buildAgentScopeMap,
|
|
5531
5601
|
writeScopedConfigs,
|
|
5532
5602
|
installPluginConfig,
|
|
5533
5603
|
installLocal,
|
|
@@ -5541,4 +5611,4 @@ export {
|
|
|
5541
5611
|
validateAllPlugins,
|
|
5542
5612
|
printPluginValidationResult
|
|
5543
5613
|
};
|
|
5544
|
-
//# sourceMappingURL=chunk-
|
|
5614
|
+
//# sourceMappingURL=chunk-OIHZ2YH3.js.map
|