novahiz 0.4.1 → 0.5.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
@@ -5,6 +5,88 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.5.2] - 2026-10-05
9
+
10
+ Maintenance release closing the three leftovers traced right after `0.5.1`:
11
+ the installer's dead `plugin` config key, the unread `tokens` block of the
12
+ example config, and the scheduler's 0 ms wake loop on a busy task.
13
+
14
+ ### Fixed
15
+
16
+ - `install/install.mjs` no longer writes a `"plugin"` array of **file paths**
17
+ into a freshly created `opencode.jsonc`. opencode never read it (the plugins
18
+ are loaded from `<config>/plugins`, proved in E2E: the key pointed at the
19
+ repo while the loaded copies came from the plugins directory) and a file
20
+ entry triggered `configured plugin path must be a directory` at every
21
+ startup. Existing configs are left untouched.
22
+ - `novahiz.config.example.json` no longer advertises a `tokens` block
23
+ (`enabled`, `trimOutputs`, `keepHeadLines`, `dedupeReads`, `capOutputTokens`,
24
+ `trimTools`, …) that no code ever read — a leftover of a layer that was never
25
+ shipped. The example now carries exactly the keys `defaultConfig()` writes,
26
+ and `docs/TOKENS.md` states it instead of pointing at a block that should
27
+ not be there.
28
+ - `mcp/clepsydre/src/scheduler.ts`: `arm()` no longer arms a timer for a task
29
+ that is already running. A past-due schedule on a busy task used to feed a
30
+ 0 ms `wake → skip → arm` loop (one task-store read per turn) for the whole
31
+ execution, and a manual trigger could sustain it. The lock release now goes
32
+ through `release()`, which re-evaluates the calendar once the task is free,
33
+ so a due occurrence is still caught up exactly once instead of by the spin.
34
+
35
+ ## [0.5.1] - 2026-10-05
36
+
37
+ Fix-forward release: the `v0.5.0` tag was pushed but its CI never reached
38
+ `npm publish`, so no `0.5.0` exists on the registry.
39
+
40
+ ### Fixed
41
+
42
+ - `tests/memory-robust.test.ts` built the child process's import URL from a
43
+ hardcoded absolute path (`file:///C:/Users/...`): the two-process lock test
44
+ only passed on one machine and failed every CI run with "le fils ne s'est
45
+ jamais signale pret". The URL now derives from `import.meta.url`.
46
+ - `tests/clepsydre-scheduler.test.ts` (lock test) observed the released lock
47
+ a single `setImmediate` after `release()`, racing a wake armed at delay 0
48
+ for a past-due schedule: depending on event-loop timing it saw either
49
+ `busy = []` or the task re-locked by a second execution. The test stops the
50
+ wake before observing the state, so the lock-release assertion is
51
+ deterministic. The re-arm it exposes (a past-due schedule on a busy task
52
+ keeps `arm()` at delay 0) is left to the scheduler, not to this release.
53
+
54
+ ## [0.5.0] - 2026-10-05
55
+
56
+ ### Added
57
+
58
+ - **Token economy, plugin + skill** (`adapters/opencode/novahiz-token-economy.ts`,
59
+ `skills/token-economy/SKILL.md`): the plugin trims oversized tool output
60
+ before it reaches the model - head kept, full text written to
61
+ `<NOVAHIZ_HOME>/tmp/tool-output/`, footer naming the file to re-read instead
62
+ of re-running - and `/novahiz-tokens` posts the estimated saving for the
63
+ session without a model call. Strictly opt-in: nothing happens until
64
+ `NOVAHIZ_TOKEN_ECONOMY=1`, `read`/`edit`/`write` and skill output are never
65
+ trimmed, and any plugin error fails open. Budgets: `NOVAHIZ_TE_MAX_LINES`
66
+ (120), `NOVAHIZ_TE_MAX_BYTES` (16384), `NOVAHIZ_TE_TOOLS`,
67
+ `NOVAHIZ_TE_DUMP_DIR`. The skill carries the agent-side rules (read the
68
+ smallest thing, batch calls, delegate exploration, answer in paths).
69
+ - The installer now copies both plugin files into `<config>/plugins/`, the
70
+ directory opencode actually loads plugins from.
71
+
72
+ ### Fixed
73
+
74
+ - **Argus vulnerable fixtures are no longer collected by the test runner**:
75
+ `mcp/argus/src/test/` was renamed to `mcp/argus/src/fixtures/`, so
76
+ `node --test` (and `node scripts/ci-local.mjs`) stops picking
77
+ `test_xss.js` - a deliberately vulnerable sample - up as a test file and
78
+ failing on `require is not defined in ES module scope`. The argus end-to-end
79
+ suite still reports 30/30.
80
+ - `tests/clepsydre-tools.test.ts` used a one-shot date hardcoded to
81
+ `2026-10-05T09:00:00Z`, which started failing once the clock passed it; the
82
+ test now uses a date relative to now.
83
+
84
+ ### Docs
85
+
86
+ - `docs/TOKENS.md` rewritten around what is implemented (the plugin, the
87
+ skill, `novahiz tokens`); it now states that the `tokens` block of
88
+ `novahiz.config.example.json` is read by no code.
89
+
8
90
  ## [0.4.1] - 2026-10-05
9
91
 
10
92
  ### Fixed