@canonical/pragma-cli 0.35.0 → 0.36.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/README.md +2 -2
- package/bundled-skills/add-standard/SKILL.md +338 -0
- package/bundled-skills/adoption-a1-styles/SKILL.md +269 -0
- package/bundled-skills/adoption-a2-components/SKILL.md +291 -0
- package/bundled-skills/adoption-a3-forms/SKILL.md +260 -0
- package/bundled-skills/anatomy-author/ANATOMY_DSL_SPEC.md +406 -0
- package/bundled-skills/anatomy-author/SKILL.md +1226 -0
- package/bundled-skills/design-auditor/SKILL.md +455 -0
- package/bundled-skills/implement-component/SKILL.md +333 -0
- package/bundled-skills/specify-component/SKILL.md +331 -0
- package/bundled-skills/specify-pattern/SKILL.md +292 -0
- package/dist/package.json +16 -15
- package/dist/pragma.conf.js +236 -34
- package/dist/pragma.conf.js.map +1 -1
- package/dist/src/bin.js +1 -1
- package/dist/src/bin.js.map +1 -1
- package/dist/src/capabilities/colophon/colophon.render.js +1 -1
- package/dist/src/capabilities/colophon/colophon.render.js.map +1 -1
- package/dist/src/capabilities/create/mount.js +4 -3
- package/dist/src/capabilities/create/mount.js.map +1 -1
- package/dist/src/capabilities/doctor/checks/checkPackageRefs.js +60 -4
- package/dist/src/capabilities/doctor/checks/checkPackageRefs.js.map +1 -1
- package/dist/src/capabilities/doctor/checks/checkShellCompletions.js +8 -8
- package/dist/src/capabilities/doctor/checks/checkShellCompletions.js.map +1 -1
- package/dist/src/capabilities/doctor/checks/harnessInventory.js +195 -0
- package/dist/src/capabilities/doctor/checks/harnessInventory.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/index.js +6 -6
- package/dist/src/capabilities/doctor/checks/targetHealth.js +194 -50
- package/dist/src/capabilities/doctor/checks/targetHealth.js.map +1 -1
- package/dist/src/capabilities/doctor/doctor.render.js +43 -64
- package/dist/src/capabilities/doctor/doctor.render.js.map +1 -1
- package/dist/src/capabilities/doctor/doctor.verb.js +6 -2
- package/dist/src/capabilities/doctor/doctor.verb.js.map +1 -1
- package/dist/src/capabilities/doctor/runChecks.js +14 -11
- package/dist/src/capabilities/doctor/runChecks.js.map +1 -1
- package/dist/src/capabilities/graph/query.render.js +2 -2
- package/dist/src/capabilities/graph/query.render.js.map +1 -1
- package/dist/src/capabilities/info/collectInfo.js +8 -2
- package/dist/src/capabilities/info/collectInfo.js.map +1 -1
- package/dist/src/capabilities/info/info.render.js +6 -2
- package/dist/src/capabilities/info/info.render.js.map +1 -1
- package/dist/src/capabilities/prompt/prompt.render.js +2 -2
- package/dist/src/capabilities/prompt/prompt.render.js.map +1 -1
- package/dist/src/capabilities/setup/buildPlan.js +43 -39
- package/dist/src/capabilities/setup/buildPlan.js.map +1 -1
- package/dist/src/capabilities/setup/mode.js +2 -2
- package/dist/src/capabilities/setup/operations/index.js +4 -4
- package/dist/src/capabilities/setup/operations/index.js.map +1 -1
- package/dist/src/capabilities/setup/operations/setupGenerator.js +92 -45
- package/dist/src/capabilities/setup/operations/setupGenerator.js.map +1 -1
- package/dist/src/capabilities/setup/operations/setupLsp.js +88 -36
- package/dist/src/capabilities/setup/operations/setupLsp.js.map +1 -1
- package/dist/src/capabilities/setup/operations/setupMcp.js +97 -51
- package/dist/src/capabilities/setup/operations/setupMcp.js.map +1 -1
- package/dist/src/capabilities/setup/operations/setupSkills.js +325 -47
- package/dist/src/capabilities/setup/operations/setupSkills.js.map +1 -1
- package/dist/src/capabilities/setup/plan.js.map +1 -1
- package/dist/src/capabilities/setup/plan.render.js +144 -66
- package/dist/src/capabilities/setup/plan.render.js.map +1 -1
- package/dist/src/capabilities/setup/setup.render.js +1 -1
- package/dist/src/capabilities/setup/setup.verb.js +86 -33
- package/dist/src/capabilities/setup/setup.verb.js.map +1 -1
- package/dist/src/capabilities/setup/targets.js +110 -45
- package/dist/src/capabilities/setup/targets.js.map +1 -1
- package/dist/src/capabilities/shared/index.js +6 -5
- package/dist/src/capabilities/shared/index.js.map +1 -1
- package/dist/src/capabilities/shared/packageManager.js +300 -54
- package/dist/src/capabilities/shared/packageManager.js.map +1 -1
- package/dist/src/capabilities/skill/discover.js +97 -11
- package/dist/src/capabilities/skill/discover.js.map +1 -1
- package/dist/src/capabilities/skill/render.js +2 -2
- package/dist/src/capabilities/skill/render.js.map +1 -1
- package/dist/src/capabilities/sources/installSkills.js +145 -3
- package/dist/src/capabilities/sources/installSkills.js.map +1 -1
- package/dist/src/capabilities/sources/runUpdate.js +68 -2
- package/dist/src/capabilities/sources/runUpdate.js.map +1 -1
- package/dist/src/capabilities/sources/update.verb.js +3 -3
- package/dist/src/capabilities/sources/update.verb.js.map +1 -1
- package/dist/src/capabilities/upgrade/runUpgrade.js +43 -7
- package/dist/src/capabilities/upgrade/runUpgrade.js.map +1 -1
- package/dist/src/capabilities/upgrade/upgrade.render.js +10 -2
- package/dist/src/capabilities/upgrade/upgrade.render.js.map +1 -1
- package/dist/src/constants.js +6 -1
- package/dist/src/constants.js.map +1 -1
- package/dist/src/kernel/index.js +11 -2
- package/dist/src/kernel/index.js.map +1 -1
- package/dist/src/kernel/interactivity.js +68 -0
- package/dist/src/kernel/interactivity.js.map +1 -0
- package/dist/src/kernel/packs/renderPack.js +3 -3
- package/dist/src/kernel/packs/renderPack.js.map +1 -1
- package/dist/src/kernel/packs/resolveEntity.js +63 -12
- package/dist/src/kernel/packs/resolveEntity.js.map +1 -1
- package/dist/src/kernel/packs/runBodies.js +57 -4
- package/dist/src/kernel/packs/runBodies.js.map +1 -1
- package/dist/src/kernel/packs/schema.js +54 -2
- package/dist/src/kernel/packs/schema.js.map +1 -1
- package/dist/src/kernel/packs/sparql/applyFilters.js +104 -5
- package/dist/src/kernel/packs/sparql/applyFilters.js.map +1 -1
- package/dist/src/kernel/packs/sparql/buildLookupQuery.js +306 -43
- package/dist/src/kernel/packs/sparql/buildLookupQuery.js.map +1 -1
- package/dist/src/kernel/packs/types.js.map +1 -1
- package/dist/src/kernel/project/cli/buildProgram.js +1 -1
- package/dist/src/kernel/project/cli/buildProgram.js.map +1 -1
- package/dist/src/kernel/project/cli/dispatch.js +23 -23
- package/dist/src/kernel/project/cli/dispatch.js.map +1 -1
- package/dist/src/kernel/project/cli/globalFlags.js +4 -1
- package/dist/src/kernel/project/cli/globalFlags.js.map +1 -1
- package/dist/src/kernel/project/cli/helpFormat.js +1 -2
- package/dist/src/kernel/project/cli/helpFormat.js.map +1 -1
- package/dist/src/kernel/project/cli/rootHelp.js +34 -4
- package/dist/src/kernel/project/cli/rootHelp.js.map +1 -1
- package/dist/src/kernel/project/mcp/registerVerb.js +16 -1
- package/dist/src/kernel/project/mcp/registerVerb.js.map +1 -1
- package/dist/src/kernel/render/renderers.js +1 -1
- package/dist/src/kernel/render/style.js +29 -9
- package/dist/src/kernel/render/style.js.map +1 -1
- package/dist/src/kernel/render/vocabulary.js +174 -0
- package/dist/src/kernel/render/vocabulary.js.map +1 -0
- package/dist/src/kernel/spec/emitReference.js +1 -1
- package/dist/src/kernel/spec/emitReference.js.map +1 -1
- package/package.json +16 -15
- package/pragma.conf.ts +241 -34
- package/src/bin.ts +8 -1
- package/src/capabilities/block.parity.test.ts +25 -11
- package/src/capabilities/block.shipped.exec.test.ts +282 -0
- package/src/capabilities/block.tierRank.exec.test.ts +300 -0
- package/src/capabilities/colophon/colophon.render.ts +1 -2
- package/src/capabilities/colophon/colophon.test.ts +2 -2
- package/src/capabilities/create/createGrammar.test.ts +1 -1
- package/src/capabilities/create/mount.ts +3 -3
- package/src/capabilities/distribution.parity.test.ts +4 -0
- package/src/capabilities/doctor/checks/checkPackageRefs.ts +69 -4
- package/src/capabilities/doctor/checks/checkShellCompletions.test.ts +6 -4
- package/src/capabilities/doctor/checks/checkShellCompletions.ts +8 -8
- package/src/capabilities/doctor/checks/harnessInventory.test.ts +219 -0
- package/src/capabilities/doctor/checks/harnessInventory.ts +298 -0
- package/src/capabilities/doctor/checks/index.ts +6 -6
- package/src/capabilities/doctor/checks/targetHealth.ts +229 -59
- package/src/capabilities/doctor/doctor.render.test.ts +108 -32
- package/src/capabilities/doctor/doctor.render.ts +56 -80
- package/src/capabilities/doctor/doctor.test.ts +247 -35
- package/src/capabilities/doctor/doctor.verb.ts +7 -2
- package/src/capabilities/doctor/runChecks.ts +14 -11
- package/src/capabilities/doctor/types.ts +15 -24
- package/src/capabilities/emptyRecovery.test.ts +10 -2
- package/src/capabilities/graph/query.render.ts +2 -2
- package/src/capabilities/info/collectInfo.ts +8 -1
- package/src/capabilities/info/info.render.ts +6 -2
- package/src/capabilities/info/info.test.ts +37 -1
- package/src/capabilities/info/types.ts +10 -2
- package/src/capabilities/prompt/prompt.render.ts +2 -2
- package/src/capabilities/renderVocabularySync.test.ts +82 -0
- package/src/capabilities/scopeTypeSync.test.ts +29 -15
- package/src/capabilities/setup/buildPlan.ts +45 -41
- package/src/capabilities/setup/index.ts +1 -1
- package/src/capabilities/setup/mode.ts +2 -2
- package/src/capabilities/setup/operations/index.ts +6 -1
- package/src/capabilities/setup/operations/setupGenerator.ts +144 -70
- package/src/capabilities/setup/operations/setupLsp.ts +129 -37
- package/src/capabilities/setup/operations/setupMcp.ts +132 -61
- package/src/capabilities/setup/operations/setupSkills.ts +392 -58
- package/src/capabilities/setup/plan.render.ts +171 -76
- package/src/capabilities/setup/plan.ts +17 -12
- package/src/capabilities/setup/setup.mcp.correctness.test.ts +9 -9
- package/src/capabilities/setup/setup.render.test.ts +50 -36
- package/src/capabilities/setup/setup.render.ts +1 -1
- package/src/capabilities/setup/setup.test.ts +881 -50
- package/src/capabilities/setup/setup.verb.ts +91 -33
- package/src/capabilities/setup/targets.ts +120 -52
- package/src/capabilities/setup/types.ts +10 -18
- package/src/capabilities/shared/index.ts +17 -6
- package/src/capabilities/shared/packageManager.test.ts +421 -6
- package/src/capabilities/shared/packageManager.ts +394 -59
- package/src/capabilities/skill/bundledSkills.test.ts +347 -0
- package/src/capabilities/skill/discover.ts +100 -11
- package/src/capabilities/skill/render.ts +2 -2
- package/src/capabilities/skill/skill.test.ts +17 -4
- package/src/capabilities/sources/installSkills.ts +181 -3
- package/src/capabilities/sources/runUpdate.ts +78 -2
- package/src/capabilities/sources/sources.test.ts +228 -0
- package/src/capabilities/sources/update.verb.ts +3 -3
- package/src/capabilities/surface.test.ts +2 -2
- package/src/capabilities/upgrade/runUpgrade.ts +45 -6
- package/src/capabilities/upgrade/types.ts +10 -2
- package/src/capabilities/upgrade/upgrade.render.ts +9 -2
- package/src/capabilities/upgrade/upgrade.test.ts +72 -0
- package/src/constants.ts +6 -1
- package/src/identity.test.ts +18 -5
- package/src/kernel/completion/entitySource.test.ts +15 -2
- package/src/kernel/completion/safety.test.ts +16 -9
- package/src/kernel/config/defaults.test.ts +2 -1
- package/src/kernel/index.ts +11 -2
- package/src/kernel/interactivity.test.ts +76 -0
- package/src/kernel/interactivity.ts +69 -0
- package/src/kernel/packs/compile.test.ts +92 -0
- package/src/kernel/packs/renderPack.ts +3 -3
- package/src/kernel/packs/resolveEntity.test.ts +75 -14
- package/src/kernel/packs/resolveEntity.ts +88 -24
- package/src/kernel/packs/runBodies.ts +84 -19
- package/src/kernel/packs/schema.ts +60 -4
- package/src/kernel/packs/sparql/applyFilters.ts +125 -4
- package/src/kernel/packs/sparql/buildLookupQuery.test.ts +290 -0
- package/src/kernel/packs/sparql/buildLookupQuery.ts +323 -45
- package/src/kernel/packs/toolDescription.test.ts +35 -1
- package/src/kernel/packs/types.ts +125 -2
- package/src/kernel/project/cli/buildProgram.test.ts +73 -2
- package/src/kernel/project/cli/buildProgram.ts +8 -1
- package/src/kernel/project/cli/dispatch.test.ts +5 -4
- package/src/kernel/project/cli/dispatch.ts +25 -24
- package/src/kernel/project/cli/globalFlags.ts +4 -1
- package/src/kernel/project/cli/helpFormat.ts +1 -2
- package/src/kernel/project/cli/rootHelp.ts +36 -3
- package/src/kernel/project/mcp/registerVerb.ts +20 -1
- package/src/kernel/render/renderers.ts +1 -1
- package/src/kernel/render/style.ts +32 -9
- package/src/kernel/render/vocabulary.ts +276 -0
- package/src/kernel/spec/emitReference.ts +1 -1
- package/src/kernel/spec/types.ts +35 -6
- package/src/testing/PARITY_GAPS.ts +9 -3
- package/src/testing/behavioral/docExamples.test.ts +4 -2
- package/src/testing/behavioral/errorMatrix.mcp.test.ts +110 -7
- package/src/testing/behavioral/journeys.firstInstall.test.ts +7 -2
- package/src/testing/behavioral/journeys.packageStories.test.ts +6 -3
- package/src/testing/eval/__snapshots__/eval.test.ts.snap +26 -1
- package/src/testing/eval/cases/readNouns.ts +245 -9
- package/src/testing/fixtures/blockGraph.ts +28 -13
- package/src/testing/fixtures/graph/canonical.ts +95 -12
- package/dist/src/capabilities/shared/bands.js +0 -16
- package/dist/src/capabilities/shared/bands.js.map +0 -1
- package/src/capabilities/shared/bands.ts +0 -16
|
@@ -25,25 +25,25 @@ import { PREVIEW_HINT, renderDryRun, setupFormatters } from "./setup.render.js";
|
|
|
25
25
|
|
|
26
26
|
const ROOTS = { global: "/home/u", project: "/home/u/src/app" };
|
|
27
27
|
|
|
28
|
-
/** The five rows a first global
|
|
28
|
+
/** The five rows a first global run produces on a machine with no editor. */
|
|
29
29
|
const ROWS: PlanRow[] = [
|
|
30
30
|
{
|
|
31
31
|
target: "config",
|
|
32
|
-
|
|
32
|
+
scope: "global",
|
|
33
33
|
action: "none",
|
|
34
34
|
detail: "~/.config/pragma/config.json — present",
|
|
35
35
|
selected: false,
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
target: "completions",
|
|
39
|
-
|
|
39
|
+
scope: "global",
|
|
40
40
|
action: "install",
|
|
41
41
|
detail: "bash → ~/.local/share/bash-completion/completions/pragma",
|
|
42
42
|
selected: true,
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
target: "lsp",
|
|
46
|
-
|
|
46
|
+
scope: "global",
|
|
47
47
|
action: "skip",
|
|
48
48
|
detail:
|
|
49
49
|
"no VS Code-family editor CLI on PATH (code, codium, cursor, windsurf)",
|
|
@@ -53,9 +53,9 @@ const ROWS: PlanRow[] = [
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
target: "mcp",
|
|
56
|
-
|
|
56
|
+
scope: "global",
|
|
57
57
|
action: "update",
|
|
58
|
-
detail: "2 files",
|
|
58
|
+
detail: "2 config files",
|
|
59
59
|
children: [
|
|
60
60
|
{ key: "/home/u/.claude.json", label: "~/.claude.json", action: "add" },
|
|
61
61
|
{
|
|
@@ -68,9 +68,9 @@ const ROWS: PlanRow[] = [
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
target: "skills",
|
|
71
|
-
|
|
71
|
+
scope: "global",
|
|
72
72
|
action: "link",
|
|
73
|
-
detail: "2 skills → 2
|
|
73
|
+
detail: "2 skills → 2 folders (~/.claude/skills, ~/.agents/skills)",
|
|
74
74
|
selected: true,
|
|
75
75
|
},
|
|
76
76
|
];
|
|
@@ -103,19 +103,28 @@ const APPLIED: SetupPlan = {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
describe("the setup plan renders as one table", () => {
|
|
106
|
-
it("names the
|
|
106
|
+
it("names the scope and both roots once, then one row per target", () => {
|
|
107
107
|
// The header carries the roots so no row repeats an absolute prefix, and
|
|
108
108
|
// EVERY target is a row — including the one that will skip, which is the
|
|
109
109
|
// whole point: a target that cannot be offered is named, not omitted.
|
|
110
|
+
//
|
|
111
|
+
// The middle column is a column of VERBS. Three things are pinned here that
|
|
112
|
+
// it used to get wrong: `mcp` reads `install` rather than `2 files` (a count
|
|
113
|
+
// is not an action, and the row-level token `update` disagreed with every
|
|
114
|
+
// one of its own `(add)` children); a row whose children all do the same
|
|
115
|
+
// thing prints their labels bare, because the verb has already said what
|
|
116
|
+
// happens to them; and the two quiet outcomes are told apart in words —
|
|
117
|
+
// `no change` for something already correct, `nothing to do` for something
|
|
118
|
+
// there is nothing to act on — with the reason beside each.
|
|
110
119
|
expect(renderPlanTable(PLAN, { lead: "Setup plan" })).toBe(
|
|
111
120
|
[
|
|
112
|
-
"Setup plan — global
|
|
121
|
+
"Setup plan — global (home: ~ · project: ~/src/app)",
|
|
113
122
|
"",
|
|
114
|
-
" config
|
|
115
|
-
" completions install
|
|
116
|
-
" lsp
|
|
117
|
-
" mcp
|
|
118
|
-
" skills link
|
|
123
|
+
" config no change ~/.config/pragma/config.json — present",
|
|
124
|
+
" completions install bash → ~/.local/share/bash-completion/completions/pragma",
|
|
125
|
+
" lsp nothing to do no VS Code-family editor CLI on PATH (code, codium, cursor, windsurf)",
|
|
126
|
+
" mcp install ~/.claude.json · ~/.codeium/windsurf/mcp_config.json",
|
|
127
|
+
" skills link 2 skills → 2 folders (~/.claude/skills, ~/.agents/skills)",
|
|
119
128
|
].join("\n"),
|
|
120
129
|
);
|
|
121
130
|
});
|
|
@@ -133,11 +142,11 @@ describe("the setup plan renders as one table", () => {
|
|
|
133
142
|
|
|
134
143
|
it("a non-interactive run without consent previews and says so", () => {
|
|
135
144
|
const preview = setupFormatters.plain({ ...PLAN, preview: true });
|
|
136
|
-
expect(preview).toContain("Setup plan — global
|
|
145
|
+
expect(preview).toContain("Setup plan — global");
|
|
137
146
|
expect(preview.endsWith(`\n\n${PREVIEW_HINT}`)).toBe(true);
|
|
138
147
|
});
|
|
139
148
|
|
|
140
|
-
it("groups the rows under
|
|
149
|
+
it("groups the rows under scope headings when a run covers both", () => {
|
|
141
150
|
const both: SetupPlan = {
|
|
142
151
|
scope: "both",
|
|
143
152
|
roots: ROOTS,
|
|
@@ -145,19 +154,21 @@ describe("the setup plan renders as one table", () => {
|
|
|
145
154
|
ROWS[3] as PlanRow,
|
|
146
155
|
{
|
|
147
156
|
target: "mcp",
|
|
148
|
-
|
|
157
|
+
scope: "project",
|
|
149
158
|
action: "skip",
|
|
150
|
-
detail: "no harness
|
|
151
|
-
reason:
|
|
152
|
-
"no AI harness in this project writes a per-repository config",
|
|
159
|
+
detail: "no AI harness in this project keeps a per-project config",
|
|
160
|
+
reason: "no AI harness in this project keeps a per-project config",
|
|
153
161
|
selected: false,
|
|
154
162
|
},
|
|
155
163
|
],
|
|
156
164
|
};
|
|
157
165
|
const out = renderPlanTable(both, { lead: "Setup plan" });
|
|
158
166
|
expect(out).toContain("Global");
|
|
159
|
-
expect(out).toContain("
|
|
160
|
-
expect(out).toContain("
|
|
167
|
+
expect(out).toContain("Local project");
|
|
168
|
+
expect(out).toContain("global and local project");
|
|
169
|
+
// "band" was the type layer's word for this partition; the vocabulary
|
|
170
|
+
// retired it, and it may not return through any of the three renders.
|
|
171
|
+
expect(out).not.toMatch(/\bbands?\b/);
|
|
161
172
|
});
|
|
162
173
|
});
|
|
163
174
|
|
|
@@ -165,15 +176,15 @@ describe("the recap is the plan replayed", () => {
|
|
|
165
176
|
it("counts the rows it took responsibility for and carries each row's outcome", () => {
|
|
166
177
|
expect(renderRecap(APPLIED)).toBe(
|
|
167
178
|
[
|
|
168
|
-
"Setup: 4 of 4 targets configured — global
|
|
179
|
+
"Setup: 4 of 4 targets configured — global",
|
|
169
180
|
" ✓ config ~/.config/pragma/config.json — present",
|
|
170
181
|
" ✓ completions bash → ~/.local/share/bash-completion/completions/pragma — installed",
|
|
171
|
-
" ○ lsp skipped
|
|
182
|
+
" ○ lsp skipped: no VS Code-family editor CLI on PATH (code, codium, cursor, windsurf)",
|
|
172
183
|
" no action is possible on this machine yet — install VS Code or VSCodium, then run this again",
|
|
173
|
-
" ✓ mcp 2 files — 2 added",
|
|
174
|
-
" ✓ skills 2 skills → 2
|
|
184
|
+
" ✓ mcp 2 config files — 2 added",
|
|
185
|
+
" ✓ skills 2 skills → 2 folders (~/.claude/skills, ~/.agents/skills) — linked",
|
|
175
186
|
"",
|
|
176
|
-
"
|
|
187
|
+
"Check this again any time with `pragma doctor`.",
|
|
177
188
|
].join("\n"),
|
|
178
189
|
);
|
|
179
190
|
});
|
|
@@ -181,7 +192,7 @@ describe("the recap is the plan replayed", () => {
|
|
|
181
192
|
it("a skip carries its reason and never counts as a failure", () => {
|
|
182
193
|
const lsp = APPLIED.rows.find((row) => row.target === "lsp") as PlanRow;
|
|
183
194
|
expect(renderProgressLine(lsp, 11)).toBe(
|
|
184
|
-
"○ lsp skipped
|
|
195
|
+
"○ lsp skipped: no VS Code-family editor CLI on PATH (code, codium, cursor, windsurf)",
|
|
185
196
|
);
|
|
186
197
|
});
|
|
187
198
|
|
|
@@ -200,7 +211,7 @@ describe("a row that did not run never renders as one that did", () => {
|
|
|
200
211
|
// "Setup complete" over a target it had quietly dropped.
|
|
201
212
|
const row: PlanRow = {
|
|
202
213
|
target: "mcp",
|
|
203
|
-
|
|
214
|
+
scope: "global",
|
|
204
215
|
action: "update",
|
|
205
216
|
detail: "1 file",
|
|
206
217
|
selected: false,
|
|
@@ -218,7 +229,7 @@ describe("a row that did not run never renders as one that did", () => {
|
|
|
218
229
|
rows: [
|
|
219
230
|
{
|
|
220
231
|
target: "config",
|
|
221
|
-
|
|
232
|
+
scope: "global",
|
|
222
233
|
action: "none",
|
|
223
234
|
detail: "~/.config/pragma/config.json — present",
|
|
224
235
|
selected: false,
|
|
@@ -235,7 +246,7 @@ describe("a row that did not run never renders as one that did", () => {
|
|
|
235
246
|
it("a failed row carries the failure glyph and its remedy", () => {
|
|
236
247
|
const failed: PlanRow = {
|
|
237
248
|
target: "lsp",
|
|
238
|
-
|
|
249
|
+
scope: "global",
|
|
239
250
|
action: "install",
|
|
240
251
|
detail: "via code",
|
|
241
252
|
selected: true,
|
|
@@ -261,14 +272,17 @@ describe("a row that did not run never renders as one that did", () => {
|
|
|
261
272
|
});
|
|
262
273
|
|
|
263
274
|
describe("the machine-readable projections carry the same rows", () => {
|
|
264
|
-
it("json is the plan round-tripped,
|
|
275
|
+
it("json is the plan round-tripped, scope and all", () => {
|
|
265
276
|
expect(JSON.parse(setupFormatters.json(APPLIED))).toEqual(APPLIED);
|
|
277
|
+
// The type-layer rename reaches the machine surface too: the model is
|
|
278
|
+
// emitted verbatim, so the retired word cannot survive as a JSON key.
|
|
279
|
+
expect(setupFormatters.json(APPLIED)).not.toMatch(/\bbands?\b/);
|
|
266
280
|
});
|
|
267
281
|
|
|
268
|
-
it("llm names every row with its
|
|
282
|
+
it("llm names every row with its scope and state", () => {
|
|
269
283
|
const out = setupFormatters.llm(APPLIED);
|
|
270
284
|
for (const row of APPLIED.rows) {
|
|
271
|
-
expect(out).toContain(`**${row.target}** (${row.
|
|
285
|
+
expect(out).toContain(`**${row.target}** (${row.scope})`);
|
|
272
286
|
}
|
|
273
287
|
});
|
|
274
288
|
});
|
|
@@ -292,7 +306,7 @@ describe("shortenPath — containment, on the host's own separator", () => {
|
|
|
292
306
|
expect(shortenPath(roots.project, roots)).toBe(".");
|
|
293
307
|
});
|
|
294
308
|
|
|
295
|
-
it("renders a global-
|
|
309
|
+
it("renders a global-scope path under `~`", () => {
|
|
296
310
|
expect(shortenPath(join(roots.global, ".config", "x.json"), roots)).toBe(
|
|
297
311
|
`~${sep}${join(".config", "x.json")}`,
|
|
298
312
|
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The plan REPLACED a tagged result union with one member per sub-verb, each
|
|
6
6
|
* rendering its own sentence in its own vocabulary. That union could not
|
|
7
|
-
* describe a run that touched several targets in two
|
|
7
|
+
* describe a run that touched several targets in two scopes, so the run-all
|
|
8
8
|
* reported a list of step names and nothing about what any of them did. One
|
|
9
9
|
* structure with one renderer is what makes the preview, the progress lines and
|
|
10
10
|
* the recap agree by construction rather than by review.
|