prjct-cli 2.42.3 → 2.42.5
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 +43 -0
- package/dist/bin/prjct-core.mjs +497 -467
- package/dist/daemon/entry.mjs +301 -304
- package/dist/mcp/server.mjs +277 -280
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
Fixes from a full code review of the v2.42.0–v2.42.4 range (7 review angles, 42 candidates, verified).
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Lazy command loaders no longer memoize rejected promises.** A transient import/constructor error during the first dispatch of a command group used to be cached forever — every later command in that group replayed the same error for the daemon's lifetime (the old eager loading failed loud at startup instead). Both layers fixed (registry group loaders + the 17 `PrjctCommands` getters); the next dispatch now retries.
|
|
9
|
+
- **`mapOptions` numbers**: non-numeric input for a numeric flag maps to `undefined` (flag ignored) instead of `NaN`.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- New CI guard: `manifest-completeness` instantiates every command group and verifies each manifest `routing.method` actually exists — restoring the registration-time validation the lazy refactor deferred to first dispatch.
|
|
13
|
+
- `registerLazyMethod` memoizes the resolved instance+method pair (was re-resolving per dispatch); dead `registerMethod` deleted (single registration mechanism).
|
|
14
|
+
- `runBinCommand` imports moved into the branches that use them — every bin command was paying the `version` branch's chalk/ai-provider/file-helper imports.
|
|
15
|
+
- `compareSemver` deduped to the `schemas/model.ts` implementation; the monotonic-stamp rule shared between `nextKvStamp` and `updateDoc`; `cosineSimilarity` single-sourced over `dot`/`l2Norm`.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Optimization backlog pass (the items deferred since v2.37.x, consolidated in mem_1814).
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- **Post-upgrade re-setup silently never ran.** `bin/prjct.ts` invoked `setup.run()` through a default export that the ESM-standardization PR (#132, 2026-02) deleted — `bin/` sits outside core's typecheck, so the call threw `TypeError` into its own catch and only stamped the version, on every upgrade, for four months. `run()` is a named export now and bin imports it directly.
|
|
22
|
+
|
|
23
|
+
### Performance
|
|
24
|
+
- **FTS5 prefix indexes** (migration 29): `searchFts` matches every keyword as a prefix query, but the FTS table had no prefix indexes — each term scanned the full-term index. Recreated with `prefix='2 3 4'` + content rebuild.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **MCP tool descriptions are intent-led.** Six tools (analysis, workflow rules/list/status, signatures, history) were noun phrases with no "when to reach for this"; each now states what it returns and when to use it.
|
|
28
|
+
- **`package.json` overrides documented** in CONTRIBUTING.md — vulnerability class, the PR that introduced each pin (#251/#326), and the removal condition.
|
|
29
|
+
|
|
30
|
+
### Refactoring
|
|
31
|
+
- **God-files split.** `infrastructure/setup.ts` (892 → 472) extracted `codex-skill.ts` + `statusline-installer.ts`; `memory/project-memory.ts` (1086 → 660) extracted `entries.ts` (types + row mapping + pure filters) and `format.ts` (markdown rendering). All importers updated per the no-re-export rule.
|
|
32
|
+
- **Dropped the `glob` dependency** — the single call site (monorepo workspace discovery) uses native `node:fs` `globSync` (node ≥22 / bun; the engine floor is already 22.5). `@types/node@22` pinned as a devDependency (types resolved to a transitive v20 that predates `globSync`).
|
|
33
|
+
|
|
5
34
|
### Performance
|
|
6
35
|
- **Daemon command groups load lazily.** `PrjctCommands` and the registry bindings eagerly imported and instantiated all ~18 command-group classes at daemon startup; both now use memoized dynamic-import loaders (new `registerLazyMethod`), so the first socket request stops paying for the whole command tree (daemon module import: 67ms → 40ms warm).
|
|
7
36
|
|
|
@@ -13,6 +42,20 @@
|
|
|
13
42
|
- **`bin/prjct.ts` split**: the ~550 lines of bin-only command handlers moved to `core/cli/bin-commands.ts` (1082 → 536 lines); the entry point keeps startup concerns only.
|
|
14
43
|
- **`core/workflow/` → `core/workflow-engine/`** — disambiguates the rule engine from `core/workflows/` (implementations).
|
|
15
44
|
|
|
45
|
+
## [2.42.5] - 2026-06-10
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- confirmed findings from the v2.42.x range code review (#421)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [2.42.4] - 2026-06-10
|
|
53
|
+
|
|
54
|
+
### Performance
|
|
55
|
+
|
|
56
|
+
- optimization backlog — FTS5 prefix indexes, god-file splits, glob removal + broken post-upgrade setup fixed (#420)
|
|
57
|
+
|
|
58
|
+
|
|
16
59
|
## [2.42.3] - 2026-06-10
|
|
17
60
|
|
|
18
61
|
### Refactoring
|