@namzu/cli 7.0.0 → 8.1.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 (54) hide show
  1. package/dist/cli.d.ts.map +1 -1
  2. package/dist/cli.js +2 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/doctor.d.ts.map +1 -1
  5. package/dist/commands/doctor.js +27 -3
  6. package/dist/commands/doctor.js.map +1 -1
  7. package/dist/commands/drain.d.ts +59 -0
  8. package/dist/commands/drain.d.ts.map +1 -0
  9. package/dist/commands/drain.js +301 -0
  10. package/dist/commands/drain.js.map +1 -0
  11. package/dist/commands/run-flags.d.ts +35 -0
  12. package/dist/commands/run-flags.d.ts.map +1 -1
  13. package/dist/commands/run-flags.js +42 -0
  14. package/dist/commands/run-flags.js.map +1 -1
  15. package/dist/commands/run-stream.d.ts +37 -9
  16. package/dist/commands/run-stream.d.ts.map +1 -1
  17. package/dist/commands/run-stream.js +114 -19
  18. package/dist/commands/run-stream.js.map +1 -1
  19. package/dist/commands/run.d.ts.map +1 -1
  20. package/dist/commands/run.js +20 -1
  21. package/dist/commands/run.js.map +1 -1
  22. package/dist/doctor/checks/chain.d.ts.map +1 -1
  23. package/dist/doctor/checks/chain.js +11 -1
  24. package/dist/doctor/checks/chain.js.map +1 -1
  25. package/dist/doctor/checks/providers.d.ts +6 -1
  26. package/dist/doctor/checks/providers.d.ts.map +1 -1
  27. package/dist/doctor/checks/providers.js +7 -2
  28. package/dist/doctor/checks/providers.js.map +1 -1
  29. package/dist/doctor/checks/telemetry.d.ts +35 -1
  30. package/dist/doctor/checks/telemetry.d.ts.map +1 -1
  31. package/dist/doctor/checks/telemetry.js +64 -13
  32. package/dist/doctor/checks/telemetry.js.map +1 -1
  33. package/dist/doctor/checks/vault.d.ts +10 -1
  34. package/dist/doctor/checks/vault.d.ts.map +1 -1
  35. package/dist/doctor/checks/vault.js +11 -2
  36. package/dist/doctor/checks/vault.js.map +1 -1
  37. package/dist/doctor/registry.js +25 -1
  38. package/dist/doctor/registry.js.map +1 -1
  39. package/dist/exit-codes.d.ts +18 -1
  40. package/dist/exit-codes.d.ts.map +1 -1
  41. package/dist/exit-codes.js +17 -0
  42. package/dist/exit-codes.js.map +1 -1
  43. package/dist/tui/App.d.ts.map +1 -1
  44. package/dist/tui/App.js +224 -50
  45. package/dist/tui/App.js.map +1 -1
  46. package/dist/tui/agent.d.ts +71 -1
  47. package/dist/tui/agent.d.ts.map +1 -1
  48. package/dist/tui/agent.js +106 -7
  49. package/dist/tui/agent.js.map +1 -1
  50. package/dist/user-commands/store.d.ts +14 -1
  51. package/dist/user-commands/store.d.ts.map +1 -1
  52. package/dist/user-commands/store.js +6 -1
  53. package/dist/user-commands/store.js.map +1 -1
  54. package/package.json +5 -4
@@ -1,6 +1,11 @@
1
1
  import type { DoctorCheck } from '@namzu/sdk';
2
2
  /**
3
- * Built-in provider probe is intentionally inconclusive in v1.
3
+ * Built-in provider probe is intentionally `skipped` in v1.
4
+ *
5
+ * `skipped` rather than `inconclusive` for the reason spelled out on
6
+ * `vault.registered`: there is no discovery mechanism here to fail, so this is
7
+ * a permanent absence of a subject rather than a question that went unanswered,
8
+ * and only the latter is worth an exit code.
4
9
  *
5
10
  * Provider auto-discovery requires walking `ProviderRegistry`, which is
6
11
  * a module-private map populated by side-effecting calls in consumer
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,EAAE,WAQtC,CAAA"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,EAAE,WAQtC,CAAA"}
@@ -1,5 +1,10 @@
1
1
  /**
2
- * Built-in provider probe is intentionally inconclusive in v1.
2
+ * Built-in provider probe is intentionally `skipped` in v1.
3
+ *
4
+ * `skipped` rather than `inconclusive` for the reason spelled out on
5
+ * `vault.registered`: there is no discovery mechanism here to fail, so this is
6
+ * a permanent absence of a subject rather than a question that went unanswered,
7
+ * and only the latter is worth an exit code.
3
8
  *
4
9
  * Provider auto-discovery requires walking `ProviderRegistry`, which is
5
10
  * a module-private map populated by side-effecting calls in consumer
@@ -18,7 +23,7 @@ export const providersRegisteredCheck = {
18
23
  id: 'providers.registered',
19
24
  category: 'providers',
20
25
  run: async () => ({
21
- status: 'inconclusive',
26
+ status: 'skipped',
22
27
  message: 'no provider auto-discovery in v1; register a provider check via registerDoctorCheck for your specific provider configuration (call provider.doctorCheck?() per registered provider)',
23
28
  }),
24
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/doctor/checks/providers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAgB;IACpD,EAAE,EAAE,sBAAsB;IAC1B,QAAQ,EAAE,WAAW;IACrB,GAAG,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,cAAc;QACtB,OAAO,EACN,qLAAqL;KACtL,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/doctor/checks/providers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAgB;IACpD,EAAE,EAAE,sBAAsB;IAC1B,QAAQ,EAAE,WAAW;IACrB,GAAG,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,SAAS;QACjB,OAAO,EACN,qLAAqL;KACtL,CAAC;CACF,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { DoctorCheck } from '@namzu/sdk';
1
+ import type { DoctorCheck, DoctorCheckResult } from '@namzu/sdk';
2
2
  /**
3
3
  * Telemetry presence probe.
4
4
  *
@@ -7,6 +7,40 @@ import type { DoctorCheck } from '@namzu/sdk';
7
7
  * (not a failure). Endpoint reachability + dry-run span export are
8
8
  * deferred to a follow-up check that the consumer can register
9
9
  * themselves once their telemetry config is known.
10
+ *
11
+ * ## Resolving and loading are asked separately, on purpose
12
+ *
13
+ * This used to be one `import()` in a `try`, and every rejection was reported
14
+ * as `not installed (optional package)`. A package that IS installed and throws
15
+ * on load — a broken build, a native binding that will not open, a dependency
16
+ * of its own that cannot resolve — was reported as absent. One word, two facts,
17
+ * and the reader is told the reassuring one.
18
+ *
19
+ * Splitting the question is what makes each answer honest, and a code check on
20
+ * the thrown error is not enough to do it: a transitive dependency that cannot
21
+ * resolve raises `ERR_MODULE_NOT_FOUND` exactly as a missing `@namzu/telemetry`
22
+ * does, so matching on the code would report a broken installation as no
23
+ * installation. `resolve` asks only about THIS specifier, so it separates the
24
+ * two by construction rather than by reading a message that may be reworded.
25
+ *
26
+ * - cannot resolve → the package is not here → `skipped`
27
+ * - resolves, import throws → it is here and unusable → `fail`
28
+ */
29
+ /**
30
+ * Whether `specifier` is installed, and whether it loads.
31
+ *
32
+ * Exported separately from the `DoctorCheck` so all three outcomes can be
33
+ * driven with a specifier the test controls — there is no way to uninstall or
34
+ * break the real optional package from inside a test run. The check itself is
35
+ * still exercised through `telemetryInstalledCheck.run`, because a helper
36
+ * proven in isolation says nothing about whether the check reaches it. Same
37
+ * arrangement, and the same reason, as `describeProviderChain`.
38
+ *
39
+ * The import goes through the RESOLVED path rather than the specifier, so one
40
+ * code path serves a package name and a file, which is what lets the
41
+ * present-but-broken case be reached at all. Resolution has already applied the
42
+ * package's export map by that point.
10
43
  */
44
+ export declare function describeInstalledPackage(specifier: string): Promise<DoctorCheckResult>;
11
45
  export declare const telemetryInstalledCheck: DoctorCheck;
12
46
  //# sourceMappingURL=telemetry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAerC,CAAA"}
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/telemetry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAIhE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0B5F;AAED,eAAO,MAAM,uBAAuB,EAAE,WAIrC,CAAA"}
@@ -1,3 +1,6 @@
1
+ import { createRequire } from 'node:module';
2
+ import { pathToFileURL } from 'node:url';
3
+ const TELEMETRY = '@namzu/telemetry';
1
4
  /**
2
5
  * Telemetry presence probe.
3
6
  *
@@ -6,22 +9,70 @@
6
9
  * (not a failure). Endpoint reachability + dry-run span export are
7
10
  * deferred to a follow-up check that the consumer can register
8
11
  * themselves once their telemetry config is known.
12
+ *
13
+ * ## Resolving and loading are asked separately, on purpose
14
+ *
15
+ * This used to be one `import()` in a `try`, and every rejection was reported
16
+ * as `not installed (optional package)`. A package that IS installed and throws
17
+ * on load — a broken build, a native binding that will not open, a dependency
18
+ * of its own that cannot resolve — was reported as absent. One word, two facts,
19
+ * and the reader is told the reassuring one.
20
+ *
21
+ * Splitting the question is what makes each answer honest, and a code check on
22
+ * the thrown error is not enough to do it: a transitive dependency that cannot
23
+ * resolve raises `ERR_MODULE_NOT_FOUND` exactly as a missing `@namzu/telemetry`
24
+ * does, so matching on the code would report a broken installation as no
25
+ * installation. `resolve` asks only about THIS specifier, so it separates the
26
+ * two by construction rather than by reading a message that may be reworded.
27
+ *
28
+ * - cannot resolve → the package is not here → `skipped`
29
+ * - resolves, import throws → it is here and unusable → `fail`
30
+ */
31
+ /**
32
+ * Whether `specifier` is installed, and whether it loads.
33
+ *
34
+ * Exported separately from the `DoctorCheck` so all three outcomes can be
35
+ * driven with a specifier the test controls — there is no way to uninstall or
36
+ * break the real optional package from inside a test run. The check itself is
37
+ * still exercised through `telemetryInstalledCheck.run`, because a helper
38
+ * proven in isolation says nothing about whether the check reaches it. Same
39
+ * arrangement, and the same reason, as `describeProviderChain`.
40
+ *
41
+ * The import goes through the RESOLVED path rather than the specifier, so one
42
+ * code path serves a package name and a file, which is what lets the
43
+ * present-but-broken case be reached at all. Resolution has already applied the
44
+ * package's export map by that point.
9
45
  */
46
+ export async function describeInstalledPackage(specifier) {
47
+ const require = createRequire(import.meta.url);
48
+ let resolved;
49
+ try {
50
+ resolved = require.resolve(specifier);
51
+ }
52
+ catch {
53
+ return {
54
+ status: 'skipped',
55
+ message: `${specifier} not installed (optional package)`,
56
+ };
57
+ }
58
+ try {
59
+ await import(pathToFileURL(resolved).href);
60
+ return { status: 'pass', message: `${specifier} is installed` };
61
+ }
62
+ catch (err) {
63
+ return {
64
+ status: 'fail',
65
+ // The reason is the whole value of separating these: "installed but
66
+ // will not load" sends the reader somewhere, and "not installed" would
67
+ // have sent them to install what is already there.
68
+ message: `${specifier} is installed but failed to load: ${err instanceof Error ? err.message : String(err)}`,
69
+ remediation: `Reinstall ${specifier}, or remove it if you are not using telemetry — it is optional and namzu runs without it.`,
70
+ };
71
+ }
72
+ }
10
73
  export const telemetryInstalledCheck = {
11
74
  id: 'telemetry.installed',
12
75
  category: 'telemetry',
13
- run: async () => {
14
- const specifier = '@namzu/telemetry';
15
- try {
16
- await import(specifier);
17
- return { status: 'pass', message: '@namzu/telemetry is installed' };
18
- }
19
- catch {
20
- return {
21
- status: 'inconclusive',
22
- message: '@namzu/telemetry not installed (optional package)',
23
- };
24
- }
25
- },
76
+ run: () => describeInstalledPackage(TELEMETRY),
26
77
  };
27
78
  //# sourceMappingURL=telemetry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../src/doctor/checks/telemetry.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAgB;IACnD,EAAE,EAAE,qBAAqB;IACzB,QAAQ,EAAE,WAAW;IACrB,GAAG,EAAE,KAAK,IAAgC,EAAE;QAC3C,MAAM,SAAS,GAAG,kBAAkB,CAAA;QACpC,IAAI,CAAC;YACJ,MAAM,MAAM,CAAC,SAAS,CAAC,CAAA;YACvB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAA;QACpE,CAAC;QAAC,MAAM,CAAC;YACR,OAAO;gBACN,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,mDAAmD;aAC5D,CAAA;QACF,CAAC;IACF,CAAC;CACD,CAAA"}
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../src/doctor/checks/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAIxC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,SAAiB;IAC/D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC9C,IAAI,QAAgB,CAAA;IACpB,IAAI,CAAC;QACJ,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IACtC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO;YACN,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,GAAG,SAAS,mCAAmC;SACxD,CAAA;IACF,CAAC;IACD,IAAI,CAAC;QACJ,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,eAAe,EAAE,CAAA;IAChE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,OAAO;YACN,MAAM,EAAE,MAAM;YACd,oEAAoE;YACpE,uEAAuE;YACvE,mDAAmD;YACnD,OAAO,EAAE,GAAG,SAAS,qCACpB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAChD,EAAE;YACF,WAAW,EAAE,aAAa,SAAS,2FAA2F;SAC9H,CAAA;IACF,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAgB;IACnD,EAAE,EAAE,qBAAqB;IACzB,QAAQ,EAAE,WAAW;IACrB,GAAG,EAAE,GAA+B,EAAE,CAAC,wBAAwB,CAAC,SAAS,CAAC;CAC1E,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { DoctorCheck } from '@namzu/sdk';
2
2
  /**
3
- * Built-in vault probe is intentionally inconclusive.
3
+ * Built-in vault probe is intentionally `skipped`.
4
4
  *
5
5
  * `CredentialVault` is an interface, not a globally-discoverable
6
6
  * registry — consumers instantiate their own (`InMemoryCredentialVault`,
@@ -8,6 +8,15 @@ import type { DoctorCheck } from '@namzu/sdk';
8
8
  * vaults it doesn't know about. To get a real vault healthcheck, the
9
9
  * consumer registers a custom check via `registerDoctorCheck` that
10
10
  * exercises their specific vault wiring.
11
+ *
12
+ * `skipped`, not `inconclusive`, and the difference is the whole point of the
13
+ * split: `inconclusive` means a check tried and could not answer, which is a
14
+ * gap in the report and now carries a non-zero exit code. This check has no
15
+ * subject to answer about — there is no discovery mechanism to fail — and that
16
+ * is true on every machine, permanently, by design. Reporting a permanent
17
+ * design decision as an unanswered question would make `namzu doctor` non-zero
18
+ * on every healthy machine, and a diagnostic that always complains is one
19
+ * nobody reads.
11
20
  */
12
21
  export declare const vaultRegisteredCheck: DoctorCheck;
13
22
  //# sourceMappingURL=vault.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/vault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAQlC,CAAA"}
1
+ {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/vault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAQlC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Built-in vault probe is intentionally inconclusive.
2
+ * Built-in vault probe is intentionally `skipped`.
3
3
  *
4
4
  * `CredentialVault` is an interface, not a globally-discoverable
5
5
  * registry — consumers instantiate their own (`InMemoryCredentialVault`,
@@ -7,12 +7,21 @@
7
7
  * vaults it doesn't know about. To get a real vault healthcheck, the
8
8
  * consumer registers a custom check via `registerDoctorCheck` that
9
9
  * exercises their specific vault wiring.
10
+ *
11
+ * `skipped`, not `inconclusive`, and the difference is the whole point of the
12
+ * split: `inconclusive` means a check tried and could not answer, which is a
13
+ * gap in the report and now carries a non-zero exit code. This check has no
14
+ * subject to answer about — there is no discovery mechanism to fail — and that
15
+ * is true on every machine, permanently, by design. Reporting a permanent
16
+ * design decision as an unanswered question would make `namzu doctor` non-zero
17
+ * on every healthy machine, and a diagnostic that always complains is one
18
+ * nobody reads.
10
19
  */
11
20
  export const vaultRegisteredCheck = {
12
21
  id: 'vault.registered',
13
22
  category: 'vault',
14
23
  run: async () => ({
15
- status: 'inconclusive',
24
+ status: 'skipped',
16
25
  message: 'no vault auto-discovery in v1; register a vault check via registerDoctorCheck for your specific vault setup',
17
26
  }),
18
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/doctor/checks/vault.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAChD,EAAE,EAAE,kBAAkB;IACtB,QAAQ,EAAE,OAAO;IACjB,GAAG,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,cAAc;QACtB,OAAO,EACN,6GAA6G;KAC9G,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/doctor/checks/vault.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAChD,EAAE,EAAE,kBAAkB;IACtB,QAAQ,EAAE,OAAO;IACjB,GAAG,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,SAAS;QACjB,OAAO,EACN,6GAA6G;KAC9G,CAAC;CACF,CAAA"}
@@ -182,9 +182,33 @@ function buildReport(records, version) {
182
182
  fail: records.filter((r) => r.status === 'fail').length,
183
183
  inconclusive: records.filter((r) => r.status === 'inconclusive').length,
184
184
  warn: records.filter((r) => r.status === 'warn').length,
185
+ skipped: records.filter((r) => r.status === 'skipped').length,
185
186
  total: records.length,
186
187
  };
187
- const exit = summary.fail > 0 ? 1 : summary.total === 0 ? 2 : 0;
188
+ /**
189
+ * What this command's exit code means, decided here because here is where
190
+ * the codes are.
191
+ *
192
+ * `inconclusive` used not to appear in this expression at all, so a check
193
+ * that COULD NOT ANSWER exited `0` — the same number as a machine where
194
+ * everything passed. A script could not tell "namzu is healthy" from "namzu
195
+ * did not manage to look", in the one command whose entire job is to report
196
+ * state it read.
197
+ *
198
+ * The order is the ranking, and it is deliberate:
199
+ *
200
+ * - `fail` outranks `inconclusive`. A definite failure is the actionable
201
+ * fact, and `1` does not claim health, so nothing is lost by reporting it
202
+ * even when part of the run is also unknown.
203
+ * - `2` stays above `inconclusive` because an empty run has no checks to be
204
+ * inconclusive about; the two cannot both be true.
205
+ * - `skipped` never moves this off `0`. A skipped check is an ordinary state
206
+ * of a healthy machine — an optional package absent, a registry with
207
+ * nothing to discover — and a diagnostic that went non-zero on every
208
+ * healthy machine would be turned off within a week, which is the failure
209
+ * mode of a check that fires where nothing is wrong.
210
+ */
211
+ const exit = summary.fail > 0 ? 1 : summary.total === 0 ? 2 : summary.inconclusive > 0 ? 69 : 0;
188
212
  return Object.freeze({
189
213
  version,
190
214
  timestamp: new Date().toISOString(),
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doctor/registry.ts"],"names":[],"mappings":"AAUA,MAAM,4BAA4B,GAAG,KAAK,CAAA;AAC1C,MAAM,6BAA6B,GAAG,MAAM,CAAA;AAmC5C,MAAM,OAAO,cAAc;IACT,MAAM,GAA6B,IAAI,GAAG,EAAE,CAAA;IACrD,GAAG,CAAS;IAEpB,SAAS,CAAC,GAAW;QACpB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,QAAQ,CAAC,KAAkB;QAC1B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACd,yBAAyB,KAAK,CAAC,EAAE,qEAAqE,CACtG,CAAA;QACF,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IACjC,CAAC;IAED,UAAU,CAAC,EAAU;Q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C,CAAC,OAAO,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IACnF,OAAO,MAAM,CAAC,MAAM,CAAC;QACpB,OAAO;QACP,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,MAAM,EAAE,OAAO;QACf,OAAO;QACP,IAAI;KACJ,CAAC,CAAA;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC7E,CAAC"}
@@ -6,6 +6,22 @@
6
6
  * 1 EXIT_FAIL — one or more checks reported `fail`
7
7
  * 2 EXIT_NO_CONFIG — Namzu is not configured in this environment
8
8
  * (no checks registered, no config file found)
9
+ * 69 EXIT_UNAVAILABLE — sysexits EX_UNAVAILABLE; something the command
10
+ * needed was not there, so it could not ESTABLISH
11
+ * what it was asked to report. Distinct from 0 for
12
+ * the reason 2 is distinct from 1: a report that
13
+ * could not look tells you nothing about the part
14
+ * it did look at, and collapsing the two lets
15
+ * "healthy" and "did not check" share a number.
16
+ * Distinct from 70 because a check that timed out
17
+ * on a loaded machine is not a bug in this CLI.
18
+ *
19
+ * `namzu eval` spells the same idea `2`
20
+ * (`EVAL_EXIT.inconclusive`) and that is not an
21
+ * oversight: `doctor` had already spent 2 on "no
22
+ * checks registered", and giving one number two
23
+ * meanings inside one command is worse than giving
24
+ * one meaning two numbers across two.
9
25
  * 64 EXIT_USAGE — sysexits EX_USAGE; the caller's arguments are
10
26
  * wrong. Distinct from 70 on purpose: 70 says the
11
27
  * CLI is broken and is worth a bug report, 64 says
@@ -26,7 +42,8 @@ export declare const EXIT_OK = 0;
26
42
  export declare const EXIT_FAIL = 1;
27
43
  export declare const EXIT_NO_CONFIG = 2;
28
44
  export declare const EXIT_USAGE = 64;
45
+ export declare const EXIT_UNAVAILABLE = 69;
29
46
  export declare const EXIT_INTERNAL_ERROR = 70;
30
47
  export declare const EXIT_UNTRUSTED = 77;
31
- export type CliExitCode = typeof EXIT_OK | typeof EXIT_FAIL | typeof EXIT_NO_CONFIG | typeof EXIT_USAGE | typeof EXIT_INTERNAL_ERROR | typeof EXIT_UNTRUSTED;
48
+ export type CliExitCode = typeof EXIT_OK | typeof EXIT_FAIL | typeof EXIT_NO_CONFIG | typeof EXIT_USAGE | typeof EXIT_UNAVAILABLE | typeof EXIT_INTERNAL_ERROR | typeof EXIT_UNTRUSTED;
32
49
  //# sourceMappingURL=exit-codes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,IAAI,CAAA;AACxB,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,cAAc,IAAI,CAAA;AAC/B,eAAO,MAAM,UAAU,KAAK,CAAA;AAC5B,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,eAAO,MAAM,cAAc,KAAK,CAAA;AAEhC,MAAM,MAAM,WAAW,GACpB,OAAO,OAAO,GACd,OAAO,SAAS,GAChB,OAAO,cAAc,GACrB,OAAO,UAAU,GACjB,OAAO,mBAAmB,GAC1B,OAAO,cAAc,CAAA"}
1
+ {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,OAAO,IAAI,CAAA;AACxB,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,cAAc,IAAI,CAAA;AAC/B,eAAO,MAAM,UAAU,KAAK,CAAA;AAC5B,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAClC,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,eAAO,MAAM,cAAc,KAAK,CAAA;AAEhC,MAAM,MAAM,WAAW,GACpB,OAAO,OAAO,GACd,OAAO,SAAS,GAChB,OAAO,cAAc,GACrB,OAAO,UAAU,GACjB,OAAO,gBAAgB,GACvB,OAAO,mBAAmB,GAC1B,OAAO,cAAc,CAAA"}
@@ -6,6 +6,22 @@
6
6
  * 1 EXIT_FAIL — one or more checks reported `fail`
7
7
  * 2 EXIT_NO_CONFIG — Namzu is not configured in this environment
8
8
  * (no checks registered, no config file found)
9
+ * 69 EXIT_UNAVAILABLE — sysexits EX_UNAVAILABLE; something the command
10
+ * needed was not there, so it could not ESTABLISH
11
+ * what it was asked to report. Distinct from 0 for
12
+ * the reason 2 is distinct from 1: a report that
13
+ * could not look tells you nothing about the part
14
+ * it did look at, and collapsing the two lets
15
+ * "healthy" and "did not check" share a number.
16
+ * Distinct from 70 because a check that timed out
17
+ * on a loaded machine is not a bug in this CLI.
18
+ *
19
+ * `namzu eval` spells the same idea `2`
20
+ * (`EVAL_EXIT.inconclusive`) and that is not an
21
+ * oversight: `doctor` had already spent 2 on "no
22
+ * checks registered", and giving one number two
23
+ * meanings inside one command is worse than giving
24
+ * one meaning two numbers across two.
9
25
  * 64 EXIT_USAGE — sysexits EX_USAGE; the caller's arguments are
10
26
  * wrong. Distinct from 70 on purpose: 70 says the
11
27
  * CLI is broken and is worth a bug report, 64 says
@@ -26,6 +42,7 @@ export const EXIT_OK = 0;
26
42
  export const EXIT_FAIL = 1;
27
43
  export const EXIT_NO_CONFIG = 2;
28
44
  export const EXIT_USAGE = 64;
45
+ export const EXIT_UNAVAILABLE = 69;
29
46
  export const EXIT_INTERNAL_ERROR = 70;
30
47
  export const EXIT_UNTRUSTED = 77;
31
48
  //# sourceMappingURL=exit-codes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAA;AACxB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAA;AAC1B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAA;AAC/B,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAA;AAC5B,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAA;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAA"}
1
+ {"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAA;AACxB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAA;AAC1B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAA;AAC/B,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAA;AAC5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAClC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAA;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0DH,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE/D,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAA;CACxB;AAWD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,MAAM,EAAE,CAY1F;AAGD,wBAAgB,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,QAAQ,2CAyoCpC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0DH,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE/D,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAA;CACxB;AAWD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,MAAM,EAAE,CAY1F;AAGD,wBAAgB,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,QAAQ,2CA4zCpC"}