approval-md 0.4.2 → 0.4.5

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.
@@ -0,0 +1,340 @@
1
+ /**
2
+ * The system-information readers' safe forms (APRV-508).
3
+ *
4
+ * `uptime`, `whoami`, `hostname`, `df`, `free`, `seq` and `paste` each print
5
+ * something and change nothing in the forms below, and some of them change
6
+ * something in forms that look almost the same: `hostname NAME` and `hostname
7
+ * -F FILE` SET the host name, `free -s N` loops forever, `uptime FILE` reads a
8
+ * utmp file. So each binary gets a STRICT allow-grammar rather than a seat in
9
+ * the read table:
10
+ *
11
+ * - every flag is matched by its exact spelling. No abbreviation (getopt and
12
+ * clap both accept a unique prefix of a long option), no cluster except the
13
+ * ones a table below lists word for word, no `=` joined to a short flag;
14
+ * - `--` is never accepted;
15
+ * - an operand is accepted only where the binary's grammar names one, and
16
+ * only in the shape it names (a number for `seq`, a file for `paste`);
17
+ * - a word carrying `$`, a backtick, a glob or a brace is never accepted,
18
+ * since the shell may expand it into words this grammar never saw;
19
+ * - nothing else. An argv this file does not recognise answers `false`, and
20
+ * the classifier row does not match, so the command keeps the
21
+ * `unclassified` refusal it had before the row existed.
22
+ *
23
+ * Two implementations are read at once: GNU (coreutils, procps, net-tools
24
+ * `hostname`) and uutils coreutils 0.10, which the hosted boxes run. Where a
25
+ * spelling exists in one and not the other, the other errors out on it, which
26
+ * is a refusal by the tool rather than a different act.
27
+ */
28
+ /**
29
+ * Characters the shell may expand into more words, or into other words. A
30
+ * leading `~` is not among them: it expands to one path and never splits, and
31
+ * the read scope already judges a `~` path as one it cannot place.
32
+ */
33
+ const UNREADABLE_WORD = /[$`*?[\]{}]/u;
34
+ /** No word of this argv is one the shell may expand. */
35
+ function literal(args) {
36
+ return !args.some((arg) => UNREADABLE_WORD.test(arg));
37
+ }
38
+ /**
39
+ * The option each flag word sets, so that two spellings of one option count
40
+ * as a repeat (`-s --serial`, `-h --human-readable`, `-h -hT`). A word not in
41
+ * the map is its own option.
42
+ */
43
+ const SAME_OPTION = {
44
+ "--human-readable": ["-h"],
45
+ "--si": ["-H"],
46
+ "--print-type": ["-T"],
47
+ "--inodes": ["-i"],
48
+ "--all": ["-a"],
49
+ "--local": ["-l"],
50
+ "--portability": ["-P"],
51
+ "-hT": ["-h", "-T"],
52
+ "-Th": ["-h", "-T"],
53
+ "-hi": ["-h", "-i"],
54
+ "-ih": ["-h", "-i"],
55
+ "-hl": ["-h", "-l"],
56
+ "-lh": ["-h", "-l"],
57
+ "--bytes": ["-b"],
58
+ "--kibi": ["-k"],
59
+ "--mebi": ["-m"],
60
+ "--gibi": ["-g"],
61
+ "--human": ["-h"],
62
+ "--lohi": ["-l"],
63
+ "--total": ["-t"],
64
+ "--wide": ["-w"],
65
+ "--committed": ["-v"],
66
+ "-ht": ["-h", "-t"],
67
+ "-th": ["-h", "-t"],
68
+ "-hw": ["-h", "-w"],
69
+ "-wh": ["-h", "-w"],
70
+ "--equal-width": ["-w"],
71
+ "--separator": ["-s"],
72
+ "--format": ["-f"],
73
+ "--serial": ["-s"],
74
+ "--zero-terminated": ["-z"],
75
+ };
76
+ /**
77
+ * No option is given twice, in any spelling. clap (uutils) refuses a repeated
78
+ * option where getopt takes the last one, so the grammar admits neither.
79
+ * `-dX` / `--delimiters=X` and `--separator=X` / `--format=X` count by name.
80
+ */
81
+ function noRepeatedFlag(args, valueWords = []) {
82
+ const seen = new Set();
83
+ for (let index = 0; index < args.length; index += 1) {
84
+ const arg = args[index];
85
+ if (!arg.startsWith("-") || arg === "-" || /^-[\d.]/u.test(arg))
86
+ continue;
87
+ let name = arg;
88
+ if (arg.startsWith("--delimiters=") || (arg.startsWith("-d") && !arg.startsWith("--")))
89
+ name = "-d";
90
+ else if (arg.startsWith("--separator="))
91
+ name = "-s";
92
+ else if (arg.startsWith("--format="))
93
+ name = "-f";
94
+ for (const option of SAME_OPTION[name] ?? [name]) {
95
+ if (seen.has(option))
96
+ return false;
97
+ seen.add(option);
98
+ }
99
+ // A separate-word value is not a flag, even when it looks like one.
100
+ if (valueWords.includes(arg))
101
+ index += 1;
102
+ }
103
+ return true;
104
+ }
105
+ /** `--help` or `--version`, alone. */
106
+ function isHelpOrVersion(args) {
107
+ return args.length === 1 && (args[0] === "--help" || args[0] === "--version");
108
+ }
109
+ /** `uptime` and `whoami`: nothing, or `--help` / `--version`. */
110
+ export function isBareInfo(args) {
111
+ return args.length === 0 || isHelpOrVersion(args);
112
+ }
113
+ /**
114
+ * `hostname`: nothing, or ONE display flag. Any operand sets the host name,
115
+ * and `-F`/`--file`/`-b`/`--boot` set it from a file or at boot, so none of
116
+ * them is in the list.
117
+ */
118
+ const HOSTNAME_FLAGS = [
119
+ "-s",
120
+ "--short",
121
+ "-f",
122
+ "--fqdn",
123
+ "--long",
124
+ "-d",
125
+ "--domain",
126
+ "-i",
127
+ "--ip-address",
128
+ "-I",
129
+ "--all-ip-addresses",
130
+ "--help",
131
+ "--version",
132
+ ];
133
+ export function isHostnameDisplay(args) {
134
+ if (args.length === 0)
135
+ return true;
136
+ return args.length === 1 && HOSTNAME_FLAGS.includes(args[0]);
137
+ }
138
+ /**
139
+ * `df`: display flags only. A path operand would be a read the read scope
140
+ * judges, and the agents asking need the mount table, so operands are not in
141
+ * the grammar. `--output` and the type filters are left out with them.
142
+ */
143
+ const DF_FLAGS = [
144
+ "-h",
145
+ "--human-readable",
146
+ "-H",
147
+ "--si",
148
+ "-k",
149
+ "-T",
150
+ "--print-type",
151
+ "-i",
152
+ "--inodes",
153
+ "-a",
154
+ "--all",
155
+ "-l",
156
+ "--local",
157
+ "-P",
158
+ "--portability",
159
+ "--total",
160
+ "--help",
161
+ "--version",
162
+ // The clusters, by exact spelling.
163
+ "-hT",
164
+ "-Th",
165
+ "-hi",
166
+ "-ih",
167
+ "-hl",
168
+ "-lh",
169
+ ];
170
+ export function isDfDisplay(args) {
171
+ return literal(args) && noRepeatedFlag(args) && args.every((arg) => DF_FLAGS.includes(arg));
172
+ }
173
+ /**
174
+ * `free`: display flags only. `-s`/`--seconds` and `-c`/`--count` repeat the
175
+ * report on a timer, which holds the turn rather than reading anything, and
176
+ * stay out.
177
+ */
178
+ const FREE_FLAGS = [
179
+ "-b",
180
+ "--bytes",
181
+ "-k",
182
+ "--kibi",
183
+ "--kilo",
184
+ "-m",
185
+ "--mebi",
186
+ "--mega",
187
+ "-g",
188
+ "--gibi",
189
+ "--giga",
190
+ "-h",
191
+ "--human",
192
+ "--si",
193
+ "-l",
194
+ "--lohi",
195
+ "-t",
196
+ "--total",
197
+ "-w",
198
+ "--wide",
199
+ "-v",
200
+ "--committed",
201
+ "--help",
202
+ "--version",
203
+ "-ht",
204
+ "-th",
205
+ "-hw",
206
+ "-wh",
207
+ ];
208
+ export function isFreeDisplay(args) {
209
+ return literal(args) && noRepeatedFlag(args) && args.every((arg) => FREE_FLAGS.includes(arg));
210
+ }
211
+ /** A decimal number, signed or not, with an optional exponent. No hex, `inf` or `nan`. */
212
+ const SEQ_NUMBER = /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/u;
213
+ /**
214
+ * The most values an admitted `seq` prints (refutation S4). `seq 1e18` is a
215
+ * read in the sense that it changes nothing, but it holds the turn the way
216
+ * `free -s` does, so a range past this is not admitted.
217
+ */
218
+ export const SEQ_MAX_VALUES = 100_000;
219
+ /**
220
+ * Can a double hold this number exactly enough to count with? (Recheck S-R2.)
221
+ * GNU and uutils count digit strings exactly, so a range narrower than half a
222
+ * ULP of its ends (`seq 1e30-ish 1e30-ish+5e13`) reads as one value to a
223
+ * double and prints fifty trillion. No more than 15 significant digits, and no
224
+ * magnitude above 2^53, keeps every admitted operand exact enough.
225
+ */
226
+ function isCountable(word) {
227
+ const mantissa = word.replace(/^[-+]/u, "").replace(/[eE].*$/u, "").replace(".", "");
228
+ const significant = mantissa.replace(/^0+/u, "");
229
+ if (significant.length > 15)
230
+ return false;
231
+ return Math.abs(Number(word)) <= 2 ** 53;
232
+ }
233
+ /** How many values `seq FIRST [INCREMENT] LAST` prints; Infinity when it never ends. */
234
+ function seqCount(numbers) {
235
+ const [first, increment, last] = numbers.length === 1
236
+ ? [1, 1, numbers[0]]
237
+ : numbers.length === 2
238
+ ? [numbers[0], 1, numbers[1]]
239
+ : [numbers[0], numbers[1], numbers[2]];
240
+ if (![first, increment, last].every((n) => Number.isFinite(n)))
241
+ return Infinity;
242
+ if (increment === 0)
243
+ return Infinity;
244
+ const steps = Math.floor((last - first) / increment);
245
+ return steps < 0 ? 0 : steps + 1;
246
+ }
247
+ /** One floating-point directive, `%%` escapes around it, nothing else. */
248
+ const SEQ_FORMAT = /^(?:[^%]|%%)*%[-+ #0]*\d*(?:\.\d+)?[eEfFgG](?:[^%]|%%)*$/u;
249
+ /** A separator: any literal text that does not look like a flag. */
250
+ function isSeqSeparator(value) {
251
+ return value !== undefined && !value.startsWith("-");
252
+ }
253
+ /**
254
+ * `seq`: one to three numbers, with `-w`/`--equal-width`, `-s SEP` /
255
+ * `--separator=SEP` and `-f FMT` / `--format=FMT`. A separate-word value is
256
+ * the next word; the attached short spellings (`-s,`) are not in the grammar.
257
+ * Every flag comes BEFORE the first number: uutils reads a word after a number
258
+ * as another number (`seq 1 -w` is an error there and a flag to GNU), and the
259
+ * grammar takes the reading both agree on.
260
+ */
261
+ export function isSeqDisplay(args) {
262
+ if (!literal(args) || !noRepeatedFlag(args, ["-s", "--separator", "-f", "--format"]))
263
+ return false;
264
+ if (isHelpOrVersion(args))
265
+ return true;
266
+ let numbers = 0;
267
+ for (let index = 0; index < args.length; index += 1) {
268
+ const arg = args[index];
269
+ if (numbers > 0) {
270
+ if (!SEQ_NUMBER.test(arg))
271
+ return false;
272
+ numbers += 1;
273
+ continue;
274
+ }
275
+ if (arg === "-w" || arg === "--equal-width")
276
+ continue;
277
+ if (arg === "-s" || arg === "--separator") {
278
+ index += 1;
279
+ if (!isSeqSeparator(args[index]))
280
+ return false;
281
+ continue;
282
+ }
283
+ if (arg.startsWith("--separator="))
284
+ continue;
285
+ if (arg === "-f" || arg === "--format") {
286
+ index += 1;
287
+ // A flag-shaped value is the value to getopt and the next flag to clap.
288
+ const value = args[index] ?? "";
289
+ if (value.startsWith("-") || !SEQ_FORMAT.test(value))
290
+ return false;
291
+ continue;
292
+ }
293
+ if (arg.startsWith("--format=")) {
294
+ if (!SEQ_FORMAT.test(arg.slice("--format=".length)))
295
+ return false;
296
+ continue;
297
+ }
298
+ if (!SEQ_NUMBER.test(arg))
299
+ return false;
300
+ numbers += 1;
301
+ }
302
+ // GNU and uutils both refuse a format beside equal width.
303
+ const width = args.includes("-w") || args.includes("--equal-width");
304
+ const format = args.some((arg) => arg === "-f" || arg === "--format" || arg.startsWith("--format="));
305
+ if (width && format)
306
+ return false;
307
+ if (numbers < 1 || numbers > 3)
308
+ return false;
309
+ const operands = args.slice(args.length - numbers);
310
+ if (!operands.every((word) => isCountable(word)))
311
+ return false;
312
+ return seqCount(operands.map(Number)) <= SEQ_MAX_VALUES;
313
+ }
314
+ /**
315
+ * `paste`: files (or `-`, standard input) with `-s`/`--serial`,
316
+ * `-z`/`--zero-terminated`, and the delimiter list ATTACHED (`-d,`,
317
+ * `--delimiters=,`). Attached, so that every positional is a file: the read
318
+ * scope takes paste's operands exactly as it takes `cat`'s (`READ_TARGET_SHAPES`
319
+ * in read-scope.ts), and a delimiter in its own word would be taken for one.
320
+ */
321
+ const PASTE_FLAGS = ["-s", "--serial", "-z", "--zero-terminated", "--help", "--version"];
322
+ export function isPasteRead(args) {
323
+ if (!literal(args) || !noRepeatedFlag(args))
324
+ return false;
325
+ for (const arg of args) {
326
+ if (PASTE_FLAGS.includes(arg))
327
+ continue;
328
+ if (arg.startsWith("--delimiters="))
329
+ continue;
330
+ if (arg.startsWith("-d") && arg.length > 2)
331
+ continue;
332
+ // A file, or `-` for standard input. Every other flag-shaped word is not
333
+ // in the grammar (`--`, `-d` with a separate value, abbreviations).
334
+ if (arg === "-" || !arg.startsWith("-"))
335
+ continue;
336
+ return false;
337
+ }
338
+ return true;
339
+ }
340
+ //# sourceMappingURL=sysinfo-argv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sysinfo-argv.js","sourceRoot":"","sources":["../../../src/core/sysinfo-argv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;GAIG;AACH,MAAM,eAAe,GAAG,cAAc,CAAC;AAEvC,wDAAwD;AACxD,SAAS,OAAO,CAAC,IAAuB;IACtC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAgD;IAC/D,kBAAkB,EAAE,CAAC,IAAI,CAAC;IAC1B,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,cAAc,EAAE,CAAC,IAAI,CAAC;IACtB,UAAU,EAAE,CAAC,IAAI,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,CAAC;IACf,SAAS,EAAE,CAAC,IAAI,CAAC;IACjB,eAAe,EAAE,CAAC,IAAI,CAAC;IACvB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,IAAI,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,IAAI,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,CAAC;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CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC/D,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,cAAc,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,GAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAE5G,MAAM,UAAU,WAAW,CAAC,IAAuB;IACjD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1D,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,SAAS;QACxC,IAAI,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC;YAAE,SAAS;QAC9C,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS;QACrD,yEAAyE;QACzE,oEAAoE;QACpE,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAClD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -71,9 +71,9 @@ import type { LogHead } from "../core/log.js";
71
71
  * because a module that resolves its own package root differs between the source
72
72
  * tree and the build output for no benefit at all.
73
73
  */
74
- export declare const APPROVALD_VERSION = "0.4.2";
74
+ export declare const APPROVALD_VERSION = "0.4.5";
75
75
  /** `user.name` on every commit this module makes. */
76
- export declare const GIT_EVIDENCE_AUTHOR_NAME = "approvald 0.4.2";
76
+ export declare const GIT_EVIDENCE_AUTHOR_NAME = "approvald 0.4.5";
77
77
  /** `user.email` on every commit: fixed, and deliberately undeliverable. */
78
78
  export declare const GIT_EVIDENCE_AUTHOR_EMAIL = "approvald@noreply.approval.md";
79
79
  /**
@@ -75,7 +75,7 @@ import { PAYLOAD_STORE_DIRNAME } from "../core/payload-store.js";
75
75
  * because a module that resolves its own package root differs between the source
76
76
  * tree and the build output for no benefit at all.
77
77
  */
78
- export const APPROVALD_VERSION = "0.4.2";
78
+ export const APPROVALD_VERSION = "0.4.5";
79
79
  /** `user.name` on every commit this module makes. */
80
80
  export const GIT_EVIDENCE_AUTHOR_NAME = `approvald ${APPROVALD_VERSION}`;
81
81
  /** `user.email` on every commit: fixed, and deliberately undeliverable. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "approval-md",
3
- "version": "0.4.2",
3
+ "version": "0.4.5",
4
4
  "description": "Human approval for agent actions. CLI runtime for the approval.md convention (pre-release).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,5 +59,5 @@
59
59
  "better-sqlite3": "12.11.1",
60
60
  "yaml": "2.9.0"
61
61
  },
62
- "gitHead": "9f796b03f184f139d4cccde09cea4a098951631d"
62
+ "gitHead": "2b8aeb3341d59c66f55730b57f1d1991cc512d67"
63
63
  }