@garygentry/system1 0.4.0 → 0.5.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.
@@ -1,12 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __decideRequire } from "node:module"; const require = __decideRequire(import.meta.url);
3
3
  import {
4
- DecisionsError,
5
- EXIT,
6
- VERSION,
7
4
  emit,
8
5
  extractFormat
9
- } from "./chunk-WZIVOY5Q.mjs";
6
+ } from "./chunk-WVMA3PGV.mjs";
7
+ import {
8
+ EXIT,
9
+ VERSION
10
+ } from "./chunk-7OZLIHEM.mjs";
11
+ import {
12
+ DecisionsError
13
+ } from "./chunk-MH6THLCO.mjs";
10
14
 
11
15
  // src/bin.ts
12
16
  import { readFileSync } from "node:fs";
@@ -21,10 +25,12 @@ Commands:
21
25
  many One question set over many items (fan-out), filtered to what matters
22
26
  usage Measured spend from the ledger (--session, --since)
23
27
  config Show resolved config; \`config egress allow|deny|status\` for consent
28
+ guard list | status | enable <pack> | disable <pack>: opt-in hook checks (the user enables)
24
29
  spec list | show <name> | validate [name|path] | lint [name|path] | check <name> [--live]
25
30
  opportunities add --file <json> | list [--keep \u2026] | check: the scout backlog (local)
26
31
  schema Print the JSON Schema of a tool's input (\`decide schema\` lists them)
27
32
  route Does a prompt call for the ask skill? (--text|--stdin|--hook; local, sends nothing)
33
+ hook <pack> [--harness claude|codex]: a guard pack on a harness hook event (stdin)
28
34
  ping Check the endpoint is reachable (no key, no spend)
29
35
  doctor Check decide works from this shell; prints the fix for each problem
30
36
  version Print the version
@@ -66,25 +72,29 @@ async function main(argv, io) {
66
72
  }
67
73
  switch (command) {
68
74
  case "ask":
69
- return (await import("./decide-HI5CUH3C.mjs")).runAskCommand(rest, io, format);
75
+ return (await import("./decide-AU2C3U6C.mjs")).runAskCommand(rest, io, format);
70
76
  case "many":
71
- return (await import("./decide-HI5CUH3C.mjs")).runManyCommand(rest, io, format);
77
+ return (await import("./decide-AU2C3U6C.mjs")).runManyCommand(rest, io, format);
72
78
  case "usage":
73
- return (await import("./misc-6SDKH2PI.mjs")).runUsageCommand(rest, io, format);
79
+ return (await import("./misc-CZLLPSHU.mjs")).runUsageCommand(rest, io, format);
74
80
  case "config":
75
- return (await import("./config-KXGUNAJR.mjs")).runConfigCommand(rest, io, format);
81
+ return (await import("./config-54JZCBR5.mjs")).runConfigCommand(rest, io, format);
82
+ case "guard":
83
+ return (await import("./guard-TZPV4JV3.mjs")).runGuardCommand(rest, io, format);
76
84
  case "spec":
77
- return (await import("./spec-GLTPEEON.mjs")).runSpecCommand(rest, io, format);
85
+ return (await import("./spec-6E5RXMGH.mjs")).runSpecCommand(rest, io, format);
78
86
  case "opportunities":
79
- return (await import("./opportunities-ONEIYAG3.mjs")).runOpportunitiesCommand(rest, io, format);
87
+ return (await import("./opportunities-ICJLJYG4.mjs")).runOpportunitiesCommand(rest, io, format);
80
88
  case "schema":
81
- return (await import("./misc-6SDKH2PI.mjs")).runSchemaCommand(rest, io, format);
89
+ return (await import("./misc-CZLLPSHU.mjs")).runSchemaCommand(rest, io, format);
82
90
  case "route":
83
- return (await import("./route-BF5J2NLU.mjs")).runRouteCommand(rest, io, format);
91
+ return (await import("./route-D7T7YYDE.mjs")).runRouteCommand(rest, io, format);
92
+ case "hook":
93
+ return (await import("./hook-LZ37YGT4.mjs")).runHookCommand(rest, io);
84
94
  case "ping":
85
- return (await import("./misc-6SDKH2PI.mjs")).runPingCommand(io, format);
95
+ return (await import("./misc-CZLLPSHU.mjs")).runPingCommand(io, format);
86
96
  case "doctor":
87
- return (await import("./doctor-NDV3Y6T7.mjs")).runDoctorCommand(io, format);
97
+ return (await import("./doctor-JKWORTJP.mjs")).runDoctorCommand(io, format);
88
98
  case "version":
89
99
  case "--version":
90
100
  case "-v":
@@ -115,5 +125,6 @@ process.exitCode = await main(process.argv.slice(2), {
115
125
  env: process.env,
116
126
  cwd: process.cwd(),
117
127
  readStdin: () => readFileSync(0, "utf8"),
118
- interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY)
128
+ interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
129
+ exitWhenFlushed: () => process.stdout.write("", () => process.exit(0))
119
130
  });