novahiz 0.3.7 → 0.4.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 +111 -0
- package/NOTICE.md +12 -7
- package/README.md +400 -392
- package/adapters/README.md +2 -2
- package/adapters/opencode/agent/novahiz.md +1 -1
- package/adapters/opencode/instructions.md +1 -1
- package/adapters/opencode/novahiz-plugin.ts +1716 -0
- package/catalog/providers.json +40 -28
- package/catalog/rules.json +8 -4
- package/dist/classify.js +7 -1
- package/dist/cli.js +16 -8
- package/dist/commands/doctor.js +218 -93
- package/dist/commands/gate.js +37 -7
- package/dist/commands/graph.js +321 -0
- package/dist/commands/inspect.js +44 -7
- package/dist/commands/memory.js +774 -0
- package/dist/commands/second-memory.js +1070 -0
- package/dist/commands/snap.js +339 -0
- package/dist/commands/task.js +27 -8
- package/dist/db.js +32 -6
- package/dist/exec.js +6 -2
- package/dist/gate-repair.js +6 -5
- package/dist/gate.js +24 -5
- package/dist/git.js +152 -0
- package/dist/graph/extract.js +1149 -0
- package/dist/graph/lexer.js +257 -0
- package/dist/graph/query.js +338 -0
- package/dist/graph/resolve.js +330 -0
- package/dist/graph/store.js +279 -0
- package/dist/impeccable.js +1 -1
- package/dist/ledger.js +150 -26
- package/dist/memory-fts.js +219 -0
- package/dist/memory.js +750 -53
- package/dist/providers.js +6 -2
- package/dist/relevance.js +51 -0
- package/dist/search/query.js +141 -0
- package/dist/search/store.js +377 -0
- package/dist/search/tokenize.js +96 -0
- package/dist/snap.js +669 -0
- package/dist/spec.js +66 -4
- package/docs/ARCHITECTURE.md +6 -6
- package/docs/CATALOG.md +5 -5
- package/docs/CLI.md +75 -0
- package/docs/CONFIGURATION.md +5 -5
- package/docs/GRAPH.md +115 -0
- package/docs/HARNESSES.md +8 -25
- package/docs/INSTALL.md +8 -5
- package/docs/PLUGIN.md +47 -39
- package/docs/PROVIDERS.md +30 -22
- package/install/bootstrap.mjs +63 -24
- package/install/install.mjs +592 -631
- package/install/lib.mjs +57 -11
- package/mcp/argus/IMPLEMENTATION-SUMMARY.md +122 -0
- package/mcp/argus/README.md +156 -0
- package/mcp/argus/package.json +25 -0
- package/mcp/argus/src/analysis/ruleEngine.mjs +330 -0
- package/mcp/argus/src/analysis/scanner.mjs +189 -0
- package/mcp/argus/src/cli.mjs +335 -0
- package/mcp/argus/src/commands/test.mjs +348 -0
- package/mcp/argus/src/config.mjs +31 -0
- package/mcp/argus/src/test/test_hardcoded.php +18 -0
- package/mcp/argus/src/test/test_injection.sh +16 -0
- package/mcp/argus/src/test/test_vulnerable.py +19 -0
- package/mcp/argus/src/test/test_xss.js +17 -0
- package/mcp/argus/src/tools/createRuleTool.mjs +75 -0
- package/mcp/argus/src/tools/exportResultsTool.mjs +213 -0
- package/mcp/argus/src/tools/listRulesTool.mjs +52 -0
- package/mcp/argus/src/tools/scanTool.mjs +74 -0
- package/mcp/argus/src/tools/tool.mjs +45 -0
- package/mcp/argus/src/tools/toolManager.mjs +57 -0
- package/mcp/argus/tmp/argus/argus-results-1791138636150.json +83 -0
- package/mcp/clepsydre/index.mjs +76 -0
- package/mcp/clepsydre/src/cron.ts +414 -0
- package/mcp/clepsydre/src/executors.ts +183 -0
- package/mcp/clepsydre/src/protocol.ts +125 -0
- package/mcp/clepsydre/src/scheduler.ts +330 -0
- package/mcp/clepsydre/src/store.ts +221 -0
- package/mcp/clepsydre/src/tools.ts +533 -0
- package/mcp/lodestone/index.mjs +61 -0
- package/mcp/lodestone/src/handle.ts +330 -0
- package/mcp/novahiz-docs/COMPARE.md +96 -0
- package/mcp/novahiz-docs/data/catalog.json +57 -0
- package/mcp/novahiz-docs/data/index.sqlite +0 -0
- package/mcp/novahiz-docs/index.mjs +53 -0
- package/mcp/novahiz-docs/src/catalog.ts +85 -0
- package/mcp/novahiz-docs/src/chunk.ts +266 -0
- package/mcp/novahiz-docs/src/ingest.ts +482 -0
- package/mcp/novahiz-docs/src/proto.ts +237 -0
- package/mcp/novahiz-docs/src/query.ts +199 -0
- package/mcp/novahiz-docs/src/resolve.ts +103 -0
- package/mcp/novahiz-docs/src/store.ts +225 -0
- package/mcp/novahiz-docs/tests/fixtures/query-client.md +46 -0
- package/mcp/novahiz-docs/tests/fixtures/react-state.md +37 -0
- package/mcp/novahiz-gate/README.md +30 -0
- package/mcp/novahiz-gate/index.mjs +322 -0
- package/mcp/novahiz-tools/README.md +26 -7
- package/mcp/novahiz-tools/index.mjs +688 -170
- package/novahiz.config.example.json +3 -3
- package/package.json +8 -6
- package/scripts/ci-local.mjs +71 -0
- package/skills/gate/SKILL.md +4 -4
- package/skills/novahiz-analyse/SKILL.md +1 -1
- package/skills/novahiz-delta-review/SKILL.md +1 -1
- package/skills/novahiz-gate/SKILL.md +1 -1
- package/skills/novahiz-implement/SKILL.md +18 -1
- package/skills/novahiz-memory/SKILL.md +6 -0
- package/skills/novahiz-second-memory/SKILL.md +355 -0
- package/skills/prompt-rewriter/SKILL.md +2 -2
- package/src/classify.ts +10 -1
- package/src/cli.ts +16 -8
- package/src/commands/doctor.ts +856 -736
- package/src/commands/gate.ts +36 -7
- package/src/commands/graph.ts +342 -0
- package/src/commands/inspect.ts +46 -7
- package/src/commands/memory.ts +816 -0
- package/src/commands/second-memory.ts +1115 -0
- package/src/commands/snap.ts +378 -0
- package/src/commands/task.ts +24 -8
- package/src/db.ts +31 -6
- package/src/exec.ts +6 -2
- package/src/gate-repair.ts +6 -5
- package/src/gate.ts +24 -5
- package/src/git.ts +189 -0
- package/src/graph/extract.ts +1155 -0
- package/src/graph/lexer.ts +283 -0
- package/src/graph/query.ts +481 -0
- package/src/graph/resolve.ts +409 -0
- package/src/graph/store.ts +332 -0
- package/src/impeccable.ts +1 -1
- package/src/ledger.ts +169 -36
- package/src/memory-fts.ts +255 -0
- package/src/memory.ts +851 -52
- package/src/providers.ts +6 -3
- package/src/relevance.ts +63 -0
- package/src/search/query.ts +186 -0
- package/src/search/store.ts +425 -0
- package/src/search/tokenize.ts +105 -0
- package/src/snap.ts +759 -0
- package/src/spec.ts +105 -4
- package/adapters/claude/agent/novahiz.md +0 -23
- package/adapters/opencode/novahiz.ts +0 -895
- package/dist/commands/graft.js +0 -146
- package/dist/commands/hook.js +0 -204
- package/dist/graft.js +0 -257
- package/dist/hook.js +0 -176
- package/install/hooks.mjs +0 -171
- package/src/commands/graft.ts +0 -165
- package/src/commands/hook.ts +0 -238
- package/src/graft.ts +0 -254
- package/src/hook.ts +0 -203
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Novahiz are documented in this file.
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.4.0] - 2026-10-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Zero-friction install for the community** - `providers.autoInstall` now
|
|
13
|
+
defaults to `true` (the official skill packs impeccable, flutter, dart and
|
|
14
|
+
expo install with `novahiz-install`, so gate rule R14 never blocks a fresh
|
|
15
|
+
setup); Playwright MCP installs globally using the catalog pin instead of an
|
|
16
|
+
on-demand npx download; the postinstall dry-run prints the exact next step;
|
|
17
|
+
`files` ships `CHANGELOG.md` and `scripts/` so `npm run ci:local` works from
|
|
18
|
+
the published package. Version 0.4.0 (breaking renames: plugin
|
|
19
|
+
`novahiz-plugin.ts`, MCP `novahiz-<function>` ids).
|
|
20
|
+
- **clepsydre** - a local scheduling MCP server (`mcp/clepsydre`) written in
|
|
21
|
+
this repository with zero npm dependency: 5-field cron expressions plus
|
|
22
|
+
macros, `every Ns/Nm` intervals, one-shot ISO dates, IANA timezones, an
|
|
23
|
+
atomic JSON store with a JSONL execution journal, and 14 `clepsydre_*` tools
|
|
24
|
+
(CRUD, enable/disable, detached manual runs, history, schedule validation).
|
|
25
|
+
Both MCP protocol eras are supported (`initialize` legacy and the 2026-07-28
|
|
26
|
+
`server/discover` era). The stdio transport, protocol layer, parser,
|
|
27
|
+
scheduler, and executors are original code — no third-party scheduler code
|
|
28
|
+
is used or vendored.
|
|
29
|
+
- `clepsydre-mcp` bin entry in `package.json`; `mcp-clepsydre-probe` check in
|
|
30
|
+
`novahiz doctor --deep`.
|
|
31
|
+
- `novahiz-gate` — the rule gate extracted from the core server into its own
|
|
32
|
+
stdio MCP server (`mcp/novahiz-gate`, tool `novahiz_gate`, same `src/gate.ts`
|
|
33
|
+
core as the CLI), with `mcp-gate` and `mcp-gate-probe` checks in
|
|
34
|
+
`novahiz doctor` (the probe runs with `--deep`).
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Plugin file renamed to the same `novahiz-<function>` convention:
|
|
39
|
+
`adapters/opencode/novahiz.ts` → `novahiz-plugin.ts`, in the source tree and
|
|
40
|
+
in `~/.config/opencode/plugins/` (installer scripts, doctor `adapter` check,
|
|
41
|
+
tests, and docs follow).
|
|
42
|
+
- MCP server ids renamed to the `novahiz-<function>` convention:
|
|
43
|
+
`lodestone` → `novahiz-search`, `clepsydre` → `novahiz-scheduler`, `argus` →
|
|
44
|
+
`novahiz-scan`, `novahiz` → `novahiz-core`. Updated in
|
|
45
|
+
`catalog/providers.json`, `opencode.jsonc`, the installer templates, the
|
|
46
|
+
plugin fallback and the docs; tool names (`lodestone_*`, `clepsydre_*`,
|
|
47
|
+
`novahiz_*`) and file paths are unchanged.
|
|
48
|
+
|
|
49
|
+
- The external scheduler providers are replaced by the local `clepsydre`
|
|
50
|
+
server: `opencode.jsonc` now launches `node mcp/clepsydre/index.mjs`
|
|
51
|
+
instead of the former `mcp-cron` command, `catalog/providers.json` lists
|
|
52
|
+
`clepsydre` (local, Apache-2.0) in place of the `cron` venv-clone entry,
|
|
53
|
+
and the `cron_*` gate tools were renamed to their `clepsydre_*`
|
|
54
|
+
equivalents across `src/spec.ts`, `install/lib.mjs`, the adapter, the
|
|
55
|
+
configs, and `docs/CONFIGURATION.md`.
|
|
56
|
+
- `providers.disabled` defaults to `[]`: every bundled server now runs
|
|
57
|
+
locally with no setup step.
|
|
58
|
+
|
|
59
|
+
### Removed
|
|
60
|
+
|
|
61
|
+
- The `cron` provider entry (third-party scheduler clone) and its
|
|
62
|
+
documentation. Replaced by `clepsydre`; no third-party scheduler
|
|
63
|
+
dependency remains. See `NOTICE.md` for provenance.
|
|
64
|
+
- The `security` provider (`security-mcp`) and every installation vector for
|
|
65
|
+
it: the entry is gone from `catalog/providers.json`, and `install.mjs` /
|
|
66
|
+
`bootstrap.mjs` keep an empty MCP install list while purging any trace of
|
|
67
|
+
`security-mcp` or `mcp-cron` (shim and global package) on every run — never
|
|
68
|
+
reinstall, per explicit user decision. `providers.disabled` in
|
|
69
|
+
`novahiz.config.json` keeps the id out of the registry; the `audit` category
|
|
70
|
+
stays served by `novahiz-scan`.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- **Default-path skill packs installed again** - `providers.autoInstall` runs
|
|
75
|
+
`deps --install` on every fresh setup, which exposed a latent guard refusal:
|
|
76
|
+
`refused unsafe token: *` on the `--skill *` commands of flutter-skills and
|
|
77
|
+
dart-skills (expo and impeccable listed their skills explicitly and passed).
|
|
78
|
+
`SAFE_TOKEN` in `src/exec.ts` now admits `*` with the rationale on the spot:
|
|
79
|
+
cmd.exe does not glob and the POSIX branch spawns without a shell, so the
|
|
80
|
+
glob reaches the skills CLI, which expands it. Verified 4/4 `ok`.
|
|
81
|
+
- **Audit 2026-09-25 follow-up — every P0→P3 finding resolved in one batch.**
|
|
82
|
+
- **P0 (secret exposure)** — the Stitch API key left `opencode.jsonc`: the
|
|
83
|
+
header now references `{env:NOVAHIZ_STITCH_API_KEY}` and the value lives in
|
|
84
|
+
the user environment (never logged, never printed). Rotating the key in the
|
|
85
|
+
Google Cloud console is the one manual step remaining.
|
|
86
|
+
- **P1 (gate hardening)** — the CLI accepts `--tools` (the plugin passes its
|
|
87
|
+
frozen snapshot, so a live `gate.tools` edit cannot weaken enforcement
|
|
88
|
+
before the required restart) and `--prompt` (the last prompt seeds the
|
|
89
|
+
tier); it classifies the seed itself when `--categories` is empty instead
|
|
90
|
+
of evaluating unscoped, failing closed only when classification breaks.
|
|
91
|
+
The MCP gate follows: tool case normalized, DB-recorded skills unioned
|
|
92
|
+
like the CLI, warn/audit mode reports `wouldBlock` instead of blocking
|
|
93
|
+
silently, and only block mode fails closed on DB errors.
|
|
94
|
+
- **P2 (robustness)** — the plugin runner is async: a CLI/MCP call can no
|
|
95
|
+
longer freeze OpenCode's event loop for up to 30 s, and a deterministic
|
|
96
|
+
timeout flag replaced the status/signal heuristic. `novahiz-scan` joined
|
|
97
|
+
the hard-coded MCP fallbacks and every catalog server registers with a
|
|
98
|
+
structured 120 s timeout. `snap_restore` and `clepsydre_enable_task` joined
|
|
99
|
+
`gate.tools` across all six copies; R8 covers the docs tree,
|
|
100
|
+
README/CHANGELOG and docs-writing prompts; R13/R14 skip sub-200-char
|
|
101
|
+
touch-ups (`minChange: 200`; the doctor's operational probe now carries a
|
|
102
|
+
real CSS payload and asserts the trivial case stays allowed); classify's
|
|
103
|
+
lite tier only advertises skills the gate enforces; the inline gate-repair
|
|
104
|
+
text gained its step 3; `writeState` writes through a temp file + rename;
|
|
105
|
+
the dirty-path marker rejects cross-drive absolute paths; prompt text is
|
|
106
|
+
no longer logged (language + size only); doctor flags missing script
|
|
107
|
+
arguments (R1) and version-drifted installed copies (R6).
|
|
108
|
+
- **P3 (hygiene)** — purged 63 `*.novahiz-bak`/`*.pre-v2` files, the stale
|
|
109
|
+
`opencode.jsonc.bak`, and the dead `mcp-cron`/`security-mcp` global shims
|
|
110
|
+
(with two orphaned `mcp-cron` processes); repaired three memory slots
|
|
111
|
+
(addendum heading, duplicated review block, comma-split tags).
|
package/NOTICE.md
CHANGED
|
@@ -24,14 +24,19 @@ If you hold rights to a skill and want a different attribution or a removal, ope
|
|
|
24
24
|
|
|
25
25
|
Providers are referenced by install command, never vendored. Each lists its upstream package, repository, and SPDX license in `catalog/providers.json`.
|
|
26
26
|
|
|
27
|
+
### novahiz-scheduler (local scheduler)
|
|
28
|
+
|
|
29
|
+
`mcp/clepsydre` is written entirely in this repository: cron parser, persistence, scheduler, executors, tool layer, and MCP protocol layer are original code with zero npm dependency. No code, algorithm transcription, or copied text comes from the AGPL `mcp-cron` package (github.com/jolks/mcp-cron) or from any other third-party scheduler; both are referenced by name only, as replacements. The implementation was designed from the MCP specification and this project's own requirements, and is licensed Apache-2.0 like the rest of Novahiz.
|
|
30
|
+
|
|
27
31
|
| Id | Upstream package | Repository | License |
|
|
28
32
|
| --- | --- | --- | --- |
|
|
29
33
|
| `playwright` | `@playwright/mcp` | https://github.com/microsoft/playwright-mcp | Apache-2.0 |
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `novahiz` | local Novahiz MCP | https://github.com/novahiz/novahiz | Apache-2.0 |
|
|
34
|
+
| `novahiz-search` | local Novahiz Search MCP (house, clean-room) | https://github.com/novahiz/novahiz | Apache-2.0 |
|
|
35
|
+
| `novahiz-docs` | local novahiz-docs MCP | https://github.com/novahiz/novahiz | Apache-2.0 |
|
|
36
|
+
| `novahiz-scheduler` | local Novahiz scheduler MCP (house, clean-room, zero npm dependency) | https://github.com/novahiz/novahiz | Apache-2.0 |
|
|
37
|
+
| `novahiz-core` | local Novahiz core MCP | https://github.com/novahiz/novahiz | Apache-2.0 |
|
|
38
|
+
| `novahiz-gate` | local Novahiz gate MCP | https://github.com/novahiz/novahiz | Apache-2.0 |
|
|
39
|
+
| `novahiz-scan` | local static-analysis MCP (house, clean-room) | https://github.com/novahiz/novahiz | MIT |
|
|
35
40
|
| `dart` | Dart SDK (`dart mcp-server`) | https://github.com/dart-lang/ai (pkgs/dart_mcp_server) | BSD-3-Clause |
|
|
36
41
|
|
|
37
42
|
## Skill packs (upstream, not vendored)
|
|
@@ -54,8 +59,8 @@ Installed on demand with `npx skills add` (or an upstream tarball when git trans
|
|
|
54
59
|
| `@mohak34/opencode-notifier` | https://github.com/mohak34/opencode-notifier | MIT | removed 2026-09-26 |
|
|
55
60
|
| `@tarquinen/opencode-dcp` | https://github.com/Opencode-DCP/opencode-dynamic-context-pruning | AGPL-3.0-or-later | removed 2026-09-26 |
|
|
56
61
|
|
|
57
|
-
The Novahiz adapter (`adapters/opencode/novahiz.ts`) is first-party under Apache-2.0.
|
|
62
|
+
The Novahiz adapter (`adapters/opencode/novahiz-plugin.ts`) is first-party under Apache-2.0.
|
|
58
63
|
|
|
59
64
|
## Dependencies
|
|
60
65
|
|
|
61
|
-
The core and the MCP server use Node.js built-ins only. The opencode adapter imports only Node.js built-ins and the `@opencode
|
|
66
|
+
The core and the MCP server use Node.js built-ins only. The opencode adapter imports only Node.js built-ins and the `@opencode/plugin` types, which the harness provides.
|