agents-inc 0.154.0 → 0.156.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 +55 -0
- package/dist/chunk-2H7UWE2G.js +246 -0
- package/dist/chunk-2H7UWE2G.js.map +1 -0
- package/dist/{chunk-LA3JPESW.js → chunk-4A4L3YIW.js} +5 -5
- package/dist/chunk-4G2YHZIM.js +132 -0
- package/dist/chunk-4G2YHZIM.js.map +1 -0
- package/dist/{chunk-BZ4CZBOM.js → chunk-5F2YR5XV.js} +3 -3
- package/dist/{chunk-CHNA5RVS.js → chunk-5OKLCVM4.js} +3 -3
- package/dist/{chunk-ZU6DAR4S.js → chunk-5QZAK6J7.js} +7 -7
- package/dist/{chunk-ZU6DAR4S.js.map → chunk-5QZAK6J7.js.map} +1 -1
- package/dist/{chunk-NFH6SA62.js → chunk-6RLV45HN.js} +10 -10
- package/dist/{chunk-NFH6SA62.js.map → chunk-6RLV45HN.js.map} +1 -1
- package/dist/{chunk-GUDGCFSF.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-UW44KSYL.js → chunk-F2AMBBIA.js} +6 -6
- package/dist/{chunk-UW44KSYL.js.map → chunk-F2AMBBIA.js.map} +1 -1
- package/dist/{chunk-QQTYMW7N.js → chunk-F5T6TV4Z.js} +206 -73
- package/dist/chunk-F5T6TV4Z.js.map +1 -0
- package/dist/{chunk-K3O3YQYG.js → chunk-G47TDUK3.js} +2 -2
- package/dist/{chunk-AURY6RT6.js → chunk-GS2NZ3GD.js} +8 -8
- package/dist/chunk-GS2NZ3GD.js.map +1 -0
- package/dist/{chunk-5MFJ24VM.js → chunk-H6UTKTLK.js} +104 -250
- package/dist/chunk-H6UTKTLK.js.map +1 -0
- package/dist/{chunk-MJFIO5SX.js → chunk-HG4JPXJT.js} +11 -11
- package/dist/chunk-HG4JPXJT.js.map +1 -0
- package/dist/{chunk-IXEDSKMH.js → chunk-HTYH7CKN.js} +3 -3
- 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-NKCY2ULI.js → chunk-LJCNUP6M.js} +2 -2
- package/dist/{chunk-PRJD5MMQ.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-WRRP47PY.js → chunk-PCC4LBKB.js} +2 -2
- package/dist/chunk-PMUABBPG.js +258 -0
- package/dist/chunk-PMUABBPG.js.map +1 -0
- package/dist/{chunk-2IMYK4WN.js → chunk-PNMM5HNX.js} +5 -5
- package/dist/{chunk-AKQ5QISO.js → chunk-QWVXOCXO.js} +6 -6
- package/dist/{chunk-IPJOMAWC.js → chunk-RWOYPOMR.js} +12 -2
- package/dist/{chunk-IPJOMAWC.js.map → chunk-RWOYPOMR.js.map} +1 -1
- package/dist/{chunk-ONWEOS77.js → chunk-SY4X2LND.js} +4 -4
- package/dist/{chunk-XGMOXMS4.js → chunk-TBOVYLQJ.js} +2 -2
- package/dist/{chunk-R7JV22QK.js → chunk-TNGMF4UX.js} +20 -20
- package/dist/{chunk-R7JV22QK.js.map → chunk-TNGMF4UX.js.map} +1 -1
- package/dist/{chunk-7VZV4O6B.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-CBF4ZYV3.js → chunk-WCAUUBHO.js} +1376 -741
- package/dist/chunk-WCAUUBHO.js.map +1 -0
- package/dist/{chunk-V3ENMW7G.js → chunk-WFRTHH3A.js} +3 -3
- package/dist/{chunk-DRKSYJZ2.js → chunk-WTJ3AY33.js} +1 -1
- package/dist/{chunk-DRKSYJZ2.js.map → chunk-WTJ3AY33.js.map} +1 -1
- package/dist/{chunk-XMEIVWAS.js → chunk-WUQ3MTPF.js} +11 -5
- package/dist/{chunk-XMEIVWAS.js.map → chunk-WUQ3MTPF.js.map} +1 -1
- package/dist/{chunk-4VCWL2IG.js → chunk-XAXJWXI4.js} +92 -59
- package/dist/chunk-XAXJWXI4.js.map +1 -0
- package/dist/{chunk-B66SC72V.js → chunk-Y5Y7XHVU.js} +4 -4
- package/dist/{chunk-FMYHWKGG.js → chunk-YO2LTXB4.js} +66 -16
- package/dist/chunk-YO2LTXB4.js.map +1 -0
- package/dist/{chunk-TUQF577Z.js → chunk-ZUAZHDKP.js} +40 -41
- package/dist/chunk-ZUAZHDKP.js.map +1 -0
- package/dist/commands/build/marketplace.js +98 -121
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +8 -8
- package/dist/commands/compile.js +19 -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 +549 -75
- 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 +16 -14
- 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 +61 -74
- 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-JIZDTR4G.js → loader-G6BFG2VA.js} +3 -3
- package/dist/recompile-project-agents-JE4MM72I.js +20 -0
- package/dist/{source-loader-OE6EJFPU.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/project-config.schema.json +4 -8
- package/src/schemas/project-source-config.schema.json +2 -2
- package/dist/chunk-4VCWL2IG.js.map +0 -1
- package/dist/chunk-5MFJ24VM.js.map +0 -1
- package/dist/chunk-7VZV4O6B.js.map +0 -1
- package/dist/chunk-AURY6RT6.js.map +0 -1
- package/dist/chunk-CBF4ZYV3.js.map +0 -1
- package/dist/chunk-FMYHWKGG.js.map +0 -1
- package/dist/chunk-GUDGCFSF.js.map +0 -1
- package/dist/chunk-JC7DBPRD.js.map +0 -1
- package/dist/chunk-MJFIO5SX.js.map +0 -1
- package/dist/chunk-OJJLYHM3.js +0 -34
- package/dist/chunk-OJJLYHM3.js.map +0 -1
- package/dist/chunk-PRJD5MMQ.js.map +0 -1
- package/dist/chunk-QQTYMW7N.js.map +0 -1
- package/dist/chunk-QUDQTO3O.js +0 -41
- package/dist/chunk-QUDQTO3O.js.map +0 -1
- package/dist/chunk-R54KIGN2.js.map +0 -1
- package/dist/chunk-TUQF577Z.js.map +0 -1
- package/dist/copy-local-skills-WVHJFRPK.js +0 -14
- package/dist/load-agent-defs-5OT54J5M.js +0 -15
- package/dist/recompile-project-agents-VREEPBDV.js +0 -20
- /package/dist/{chunk-LA3JPESW.js.map → chunk-4A4L3YIW.js.map} +0 -0
- /package/dist/{chunk-BZ4CZBOM.js.map → chunk-5F2YR5XV.js.map} +0 -0
- /package/dist/{chunk-CHNA5RVS.js.map → chunk-5OKLCVM4.js.map} +0 -0
- /package/dist/{chunk-K3O3YQYG.js.map → chunk-G47TDUK3.js.map} +0 -0
- /package/dist/{chunk-IXEDSKMH.js.map → chunk-HTYH7CKN.js.map} +0 -0
- /package/dist/{chunk-NSJ2S7R5.js.map → chunk-ILUVL7WM.js.map} +0 -0
- /package/dist/{chunk-NKCY2ULI.js.map → chunk-LJCNUP6M.js.map} +0 -0
- /package/dist/{chunk-Q5FLW4JG.js.map → chunk-OKH64JZE.js.map} +0 -0
- /package/dist/{chunk-WRRP47PY.js.map → chunk-PCC4LBKB.js.map} +0 -0
- /package/dist/{chunk-2IMYK4WN.js.map → chunk-PNMM5HNX.js.map} +0 -0
- /package/dist/{chunk-AKQ5QISO.js.map → chunk-QWVXOCXO.js.map} +0 -0
- /package/dist/{chunk-ONWEOS77.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-B66SC72V.js.map → chunk-Y5Y7XHVU.js.map} +0 -0
- /package/dist/{copy-local-skills-WVHJFRPK.js.map → components/common/removal-plan-confirm.js.map} +0 -0
- /package/dist/{load-agent-defs-5OT54J5M.js.map → copy-local-skills-NSUTBVLJ.js.map} +0 -0
- /package/dist/{loader-JIZDTR4G.js.map → load-agent-defs-X4E57I2U.js.map} +0 -0
- /package/dist/{recompile-project-agents-VREEPBDV.js.map → loader-G6BFG2VA.js.map} +0 -0
- /package/dist/{source-loader-OE6EJFPU.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,9 +347,9 @@ 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);
|
|
@@ -250,9 +358,9 @@ function isInheritedGlobalSlot(installed, id, scope) {
|
|
|
250
358
|
if (installed === null) return false;
|
|
251
359
|
return scope === "global" && hasGlobalActive(installed, id);
|
|
252
360
|
}
|
|
253
|
-
function
|
|
361
|
+
function withActiveEntryOrigin(configs, id, scope, origin) {
|
|
254
362
|
return configs.map(
|
|
255
|
-
(sc) => sc.id === id && !sc.excluded && sc.scope === scope ? { ...sc,
|
|
363
|
+
(sc) => sc.id === id && !sc.excluded && sc.scope === scope ? { ...sc, origin } : sc
|
|
256
364
|
);
|
|
257
365
|
}
|
|
258
366
|
function applySkillRemoval(configs, removedIds, installedSkillConfigs) {
|
|
@@ -263,7 +371,7 @@ function applySkillRemoval(configs, removedIds, installedSkillConfigs) {
|
|
|
263
371
|
const resurfacedInheritedGlobals = [...removed].filter((id) => isDualScopePair(configs, id)).map((id) => ({
|
|
264
372
|
id,
|
|
265
373
|
scope: "global",
|
|
266
|
-
|
|
374
|
+
origin: configs.find((sc) => sc.id === id && sc.scope === "global")?.origin ?? DEFAULT_PUBLIC_SOURCE_NAME
|
|
267
375
|
}));
|
|
268
376
|
return [...retained, ...resurfacedInheritedGlobals];
|
|
269
377
|
}
|
|
@@ -279,11 +387,11 @@ function reconcileSkillConfigs(configs, added, removed, installedSkillConfigs, i
|
|
|
279
387
|
for (const id of added) {
|
|
280
388
|
if (!isEditingFromGlobalScope && hasGlobalTombstone(installedSkillConfigs ?? [], id) && !hasProjectActive(result, id)) {
|
|
281
389
|
const globalEntry = (installedSkillConfigs ?? []).find((sc) => sc.id === id && sc.scope === "global") ?? result.find((sc) => sc.id === id && sc.scope === "global");
|
|
282
|
-
const
|
|
390
|
+
const origin = globalEntry?.origin ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
283
391
|
result = [
|
|
284
392
|
...result.filter((sc) => sc.id !== id),
|
|
285
|
-
{ id, scope: "project",
|
|
286
|
-
{ id, scope: "global", excluded: true,
|
|
393
|
+
{ id, scope: "project", origin },
|
|
394
|
+
{ id, scope: "global", excluded: true, origin }
|
|
287
395
|
];
|
|
288
396
|
continue;
|
|
289
397
|
}
|
|
@@ -315,6 +423,17 @@ function isDualScopeAgentPair(configs, name) {
|
|
|
315
423
|
function collectTombstones(configs) {
|
|
316
424
|
return configs.filter((entry) => entry.excluded);
|
|
317
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
|
+
}
|
|
318
437
|
function applyAgentToggle(configs, agent, isSelected) {
|
|
319
438
|
if (isSelected) {
|
|
320
439
|
return configs.filter((ac) => ac.name !== agent);
|
|
@@ -329,8 +448,10 @@ function applyAgentToggle(configs, agent, isSelected) {
|
|
|
329
448
|
}
|
|
330
449
|
return [...configs, { name: agent, scope: "global" }];
|
|
331
450
|
}
|
|
332
|
-
function survivesRosterRebuild(agentConfig, roster) {
|
|
333
|
-
if (agentConfig.excluded)
|
|
451
|
+
function survivesRosterRebuild(agentConfig, roster, rebuiltSlots) {
|
|
452
|
+
if (agentConfig.excluded) {
|
|
453
|
+
return !rebuiltSlots.has(agentSlotKey(agentConfig.name, agentConfig.scope));
|
|
454
|
+
}
|
|
334
455
|
return !isProjectOwned(agentConfig) && !roster.has(agentConfig.name);
|
|
335
456
|
}
|
|
336
457
|
function restoreDualScopeAgent(selectedAgents, agentConfigs, agent) {
|
|
@@ -350,12 +471,10 @@ function nextSelectedAgents(selectedAgents, agent, flags) {
|
|
|
350
471
|
}
|
|
351
472
|
function buildSkillConfigForId(id, savedConfigs) {
|
|
352
473
|
const saved = savedConfigs?.find((sc) => sc.id === id && !sc.excluded && sc.scope === "project") ?? savedConfigs?.find((sc) => sc.id === id && !sc.excluded);
|
|
353
|
-
const skill = matrix.skills[id];
|
|
354
|
-
const primarySource = primarySourceName(skill);
|
|
355
474
|
return {
|
|
356
475
|
id,
|
|
357
476
|
scope: saved?.scope ?? "global",
|
|
358
|
-
|
|
477
|
+
origin: saved?.origin ?? defaultOriginFor(matrix.skills[id])
|
|
359
478
|
};
|
|
360
479
|
}
|
|
361
480
|
function buildAgentConfigForName(name, savedConfigs) {
|
|
@@ -386,18 +505,22 @@ var DOMAIN_AGENTS = {
|
|
|
386
505
|
cli: ["cli-developer", "cli-tester", "cli-researcher", "pm", "reviewer"],
|
|
387
506
|
ai: ["ai-developer", "ai-researcher", "ai-tester", "pm", "reviewer"]
|
|
388
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
|
+
}
|
|
389
514
|
function resolveSkillForPopulation(skillId) {
|
|
390
515
|
const { skills } = matrix;
|
|
391
516
|
const skill = skills[skillId];
|
|
392
517
|
if (!skill?.category) {
|
|
393
|
-
warn(
|
|
394
|
-
`Installed skill '${skillId}' is not present in the loaded source \u2014 it may have been removed or renamed`
|
|
395
|
-
);
|
|
518
|
+
warn(absentFromSourceWarning(skillId));
|
|
396
519
|
return null;
|
|
397
520
|
}
|
|
398
521
|
const domain = getCategoryDomain(skill.category);
|
|
399
522
|
if (!domain) {
|
|
400
|
-
warn(
|
|
523
|
+
warn(unplaceableCategoryWarning(skillId, skill.category));
|
|
401
524
|
return null;
|
|
402
525
|
}
|
|
403
526
|
const subcat = skill.category;
|
|
@@ -410,17 +533,16 @@ function addToDomainSelections(selections, domain, category, skillId) {
|
|
|
410
533
|
skillList.push(skillId);
|
|
411
534
|
return true;
|
|
412
535
|
}
|
|
413
|
-
function marketplaceSourceName(skill) {
|
|
414
|
-
return skill.availableSources?.find((source) => source.type !== "local")?.name ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
415
|
-
}
|
|
416
536
|
function sourceForInstallMode(skill, mode) {
|
|
417
|
-
|
|
537
|
+
if (mode === "eject") return EJECT_SOURCE;
|
|
538
|
+
return marketplaceSourceName(skill) ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
418
539
|
}
|
|
419
|
-
function installModeOfSource(
|
|
420
|
-
return
|
|
540
|
+
function installModeOfSource(origin) {
|
|
541
|
+
return origin === EJECT_SOURCE ? "eject" : "plugin";
|
|
421
542
|
}
|
|
422
|
-
function buildInstallModeOptions(selectedMode) {
|
|
423
|
-
|
|
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 }));
|
|
424
546
|
}
|
|
425
547
|
function collectRemovedInstalledEntries(installedSkillConfigs, skillConfigs) {
|
|
426
548
|
if (!installedSkillConfigs) return [];
|
|
@@ -446,20 +568,20 @@ function resolveSkillRowInputs(id, skillConfigs) {
|
|
|
446
568
|
const skill = getSkillById(id);
|
|
447
569
|
const configEntry = skillConfigs.find((sc) => sc.id === skill.id);
|
|
448
570
|
const selectedSource = resolveEffectiveSource(
|
|
449
|
-
configEntry?.
|
|
571
|
+
configEntry?.origin,
|
|
450
572
|
skill.activeSource?.name,
|
|
451
573
|
primarySourceName(skill)
|
|
452
574
|
);
|
|
453
575
|
return {
|
|
454
576
|
skillId: skill.id,
|
|
455
577
|
configEntry,
|
|
456
|
-
options: buildInstallModeOptions(installModeOfSource(selectedSource))
|
|
578
|
+
options: buildInstallModeOptions(skill, installModeOfSource(selectedSource))
|
|
457
579
|
};
|
|
458
580
|
}
|
|
459
581
|
function toPendingRemovalRow(skillId, options, removedInstalledEntry) {
|
|
460
582
|
return {
|
|
461
583
|
skillId,
|
|
462
|
-
options: withSelectedMode(options, removedInstalledEntry.
|
|
584
|
+
options: withSelectedMode(options, removedInstalledEntry.origin),
|
|
463
585
|
scope: removedInstalledEntry.scope,
|
|
464
586
|
disabled: true
|
|
465
587
|
};
|
|
@@ -486,14 +608,14 @@ function classifySkillSourceRows(skillId, options, context) {
|
|
|
486
608
|
toLockedGlobalRow(
|
|
487
609
|
skillId,
|
|
488
610
|
options,
|
|
489
|
-
installedGlobalConfig?.
|
|
611
|
+
installedGlobalConfig?.origin ?? configEntry.origin,
|
|
490
612
|
installedSkillSlots
|
|
491
613
|
)
|
|
492
614
|
];
|
|
493
615
|
}
|
|
494
616
|
if (!isEditingFromGlobalScope && installedGlobalConfig && configEntry?.scope === "project") {
|
|
495
617
|
return [
|
|
496
|
-
toLockedGlobalRow(skillId, options, installedGlobalConfig.
|
|
618
|
+
toLockedGlobalRow(skillId, options, installedGlobalConfig.origin, installedSkillSlots),
|
|
497
619
|
{
|
|
498
620
|
skillId,
|
|
499
621
|
options,
|
|
@@ -565,6 +687,10 @@ var createInitialState = (overrides) => ({
|
|
|
565
687
|
history: [],
|
|
566
688
|
...overrides
|
|
567
689
|
});
|
|
690
|
+
function seedFocusForStep(step, actions) {
|
|
691
|
+
if (step === "build") actions.seedFocusedSkillForActiveDomain();
|
|
692
|
+
if (step === "agents") actions.seedFocusedAgent();
|
|
693
|
+
}
|
|
568
694
|
var useWizardStore = create((set, get) => ({
|
|
569
695
|
...createInitialState(),
|
|
570
696
|
setStep: (step) => {
|
|
@@ -572,7 +698,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
572
698
|
step,
|
|
573
699
|
history: [...state.history, state.step]
|
|
574
700
|
}));
|
|
575
|
-
|
|
701
|
+
seedFocusForStep(step, get());
|
|
576
702
|
},
|
|
577
703
|
setApproach: (approach) => set({ approach }),
|
|
578
704
|
selectStack: (stackId) => set({
|
|
@@ -626,7 +752,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
626
752
|
const skillConfigs = resolvedSkillIds.map(
|
|
627
753
|
(id) => buildSkillConfigForId(id, savedConfigs)
|
|
628
754
|
);
|
|
629
|
-
const excludedConfigs =
|
|
755
|
+
const excludedConfigs = skillTombstonesOutsideRebuild(savedConfigs ?? [], skillConfigs);
|
|
630
756
|
return {
|
|
631
757
|
domainSelections,
|
|
632
758
|
_stackDomainSelections: structuredClone(domainSelections),
|
|
@@ -774,7 +900,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
774
900
|
return {
|
|
775
901
|
skillConfigs: needsTombstone ? [
|
|
776
902
|
...rescoped,
|
|
777
|
-
{ id: skillId, scope: "global", excluded: true,
|
|
903
|
+
{ id: skillId, scope: "global", excluded: true, origin: config.origin }
|
|
778
904
|
] : rescoped
|
|
779
905
|
};
|
|
780
906
|
}
|
|
@@ -800,22 +926,19 @@ var useWizardStore = create((set, get) => ({
|
|
|
800
926
|
if (isInheritedGlobalSlot(state.installedSkillConfigs, skillId, scope) && !state.isEditingFromGlobalScope) {
|
|
801
927
|
return state;
|
|
802
928
|
}
|
|
803
|
-
const
|
|
929
|
+
const origin = sourceForInstallMode(getSkillById(skillId), mode);
|
|
804
930
|
return {
|
|
805
|
-
skillConfigs:
|
|
931
|
+
skillConfigs: withActiveEntryOrigin(state.skillConfigs, skillId, scope, origin)
|
|
806
932
|
};
|
|
807
933
|
}),
|
|
808
934
|
toggleInfo: () => set((state) => ({ showInfo: !state.showInfo })),
|
|
809
935
|
setToastMessage: (message) => set({ toastMessage: message }),
|
|
810
|
-
goBack: () =>
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
history
|
|
817
|
-
};
|
|
818
|
-
}),
|
|
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
|
+
},
|
|
819
942
|
toggleAgent: (agent) => set((state) => {
|
|
820
943
|
const installed = state.installedAgentConfigs ?? [];
|
|
821
944
|
const isDualScopePairRow = !state.isEditingFromGlobalScope && isDualScopeAgentPair(state.agentConfigs, agent);
|
|
@@ -858,6 +981,10 @@ var useWizardStore = create((set, get) => ({
|
|
|
858
981
|
return { agentConfigs: rescoped.filter((ac) => !(ac.name === agentName && ac.excluded)) };
|
|
859
982
|
}),
|
|
860
983
|
setFocusedAgentId: (id) => set({ focusedAgentId: id }),
|
|
984
|
+
seedFocusedAgent: () => {
|
|
985
|
+
if (get().focusedAgentId !== null) return;
|
|
986
|
+
set({ focusedAgentId: firstFocusableAgent() });
|
|
987
|
+
},
|
|
861
988
|
preselectAgentsFromDomains: () => set((state) => {
|
|
862
989
|
if (state.selectedStackId) return state;
|
|
863
990
|
const sorted = [
|
|
@@ -865,7 +992,10 @@ var useWizardStore = create((set, get) => ({
|
|
|
865
992
|
].sort();
|
|
866
993
|
const roster = new Set(sorted);
|
|
867
994
|
const merged = sorted.map((name) => buildAgentConfigForName(name, state.agentConfigs));
|
|
868
|
-
const
|
|
995
|
+
const rebuiltSlots = filledAgentSlots(merged);
|
|
996
|
+
const retained = state.agentConfigs.filter(
|
|
997
|
+
(ac) => survivesRosterRebuild(ac, roster, rebuiltSlots)
|
|
998
|
+
);
|
|
869
999
|
return {
|
|
870
1000
|
selectedAgents: sorted,
|
|
871
1001
|
agentConfigs: [...merged, ...retained]
|
|
@@ -876,7 +1006,7 @@ var useWizardStore = create((set, get) => ({
|
|
|
876
1006
|
const globalAgents = state.globalAgentPreselections?.agents ?? [];
|
|
877
1007
|
const mergedAgents = [.../* @__PURE__ */ new Set([...stackAgents, ...globalAgents])].sort();
|
|
878
1008
|
const merged = mergedAgents.map((name) => buildAgentConfigForName(name, savedConfigs));
|
|
879
|
-
const excludedConfigs =
|
|
1009
|
+
const excludedConfigs = agentTombstonesOutsideRebuild(savedConfigs, merged);
|
|
880
1010
|
return {
|
|
881
1011
|
selectedAgents: mergedAgents,
|
|
882
1012
|
agentConfigs: [...merged, ...excludedConfigs]
|
|
@@ -1028,10 +1158,13 @@ export {
|
|
|
1028
1158
|
deriveScopeBadges,
|
|
1029
1159
|
buildCategoriesForDomain,
|
|
1030
1160
|
orderDomains,
|
|
1161
|
+
BUILT_IN_AGENT_GROUPS,
|
|
1162
|
+
BUILT_IN_AGENT_IDS,
|
|
1163
|
+
DOMAIN_AGENTS,
|
|
1031
1164
|
WIZARD_STEP_ORDER,
|
|
1032
1165
|
getActiveStepFlow,
|
|
1033
1166
|
createInitialState,
|
|
1034
1167
|
useWizardStore,
|
|
1035
1168
|
hydrateWizardStore
|
|
1036
1169
|
};
|
|
1037
|
-
//# sourceMappingURL=chunk-
|
|
1170
|
+
//# sourceMappingURL=chunk-F5T6TV4Z.js.map
|