@garygentry/system1 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/chunks/{bin-3EWFISFQ.mjs → bin-NJIZOMS4.mjs} +18 -14
- package/dist/bundle/chunks/{chunk-BGL272OK.mjs → chunk-A7OWKSHE.mjs} +6 -2
- package/dist/bundle/chunks/{chunk-4ZZ3ZSJN.mjs → chunk-B62DSXC3.mjs} +6 -2
- package/dist/bundle/chunks/{chunk-5TUBFH7M.mjs → chunk-CUKOJ7OM.mjs} +939 -153
- package/dist/bundle/chunks/{chunk-5LVOFZF3.mjs → chunk-FU3D2MBS.mjs} +33 -4
- package/dist/bundle/chunks/{config-UUPD2JL4.mjs → config-7OESN6WC.mjs} +3 -3
- package/dist/bundle/chunks/{decide-AAXD3ITT.mjs → decide-QXDMZDNT.mjs} +4 -4
- package/dist/bundle/chunks/{doctor-KPJ5KVLS.mjs → doctor-EXJQQ7NY.mjs} +3 -3
- package/dist/bundle/chunks/{misc-IW4I3SO6.mjs → misc-2SNIZHU6.mjs} +3 -3
- package/dist/bundle/chunks/opportunities-I6VON6X7.mjs +144 -0
- package/dist/bundle/chunks/{route-7N3J5NP6.mjs → route-JQO5EDAN.mjs} +3 -3
- package/dist/bundle/chunks/{spec-RKA3K6ZZ.mjs → spec-56ZXLEYW.mjs} +42 -7
- package/dist/bundle/decide.mjs +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
VERSION,
|
|
7
7
|
emit,
|
|
8
8
|
extractFormat
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B62DSXC3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/bin.ts
|
|
12
12
|
import { readFileSync } from "node:fs";
|
|
@@ -21,8 +21,9 @@ Commands:
|
|
|
21
21
|
many One question set over many items (fan-out), filtered to what matters
|
|
22
22
|
usage Measured spend from the ledger (--session, --since)
|
|
23
23
|
config Show resolved config; \`config egress allow|deny|status\` for consent
|
|
24
|
-
spec list | show <name> | validate [name|path] | check <name> [--live]
|
|
25
|
-
|
|
24
|
+
spec list | show <name> | validate [name|path] | lint [name|path] | check <name> [--live]
|
|
25
|
+
opportunities add --file <json> | list [--keep \u2026] | check: the scout backlog (local)
|
|
26
|
+
schema Print the JSON Schema of a tool's input (\`decide schema\` lists them)
|
|
26
27
|
route Does a prompt call for the ask skill? (--text|--stdin|--hook; local, sends nothing)
|
|
27
28
|
ping Check the endpoint is reachable (no key, no spend)
|
|
28
29
|
doctor Check decide works from this shell; prints the fix for each problem
|
|
@@ -35,14 +36,15 @@ Questions: --spec <name|path> | --question name:noul:<text>
|
|
|
35
36
|
--input <file|-> (full tool input as JSON; flags override it)
|
|
36
37
|
Sources: --glob <pattern>\u2026 --file <path[:L1-L2]>\u2026 --jsonl <path>
|
|
37
38
|
--diff <range> [--staged] --text <text> --stdin
|
|
39
|
+
--exclude <glob>\u2026 (leave matching paths out; reported as filtered)
|
|
38
40
|
Split: --split file|hunk|row|join|lines:N[/overlap] (default: file; join = one state)
|
|
39
|
-
Project: --keep 'relevant>=0.7'\u2026 --sort relevant:desc --limit N --fields a,b
|
|
41
|
+
Project: --keep 'relevant>=0.7'\u2026 (all) --keep-any 'a>=0.3'\u2026 (any) --sort relevant:desc --limit N --fields a,b
|
|
40
42
|
--allow-outside (read files that resolve outside the repo)
|
|
41
43
|
Run: --dry-run --confirm --record | --replay | --live --model <id> --concurrency N
|
|
42
44
|
|
|
43
45
|
Output is one JSON envelope by default: {v, ok, command, result | error}.
|
|
44
46
|
Exit codes: 0 ok \xB7 1 failure \xB7 2 usage \xB7 3 egress refused \xB7 4 budget guard
|
|
45
|
-
5 provider error \xB7 6 replay miss
|
|
47
|
+
5 provider error \xB7 6 replay miss \xB7 7 check or lint did not pass
|
|
46
48
|
`;
|
|
47
49
|
var DEFAULT_FORMAT = "json";
|
|
48
50
|
async function main(argv, io) {
|
|
@@ -64,23 +66,25 @@ async function main(argv, io) {
|
|
|
64
66
|
}
|
|
65
67
|
switch (command) {
|
|
66
68
|
case "ask":
|
|
67
|
-
return (await import("./decide-
|
|
69
|
+
return (await import("./decide-QXDMZDNT.mjs")).runAskCommand(rest, io, format);
|
|
68
70
|
case "many":
|
|
69
|
-
return (await import("./decide-
|
|
71
|
+
return (await import("./decide-QXDMZDNT.mjs")).runManyCommand(rest, io, format);
|
|
70
72
|
case "usage":
|
|
71
|
-
return (await import("./misc-
|
|
73
|
+
return (await import("./misc-2SNIZHU6.mjs")).runUsageCommand(rest, io, format);
|
|
72
74
|
case "config":
|
|
73
|
-
return (await import("./config-
|
|
75
|
+
return (await import("./config-7OESN6WC.mjs")).runConfigCommand(rest, io, format);
|
|
74
76
|
case "spec":
|
|
75
|
-
return (await import("./spec-
|
|
77
|
+
return (await import("./spec-56ZXLEYW.mjs")).runSpecCommand(rest, io, format);
|
|
78
|
+
case "opportunities":
|
|
79
|
+
return (await import("./opportunities-I6VON6X7.mjs")).runOpportunitiesCommand(rest, io, format);
|
|
76
80
|
case "schema":
|
|
77
|
-
return (await import("./misc-
|
|
81
|
+
return (await import("./misc-2SNIZHU6.mjs")).runSchemaCommand(rest, io, format);
|
|
78
82
|
case "route":
|
|
79
|
-
return (await import("./route-
|
|
83
|
+
return (await import("./route-JQO5EDAN.mjs")).runRouteCommand(rest, io, format);
|
|
80
84
|
case "ping":
|
|
81
|
-
return (await import("./misc-
|
|
85
|
+
return (await import("./misc-2SNIZHU6.mjs")).runPingCommand(io, format);
|
|
82
86
|
case "doctor":
|
|
83
|
-
return (await import("./doctor-
|
|
87
|
+
return (await import("./doctor-EXJQQ7NY.mjs")).runDoctorCommand(io, format);
|
|
84
88
|
case "version":
|
|
85
89
|
case "--version":
|
|
86
90
|
case "-v":
|
|
@@ -2,10 +2,10 @@ import { createRequire as __decideRequire } from "node:module"; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
parseFileRef,
|
|
4
4
|
parseQuestionSet
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CUKOJ7OM.mjs";
|
|
6
6
|
import {
|
|
7
7
|
DecisionsError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-B62DSXC3.mjs";
|
|
9
9
|
|
|
10
10
|
// src/args.ts
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
@@ -23,9 +23,11 @@ var DECIDE_OPTIONS = {
|
|
|
23
23
|
staged: { type: "boolean" },
|
|
24
24
|
text: { type: "string" },
|
|
25
25
|
stdin: { type: "boolean" },
|
|
26
|
+
exclude: { type: "string", multiple: true },
|
|
26
27
|
"allow-outside": { type: "boolean" },
|
|
27
28
|
split: { type: "string" },
|
|
28
29
|
keep: { type: "string", multiple: true },
|
|
30
|
+
"keep-any": { type: "string", multiple: true },
|
|
29
31
|
sort: { type: "string" },
|
|
30
32
|
limit: { type: "string" },
|
|
31
33
|
fields: { type: "string" },
|
|
@@ -104,8 +106,10 @@ function buildInput(values, readStdin, cwd = process.cwd()) {
|
|
|
104
106
|
);
|
|
105
107
|
}
|
|
106
108
|
if (sources.length) input.sources = sources;
|
|
109
|
+
set("exclude", values.exclude?.length ? values.exclude : void 0);
|
|
107
110
|
set("split", values.split);
|
|
108
111
|
set("keep", values.keep?.length ? values.keep : void 0);
|
|
112
|
+
set("keepAny", values["keep-any"]?.length ? values["keep-any"] : void 0);
|
|
109
113
|
set("sort", values.sort);
|
|
110
114
|
set("limit", int(values.limit, "--limit"));
|
|
111
115
|
set(
|
|
@@ -71,7 +71,11 @@ var EXIT = {
|
|
|
71
71
|
budgetGuard: 4,
|
|
72
72
|
providerError: 5,
|
|
73
73
|
replayMiss: 6,
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* The check ran and did not pass: `spec check --strict` (an example missed),
|
|
76
|
+
* or `spec lint` (an error-level finding or invalid spec; with `--strict`, any
|
|
77
|
+
* warning).
|
|
78
|
+
*/
|
|
75
79
|
checkFailed: 7
|
|
76
80
|
};
|
|
77
81
|
var BY_CODE = {
|
|
@@ -147,7 +151,7 @@ function extractFormat(argv, fallback) {
|
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
// ../core/dist/version.js
|
|
150
|
-
var VERSION = "0.
|
|
154
|
+
var VERSION = "0.4.1";
|
|
151
155
|
var CLI_PACKAGE = "@garygentry/system1";
|
|
152
156
|
|
|
153
157
|
export {
|