agents-inc 0.153.0 → 0.155.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 +65 -0
- package/dist/chunk-2H7UWE2G.js +246 -0
- package/dist/chunk-2H7UWE2G.js.map +1 -0
- package/dist/{chunk-ZNDLUWWD.js → chunk-4A4L3YIW.js} +5 -5
- package/dist/chunk-4G2YHZIM.js +132 -0
- package/dist/chunk-4G2YHZIM.js.map +1 -0
- package/dist/{chunk-WDAO3RUY.js → chunk-5F2YR5XV.js} +3 -3
- package/dist/{chunk-JFAUQDZM.js → chunk-5OKLCVM4.js} +3 -3
- package/dist/{chunk-REKOWTIB.js → chunk-5QZAK6J7.js} +44 -10
- package/dist/chunk-5QZAK6J7.js.map +1 -0
- package/dist/{chunk-VECFAKM5.js → chunk-6RLV45HN.js} +10 -10
- package/dist/{chunk-VECFAKM5.js.map → chunk-6RLV45HN.js.map} +1 -1
- package/dist/{chunk-K7PJDWER.js → chunk-CLFHC2DK.js} +15 -106
- package/dist/chunk-CLFHC2DK.js.map +1 -0
- package/dist/chunk-D2CAV7MG.js +61 -0
- package/dist/chunk-D2CAV7MG.js.map +1 -0
- package/dist/{chunk-NXGMM5YN.js → chunk-F2AMBBIA.js} +6 -6
- package/dist/{chunk-NXGMM5YN.js.map → chunk-F2AMBBIA.js.map} +1 -1
- package/dist/{chunk-HEBPKK5L.js → chunk-F5T6TV4Z.js} +213 -92
- package/dist/chunk-F5T6TV4Z.js.map +1 -0
- package/dist/{chunk-K3O3YQYG.js → chunk-G47TDUK3.js} +2 -2
- package/dist/{chunk-U2DNAHFE.js → chunk-GS2NZ3GD.js} +8 -8
- package/dist/chunk-GS2NZ3GD.js.map +1 -0
- package/dist/{chunk-ORJ5Y222.js → chunk-H6UTKTLK.js} +176 -256
- package/dist/chunk-H6UTKTLK.js.map +1 -0
- package/dist/{chunk-M5HSTNYU.js → chunk-HG4JPXJT.js} +11 -29
- package/dist/chunk-HG4JPXJT.js.map +1 -0
- package/dist/{chunk-VGEBYCQZ.js → chunk-HTYH7CKN.js} +4 -15
- package/dist/chunk-HTYH7CKN.js.map +1 -0
- package/dist/{chunk-JC7DBPRD.js → chunk-HXKOIWLU.js} +2 -2
- package/dist/chunk-HXKOIWLU.js.map +1 -0
- package/dist/{chunk-NSJ2S7R5.js → chunk-ILUVL7WM.js} +2 -2
- package/dist/{chunk-R54KIGN2.js → chunk-IO5YBKHV.js} +13 -2
- package/dist/chunk-IO5YBKHV.js.map +1 -0
- package/dist/chunk-IXRZAHZF.js +53 -0
- package/dist/chunk-IXRZAHZF.js.map +1 -0
- package/dist/chunk-JCPANDNR.js +35 -0
- package/dist/chunk-JCPANDNR.js.map +1 -0
- package/dist/{chunk-R4SEU3DF.js → chunk-LJCNUP6M.js} +2 -2
- package/dist/{chunk-FRWKCE6R.js → chunk-MHRC3KRX.js} +5 -5
- package/dist/chunk-MHRC3KRX.js.map +1 -0
- package/dist/chunk-MO5FGLVS.js +142 -0
- package/dist/chunk-MO5FGLVS.js.map +1 -0
- package/dist/{chunk-Q5FLW4JG.js → chunk-OKH64JZE.js} +2 -2
- package/dist/{chunk-WG6V6VJV.js → chunk-PCC4LBKB.js} +2 -2
- package/dist/chunk-PMUABBPG.js +258 -0
- package/dist/chunk-PMUABBPG.js.map +1 -0
- package/dist/{chunk-EFU6P3B7.js → chunk-PNMM5HNX.js} +5 -5
- package/dist/{chunk-4VYALFQZ.js → chunk-QWVXOCXO.js} +6 -6
- package/dist/{chunk-35VOK7XE.js → chunk-RWOYPOMR.js} +4365 -4355
- package/dist/chunk-RWOYPOMR.js.map +1 -0
- package/dist/{chunk-IO4VEW5U.js → chunk-SY4X2LND.js} +4 -4
- package/dist/{chunk-XGMOXMS4.js → chunk-TBOVYLQJ.js} +2 -2
- package/dist/{chunk-BMGBA6HJ.js → chunk-TNGMF4UX.js} +20 -20
- package/dist/{chunk-BMGBA6HJ.js.map → chunk-TNGMF4UX.js.map} +1 -1
- package/dist/{chunk-TY6CAOL7.js → chunk-UMH2YZKG.js} +14 -5
- package/dist/chunk-UMH2YZKG.js.map +1 -0
- package/dist/{chunk-6CNRMCFM.js → chunk-VPASBA7P.js} +2 -2
- package/dist/{chunk-NXQAY5U7.js → chunk-WCAUUBHO.js} +5860 -5126
- package/dist/chunk-WCAUUBHO.js.map +1 -0
- package/dist/{chunk-V3ENMW7G.js → chunk-WFRTHH3A.js} +3 -3
- package/dist/{chunk-2HC2SNRP.js → chunk-WTJ3AY33.js} +1 -5
- package/dist/chunk-WTJ3AY33.js.map +1 -0
- package/dist/{chunk-F7Z5I6GU.js → chunk-WUQ3MTPF.js} +11 -5
- package/dist/{chunk-F7Z5I6GU.js.map → chunk-WUQ3MTPF.js.map} +1 -1
- package/dist/{chunk-U2YSGBHA.js → chunk-XAXJWXI4.js} +93 -43
- package/dist/chunk-XAXJWXI4.js.map +1 -0
- package/dist/{chunk-ACKC577F.js → chunk-Y5Y7XHVU.js} +4 -4
- package/dist/{chunk-X5XJ6WKO.js → chunk-YO2LTXB4.js} +107 -16
- package/dist/chunk-YO2LTXB4.js.map +1 -0
- package/dist/{chunk-FIHTAFST.js → chunk-ZUAZHDKP.js} +64 -65
- package/dist/chunk-ZUAZHDKP.js.map +1 -0
- package/dist/commands/build/marketplace.js +98 -120
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +8 -8
- package/dist/commands/compile.js +57 -24
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.js +220 -79
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +608 -100
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +26 -21
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/init.js +41 -39
- package/dist/commands/list.js +11 -11
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/marketplace.js +243 -0
- package/dist/commands/new/marketplace.js.map +1 -0
- package/dist/commands/search.js +34 -24
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/share.js +67 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/uninstall.js +234 -196
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +9 -9
- package/dist/commands/update.js.map +1 -1
- package/dist/components/common/prompt-confirm.js +1 -1
- package/dist/components/common/removal-plan-confirm.js +10 -0
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/wizard/category-grid.js +5 -5
- package/dist/components/wizard/checkbox-grid.js +5 -5
- package/dist/components/wizard/domain-selection.js +11 -11
- package/dist/components/wizard/run-wizard-session.js +29 -28
- package/dist/components/wizard/scroll-affordance.js +2 -2
- package/dist/components/wizard/skill-agent-summary.js +6 -6
- package/dist/components/wizard/source-grid.js +6 -6
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +10 -11
- package/dist/components/wizard/step-build.js +9 -9
- package/dist/components/wizard/step-confirm.js +10 -10
- package/dist/components/wizard/step-sources.js +10 -10
- package/dist/components/wizard/step-stack.js +9 -9
- package/dist/components/wizard/summary-panel.js +9 -9
- package/dist/components/wizard/toast.js +2 -2
- package/dist/components/wizard/wizard-layout.js +14 -14
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard.js +27 -27
- package/dist/copy-local-skills-NSUTBVLJ.js +14 -0
- package/dist/hooks/init.js +42 -62
- package/dist/hooks/init.js.map +1 -1
- package/dist/load-agent-defs-X4E57I2U.js +15 -0
- package/dist/{loader-4U7UCE2Y.js → loader-G6BFG2VA.js} +3 -3
- package/dist/recompile-project-agents-JE4MM72I.js +20 -0
- package/dist/{source-loader-ZNSYJJCI.js → source-loader-3DL3NYUX.js} +7 -5
- package/dist/source-loader-3DL3NYUX.js.map +1 -0
- package/dist/src/agents/developer/ai-developer/critical-reminders.md +1 -1
- package/dist/src/agents/developer/ai-developer/critical-requirements.md +1 -1
- package/dist/src/agents/developer/ai-developer/identity.md +1 -1
- package/dist/src/agents/developer/ai-developer/playbook.md +1 -1
- package/dist/src/agents/developer/api-developer/identity.md +1 -1
- package/dist/src/agents/developer/cli-developer/identity.md +1 -1
- package/dist/src/agents/developer/web-developer/identity.md +1 -1
- package/dist/src/agents/meta/codex-keeper/identity.md +1 -1
- package/dist/src/agents/meta/convention-keeper/identity.md +1 -1
- package/dist/src/agents/meta/skill-summoner/identity.md +1 -1
- package/dist/src/agents/researcher/ai-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/api-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/cli-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/web-researcher/identity.md +1 -1
- package/dist/src/agents/reviewer/reviewer/playbook.md +1 -1
- package/dist/src/agents/tester/ai-tester/identity.md +1 -1
- package/dist/src/agents/tester/api-tester/critical-reminders.md +1 -1
- package/dist/src/agents/tester/api-tester/critical-requirements.md +1 -1
- package/dist/src/agents/tester/api-tester/identity.md +2 -2
- package/dist/src/agents/tester/cli-tester/identity.md +1 -1
- package/dist/src/agents/tester/web-tester/identity.md +3 -3
- package/dist/stores/wizard-store.js +7 -5
- package/package.json +10 -7
- package/src/agents/developer/ai-developer/critical-reminders.md +1 -1
- package/src/agents/developer/ai-developer/critical-requirements.md +1 -1
- package/src/agents/developer/ai-developer/identity.md +1 -1
- package/src/agents/developer/ai-developer/playbook.md +1 -1
- package/src/agents/developer/api-developer/identity.md +1 -1
- package/src/agents/developer/cli-developer/identity.md +1 -1
- package/src/agents/developer/web-developer/identity.md +1 -1
- package/src/agents/meta/codex-keeper/identity.md +1 -1
- package/src/agents/meta/convention-keeper/identity.md +1 -1
- package/src/agents/meta/skill-summoner/identity.md +1 -1
- package/src/agents/researcher/ai-researcher/identity.md +1 -1
- package/src/agents/researcher/api-researcher/identity.md +1 -1
- package/src/agents/researcher/cli-researcher/identity.md +1 -1
- package/src/agents/researcher/web-researcher/identity.md +1 -1
- package/src/agents/reviewer/reviewer/playbook.md +1 -1
- package/src/agents/tester/ai-tester/identity.md +1 -1
- package/src/agents/tester/api-tester/critical-reminders.md +1 -1
- package/src/agents/tester/api-tester/critical-requirements.md +1 -1
- package/src/agents/tester/api-tester/identity.md +2 -2
- package/src/agents/tester/cli-tester/identity.md +1 -1
- package/src/agents/tester/web-tester/identity.md +3 -3
- package/src/schemas/custom-metadata.schema.json +3 -0
- package/src/schemas/metadata.schema.json +3 -0
- package/src/schemas/plugin.schema.json +3 -0
- package/src/schemas/project-config.schema.json +4 -8
- package/src/schemas/project-source-config.schema.json +2 -2
- package/dist/chunk-2HC2SNRP.js.map +0 -1
- package/dist/chunk-35VOK7XE.js.map +0 -1
- package/dist/chunk-FIHTAFST.js.map +0 -1
- package/dist/chunk-FRWKCE6R.js.map +0 -1
- package/dist/chunk-HEBPKK5L.js.map +0 -1
- package/dist/chunk-JC7DBPRD.js.map +0 -1
- package/dist/chunk-K7PJDWER.js.map +0 -1
- package/dist/chunk-KET3EVGX.js +0 -41
- package/dist/chunk-KET3EVGX.js.map +0 -1
- package/dist/chunk-M5HSTNYU.js.map +0 -1
- package/dist/chunk-NXQAY5U7.js.map +0 -1
- package/dist/chunk-OJJLYHM3.js +0 -34
- package/dist/chunk-OJJLYHM3.js.map +0 -1
- package/dist/chunk-ORJ5Y222.js.map +0 -1
- package/dist/chunk-R54KIGN2.js.map +0 -1
- package/dist/chunk-REKOWTIB.js.map +0 -1
- package/dist/chunk-TY6CAOL7.js.map +0 -1
- package/dist/chunk-U2DNAHFE.js.map +0 -1
- package/dist/chunk-U2YSGBHA.js.map +0 -1
- package/dist/chunk-VGEBYCQZ.js.map +0 -1
- package/dist/chunk-X5XJ6WKO.js.map +0 -1
- package/dist/copy-local-skills-KF2RAVD3.js +0 -14
- package/dist/load-agent-defs-DGXGBU3Q.js +0 -15
- package/dist/recompile-project-agents-CJVBAWDJ.js +0 -20
- /package/dist/{chunk-ZNDLUWWD.js.map → chunk-4A4L3YIW.js.map} +0 -0
- /package/dist/{chunk-WDAO3RUY.js.map → chunk-5F2YR5XV.js.map} +0 -0
- /package/dist/{chunk-JFAUQDZM.js.map → chunk-5OKLCVM4.js.map} +0 -0
- /package/dist/{chunk-K3O3YQYG.js.map → chunk-G47TDUK3.js.map} +0 -0
- /package/dist/{chunk-NSJ2S7R5.js.map → chunk-ILUVL7WM.js.map} +0 -0
- /package/dist/{chunk-R4SEU3DF.js.map → chunk-LJCNUP6M.js.map} +0 -0
- /package/dist/{chunk-Q5FLW4JG.js.map → chunk-OKH64JZE.js.map} +0 -0
- /package/dist/{chunk-WG6V6VJV.js.map → chunk-PCC4LBKB.js.map} +0 -0
- /package/dist/{chunk-EFU6P3B7.js.map → chunk-PNMM5HNX.js.map} +0 -0
- /package/dist/{chunk-4VYALFQZ.js.map → chunk-QWVXOCXO.js.map} +0 -0
- /package/dist/{chunk-IO4VEW5U.js.map → chunk-SY4X2LND.js.map} +0 -0
- /package/dist/{chunk-XGMOXMS4.js.map → chunk-TBOVYLQJ.js.map} +0 -0
- /package/dist/{chunk-6CNRMCFM.js.map → chunk-VPASBA7P.js.map} +0 -0
- /package/dist/{chunk-V3ENMW7G.js.map → chunk-WFRTHH3A.js.map} +0 -0
- /package/dist/{chunk-ACKC577F.js.map → chunk-Y5Y7XHVU.js.map} +0 -0
- /package/dist/{copy-local-skills-KF2RAVD3.js.map → components/common/removal-plan-confirm.js.map} +0 -0
- /package/dist/{load-agent-defs-DGXGBU3Q.js.map → copy-local-skills-NSUTBVLJ.js.map} +0 -0
- /package/dist/{loader-4U7UCE2Y.js.map → load-agent-defs-X4E57I2U.js.map} +0 -0
- /package/dist/{recompile-project-agents-CJVBAWDJ.js.map → loader-G6BFG2VA.js.map} +0 -0
- /package/dist/{source-loader-ZNSYJJCI.js.map → recompile-project-agents-JE4MM72I.js.map} +0 -0
|
@@ -7,16 +7,17 @@ import {
|
|
|
7
7
|
getUnmetRequiredBy,
|
|
8
8
|
isActiveAt,
|
|
9
9
|
isGlobalTombstone,
|
|
10
|
+
isLocalOnlySkill,
|
|
10
11
|
isProjectOwned
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WCAUUBHO.js";
|
|
12
13
|
import {
|
|
13
14
|
warn
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XAXJWXI4.js";
|
|
15
16
|
import {
|
|
16
17
|
getCategoryDomain,
|
|
17
18
|
getSkillById,
|
|
18
19
|
matrix
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RWOYPOMR.js";
|
|
20
21
|
import {
|
|
21
22
|
typedEntries,
|
|
22
23
|
typedFromEntries,
|
|
@@ -24,12 +25,14 @@ import {
|
|
|
24
25
|
typedValues
|
|
25
26
|
} from "./chunk-VASLW636.js";
|
|
26
27
|
import {
|
|
28
|
+
CLI_INVOKE_COMMAND,
|
|
27
29
|
DEFAULT_PUBLIC_SOURCE_NAME,
|
|
28
30
|
DEFAULT_SCRATCH_DOMAINS,
|
|
29
31
|
EJECT_SOURCE,
|
|
30
32
|
FALLBACK_DOMAIN,
|
|
31
|
-
INSTALL_MODES
|
|
32
|
-
|
|
33
|
+
INSTALL_MODES,
|
|
34
|
+
SKILL_CATEGORIES_PATH
|
|
35
|
+
} from "./chunk-IO5YBKHV.js";
|
|
33
36
|
|
|
34
37
|
// src/cli/stores/wizard-store.ts
|
|
35
38
|
import { create } from "zustand";
|
|
@@ -48,7 +51,7 @@ function computeScopeDiff(input) {
|
|
|
48
51
|
const excludedGlobalAgents = currentAgents.filter((a) => a.scope === "global" && !!a.excluded);
|
|
49
52
|
const prevSkillKeySet = installedSkillConfigs ? new Set(installedSkillConfigs.map((s) => skillSlotKey(s.id, s.scope))) : null;
|
|
50
53
|
const prevSourceMap = installedSkillConfigs ? new Map(
|
|
51
|
-
installedSkillConfigs.filter((s) => !s.excluded).map((s) => [skillSlotKey(s.id, s.scope), s.
|
|
54
|
+
installedSkillConfigs.filter((s) => !s.excluded).map((s) => [skillSlotKey(s.id, s.scope), s.origin])
|
|
52
55
|
) : null;
|
|
53
56
|
const prevAgentKeySet = installedAgentConfigs ? new Set(installedAgentConfigs.map((a) => agentSlotKey(a.name, a.scope))) : null;
|
|
54
57
|
const activeSkillBaseline = installedSkillConfigs ? installedSkillConfigs.filter((s) => !s.excluded) : [];
|
|
@@ -59,12 +62,12 @@ function computeScopeDiff(input) {
|
|
|
59
62
|
const inheritedGlobalAgents = activeAgentBaseline.filter(
|
|
60
63
|
(a) => a.scope === "global" && !globalAgents.some((g) => g.name === a.name) && !excludedGlobalAgents.some((e) => e.name === a.name) && projectAgents.some((p) => p.name === a.name)
|
|
61
64
|
);
|
|
62
|
-
const removedSkills =
|
|
65
|
+
const removedSkills = activeSkillBaseline.filter(
|
|
63
66
|
(s) => !currentSkills.some((c) => c.id === s.id && c.scope === s.scope)
|
|
64
|
-
)
|
|
65
|
-
const removedAgents =
|
|
67
|
+
);
|
|
68
|
+
const removedAgents = activeAgentBaseline.filter(
|
|
66
69
|
(a) => !currentAgents.some((c) => c.name === a.name && c.scope === a.scope)
|
|
67
|
-
)
|
|
70
|
+
);
|
|
68
71
|
const inheritedSkillIdSet = new Set(inheritedGlobalSkills.map((s) => s.id));
|
|
69
72
|
const uniqueExcludedGlobalSkills = excludedGlobalSkills.filter(
|
|
70
73
|
(s) => !inheritedSkillIdSet.has(s.id)
|
|
@@ -83,9 +86,9 @@ function computeScopeDiff(input) {
|
|
|
83
86
|
...inheritedGlobalAgents,
|
|
84
87
|
...uniqueExcludedGlobalAgents
|
|
85
88
|
];
|
|
86
|
-
const removedGlobalSkills = isInitMode ? [] : removedSkills.filter((s) => s.scope === "global");
|
|
89
|
+
const removedGlobalSkills = isInitMode ? [] : removedSkills.filter((s) => s.scope === "global" && !inheritedSkillIdSet.has(s.id));
|
|
87
90
|
const removedProjectSkills = removedSkills.filter((s) => s.scope === "project");
|
|
88
|
-
const removedGlobalAgents = isInitMode ? [] : removedAgents.filter((a) => a.scope === "global");
|
|
91
|
+
const removedGlobalAgents = isInitMode ? [] : removedAgents.filter((a) => a.scope === "global" && !inheritedAgentNameSet.has(a.name));
|
|
89
92
|
const removedProjectAgents = removedAgents.filter((a) => a.scope === "project");
|
|
90
93
|
const projectSkillRows = [
|
|
91
94
|
...projectSkills.map((s) => classifyDiffRow(s, prevSkillKeySet, prevSourceMap)),
|
|
@@ -123,18 +126,18 @@ function classifyDiffRow(skill, prevKeySet, prevSourceMap) {
|
|
|
123
126
|
const key = skillSlotKey(skill.id, skill.scope);
|
|
124
127
|
const isNew = prevKeySet === null || !prevKeySet.has(key);
|
|
125
128
|
const prevSource = prevSourceMap?.get(key);
|
|
126
|
-
const modeChanged = !isNew && prevSource != null && prevSource !== skill.
|
|
129
|
+
const modeChanged = !isNew && prevSource != null && prevSource !== skill.origin;
|
|
127
130
|
if (modeChanged) {
|
|
128
|
-
return { id: skill.id, source: skill.
|
|
131
|
+
return { id: skill.id, source: skill.origin, status: "mode-changed" };
|
|
129
132
|
}
|
|
130
|
-
return { id: skill.id, source: skill.
|
|
133
|
+
return { id: skill.id, source: skill.origin, status: isNew ? "added" : "unchanged" };
|
|
131
134
|
}
|
|
132
135
|
function classifyAgentDiffRow(agent, prevKeySet) {
|
|
133
136
|
const isNew = prevKeySet === null || !prevKeySet.has(agentSlotKey(agent.name, agent.scope));
|
|
134
137
|
return { name: agent.name, status: isNew ? "added" : "unchanged" };
|
|
135
138
|
}
|
|
136
139
|
function toRemovedSkillRow(skill) {
|
|
137
|
-
return { id: skill.id, source: skill.
|
|
140
|
+
return { id: skill.id, source: skill.origin, status: "removed" };
|
|
138
141
|
}
|
|
139
142
|
function toRemovedAgentRow(agent) {
|
|
140
143
|
return { name: agent.name, status: "removed" };
|
|
@@ -144,8 +147,7 @@ function toRemovedAgentRow(agent) {
|
|
|
144
147
|
function buildCategoriesForDomain(domain, allSelections, installedSkillIds, skillConfigs) {
|
|
145
148
|
const categories = sortBy(
|
|
146
149
|
typedValues(matrix.categories).filter((cat) => cat.domain === domain),
|
|
147
|
-
|
|
148
|
-
(cat) => cat.order ?? 0
|
|
150
|
+
(cat) => cat.order
|
|
149
151
|
);
|
|
150
152
|
const categoryRows = categories.map((cat) => {
|
|
151
153
|
const skillOptions = getAvailableSkills(cat.id, allSelections);
|
|
@@ -169,7 +171,7 @@ function buildCategoriesForDomain(domain, allSelections, installedSkillIds, skil
|
|
|
169
171
|
installed: installedSkillIds?.includes(skill.id) || false,
|
|
170
172
|
...activeConfig?.scope !== void 0 && { scope: activeConfig.scope },
|
|
171
173
|
...secondaryScope !== void 0 && { secondaryScope },
|
|
172
|
-
...activeConfig?.
|
|
174
|
+
...activeConfig?.origin !== void 0 && { source: activeConfig.origin },
|
|
173
175
|
hasUnmetRequirements: skill.hasUnmetRequirements,
|
|
174
176
|
...skill.unmetRequirementsReason !== void 0 && {
|
|
175
177
|
unmetRequirementsReason: skill.unmetRequirementsReason
|
|
@@ -180,10 +182,8 @@ function buildCategoriesForDomain(domain, allSelections, installedSkillIds, skil
|
|
|
180
182
|
return {
|
|
181
183
|
id: cat.id,
|
|
182
184
|
displayName: cat.displayName,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- CategoryDefinition declares this required, but an auto-synthesized category for a custom skill can arrive without it — the type is stricter than the data
|
|
186
|
-
exclusive: cat.exclusive ?? true,
|
|
185
|
+
required: cat.required,
|
|
186
|
+
exclusive: cat.exclusive,
|
|
187
187
|
options
|
|
188
188
|
};
|
|
189
189
|
});
|
|
@@ -199,7 +199,110 @@ function orderDomains(domains) {
|
|
|
199
199
|
];
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
// src/cli/lib/wizard/agent-roster.ts
|
|
203
|
+
var BUILT_IN_AGENT_GROUPS = [
|
|
204
|
+
{
|
|
205
|
+
label: "Web",
|
|
206
|
+
items: [
|
|
207
|
+
{
|
|
208
|
+
id: "web-developer",
|
|
209
|
+
label: "Web Developer",
|
|
210
|
+
description: "Frontend features, components, TypeScript"
|
|
211
|
+
},
|
|
212
|
+
{ id: "web-researcher", label: "Web Researcher", description: "Frontend pattern discovery" },
|
|
213
|
+
{
|
|
214
|
+
id: "web-tester",
|
|
215
|
+
label: "Web Tester",
|
|
216
|
+
description: "Frontend tests, E2E, component tests"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: "API",
|
|
222
|
+
items: [
|
|
223
|
+
{
|
|
224
|
+
id: "api-developer",
|
|
225
|
+
label: "API Developer",
|
|
226
|
+
description: "Backend routes, database, middleware"
|
|
227
|
+
},
|
|
228
|
+
{ id: "api-researcher", label: "API Researcher", description: "Backend pattern discovery" },
|
|
229
|
+
{
|
|
230
|
+
id: "api-tester",
|
|
231
|
+
label: "API Tester",
|
|
232
|
+
description: "Endpoint, database, and auth flow tests"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: "AI",
|
|
238
|
+
items: [
|
|
239
|
+
{
|
|
240
|
+
id: "ai-developer",
|
|
241
|
+
label: "AI Developer",
|
|
242
|
+
description: "RAG pipelines, agent loops, tool calling"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
id: "ai-researcher",
|
|
246
|
+
label: "AI Researcher",
|
|
247
|
+
description: "Prompt, model, and RAG pipeline discovery"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: "ai-tester",
|
|
251
|
+
label: "AI Tester",
|
|
252
|
+
description: "LLM mocking, prompt regression, eval harnesses"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
label: "CLI",
|
|
258
|
+
items: [
|
|
259
|
+
{
|
|
260
|
+
id: "cli-developer",
|
|
261
|
+
label: "CLI Developer",
|
|
262
|
+
description: "CLI commands, interactive prompts"
|
|
263
|
+
},
|
|
264
|
+
{ id: "cli-tester", label: "CLI Tester", description: "CLI application tests" },
|
|
265
|
+
{
|
|
266
|
+
id: "cli-researcher",
|
|
267
|
+
label: "CLI Researcher",
|
|
268
|
+
description: "CLI command and config pattern discovery"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
label: "Meta",
|
|
274
|
+
items: [
|
|
275
|
+
{
|
|
276
|
+
id: "pm",
|
|
277
|
+
label: "PM",
|
|
278
|
+
description: "Cross-domain implementation specs; domain frameworks via skills"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: "reviewer",
|
|
282
|
+
label: "Reviewer",
|
|
283
|
+
description: "Cross-domain code review; domain knowledge via skills"
|
|
284
|
+
},
|
|
285
|
+
{ id: "agent-summoner", label: "Agent Summoner", description: "Create and improve agents" },
|
|
286
|
+
{
|
|
287
|
+
id: "skill-summoner",
|
|
288
|
+
label: "Skill Summoner",
|
|
289
|
+
description: "Create technology-specific skills"
|
|
290
|
+
},
|
|
291
|
+
{ id: "codex-keeper", label: "Codex Keeper", description: "AI-focused documentation" }
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
];
|
|
295
|
+
var BUILT_IN_AGENT_IDS = new Set(
|
|
296
|
+
BUILT_IN_AGENT_GROUPS.flatMap((group) => group.items.map((agent) => agent.id))
|
|
297
|
+
);
|
|
298
|
+
function firstFocusableAgent() {
|
|
299
|
+
const first = BUILT_IN_AGENT_GROUPS[0]?.items[0];
|
|
300
|
+
if (first === void 0) throw new Error("The built-in agent roster is empty");
|
|
301
|
+
return first.id;
|
|
302
|
+
}
|
|
303
|
+
|
|
202
304
|
// src/cli/stores/wizard-store.ts
|
|
305
|
+
var LOCAL_ONLY_INSTALL_MODES = ["eject"];
|
|
203
306
|
var TOAST_MESSAGES = {
|
|
204
307
|
GLOBAL_SKILLS_LOCKED: "Global skills cannot be changed from project scope",
|
|
205
308
|
ONLY_SKILL_IN_CATEGORY: "Cannot deselect the only skill in this category",
|
|
@@ -212,10 +315,15 @@ function resolveEffectiveSource(...candidates) {
|
|
|
212
315
|
function primarySourceName(skill) {
|
|
213
316
|
return skill?.availableSources?.find((s) => s.primary)?.name;
|
|
214
317
|
}
|
|
318
|
+
function marketplaceSourceName(skill) {
|
|
319
|
+
return skill?.availableSources?.find((source) => source.type !== "local")?.name;
|
|
320
|
+
}
|
|
321
|
+
function defaultOriginFor(skill) {
|
|
322
|
+
if (isLocalOnlySkill(skill)) return EJECT_SOURCE;
|
|
323
|
+
return primarySourceName(skill) ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
324
|
+
}
|
|
215
325
|
function createDefaultSkillConfig(id) {
|
|
216
|
-
|
|
217
|
-
const primarySource = primarySourceName(skill);
|
|
218
|
-
return { id, scope: "global", source: primarySource ?? DEFAULT_PUBLIC_SOURCE_NAME };
|
|
326
|
+
return { id, scope: "global", origin: defaultOriginFor(matrix.skills[id]) };
|
|
219
327
|
}
|
|
220
328
|
function hasProjectActive(configs, id) {
|
|
221
329
|
return configs.some((sc) => sc.id === id && isActiveAt(sc, "project"));
|
|
@@ -239,16 +347,20 @@ function blocksExclusiveSwap(installed, liveConfigs, id) {
|
|
|
239
347
|
return isGloballyLockedSkill(installed, liveConfigs, id) || isDualScopePair(liveConfigs, id);
|
|
240
348
|
}
|
|
241
349
|
function wouldOverwriteGlobalEject(config, liveConfigs, installedSkillConfigs) {
|
|
242
|
-
if (config.scope !== "project" || config.
|
|
350
|
+
if (config.scope !== "project" || config.origin !== EJECT_SOURCE) return false;
|
|
243
351
|
const globalEjectInstalled = installedSkillConfigs?.some(
|
|
244
|
-
(sc) => sc.id === config.id && sc.scope === "global" && sc.
|
|
352
|
+
(sc) => sc.id === config.id && sc.scope === "global" && sc.origin === EJECT_SOURCE && !sc.excluded
|
|
245
353
|
);
|
|
246
354
|
if (!globalEjectInstalled) return false;
|
|
247
355
|
return !liveConfigs.some((sc) => sc.id === config.id && sc.excluded);
|
|
248
356
|
}
|
|
249
|
-
function
|
|
357
|
+
function isInheritedGlobalSlot(installed, id, scope) {
|
|
358
|
+
if (installed === null) return false;
|
|
359
|
+
return scope === "global" && hasGlobalActive(installed, id);
|
|
360
|
+
}
|
|
361
|
+
function withActiveEntryOrigin(configs, id, scope, origin) {
|
|
250
362
|
return configs.map(
|
|
251
|
-
(sc) => sc.id === id && !sc.excluded && sc.scope === scope ? { ...sc,
|
|
363
|
+
(sc) => sc.id === id && !sc.excluded && sc.scope === scope ? { ...sc, origin } : sc
|
|
252
364
|
);
|
|
253
365
|
}
|
|
254
366
|
function applySkillRemoval(configs, removedIds, installedSkillConfigs) {
|
|
@@ -259,7 +371,7 @@ function applySkillRemoval(configs, removedIds, installedSkillConfigs) {
|
|
|
259
371
|
const resurfacedInheritedGlobals = [...removed].filter((id) => isDualScopePair(configs, id)).map((id) => ({
|
|
260
372
|
id,
|
|
261
373
|
scope: "global",
|
|
262
|
-
|
|
374
|
+
origin: configs.find((sc) => sc.id === id && sc.scope === "global")?.origin ?? DEFAULT_PUBLIC_SOURCE_NAME
|
|
263
375
|
}));
|
|
264
376
|
return [...retained, ...resurfacedInheritedGlobals];
|
|
265
377
|
}
|
|
@@ -275,11 +387,11 @@ function reconcileSkillConfigs(configs, added, removed, installedSkillConfigs, i
|
|
|
275
387
|
for (const id of added) {
|
|
276
388
|
if (!isEditingFromGlobalScope && hasGlobalTombstone(installedSkillConfigs ?? [], id) && !hasProjectActive(result, id)) {
|
|
277
389
|
const globalEntry = (installedSkillConfigs ?? []).find((sc) => sc.id === id && sc.scope === "global") ?? result.find((sc) => sc.id === id && sc.scope === "global");
|
|
278
|
-
const
|
|
390
|
+
const origin = globalEntry?.origin ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
279
391
|
result = [
|
|
280
392
|
...result.filter((sc) => sc.id !== id),
|
|
281
|
-
{ id, scope: "project",
|
|
282
|
-
{ id, scope: "global", excluded: true,
|
|
393
|
+
{ id, scope: "project", origin },
|
|
394
|
+
{ id, scope: "global", excluded: true, origin }
|
|
283
395
|
];
|
|
284
396
|
continue;
|
|
285
397
|
}
|
|
@@ -311,6 +423,17 @@ function isDualScopeAgentPair(configs, name) {
|
|
|
311
423
|
function collectTombstones(configs) {
|
|
312
424
|
return configs.filter((entry) => entry.excluded);
|
|
313
425
|
}
|
|
426
|
+
function filledAgentSlots(configs) {
|
|
427
|
+
return new Set(configs.map((ac) => agentSlotKey(ac.name, ac.scope)));
|
|
428
|
+
}
|
|
429
|
+
function agentTombstonesOutsideRebuild(saved, rebuilt) {
|
|
430
|
+
const filled = filledAgentSlots(rebuilt);
|
|
431
|
+
return collectTombstones(saved).filter((ac) => !filled.has(agentSlotKey(ac.name, ac.scope)));
|
|
432
|
+
}
|
|
433
|
+
function skillTombstonesOutsideRebuild(saved, rebuilt) {
|
|
434
|
+
const filled = new Set(rebuilt.map((sc) => skillSlotKey(sc.id, sc.scope)));
|
|
435
|
+
return collectTombstones(saved).filter((sc) => !filled.has(skillSlotKey(sc.id, sc.scope)));
|
|
436
|
+
}
|
|
314
437
|
function applyAgentToggle(configs, agent, isSelected) {
|
|
315
438
|
if (isSelected) {
|
|
316
439
|
return configs.filter((ac) => ac.name !== agent);
|
|
@@ -325,8 +448,10 @@ function applyAgentToggle(configs, agent, isSelected) {
|
|
|
325
448
|
}
|
|
326
449
|
return [...configs, { name: agent, scope: "global" }];
|
|
327
450
|
}
|
|
328
|
-
function survivesRosterRebuild(agentConfig, roster) {
|
|
329
|
-
if (agentConfig.excluded)
|
|
451
|
+
function survivesRosterRebuild(agentConfig, roster, rebuiltSlots) {
|
|
452
|
+
if (agentConfig.excluded) {
|
|
453
|
+
return !rebuiltSlots.has(agentSlotKey(agentConfig.name, agentConfig.scope));
|
|
454
|
+
}
|
|
330
455
|
return !isProjectOwned(agentConfig) && !roster.has(agentConfig.name);
|
|
331
456
|
}
|
|
332
457
|
function restoreDualScopeAgent(selectedAgents, agentConfigs, agent) {
|
|
@@ -346,12 +471,10 @@ function nextSelectedAgents(selectedAgents, agent, flags) {
|
|
|
346
471
|
}
|
|
347
472
|
function buildSkillConfigForId(id, savedConfigs) {
|
|
348
473
|
const saved = savedConfigs?.find((sc) => sc.id === id && !sc.excluded && sc.scope === "project") ?? savedConfigs?.find((sc) => sc.id === id && !sc.excluded);
|
|
349
|
-
const skill = matrix.skills[id];
|
|
350
|
-
const primarySource = primarySourceName(skill);
|
|
351
474
|
return {
|
|
352
475
|
id,
|
|
353
476
|
scope: saved?.scope ?? "global",
|
|
354
|
-
|
|
477
|
+
origin: saved?.origin ?? defaultOriginFor(matrix.skills[id])
|
|
355
478
|
};
|
|
356
479
|
}
|
|
357
480
|
function buildAgentConfigForName(name, savedConfigs) {
|
|
@@ -382,18 +505,22 @@ var DOMAIN_AGENTS = {
|
|
|
382
505
|
cli: ["cli-developer", "cli-tester", "cli-researcher", "pm", "reviewer"],
|
|
383
506
|
ai: ["ai-developer", "ai-researcher", "ai-tester", "pm", "reviewer"]
|
|
384
507
|
};
|
|
508
|
+
function absentFromSourceWarning(skillId) {
|
|
509
|
+
return `Installed skill '${skillId}' is not present in the loaded source \u2014 it may have been removed or renamed. It is left out of this session's selection. Run '${CLI_INVOKE_COMMAND} update' to refresh the marketplace if you expect it to still be carried there.`;
|
|
510
|
+
}
|
|
511
|
+
function unplaceableCategoryWarning(skillId, category) {
|
|
512
|
+
return `Installed skill '${skillId}' has unknown category '${category}' \u2014 skipping. No domain in this source claims that category, so the wizard has no screen to place the skill on. Declare it with a 'domain' in the source's '${SKILL_CATEGORIES_PATH}', or run '${CLI_INVOKE_COMMAND} update' to refresh the marketplace.`;
|
|
513
|
+
}
|
|
385
514
|
function resolveSkillForPopulation(skillId) {
|
|
386
515
|
const { skills } = matrix;
|
|
387
516
|
const skill = skills[skillId];
|
|
388
517
|
if (!skill?.category) {
|
|
389
|
-
warn(
|
|
390
|
-
`Installed skill '${skillId}' is not present in the loaded source \u2014 it may have been removed or renamed`
|
|
391
|
-
);
|
|
518
|
+
warn(absentFromSourceWarning(skillId));
|
|
392
519
|
return null;
|
|
393
520
|
}
|
|
394
521
|
const domain = getCategoryDomain(skill.category);
|
|
395
522
|
if (!domain) {
|
|
396
|
-
warn(
|
|
523
|
+
warn(unplaceableCategoryWarning(skillId, skill.category));
|
|
397
524
|
return null;
|
|
398
525
|
}
|
|
399
526
|
const subcat = skill.category;
|
|
@@ -406,17 +533,16 @@ function addToDomainSelections(selections, domain, category, skillId) {
|
|
|
406
533
|
skillList.push(skillId);
|
|
407
534
|
return true;
|
|
408
535
|
}
|
|
409
|
-
function marketplaceSourceName(skill) {
|
|
410
|
-
return skill.availableSources?.find((source) => source.type !== "local")?.name ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
411
|
-
}
|
|
412
536
|
function sourceForInstallMode(skill, mode) {
|
|
413
|
-
|
|
537
|
+
if (mode === "eject") return EJECT_SOURCE;
|
|
538
|
+
return marketplaceSourceName(skill) ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
414
539
|
}
|
|
415
|
-
function installModeOfSource(
|
|
416
|
-
return
|
|
540
|
+
function installModeOfSource(origin) {
|
|
541
|
+
return origin === EJECT_SOURCE ? "eject" : "plugin";
|
|
417
542
|
}
|
|
418
|
-
function buildInstallModeOptions(selectedMode) {
|
|
419
|
-
|
|
543
|
+
function buildInstallModeOptions(skill, selectedMode) {
|
|
544
|
+
const modes = isLocalOnlySkill(skill) ? LOCAL_ONLY_INSTALL_MODES : INSTALL_MODES;
|
|
545
|
+
return modes.map((mode) => ({ mode, selected: mode === selectedMode }));
|
|
420
546
|
}
|
|
421
547
|
function collectRemovedInstalledEntries(installedSkillConfigs, skillConfigs) {
|
|
422
548
|
if (!installedSkillConfigs) return [];
|
|
@@ -442,20 +568,20 @@ function resolveSkillRowInputs(id, skillConfigs) {
|
|
|
442
568
|
const skill = getSkillById(id);
|
|
443
569
|
const configEntry = skillConfigs.find((sc) => sc.id === skill.id);
|
|
444
570
|
const selectedSource = resolveEffectiveSource(
|
|
445
|
-
configEntry?.
|
|
571
|
+
configEntry?.origin,
|
|
446
572
|
skill.activeSource?.name,
|
|
447
573
|
primarySourceName(skill)
|
|
448
574
|
);
|
|
449
575
|
return {
|
|
450
576
|
skillId: skill.id,
|
|
451
577
|
configEntry,
|
|
452
|
-
options: buildInstallModeOptions(installModeOfSource(selectedSource))
|
|
578
|
+
options: buildInstallModeOptions(skill, installModeOfSource(selectedSource))
|
|
453
579
|
};
|
|
454
580
|
}
|
|
455
581
|
function toPendingRemovalRow(skillId, options, removedInstalledEntry) {
|
|
456
582
|
return {
|
|
457
583
|
skillId,
|
|
458
|
-
options: withSelectedMode(options, removedInstalledEntry.
|
|
584
|
+
options: withSelectedMode(options, removedInstalledEntry.origin),
|
|
459
585
|
scope: removedInstalledEntry.scope,
|
|
460
586
|
disabled: true
|
|
461
587
|
};
|
|
@@ -482,14 +608,14 @@ function classifySkillSourceRows(skillId, options, context) {
|
|
|
482
608
|
toLockedGlobalRow(
|
|
483
609
|
skillId,
|
|
484
610
|
options,
|
|
485
|
-
installedGlobalConfig?.
|
|
611
|
+
installedGlobalConfig?.origin ?? configEntry.origin,
|
|
486
612
|
installedSkillSlots
|
|
487
613
|
)
|
|
488
614
|
];
|
|
489
615
|
}
|
|
490
616
|
if (!isEditingFromGlobalScope && installedGlobalConfig && configEntry?.scope === "project") {
|
|
491
617
|
return [
|
|
492
|
-
toLockedGlobalRow(skillId, options, installedGlobalConfig.
|
|
618
|
+
toLockedGlobalRow(skillId, options, installedGlobalConfig.origin, installedSkillSlots),
|
|
493
619
|
{
|
|
494
620
|
skillId,
|
|
495
621
|
options,
|
|
@@ -561,6 +687,10 @@ var createInitialState = (overrides) => ({
|
|
|
561
687
|
history: [],
|
|
562
688
|
...overrides
|
|
563
689
|
});
|
|
690
|
+
function seedFocusForStep(step, actions) {
|
|
691
|
+
if (step === "build") actions.seedFocusedSkillForActiveDomain();
|
|
692
|
+
if (step === "agents") actions.seedFocusedAgent();
|
|
693
|
+
}
|
|
564
694
|
var useWizardStore = create((set, get) => ({
|
|
565
695
|
...createInitialState(),
|
|
566
696
|
setStep: (step) => {
|
|
@@ -568,7 +698,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
568
698
|
step,
|
|
569
699
|
history: [...state.history, state.step]
|
|
570
700
|
}));
|
|
571
|
-
|
|
701
|
+
seedFocusForStep(step, get());
|
|
572
702
|
},
|
|
573
703
|
setApproach: (approach) => set({ approach }),
|
|
574
704
|
selectStack: (stackId) => set({
|
|
@@ -622,7 +752,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
622
752
|
const skillConfigs = resolvedSkillIds.map(
|
|
623
753
|
(id) => buildSkillConfigForId(id, savedConfigs)
|
|
624
754
|
);
|
|
625
|
-
const excludedConfigs =
|
|
755
|
+
const excludedConfigs = skillTombstonesOutsideRebuild(savedConfigs ?? [], skillConfigs);
|
|
626
756
|
return {
|
|
627
757
|
domainSelections,
|
|
628
758
|
_stackDomainSelections: structuredClone(domainSelections),
|
|
@@ -770,7 +900,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
770
900
|
return {
|
|
771
901
|
skillConfigs: needsTombstone ? [
|
|
772
902
|
...rescoped,
|
|
773
|
-
{ id: skillId, scope: "global", excluded: true,
|
|
903
|
+
{ id: skillId, scope: "global", excluded: true, origin: config.origin }
|
|
774
904
|
] : rescoped
|
|
775
905
|
};
|
|
776
906
|
}
|
|
@@ -793,22 +923,22 @@ var useWizardStore = create((set, get) => ({
|
|
|
793
923
|
warn("Ignoring setInstallMode call with empty skillId");
|
|
794
924
|
return state;
|
|
795
925
|
}
|
|
796
|
-
|
|
926
|
+
if (isInheritedGlobalSlot(state.installedSkillConfigs, skillId, scope) && !state.isEditingFromGlobalScope) {
|
|
927
|
+
return state;
|
|
928
|
+
}
|
|
929
|
+
const origin = sourceForInstallMode(getSkillById(skillId), mode);
|
|
797
930
|
return {
|
|
798
|
-
skillConfigs:
|
|
931
|
+
skillConfigs: withActiveEntryOrigin(state.skillConfigs, skillId, scope, origin)
|
|
799
932
|
};
|
|
800
933
|
}),
|
|
801
934
|
toggleInfo: () => set((state) => ({ showInfo: !state.showInfo })),
|
|
802
935
|
setToastMessage: (message) => set({ toastMessage: message }),
|
|
803
|
-
goBack: () =>
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
history
|
|
810
|
-
};
|
|
811
|
-
}),
|
|
936
|
+
goBack: () => {
|
|
937
|
+
const previousStep = get().history.at(-1);
|
|
938
|
+
if (previousStep === void 0) return;
|
|
939
|
+
set((state) => ({ step: previousStep, history: state.history.slice(0, -1) }));
|
|
940
|
+
seedFocusForStep(previousStep, get());
|
|
941
|
+
},
|
|
812
942
|
toggleAgent: (agent) => set((state) => {
|
|
813
943
|
const installed = state.installedAgentConfigs ?? [];
|
|
814
944
|
const isDualScopePairRow = !state.isEditingFromGlobalScope && isDualScopeAgentPair(state.agentConfigs, agent);
|
|
@@ -851,6 +981,10 @@ var useWizardStore = create((set, get) => ({
|
|
|
851
981
|
return { agentConfigs: rescoped.filter((ac) => !(ac.name === agentName && ac.excluded)) };
|
|
852
982
|
}),
|
|
853
983
|
setFocusedAgentId: (id) => set({ focusedAgentId: id }),
|
|
984
|
+
seedFocusedAgent: () => {
|
|
985
|
+
if (get().focusedAgentId !== null) return;
|
|
986
|
+
set({ focusedAgentId: firstFocusableAgent() });
|
|
987
|
+
},
|
|
854
988
|
preselectAgentsFromDomains: () => set((state) => {
|
|
855
989
|
if (state.selectedStackId) return state;
|
|
856
990
|
const sorted = [
|
|
@@ -858,7 +992,10 @@ var useWizardStore = create((set, get) => ({
|
|
|
858
992
|
].sort();
|
|
859
993
|
const roster = new Set(sorted);
|
|
860
994
|
const merged = sorted.map((name) => buildAgentConfigForName(name, state.agentConfigs));
|
|
861
|
-
const
|
|
995
|
+
const rebuiltSlots = filledAgentSlots(merged);
|
|
996
|
+
const retained = state.agentConfigs.filter(
|
|
997
|
+
(ac) => survivesRosterRebuild(ac, roster, rebuiltSlots)
|
|
998
|
+
);
|
|
862
999
|
return {
|
|
863
1000
|
selectedAgents: sorted,
|
|
864
1001
|
agentConfigs: [...merged, ...retained]
|
|
@@ -869,7 +1006,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
869
1006
|
const globalAgents = state.globalAgentPreselections?.agents ?? [];
|
|
870
1007
|
const mergedAgents = [.../* @__PURE__ */ new Set([...stackAgents, ...globalAgents])].sort();
|
|
871
1008
|
const merged = mergedAgents.map((name) => buildAgentConfigForName(name, savedConfigs));
|
|
872
|
-
const excludedConfigs =
|
|
1009
|
+
const excludedConfigs = agentTombstonesOutsideRebuild(savedConfigs, merged);
|
|
873
1010
|
return {
|
|
874
1011
|
selectedAgents: mergedAgents,
|
|
875
1012
|
agentConfigs: [...merged, ...excludedConfigs]
|
|
@@ -906,25 +1043,6 @@ var useWizardStore = create((set, get) => ({
|
|
|
906
1043
|
const state = get();
|
|
907
1044
|
return state.currentDomainIndex > 0;
|
|
908
1045
|
},
|
|
909
|
-
setAllSourcesEject: () => {
|
|
910
|
-
set((state) => ({
|
|
911
|
-
// Never touch tombstones — a dual-scope skill's excluded global tombstone keeps describing
|
|
912
|
-
// the masked global install. The bulk set-all applies only to active entries, mirroring the
|
|
913
|
-
// D-262 per-skill setSkillSource/setSourceSelection guard (D-265).
|
|
914
|
-
skillConfigs: state.skillConfigs.map(
|
|
915
|
-
(sc) => sc.excluded ? sc : { ...sc, source: EJECT_SOURCE }
|
|
916
|
-
)
|
|
917
|
-
}));
|
|
918
|
-
},
|
|
919
|
-
setAllSourcesPlugin: () => {
|
|
920
|
-
set((state) => ({
|
|
921
|
-
// Never touch tombstones (see setAllSourcesEject) — the excluded global tombstone keeps its
|
|
922
|
-
// marketplace source describing the masked global install (D-265).
|
|
923
|
-
skillConfigs: state.skillConfigs.map(
|
|
924
|
-
(sc) => sc.excluded ? sc : { ...sc, source: marketplaceSourceName(getSkillById(sc.id)) }
|
|
925
|
-
)
|
|
926
|
-
}));
|
|
927
|
-
},
|
|
928
1046
|
buildSourceRows: () => {
|
|
929
1047
|
const state = get();
|
|
930
1048
|
const selectedTechnologies = get().getAllSelectedTechnologies();
|
|
@@ -1040,10 +1158,13 @@ export {
|
|
|
1040
1158
|
deriveScopeBadges,
|
|
1041
1159
|
buildCategoriesForDomain,
|
|
1042
1160
|
orderDomains,
|
|
1161
|
+
BUILT_IN_AGENT_GROUPS,
|
|
1162
|
+
BUILT_IN_AGENT_IDS,
|
|
1163
|
+
DOMAIN_AGENTS,
|
|
1043
1164
|
WIZARD_STEP_ORDER,
|
|
1044
1165
|
getActiveStepFlow,
|
|
1045
1166
|
createInitialState,
|
|
1046
1167
|
useWizardStore,
|
|
1047
1168
|
hydrateWizardStore
|
|
1048
1169
|
};
|
|
1049
|
-
//# sourceMappingURL=chunk-
|
|
1170
|
+
//# sourceMappingURL=chunk-F5T6TV4Z.js.map
|