@graphorin/cli 0.5.0 → 0.6.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +8 -8
  3. package/dist/bin/graphorin.js +15 -7
  4. package/dist/bin/graphorin.js.map +1 -1
  5. package/dist/commands/audit.d.ts +2 -2
  6. package/dist/commands/audit.js +6 -6
  7. package/dist/commands/audit.js.map +1 -1
  8. package/dist/commands/auth.d.ts +1 -1
  9. package/dist/commands/auth.js +3 -3
  10. package/dist/commands/auth.js.map +1 -1
  11. package/dist/commands/consolidator.js +2 -2
  12. package/dist/commands/consolidator.js.map +1 -1
  13. package/dist/commands/doctor.d.ts +1 -1
  14. package/dist/commands/doctor.js +5 -5
  15. package/dist/commands/doctor.js.map +1 -1
  16. package/dist/commands/guard.js +3 -3
  17. package/dist/commands/guard.js.map +1 -1
  18. package/dist/commands/index.d.ts +2 -2
  19. package/dist/commands/index.js +2 -2
  20. package/dist/commands/init.d.ts +2 -2
  21. package/dist/commands/init.js +3 -3
  22. package/dist/commands/init.js.map +1 -1
  23. package/dist/commands/memory.d.ts +5 -5
  24. package/dist/commands/memory.d.ts.map +1 -1
  25. package/dist/commands/memory.js +11 -11
  26. package/dist/commands/memory.js.map +1 -1
  27. package/dist/commands/migrate-config.js +2 -2
  28. package/dist/commands/migrate-config.js.map +1 -1
  29. package/dist/commands/migrate-export.d.ts +1 -1
  30. package/dist/commands/migrate-export.js +2 -2
  31. package/dist/commands/migrate-export.js.map +1 -1
  32. package/dist/commands/migrate.d.ts +1 -1
  33. package/dist/commands/migrate.js +1 -1
  34. package/dist/commands/migrate.js.map +1 -1
  35. package/dist/commands/pricing.d.ts +1 -1
  36. package/dist/commands/pricing.js +6 -6
  37. package/dist/commands/pricing.js.map +1 -1
  38. package/dist/commands/secrets.d.ts +1 -1
  39. package/dist/commands/secrets.js +5 -5
  40. package/dist/commands/secrets.js.map +1 -1
  41. package/dist/commands/skills.js +5 -5
  42. package/dist/commands/skills.js.map +1 -1
  43. package/dist/commands/start.d.ts +1 -1
  44. package/dist/commands/start.js +1 -1
  45. package/dist/commands/start.js.map +1 -1
  46. package/dist/commands/storage.d.ts +26 -2
  47. package/dist/commands/storage.d.ts.map +1 -1
  48. package/dist/commands/storage.js +51 -11
  49. package/dist/commands/storage.js.map +1 -1
  50. package/dist/commands/telemetry.js +6 -6
  51. package/dist/commands/telemetry.js.map +1 -1
  52. package/dist/commands/token.d.ts +2 -2
  53. package/dist/commands/token.js +4 -4
  54. package/dist/commands/token.js.map +1 -1
  55. package/dist/commands/tools-lint.d.ts +1 -1
  56. package/dist/commands/tools-lint.js +6 -6
  57. package/dist/commands/tools-lint.js.map +1 -1
  58. package/dist/commands/traces.js +5 -5
  59. package/dist/commands/traces.js.map +1 -1
  60. package/dist/commands/triggers.d.ts +1 -1
  61. package/dist/commands/triggers.js +1 -1
  62. package/dist/commands/triggers.js.map +1 -1
  63. package/dist/index.d.ts +4 -4
  64. package/dist/index.js +4 -4
  65. package/dist/index.js.map +1 -1
  66. package/dist/internal/exit.js.map +1 -1
  67. package/dist/internal/load-config.js +5 -5
  68. package/dist/internal/load-config.js.map +1 -1
  69. package/dist/internal/offline.d.ts +1 -1
  70. package/dist/internal/offline.js +2 -2
  71. package/dist/internal/offline.js.map +1 -1
  72. package/dist/internal/output.d.ts +6 -6
  73. package/dist/internal/output.js +6 -6
  74. package/dist/internal/output.js.map +1 -1
  75. package/dist/internal/store-context.js.map +1 -1
  76. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @graphorin/cli
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#135](https://github.com/o-stepper/graphorin/pull/135) [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3) Thanks [@o-stepper](https://github.com/o-stepper)! - Store durability and data lifecycle (audit 2026-07-04 Wave B, cluster B7).
8
+
9
+ - store-02: new `graphorin storage backup <dest>` - online, consistent copy via the driver's page-level `backup()` API (safe under a live writer, preserves rowids so FTS5 mappings survive, encrypted stores produce an equally-encrypted copy). `deployment.md` stops recommending the non-existent `BACKUP TO` and explicitly warns against `VACUUM INTO`.
10
+ - store-03: episode vector KNN gains the MRET-9 over-fetch loop facts already had (shared `widenKnn` helper) - a minority user's episodic recall is no longer starved to zero by a dominant user's vectors.
11
+ - store-04: GDPR `purge()` scrubs the fact's text out of `memory_history` (both rows keyed to the id and value-matching rows - a SUPERSEDE row carries the new fact's text on the OLD id) inside the same transaction, keeping the event skeleton; new `SqliteMemoryStore.pruneHistory(olderThanMs)` retention API bounds the otherwise-unbounded table.
12
+ - store-05: `encryptDatabase` copies via the driver's online backup API instead of checkpoint-close-then-copyFileSync - a concurrent writer can no longer commit WAL frames that silently miss the encrypted copy.
13
+ - store-06: every write transaction now BEGINs IMMEDIATE, eliminating the SQLITE_BUSY_SNAPSHOT class on read-then-write transactions under server+CLI concurrency (busy_timeout waits instead).
14
+ - store-07: `upsertState` builds its UPDATE from the supplied patch keys only (insert-if-absent + patch, in one immediate transaction) and `releaseLock` is a single conditional UPDATE - a concurrently acquired consolidator lock can no longer be silently reverted.
15
+ - store-13: migration 025 adds partial indexes on `facts.supersedes` / `facts.superseded_by`, so `historyOf` chain walks stop scanning the user's facts per node; registry owner map backfilled for 024/025.
16
+ - store F13: `distanceMetric: 'dot'` is coerced to `'cosine'` at registration with a loud warning (the vec0 table never computed dot; the meta now matches reality).
17
+
18
+ - [#138](https://github.com/o-stepper/graphorin/pull/138) [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a) Thanks [@o-stepper](https://github.com/o-stepper)! - Documentation-truth sweep (audit 2026-07-04 Wave E, cluster E10): stale npm package descriptions rewritten (cli "Phase 14a three commands", mcp "upcoming auth CLI", store-sqlite's nonexistent WorkerPool), the store-sqlite WorkerPool TSDoc and the cipher-pragma ordering comment corrected, the executor timeout-precedence JSDoc fixed to the real `inlineToolTimeoutMs > tier timeoutMs > default` order, the `rrf.<label>` explain signals documented, and the skills spec-snapshot wording no longer claims a CI cron refreshes it (the diff is a manual `--upstream` pass; the release gate only parses the bundled snapshot).
19
+
20
+ - [#138](https://github.com/o-stepper/graphorin/pull/138) [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a) Thanks [@o-stepper](https://github.com/o-stepper)! - Fix `graphorin storage cleanup-backups` being a silent no-op on Windows (audit 2026-07-04 Wave E, cluster E6): the DB base name was derived via `dbPath.split('/')`, which on backslash-separated Windows paths returned the whole path so no directory entry ever matched. Now uses `node:path` `basename`/`join`. Also documents the supported-platforms matrix (the one genuine ARM gap: `sqlite-vec` ships no `windows-arm64` binary, so vector search is unavailable on Windows-on-ARM while FTS recall keeps working).
21
+
22
+ - Updated dependencies [[`32f20c1`](https://github.com/o-stepper/graphorin/commit/32f20c110f184f8cef7eec85bf39f5f07c886cb6), [`32f20c1`](https://github.com/o-stepper/graphorin/commit/32f20c110f184f8cef7eec85bf39f5f07c886cb6), [`32f20c1`](https://github.com/o-stepper/graphorin/commit/32f20c110f184f8cef7eec85bf39f5f07c886cb6), [`32f20c1`](https://github.com/o-stepper/graphorin/commit/32f20c110f184f8cef7eec85bf39f5f07c886cb6), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`4f850d9`](https://github.com/o-stepper/graphorin/commit/4f850d9bc0a05d6256c59c5117b010336fcb41d3), [`17a2d30`](https://github.com/o-stepper/graphorin/commit/17a2d30564154ca2ab87473335cdef43a5089c84), [`17a2d30`](https://github.com/o-stepper/graphorin/commit/17a2d30564154ca2ab87473335cdef43a5089c84), [`17a2d30`](https://github.com/o-stepper/graphorin/commit/17a2d30564154ca2ab87473335cdef43a5089c84), [`17a2d30`](https://github.com/o-stepper/graphorin/commit/17a2d30564154ca2ab87473335cdef43a5089c84), [`17a2d30`](https://github.com/o-stepper/graphorin/commit/17a2d30564154ca2ab87473335cdef43a5089c84), [`17a2d30`](https://github.com/o-stepper/graphorin/commit/17a2d30564154ca2ab87473335cdef43a5089c84), [`ce06b47`](https://github.com/o-stepper/graphorin/commit/ce06b472af9e30ac5d0792f7a8b6f42170a94627), [`ce06b47`](https://github.com/o-stepper/graphorin/commit/ce06b472af9e30ac5d0792f7a8b6f42170a94627), [`ce06b47`](https://github.com/o-stepper/graphorin/commit/ce06b472af9e30ac5d0792f7a8b6f42170a94627), [`ce06b47`](https://github.com/o-stepper/graphorin/commit/ce06b472af9e30ac5d0792f7a8b6f42170a94627), [`ce06b47`](https://github.com/o-stepper/graphorin/commit/ce06b472af9e30ac5d0792f7a8b6f42170a94627), [`ce06b47`](https://github.com/o-stepper/graphorin/commit/ce06b472af9e30ac5d0792f7a8b6f42170a94627), [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a), [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a), [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a), [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a), [`6293a25`](https://github.com/o-stepper/graphorin/commit/6293a2531c5c9265294da22fb365a08f2bdf445a)]:
23
+ - @graphorin/memory@0.6.0
24
+ - @graphorin/store-sqlite@0.6.0
25
+ - @graphorin/core@0.6.0
26
+ - @graphorin/skills@0.6.0
27
+ - @graphorin/server@0.6.0
28
+ - @graphorin/pricing@0.6.0
29
+ - @graphorin/security@0.6.0
30
+ - @graphorin/eslint-plugin@0.6.0
31
+ - @graphorin/sessions@0.6.0
32
+
33
+ ## 0.5.0
34
+
35
+ First version published to the npm registry (with Sigstore build
36
+ provenance). The 0.2.0, 0.3.0, and 0.4.0 versions were internal lockstep
37
+ milestones and were never published. All `@graphorin/*` packages release
38
+ lockstep at the same version; the full release notes for 0.2.0-0.5.0 live
39
+ in the repository-level
40
+ [CHANGELOG](https://github.com/o-stepper/graphorin/blob/main/CHANGELOG.md).
41
+
3
42
  ## 0.1.0
4
43
 
5
44
  Initial release. See the workspace root `CHANGELOG.md` for the full
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
6
6
  [![Node.js: 22+](https://img.shields.io/badge/Node.js-22%2B-43853d.svg)](https://nodejs.org)
7
7
 
8
- - **Version:** v0.5.0
8
+ - **Version:** v0.6.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>
@@ -84,7 +84,7 @@ graphorin migrate --config ./graphorin.config.ts
84
84
  graphorin start --config ./graphorin.config.ts
85
85
  ```
86
86
 
87
- `GRAPHORIN_OFFLINE=1` is honoured by every subcommand the CLI never makes implicit network calls (verified by the repository-wide `pnpm run check-no-network` CI check).
87
+ `GRAPHORIN_OFFLINE=1` is honoured by every subcommand - the CLI never makes implicit network calls (verified by the repository-wide `pnpm run check-no-network` CI check).
88
88
 
89
89
  ## Programmatic usage
90
90
 
@@ -116,15 +116,15 @@ await runStart({ config: './graphorin.config.ts', port: 8090 });
116
116
 
117
117
  Phase 15 ships ready-to-copy templates for production deployments:
118
118
 
119
- - `examples/systemd/graphorin.service` hardened systemd unit (refuse-as-root, `UMask=0077`, `ProtectSystem=strict`, `NoNewPrivileges=true`).
120
- - `examples/docker/Dockerfile` multi-stage Node 22-slim image with a non-root user (UID 10001), read-only rootfs friendly, `--cap-drop=ALL` ready.
121
- - `examples/k8s/deployment.yaml` Pod-Security-Standards "restricted" profile with `runAsNonRoot`, `seccompProfile: RuntimeDefault`, projected secret mounts.
122
- - `examples/github-actions/{security.yml,release.yml,renovate.json,audit-ignore.json}` supply-chain workflows (`pnpm audit`, Sigstore provenance verification, Changesets-driven releases).
119
+ - `examples/systemd/graphorin.service` - hardened systemd unit (refuse-as-root, `UMask=0077`, `ProtectSystem=strict`, `NoNewPrivileges=true`).
120
+ - `examples/docker/Dockerfile` - multi-stage Node 22-slim image with a non-root user (UID 10001), read-only rootfs friendly, `--cap-drop=ALL` ready.
121
+ - `examples/k8s/deployment.yaml` - Pod-Security-Standards "restricted" profile with `runAsNonRoot`, `seccompProfile: RuntimeDefault`, projected secret mounts.
122
+ - `examples/github-actions/{security.yml,release.yml,renovate.json,audit-ignore.json}` - supply-chain workflows (`pnpm audit`, Sigstore provenance verification, Changesets-driven releases).
123
123
 
124
124
  ## Status
125
125
 
126
- `@graphorin/cli` is part of the Graphorin framework's `v0.5.0` pre-release. Once published, the package follows the lockstep release cadence shared by every `@graphorin/*` package on the `0.x` line.
126
+ `@graphorin/cli` is part of the Graphorin framework's `v0.6.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.5.0 · MIT License · © 2026 Oleksiy Stepurenko · <https://github.com/o-stepper/graphorin>
130
+ **Project Graphorin** · v0.6.0 · MIT License · © 2026 Oleksiy Stepurenko · <https://github.com/o-stepper/graphorin>
@@ -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 { runStorageCleanupBackups, runStorageEncrypt, runStorageRekey, runStorageStatus } from "../commands/storage.js";
17
+ import { runStorageBackup, runStorageCleanupBackups, 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";
@@ -47,7 +47,7 @@ import { Command } from "commander";
47
47
  * `migrate-export`, `migrate-config`, `guard`, `telemetry`,
48
48
  * `tools lint`).
49
49
  *
50
- * `GRAPHORIN_OFFLINE=1` is honoured by every subcommand the v0.1
50
+ * `GRAPHORIN_OFFLINE=1` is honoured by every subcommand - the v0.1
51
51
  * surface never makes implicit network calls. Phase 15 commands that
52
52
  * do touch the network (e.g. `graphorin pricing refresh`) consult
53
53
  * the same flag through the helper in `../internal/offline.ts`.
@@ -67,7 +67,7 @@ async function main() {
67
67
  " Storage: storage, audit, memory, consolidator, triggers, migrate-export",
68
68
  " Catalogue: pricing, skills, tools",
69
69
  "",
70
- "Honours GRAPHORIN_OFFLINE=1 the v0.1 surface never makes implicit network calls."
70
+ "Honours GRAPHORIN_OFFLINE=1 - the v0.1 surface never makes implicit network calls."
71
71
  ].join("\n")).version(VERSION);
72
72
  registerLifecycleCommands(program);
73
73
  registerDoctorCommand(program);
@@ -91,7 +91,7 @@ async function main() {
91
91
  }
92
92
  function registerLifecycleCommands(program) {
93
93
  program.command("start").description("[Runtime] Start the @graphorin/server daemon.").option("-c, --config <path>", "Path to the graphorin.config file (TS / JS / JSON).").option("-h, --host <host>", "Override the configured listen host.").option("-p, --port <port>", "Override the configured listen port.", (value) => Number.parseInt(value, 10)).option("--secrets-source <kind>", "Override secrets.source: auto | keyring | encrypted-file | env (DEC-136).").option("--strict-secrets", "Refuse to fall back to a different secrets store (DEC-136).").action(async (opts) => {
94
- if (isOfflineMode()) process.stderr.write("[graphorin/cli] GRAPHORIN_OFFLINE=1 running with no implicit network calls.\n");
94
+ if (isOfflineMode()) process.stderr.write("[graphorin/cli] GRAPHORIN_OFFLINE=1 - running with no implicit network calls.\n");
95
95
  await runStart({
96
96
  ...opts.config !== void 0 ? { config: opts.config } : {},
97
97
  ...opts.host !== void 0 ? { host: opts.host } : {},
@@ -101,7 +101,7 @@ function registerLifecycleCommands(program) {
101
101
  });
102
102
  });
103
103
  program.command("init").description("[Bootstrap] Generate a fresh graphorin.config.ts and a one-shot bootstrap admin token.").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
- if (isOfflineMode()) process.stderr.write("[graphorin/cli] GRAPHORIN_OFFLINE=1 init never reaches the network.\n");
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 } : {},
107
107
  ...opts.nonInteractive !== void 0 ? { nonInteractive: opts.nonInteractive } : {},
@@ -110,7 +110,7 @@ function registerLifecycleCommands(program) {
110
110
  });
111
111
  });
112
112
  program.command("migrate").description("[Maintenance] Apply pending storage migrations against the configured SQLite store.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--target <version>", "Reserved for the Phase 15 partial-migration runner.").action(async (opts) => {
113
- if (isOfflineMode()) process.stderr.write("[graphorin/cli] GRAPHORIN_OFFLINE=1 migrate is a local-only operation.\n");
113
+ if (isOfflineMode()) process.stderr.write("[graphorin/cli] GRAPHORIN_OFFLINE=1 - migrate is a local-only operation.\n");
114
114
  await runMigrate({
115
115
  ...opts.config !== void 0 ? { config: opts.config } : {},
116
116
  ...opts.target !== void 0 ? { target: opts.target } : {}
@@ -171,7 +171,7 @@ function registerTokenCommands(program) {
171
171
  ...opts.json !== void 0 ? { json: opts.json } : {}
172
172
  });
173
173
  });
174
- token.command("verify <token>").description("Offline checksum verification never consults the store.").option("--prefix <prefix>", "Override the expected token prefix.").option("--json", "Emit a structured JSON document on stdout.").action((tok, opts) => {
174
+ token.command("verify <token>").description("Offline checksum verification - never consults the store.").option("--prefix <prefix>", "Override the expected token prefix.").option("--json", "Emit a structured JSON document on stdout.").action((tok, opts) => {
175
175
  runTokenVerify({
176
176
  token: tok,
177
177
  ...opts.prefix !== void 0 ? { prefix: opts.prefix } : {},
@@ -259,6 +259,14 @@ function registerStorageCommands(program) {
259
259
  ...opts.json !== void 0 ? { json: opts.json } : {}
260
260
  });
261
261
  });
262
+ storage.command("backup").description("Online, consistent copy of the store via the page-level backup API (safe under a live writer; never use VACUUM INTO).").argument("<dest>", "Destination file path for the backup copy.").option("-c, --config <path>", "Path to the graphorin.config file.").option("--overwrite", "Replace an existing destination file.").option("--json", "Emit a structured JSON document on stdout.").action(async (dest, opts) => {
263
+ await runStorageBackup({
264
+ dest,
265
+ ...opts.config !== void 0 ? { config: opts.config } : {},
266
+ ...opts.overwrite === true ? { overwrite: true } : {},
267
+ ...opts.json !== void 0 ? { json: opts.json } : {}
268
+ });
269
+ });
262
270
  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) => {
263
271
  await runStorageCleanupBackups({
264
272
  ...opts.config !== void 0 ? { config: opts.config } : {},
@@ -1 +1 @@
1
- {"version":3,"file":"graphorin.js","names":[],"sources":["../../src/bin/graphorin.ts"],"sourcesContent":["/**\n * `graphorin` CLI entry point. Built into `dist/bin/graphorin.js`\n * with a shebang prepended by `tsdown`; the `package.json` `bin`\n * field points npm at the compiled file.\n *\n * Phase 14a installs three subcommands grouped by lifecycle phase:\n *\n * Bootstrap:\n * - graphorin init\n *\n * Maintenance:\n * - graphorin migrate\n *\n * Runtime:\n * - graphorin start\n *\n * Phase 15 extends this binary with the full operator surface\n * (`doctor`, `token`, `secrets`, `audit`, `storage`, `memory`,\n * `consolidator`, `triggers`, `auth`, `pricing`, `skills`, `traces`,\n * `migrate-export`, `migrate-config`, `guard`, `telemetry`,\n * `tools lint`).\n *\n * `GRAPHORIN_OFFLINE=1` is honoured by every subcommand — the v0.1\n * surface never makes implicit network calls. Phase 15 commands that\n * do touch the network (e.g. `graphorin pricing refresh`) consult\n * the same flag through the helper in `../internal/offline.ts`.\n *\n * @packageDocumentation\n */\n\nimport process from 'node:process';\n\nimport { Command } from 'commander';\n\nimport {\n runAuditExport,\n runAuditPrune,\n runAuditVerify,\n runAuthList,\n runAuthLogin,\n runAuthRefresh,\n runAuthRevoke,\n runAuthStatus,\n runConsolidatorSetTier,\n runConsolidatorStatus,\n runConsolidatorStop,\n runDoctor,\n runGuardExplain,\n runGuardStatus,\n runInit,\n runMemoryActivity,\n runMemoryInspect,\n runMemoryMigrate,\n runMemoryReview,\n runMemoryStatus,\n runMemoryWhy,\n runMigrate,\n runMigrateConfig,\n runMigrateExport,\n runPricingDiff,\n runPricingLookup,\n runPricingMissing,\n runPricingRefresh,\n runPricingStatus,\n runSecretsDelete,\n runSecretsGet,\n runSecretsList,\n runSecretsRef,\n runSecretsRotate,\n runSecretsSet,\n runSkillsAudit,\n runSkillsInspect,\n runSkillsInstall,\n runSkillsMigrateFrontmatter,\n runStart,\n runStorageCleanupBackups,\n runStorageEncrypt,\n runStorageRekey,\n runStorageStatus,\n runTelemetryDisable,\n runTelemetryEnable,\n runTelemetryInspect,\n runTelemetryStatus,\n runTokenCreate,\n runTokenList,\n runTokenRekey,\n runTokenRevoke,\n runTokenRotate,\n runTokenVerify,\n runToolsLint,\n runTracesPrune,\n runTracesStatus,\n runTriggersDisable,\n runTriggersFire,\n runTriggersList,\n runTriggersPrune,\n runTriggersStatus,\n VERSION,\n} from '../index.js';\nimport { isOfflineMode } from '../internal/offline.js';\n\nasync function main(): Promise<void> {\n const program = new Command();\n program\n .name('graphorin')\n .description(\n [\n 'Operator CLI for the Graphorin framework.',\n '',\n 'Commands grouped by purpose:',\n ' Bootstrap: init, migrate, migrate-config',\n ' Runtime: start',\n ' Diagnostics: doctor, telemetry, traces, guard',\n ' Auth: token, secrets, auth',\n ' Storage: storage, audit, memory, consolidator, triggers, migrate-export',\n ' Catalogue: pricing, skills, tools',\n '',\n 'Honours GRAPHORIN_OFFLINE=1 — the v0.1 surface never makes implicit network calls.',\n ].join('\\n'),\n )\n .version(VERSION);\n\n registerLifecycleCommands(program);\n registerDoctorCommand(program);\n registerTokenCommands(program);\n registerSecretsCommands(program);\n registerStorageCommands(program);\n registerAuditCommands(program);\n registerMemoryCommands(program);\n registerConsolidatorCommands(program);\n registerTriggersCommands(program);\n registerAuthCommands(program);\n registerPricingCommands(program);\n registerSkillsCommands(program);\n registerTracesCommands(program);\n registerMigrateExportCommand(program);\n registerMigrateConfigCommand(program);\n registerGuardCommands(program);\n registerTelemetryCommands(program);\n registerToolsCommands(program);\n\n await program.parseAsync(process.argv);\n}\n\nfunction registerLifecycleCommands(program: Command): void {\n program\n .command('start')\n .description('[Runtime] Start the @graphorin/server daemon.')\n .option('-c, --config <path>', 'Path to the graphorin.config file (TS / JS / JSON).')\n .option('-h, --host <host>', 'Override the configured listen host.')\n .option('-p, --port <port>', 'Override the configured listen port.', (value) =>\n Number.parseInt(value, 10),\n )\n .option(\n '--secrets-source <kind>',\n 'Override secrets.source: auto | keyring | encrypted-file | env (DEC-136).',\n )\n .option('--strict-secrets', 'Refuse to fall back to a different secrets store (DEC-136).')\n .action(\n async (opts: {\n config?: string;\n host?: string;\n port?: number;\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n }) => {\n if (isOfflineMode()) {\n process.stderr.write(\n '[graphorin/cli] GRAPHORIN_OFFLINE=1 — running with no implicit network calls.\\n',\n );\n }\n await runStart({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.host !== undefined ? { host: opts.host } : {}),\n ...(opts.port !== undefined ? { port: opts.port } : {}),\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n });\n },\n );\n\n program\n .command('init')\n .description(\n '[Bootstrap] Generate a fresh graphorin.config.ts and a one-shot bootstrap admin token.',\n )\n .option('-o, --out <path>', 'Output path; defaults to ./graphorin.config.ts.')\n .option('--non-interactive', 'Accept defaults / env vars without prompting.', false)\n .option(\n '--cloud-consent <tier>',\n 'Cloud-upload consent tier: public-only | public-and-internal | all-with-warnings.',\n )\n .option('--encrypted', 'Enable storage encryption opt-in.')\n .option('--no-encrypted', 'Disable storage encryption opt-in.')\n .action(\n async (opts: {\n out?: string;\n nonInteractive?: boolean;\n cloudConsent?: 'public-only' | 'public-and-internal' | 'all-with-warnings';\n encrypted?: boolean;\n }) => {\n if (isOfflineMode()) {\n process.stderr.write(\n '[graphorin/cli] GRAPHORIN_OFFLINE=1 — init never reaches the network.\\n',\n );\n }\n await runInit({\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n ...(opts.nonInteractive !== undefined ? { nonInteractive: opts.nonInteractive } : {}),\n ...(opts.cloudConsent !== undefined ? { cloudConsent: opts.cloudConsent } : {}),\n ...(opts.encrypted !== undefined ? { encrypted: opts.encrypted } : {}),\n });\n },\n );\n\n program\n .command('migrate')\n .description(\n '[Maintenance] Apply pending storage migrations against the configured SQLite store.',\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--target <version>', 'Reserved for the Phase 15 partial-migration runner.')\n .action(async (opts: { config?: string; target?: string }) => {\n if (isOfflineMode()) {\n process.stderr.write(\n '[graphorin/cli] GRAPHORIN_OFFLINE=1 — migrate is a local-only operation.\\n',\n );\n }\n await runMigrate({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.target !== undefined ? { target: opts.target } : {}),\n });\n });\n}\n\nfunction registerDoctorCommand(program: Command): void {\n program\n .command('doctor')\n .description('[Diagnostics] Health check (perms + secrets + encryption + systemd).')\n .option('--fix-perms', 'Repair drifted POSIX file modes.')\n .option('--check-perms', 'Run the file-perms check.')\n .option('--check-secrets', 'Run the secrets-store check.')\n .option('--check-encryption', 'Run the audit-encryption check.')\n .option('--check-systemd', 'Run the systemd-hardening check (Linux only).')\n .option('--all', 'Run every check.')\n .option('--json', 'Emit a structured JSON report on stdout.')\n .action(\n async (opts: {\n fixPerms?: boolean;\n checkPerms?: boolean;\n checkSecrets?: boolean;\n checkEncryption?: boolean;\n checkSystemd?: boolean;\n all?: boolean;\n json?: boolean;\n }) => {\n await runDoctor({\n ...(opts.fixPerms !== undefined ? { fixPerms: opts.fixPerms } : {}),\n ...(opts.checkPerms !== undefined ? { checkPerms: opts.checkPerms } : {}),\n ...(opts.checkSecrets !== undefined ? { checkSecrets: opts.checkSecrets } : {}),\n ...(opts.checkEncryption !== undefined ? { checkEncryption: opts.checkEncryption } : {}),\n ...(opts.checkSystemd !== undefined ? { checkSystemd: opts.checkSystemd } : {}),\n ...(opts.all !== undefined ? { all: opts.all } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerTokenCommands(program: Command): void {\n const token = program.command('token').description('[Auth] Manage server auth tokens.');\n token\n .command('create')\n .description('Mint a new token. Prints the raw value once.')\n .requiredOption('--scopes <list>', 'Comma-separated scope list.')\n .option('--label <name>', 'Optional label.')\n .option('--expires-in <duration>', 'Duration string: 30d, 12h, 90m, 45s.')\n .option('--env <env>', 'Token environment: live | test.', 'live')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n scopes: string;\n label?: string;\n expiresIn?: string;\n env?: 'live' | 'test';\n config?: string;\n json?: boolean;\n }) => {\n await runTokenCreate({\n scopes: opts.scopes\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean),\n ...(opts.label !== undefined ? { label: opts.label } : {}),\n ...(opts.expiresIn !== undefined ? { expiresIn: opts.expiresIn } : {}),\n ...(opts.env !== undefined ? { env: opts.env } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n token\n .command('list')\n .description('List token metadata.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--include-revoked', 'Include revoked tokens.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; includeRevoked?: boolean; json?: boolean }) => {\n await runTokenList({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.includeRevoked !== undefined ? { includeRevoked: opts.includeRevoked } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n token\n .command('revoke <id>')\n .description('Revoke a single token.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTokenRevoke({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n token\n .command('rotate <id>')\n .description('Revoke + reissue a token with the same scopes.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--env <env>', 'Token environment: live | test.', 'live')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (id: string, opts: { config?: string; env?: 'live' | 'test'; json?: boolean }) => {\n await runTokenRotate({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.env !== undefined ? { env: opts.env } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n token\n .command('rekey')\n .description('Re-issue every active token (use after a known compromise).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--env <env>', 'Token environment: live | test.', 'live')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; env?: 'live' | 'test'; json?: boolean }) => {\n await runTokenRekey({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.env !== undefined ? { env: opts.env } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n token\n .command('verify <token>')\n .description('Offline checksum verification — never consults the store.')\n .option('--prefix <prefix>', 'Override the expected token prefix.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((tok: string, opts: { prefix?: string; json?: boolean }) => {\n runTokenVerify({\n token: tok,\n ...(opts.prefix !== undefined ? { prefix: opts.prefix } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerSecretsCommands(program: Command): void {\n const secrets = program\n .command('secrets')\n .description('[Auth] Manage secrets in the configured store.');\n const commonOpts = (cmd: Command): Command =>\n cmd\n .option('--secrets-source <kind>', 'auto | keyring | encrypted-file | env (DEC-136).')\n .option('--strict-secrets', 'Refuse to fall back to a different secrets store.')\n .option('--json', 'Emit a structured JSON document on stdout.');\n commonOpts(secrets.command('list').description('List secret metadata.')).action(\n async (opts: {\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n }) => {\n await runSecretsList({\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n commonOpts(\n secrets\n .command('get <key>')\n .description('Read a secret. Use --reveal to print the bytes.')\n .option('--reveal', 'Print the raw value.'),\n ).action(\n async (\n key: string,\n opts: {\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n reveal?: boolean;\n },\n ) => {\n await runSecretsGet({\n key,\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n ...(opts.reveal !== undefined ? { reveal: opts.reveal } : {}),\n });\n },\n );\n commonOpts(\n secrets\n .command('set <key>')\n .description('Persist a secret. Pass --value <v> or --from-stdin.')\n .option('--value <v>', 'Inline value.')\n .option('--from-stdin', 'Read the value from stdin.'),\n ).action(\n async (\n key: string,\n opts: {\n value?: string;\n fromStdin?: boolean;\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n },\n ) => {\n await runSecretsSet({\n key,\n ...(opts.value !== undefined ? { value: opts.value } : {}),\n ...(opts.fromStdin !== undefined ? { fromStdin: opts.fromStdin } : {}),\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n commonOpts(secrets.command('delete <key>').description('Delete a secret.')).action(\n async (\n key: string,\n opts: {\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n },\n ) => {\n await runSecretsDelete({\n key,\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n commonOpts(\n secrets\n .command('ref <uri>')\n .description('Test resolution of a SecretRef URI.')\n .option('--reveal', 'Include the resolved value in the report.'),\n ).action(async (uri: string, opts: { reveal?: boolean; json?: boolean }) => {\n await runSecretsRef({\n uri,\n ...(opts.reveal !== undefined ? { reveal: opts.reveal } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n commonOpts(\n secrets\n .command('rotate <key>')\n .description('Replace an existing secret with a fresh value.')\n .option('--new-value <v>', 'Inline new value.')\n .option('--from-stdin', 'Read the new value from stdin.'),\n ).action(\n async (\n key: string,\n opts: {\n newValue?: string;\n fromStdin?: boolean;\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n },\n ) => {\n await runSecretsRotate({\n key,\n ...(opts.newValue !== undefined ? { newValue: opts.newValue } : {}),\n ...(opts.fromStdin !== undefined ? { fromStdin: opts.fromStdin } : {}),\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerStorageCommands(program: Command): void {\n const storage = program\n .command('storage')\n .description('[Storage] SQLite + encryption-at-rest commands.');\n storage\n .command('status')\n .description('Report current store state + cipher peer availability.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runStorageStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n storage\n .command('encrypt')\n .description(\n 'Encrypt the store. Requires the @graphorin/store-sqlite-encrypted sub-pack (Phase 16).',\n )\n .requiredOption('--passphrase-from <ref>', 'SecretRef URI for the new passphrase.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option(\n '--target-path <path>',\n 'Override the encrypted output path. Default <storage>.encrypted.',\n )\n .option(\n '--swap',\n 'Atomically swap the encrypted output into the storage path; original kept under .bak.<ts>.',\n )\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n passphraseFrom: string;\n config?: string;\n targetPath?: string;\n swap?: boolean;\n json?: boolean;\n }) => {\n await runStorageEncrypt({\n passphraseFrom: opts.passphraseFrom,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.targetPath !== undefined ? { targetPath: opts.targetPath } : {}),\n ...(opts.swap === true ? { swap: true } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n storage\n .command('rekey')\n .description('Rekey an already-encrypted store.')\n .requiredOption('--old-passphrase-from <ref>', 'SecretRef URI for the existing passphrase.')\n .requiredOption('--new-passphrase-from <ref>', 'SecretRef URI for the new passphrase.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n oldPassphraseFrom: string;\n newPassphraseFrom: string;\n config?: string;\n json?: boolean;\n }) => {\n await runStorageRekey({\n oldPassphraseFrom: opts.oldPassphraseFrom,\n newPassphraseFrom: opts.newPassphraseFrom,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n storage\n .command('cleanup-backups')\n .description('Drop stale .bak / .tmp.<ts> files left by previous encrypt / rekey runs.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--dry-run', 'Print what would be removed without touching the filesystem.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; dryRun?: boolean; json?: boolean }) => {\n await runStorageCleanupBackups({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerAuditCommands(program: Command): void {\n const audit = program\n .command('audit')\n .description('[Storage] Operate on the encrypted audit log.');\n audit\n .command('verify')\n .description('Replay the chain and report the first broken link (if any).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runAuditVerify({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n audit\n .command('prune')\n .description('Drop entries older than --before (cutoff is required).')\n .requiredOption('--before <date>', 'ISO date / epoch ms cutoff.')\n .option('--retain <n>', 'Minimum number of entries that must survive.', (v) =>\n Number.parseInt(v, 10),\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { before: string; retain?: number; config?: string; json?: boolean }) => {\n await runAuditPrune({\n before: opts.before,\n ...(opts.retain !== undefined ? { retain: opts.retain } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n audit\n .command('export')\n .description('Stream every audit entry as JSONL into --to.')\n .requiredOption('--to <file>', 'Output path.')\n .option('--from-seq <n>', 'Lower bound (inclusive).', (v) => Number.parseInt(v, 10))\n .option('--to-seq <n>', 'Upper bound (inclusive).', (v) => Number.parseInt(v, 10))\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n to: string;\n fromSeq?: number;\n toSeq?: number;\n config?: string;\n json?: boolean;\n }) => {\n await runAuditExport({\n to: opts.to,\n ...(opts.fromSeq !== undefined ? { fromSeq: opts.fromSeq } : {}),\n ...(opts.toSeq !== undefined ? { toSeq: opts.toSeq } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerMemoryCommands(program: Command): void {\n const memory = program\n .command('memory')\n .description('[Storage] Long-term memory operator commands.');\n memory\n .command('status')\n .description('Report counts + active embedder + migration state.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runMemoryStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('migrate')\n .description('Embedder swap. Requires --embedders module that exports the factories.')\n .requiredOption('--from <id>', 'Source embedder id.')\n .requiredOption('--to <id>', 'Target embedder id.')\n .requiredOption('--strategy <s>', 'lock-on-first | auto-migrate | multi-active.')\n .option('--embedders <path>', 'Path to a module exporting embedder factories.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(\n async (opts: {\n from: string;\n to: string;\n strategy: string;\n embedders?: string;\n config?: string;\n }) => {\n await runMemoryMigrate({\n from: opts.from,\n to: opts.to,\n strategy: opts.strategy as 'lock-on-first' | 'auto-migrate' | 'multi-active',\n ...(opts.embedders !== undefined ? { embeddersModule: opts.embedders } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n },\n );\n memory\n .command('inspect')\n .description('Inspect one fact: supersede chain, quarantine, conflicts, citing insights.')\n .argument('<factId>', 'Id of the fact to inspect.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (factId: string, opts: { config?: string; json?: boolean }) => {\n await runMemoryInspect({\n factId,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('activity')\n .description('Store-wide consolidator / reflection activity: quarantine, history, conflicts.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--limit <n>', 'Cap on recent history / conflict rows (default 20).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; limit?: string; json?: boolean }) => {\n const limit = opts.limit !== undefined ? Number.parseInt(opts.limit, 10) : undefined;\n await runMemoryActivity({\n ...(limit !== undefined && Number.isFinite(limit) ? { limit } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('why')\n .description(\n 'Explain why facts were recalled (ranking signals) from the persisted recall spans.',\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--session <id>', \"Restrict to one session's recall spans.\")\n .option('--limit <n>', 'Cap on the most-recent recall spans (default 5).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; session?: string; limit?: string; json?: boolean }) => {\n const limit = opts.limit !== undefined ? Number.parseInt(opts.limit, 10) : undefined;\n await runMemoryWhy({\n ...(opts.session !== undefined ? { sessionId: opts.session } : {}),\n ...(limit !== undefined && Number.isFinite(limit) ? { limit } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('review')\n .description('List quarantined memory by tier, or promote a reviewed item with --promote.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--limit <n>', 'Cap on rows listed per type (default 20).')\n .option('--promote <id>', 'Promote this quarantined memory id out of quarantine.')\n .option('--reason <text>', 'Audit reason recorded with the promotion.')\n .option('--force', 'Override the injection-refusal gate (operator action, after review).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n config?: string;\n limit?: string;\n promote?: string;\n reason?: string;\n force?: boolean;\n json?: boolean;\n }) => {\n const limit = opts.limit !== undefined ? Number.parseInt(opts.limit, 10) : undefined;\n await runMemoryReview({\n ...(limit !== undefined && Number.isFinite(limit) ? { limit } : {}),\n ...(opts.promote !== undefined ? { promote: opts.promote } : {}),\n ...(opts.reason !== undefined ? { reason: opts.reason } : {}),\n ...(opts.force !== undefined ? { force: opts.force } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerConsolidatorCommands(program: Command): void {\n const c = program\n .command('consolidator')\n .description('[Storage] Inspect and steer the memory consolidator.');\n c.command('status')\n .description('Current tier hint + DLQ size + recent run history.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runConsolidatorStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n c.command('set-tier <tier>')\n .description('Persist a tier hint (free | cheap | standard | full | custom).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (tier: string, opts: { config?: string; json?: boolean }) => {\n await runConsolidatorSetTier({\n tier: tier as 'free' | 'cheap' | 'standard' | 'full' | 'custom',\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n c.command('stop')\n .description('Persist a pause flag the running daemon honours.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runConsolidatorStop({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerTriggersCommands(program: Command): void {\n const t = program\n .command('triggers')\n .description('[Storage] Operate on the durable trigger registry.');\n t.command('list')\n .description('Every persisted trigger.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runTriggersList({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('status <id>')\n .description('Single-trigger detail.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTriggersStatus({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('fire <id>')\n .description('Operator-fired side-effect (admin only).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTriggersFire({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('disable <id>')\n .description('Flip the disabled column on the registry row.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTriggersDisable({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('prune')\n .description('Drop disabled triggers older than --before.')\n .option(\n '--before <date>',\n 'ISO date / epoch ms cutoff. Defaults to 0 (drop every disabled row).',\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { before?: string; config?: string; json?: boolean }) => {\n await runTriggersPrune({\n ...(opts.before !== undefined ? { before: opts.before } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerAuthCommands(program: Command): void {\n const a = program.command('auth').description('[Auth] Outbound OAuth (e.g. for MCP servers).');\n a.command('login')\n .description('Drive an interactive login flow.')\n .requiredOption('--server <url>', 'Authorization server URL.')\n .option('--server-id <id>', 'Override the persisted server identifier.')\n .option('--scope <scope>', 'OAuth scope.')\n .option('--device-flow', 'Use the Device Authorization Grant.')\n .option('--client-id <id>', 'Pre-existing client identifier (skip DCR).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(\n async (opts: {\n server: string;\n serverId?: string;\n scope?: string;\n deviceFlow?: boolean;\n clientId?: string;\n config?: string;\n }) => {\n await runAuthLogin({\n serverUrl: opts.server,\n ...(opts.serverId !== undefined ? { serverId: opts.serverId } : {}),\n ...(opts.scope !== undefined ? { scope: opts.scope } : {}),\n ...(opts.deviceFlow !== undefined ? { deviceFlow: opts.deviceFlow } : {}),\n ...(opts.clientId !== undefined ? { clientId: opts.clientId } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n },\n );\n a.command('list')\n .description('List persisted OAuth sessions.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runAuthList({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n a.command('refresh <id>')\n .description('Refresh a session.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(async (id: string, opts: { config?: string }) => {\n await runAuthRefresh({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n });\n a.command('revoke <id>')\n .description('Revoke a session.')\n .option('--reason <text>', 'Optional reason persisted in the audit log.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(async (id: string, opts: { reason?: string; config?: string }) => {\n await runAuthRevoke({\n id,\n ...(opts.reason !== undefined ? { reason: opts.reason } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n });\n a.command('status')\n .description('OAuth subsystem snapshot.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runAuthStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerPricingCommands(program: Command): void {\n const p = program.command('pricing').description('[Catalogue] Bundled LLM pricing snapshot.');\n p.command('status')\n .description('Show bundled snapshot version + entry count + digest.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runPricingStatus({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n p.command('refresh')\n .description('Pull a fresh snapshot from --url (network).')\n .requiredOption('--url <url>', 'Snapshot URL.')\n .option('--out <file>', 'Optional path to write the refreshed snapshot to.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { url: string; out?: string; json?: boolean }) => {\n await runPricingRefresh({\n url: opts.url,\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n p.command('diff')\n .description('Diff a supplied snapshot against the bundled one.')\n .requiredOption('--snapshot <file>', 'JSON file containing a PricingSnapshot.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { snapshot: string; json?: boolean }) => {\n await runPricingDiff({\n snapshot: opts.snapshot,\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n p.command('lookup')\n .description('Print the per-token price for a single (provider, model) pair.')\n .requiredOption('--provider <name>', 'Provider id.')\n .requiredOption('--model <id>', 'Model id.')\n .option('--region <region>', 'Optional region.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { provider: string; model: string; region?: string; json?: boolean }) => {\n runPricingLookup({\n provider: opts.provider,\n model: opts.model,\n ...(opts.region !== undefined ? { region: opts.region } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n p.command('missing')\n .description('Report (provider, model) pairs absent from the bundled snapshot.')\n .requiredOption('--spans <file>', 'JSON file containing trace spans (array of { attributes }).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { spans: string; json?: boolean }) => {\n await runPricingMissing({\n spans: opts.spans,\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerSkillsCommands(program: Command): void {\n const s = program\n .command('skills')\n .description('[Catalogue] Manage operator-managed skill packages.');\n s.command('install <source>')\n .description('Install a skill from npm:<name>[@version] or git:<url>.')\n .option('--version <version>', 'npm version pin.')\n .option('--ref <ref>', 'git ref (branch / tag / sha).')\n .option('--trust-level <level>', 'trusted | trusted-with-scripts | untrusted.')\n .option('--cwd <dir>', 'Working directory for npm installs.')\n .option('--dry-run', 'Skip the install; run the policy + audit pipeline only.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (\n source: string,\n opts: {\n version?: string;\n ref?: string;\n trustLevel?: 'trusted' | 'trusted-with-scripts' | 'untrusted';\n cwd?: string;\n dryRun?: boolean;\n json?: boolean;\n },\n ) => {\n await runSkillsInstall({\n source,\n ...(opts.version !== undefined ? { version: opts.version } : {}),\n ...(opts.ref !== undefined ? { ref: opts.ref } : {}),\n ...(opts.trustLevel !== undefined ? { trustLevel: opts.trustLevel } : {}),\n ...(opts.cwd !== undefined ? { cwd: opts.cwd } : {}),\n ...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n s.command('inspect <name>')\n .description('Print a single recorded installation.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (name: string, opts: { json?: boolean }) => {\n await runSkillsInspect({\n name,\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n s.command('audit')\n .description('Audit every recorded installation in this process.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runSkillsAudit({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n s.command('migrate-frontmatter')\n .description(\n 'Migrate legacy graphorin-* frontmatter fields onto upstream equivalents (DEC-156).',\n )\n .option('--path <dir>', 'Directory to walk. Defaults to cwd.')\n .option('--recursive', 'Walk subdirectories.')\n .option('--apply', 'Actually rewrite files (default: dry-run).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: { path?: string; recursive?: boolean; apply?: boolean; json?: boolean }) => {\n await runSkillsMigrateFrontmatter({\n ...(opts.path !== undefined ? { path: opts.path } : {}),\n ...(opts.recursive !== undefined ? { recursive: opts.recursive } : {}),\n ...(opts.apply !== undefined ? { apply: opts.apply } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerTracesCommands(program: Command): void {\n const t = program.command('traces').description('[Diagnostics] Operate on the trace cache.');\n t.command('status')\n .description('Count rows + report TTL config.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runTracesStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('prune')\n .description('Manual TTL enforcement (cutoff is required).')\n .requiredOption('--before <date>', 'ISO date / epoch ms cutoff.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { before: string; config?: string; json?: boolean }) => {\n await runTracesPrune({\n before: opts.before,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerMigrateExportCommand(program: Command): void {\n program\n .command('migrate-export <input>')\n .description('[Storage] Migrate a session export file to the current schema (DEC-155).')\n .requiredOption('--to <file>', 'Output path.')\n .option('--to-schema <version>', 'Target schema version.', '1.0')\n .option('--writer <id>', 'Writer identifier surfaced on the meta header.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (\n input: string,\n opts: { to: string; toSchema?: string; writer?: string; json?: boolean },\n ) => {\n await runMigrateExport({\n input,\n to: opts.to,\n ...(opts.toSchema !== undefined ? { toSchema: opts.toSchema } : {}),\n ...(opts.writer !== undefined ? { writer: opts.writer } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerMigrateConfigCommand(program: Command): void {\n program\n .command('migrate-config <input>')\n .description('[Bootstrap] Migrate an old config file to the current schema.')\n .option('--out <file>', 'Output path. Defaults to <input>.migrated.json next to the source.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (input: string, opts: { out?: string; json?: boolean }) => {\n await runMigrateConfig({\n input,\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerGuardCommands(program: Command): void {\n const g = program\n .command('guard')\n .description('[Diagnostics] Inspect the memory-modification guard.');\n g.command('status')\n .description('Print the four guard tiers and their variants.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runGuardStatus({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n g.command('explain <toolName>')\n .description(\n 'Derive the tier the classifier would assign to a tool with the supplied metadata.',\n )\n .option('--tags <list>', 'Comma-separated tag list.')\n .option('--secrets-allowed <list>', 'Comma-separated secret allowlist.')\n .option('--trust-level <level>', 'built-in | user-defined | trusted | untrusted.')\n .option(\n '--explicit-tier <tier>',\n 'pure | side-effecting-no-memory | memory-aware | unknown | untrusted.',\n )\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n (\n toolName: string,\n opts: {\n tags?: string;\n secretsAllowed?: string;\n trustLevel?: 'built-in' | 'user-defined' | 'trusted' | 'untrusted';\n explicitTier?:\n | 'pure'\n | 'side-effecting-no-memory'\n | 'memory-aware'\n | 'unknown'\n | 'untrusted';\n json?: boolean;\n },\n ) => {\n runGuardExplain({\n toolName,\n ...(opts.tags !== undefined\n ? {\n tags: opts.tags\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean),\n }\n : {}),\n ...(opts.secretsAllowed !== undefined\n ? {\n secretsAllowed: opts.secretsAllowed\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean),\n }\n : {}),\n ...(opts.trustLevel !== undefined ? { trustLevel: opts.trustLevel } : {}),\n ...(opts.explicitTier !== undefined ? { explicitTier: opts.explicitTier } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerTelemetryCommands(program: Command): void {\n const t = program\n .command('telemetry')\n .description('[Diagnostics] Telemetry policy (zero-default per ADR-041).');\n t.command('status')\n .description('Always reports disabled.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryStatus({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n t.command('enable')\n .description('Refuses; opt-in collector is on the v0.2+ roadmap.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryEnable({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n t.command('disable')\n .description('No-op; telemetry is always disabled.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryDisable({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n t.command('inspect')\n .description('Informational summary of the zero-default promise.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryInspect({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n}\n\nfunction registerToolsCommands(program: Command): void {\n const tools = program.command('tools').description('[Catalogue] Operate on the tool registry.');\n tools\n .command('lint')\n .description(\n [\n 'Static AST analysis of every tool({...}) registration; per-tool grader + threshold gate (RB-49).',\n '',\n 'Grader rubric (40 + 30 + 30 = 100 points):',\n ' description axis (0..40): 0 if missing/placeholder/<20 chars; 16/24/32/40 by length.',\n ' examples axis (0..30): 0 if none or >5; 12 base + 6 per additional, cap 30; -6 per PII.',\n ' parameter naming (0..30): 30 base; -30/N per ambiguous name; -10/N per numeric suffix.',\n '',\n 'Exit codes (CI-friendly):',\n ' 0 every tool meets or exceeds --threshold.',\n ' 1 at least one tool falls below --threshold.',\n ' 2 invocation could not start (config missing, walker failed).',\n ].join('\\n'),\n )\n .option('-c, --config <path>', 'Optional tsconfig.json whose include overrides the file glob.')\n .option('--threshold <n>', 'Minimum acceptable per-tool score (default 60).', (v) =>\n Number.parseInt(v, 10),\n )\n .option('--format <fmt>', 'text | json (default text).')\n .option('--source <pattern>', 'File glob override (e.g. src/skills/**/tools/*.ts).')\n .action(\n async (opts: {\n config?: string;\n threshold?: number;\n format?: 'text' | 'json';\n source?: string;\n }) => {\n await runToolsLint({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.threshold !== undefined ? { threshold: opts.threshold } : {}),\n ...(opts.format !== undefined ? { format: opts.format } : {}),\n ...(opts.source !== undefined ? { source: opts.source } : {}),\n });\n },\n );\n}\n\nmain().catch((err) => {\n process.stderr.write(`[graphorin/cli] ${(err as Error).message}\\n`);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,eAAe,OAAsB;CACnC,MAAM,UAAU,IAAI,SAAS;AAC7B,SACG,KAAK,YAAY,CACjB,YACC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK,CACb,CACA,QAAQ,QAAQ;AAEnB,2BAA0B,QAAQ;AAClC,uBAAsB,QAAQ;AAC9B,uBAAsB,QAAQ;AAC9B,yBAAwB,QAAQ;AAChC,yBAAwB,QAAQ;AAChC,uBAAsB,QAAQ;AAC9B,wBAAuB,QAAQ;AAC/B,8BAA6B,QAAQ;AACrC,0BAAyB,QAAQ;AACjC,sBAAqB,QAAQ;AAC7B,yBAAwB,QAAQ;AAChC,wBAAuB,QAAQ;AAC/B,wBAAuB,QAAQ;AAC/B,8BAA6B,QAAQ;AACrC,8BAA6B,QAAQ;AACrC,uBAAsB,QAAQ;AAC9B,2BAA0B,QAAQ;AAClC,uBAAsB,QAAQ;AAE9B,OAAM,QAAQ,WAAW,QAAQ,KAAK;;AAGxC,SAAS,0BAA0B,SAAwB;AACzD,SACG,QAAQ,QAAQ,CAChB,YAAY,gDAAgD,CAC5D,OAAO,uBAAuB,sDAAsD,CACpF,OAAO,qBAAqB,uCAAuC,CACnE,OAAO,qBAAqB,yCAAyC,UACpE,OAAO,SAAS,OAAO,GAAG,CAC3B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KAAK,SAAS,SAAY,EAAE,MAAM,KAAK,MAAM,GAAG,EAAE,EAAG,CAAC;GAChF;;AAGN,SAAS,sBAAsB,SAAwB;AAErD,CADc,QAAQ,QAAQ,QAAQ,CAAC,YAAY,4CAA4C,CAE5F,QAAQ,OAAO,CACf,YACC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK,CACb,CACA,OAAO,uBAAuB,gEAAgE,CAC9F,OAAO,mBAAmB,oDAAoD,MAC7E,OAAO,SAAS,GAAG,GAAG,CACvB,CACA,OAAO,kBAAkB,8BAA8B,CACvD,OAAO,sBAAsB,sDAAsD,CACnF,OACC,OAAO,SAKD;AACJ,QAAM,aAAa;GACjB,GAAI,KAAK,WAAW,SAAY,EAAE,QAAQ,KAAK,QAAQ,GAAG,EAAE;GAC5D,GAAI,KAAK,cAAc,SAAY,EAAE,WAAW,KAAK,WAAW,GAAG,EAAE;GACrE,GAAI,KAAK,WAAW,SAAY,EAAE,QAAQ,KAAK,QAAQ,GAAG,EAAE;GAC5D,GAAI,KAAK,WAAW,SAAY,EAAE,QAAQ,KAAK,QAAQ,GAAG,EAAE;GAC7D,CAAC;GAEL;;AAGL,MAAM,CAAC,OAAO,QAAQ;AACpB,SAAQ,OAAO,MAAM,mBAAoB,IAAc,QAAQ,IAAI;AACnE,SAAQ,KAAK,EAAE;EACf"}
1
+ {"version":3,"file":"graphorin.js","names":[],"sources":["../../src/bin/graphorin.ts"],"sourcesContent":["/**\n * `graphorin` CLI entry point. Built into `dist/bin/graphorin.js`\n * with a shebang prepended by `tsdown`; the `package.json` `bin`\n * field points npm at the compiled file.\n *\n * Phase 14a installs three subcommands grouped by lifecycle phase:\n *\n * Bootstrap:\n * - graphorin init\n *\n * Maintenance:\n * - graphorin migrate\n *\n * Runtime:\n * - graphorin start\n *\n * Phase 15 extends this binary with the full operator surface\n * (`doctor`, `token`, `secrets`, `audit`, `storage`, `memory`,\n * `consolidator`, `triggers`, `auth`, `pricing`, `skills`, `traces`,\n * `migrate-export`, `migrate-config`, `guard`, `telemetry`,\n * `tools lint`).\n *\n * `GRAPHORIN_OFFLINE=1` is honoured by every subcommand - the v0.1\n * surface never makes implicit network calls. Phase 15 commands that\n * do touch the network (e.g. `graphorin pricing refresh`) consult\n * the same flag through the helper in `../internal/offline.ts`.\n *\n * @packageDocumentation\n */\n\nimport process from 'node:process';\n\nimport { Command } from 'commander';\n\nimport {\n runAuditExport,\n runAuditPrune,\n runAuditVerify,\n runAuthList,\n runAuthLogin,\n runAuthRefresh,\n runAuthRevoke,\n runAuthStatus,\n runConsolidatorSetTier,\n runConsolidatorStatus,\n runConsolidatorStop,\n runDoctor,\n runGuardExplain,\n runGuardStatus,\n runInit,\n runMemoryActivity,\n runMemoryInspect,\n runMemoryMigrate,\n runMemoryReview,\n runMemoryStatus,\n runMemoryWhy,\n runMigrate,\n runMigrateConfig,\n runMigrateExport,\n runPricingDiff,\n runPricingLookup,\n runPricingMissing,\n runPricingRefresh,\n runPricingStatus,\n runSecretsDelete,\n runSecretsGet,\n runSecretsList,\n runSecretsRef,\n runSecretsRotate,\n runSecretsSet,\n runSkillsAudit,\n runSkillsInspect,\n runSkillsInstall,\n runSkillsMigrateFrontmatter,\n runStart,\n runStorageBackup,\n runStorageCleanupBackups,\n runStorageEncrypt,\n runStorageRekey,\n runStorageStatus,\n runTelemetryDisable,\n runTelemetryEnable,\n runTelemetryInspect,\n runTelemetryStatus,\n runTokenCreate,\n runTokenList,\n runTokenRekey,\n runTokenRevoke,\n runTokenRotate,\n runTokenVerify,\n runToolsLint,\n runTracesPrune,\n runTracesStatus,\n runTriggersDisable,\n runTriggersFire,\n runTriggersList,\n runTriggersPrune,\n runTriggersStatus,\n VERSION,\n} from '../index.js';\nimport { isOfflineMode } from '../internal/offline.js';\n\nasync function main(): Promise<void> {\n const program = new Command();\n program\n .name('graphorin')\n .description(\n [\n 'Operator CLI for the Graphorin framework.',\n '',\n 'Commands grouped by purpose:',\n ' Bootstrap: init, migrate, migrate-config',\n ' Runtime: start',\n ' Diagnostics: doctor, telemetry, traces, guard',\n ' Auth: token, secrets, auth',\n ' Storage: storage, audit, memory, consolidator, triggers, migrate-export',\n ' Catalogue: pricing, skills, tools',\n '',\n 'Honours GRAPHORIN_OFFLINE=1 - the v0.1 surface never makes implicit network calls.',\n ].join('\\n'),\n )\n .version(VERSION);\n\n registerLifecycleCommands(program);\n registerDoctorCommand(program);\n registerTokenCommands(program);\n registerSecretsCommands(program);\n registerStorageCommands(program);\n registerAuditCommands(program);\n registerMemoryCommands(program);\n registerConsolidatorCommands(program);\n registerTriggersCommands(program);\n registerAuthCommands(program);\n registerPricingCommands(program);\n registerSkillsCommands(program);\n registerTracesCommands(program);\n registerMigrateExportCommand(program);\n registerMigrateConfigCommand(program);\n registerGuardCommands(program);\n registerTelemetryCommands(program);\n registerToolsCommands(program);\n\n await program.parseAsync(process.argv);\n}\n\nfunction registerLifecycleCommands(program: Command): void {\n program\n .command('start')\n .description('[Runtime] Start the @graphorin/server daemon.')\n .option('-c, --config <path>', 'Path to the graphorin.config file (TS / JS / JSON).')\n .option('-h, --host <host>', 'Override the configured listen host.')\n .option('-p, --port <port>', 'Override the configured listen port.', (value) =>\n Number.parseInt(value, 10),\n )\n .option(\n '--secrets-source <kind>',\n 'Override secrets.source: auto | keyring | encrypted-file | env (DEC-136).',\n )\n .option('--strict-secrets', 'Refuse to fall back to a different secrets store (DEC-136).')\n .action(\n async (opts: {\n config?: string;\n host?: string;\n port?: number;\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n }) => {\n if (isOfflineMode()) {\n process.stderr.write(\n '[graphorin/cli] GRAPHORIN_OFFLINE=1 - running with no implicit network calls.\\n',\n );\n }\n await runStart({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.host !== undefined ? { host: opts.host } : {}),\n ...(opts.port !== undefined ? { port: opts.port } : {}),\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n });\n },\n );\n\n program\n .command('init')\n .description(\n '[Bootstrap] Generate a fresh graphorin.config.ts and a one-shot bootstrap admin token.',\n )\n .option('-o, --out <path>', 'Output path; defaults to ./graphorin.config.ts.')\n .option('--non-interactive', 'Accept defaults / env vars without prompting.', false)\n .option(\n '--cloud-consent <tier>',\n 'Cloud-upload consent tier: public-only | public-and-internal | all-with-warnings.',\n )\n .option('--encrypted', 'Enable storage encryption opt-in.')\n .option('--no-encrypted', 'Disable storage encryption opt-in.')\n .action(\n async (opts: {\n out?: string;\n nonInteractive?: boolean;\n cloudConsent?: 'public-only' | 'public-and-internal' | 'all-with-warnings';\n encrypted?: boolean;\n }) => {\n if (isOfflineMode()) {\n process.stderr.write(\n '[graphorin/cli] GRAPHORIN_OFFLINE=1 - init never reaches the network.\\n',\n );\n }\n await runInit({\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n ...(opts.nonInteractive !== undefined ? { nonInteractive: opts.nonInteractive } : {}),\n ...(opts.cloudConsent !== undefined ? { cloudConsent: opts.cloudConsent } : {}),\n ...(opts.encrypted !== undefined ? { encrypted: opts.encrypted } : {}),\n });\n },\n );\n\n program\n .command('migrate')\n .description(\n '[Maintenance] Apply pending storage migrations against the configured SQLite store.',\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--target <version>', 'Reserved for the Phase 15 partial-migration runner.')\n .action(async (opts: { config?: string; target?: string }) => {\n if (isOfflineMode()) {\n process.stderr.write(\n '[graphorin/cli] GRAPHORIN_OFFLINE=1 - migrate is a local-only operation.\\n',\n );\n }\n await runMigrate({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.target !== undefined ? { target: opts.target } : {}),\n });\n });\n}\n\nfunction registerDoctorCommand(program: Command): void {\n program\n .command('doctor')\n .description('[Diagnostics] Health check (perms + secrets + encryption + systemd).')\n .option('--fix-perms', 'Repair drifted POSIX file modes.')\n .option('--check-perms', 'Run the file-perms check.')\n .option('--check-secrets', 'Run the secrets-store check.')\n .option('--check-encryption', 'Run the audit-encryption check.')\n .option('--check-systemd', 'Run the systemd-hardening check (Linux only).')\n .option('--all', 'Run every check.')\n .option('--json', 'Emit a structured JSON report on stdout.')\n .action(\n async (opts: {\n fixPerms?: boolean;\n checkPerms?: boolean;\n checkSecrets?: boolean;\n checkEncryption?: boolean;\n checkSystemd?: boolean;\n all?: boolean;\n json?: boolean;\n }) => {\n await runDoctor({\n ...(opts.fixPerms !== undefined ? { fixPerms: opts.fixPerms } : {}),\n ...(opts.checkPerms !== undefined ? { checkPerms: opts.checkPerms } : {}),\n ...(opts.checkSecrets !== undefined ? { checkSecrets: opts.checkSecrets } : {}),\n ...(opts.checkEncryption !== undefined ? { checkEncryption: opts.checkEncryption } : {}),\n ...(opts.checkSystemd !== undefined ? { checkSystemd: opts.checkSystemd } : {}),\n ...(opts.all !== undefined ? { all: opts.all } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerTokenCommands(program: Command): void {\n const token = program.command('token').description('[Auth] Manage server auth tokens.');\n token\n .command('create')\n .description('Mint a new token. Prints the raw value once.')\n .requiredOption('--scopes <list>', 'Comma-separated scope list.')\n .option('--label <name>', 'Optional label.')\n .option('--expires-in <duration>', 'Duration string: 30d, 12h, 90m, 45s.')\n .option('--env <env>', 'Token environment: live | test.', 'live')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n scopes: string;\n label?: string;\n expiresIn?: string;\n env?: 'live' | 'test';\n config?: string;\n json?: boolean;\n }) => {\n await runTokenCreate({\n scopes: opts.scopes\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean),\n ...(opts.label !== undefined ? { label: opts.label } : {}),\n ...(opts.expiresIn !== undefined ? { expiresIn: opts.expiresIn } : {}),\n ...(opts.env !== undefined ? { env: opts.env } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n token\n .command('list')\n .description('List token metadata.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--include-revoked', 'Include revoked tokens.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; includeRevoked?: boolean; json?: boolean }) => {\n await runTokenList({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.includeRevoked !== undefined ? { includeRevoked: opts.includeRevoked } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n token\n .command('revoke <id>')\n .description('Revoke a single token.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTokenRevoke({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n token\n .command('rotate <id>')\n .description('Revoke + reissue a token with the same scopes.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--env <env>', 'Token environment: live | test.', 'live')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (id: string, opts: { config?: string; env?: 'live' | 'test'; json?: boolean }) => {\n await runTokenRotate({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.env !== undefined ? { env: opts.env } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n token\n .command('rekey')\n .description('Re-issue every active token (use after a known compromise).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--env <env>', 'Token environment: live | test.', 'live')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; env?: 'live' | 'test'; json?: boolean }) => {\n await runTokenRekey({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.env !== undefined ? { env: opts.env } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n token\n .command('verify <token>')\n .description('Offline checksum verification - never consults the store.')\n .option('--prefix <prefix>', 'Override the expected token prefix.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((tok: string, opts: { prefix?: string; json?: boolean }) => {\n runTokenVerify({\n token: tok,\n ...(opts.prefix !== undefined ? { prefix: opts.prefix } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerSecretsCommands(program: Command): void {\n const secrets = program\n .command('secrets')\n .description('[Auth] Manage secrets in the configured store.');\n const commonOpts = (cmd: Command): Command =>\n cmd\n .option('--secrets-source <kind>', 'auto | keyring | encrypted-file | env (DEC-136).')\n .option('--strict-secrets', 'Refuse to fall back to a different secrets store.')\n .option('--json', 'Emit a structured JSON document on stdout.');\n commonOpts(secrets.command('list').description('List secret metadata.')).action(\n async (opts: {\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n }) => {\n await runSecretsList({\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n commonOpts(\n secrets\n .command('get <key>')\n .description('Read a secret. Use --reveal to print the bytes.')\n .option('--reveal', 'Print the raw value.'),\n ).action(\n async (\n key: string,\n opts: {\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n reveal?: boolean;\n },\n ) => {\n await runSecretsGet({\n key,\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n ...(opts.reveal !== undefined ? { reveal: opts.reveal } : {}),\n });\n },\n );\n commonOpts(\n secrets\n .command('set <key>')\n .description('Persist a secret. Pass --value <v> or --from-stdin.')\n .option('--value <v>', 'Inline value.')\n .option('--from-stdin', 'Read the value from stdin.'),\n ).action(\n async (\n key: string,\n opts: {\n value?: string;\n fromStdin?: boolean;\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n },\n ) => {\n await runSecretsSet({\n key,\n ...(opts.value !== undefined ? { value: opts.value } : {}),\n ...(opts.fromStdin !== undefined ? { fromStdin: opts.fromStdin } : {}),\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n commonOpts(secrets.command('delete <key>').description('Delete a secret.')).action(\n async (\n key: string,\n opts: {\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n },\n ) => {\n await runSecretsDelete({\n key,\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n commonOpts(\n secrets\n .command('ref <uri>')\n .description('Test resolution of a SecretRef URI.')\n .option('--reveal', 'Include the resolved value in the report.'),\n ).action(async (uri: string, opts: { reveal?: boolean; json?: boolean }) => {\n await runSecretsRef({\n uri,\n ...(opts.reveal !== undefined ? { reveal: opts.reveal } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n commonOpts(\n secrets\n .command('rotate <key>')\n .description('Replace an existing secret with a fresh value.')\n .option('--new-value <v>', 'Inline new value.')\n .option('--from-stdin', 'Read the new value from stdin.'),\n ).action(\n async (\n key: string,\n opts: {\n newValue?: string;\n fromStdin?: boolean;\n secretsSource?: 'auto' | 'keyring' | 'encrypted-file' | 'env';\n strictSecrets?: boolean;\n json?: boolean;\n },\n ) => {\n await runSecretsRotate({\n key,\n ...(opts.newValue !== undefined ? { newValue: opts.newValue } : {}),\n ...(opts.fromStdin !== undefined ? { fromStdin: opts.fromStdin } : {}),\n ...(opts.secretsSource !== undefined ? { secretsSource: opts.secretsSource } : {}),\n ...(opts.strictSecrets !== undefined ? { strictSecrets: opts.strictSecrets } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerStorageCommands(program: Command): void {\n const storage = program\n .command('storage')\n .description('[Storage] SQLite + encryption-at-rest commands.');\n storage\n .command('status')\n .description('Report current store state + cipher peer availability.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runStorageStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n storage\n .command('encrypt')\n .description(\n 'Encrypt the store. Requires the @graphorin/store-sqlite-encrypted sub-pack (Phase 16).',\n )\n .requiredOption('--passphrase-from <ref>', 'SecretRef URI for the new passphrase.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option(\n '--target-path <path>',\n 'Override the encrypted output path. Default <storage>.encrypted.',\n )\n .option(\n '--swap',\n 'Atomically swap the encrypted output into the storage path; original kept under .bak.<ts>.',\n )\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n passphraseFrom: string;\n config?: string;\n targetPath?: string;\n swap?: boolean;\n json?: boolean;\n }) => {\n await runStorageEncrypt({\n passphraseFrom: opts.passphraseFrom,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.targetPath !== undefined ? { targetPath: opts.targetPath } : {}),\n ...(opts.swap === true ? { swap: true } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n storage\n .command('rekey')\n .description('Rekey an already-encrypted store.')\n .requiredOption('--old-passphrase-from <ref>', 'SecretRef URI for the existing passphrase.')\n .requiredOption('--new-passphrase-from <ref>', 'SecretRef URI for the new passphrase.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n oldPassphraseFrom: string;\n newPassphraseFrom: string;\n config?: string;\n json?: boolean;\n }) => {\n await runStorageRekey({\n oldPassphraseFrom: opts.oldPassphraseFrom,\n newPassphraseFrom: opts.newPassphraseFrom,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n storage\n .command('backup')\n .description(\n 'Online, consistent copy of the store via the page-level backup API (safe under a live writer; never use VACUUM INTO).',\n )\n .argument('<dest>', 'Destination file path for the backup copy.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--overwrite', 'Replace an existing destination file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (dest: string, opts: { config?: string; overwrite?: boolean; json?: boolean }) => {\n await runStorageBackup({\n dest,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.overwrite === true ? { overwrite: true } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n storage\n .command('cleanup-backups')\n .description('Drop stale .bak / .tmp.<ts> files left by previous encrypt / rekey runs.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--dry-run', 'Print what would be removed without touching the filesystem.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; dryRun?: boolean; json?: boolean }) => {\n await runStorageCleanupBackups({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerAuditCommands(program: Command): void {\n const audit = program\n .command('audit')\n .description('[Storage] Operate on the encrypted audit log.');\n audit\n .command('verify')\n .description('Replay the chain and report the first broken link (if any).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runAuditVerify({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n audit\n .command('prune')\n .description('Drop entries older than --before (cutoff is required).')\n .requiredOption('--before <date>', 'ISO date / epoch ms cutoff.')\n .option('--retain <n>', 'Minimum number of entries that must survive.', (v) =>\n Number.parseInt(v, 10),\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { before: string; retain?: number; config?: string; json?: boolean }) => {\n await runAuditPrune({\n before: opts.before,\n ...(opts.retain !== undefined ? { retain: opts.retain } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n audit\n .command('export')\n .description('Stream every audit entry as JSONL into --to.')\n .requiredOption('--to <file>', 'Output path.')\n .option('--from-seq <n>', 'Lower bound (inclusive).', (v) => Number.parseInt(v, 10))\n .option('--to-seq <n>', 'Upper bound (inclusive).', (v) => Number.parseInt(v, 10))\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n to: string;\n fromSeq?: number;\n toSeq?: number;\n config?: string;\n json?: boolean;\n }) => {\n await runAuditExport({\n to: opts.to,\n ...(opts.fromSeq !== undefined ? { fromSeq: opts.fromSeq } : {}),\n ...(opts.toSeq !== undefined ? { toSeq: opts.toSeq } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerMemoryCommands(program: Command): void {\n const memory = program\n .command('memory')\n .description('[Storage] Long-term memory operator commands.');\n memory\n .command('status')\n .description('Report counts + active embedder + migration state.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runMemoryStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('migrate')\n .description('Embedder swap. Requires --embedders module that exports the factories.')\n .requiredOption('--from <id>', 'Source embedder id.')\n .requiredOption('--to <id>', 'Target embedder id.')\n .requiredOption('--strategy <s>', 'lock-on-first | auto-migrate | multi-active.')\n .option('--embedders <path>', 'Path to a module exporting embedder factories.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(\n async (opts: {\n from: string;\n to: string;\n strategy: string;\n embedders?: string;\n config?: string;\n }) => {\n await runMemoryMigrate({\n from: opts.from,\n to: opts.to,\n strategy: opts.strategy as 'lock-on-first' | 'auto-migrate' | 'multi-active',\n ...(opts.embedders !== undefined ? { embeddersModule: opts.embedders } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n },\n );\n memory\n .command('inspect')\n .description('Inspect one fact: supersede chain, quarantine, conflicts, citing insights.')\n .argument('<factId>', 'Id of the fact to inspect.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (factId: string, opts: { config?: string; json?: boolean }) => {\n await runMemoryInspect({\n factId,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('activity')\n .description('Store-wide consolidator / reflection activity: quarantine, history, conflicts.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--limit <n>', 'Cap on recent history / conflict rows (default 20).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; limit?: string; json?: boolean }) => {\n const limit = opts.limit !== undefined ? Number.parseInt(opts.limit, 10) : undefined;\n await runMemoryActivity({\n ...(limit !== undefined && Number.isFinite(limit) ? { limit } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('why')\n .description(\n 'Explain why facts were recalled (ranking signals) from the persisted recall spans.',\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--session <id>', \"Restrict to one session's recall spans.\")\n .option('--limit <n>', 'Cap on the most-recent recall spans (default 5).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; session?: string; limit?: string; json?: boolean }) => {\n const limit = opts.limit !== undefined ? Number.parseInt(opts.limit, 10) : undefined;\n await runMemoryWhy({\n ...(opts.session !== undefined ? { sessionId: opts.session } : {}),\n ...(limit !== undefined && Number.isFinite(limit) ? { limit } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n memory\n .command('review')\n .description('List quarantined memory by tier, or promote a reviewed item with --promote.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--limit <n>', 'Cap on rows listed per type (default 20).')\n .option('--promote <id>', 'Promote this quarantined memory id out of quarantine.')\n .option('--reason <text>', 'Audit reason recorded with the promotion.')\n .option('--force', 'Override the injection-refusal gate (operator action, after review).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: {\n config?: string;\n limit?: string;\n promote?: string;\n reason?: string;\n force?: boolean;\n json?: boolean;\n }) => {\n const limit = opts.limit !== undefined ? Number.parseInt(opts.limit, 10) : undefined;\n await runMemoryReview({\n ...(limit !== undefined && Number.isFinite(limit) ? { limit } : {}),\n ...(opts.promote !== undefined ? { promote: opts.promote } : {}),\n ...(opts.reason !== undefined ? { reason: opts.reason } : {}),\n ...(opts.force !== undefined ? { force: opts.force } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerConsolidatorCommands(program: Command): void {\n const c = program\n .command('consolidator')\n .description('[Storage] Inspect and steer the memory consolidator.');\n c.command('status')\n .description('Current tier hint + DLQ size + recent run history.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runConsolidatorStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n c.command('set-tier <tier>')\n .description('Persist a tier hint (free | cheap | standard | full | custom).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (tier: string, opts: { config?: string; json?: boolean }) => {\n await runConsolidatorSetTier({\n tier: tier as 'free' | 'cheap' | 'standard' | 'full' | 'custom',\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n c.command('stop')\n .description('Persist a pause flag the running daemon honours.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runConsolidatorStop({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerTriggersCommands(program: Command): void {\n const t = program\n .command('triggers')\n .description('[Storage] Operate on the durable trigger registry.');\n t.command('list')\n .description('Every persisted trigger.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runTriggersList({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('status <id>')\n .description('Single-trigger detail.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTriggersStatus({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('fire <id>')\n .description('Operator-fired side-effect (admin only).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTriggersFire({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('disable <id>')\n .description('Flip the disabled column on the registry row.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (id: string, opts: { config?: string; json?: boolean }) => {\n await runTriggersDisable({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('prune')\n .description('Drop disabled triggers older than --before.')\n .option(\n '--before <date>',\n 'ISO date / epoch ms cutoff. Defaults to 0 (drop every disabled row).',\n )\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { before?: string; config?: string; json?: boolean }) => {\n await runTriggersPrune({\n ...(opts.before !== undefined ? { before: opts.before } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerAuthCommands(program: Command): void {\n const a = program.command('auth').description('[Auth] Outbound OAuth (e.g. for MCP servers).');\n a.command('login')\n .description('Drive an interactive login flow.')\n .requiredOption('--server <url>', 'Authorization server URL.')\n .option('--server-id <id>', 'Override the persisted server identifier.')\n .option('--scope <scope>', 'OAuth scope.')\n .option('--device-flow', 'Use the Device Authorization Grant.')\n .option('--client-id <id>', 'Pre-existing client identifier (skip DCR).')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(\n async (opts: {\n server: string;\n serverId?: string;\n scope?: string;\n deviceFlow?: boolean;\n clientId?: string;\n config?: string;\n }) => {\n await runAuthLogin({\n serverUrl: opts.server,\n ...(opts.serverId !== undefined ? { serverId: opts.serverId } : {}),\n ...(opts.scope !== undefined ? { scope: opts.scope } : {}),\n ...(opts.deviceFlow !== undefined ? { deviceFlow: opts.deviceFlow } : {}),\n ...(opts.clientId !== undefined ? { clientId: opts.clientId } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n },\n );\n a.command('list')\n .description('List persisted OAuth sessions.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runAuthList({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n a.command('refresh <id>')\n .description('Refresh a session.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(async (id: string, opts: { config?: string }) => {\n await runAuthRefresh({\n id,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n });\n a.command('revoke <id>')\n .description('Revoke a session.')\n .option('--reason <text>', 'Optional reason persisted in the audit log.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .action(async (id: string, opts: { reason?: string; config?: string }) => {\n await runAuthRevoke({\n id,\n ...(opts.reason !== undefined ? { reason: opts.reason } : {}),\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n });\n });\n a.command('status')\n .description('OAuth subsystem snapshot.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runAuthStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerPricingCommands(program: Command): void {\n const p = program.command('pricing').description('[Catalogue] Bundled LLM pricing snapshot.');\n p.command('status')\n .description('Show bundled snapshot version + entry count + digest.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runPricingStatus({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n p.command('refresh')\n .description('Pull a fresh snapshot from --url (network).')\n .requiredOption('--url <url>', 'Snapshot URL.')\n .option('--out <file>', 'Optional path to write the refreshed snapshot to.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { url: string; out?: string; json?: boolean }) => {\n await runPricingRefresh({\n url: opts.url,\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n p.command('diff')\n .description('Diff a supplied snapshot against the bundled one.')\n .requiredOption('--snapshot <file>', 'JSON file containing a PricingSnapshot.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { snapshot: string; json?: boolean }) => {\n await runPricingDiff({\n snapshot: opts.snapshot,\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n p.command('lookup')\n .description('Print the per-token price for a single (provider, model) pair.')\n .requiredOption('--provider <name>', 'Provider id.')\n .requiredOption('--model <id>', 'Model id.')\n .option('--region <region>', 'Optional region.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { provider: string; model: string; region?: string; json?: boolean }) => {\n runPricingLookup({\n provider: opts.provider,\n model: opts.model,\n ...(opts.region !== undefined ? { region: opts.region } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n p.command('missing')\n .description('Report (provider, model) pairs absent from the bundled snapshot.')\n .requiredOption('--spans <file>', 'JSON file containing trace spans (array of { attributes }).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { spans: string; json?: boolean }) => {\n await runPricingMissing({\n spans: opts.spans,\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerSkillsCommands(program: Command): void {\n const s = program\n .command('skills')\n .description('[Catalogue] Manage operator-managed skill packages.');\n s.command('install <source>')\n .description('Install a skill from npm:<name>[@version] or git:<url>.')\n .option('--version <version>', 'npm version pin.')\n .option('--ref <ref>', 'git ref (branch / tag / sha).')\n .option('--trust-level <level>', 'trusted | trusted-with-scripts | untrusted.')\n .option('--cwd <dir>', 'Working directory for npm installs.')\n .option('--dry-run', 'Skip the install; run the policy + audit pipeline only.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (\n source: string,\n opts: {\n version?: string;\n ref?: string;\n trustLevel?: 'trusted' | 'trusted-with-scripts' | 'untrusted';\n cwd?: string;\n dryRun?: boolean;\n json?: boolean;\n },\n ) => {\n await runSkillsInstall({\n source,\n ...(opts.version !== undefined ? { version: opts.version } : {}),\n ...(opts.ref !== undefined ? { ref: opts.ref } : {}),\n ...(opts.trustLevel !== undefined ? { trustLevel: opts.trustLevel } : {}),\n ...(opts.cwd !== undefined ? { cwd: opts.cwd } : {}),\n ...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n s.command('inspect <name>')\n .description('Print a single recorded installation.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (name: string, opts: { json?: boolean }) => {\n await runSkillsInspect({\n name,\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n s.command('audit')\n .description('Audit every recorded installation in this process.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runSkillsAudit({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n s.command('migrate-frontmatter')\n .description(\n 'Migrate legacy graphorin-* frontmatter fields onto upstream equivalents (DEC-156).',\n )\n .option('--path <dir>', 'Directory to walk. Defaults to cwd.')\n .option('--recursive', 'Walk subdirectories.')\n .option('--apply', 'Actually rewrite files (default: dry-run).')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (opts: { path?: string; recursive?: boolean; apply?: boolean; json?: boolean }) => {\n await runSkillsMigrateFrontmatter({\n ...(opts.path !== undefined ? { path: opts.path } : {}),\n ...(opts.recursive !== undefined ? { recursive: opts.recursive } : {}),\n ...(opts.apply !== undefined ? { apply: opts.apply } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerTracesCommands(program: Command): void {\n const t = program.command('traces').description('[Diagnostics] Operate on the trace cache.');\n t.command('status')\n .description('Count rows + report TTL config.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { config?: string; json?: boolean }) => {\n await runTracesStatus({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n t.command('prune')\n .description('Manual TTL enforcement (cutoff is required).')\n .requiredOption('--before <date>', 'ISO date / epoch ms cutoff.')\n .option('-c, --config <path>', 'Path to the graphorin.config file.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (opts: { before: string; config?: string; json?: boolean }) => {\n await runTracesPrune({\n before: opts.before,\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerMigrateExportCommand(program: Command): void {\n program\n .command('migrate-export <input>')\n .description('[Storage] Migrate a session export file to the current schema (DEC-155).')\n .requiredOption('--to <file>', 'Output path.')\n .option('--to-schema <version>', 'Target schema version.', '1.0')\n .option('--writer <id>', 'Writer identifier surfaced on the meta header.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n async (\n input: string,\n opts: { to: string; toSchema?: string; writer?: string; json?: boolean },\n ) => {\n await runMigrateExport({\n input,\n to: opts.to,\n ...(opts.toSchema !== undefined ? { toSchema: opts.toSchema } : {}),\n ...(opts.writer !== undefined ? { writer: opts.writer } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerMigrateConfigCommand(program: Command): void {\n program\n .command('migrate-config <input>')\n .description('[Bootstrap] Migrate an old config file to the current schema.')\n .option('--out <file>', 'Output path. Defaults to <input>.migrated.json next to the source.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(async (input: string, opts: { out?: string; json?: boolean }) => {\n await runMigrateConfig({\n input,\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n });\n}\n\nfunction registerGuardCommands(program: Command): void {\n const g = program\n .command('guard')\n .description('[Diagnostics] Inspect the memory-modification guard.');\n g.command('status')\n .description('Print the four guard tiers and their variants.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runGuardStatus({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n g.command('explain <toolName>')\n .description(\n 'Derive the tier the classifier would assign to a tool with the supplied metadata.',\n )\n .option('--tags <list>', 'Comma-separated tag list.')\n .option('--secrets-allowed <list>', 'Comma-separated secret allowlist.')\n .option('--trust-level <level>', 'built-in | user-defined | trusted | untrusted.')\n .option(\n '--explicit-tier <tier>',\n 'pure | side-effecting-no-memory | memory-aware | unknown | untrusted.',\n )\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action(\n (\n toolName: string,\n opts: {\n tags?: string;\n secretsAllowed?: string;\n trustLevel?: 'built-in' | 'user-defined' | 'trusted' | 'untrusted';\n explicitTier?:\n | 'pure'\n | 'side-effecting-no-memory'\n | 'memory-aware'\n | 'unknown'\n | 'untrusted';\n json?: boolean;\n },\n ) => {\n runGuardExplain({\n toolName,\n ...(opts.tags !== undefined\n ? {\n tags: opts.tags\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean),\n }\n : {}),\n ...(opts.secretsAllowed !== undefined\n ? {\n secretsAllowed: opts.secretsAllowed\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean),\n }\n : {}),\n ...(opts.trustLevel !== undefined ? { trustLevel: opts.trustLevel } : {}),\n ...(opts.explicitTier !== undefined ? { explicitTier: opts.explicitTier } : {}),\n ...(opts.json !== undefined ? { json: opts.json } : {}),\n });\n },\n );\n}\n\nfunction registerTelemetryCommands(program: Command): void {\n const t = program\n .command('telemetry')\n .description('[Diagnostics] Telemetry policy (zero-default per ADR-041).');\n t.command('status')\n .description('Always reports disabled.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryStatus({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n t.command('enable')\n .description('Refuses; opt-in collector is on the v0.2+ roadmap.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryEnable({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n t.command('disable')\n .description('No-op; telemetry is always disabled.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryDisable({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n t.command('inspect')\n .description('Informational summary of the zero-default promise.')\n .option('--json', 'Emit a structured JSON document on stdout.')\n .action((opts: { json?: boolean }) => {\n runTelemetryInspect({ ...(opts.json !== undefined ? { json: opts.json } : {}) });\n });\n}\n\nfunction registerToolsCommands(program: Command): void {\n const tools = program.command('tools').description('[Catalogue] Operate on the tool registry.');\n tools\n .command('lint')\n .description(\n [\n 'Static AST analysis of every tool({...}) registration; per-tool grader + threshold gate (RB-49).',\n '',\n 'Grader rubric (40 + 30 + 30 = 100 points):',\n ' description axis (0..40): 0 if missing/placeholder/<20 chars; 16/24/32/40 by length.',\n ' examples axis (0..30): 0 if none or >5; 12 base + 6 per additional, cap 30; -6 per PII.',\n ' parameter naming (0..30): 30 base; -30/N per ambiguous name; -10/N per numeric suffix.',\n '',\n 'Exit codes (CI-friendly):',\n ' 0 every tool meets or exceeds --threshold.',\n ' 1 at least one tool falls below --threshold.',\n ' 2 invocation could not start (config missing, walker failed).',\n ].join('\\n'),\n )\n .option('-c, --config <path>', 'Optional tsconfig.json whose include overrides the file glob.')\n .option('--threshold <n>', 'Minimum acceptable per-tool score (default 60).', (v) =>\n Number.parseInt(v, 10),\n )\n .option('--format <fmt>', 'text | json (default text).')\n .option('--source <pattern>', 'File glob override (e.g. src/skills/**/tools/*.ts).')\n .action(\n async (opts: {\n config?: string;\n threshold?: number;\n format?: 'text' | 'json';\n source?: string;\n }) => {\n await runToolsLint({\n ...(opts.config !== undefined ? { config: opts.config } : {}),\n ...(opts.threshold !== undefined ? { threshold: opts.threshold } : {}),\n ...(opts.format !== undefined ? { format: opts.format } : {}),\n ...(opts.source !== undefined ? { source: opts.source } : {}),\n });\n },\n );\n}\n\nmain().catch((err) => {\n process.stderr.write(`[graphorin/cli] ${(err as Error).message}\\n`);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,eAAe,OAAsB;CACnC,MAAM,UAAU,IAAI,SAAS;AAC7B,SACG,KAAK,YAAY,CACjB,YACC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK,CACb,CACA,QAAQ,QAAQ;AAEnB,2BAA0B,QAAQ;AAClC,uBAAsB,QAAQ;AAC9B,uBAAsB,QAAQ;AAC9B,yBAAwB,QAAQ;AAChC,yBAAwB,QAAQ;AAChC,uBAAsB,QAAQ;AAC9B,wBAAuB,QAAQ;AAC/B,8BAA6B,QAAQ;AACrC,0BAAyB,QAAQ;AACjC,sBAAqB,QAAQ;AAC7B,yBAAwB,QAAQ;AAChC,wBAAuB,QAAQ;AAC/B,wBAAuB,QAAQ;AAC/B,8BAA6B,QAAQ;AACrC,8BAA6B,QAAQ;AACrC,uBAAsB,QAAQ;AAC9B,2BAA0B,QAAQ;AAClC,uBAAsB,QAAQ;AAE9B,OAAM,QAAQ,WAAW,QAAQ,KAAK;;AAGxC,SAAS,0BAA0B,SAAwB;AACzD,SACG,QAAQ,QAAQ,CAChB,YAAY,gDAAgD,CAC5D,OAAO,uBAAuB,sDAAsD,CACpF,OAAO,qBAAqB,uCAAuC,CACnE,OAAO,qBAAqB,yCAAyC,UACpE,OAAO,SAAS,OAAO,GAAG,CAC3B,CACA,OACC,2BACA,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IAAI;AACnE,SAAQ,KAAK,EAAE;EACf"}
@@ -19,7 +19,7 @@ interface AuditVerifyResult {
19
19
  };
20
20
  }
21
21
  /**
22
- * `graphorin audit verify` replay the chain and report the first
22
+ * `graphorin audit verify` - replay the chain and report the first
23
23
  * broken link (if any).
24
24
  *
25
25
  * @stable
@@ -49,7 +49,7 @@ interface AuditExportResult {
49
49
  readonly rows: number;
50
50
  }
51
51
  /**
52
- * `graphorin audit export --to <file>` stream every entry as JSONL.
52
+ * `graphorin audit export --to <file>` - stream every entry as JSONL.
53
53
  *
54
54
  * @stable
55
55
  */