@agenit/cli 2.1.0 → 2.1.2

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 CHANGED
@@ -3,6 +3,155 @@
3
3
  All notable changes to `@agenit/cli` are documented here. The project
4
4
  follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [2.1.2] - 2026-05-17
7
+
8
+ _Auto-generated entry. Edit CHANGELOG.md directly before
9
+ the next release to curate this section._
10
+
11
+ ### Changed
12
+
13
+ - Merge pull request #141 from muhammed-eldabea/claude/fix-release-workflow-Oasku (033a118)
14
+ - fix(release): avoid SIGPIPE (141) in CHANGELOG generation (c528027)
15
+ - Merge pull request #140 from muhammed-eldabea/FixSpecKitlaund (ef7473d)
16
+ - feat(repl): less/vim-style pager — m/l/g/G keys + scroll-within-bubble (c66c172)
17
+ - feat(repl): per-line pager + landing splash with hacker character (0a64cd1)
18
+ - fix(repl): resolve Ctrl+D shortcut conflict (debug vs catch-up) (678701f)
19
+ - feat(repl): flat Claude/Gemini-style chat layout — avatar in left gutter (9253725)
20
+ - fix(repl): streaming bubble caps to tail-view instead of growing past viewport (04722d4)
21
+ - perf(repl): memoise chat-scroll cull + EntryView to kill flicker (836d73b)
22
+ - feat(repl): collapse long chat messages with Ctrl-E to expand (8e249dd)
23
+ - fix(repl): goal pipeline animates only when a runner is attached (c7dcb61)
24
+ - fix(repl): chat-input overlap + /goal resume runner spawn + sprite row accounting (18b89dd)
25
+ - fix(orchestrator): inline speckit pipeline streaming in chat scroll (15df21a)
26
+ - Merge pull request #136 from muhammed-eldabea/audit-followups (16daecb)
27
+ - Merge pull request #139 from muhammed-eldabea/pixel-characters (a3f08c3)
28
+ - Merge pull request #138 from muhammed-eldabea/feat/agile-opa-qa-ceremonies-radiators (645a2c2)
29
+ - feat(pixel-characters): phase-transition wave/wake animation (5045145)
30
+ - fix(test): make burndown upsert test deterministic in CI (369b17d)
31
+ - feat(vscode-extension): per-helper pixel-character avatars in Squad tree (cb4eb85)
32
+ - feat(vscode-extension): per-agent + per-skill avatars in Customizations panel (77f89ee)
33
+ - feat(agile): information radiators — burndown writer, TUI health widget, /agile digest & burndown (f5db0dc)
34
+ - feat(agile): close all 10 minor gaps — blocker detection, PM budget, OPA templates, QA DoD, ceremony gate modal, change requests, PMO standards, speckit queue (34d3e63)
35
+ - feat(vscode-extension): chat avatar SVG + tool-bounce + vmodelTree per-stage sprite (d07cb8c)
36
+ - feat(orchestrator): JobRow + GoalProgress sprites + V-Model stage characters (9b4ea6c)
37
+ - feat(orchestrator): useFrameLoop hook + chat avatar + as:<role> directive (f0a72be)
38
+ - test: add trigger-handler and human-relay unit tests + AgDR-0009 for PMO persona (18d6a85)
39
+ - feat(sprites): fill remaining V-Model + persona + stakeholder ASCII art (d5a1f63)
40
+ - feat(sprites): emit-webview build step → catalog.json + per-char SVG (835f28e)
41
+ - feat(sprites): new @flow/sprites package + types + 2 proof characters (ba7634f)
42
+ - fix: record velocity at retrospective + robust PMO QA failure detection (5b23ac4)
43
+ - feat: wire ceremony trigger→persona actions + LLM AC evaluation in /qa (eb9934e)
44
+ - feat: wire ResumeStrategyModal into App.tsx (#95/#114) (c76ca6d)
45
+ - test: add unit tests for CeremonyEngine and OPA memory injection (a198a0c)
46
+ - feat(goal): checkpoint cadence control via checkpoint_every_turns (audit #127 mech 2 follow-up) (f51145f)
47
+ - fix: complete ceremony-worker ↔ goal-runner integration + opa.ts path (8e82e45)
48
+ - feat(goal): /goal start --interactive + per-tick checkpoint API (audit #134) (1491bce)
49
+ - feat(migrate): /migrate gemini-plan — recover raw Gemini plan-mode artefacts (audit #132) (3ce16e9)
50
+ - feat(traceability): profile-aware ID + language defaults (audit #131) (5fa883f)
51
+ - fix: wire Agile/OPA implementation gaps identified in post-commit review (53d4021)
52
+ - feat(memory,goal): scope-relative SONA reward + live cost surfacing (audit #130, #133) (91db0b5)
53
+ - feat(goal): scope-vs-spec complexity-band linter (audit #128) (6c4c758)
54
+ - feat(session_start): mandatory memory-tool directives (audit #129) (bb968f5)
55
+ - feat(goal): polish-task verifier — block COMPLETED ticks without evidence (audit #127, mechanism 1) (dfd79ae)
56
+ - fix(goal): auto-index codedigest on goal start when missing (audit #125) (8a0a370)
57
+ - fix(memory): extract atomic lessons before reasoning-bank append (audit #124) (5438195)
58
+ - fix(session_start): profile-aware engineering trailer (audit #123) (b933ccd)
59
+ - feat(agile+opa+qa): implement Agile persona engine, OPA, /qa, and session resume (#99-#114) (8d50ff8)
60
+ - fix(audit): file-level paths in gitChangedFiles + extend isTestPath (b3e2f04)
61
+ - fix(goal): parse COMPLETED: marker even when glued to preceding text (56124d4)
62
+ - Merge pull request #118 from muhammed-eldabea/cancel-harden-and-features (97aaf80)
63
+
64
+ ## [Unreleased]
65
+
66
+ ### Added — Debug Mode (LangSmith-style traces)
67
+
68
+ - `/debug` slash command — `on`/`off`/`status`/`pause`/`resume`/`release`/`skip`/`abort`/`recent`/`trace`/`replay`/`tag`/`config`/`deltas`/`thinking`/`redact`/`save`/`help`. All subcommands registered in autocomplete (`SUBCOMMAND_HINTS`).
69
+ - `Ctrl+D` TUI hotkey toggles debug mode without typing.
70
+ - Singleton trio: `debug-mode.ts` (live state), `run-registry.ts` (in-memory tree of runs persisted as `run.started`/`run.ended` events), `run-tracker.ts` (`withRun(args, fn)` helper + AsyncLocalStorage parent propagation), `debug-gate.ts` (Promise-based pause gates keyed by `runId`).
71
+ - New `RunKind` taxonomy: `chain`/`llm`/`tool`/`agent`/`stage`/`retriever`/`parser`/`prompt`. Each run carries full inputs/outputs/tokens/cost/tags/metadata + a bounded `events[]` of streaming chunks.
72
+ - Secret redactor (`packages/memory/src/redactor.ts`) with built-in patterns for Bearer / `sk-*` / `ghp_*` / `AKIA*` / Slack / Google API keys / password|token|api_key assignments. Recursive JSON walker; opt-out via `[debug] no_redaction = true`; extend via `extra_redact_patterns`.
73
+ - TUI Debug widget (right rail) with 3-section expanded view: trace list / tree / detail. JSON syntax highlighting (cyan keys, green strings, yellow numbers, violet booleans/null) + word-wrap to panel width on INPUTS/OUTPUTS.
74
+ - Web UI **Debug tab** in the Preact SPA — 3-pane LangSmith-style layout (trace list / tree / detail). Live polling via `/api/debug/state`. Config drawer for `enabled`/`persistDeltas`/`persistThinking`/`noRedaction`/`pauseBeforeKinds`. Pending-gate banner with Release/Skip/Abort buttons.
75
+ - 9 new HTTP routes under `/api/debug/`: `state`, `traces`, `traces/:id`, `runs/:id`, `gates`, `gate/:id`, `config`, `replay/:id`, `runs/:id/tags`. Token-gated (writes require control token; viewer token returns 403).
76
+ - **Tool replay** — every tool dispatch now captures full args + raw output via the extended `ToolDispatchEvent`. SPA's tool-run detail shows an editable JSON args textarea with **"Try call again"** button. Replay lands as a sibling run with `tags: ["replay"]` and `metadata.replayedFrom = <originalRunId>`.
77
+ - LLM call wrap captures `{messages, response}` per run via `extractOutputs`. Chain wrap exposes the final assistant reply on the chat-turn row.
78
+ - Streaming token deltas + thoughts-token markers — when debug mode is on AND `persistDeltas`/`persistThinking` is true, the chat path switches to `chatStreamJson` and emits `llm.delta` / `llm.thinking` RunEvents.
79
+ - Two new `MemoryEvent` variants (`run.started`, `run.ended`) — persisted to `events.jsonl`; broadcast over `/ws/events`.
80
+ - Five new Vitest files: `redactor.test.ts` (12), `debug-mode.test.ts` (7), `run-registry.test.ts` (13), `run-tracker.test.ts` (9), `debug-gate.test.ts` (12) — 53 new tests total. Full suite stays at 1203 passing.
81
+
82
+ ### Added — Harnesses widget
83
+
84
+ - Single TUI surface for adding the four artifact types: **Skills** (`.gemini/skills/<name>/SKILL.md`), **MCP servers** (merged into `.mcp.json`), **Agents** (block appended to `AGENTS.md`), **Tools** (`.flow/tools/<name>.py`, chmod 0755).
85
+ - Two sources for the harness body: **empty template** (one per kind) or **scaffolding agent** (one-shot LLM call with per-kind locked output format + `cleanScaffolderOutput` to strip code fences and conversational preambles).
86
+ - In-TUI **vim editor** (`vim-editor-state.ts` reducer + `vim-editor.tsx` renderer). Subset of vim covered: normal/insert/command modes, `hjkl/arrows`, `0/$/gg/G/w/b`, `i/a/o/O`, `x/dd/yy/p/P`, `u` single-step undo, `:w/:q/:q!/:wq/:x`. Vitest reducer coverage (24 cases).
87
+ - `harness-store.ts` singleton state machine with 11 modes. Drafts persist to `~/.agenit/harnesses/drafts.json` debounced 300ms.
88
+ - `harness-installer.ts` with atomic tmp+rename writes, MCP JSON deep-merge, AGENTS.md block de-duplication. Name sanitization.
89
+
90
+ ### Added — Widget navigation, Agents dashboard, Recipes
91
+
92
+ - `Ctrl+W` toggle widget nav mode. `←→` switches rails, `↑↓` cycles widgets within a rail, `Enter` expands, `Esc` collapses then exits. `1`–`9` quick-jump. Action hotkeys (single letters) when a widget is expanded.
93
+ - `widget-registry.ts` + `use-widget-focus.tsx` — singleton store (not Context — App.tsx's `useInput` runs before any provider could wrap).
94
+ - Legacy `Ctrl+T`/`Ctrl+]`/`Ctrl+G` shortcuts preserved and routed through the new expand mechanism.
95
+ - Right-rail **AgentsWidget** with live activity (`reading X`, `running Y`, `asking model`) + per-agent token-cost sparkline + session spend total. Powered by `agent-activity.ts` (subscribes to `tuiBus` events) and `cost-to-agent-bridge.ts` (translates `cost` log events into `agent.cost` emissions).
96
+ - Right-rail **RecipesWidget**. TOML-defined cross-widget orchestration loaded from `config/recipes.toml` (workspace) + `~/.agenit/recipes.toml` (user). Triggers: `hw.probe.failed`/`.ok`, `goal.tick.failed`/`.complete`, `agent.failed`/`.idle`, `tasks.changed`, `widget.action`. Actions: `submit-slash`, `system-message`, `wait N`, `tasks.assign`/`tasks.comment`/`tasks.priority`/`tasks.add`, `log`. Mustache-light template substitution. Per-recipe `guard.max_per_hour` + `guard.cooldown_seconds`.
97
+ - Interactive Tasks expanded view (per-task menu — toggle done, cycle priority, add comment, assign worker from squad persona list, delete with confirm, add new task). Persistence via `> assignee:` / `> comment:` sub-bullets in `tasks.md` so the AI sees the annotations on next read. AI-suggestion sub-mode (`s` action) — backed by `task-curator.ts` one-shot LLM call.
98
+ - Interactive HW Status expanded view (per-probe menu — reread, configure, info — for J-Link / CAN / Saleae).
99
+
100
+ ### Added — `/serve` slash command
101
+
102
+ - `/serve start|stop|status|open` runs the full control SPA inside the running REPL process. Reuses `cmdServe` so all the orchestrator's dependency setup (broker, gemini, session, command registry, debug singletons) is shared. The Web UI Debug tab sees the live run tree from the same REPL.
103
+ - Distinct from the legacy `/web` command which only starts the read-only state-mirror viewer.
104
+ - Subcommands registered in autocomplete picker (`SUBCOMMAND_HINTS`).
105
+
106
+ ### Added — `[debug]` config section + `[experimental] widget_nav`
107
+
108
+ - New `DebugSection` in `agenit.toml`: `enabled` (master), `persist_deltas`, `persist_thinking`, `pause_before_kinds`, `max_persisted_bytes`, `max_events_per_run`, `retention_runs`, `no_redaction`, `extra_redact_patterns`, `persist_trace_files`. Slash command mutates the in-memory singleton; `agenit.toml` only changes when the user runs `/debug save`.
109
+ - `[experimental] widget_nav` flag (default `true`) — hard kill switch for the widget navigation system.
110
+
111
+ ### Changed
112
+
113
+ - Documentation folder consolidated: `doc/` → `docs/`. All `doc/<path>` references updated across the codebase (source, tests, config, skills). Three new files added: `docs/debug-mode.md`, `docs/harnesses.md`, `docs/widget-navigation.md`. `docs/README.md` index extended.
114
+ - Root `README.md` extended with a **What's new** section and entries in the Documentation table for the new features.
115
+ - `ToolDispatchEvent` (gemini-client) — `started` events now carry full `args` (was: summary only); `completed` events now carry full `output` (was: 200-char preview only). Backwards-compatible — fields are optional and the legacy `argSummary`/`outputPreview` remain.
116
+ - `tool-executors.ts` dispatcher observer extended to populate the `runRegistry` so every tool call becomes a child run of the LLM run that invoked it.
117
+ - Subcommand autocomplete entries added for the slash commands that were missing them: `/debug`, `/serve`, `/web`, `/harnesses`. Typing `/<cmd>` + TAB now lists all subcommands instead of silently doing nothing.
118
+
119
+ ### Fixed
120
+
121
+ - Debug widget detail pane previously truncated long response strings with `wrap="truncate-end"`, causing them to bleed off the right edge of the panel. Now uses `wrap="wrap"` and a per-line JSON syntax colorizer so multi-line redacted outputs are readable and word-wrapped to the available panel width.
122
+ - Run-registry's `RunStatus` was being persisted as `running` on `run.ended` events when the inner function returned. Now narrowed to the terminal-only union (`ok` / `error` / `aborted` / `skipped`) at the persistence boundary.
123
+ - `String.prototype.replace` callback signature gotcha in `redactor.ts` — for regexes without capture groups, the second arg is the *offset* (a number), not undefined. Patterns with no capture group were silently failing to redact because the heuristic check `if (group1 !== undefined)` treated the numeric offset as truthy. Fixed by inspecting the pattern source for non-`(?:` parentheses to decide whether the regex declares a capture group.
124
+
125
+ ## [2.1.1] - 2026-05-14
126
+
127
+ _Auto-generated entry. Edit CHANGELOG.md directly before
128
+ the next release to curate this section._
129
+
130
+ ### Changed
131
+
132
+ - Merge pull request #98 from muhammed-eldabea/TestMain (4ccb158)
133
+ - feat(gemini-client): 429 fallback, request timeout, crash detection + warm session_start (7907845)
134
+ - feat(perf): hermetic + live LLM response-time benchmarks (704d9a6)
135
+ - fix(test): canonicalize tempdir in test_lsp_tool for macOS (80589ab)
136
+ - Merge pull request #94 from muhammed-eldabea/claude/ai-dev-2026-analysis-CnFOW (b9829ef)
137
+ - fix(security): clear CodeQL alert + sweep docs to current state (85d399a)
138
+ - fix: close four self-raised follow-up gaps from prior commits (68c7ea4)
139
+ - docs(agent): make code/memory tools self-discoverable + warm the stance (a37502f)
140
+ - feat(codedigest): semantic + structural retrieval for internal agents (77c7fa2)
141
+ - feat(codedigest): Crabviz-style LSP call graph (DKB follow-up to #82) (5fd7dff)
142
+ - feat(cli #92): /pr-autofix — Critic + apply deterministic fixes on PR (746e295)
143
+ - feat(observability #91): /pr-metrics AI-vs-human cohort report (61333bb)
144
+ - feat(mcp #90): hardware tools (JLink/CAN/LIN/Saleae/DBC) over MCP (0ee4e7b)
145
+ - feat(cli #87): /diff-walk — Critic per hunk (5016806)
146
+ - feat(speckit #88): /speckit critique subcommand (5cafdab)
147
+ - feat(codedigest #82): bidirectional symbol graph + tree-sitter AST scaffold (32b969b)
148
+ - feat(squad #86): swe6-critic skill + opt-in Critic phase (65be70f)
149
+ - feat(budgets #93): per-command + per-session token-budget ceilings (d464215)
150
+ - feat(security #89): --air-gapped runtime mode (83030d6)
151
+ - feat(security #84): MCP server pinning + skill audit scanner (faf2832)
152
+ - feat(security #83): slopsquatting / phantom-package defense hook (50775ed)
153
+ - docs(#85): rewrite CLAUDE.md to reflect TypeScript monorepo + drift gate (fc46f91)
154
+
6
155
  ## [2.1.0] - 2026-05-13
7
156
 
8
157
  _Auto-generated entry. Edit CHANGELOG.md directly before