@graphorin/cli 0.6.0 → 0.7.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 +80 -0
- package/README.md +4 -4
- package/dist/bin/graphorin.js +51 -13
- package/dist/bin/graphorin.js.map +1 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +2 -1
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/consolidator.d.ts +56 -1
- package/dist/commands/consolidator.d.ts.map +1 -1
- package/dist/commands/consolidator.js +88 -2
- package/dist/commands/consolidator.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +4 -4
- package/dist/commands/init.d.ts +11 -4
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +15 -11
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/memory.d.ts +26 -1
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +56 -3
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/migrate-export.d.ts +1 -2
- package/dist/commands/migrate-export.d.ts.map +1 -1
- package/dist/commands/migrate-export.js +2 -1
- package/dist/commands/migrate-export.js.map +1 -1
- package/dist/commands/pricing.d.ts +6 -0
- package/dist/commands/pricing.d.ts.map +1 -1
- package/dist/commands/pricing.js +5 -2
- package/dist/commands/pricing.js.map +1 -1
- package/dist/commands/secrets.d.ts.map +1 -1
- package/dist/commands/secrets.js +2 -2
- package/dist/commands/secrets.js.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +1 -1
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/storage.d.ts +41 -1
- package/dist/commands/storage.d.ts.map +1 -1
- package/dist/commands/storage.js +75 -1
- package/dist/commands/storage.js.map +1 -1
- package/dist/commands/token.d.ts.map +1 -1
- package/dist/commands/token.js +2 -2
- package/dist/commands/token.js.map +1 -1
- package/dist/commands/tools-lint.js +1 -1
- package/dist/commands/tools-lint.js.map +1 -1
- package/dist/commands/traces.d.ts +14 -2
- package/dist/commands/traces.d.ts.map +1 -1
- package/dist/commands/traces.js +39 -22
- package/dist/commands/traces.js.map +1 -1
- package/dist/commands/triggers.d.ts.map +1 -1
- package/dist/commands/triggers.js +5 -2
- package/dist/commands/triggers.js.map +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/output.js +6 -0
- package/dist/internal/output.js.map +1 -1
- package/dist/internal/store-context.js +13 -2
- package/dist/internal/store-context.js.map +1 -1
- package/dist/package.js +6 -0
- package/dist/package.js.map +1 -0
- package/package.json +18 -14
- package/src/bin/graphorin.ts +1387 -0
- package/src/commands/audit.ts +256 -0
- package/src/commands/auth.ts +238 -0
- package/src/commands/consolidator.ts +382 -0
- package/src/commands/doctor.ts +253 -0
- package/src/commands/guard.ts +144 -0
- package/src/commands/index.ts +223 -0
- package/src/commands/init.ts +194 -0
- package/src/commands/memory.ts +1052 -0
- package/src/commands/migrate-config.ts +77 -0
- package/src/commands/migrate-export.ts +117 -0
- package/src/commands/migrate.ts +83 -0
- package/src/commands/pricing.ts +244 -0
- package/src/commands/secrets.ts +309 -0
- package/src/commands/skills.ts +272 -0
- package/src/commands/start.ts +180 -0
- package/src/commands/storage.ts +659 -0
- package/src/commands/telemetry.ts +91 -0
- package/src/commands/token.ts +361 -0
- package/src/commands/tools-lint.ts +430 -0
- package/src/commands/traces.ts +188 -0
- package/src/commands/triggers.ts +237 -0
- package/src/index.ts +30 -0
- package/src/internal/exit.ts +62 -0
- package/src/internal/load-config.ts +107 -0
- package/src/internal/offline.ts +81 -0
- package/src/internal/output.ts +146 -0
- package/src/internal/prompts.ts +58 -0
- package/src/internal/store-context.ts +165 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# @graphorin/cli
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-072: every export map's `import` condition becomes `default`, and the Node floor rises to `>=22.12.0`.
|
|
8
|
+
|
|
9
|
+
CJS consumers previously hit a bewildering `ERR_PACKAGE_PATH_NOT_EXPORTED` instead of a clear ESM-only signal. With the `default` condition, plain `require('@graphorin/core')` works via Node's stable `require(esm)` - which shipped in 22.12, hence the engines bump across every workspace manifest (packages, examples, benchmarks, docs; enforced by the widened mvp-readiness sweep). No dual-instance hazard: there is no CJS build, `require()` returns the same ESM module instance. ESM consumers are unaffected (`default` serves both paths; `types` stays first). The pack gate now runs attw under the full `node16` profile (was `esm-only`) and adds a runtime `require(esm)` smoke against the packed tarballs. Installs on Node 22.0-22.11 with `engine-strict` will refuse - upgrade Node (see the migration guide).
|
|
10
|
+
|
|
11
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-003/W-041: `graphorin init` stops printing a dead credential and stops teaching argv secrets.
|
|
12
|
+
|
|
13
|
+
init generated and printed a "bootstrap admin token (shown ONCE)" whose hash was never persisted anywhere - verification requires an HMAC lookup in the auth-token store (migrations + pepper), and init's contract is "write the config file only" - so the token was guaranteed to 401; the working path (`graphorin token create` after `migrate`) was not even mentioned. Following the IP-4 honesty precedent, init no longer emits a token (`InitCommandResult.bootstrapToken` removed - BREAKING for scripts parsing it, though the value never worked) and the next-steps now walk the real path: (1) persist the pepper via stdin - `printf '%s' '<hex>' | graphorin secrets set graphorin_server_pepper --from-stdin`, never `--value` on argv, which parked the key material behind every token HMAC in shell history (W-041); (2) `graphorin migrate`; (3) `graphorin token create --label bootstrap` (raw token shown once, verifiable); (4) `graphorin start`. The pepper hex is still printed exactly once to stderr.
|
|
14
|
+
|
|
15
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-068: migration-runner TOCTOU fence + read-only CLI commands stop auto-migrating live databases.
|
|
16
|
+
|
|
17
|
+
`runMigrations` re-checks `schema_migrations` INSIDE each per-migration IMMEDIATE transaction: when two processes race to migrate one file, the loser now skips (no-op) instead of crashing on non-idempotent SQL ("duplicate column name"). New read-only `pendingMigrations(conn)` helper reads `sqlite_master` first, so probing a foreign database never marks it by creating the bookkeeping table. The CLI store context gains `migrationPolicy: 'apply' | 'check'`; read-only commands (`memory inspect`/`activity`, `traces status|prune`, `triggers list`, `consolidator status`/`dlq-list`) now run with `'check'`: a newer CLI pointed at a running (older) server's database refuses with "schema is N migration(s) behind ... run 'graphorin migrate' (with the server stopped) or use a CLI version matching the server" instead of silently upgrading the schema under the live process. BEHAVIOR CHANGE: those commands now also refuse on a never-migrated database instead of creating the schema as a side effect.
|
|
18
|
+
|
|
19
|
+
- [#153](https://github.com/o-stepper/graphorin/pull/153) [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534) Thanks [@o-stepper](https://github.com/o-stepper)! - Reachable retention lever for `memory_history` (W-066):
|
|
20
|
+
|
|
21
|
+
- `@graphorin/core`: new `MemoryStoreExt` contract (`extends MemoryStore` with `pruneHistory(olderThanMs)`), mirroring the `SessionStoreExt` precedent - strictly additive, custom `MemoryStore` implementations keep compiling. The TSDoc pins the unit semantics: the argument is an AGE in milliseconds, never an epoch cutoff.
|
|
22
|
+
- `@graphorin/store-sqlite`: `SqliteMemoryStore` declares `implements MemoryStoreExt` and `GraphorinSqliteStore.memory` is now typed `MemoryStoreExt`, so `pruneHistory` is reachable without casts.
|
|
23
|
+
- `@graphorin/cli`: new `graphorin memory prune-history --older-than <duration|date>` command. `--older-than` is mandatory (destructive by design, no default), takes a duration (`30d`, `12h`) or a PAST ISO date (converted to `now - date`; future dates are refused - they would prune the whole table). Documented in the CLI guide and the memory-system guide: history grows by design, `purge()` already scrubs sensitive text, pruning is storage-cost hygiene.
|
|
24
|
+
|
|
25
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-065: lifecycle owners for four small tables. `SqliteConsolidatorStateStore` gains `pruneRuns(beforeEpochMs)` (terminal per-tick run-log rows; `status='running'` always survives) and `pruneExhaustedBatches(beforeEpochMs)` (DLQ batches parked forever with `next_retry_at IS NULL`; batches awaiting retry stay claimable). New CLI `graphorin consolidator dlq-list` / `dlq-clear` (`--exhausted-only` default true, `--before`, `--id`, `--user`) make the permanent `dead-letter queue: N` status warning actionable - operator-level, cross-user, in the same style as the existing `dlqSize` counter. `IdempotencyStore.prune`'s TSDoc now names its production caller (the server's hourly sweep). Migration 031 drops the dead `trigger_fire_log` table (created by 007, never written or read by any code; append-only discipline preserved - 007 untouched).
|
|
26
|
+
|
|
27
|
+
- [#158](https://github.com/o-stepper/graphorin/pull/158) [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab) Thanks [@o-stepper](https://github.com/o-stepper)! - Database-file compaction path (W-064). `openConnection` now declares `PRAGMA auto_vacuum = INCREMENTAL` on every database it CREATES (checked via `page_count == 0`, right after the cipher pragmas, so encrypted databases opened through the `store-sqlite-encrypted` delegate get it automatically; pre-existing databases are untouched - the pragma is a spec-guaranteed no-op there). New `graphorin storage compact` command: `wal_checkpoint(TRUNCATE)` + batched `PRAGMA incremental_vacuum` (`--batch-pages`, default 1000, keeps writer locks short) + a final checkpoint, reporting freelist before/after and reclaimed bytes. Unlike the forbidden `VACUUM`, incremental vacuum relocates free pages through the pointer map without renumbering implicit rowids, so FTS5 external-content mappings survive - covered by an integrity + search test. On a database created before this version (`auto_vacuum=0`) the command reports the high-water-mark limitation honestly and exits 0 without modifying the file; reclaiming disk there requires recreating the store. Docs: storage guide danger-block extended with the incremental-vacuum contrast, cli + deployment guides gain the command.
|
|
28
|
+
|
|
29
|
+
- [#160](https://github.com/o-stepper/graphorin/pull/160) [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156) Thanks [@o-stepper](https://github.com/o-stepper)! - W-097: `graphorin pricing refresh` finally works against the dataset the docs point at. New pure converter (`convertGenaiPrices` / `isGenaiPricesShape`, exported) maps the published `@pydantic/genai-prices` dataset (providers[] -> models[] -> per-Mtok prices incl. cache read/write legs) into per-token `ModelPrice` entries; unrepresentable model entries (tiered/conditional pricing) are skipped with a counter instead of failing the refresh, and the supported subset is pinned by a vendored fixture + doc comment. `refreshPricing` gains `format: 'auto' | 'graphorin' | 'genai-prices'` (default auto: native first, then detection), stamps converted snapshots `version: 'genai-prices+converted'` with an additive `PricingSnapshot.conversion { format, skipped }`, and REJECTS a dataset declaring a non-USD currency instead of silently stamping dollars. The CLI adds `--format` and prints the skipped count; the pricing reference documents a working raw-URL example. Native-shape refreshes are byte-identical; no baked-in endpoint was added (privacy contract).
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#153](https://github.com/o-stepper/graphorin/pull/153) [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534) Thanks [@o-stepper](https://github.com/o-stepper)! - Audit retention vs Merkle anchoring (W-062):
|
|
34
|
+
|
|
35
|
+
- `@graphorin/security`: fixed a crash in `pruneAudit` against the shipped better-sqlite3 binding - the re-hash loop wrote through the connection while `iterate()` held a live statement iterator, throwing "This database connection is busy executing a query" whenever surviving entries needed re-rooting (the in-memory test double masked it). Survivors are now rewritten in closed-iterator batches (bounded memory). The `pruneAudit` package docs now state explicitly that verification against ANY pre-prune Merkle checkpoint fails afterwards by design, indistinguishably from a truncate-and-re-root attack. A contract test pins this behavior.
|
|
36
|
+
- `@graphorin/cli`: `graphorin audit prune` prints a re-anchor reminder after every destructive prune (sign + distribute a fresh checkpoint, mark old anchors superseded).
|
|
37
|
+
- Security guide: new "Retention and anchoring" runbook (prune -> sign fresh checkpoint -> distribute -> supersede old anchors -> accept anchored-history reset) plus the documented identifier-level erasure limitation of the time-prefix-only prune.
|
|
38
|
+
|
|
39
|
+
- [#153](https://github.com/o-stepper/graphorin/pull/153) [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534) Thanks [@o-stepper](https://github.com/o-stepper)! - Help-text honesty sweep (W-040): `consolidator set-tier` / `consolidator stop` no longer promise persistence they never had (both report UNSUPPORTED with exit 2 and now say so, pointing at `consolidator.tier` in the config per the existing IP-4 note); `tools lint` and its module header describe the discovery as the text-based static scan it actually is, not "AST analysis". The CLI guide's `migrate-export` row/example gained the mandatory `--to <file>` (copy-paste no longer dies on "required option not specified"), the phantom `tools lint <path>` positional is gone, and the `pricing diff`/`lookup`/`missing` examples now carry their required options. The `check-cli-docs` gate grew a requiredOption pass (alias-aware, `--flag=value` aware) so this drift class fails CI from now on - it caught the three pricing examples immediately.
|
|
40
|
+
|
|
41
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-012: `encryptDatabase({ swap: true })` now probes for a live writer BEFORE touching the source and refuses with the new typed `EncryptSwapLiveWriterError` when another connection holds the database. The swap path renames the source file; a running server would keep writing into the renamed `.bak.<ts>` inode, silently diverging from the encrypted copy until `storage cleanup-backups` deletes those writes. The probe (a journal-mode switch, which sqlite3mc refuses with "database is locked" under any other open connection) restores WAL in `finally`; the probe-to-rename window remains a documented best-effort residual. CLI `--swap` help and the storage guide now state the stopped-server requirement.
|
|
42
|
+
|
|
43
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-002: exit codes are honored in `--json` mode. Eight commands set `process.exitCode` inside the `human()` callback of `emitReport`, which `--json` skips entirely - so exactly the machine consumers the flag exists for saw exit 0 on failure, worst of all `graphorin audit verify --json` returning 0 on a broken hash chain. The assignments are hoisted outside the callback (matching the existing doctor/tools-lint pattern) for: `audit verify`, `secrets get`, `secrets ref`, `token revoke`, `token verify`, `pricing lookup`, `skills inspect`, `triggers status`. `emitReport`'s doc now forbids side effects in `human()`. CI pipelines that (incorrectly) relied on exit 0 under `--json` on failure will now see the documented exit 1.
|
|
44
|
+
|
|
45
|
+
- [#154](https://github.com/o-stepper/graphorin/pull/154) [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04) Thanks [@o-stepper](https://github.com/o-stepper)! - W-007: `graphorin traces status|prune` now operates on the REAL `spans` table (migration 024) instead of a `traces` table no migration or runtime ever created. The command was a permanent no-op ("traces table not found") - an operator with `traces prune` in cron believed retention was handled while spans grew without bound. `status` reads counts + ISO time range from `start_unix_nano`; `prune` delegates to `pruneSpans` (deletes spans that FINISHED strictly before `--before`, index-backed). JSON field names (`oldestStartedAt`/`newestStartedAt`) are unchanged, so machine consumers keep working. NOTE: an existing cron `traces prune` will now actually delete old spans - that is the documented behavior finally happening.
|
|
46
|
+
|
|
47
|
+
- [#153](https://github.com/o-stepper/graphorin/pull/153) [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534) Thanks [@o-stepper](https://github.com/o-stepper)! - Release-flow hardening (W-015, repo-level): the root `version` script now chains `changeset version && node scripts/bump-version.mjs --sync`, so any Version Packages pass (bot or maintainer) leaves the private workspaces and every text version site synchronized and self-verified by `check-version-consistency` in one step. `release.yml` reads `secrets.RELEASE_PAT || secrets.GITHUB_TOKEN`, giving the maintainer two documented paths (fine-grained PAT or the repo setting allowing Actions to create PRs) to restore the fully-automatic Version Packages PR; without either, the documented manual flow is unchanged. CONTRIBUTING lists the four remaining manual follow-ups.
|
|
48
|
+
|
|
49
|
+
- [#158](https://github.com/o-stepper/graphorin/pull/158) [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab) Thanks [@o-stepper](https://github.com/o-stepper)! - Tool discovery and grading are comment-aware (W-044). Discovery and every grading path run over a comment-blanked view of the source (newlines preserved, offsets stable; string/template and - conservatively - regex literals untouched): a commented-out `tool({...})` no longer appears in `graphorin tools lint` reports or the three ESLint tool rules, a commented-out property inside a live literal is never extracted, a commented email inside a live `examples:` block no longer penalizes the axis, and a `tool(` inside a string never matches. `DiscoveredTool` gains `gradingSource` (the blanked slice all graders consume) while `source` keeps the original text for reports. The description axis gets a deterministic anti-degenerate guard: 80+ chars of repeated filler (under 4 unique words, or one word over half the text) caps at 16 instead of scoring 40 - RB-49 calibration fixtures are unchanged; degenerate descriptions may now fall below `--threshold` gates. The false-positive contract (any callee lexically ending in `tool(`, renamed/wrapped calls invisible) is now documented in the module header and README.
|
|
50
|
+
|
|
51
|
+
- [#164](https://github.com/o-stepper/graphorin/pull/164) [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00) Thanks [@o-stepper](https://github.com/o-stepper)! - Tarballs now ship `src/` so the published `dist/**/*.d.ts.map` files actually work (W-136): the maps referenced `../src/*.ts` that the `files` whitelist excluded, so go-to-definition fell back into `.d.ts` and the shipped maps were dead weight. The pack gate gains a `map-integrity` leg: every source referenced by a shipped map must resolve inside the tarball (or be embedded via `sourcesContent`), with an anti-vacuous guard - a package whose tsdown config emits declaration maps must contain a non-zero number of `.d.ts.map` files, so a cache-restored dist that silently dropped maps fails the gate instead of passing vacuously. `mvp-readiness` now requires `src` in every publishable `files` array.
|
|
52
|
+
|
|
53
|
+
- [#164](https://github.com/o-stepper/graphorin/pull/164) [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00) Thanks [@o-stepper](https://github.com/o-stepper)! - Every published package now declares its tree-shaking contract via `sideEffects` (W-137): 18 packages audited to a pure module scope get `false`, the CLI declares its bin entry (`["./dist/bin/*"]`), and `@graphorin/security` gets an explicit `true` - its secrets subsystem registers built-in resolvers and the SecretValue caller-context provider at import time, so marking it pure would let bundlers drop those registrations. `mvp-readiness` now fails any publishable manifest without a declared `sideEffects`, closing the drift for future packages.
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`c1af9c7`](https://github.com/o-stepper/graphorin/commit/c1af9c790757fbe82da6dd2b6c1fdc497b5c605e), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`73b19ca`](https://github.com/o-stepper/graphorin/commit/73b19caeda388bda628a48138cb7d70b1db839a3), [`73b19ca`](https://github.com/o-stepper/graphorin/commit/73b19caeda388bda628a48138cb7d70b1db839a3), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`73b19ca`](https://github.com/o-stepper/graphorin/commit/73b19caeda388bda628a48138cb7d70b1db839a3), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`73b19ca`](https://github.com/o-stepper/graphorin/commit/73b19caeda388bda628a48138cb7d70b1db839a3), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`4ee256e`](https://github.com/o-stepper/graphorin/commit/4ee256e30fe9190cef6c48dc6785464757707156), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`32bbd03`](https://github.com/o-stepper/graphorin/commit/32bbd03b588136a355e4b5ad6ac5e19b36b4d8ab), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`764239b`](https://github.com/o-stepper/graphorin/commit/764239b97e0e0202442e91272583f13adeb12d00), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`832f22e`](https://github.com/o-stepper/graphorin/commit/832f22e570b8c3175c1adeb4c150070cbd131534), [`fe98522`](https://github.com/o-stepper/graphorin/commit/fe98522ce2477c9a7dc09029f9dcfdb1f7c9aa04)]:
|
|
56
|
+
- @graphorin/core@0.7.0
|
|
57
|
+
- @graphorin/security@0.7.0
|
|
58
|
+
- @graphorin/server@0.7.0
|
|
59
|
+
- @graphorin/store-sqlite@0.7.0
|
|
60
|
+
- @graphorin/memory@0.7.0
|
|
61
|
+
- @graphorin/eslint-plugin@0.7.0
|
|
62
|
+
- @graphorin/pricing@0.7.0
|
|
63
|
+
- @graphorin/sessions@0.7.0
|
|
64
|
+
- @graphorin/skills@0.7.0
|
|
65
|
+
|
|
66
|
+
## 0.6.1
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- [#142](https://github.com/o-stepper/graphorin/pull/142) [`436d6ca`](https://github.com/o-stepper/graphorin/commit/436d6ca5ebbd16df094e915682d3915c279a8430) Thanks [@o-stepper](https://github.com/o-stepper)! - Version constants and version-bearing strings now derive from each package's manifest at build time (`VERSION = pkg.version`; writer ids, client/server info, OTLP framework attributes, build-info metrics interpolate it). No behavioral change at the current version: the rendered strings are byte-identical. A release bump no longer edits source; the new `check-version-consistency` gate fails any reintroduced hardcoded framework version.
|
|
71
|
+
|
|
72
|
+
- Updated dependencies [[`436d6ca`](https://github.com/o-stepper/graphorin/commit/436d6ca5ebbd16df094e915682d3915c279a8430)]:
|
|
73
|
+
- @graphorin/core@0.6.1
|
|
74
|
+
- @graphorin/eslint-plugin@0.6.1
|
|
75
|
+
- @graphorin/memory@0.6.1
|
|
76
|
+
- @graphorin/pricing@0.6.1
|
|
77
|
+
- @graphorin/security@0.6.1
|
|
78
|
+
- @graphorin/server@0.6.1
|
|
79
|
+
- @graphorin/sessions@0.6.1
|
|
80
|
+
- @graphorin/skills@0.6.1
|
|
81
|
+
- @graphorin/store-sqlite@0.6.1
|
|
82
|
+
|
|
3
83
|
## 0.6.0
|
|
4
84
|
|
|
5
85
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](./LICENSE)
|
|
6
6
|
[](https://nodejs.org)
|
|
7
7
|
|
|
8
|
-
- **Version:** v0.
|
|
8
|
+
- **Version:** v0.7.0
|
|
9
9
|
- **License:** [MIT](./LICENSE) (© 2026 Oleksiy Stepurenko)
|
|
10
10
|
- **Repository:** <https://github.com/o-stepper/graphorin/tree/main/packages/cli>
|
|
11
11
|
- **Issues:** <https://github.com/o-stepper/graphorin/issues>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
| Command | Purpose |
|
|
46
46
|
|---|---|
|
|
47
|
-
| `graphorin storage status / encrypt / rekey / cleanup-backups` | Inspect
|
|
47
|
+
| `graphorin storage status / backup / encrypt / rekey / cleanup-backups` | Inspect, back up (online, consistent copy via the driver's page-level backup API), encrypt, and re-key the SQLite store. `encrypt` and `rekey` require the `@graphorin/store-sqlite-encrypted` sub-pack from Phase 16. |
|
|
48
48
|
| `graphorin audit verify / prune / export` | Operate on the encrypted, hash-chained audit log (DEC-124). |
|
|
49
49
|
| `graphorin memory status / migrate` | Inspect counts + active embedder; `migrate` swaps embedders. |
|
|
50
50
|
| `graphorin consolidator status / set-tier / stop` | Inspect + steer the background memory consolidator (DEC-134 / ADR-038). |
|
|
@@ -123,8 +123,8 @@ Phase 15 ships ready-to-copy templates for production deployments:
|
|
|
123
123
|
|
|
124
124
|
## Status
|
|
125
125
|
|
|
126
|
-
`@graphorin/cli` is part of the Graphorin framework's `v0.
|
|
126
|
+
`@graphorin/cli` is part of the Graphorin framework's `v0.7.0` pre-release. Once published, the package follows the lockstep release cadence shared by every `@graphorin/*` package on the `0.x` line.
|
|
127
127
|
|
|
128
128
|
---
|
|
129
129
|
|
|
130
|
-
**Project Graphorin** · v0.
|
|
130
|
+
**Project Graphorin** · v0.7.0 · MIT License · © 2026 Oleksiy Stepurenko · <https://github.com/o-stepper/graphorin>
|
package/dist/bin/graphorin.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { runAuditExport, runAuditPrune, runAuditVerify } from "../commands/audit.js";
|
|
3
3
|
import { isOfflineMode } from "../internal/offline.js";
|
|
4
4
|
import { runAuthList, runAuthLogin, runAuthRefresh, runAuthRevoke, runAuthStatus } from "../commands/auth.js";
|
|
5
|
-
import { runConsolidatorSetTier, runConsolidatorStatus, runConsolidatorStop } from "../commands/consolidator.js";
|
|
5
|
+
import { runConsolidatorDlqClear, runConsolidatorDlqList, runConsolidatorSetTier, runConsolidatorStatus, runConsolidatorStop } from "../commands/consolidator.js";
|
|
6
6
|
import { runDoctor } from "../commands/doctor.js";
|
|
7
7
|
import { runGuardExplain, runGuardStatus } from "../commands/guard.js";
|
|
8
8
|
import { runInit } from "../commands/init.js";
|
|
9
|
-
import { runMemoryActivity, runMemoryInspect, runMemoryMigrate, runMemoryReview, runMemoryStatus, runMemoryWhy } from "../commands/memory.js";
|
|
9
|
+
import { runMemoryActivity, runMemoryInspect, runMemoryMigrate, runMemoryPruneHistory, runMemoryReview, runMemoryStatus, runMemoryWhy } from "../commands/memory.js";
|
|
10
10
|
import { runStart } from "../commands/start.js";
|
|
11
11
|
import { runMigrate } from "../commands/migrate.js";
|
|
12
12
|
import { runMigrateConfig } from "../commands/migrate-config.js";
|
|
@@ -14,7 +14,7 @@ import { runMigrateExport } from "../commands/migrate-export.js";
|
|
|
14
14
|
import { runPricingDiff, runPricingLookup, runPricingMissing, runPricingRefresh, runPricingStatus } from "../commands/pricing.js";
|
|
15
15
|
import { runSecretsDelete, runSecretsGet, runSecretsList, runSecretsRef, runSecretsRotate, runSecretsSet } from "../commands/secrets.js";
|
|
16
16
|
import { runSkillsAudit, runSkillsInspect, runSkillsInstall, runSkillsMigrateFrontmatter } from "../commands/skills.js";
|
|
17
|
-
import { runStorageBackup, runStorageCleanupBackups, runStorageEncrypt, runStorageRekey, runStorageStatus } from "../commands/storage.js";
|
|
17
|
+
import { runStorageBackup, runStorageCleanupBackups, runStorageCompact, runStorageEncrypt, runStorageRekey, runStorageStatus } from "../commands/storage.js";
|
|
18
18
|
import { runTelemetryDisable, runTelemetryEnable, runTelemetryInspect, runTelemetryStatus } from "../commands/telemetry.js";
|
|
19
19
|
import { runTokenCreate, runTokenList, runTokenRekey, runTokenRevoke, runTokenRotate, runTokenVerify } from "../commands/token.js";
|
|
20
20
|
import { runToolsLint } from "../commands/tools-lint.js";
|
|
@@ -100,7 +100,7 @@ function registerLifecycleCommands(program) {
|
|
|
100
100
|
...opts.strictSecrets !== void 0 ? { strictSecrets: opts.strictSecrets } : {}
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
|
-
program.command("init").description("[Bootstrap] Generate a fresh graphorin.config.ts
|
|
103
|
+
program.command("init").description("[Bootstrap] Generate a fresh graphorin.config.ts + the server pepper (mint tokens afterwards with token create).").option("-o, --out <path>", "Output path; defaults to ./graphorin.config.ts.").option("--non-interactive", "Accept defaults / env vars without prompting.", false).option("--cloud-consent <tier>", "Cloud-upload consent tier: public-only | public-and-internal | all-with-warnings.").option("--encrypted", "Enable storage encryption opt-in.").option("--no-encrypted", "Disable storage encryption opt-in.").action(async (opts) => {
|
|
104
104
|
if (isOfflineMode()) process.stderr.write("[graphorin/cli] GRAPHORIN_OFFLINE=1 - init never reaches the network.\n");
|
|
105
105
|
await runInit({
|
|
106
106
|
...opts.out !== void 0 ? { out: opts.out } : {},
|
|
@@ -242,7 +242,7 @@ function registerStorageCommands(program) {
|
|
|
242
242
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
243
243
|
});
|
|
244
244
|
});
|
|
245
|
-
storage.command("encrypt").description("Encrypt the store. Requires the @graphorin/store-sqlite-encrypted sub-pack (Phase 16).").requiredOption("--passphrase-from <ref>", "SecretRef URI for the new passphrase.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--target-path <path>", "Override the encrypted output path. Default <storage>.encrypted.").option("--swap", "Atomically swap the encrypted output into the storage path; original kept under .bak.<ts>.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
245
|
+
storage.command("encrypt").description("Encrypt the store. Requires the @graphorin/store-sqlite-encrypted sub-pack (Phase 16).").requiredOption("--passphrase-from <ref>", "SecretRef URI for the new passphrase.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--target-path <path>", "Override the encrypted output path. Default <storage>.encrypted.").option("--swap", "Atomically swap the encrypted output into the storage path (REQUIRES a stopped server - refused when another process holds the DB); original kept under .bak.<ts>.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
246
246
|
await runStorageEncrypt({
|
|
247
247
|
passphraseFrom: opts.passphraseFrom,
|
|
248
248
|
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
@@ -267,6 +267,13 @@ function registerStorageCommands(program) {
|
|
|
267
267
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
268
268
|
});
|
|
269
269
|
});
|
|
270
|
+
storage.command("compact").description("Return pruned pages to the OS via batched incremental_vacuum (rowid-safe, unlike the forbidden VACUUM). Requires a database created with auto_vacuum=2; reports the high-water-mark limitation honestly on older files.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--batch-pages <n>", "Free pages released per incremental_vacuum batch (keeps writer locks short). Default 1000.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
271
|
+
await runStorageCompact({
|
|
272
|
+
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
273
|
+
...opts.batchPages !== void 0 ? { batchPages: Number(opts.batchPages) } : {},
|
|
274
|
+
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
275
|
+
});
|
|
276
|
+
});
|
|
270
277
|
storage.command("cleanup-backups").description("Drop stale .bak / .tmp.<ts> files left by previous encrypt / rekey runs.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--dry-run", "Print what would be removed without touching the filesystem.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
271
278
|
await runStorageCleanupBackups({
|
|
272
279
|
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
@@ -333,6 +340,13 @@ function registerMemoryCommands(program) {
|
|
|
333
340
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
334
341
|
});
|
|
335
342
|
});
|
|
343
|
+
memory.command("prune-history").description("Delete memory_history rows older than the threshold (storage-cost hygiene; purge() already scrubs sensitive text).").requiredOption("--older-than <duration|date>", "Age threshold: a duration ('30d', '12h') or a past ISO date. Mandatory - destructive.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
344
|
+
await runMemoryPruneHistory({
|
|
345
|
+
olderThan: opts.olderThan,
|
|
346
|
+
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
347
|
+
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
348
|
+
});
|
|
349
|
+
});
|
|
336
350
|
memory.command("why").description("Explain why facts were recalled (ranking signals) from the persisted recall spans.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--session <id>", "Restrict to one session's recall spans.").option("--limit <n>", "Cap on the most-recent recall spans (default 5).").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
337
351
|
const limit = opts.limit !== void 0 ? Number.parseInt(opts.limit, 10) : void 0;
|
|
338
352
|
await runMemoryWhy({
|
|
@@ -362,19 +376,37 @@ function registerConsolidatorCommands(program) {
|
|
|
362
376
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
363
377
|
});
|
|
364
378
|
});
|
|
365
|
-
c.command("set-tier <tier>").description("
|
|
379
|
+
c.command("set-tier <tier>").description("Runtime tier switching is not wired yet: reports UNSUPPORTED (exit 2) and points at consolidator.tier in the config (IP-4).").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (tier, opts) => {
|
|
366
380
|
await runConsolidatorSetTier({
|
|
367
381
|
tier,
|
|
368
382
|
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
369
383
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
370
384
|
});
|
|
371
385
|
});
|
|
372
|
-
c.command("stop").description("
|
|
386
|
+
c.command("stop").description("Runtime pause is not wired yet: reports UNSUPPORTED (exit 2); stop the server process to stop consolidation (IP-4).").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
373
387
|
await runConsolidatorStop({
|
|
374
388
|
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
375
389
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
376
390
|
});
|
|
377
391
|
});
|
|
392
|
+
c.command("dlq-list").description("List dead-letter batches (all users; narrow with --user).").option("--user <id>", "Only batches scoped to this user id.").option("--limit <n>", "Maximum rows to list.", "100").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
393
|
+
await runConsolidatorDlqList({
|
|
394
|
+
...opts.user !== void 0 ? { user: opts.user } : {},
|
|
395
|
+
...opts.limit !== void 0 ? { limit: Number(opts.limit) } : {},
|
|
396
|
+
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
397
|
+
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
c.command("dlq-clear").description("Delete dead-letter batches. Default: only EXHAUSTED batches (retries used up); batches awaiting retry need --exhausted-only=false.").option("--exhausted-only [bool]", "Only exhausted batches (default true).", "true").option("--before <date>", "Only batches that failed before this ISO date / epoch ms.").option("--id <id>", "Clear one batch by id.").option("--user <id>", "Only batches scoped to this user id.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
401
|
+
await runConsolidatorDlqClear({
|
|
402
|
+
exhaustedOnly: String(opts.exhaustedOnly ?? "true") !== "false",
|
|
403
|
+
...opts.before !== void 0 ? { before: opts.before } : {},
|
|
404
|
+
...opts.id !== void 0 ? { id: opts.id } : {},
|
|
405
|
+
...opts.user !== void 0 ? { user: opts.user } : {},
|
|
406
|
+
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
407
|
+
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
408
|
+
});
|
|
409
|
+
});
|
|
378
410
|
}
|
|
379
411
|
function registerTriggersCommands(program) {
|
|
380
412
|
const t = program.command("triggers").description("[Storage] Operate on the durable trigger registry.");
|
|
@@ -456,9 +488,15 @@ function registerPricingCommands(program) {
|
|
|
456
488
|
p.command("status").description("Show bundled snapshot version + entry count + digest.").option("--json", "Emit a structured JSON document on stdout.").action((opts) => {
|
|
457
489
|
runPricingStatus({ ...opts.json !== void 0 ? { json: opts.json } : {} });
|
|
458
490
|
});
|
|
459
|
-
p.command("refresh").description("Pull a fresh snapshot from --url (network).").requiredOption("--url <url>", "Snapshot URL.").option("--out <file>", "Optional path to write the refreshed snapshot to.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
491
|
+
p.command("refresh").description("Pull a fresh snapshot from --url (network).").requiredOption("--url <url>", "Snapshot URL.").option("--out <file>", "Optional path to write the refreshed snapshot to.").option("--format <format>", "Body format: 'auto' (default), 'graphorin', or 'genai-prices'.", "auto").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
492
|
+
const format = opts.format ?? "auto";
|
|
493
|
+
if (format !== "auto" && format !== "graphorin" && format !== "genai-prices") {
|
|
494
|
+
process.stderr.write(`graphorin pricing refresh: invalid --format '${format}' (expected auto | graphorin | genai-prices)\n`);
|
|
495
|
+
process.exit(2);
|
|
496
|
+
}
|
|
460
497
|
await runPricingRefresh({
|
|
461
498
|
url: opts.url,
|
|
499
|
+
format,
|
|
462
500
|
...opts.out !== void 0 ? { out: opts.out } : {},
|
|
463
501
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
464
502
|
});
|
|
@@ -516,14 +554,14 @@ function registerSkillsCommands(program) {
|
|
|
516
554
|
});
|
|
517
555
|
}
|
|
518
556
|
function registerTracesCommands(program) {
|
|
519
|
-
const t = program.command("traces").description("[Diagnostics] Operate on
|
|
520
|
-
t.command("status").description("Count
|
|
557
|
+
const t = program.command("traces").description("[Diagnostics] Operate on persisted spans.");
|
|
558
|
+
t.command("status").description("Count persisted spans + report their time range.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
521
559
|
await runTracesStatus({
|
|
522
560
|
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
523
561
|
...opts.json !== void 0 ? { json: opts.json } : {}
|
|
524
562
|
});
|
|
525
563
|
});
|
|
526
|
-
t.command("prune").description("
|
|
564
|
+
t.command("prune").description("Delete spans that FINISHED before the cutoff (cutoff is required).").requiredOption("--before <date>", "ISO date / epoch ms cutoff (spans ending strictly before it are deleted).").option("-c, --config <path>", "Path to the graphorin.config file.").option("--json", "Emit a structured JSON document on stdout.").action(async (opts) => {
|
|
527
565
|
await runTracesPrune({
|
|
528
566
|
before: opts.before,
|
|
529
567
|
...opts.config !== void 0 ? { config: opts.config } : {},
|
|
@@ -584,10 +622,10 @@ function registerTelemetryCommands(program) {
|
|
|
584
622
|
}
|
|
585
623
|
function registerToolsCommands(program) {
|
|
586
624
|
program.command("tools").description("[Catalogue] Operate on the tool registry.").command("lint").description([
|
|
587
|
-
"
|
|
625
|
+
"Text-based static scan of every tool({...}) registration; per-tool grader + threshold gate (RB-49).",
|
|
588
626
|
"",
|
|
589
627
|
"Grader rubric (40 + 30 + 30 = 100 points):",
|
|
590
|
-
" description axis (0..40): 0 if missing/placeholder/<20 chars; 16/24/32/40 by length.",
|
|
628
|
+
" description axis (0..40): 0 if missing/placeholder/<20 chars; 16/24/32/40 by length; degenerate text (under 4 unique words or one word over half the text) caps at 16 (W-044).",
|
|
591
629
|
" examples axis (0..30): 0 if none or >5; 12 base + 6 per additional, cap 30; -6 per PII.",
|
|
592
630
|
" parameter naming (0..30): 30 base; -30/N per ambiguous name; -10/N per numeric suffix.",
|
|
593
631
|
"",
|