agents-inc 0.156.0 → 0.158.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 +51 -0
- package/dist/{chunk-4A4L3YIW.js → chunk-2PN4QXON.js} +6 -7
- package/dist/chunk-2PN4QXON.js.map +1 -0
- package/dist/{chunk-QWVXOCXO.js → chunk-3NBXQSW2.js} +7 -9
- package/dist/{chunk-QWVXOCXO.js.map → chunk-3NBXQSW2.js.map} +1 -1
- package/dist/{chunk-WCAUUBHO.js → chunk-3PJLLBUS.js} +14597 -14536
- package/dist/chunk-3PJLLBUS.js.map +1 -0
- package/dist/{chunk-6RLV45HN.js → chunk-3Q2N7CSY.js} +6 -6
- package/dist/chunk-3Q2N7CSY.js.map +1 -0
- package/dist/{chunk-LJCNUP6M.js → chunk-4ABNXKAR.js} +2 -2
- package/dist/{chunk-D2CAV7MG.js → chunk-4DMFK67G.js} +2 -2
- package/dist/{chunk-MO5FGLVS.js → chunk-54QLV3OH.js} +11 -12
- package/dist/chunk-54QLV3OH.js.map +1 -0
- package/dist/{chunk-5F2YR5XV.js → chunk-6DBE562W.js} +15 -5
- package/dist/chunk-6DBE562W.js.map +1 -0
- package/dist/{chunk-RWOYPOMR.js → chunk-7Z4N4JWQ.js} +19 -245
- package/dist/chunk-7Z4N4JWQ.js.map +1 -0
- package/dist/{chunk-H6UTKTLK.js → chunk-DAUY2SB3.js} +98 -34
- package/dist/chunk-DAUY2SB3.js.map +1 -0
- package/dist/{chunk-2H7UWE2G.js → chunk-DP6YQFVO.js} +13 -12
- package/dist/chunk-DP6YQFVO.js.map +1 -0
- package/dist/{chunk-ILUVL7WM.js → chunk-DZD25NHW.js} +2 -2
- package/dist/{chunk-PCC4LBKB.js → chunk-EEAX7E2X.js} +2 -2
- package/dist/{chunk-IO5YBKHV.js → chunk-G6G2FT2G.js} +10 -8
- package/dist/chunk-G6G2FT2G.js.map +1 -0
- package/dist/{chunk-5QZAK6J7.js → chunk-H25VRR2T.js} +50 -18
- package/dist/chunk-H25VRR2T.js.map +1 -0
- package/dist/chunk-H2DHTJKW.js +1352 -0
- package/dist/chunk-H2DHTJKW.js.map +1 -0
- package/dist/{chunk-MHRC3KRX.js → chunk-H4CL23HG.js} +3 -3
- package/dist/chunk-H4CL23HG.js.map +1 -0
- package/dist/{chunk-F5T6TV4Z.js → chunk-IK6YOXZH.js} +40 -14
- package/dist/chunk-IK6YOXZH.js.map +1 -0
- package/dist/{chunk-HG4JPXJT.js → chunk-JG3B47P3.js} +23 -10
- package/dist/chunk-JG3B47P3.js.map +1 -0
- package/dist/{chunk-SY4X2LND.js → chunk-KUZBMEWR.js} +3 -3
- package/dist/{chunk-5OKLCVM4.js → chunk-KVVXINCJ.js} +3 -3
- package/dist/{chunk-PNMM5HNX.js → chunk-L4FHSOL5.js} +9 -10
- package/dist/chunk-L4FHSOL5.js.map +1 -0
- package/dist/{chunk-PMUABBPG.js → chunk-LKI3ENGQ.js} +9 -13
- package/dist/chunk-LKI3ENGQ.js.map +1 -0
- package/dist/{chunk-CLFHC2DK.js → chunk-OQB2CKBT.js} +17 -18
- package/dist/chunk-OQB2CKBT.js.map +1 -0
- package/dist/{chunk-HXKOIWLU.js → chunk-P6OKOH62.js} +2 -6
- package/dist/chunk-P6OKOH62.js.map +1 -0
- package/dist/{chunk-TNGMF4UX.js → chunk-PNRLBPGS.js} +12 -12
- package/dist/chunk-PNRLBPGS.js.map +1 -0
- package/dist/{chunk-Y5Y7XHVU.js → chunk-PZNXBORZ.js} +4 -4
- package/dist/{chunk-HTYH7CKN.js → chunk-Q7CAE5NN.js} +3 -3
- package/dist/{chunk-G47TDUK3.js → chunk-QNAMXQKF.js} +2 -2
- package/dist/{chunk-GS2NZ3GD.js → chunk-SJ4T5YLG.js} +5 -5
- package/dist/chunk-SJ4T5YLG.js.map +1 -0
- package/dist/{chunk-UMH2YZKG.js → chunk-TPQ5M3BW.js} +4 -6
- package/dist/{chunk-UMH2YZKG.js.map → chunk-TPQ5M3BW.js.map} +1 -1
- package/dist/{chunk-4G2YHZIM.js → chunk-TUXXBEBB.js} +4 -6
- package/dist/{chunk-4G2YHZIM.js.map → chunk-TUXXBEBB.js.map} +1 -1
- package/dist/{chunk-WFRTHH3A.js → chunk-TZRXWFF5.js} +3 -3
- package/dist/{chunk-TBOVYLQJ.js → chunk-VTIDLRNA.js} +2 -2
- package/dist/{chunk-OKH64JZE.js → chunk-WCZNQECQ.js} +2 -2
- package/dist/{chunk-ZUAZHDKP.js → chunk-WMVOJY6V.js} +277 -40
- package/dist/chunk-WMVOJY6V.js.map +1 -0
- package/dist/{chunk-YO2LTXB4.js → chunk-X52QUV4U.js} +115 -10
- package/dist/chunk-X52QUV4U.js.map +1 -0
- package/dist/{chunk-IXRZAHZF.js → chunk-XNYHMRVJ.js} +4 -4
- package/dist/{chunk-VPASBA7P.js → chunk-YXI3BTQQ.js} +2 -2
- package/dist/commands/build/marketplace.js +9 -12
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +9 -12
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/compile.js +15 -19
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.js +75 -54
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +154 -109
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +68 -38
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/init.js +36 -39
- package/dist/commands/list.js +8 -10
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/marketplace.js +8 -11
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/search.js +10 -13
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/share.js +8 -10
- package/dist/commands/share.js.map +1 -1
- package/dist/commands/uninstall.js +39 -28
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +7 -10
- package/dist/commands/update.js.map +1 -1
- package/dist/components/common/removal-plan-confirm.js +2 -2
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/wizard/category-grid.js +4 -5
- package/dist/components/wizard/checkbox-grid.js +4 -4
- package/dist/components/wizard/domain-selection.js +9 -11
- package/dist/components/wizard/run-wizard-session.js +26 -28
- package/dist/components/wizard/scroll-affordance.js +2 -2
- package/dist/components/wizard/skill-agent-summary.js +5 -7
- package/dist/components/wizard/source-grid.js +5 -6
- package/dist/components/wizard/stack-selection.js +7 -9
- package/dist/components/wizard/step-agents.js +8 -10
- package/dist/components/wizard/step-build.js +7 -9
- package/dist/components/wizard/step-confirm.js +9 -11
- package/dist/components/wizard/step-sources.js +8 -10
- package/dist/components/wizard/step-stack.js +8 -10
- package/dist/components/wizard/summary-panel.js +8 -10
- package/dist/components/wizard/toast.js +2 -2
- package/dist/components/wizard/wizard-layout.js +12 -14
- package/dist/components/wizard/wizard-tabs.js +2 -4
- package/dist/components/wizard/wizard.js +25 -27
- package/dist/hooks/init.js +36 -39
- package/dist/hooks/init.js.map +1 -1
- package/dist/load-agent-defs-2VYAV5GL.js +13 -0
- package/dist/recompile-project-agents-NG5DCPHJ.js +17 -0
- package/dist/{source-loader-3DL3NYUX.js → source-loader-CO2FZ3OO.js} +4 -8
- package/dist/src/agents/_templates/agent.liquid +2 -2
- package/dist/stores/wizard-store.js +6 -6
- package/package.json +2 -4
- package/src/agents/_templates/agent.liquid +2 -2
- package/src/schemas/custom-metadata.schema.json +1 -1
- package/src/schemas/marketplace.schema.json +2 -1
- package/dist/chunk-2H7UWE2G.js.map +0 -1
- package/dist/chunk-4A4L3YIW.js.map +0 -1
- package/dist/chunk-5F2YR5XV.js.map +0 -1
- package/dist/chunk-5QZAK6J7.js.map +0 -1
- package/dist/chunk-6RLV45HN.js.map +0 -1
- package/dist/chunk-CLFHC2DK.js.map +0 -1
- package/dist/chunk-F2AMBBIA.js +0 -64
- package/dist/chunk-F2AMBBIA.js.map +0 -1
- package/dist/chunk-F5T6TV4Z.js.map +0 -1
- package/dist/chunk-GS2NZ3GD.js.map +0 -1
- package/dist/chunk-H6UTKTLK.js.map +0 -1
- package/dist/chunk-HG4JPXJT.js.map +0 -1
- package/dist/chunk-HXKOIWLU.js.map +0 -1
- package/dist/chunk-IO5YBKHV.js.map +0 -1
- package/dist/chunk-MHRC3KRX.js.map +0 -1
- package/dist/chunk-MO5FGLVS.js.map +0 -1
- package/dist/chunk-PMUABBPG.js.map +0 -1
- package/dist/chunk-PNMM5HNX.js.map +0 -1
- package/dist/chunk-RWOYPOMR.js.map +0 -1
- package/dist/chunk-TNGMF4UX.js.map +0 -1
- package/dist/chunk-VASLW636.js +0 -23
- package/dist/chunk-VASLW636.js.map +0 -1
- package/dist/chunk-WCAUUBHO.js.map +0 -1
- package/dist/chunk-WUQ3MTPF.js +0 -173
- package/dist/chunk-WUQ3MTPF.js.map +0 -1
- package/dist/chunk-XAXJWXI4.js +0 -1667
- package/dist/chunk-XAXJWXI4.js.map +0 -1
- package/dist/chunk-YO2LTXB4.js.map +0 -1
- package/dist/chunk-ZUAZHDKP.js.map +0 -1
- package/dist/copy-local-skills-NSUTBVLJ.js +0 -14
- package/dist/load-agent-defs-X4E57I2U.js +0 -15
- package/dist/loader-G6BFG2VA.js +0 -24
- package/dist/recompile-project-agents-JE4MM72I.js +0 -20
- package/dist/recompile-project-agents-JE4MM72I.js.map +0 -1
- package/dist/source-loader-3DL3NYUX.js.map +0 -1
- /package/dist/{chunk-LJCNUP6M.js.map → chunk-4ABNXKAR.js.map} +0 -0
- /package/dist/{chunk-D2CAV7MG.js.map → chunk-4DMFK67G.js.map} +0 -0
- /package/dist/{chunk-ILUVL7WM.js.map → chunk-DZD25NHW.js.map} +0 -0
- /package/dist/{chunk-PCC4LBKB.js.map → chunk-EEAX7E2X.js.map} +0 -0
- /package/dist/{chunk-SY4X2LND.js.map → chunk-KUZBMEWR.js.map} +0 -0
- /package/dist/{chunk-5OKLCVM4.js.map → chunk-KVVXINCJ.js.map} +0 -0
- /package/dist/{chunk-Y5Y7XHVU.js.map → chunk-PZNXBORZ.js.map} +0 -0
- /package/dist/{chunk-HTYH7CKN.js.map → chunk-Q7CAE5NN.js.map} +0 -0
- /package/dist/{chunk-G47TDUK3.js.map → chunk-QNAMXQKF.js.map} +0 -0
- /package/dist/{chunk-WFRTHH3A.js.map → chunk-TZRXWFF5.js.map} +0 -0
- /package/dist/{chunk-TBOVYLQJ.js.map → chunk-VTIDLRNA.js.map} +0 -0
- /package/dist/{chunk-OKH64JZE.js.map → chunk-WCZNQECQ.js.map} +0 -0
- /package/dist/{chunk-IXRZAHZF.js.map → chunk-XNYHMRVJ.js.map} +0 -0
- /package/dist/{chunk-VPASBA7P.js.map → chunk-YXI3BTQQ.js.map} +0 -0
- /package/dist/{copy-local-skills-NSUTBVLJ.js.map → load-agent-defs-2VYAV5GL.js.map} +0 -0
- /package/dist/{load-agent-defs-X4E57I2U.js.map → recompile-project-agents-NG5DCPHJ.js.map} +0 -0
- /package/dist/{loader-G6BFG2VA.js.map → source-loader-CO2FZ3OO.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,57 @@ Each release has detailed notes in its own file under [`changelogs/`](./changelo
|
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
|
10
|
+
## [0.158.0] - 2026-08-24
|
|
11
|
+
|
|
12
|
+
**A rule author's reason reaches the grid, three defects leave the shipped surface, and the E2E suite stops describing states the CLI cannot produce**
|
|
13
|
+
|
|
14
|
+
- The grid now says WHY a requirement is needed, in the rule author's own words. `requires[].reason` has been required by the schema all along and nothing rendered it; it is clipped at 60 characters because the cell wraps rather than elides and the catalogue's longest reason is 242 (CLI-757)
|
|
15
|
+
- `uninstall` survives a `metadata.yaml` it cannot parse instead of dying before it deletes anything, a skill you eject is one you can edit, and `doctor` counts one skill as one skill (CLI-790, CLI-814)
|
|
16
|
+
- Two compiler-API checkers land — boundary-union casts and `symbol | file` doc tables — and the five the row argued against stay unbuilt with its reasons intact (CLI-652, CLI-679)
|
|
17
|
+
- The E2E suite shares two frozen fixtures instead of building one per file: 87 files lose the `beforeAll`/`afterAll` ceremony, and a plain source measures at 10ms, so the per-file sharing had bought nothing (CLI-736)
|
|
18
|
+
- A fixture's `config.ts` is now rendered by the product's own writer. The two disagreed on field order, entry spacing, the hoisted variables and the stack compaction — so every assertion over a fixture config was pinned to the fixture rather than to the product (CLI-730)
|
|
19
|
+
- `flattenCliOutput` and `globalHomeFor` were each written twice; both are now single, tested helpers (CLI-770, CLI-689)
|
|
20
|
+
- The slug map has one direction, because nothing read the other, and a synthesised category keeps the domain the source declared (CLI-650)
|
|
21
|
+
- One build per task: three `pretest*` hooks were a second build racing turbo's first, and two `tsup` runs with `clean: true` on one `dist/` aborted a push with no legible error (CLI-771, CLI-793, CLI-795, CLI-813)
|
|
22
|
+
- Six assertions that could not have failed, each repaired and mutation-proved — a `?? []` that cannot tell absence from emptiness, a `toBeGreaterThan(0)` no swap can redden, a `toContain(``)` true of every string (CLI-647, CLI-803, CLI-804, CLI-807, CLI-810, CLI-788)
|
|
23
|
+
- Removed: `expectCompiledAgents`, with zero call sites, and an options bag on `expectValidAgentMarkdown` that no caller could reach (CLI-778)
|
|
24
|
+
- The task-ID backlog closes to its irreducible core, an eighth of the size the row claimed (CLI-547, CLI-742)
|
|
25
|
+
- Web: the editor offers a loaded marketplace's own categories as placements, and the site header reads at the type system's scale (CLI-815, WWW-08)
|
|
26
|
+
- Retired by measurement rather than by work, each with its evidence in `todo/archive.md` (CLI-557, CLI-596, CLI-613, CLI-648, CLI-692, CLI-746, CLI-761, CLI-789, CLI-796, CLI-797, CLI-801, CLI-802, CLI-805, CLI-806, CLI-808, CLI-809, CLI-812, CLI-817)
|
|
27
|
+
|
|
28
|
+
See [changelogs/0.158.0.md](./changelogs/0.158.0.md) for full details.
|
|
29
|
+
|
|
30
|
+
## [0.157.0] - 2026-08-23
|
|
31
|
+
|
|
32
|
+
**The accuracy programme lands: scope travels end to end, every command prints the name the installation configured, and a run that cannot finish says so**
|
|
33
|
+
|
|
34
|
+
- Scope now travels end to end — a project-scoped skill can no longer be assigned to a global sub-agent in the editor, and the share payload, the worker and the CLI all read one scope vocabulary from `@workspace/matrix` (EDITOR-08, EDITOR-02, SERVER-04)
|
|
35
|
+
- Every command prints the configured `branding.name`, the interactive dashboard included (CLI-702, CLI-773)
|
|
36
|
+
- A run that cannot finish names what it owes and the one command that finishes it, and exits non-zero (CLI-607, CLI-612, CLI-618, CLI-649, CLI-800, CLI-811)
|
|
37
|
+
- `edit` decides its scope once, where it had answered the same question six times with two answers disagreeing (CLI-363)
|
|
38
|
+
- `build marketplace` refuses rather than writing a manifest its own loader rejects, and a closed union no longer answers a marketplace's own slug with somebody else's catalogue (CLI-611, CLI-502, CLI-644, CLI-675)
|
|
39
|
+
- The wizard's warnings reach the screen — sorted into the startup band, or a toast when raised after mount — and `TOAST_KEYS` is derived rather than hand-written (CLI-591, CLI-592, CLI-663)
|
|
40
|
+
- Configuration truth: `splitConfigByScope`'s comment corrected against code the owner ruled right, the seed schema shared with the editor, `eject` no longer writing over a config it could not read, and six producers of the sub-agent roster brought into agreement (CLI-538, CLI-614, CLI-602, CLI-492)
|
|
41
|
+
- Three guards refuse a build that moved under a running suite; every symptom of that race had been an ordinary assertion failure reading as a regression the change under test caused (CLI-671, CLI-699, CLI-708)
|
|
42
|
+
- Sixteen gates over surfaces no checker had opened — the briefing contract, spec-name vocabulary, symbol citations, spawn doors, refusal expectations, findings citations, skipped specs, test-only exports, derived producer rosters, and three the repository had decided by incident (CLI-566, CLI-589, CLI-587, CLI-588, CLI-562, CLI-605, CLI-627, CLI-626, CLI-544, CLI-581, CLI-616, CLI-658, CLI-664, CLI-355, CLI-356, CLI-358)
|
|
43
|
+
- Six specs that could not fail, repaired and mutation-proved — the old assertion stays green on the same mutation the new one catches (CLI-660, CLI-661, CLI-662, CLI-756, CLI-608, CLI-601)
|
|
44
|
+
- The unit suite no longer depends on the developer's shell, and one unescaped pipe no longer deletes a whole journey row (CLI-686, CLI-696)
|
|
45
|
+
- Removed: `output-validator.ts` and thirty-five exported symbols only tests invoked, `plugin-manifest-finder.ts` and `skill-fetcher.ts` among them (CLI-673, CLI-657, CLI-681)
|
|
46
|
+
- `extractStack` moved out of its spec into a tested helper, and the `D-NNN` tracker ids migrated to the workspace prefix (CLI-669, CLI-574, CLI-680)
|
|
47
|
+
- Web: the deployed editor's address is committed rather than assembled, the documentation's claims are re-derived from the CLI, and the landing page and docs read as one product — plus a seven-way chunk split that leaves an ordinary deploy re-hashing 29 KB instead of 1.03 MB (REPO-09, WWW-04, WWW-10, WWW-07)
|
|
48
|
+
|
|
49
|
+
See [changelogs/0.157.0.md](./changelogs/0.157.0.md) for full details.
|
|
50
|
+
|
|
51
|
+
## [0.156.1] - 2026-08-20
|
|
52
|
+
|
|
53
|
+
**A test helper that walked the long way round, and the standard that had blessed the number it walked to**
|
|
54
|
+
|
|
55
|
+
- `BuildStep.focusSkill` looks at the screen before it presses Tab and confirms every press against the frame, so it no longer pays a 33-category lap to reach the category the grid opened on, nor passes its own target while a repaint is in flight (CLI-595)
|
|
56
|
+
- `MAX_FOCUS_ATTEMPTS` is deleted — the walk terminates on a real lap and raises `CategoryWalkError` naming the categories it observed, because a press budget reports the number it gave up at
|
|
57
|
+
- No shipped code changed: the published tarball is identical to 0.156.0's
|
|
58
|
+
|
|
59
|
+
See [changelogs/0.156.1.md](./changelogs/0.156.1.md) for full details.
|
|
60
|
+
|
|
10
61
|
## [0.156.0] - 2026-08-20
|
|
11
62
|
|
|
12
63
|
**The programme audits its own output, and a guard finds the defect every suite was blind to**
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-WTJ3AY33.js";
|
|
10
10
|
import {
|
|
11
11
|
useSectionScroll
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WCZNQECQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getSkillById
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7Z4N4JWQ.js";
|
|
16
16
|
import {
|
|
17
17
|
CLI_COLORS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-G6G2FT2G.js";
|
|
19
19
|
|
|
20
20
|
// src/cli/components/wizard/category-grid.tsx
|
|
21
21
|
import { useCallback as useCallback2, useEffect as useEffect2 } from "react";
|
|
@@ -99,15 +99,14 @@ var wrapOptionIndex = (length, currentIndex, direction) => {
|
|
|
99
99
|
if (length === 0) return currentIndex;
|
|
100
100
|
return (currentIndex + direction + length) % length;
|
|
101
101
|
};
|
|
102
|
+
var advisoryAnnotation = (state) => state.status === "normal" ? null : `(${state.status}: ${state.reason})`;
|
|
102
103
|
var getCompatibilityLabel = (option) => {
|
|
103
104
|
if (option.selected && option.hasUnmetRequirements && option.unmetRequirementsReason) {
|
|
104
105
|
return `(${option.unmetRequirementsReason})`;
|
|
105
106
|
}
|
|
106
107
|
if (option.selected) return null;
|
|
107
108
|
if (option.requiredBy) return `(required by ${option.requiredBy})`;
|
|
108
|
-
|
|
109
|
-
if (option.state.status === "discouraged") return "(discouraged)";
|
|
110
|
-
return null;
|
|
109
|
+
return advisoryAnnotation(option.state);
|
|
111
110
|
};
|
|
112
111
|
var STATUS_COLORS = {
|
|
113
112
|
incompatible: CLI_COLORS.ERROR,
|
|
@@ -266,4 +265,4 @@ var CategoryGrid = ({
|
|
|
266
265
|
export {
|
|
267
266
|
CategoryGrid
|
|
268
267
|
};
|
|
269
|
-
//# sourceMappingURL=chunk-
|
|
268
|
+
//# sourceMappingURL=chunk-2PN4QXON.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/wizard/category-grid.tsx","../src/cli/components/hooks/use-category-grid-input.ts"],"sourcesContent":["import React, { useCallback, useEffect } from \"react\";\n\nimport { Box, Text } from \"ink\";\n\nimport { CLI_COLORS } from \"../../consts.js\";\nimport { getSkillById } from \"../../lib/matrix/matrix-provider.js\";\nimport type { Category, OptionState, SkillId, SkillScope } from \"../../types/index.js\";\nimport { useCategoryGridInput } from \"../hooks/use-category-grid-input.js\";\nimport { useFocusedListItem } from \"../hooks/use-focused-list-item.js\";\nimport { useSectionScroll } from \"../hooks/use-section-scroll.js\";\n\nexport type CategoryOption = {\n id: SkillId;\n state: OptionState;\n selected: boolean;\n local?: boolean;\n installed?: boolean;\n scope?: SkillScope;\n /** Secondary scope badge shown alongside primary (e.g. after G->P toggle, excluded tombstone) */\n secondaryScope?: SkillScope;\n source?: string;\n /** True when selected but has unmet dependency requirements (shown dimmed) */\n hasUnmetRequirements?: boolean;\n /** Explains unmet requirements (shown in label when D pressed) */\n unmetRequirementsReason?: string;\n /** Display name of the skill that requires this one (e.g. \"Next.js\") */\n requiredBy?: string;\n};\n\nexport type CategoryRow = {\n id: Category;\n displayName: string;\n required: boolean;\n exclusive: boolean;\n options: CategoryOption[];\n};\n\nexport type CategoryGridProps = {\n categories: CategoryRow[];\n /** Available height in terminal lines for the scrollable viewport. 0 = no constraint. */\n availableHeight?: number;\n showLabels: boolean;\n onToggle: (categoryId: Category, technologyId: SkillId) => void;\n onToggleLabels: () => void;\n /** Optional initial focus row (default: 0). Use with React `key` to reset. */\n defaultFocusedRow?: number;\n /** Optional initial focus col (default: 0). Use with React `key` to reset. */\n defaultFocusedCol?: number;\n /** Optional callback fired whenever the focused position changes */\n onFocusChange?: (row: number, col: number) => void;\n /** Optional callback fired with the resolved SkillId of the focused cell */\n onFocusedSkillChange?: (skillId: SkillId | null) => void;\n};\n\nconst SYMBOL_REQUIRED = \"*\";\n\n/** Next option index stepping cyclically from `currentIndex`; empty rows stay put. */\nconst wrapOptionIndex = (length: number, currentIndex: number, direction: 1 | -1): number => {\n if (length === 0) return currentIndex;\n return (currentIndex + direction + length) % length;\n};\n\ntype SkillTagProps = {\n option: CategoryOption;\n isFocused: boolean;\n showLabels: boolean;\n};\n\n/**\n * The verdict word and the reason behind it — `(incompatible: conflicts with Vue\n * Composition Api)`. Every advisory state but `normal` carries a reason, so the\n * status discriminant narrows to the two that have one to state.\n *\n * The word leads rather than the reason: it is the only carrier of the verdict\n * once colour is off, a `discourages` rule's reason is free-form author prose\n * that need not identify itself as a discouragement, and `CELL_ANNOTATION` in\n * `e2e/pages/steps/build-step.ts` anchors cell-label parsing on that keyword.\n *\n * Nothing is elided. A long reason grows the tag and wraps inside its border,\n * which is what `unmetRequirementsReason` above already does.\n */\nconst advisoryAnnotation = (state: OptionState): string | null =>\n state.status === \"normal\" ? null : `(${state.status}: ${state.reason})`;\n\nconst getCompatibilityLabel = (option: CategoryOption): string | null => {\n if (option.selected && option.hasUnmetRequirements && option.unmetRequirementsReason) {\n return `(${option.unmetRequirementsReason})`;\n }\n if (option.selected) return null;\n if (option.requiredBy) return `(required by ${option.requiredBy})`;\n return advisoryAnnotation(option.state);\n};\n\nconst STATUS_COLORS: Partial<Record<OptionState[\"status\"], string>> = {\n incompatible: CLI_COLORS.ERROR,\n discouraged: CLI_COLORS.WARNING,\n};\n\n/** Selected wins, then advisory status; `fallback` covers the plain \"normal\" state. */\nfunction resolveTagColor(option: CategoryOption, fallback: string): string {\n if (option.selected) return CLI_COLORS.PRIMARY;\n return STATUS_COLORS[option.state.status] ?? fallback;\n}\n\nconst SkillTag: React.FC<SkillTagProps> = ({ option, isFocused, showLabels }) => {\n const textColor = resolveTagColor(option, CLI_COLORS.DIM);\n const hasRequiredBy = option.selected && !!option.requiredBy;\n const hasUnmetDeps = option.selected && !!option.hasUnmetRequirements;\n const isDimmed = hasUnmetDeps || hasRequiredBy;\n const showCompatibility = hasRequiredBy || hasUnmetDeps || (showLabels && isFocused);\n const compatibilityLabel = showCompatibility ? getCompatibilityLabel(option) : null;\n\n return (\n <Box\n marginRight={1}\n borderColor={isFocused ? resolveTagColor(option, CLI_COLORS.UNFOCUSED) : textColor}\n borderDimColor={!isFocused}\n borderStyle=\"single\"\n flexShrink={0}\n paddingLeft={1}\n flexDirection=\"row\"\n >\n <>\n {option.scope && (\n <>\n {[option.scope, option.secondaryScope].filter(Boolean).map((badgeScope, i) => (\n <Text key={i} color={CLI_COLORS.WARNING} backgroundColor={CLI_COLORS.LABEL_BG}>\n {badgeScope === \"global\" ? \" G \" : \" P \"}\n </Text>\n ))}\n <Text> </Text>\n </>\n )}\n <Text color={textColor} bold dimColor={isDimmed}>\n {getSkillById(option.id).displayName}{\" \"}\n </Text>\n {compatibilityLabel && (\n <Text color={textColor} dimColor>\n {compatibilityLabel}{\" \"}\n </Text>\n )}\n </>\n </Box>\n );\n};\n\ntype CategorySectionProps = {\n isFirst: boolean;\n category: CategoryRow;\n isFocused: boolean;\n focusedOptionIndex: number;\n showLabels: boolean;\n};\n\nconst CategorySection: React.FC<CategorySectionProps> = ({\n isFirst,\n category,\n isFocused,\n focusedOptionIndex,\n showLabels,\n}) => {\n const { options } = category;\n const selectedCount = options.filter((o) => o.selected).length;\n\n const selectionCounter = category.exclusive ? `(${selectedCount} of 1)` : null;\n\n return (\n <Box flexDirection=\"column\" marginTop={isFirst ? 0 : 1}>\n <Box flexDirection=\"row\">\n {isFocused ? (\n <Text color={CLI_COLORS.WHITE} backgroundColor={CLI_COLORS.LABEL_BG}>\n {` ${category.displayName}${category.required ? ` ${SYMBOL_REQUIRED}` : \"\"}${selectionCounter ? ` ${selectionCounter}` : \"\"} `}\n </Text>\n ) : (\n <>\n <Text color={CLI_COLORS.NEUTRAL}>{category.displayName}</Text>\n {category.required && <Text color={CLI_COLORS.NEUTRAL}> {SYMBOL_REQUIRED}</Text>}\n {selectionCounter && <Text dimColor> {selectionCounter}</Text>}\n </>\n )}\n </Box>\n\n <Box flexDirection=\"row\" flexWrap=\"wrap\" marginTop={0}>\n {options.map((option, index) => (\n <SkillTag\n key={option.id}\n option={option}\n isFocused={isFocused && index === focusedOptionIndex}\n showLabels={showLabels}\n />\n ))}\n </Box>\n </Box>\n );\n};\n\nexport const CategoryGrid: React.FC<CategoryGridProps> = ({\n categories,\n availableHeight = 0,\n showLabels,\n onToggle,\n onToggleLabels,\n defaultFocusedRow = 0,\n defaultFocusedCol = 0,\n onFocusChange,\n onFocusedSkillChange,\n}) => {\n const getColCount = useCallback(\n (row: number): number => categories[row]?.options.length ?? 0,\n [categories],\n );\n\n const findValidCol = useCallback(\n (row: number, currentCol: number, direction: 1 | -1): number =>\n wrapOptionIndex(categories[row]?.options.length ?? 0, currentCol, direction),\n [categories],\n );\n\n const handleFocusChange = useCallback(\n (row: number, col: number) => {\n if (showLabels) onToggleLabels();\n onFocusChange?.(row, col);\n },\n [showLabels, onToggleLabels, onFocusChange],\n );\n\n const { focusedRow, focusedCol, setFocused, moveFocus } = useFocusedListItem(\n categories.length,\n getColCount,\n {\n wrap: true,\n findValidCol,\n onChange: handleFocusChange,\n initialRow: defaultFocusedRow,\n initialCol: defaultFocusedCol,\n },\n );\n\n useCategoryGridInput({\n categories,\n focusedRow,\n focusedCol,\n setFocused,\n moveFocus,\n onToggle,\n onToggleLabels,\n });\n\n // Report the focused cell's skill on mount and whenever it changes — including\n // category reshapes that shift the cell without a navigation event. useFocusedListItem\n // only fires onChange during navigation, so the initially highlighted cell would\n // otherwise never reach the store, leaving focusedSkillId out of sync with the visual\n // focus and making the `s` scope hotkey no-op until the first arrow key.\n const focusedSkillId = categories[focusedRow]?.options[focusedCol]?.id ?? null;\n useEffect(() => {\n onFocusedSkillChange?.(focusedSkillId);\n }, [focusedSkillId, onFocusedSkillChange]);\n\n // `hiddenAbove` / `hiddenBelow` are discarded ON PURPOSE — the build grid has\n // no `ScrollAffordance` and is not getting one (owner decision). On a grid\n // this dense a half-cut card already says \"there is more\"; a counted hint\n // would be noise, and it would cost the viewport a row to say what the\n // clipped card says for free. Do not add one on the strength of the counts\n // merely being available here.\n const { setSectionRef, scrollEnabled, scrollTopPx } = useSectionScroll({\n sectionCount: categories.length,\n focusedIndex: focusedRow,\n availableHeight,\n });\n\n if (categories.length === 0) {\n return (\n <Box flexDirection=\"column\">\n <Text dimColor>No categories to display.</Text>\n </Box>\n );\n }\n\n const noShrink = scrollEnabled ? { flexShrink: 0 } : {};\n\n const sectionElements = categories.map((category, index) => (\n <Box key={category.id} ref={(el) => setSectionRef(index, el)} {...noShrink}>\n <CategorySection\n category={category}\n isFocused={index === focusedRow}\n focusedOptionIndex={focusedCol}\n showLabels={showLabels}\n isFirst={index === 0}\n />\n </Box>\n ));\n\n return (\n <Box\n flexDirection=\"column\"\n {...(scrollEnabled\n ? { height: availableHeight, overflow: \"hidden\" as const }\n : { flexGrow: 1 })}\n >\n <Box flexDirection=\"column\" marginTop={scrollTopPx > 0 ? -scrollTopPx : 0} {...noShrink}>\n {sectionElements}\n </Box>\n </Box>\n );\n};\n","import { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { useInput, type Key } from \"ink\";\n\nimport type { Category, SkillId } from \"../../types/index.js\";\nimport type { CategoryRow } from \"../wizard/category-grid.js\";\nimport type { Direction } from \"./use-focused-list-item.js\";\nimport { HOTKEY_TOGGLE_LABELS, KEY_SPACE, isHotkey } from \"../wizard/hotkeys.js\";\n\n/** Find next section index (wrapping forward) */\nconst findNextIndex = (items: { length: number }, currentIndex: number): number => {\n const length = items.length;\n if (length === 0) return currentIndex;\n return (currentIndex + 1) % length;\n};\n\ntype UseCategoryGridInputOptions = {\n categories: CategoryRow[];\n focusedRow: number;\n focusedCol: number;\n setFocused: (row: number, col: number) => void;\n moveFocus: (direction: Direction) => void;\n onToggle: (categoryId: Category, technologyId: SkillId) => void;\n onToggleLabels: () => void;\n};\n\nexport function useCategoryGridInput({\n categories,\n focusedRow,\n focusedCol,\n setFocused,\n moveFocus,\n onToggle,\n onToggleLabels,\n}: UseCategoryGridInputOptions): void {\n const currentRow = categories[focusedRow];\n // Memoised so the effect below keys on the row actually changing — the `[]`\n // fallback used to be a fresh array every render, re-running the effect for\n // nothing whenever no row was focused.\n const currentOptions = useMemo(() => currentRow?.options ?? [], [currentRow]);\n\n // Adjust column when current row's options change externally (e.g. option becomes disabled)\n useEffect(() => {\n if (!currentRow) return;\n\n const maxCol = currentOptions.length - 1;\n if (focusedCol > maxCol) {\n const newCol = Math.max(0, maxCol);\n setFocused(focusedRow, newCol);\n }\n }, [focusedRow, currentOptions, focusedCol, setFocused, currentRow]);\n\n // Store the latest handler in a ref so that the useInput effect never needs to\n // re-register on the event emitter. This avoids a stale-closure race condition\n // where, after a domain switch (CategoryGrid remount via key={activeDomain}),\n // the useInput effect may not yet have re-registered the updated handler when\n // the first keypress arrives — causing the first space press to be silently lost.\n const handlerRef = useRef<((input: string, key: Key) => void) | null>(null);\n handlerRef.current = (input: string, key: Key) => {\n if (key.tab && key.shift) {\n onToggleLabels();\n return;\n }\n\n if (key.tab && !key.shift) {\n const nextSection = findNextIndex(categories, focusedRow);\n if (nextSection !== focusedRow) {\n setFocused(nextSection, 0);\n }\n return;\n }\n\n if (isHotkey(input, HOTKEY_TOGGLE_LABELS)) {\n onToggleLabels();\n return;\n }\n\n if (input === KEY_SPACE) {\n const currentOption = currentOptions[focusedCol];\n if (currentRow && currentOption) {\n onToggle(currentRow.id, currentOption.id);\n }\n return;\n }\n\n const isLeft = key.leftArrow || input === \"h\";\n const isRight = key.rightArrow || input === \"l\";\n const isUp = key.upArrow || input === \"k\";\n const isDown = key.downArrow || input === \"j\";\n\n if (isLeft) {\n moveFocus(\"left\");\n } else if (isRight) {\n moveFocus(\"right\");\n } else if (isUp) {\n moveFocus(\"up\");\n } else if (isDown) {\n moveFocus(\"down\");\n }\n };\n\n // Stable handler reference — never changes, so useInput's effect registers once\n const stableHandler = useCallback((input: string, key: Key) => {\n handlerRef.current?.(input, key);\n }, []);\n\n useInput(stableHandler);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAAA,cAAa,aAAAC,kBAAiB;AAE9C,SAAS,KAAK,YAAY;;;ACF1B,SAAS,aAAa,WAAW,SAAS,cAAc;AACxD,SAAS,gBAA0B;AAQnC,IAAM,gBAAgB,CAAC,OAA2B,iBAAiC;AACjF,QAA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bin/env node
|
|
2
2
|
import {
|
|
3
3
|
getDomainDisplayName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KVVXINCJ.js";
|
|
5
5
|
import {
|
|
6
6
|
CheckboxGrid
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KUZBMEWR.js";
|
|
8
8
|
import {
|
|
9
9
|
orderDomains,
|
|
10
10
|
useWizardStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IK6YOXZH.js";
|
|
12
12
|
import {
|
|
13
13
|
DOMAIN_DESCRIPTIONS
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
matrix
|
|
17
|
-
} from "./chunk-RWOYPOMR.js";
|
|
14
|
+
} from "./chunk-3PJLLBUS.js";
|
|
18
15
|
import {
|
|
16
|
+
matrix,
|
|
19
17
|
typedEntries
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7Z4N4JWQ.js";
|
|
21
19
|
|
|
22
20
|
// src/cli/components/wizard/domain-selection.tsx
|
|
23
21
|
import { useMemo } from "react";
|
|
@@ -58,4 +56,4 @@ var DomainSelection = () => {
|
|
|
58
56
|
export {
|
|
59
57
|
DomainSelection
|
|
60
58
|
};
|
|
61
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-3NBXQSW2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/components/wizard/domain-selection.tsx"],"sourcesContent":["import { DOMAIN_DESCRIPTIONS } from \"@workspace/matrix\";\nimport React, { useMemo } from \"react\";\nimport { unique } from \"remeda\";\nimport { useWizardStore } from \"../../stores/wizard-store.js\";\nimport { matrix } from \"../../lib/matrix/matrix-provider.js\";\nimport type { Domain } from \"../../types/index.js\";\nimport { typedEntries } from \"../../utils/typed-object.js\";\nimport { CheckboxGrid, type CheckboxItem } from \"./checkbox-grid.js\";\nimport { getDomainDisplayName, orderDomains } from \"./utils.js\";\n\nexport const DomainSelection: React.FC = () => {\n const { selectedDomains, toggleDomain, setStep, setApproach, selectStack, goBack, history } =\n useWizardStore();\n\n const availableDomains = useMemo((): CheckboxItem<Domain>[] => {\n const matrixDomains = unique(\n typedEntries(matrix.categories)\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- typedEntries/Object.entries launders the `| undefined` a Partial<Record> admits out of its result type, so this guard reads as dead while still covering an explicitly-undefined slot\n .map(([, cat]) => cat?.domain)\n .filter((d): d is Domain => d != null),\n );\n\n const ordered = orderDomains(matrixDomains);\n\n return ordered.map((domain) => ({\n id: domain,\n label: getDomainDisplayName(domain),\n description: DOMAIN_DESCRIPTIONS[domain],\n }));\n // `matrix` is a module-level value, not reactive state — mutating it never\n // re-renders anything, so listing it promised a recomputation that cannot\n // happen. It is initialised once before the wizard mounts.\n }, []);\n\n // Going back means going back to the stack choice, so it clears the choice on\n // the way. When this step is the wizard's first — a source offering no stacks\n // has no stack step to return to — there is no choice to clear and nowhere to\n // go, and clearing anyway would wipe the selections in place.\n const handleBack = () => {\n if (history.length === 0) return;\n setApproach(null);\n selectStack(null);\n goBack();\n };\n\n return (\n <CheckboxGrid\n items={availableDomains}\n selectedIds={selectedDomains}\n onToggle={toggleDomain}\n onContinue={() => setStep(\"build\")}\n onBack={handleBack}\n emptyMessage=\"Please select at least one domain\"\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/wizard/domain-selection.tsx"],"sourcesContent":["import { DOMAIN_DESCRIPTIONS } from \"@workspace/matrix\";\nimport React, { useMemo } from \"react\";\nimport { unique } from \"remeda\";\nimport { useWizardStore } from \"../../stores/wizard-store.js\";\nimport { matrix } from \"../../lib/matrix/matrix-provider.js\";\nimport type { Domain } from \"../../types/index.js\";\nimport { typedEntries } from \"../../utils/typed-object.js\";\nimport { CheckboxGrid, type CheckboxItem } from \"./checkbox-grid.js\";\nimport { getDomainDisplayName, orderDomains } from \"./utils.js\";\n\nexport const DomainSelection: React.FC = () => {\n const { selectedDomains, toggleDomain, setStep, setApproach, selectStack, goBack, history } =\n useWizardStore();\n\n const availableDomains = useMemo((): CheckboxItem<Domain>[] => {\n const matrixDomains = unique(\n typedEntries(matrix.categories)\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- typedEntries/Object.entries launders the `| undefined` a Partial<Record> admits out of its result type, so this guard reads as dead while still covering an explicitly-undefined slot\n .map(([, cat]) => cat?.domain)\n .filter((d): d is Domain => d != null),\n );\n\n const ordered = orderDomains(matrixDomains);\n\n return ordered.map((domain) => ({\n id: domain,\n label: getDomainDisplayName(domain),\n description: DOMAIN_DESCRIPTIONS[domain],\n }));\n // `matrix` is a module-level value, not reactive state — mutating it never\n // re-renders anything, so listing it promised a recomputation that cannot\n // happen. It is initialised once before the wizard mounts.\n }, []);\n\n // Going back means going back to the stack choice, so it clears the choice on\n // the way. When this step is the wizard's first — a source offering no stacks\n // has no stack step to return to — there is no choice to clear and nowhere to\n // go, and clearing anyway would wipe the selections in place.\n const handleBack = () => {\n if (history.length === 0) return;\n setApproach(null);\n selectStack(null);\n goBack();\n };\n\n return (\n <CheckboxGrid\n items={availableDomains}\n selectedIds={selectedDomains}\n onToggle={toggleDomain}\n onContinue={() => setStep(\"build\")}\n onBack={handleBack}\n emptyMessage=\"Please select at least one domain\"\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,SAAgB,eAAe;AAC/B,SAAS,cAAc;AA4CnB;AApCG,IAAM,kBAA4B,MAAM;AAC7C,QAAM,EAAE,iBAAiB,cAAc,SAAS,aAAa,aAAa,QAAQ,QAAQ,IACxF,eAAe;AAEjB,QAAM,mBAAmB,QAAQ,MAA8B;AAC7D,UAAM,gBAAgB;AAAA,MACpB,aAAa,OAAO,UAAU,EAE3B,IAAI,CAAC,CAAC,EAAE,GAAG,MAAM,KAAK,MAAM,EAC5B,OAAO,CAAC,MAAmB,KAAK,IAAI;AAAA,IACzC;AAEA,UAAM,UAAU,aAAa,aAAa;AAE1C,WAAO,QAAQ,IAAI,CAAC,YAAY;AAAA,MAC9B,IAAI;AAAA,MACJ,OAAO,qBAAqB,MAAM;AAAA,MAClC,aAAa,oBAAoB,MAAM;AAAA,IACzC,EAAE;AAAA,EAIJ,GAAG,CAAC,CAAC;AAML,QAAM,aAAa,MAAM;AACvB,QAAI,QAAQ,WAAW,EAAG;AAC1B,gBAAY,IAAI;AAChB,gBAAY,IAAI;AAChB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAa;AAAA,MACb,UAAU;AAAA,MACV,YAAY,MAAM,QAAQ,OAAO;AAAA,MACjC,QAAQ;AAAA,MACR,cAAa;AAAA;AAAA,EACf;AAEJ;","names":[]}
|