@gaunt-sloth/core 2.0.0-alpha.34 → 2.0.0-alpha.36

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 (92) hide show
  1. package/dist/config/configDiscovery.d.ts +79 -0
  2. package/dist/config/configDiscovery.js +80 -0
  3. package/dist/config/configDiscovery.js.map +1 -0
  4. package/dist/config/loader.d.ts +6 -5
  5. package/dist/config/loader.js +229 -92
  6. package/dist/config/loader.js.map +1 -1
  7. package/dist/config/schema.d.ts +3 -2
  8. package/dist/config/schema.js +57 -9
  9. package/dist/config/schema.js.map +1 -1
  10. package/dist/config/shell-policy.d.ts +58 -26
  11. package/dist/config/shell-policy.js +60 -27
  12. package/dist/config/shell-policy.js.map +1 -1
  13. package/dist/config/tool-descriptions.d.ts +6 -6
  14. package/dist/config/tool-descriptions.js +7 -7
  15. package/dist/config/tool-descriptions.js.map +1 -1
  16. package/dist/config/types.d.ts +34 -31
  17. package/dist/config/types.js.map +1 -1
  18. package/dist/config.d.ts +3 -0
  19. package/dist/config.js +3 -0
  20. package/dist/config.js.map +1 -1
  21. package/dist/core/GthAbstractAgent.d.ts +11 -13
  22. package/dist/core/GthAbstractAgent.js +9 -11
  23. package/dist/core/GthAbstractAgent.js.map +1 -1
  24. package/dist/core/GthAgentRunner.d.ts +17 -33
  25. package/dist/core/GthAgentRunner.js +31 -41
  26. package/dist/core/GthAgentRunner.js.map +1 -1
  27. package/dist/core/GthLangChainAgent.js +25 -34
  28. package/dist/core/GthLangChainAgent.js.map +1 -1
  29. package/dist/core/approvals/toolAnnotationSources.d.ts +4 -4
  30. package/dist/core/approvals/toolAnnotationSources.js +8 -8
  31. package/dist/core/debugCapture.d.ts +2 -3
  32. package/dist/core/debugCapture.js +1 -2
  33. package/dist/core/debugCapture.js.map +1 -1
  34. package/dist/core/gthLeanAgentFactory.d.ts +4 -4
  35. package/dist/core/gthLeanAgentFactory.js +4 -4
  36. package/dist/core/reasoningBlocks.d.ts +7 -2
  37. package/dist/core/reasoningBlocks.js +7 -2
  38. package/dist/core/reasoningBlocks.js.map +1 -1
  39. package/dist/core/shell/ShellCommandFailedError.d.ts +3 -4
  40. package/dist/core/shell/ShellCommandFailedError.js +3 -4
  41. package/dist/core/shell/ShellCommandFailedError.js.map +1 -1
  42. package/dist/core/shell/approvalStop.d.ts +68 -29
  43. package/dist/core/shell/approvalStop.js +178 -28
  44. package/dist/core/shell/approvalStop.js.map +1 -1
  45. package/dist/core/shell/hardline.d.ts +22 -0
  46. package/dist/core/shell/hardline.js +81 -0
  47. package/dist/core/shell/hardline.js.map +1 -1
  48. package/dist/core/shell/negotiation.d.ts +81 -2
  49. package/dist/core/shell/negotiation.js +144 -11
  50. package/dist/core/shell/negotiation.js.map +1 -1
  51. package/dist/core/shell/rater.d.ts +7 -69
  52. package/dist/core/shell/rater.js +5 -24
  53. package/dist/core/shell/rater.js.map +1 -1
  54. package/dist/core/shell/raterVocabulary.d.ts +119 -0
  55. package/dist/core/shell/raterVocabulary.js +114 -0
  56. package/dist/core/shell/raterVocabulary.js.map +1 -0
  57. package/dist/core/types.d.ts +17 -3
  58. package/dist/providers/anthropic.js +12 -0
  59. package/dist/providers/anthropic.js.map +1 -1
  60. package/dist/providers/configurationPassthrough.d.ts +107 -0
  61. package/dist/providers/configurationPassthrough.js +148 -0
  62. package/dist/providers/configurationPassthrough.js.map +1 -0
  63. package/dist/providers/geminiThinking.d.ts +8 -0
  64. package/dist/providers/geminiThinking.js +33 -13
  65. package/dist/providers/geminiThinking.js.map +1 -1
  66. package/dist/providers/google-genai.js +11 -0
  67. package/dist/providers/google-genai.js.map +1 -1
  68. package/dist/providers/groq.js +12 -0
  69. package/dist/providers/groq.js.map +1 -1
  70. package/dist/providers/ollama.js +12 -0
  71. package/dist/providers/ollama.js.map +1 -1
  72. package/dist/providers/openrouter.d.ts +23 -0
  73. package/dist/providers/openrouter.js +71 -4
  74. package/dist/providers/openrouter.js.map +1 -1
  75. package/dist/providers/vertexai.js +12 -0
  76. package/dist/providers/vertexai.js.map +1 -1
  77. package/dist/providers/xai.js +20 -0
  78. package/dist/providers/xai.js.map +1 -1
  79. package/dist/runtime/conversation.d.ts +2 -2
  80. package/dist/runtime/conversation.js +19 -4
  81. package/dist/runtime/conversation.js.map +1 -1
  82. package/dist/runtime/singleShot.d.ts +2 -3
  83. package/dist/runtime/singleShot.js +22 -7
  84. package/dist/runtime/singleShot.js.map +1 -1
  85. package/dist/utils/systemPromptNotes.d.ts +17 -20
  86. package/dist/utils/systemPromptNotes.js +22 -24
  87. package/dist/utils/systemPromptNotes.js.map +1 -1
  88. package/dist/utils/untrustedText.d.ts +24 -4
  89. package/dist/utils/untrustedText.js +25 -4
  90. package/dist/utils/untrustedText.js.map +1 -1
  91. package/package.json +4 -4
  92. package/schema/gsloth-config.schema.json +0 -1
@@ -153,7 +153,8 @@ export class ShellNegotiationState {
153
153
  * **The round is appended BEFORE either bound is tested**, so the rating that escalates is itself
154
154
  * on the transcript the human sees. §5.6's escalation example turns on this: what matters on the
155
155
  * screen is that the agent proposed the same command three times, and the third proposal is the
156
- * one being escalated.
156
+ * one being escalated. {@link renderNegotiationRows} marks that last round as the pending request
157
+ * rather than as a prior one, which is the half of this the reader needs and cannot derive.
157
158
  */
158
159
  recordRejection(round) {
159
160
  this.rounds.push(round);
@@ -169,6 +170,14 @@ export class ShellNegotiationState {
169
170
  * §5.3 — a tool call the gate let through. Resets the consecutive counter **and clears the
170
171
  * transcript with it**; the reachability bound is deliberately untouched.
171
172
  *
173
+ * **What it must NOT truncate is the human's record of how hard the agent pushed.** The counter's
174
+ * reset is §5.3's and is sound; the reader at an escalation is asking a different question, and
175
+ * the answer to theirs is {@link NegotiationCounters.rejectionsSinceHuman}, which this leaves
176
+ * standing. {@link renderNegotiationRows} reports that count rather than the surviving rounds, so
177
+ * an argument this erased is still declared even though its rounds are gone; every erased round
178
+ * itself survives whole in [[TUI-C27]]'s archive, which captures per RATING CALL and so is not
179
+ * truncated by anything here.
180
+ *
172
181
  * **"Approved" is what the gate can observe, and it is not quite §5.3's "successful".** The
173
182
  * decision site sees whether a call was allowed to run, never whether it then exited zero — and
174
183
  * the honest alternatives were worse: a tool-result stream carries the *rejected* call's own
@@ -236,6 +245,10 @@ export class ShellNegotiationState {
236
245
  * was rejected"* and *"the call was the third consecutive rejection, so the next one goes to a
237
246
  * person"* are different facts, and a bug report carrying only the first invites the wrong
238
247
  * conclusion about why a session started interrupting.
248
+ *
249
+ * **`rejectionsSinceHuman` is also what the escalation prompt COUNTS**, and that is the one place
250
+ * it faces a person rather than a debugging archive. It is read at the escalation site before
251
+ * {@link humanReached} spends it; reading it after would report zero.
239
252
  */
240
253
  counters() {
241
254
  return {
@@ -262,6 +275,31 @@ export class ShellNegotiationState {
262
275
  * rest: a continuation cannot be read as a turn that was never taken, whatever it contains.
263
276
  */
264
277
  const CONTINUATION_PREFIX = ' ┊ ';
278
+ /**
279
+ * Terminal rows one element of a round — the command, the justification, the rater's answer — may
280
+ * occupy on a screen before the rest of it is elided.
281
+ *
282
+ * **MEASURED, and it is the height bound this block needs rather than a cap on rounds.** At 80
283
+ * columns three rounds of paragraph-length argument cost 37 rows, of which one round was 12; the
284
+ * whole prompt was 64 rows against a 20-row budget, so the human saw the command and the verdict
285
+ * and neither the later rounds nor the menu line. A cap on the NUMBER of rounds would have changed
286
+ * none of that — §5.3 already bounds the transcript at
287
+ * {@link MAX_CONSECUTIVE_REJECTIONS} — because the cost is per row, not per round. Bounding each
288
+ * element keeps every round structurally on the screen, which is what §5.6 calls the most important
289
+ * thing on it, and pays for it out of the tail of a paragraph the reader was never going to need in
290
+ * full: the archive keeps every round whole ([[TUI-C27]]'s capture is per rating call).
291
+ *
292
+ * Two rather than one so a wrapped command keeps the continuation that shows how it differs from
293
+ * the round above it — the comparison the block exists to make.
294
+ */
295
+ export const NEGOTIATION_MAX_ROWS_PER_ELEMENT = 2;
296
+ /**
297
+ * Rounds a screen shows, newest last. A backstop rather than today's binding constraint: §5.3
298
+ * escalates at {@link MAX_CONSECUTIVE_REJECTIONS}, so a transcript reaching a human is never longer
299
+ * than this — and an unscrollable prompt must not acquire an unbounded section the moment that
300
+ * number is raised. What is dropped is said out loud in the heading, which carries the true count.
301
+ */
302
+ export const NEGOTIATION_MAX_ROUNDS_SHOWN = 3;
265
303
  /**
266
304
  * §6/§5.4 — render a negotiation for the human being asked to rule on it, one terminal row per
267
305
  * element, each tagged with the voice speaking it.
@@ -284,37 +322,128 @@ const CONTINUATION_PREFIX = ' ┊ ';
284
322
  * A wrapped row keeps the voice of the row it continues. A continuation painted as chrome would put
285
323
  * the rater's words in the agent's colour at exactly the width where a long argument is hardest to
286
324
  * read, which is the confusion §5.4 exists to remove.
325
+ *
326
+ * ## The three things this block must not get wrong about its own exchange
327
+ *
328
+ * Every label here sits over data that is already correct, so a label that lies does so silently —
329
+ * and each of these lied toward approving, at the moment a human was deciding whether to overrule
330
+ * a refusal.
331
+ *
332
+ * - **`attempts` is the count, and it is not `rounds.length`.** §5.3 clears the transcript on an
333
+ * approved call, so the rounds handed over are the attempts since the last *approval*, while the
334
+ * fact the reader is weighing is how hard the agent pushed since the last *human* — the caller's
335
+ * `rejectionsSinceHuman`. A measured escalation attempted the same command five times and
336
+ * rendered three. Omit it and this falls back to `rounds.length`, which is the honest reading of
337
+ * a caller that has no better number rather than a claim that none were erased.
338
+ * - **The last round IS the pending rating, not a prior one.** {@link
339
+ * ShellNegotiationState.recordRejection} appends before either bound is tested, deliberately, so
340
+ * that the rating being escalated is on the transcript the human sees. The old heading called
341
+ * them all prior rounds, which both under-reported the argument and put the pending command on
342
+ * the screen twice with nothing saying they were the same call.
343
+ * - **The first round was rated on the command alone.** A cleared transcript IS the round-1 case
344
+ * (see {@link ShellNegotiationState.contextFor}), so §5.1 withheld the justification and the user
345
+ * messages from that rating — while {@link ShellNegotiationState.recordRejection} stores the
346
+ * justification the agent supplied whatever the round. Printed unmarked, the round reads as a
347
+ * rater brushing past a direct answer to its own objection, which is the opposite of what
348
+ * happened and makes the rater look stubborn exactly where the reader is deciding whether to
349
+ * overrule it. The withholding is correct and is not what this marks. The same marker answers
350
+ * *"were the user's own words in view when this was rated?"* — a justification claiming the user
351
+ * asked for a command is exactly what a round-1 rating cannot check, and the user's messages are
352
+ * several rows on a surface with none to spare.
353
+ *
354
+ * **The prompt this feeds does not scroll and nothing else on it can give up rows**, so the height
355
+ * bound is {@link NEGOTIATION_MAX_ROWS_PER_ELEMENT} and every fact above is carried by a row that
356
+ * already exists.
287
357
  */
288
358
  export function renderNegotiationRows(rounds, options) {
289
359
  if (rounds.length === 0)
290
360
  return [];
361
+ const width = options?.width;
362
+ // A screen shows the newest rounds; a consumer with no screen (§6.2's exception message) shows
363
+ // them all, for the same reason it is handed no width.
364
+ const shown = width === undefined ? rounds : rounds.slice(-NEGOTIATION_MAX_ROUNDS_SHOWN);
365
+ // Never fewer attempts than rounds on the screen: a caller that passes a stale or smaller number
366
+ // must not be able to make this block claim less argument than it is about to print.
367
+ const attempts = Math.max(options?.attempts ?? rounds.length, rounds.length);
368
+ // The shown rounds are the most recent ones, so they are attempts `attempts - shown + 1` … N.
369
+ // Numbering them by their true attempt number is what stops the heading's count and the rounds
370
+ // beneath it describing two different exchanges.
371
+ const firstNumber = attempts - shown.length + 1;
372
+ // How many of the transcript's own rounds this screen had to drop, so a marker keyed on a
373
+ // POSITION IN THE TRANSCRIPT (round one, the pending round) stays keyed on it after the slice.
374
+ const dropped = rounds.length - shown.length;
291
375
  const rows = [
292
376
  {
293
377
  voice: 'chrome',
294
- text: `The agent argued with the auto-rater ${rounds.length} ${rounds.length === 1 ? 'time' : 'times'} before this:`,
378
+ text: attempts > shown.length
379
+ ? `The agent argued with the auto-rater ${attempts} times; the last ${shown.length} of them:`
380
+ : `The agent argued with the auto-rater ${attempts} ${attempts === 1 ? 'time' : 'times'}:`,
295
381
  },
296
382
  ];
297
- rounds.forEach((round, index) => {
298
- rows.push({ voice: 'agent', text: ` Round ${index + 1}: ${oneLine(round.command)}` });
383
+ shown.forEach((round, index) => {
384
+ // **Each marker rides the row whose reading it corrects, and no other.** Put on the `Round`
385
+ // row they would be paid for in the one thing that row is for — the command, and how it
386
+ // compares with the round above it — which at a narrow width is most of what fits on it.
387
+ const pending = dropped + index === rounds.length - 1 ? ' (this request)' : '';
388
+ // A cleared transcript IS the round-1 case, so the transcript's FIRST round is the one §5.1
389
+ // rated on the command alone. Derived from the position rather than carried on the round
390
+ // because it is a property of the transcript, not of the rating — but that makes it a fact a
391
+ // reset could quietly invalidate, so it is pinned against a real run rather than by reading.
392
+ const roundOne = dropped + index === 0;
393
+ rows.push({
394
+ voice: 'agent',
395
+ text: ` Round ${firstNumber + index}${pending}: ${oneLine(round.command)}`,
396
+ });
299
397
  const justification = round.justification?.trim();
300
398
  if (justification) {
301
- rows.push({ voice: 'agent', text: ` agent justified: ${oneLine(justification)}` });
399
+ rows.push({
400
+ voice: 'agent',
401
+ text: ` agent justified${roundOne ? ' (not shown to the rater)' : ''}: ${oneLine(justification)}`,
402
+ });
302
403
  }
303
404
  const reason = round.reason.trim();
304
405
  rows.push({
305
406
  voice: 'rater',
306
- text: ` rater answered: ${round.outcome}${reason ? ` — ${oneLine(reason)}` : ''}`,
407
+ text: ` rater answered${roundOne ? ' (on the command alone)' : ''}: ${round.outcome}${reason ? ` — ${oneLine(reason)}` : ''}`,
307
408
  });
308
409
  });
309
- const width = options?.width;
310
410
  if (width === undefined)
311
411
  return rows;
312
412
  return rows.flatMap((row) => wrapRow(row, width));
313
413
  }
314
- /** One logical row as the terminal rows it needs, continuations marked and voice preserved. */
414
+ /**
415
+ * One logical row as the terminal rows it needs, continuations marked and voice preserved — and
416
+ * never more than {@link NEGOTIATION_MAX_ROWS_PER_ELEMENT} of them.
417
+ *
418
+ * The elision is stated on the last row it keeps rather than on one of its own: a row spent saying
419
+ * a row was dropped saves nothing on a surface whose whole problem is rows.
420
+ */
315
421
  function wrapRow(row, width) {
316
422
  const budget = Math.max(MIN_CONTENT_WIDTH, width - maxDisplayWidth(CONTINUATION_PREFIX));
317
- const [head, ...rest] = wrapToWidth(row.text, budget);
423
+ const lines = wrapToWidth(row.text, budget);
424
+ // **The heading WRAPS but is never clamped, and the distinction is the same one
425
+ // `approvalStop`'s rows make**: the row bound exists to stop agent-authored prose spending a
426
+ // screen that cannot scroll, and the heading is this renderer's own sentence — nothing can forge
427
+ // it, so it may wrap like ordinary prose, and clamping it buys nothing. It costs, though: the
428
+ // heading is where the attempt count lives, and at {@link MIN_FRAME_WIDTH} a clamp lands inside
429
+ // the number, deleting the single most decision-relevant fact on the block to save one row.
430
+ const kept = row.voice === 'chrome' ? [...lines] : lines.slice(0, NEGOTIATION_MAX_ROWS_PER_ELEMENT);
431
+ const hidden = lines.length - kept.length;
432
+ if (hidden > 0 && kept.length > 0) {
433
+ const marker = ` … +${hidden} ${hidden === 1 ? 'row' : 'rows'}`;
434
+ const last = kept.length - 1;
435
+ // **The marker is the fact; the tail of the sentence it truncates is not.** On a frame too
436
+ // narrow to hold both, the content gives way rather than the row overrunning — and the joined
437
+ // row is re-bound afterwards, because `wrapToWidth` can only bind text it was given, and it was
438
+ // never given these two pieces joined. A row measured as fitting that does not fit is a row the
439
+ // terminal wraps back to column 0, which is the one thing every row here is bound to prevent.
440
+ const room = budget - maxDisplayWidth(marker);
441
+ const head = room >= MIN_CONTENT_WIDTH ? (wrapToWidth(kept[last], room)[0] ?? '') : '';
442
+ const composed = `${head}${marker}`;
443
+ kept[last] =
444
+ maxDisplayWidth(composed) <= budget ? composed : (wrapToWidth(composed, budget)[0] ?? '');
445
+ }
446
+ const [head, ...rest] = kept;
318
447
  return [
319
448
  { voice: row.voice, text: head },
320
449
  ...rest.map((text) => ({ voice: row.voice, text: `${CONTINUATION_PREFIX}${text}` })),
@@ -328,9 +457,13 @@ function wrapRow(row, width) {
328
457
  * Defined as {@link renderNegotiationRows} joined, so the string and the rows can never come to
329
458
  * describe one exchange two ways — the whole reason there is one renderer and two surfaces.
330
459
  * `null` when there is nothing to show.
460
+ *
461
+ * `attempts` carries the same fact it carries on a screen. It is the one thing a caller must pass
462
+ * for this message to be true, because the count it defaults to is the one an approved call
463
+ * truncated.
331
464
  */
332
- export function renderNegotiationTranscript(rounds) {
333
- const rows = renderNegotiationRows(rounds);
465
+ export function renderNegotiationTranscript(rounds, attempts) {
466
+ const rows = renderNegotiationRows(rounds, attempts === undefined ? undefined : { attempts });
334
467
  if (rows.length === 0)
335
468
  return null;
336
469
  return rows.map((row) => row.text).join('\n');
@@ -1 +1 @@
1
- {"version":3,"file":"negotiation.js","sourceRoot":"","sources":["../../../src/core/shell/negotiation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAuB7C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,qBAAqB;IAChC,+EAA+E;IACvE,MAAM,GAA4B,EAAE,CAAC;IAC7C,6FAA6F;IACrF,WAAW,GAAG,CAAC,CAAC;IACxB,4EAA4E;IACpE,UAAU,GAAG,CAAC,CAAC;IACvB,qGAAqG;IAC7F,YAAY,GAAa,EAAE,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,UAAU,CAAC,aAAsB;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;QAC1C,OAAO;YACL,aAAa,EAAE,QAA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ations } from '#src/core/approvals/matcher.js';
42
42
  import { type RaterCallCapture } from '#src/core/shell/approvalCapture.js';
43
+ import type { PreflightFloorKind, RaterAction, RaterOutcome } from '#src/core/shell/raterVocabulary.js';
43
44
  /**
44
- * CFG-28 (spec §4.1) the **four** outcomes the rater may return. The retired third outcome named
45
- * the halt trigger by *mechanism* while positioning it as the top *severity*; the rescale (§11.1)
46
- * splits that into two outcomes asking two different questions. There is no
47
- * ordering knob and no threshold: each outcome's consequence is fixed by the rung
48
- * ({@link mapVerdictToAction}).
49
- *
50
- * - `safe` — no harmful effect.
51
- * - `destructive` — **the catch-all**: harmful, but recoverable from inside the session, and not
52
- * an attack — **and anything the rater cannot assess**. The rating prompt defines it *by
53
- * exclusion* ("not safe, not catastrophic and not an attack") precisely so no command can fall
54
- * outside the four.
55
- * - `catastrophic` — *can this be undone from inside the session?* Irreversible without something
56
- * OUTSIDE the session: rescue media, a backup, a re-provision, a restore from a third party.
57
- * Escalates at both rated rungs; never negotiable and never sticky (§4.2).
58
- * - `attack` — *is something hostile acting here?* The command's own **structure** evidences
59
- * compromise (§4.1.1: credential targeting, privilege escalation / permission weakening,
60
- * persistence, deception, obfuscation). It is the only outcome that HALTS the run.
61
- *
62
- * **`catastrophic` and `attack` are not ranked against each other** — they ask different
63
- * questions, and the spec says so explicitly. A command can be both; `attack` wins the
64
- * *consequence* (a manipulated session cannot be trusted to continue) but MUST NOT swallow the
65
- * finding — see the §6.1 clause in {@link buildRaterSystemPrompt}. Nothing here may be written as
66
- * a severity comparison between the two.
67
- */
68
- export declare const RATER_OUTCOMES: readonly ['safe', 'destructive', 'catastrophic', 'attack'];
69
- /** One outcome of {@link RATER_OUTCOMES}. */
70
- export type RaterOutcome = (typeof RATER_OUTCOMES)[number];
45
+ * The gate's closed vocabularies are defined in {@link ./raterVocabulary.js} a leaf module with no
46
+ * imports, so a checker can read the words without loading this file's model layer. They are
47
+ * re-exported here, where their meaning lives, so a caller needs only one import either way.
48
+ */
49
+ export { PREFLIGHT_FLOOR_KINDS, RATER_ACTIONS, RATER_OUTCOMES, } from '#src/core/shell/raterVocabulary.js';
50
+ export type { PreflightFloorKind, RaterAction, RaterOutcome, } from '#src/core/shell/raterVocabulary.js';
71
51
  /**
72
52
  * Structured verdict the rater model must return: one outcome plus one short sentence. There is
73
53
  * deliberately nothing else — no severity number, no booleans to recombine into a compound
@@ -699,46 +679,6 @@ export declare function rateShellCommand(command: string, config: GthConfig, opt
699
679
  /** [[TUI-C27]] — `approvals.rater`, recorded on the capture so a dump names WHO rated. */
700
680
  raterProfile?: string;
701
681
  }): Promise<ShellSafetyVerdict>;
702
- /**
703
- * The action the approvals gate resolves to for a single gated call, BEFORE the human prompt.
704
- *
705
- * - `approve` — approve ONCE; do not touch the human or the allow-list.
706
- * - `escalate` — fall through to the human approval callback, carrying the verdict when one
707
- * exists. Where there is no human, §6.2 turns this into an immediate non-zero exit — that
708
- * translation belongs to the runner, not here.
709
- * - `halt` — **end the agent loop** (§4.2). Reserved for `attack`. It is not a rejection the
710
- * model can respond to and offers it no moves; no rung except `bypass` can turn it into
711
- * anything else.
712
- * - `reject` — [[EXT-29]] (§5): hand the rater's explanation back to the **agent** as the refused
713
- * call's tool result (§7), opening a round of the negotiation. Returned for `destructive` at
714
- * `auto` and nowhere else.
715
- *
716
- * **`reject` says the outcome is negotiable, NOT that the negotiation may continue.** This mapping
717
- * is keyed on the rung and knows nothing about how many rounds have been spent; §5.3's consecutive
718
- * cap and the reachability bound live with the state they count, in the runner, which turns a
719
- * `reject` into an escalation once either is spent. Putting the counters in here would make a pure
720
- * rung-keyed table depend on session history, and would give the eval target
721
- * (`@gaunt-sloth/batch`'s `raterTarget`) an action that varies with something it does not model.
722
- *
723
- * **[[EXT-81]] retired the fourth arm, `abstain`.** A command whose target the gate could not
724
- * statically resolve used to skip the rating call entirely and return that action instead. Under
725
- * §6.1's rule — *deterministic checks fire only where we are confident something is a threat; where
726
- * we cannot tell, the model decides* — a parser reporting that it could not resolve a string is not
727
- * a detection, so it no longer earns an action of its own. What it earns is a neutral note in the
728
- * rating prompt ({@link buildParserPreflightNote}) and a real rating, which is also what restores
729
- * the ceiling: `catastrophic` and `attack` were UNREACHABLE for that whole class while nobody rated
730
- * it, so `pwd && rm -rf ~` could only ever be floored at `destructive`.
731
- *
732
- * There is deliberately **no `refuse` arm for `catastrophic`** (settled 2026-07-27c, §4.2). The
733
- * deterministic members of that class — fork bomb, `mkfs`, `rm -rf /`, `dd` to a block device — are
734
- * already refused unappealably by the §8 hardline floor under every rung including `bypass`, so a
735
- * refusing `catastrophic` would add nothing for the commands that motivate the idea. What it would
736
- * newly refuse is the remainder the floor cannot reach, every member of which has routine
737
- * legitimate use (a staging database, an ephemeral `terraform destroy`, a preview namespace). An
738
- * unmeasured classifier belongs behind a human who can correct it; a refusal has no correction
739
- * path.
740
- */
741
- export type RaterAction = 'approve' | 'escalate' | 'halt' | 'reject';
742
682
  /** Inputs to the decision mapping: just the rung. Each rung fully determines behaviour (§1). */
743
683
  export interface RaterDecisionOptions {
744
684
  /** The rung in force for this session. */
@@ -822,8 +762,6 @@ export declare function applyDestructiveFloor(verdict: ShellSafetyVerdict | unde
822
762
  * the same direction as the fail-closed default it would otherwise have returned.
823
763
  */
824
764
  export declare function openWorldToolFloorReason(annotations: EffectiveToolAnnotations | undefined): string | null;
825
- /** Which of the two deterministic preflights fired. See {@link preflightFloorFinding}. */
826
- export type PreflightFloorKind = 'script-env-leak' | 'open-world';
827
765
  /** A preflight finding: which arm fired, and the reason it floors the command with. */
828
766
  export interface PreflightFloorFinding {
829
767
  kind: PreflightFloorKind;
@@ -45,34 +45,15 @@ import { buildParserPreflightNote } from '#src/core/shell/abstention.js';
45
45
  import { describeRaterNegotiation, raterModelLabel, } from '#src/core/shell/approvalCapture.js';
46
46
  import { normalizeCommand } from '#src/core/shell/normalize.js';
47
47
  import { buildComposedOpenWorldNote, findOpenWorldHostLiterals, } from '#src/core/shell/openWorld.js';
48
+ import { RATER_OUTCOMES } from '#src/core/shell/raterVocabulary.js';
48
49
  import { structuredOutputBoundary } from '#src/runtime/structuredOutput.js';
49
50
  import { debugLog, debugLogError } from '#src/utils/debugUtils.js';
50
51
  /**
51
- * CFG-28 (spec §4.1) the **four** outcomes the rater may return. The retired third outcome named
52
- * the halt trigger by *mechanism* while positioning it as the top *severity*; the rescale (§11.1)
53
- * splits that into two outcomes asking two different questions. There is no
54
- * ordering knob and no threshold: each outcome's consequence is fixed by the rung
55
- * ({@link mapVerdictToAction}).
56
- *
57
- * - `safe` — no harmful effect.
58
- * - `destructive` — **the catch-all**: harmful, but recoverable from inside the session, and not
59
- * an attack — **and anything the rater cannot assess**. The rating prompt defines it *by
60
- * exclusion* ("not safe, not catastrophic and not an attack") precisely so no command can fall
61
- * outside the four.
62
- * - `catastrophic` — *can this be undone from inside the session?* Irreversible without something
63
- * OUTSIDE the session: rescue media, a backup, a re-provision, a restore from a third party.
64
- * Escalates at both rated rungs; never negotiable and never sticky (§4.2).
65
- * - `attack` — *is something hostile acting here?* The command's own **structure** evidences
66
- * compromise (§4.1.1: credential targeting, privilege escalation / permission weakening,
67
- * persistence, deception, obfuscation). It is the only outcome that HALTS the run.
68
- *
69
- * **`catastrophic` and `attack` are not ranked against each other** — they ask different
70
- * questions, and the spec says so explicitly. A command can be both; `attack` wins the
71
- * *consequence* (a manipulated session cannot be trusted to continue) but MUST NOT swallow the
72
- * finding — see the §6.1 clause in {@link buildRaterSystemPrompt}. Nothing here may be written as
73
- * a severity comparison between the two.
52
+ * The gate's closed vocabularies are defined in {@link ./raterVocabulary.js} a leaf module with no
53
+ * imports, so a checker can read the words without loading this file's model layer. They are
54
+ * re-exported here, where their meaning lives, so a caller needs only one import either way.
74
55
  */
75
- export const RATER_OUTCOMES = ['safe', 'destructive', 'catastrophic', 'attack'];
56
+ export { PREFLIGHT_FLOOR_KINDS, RATER_ACTIONS, RATER_OUTCOMES, } from '#src/core/shell/raterVocabulary.js';
76
57
  /**
77
58
  * Structured verdict the rater model must return: one outcome plus one short sentence. There is
78
59
  * deliberately nothing else — no severity number, no booleans to recombine into a compound
@@ -1 +1 @@
1
- {"version":3,"file":"rater.js","sourceRoot":"","sources":["../../../src/core/shell/rater.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,iGAAiG;AACjG,gGAAgG;AAChG,qCAAqC;AACrC,OAAO,EACL,wBAAwB,EAExB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,CAAU,CAAC;AAKzF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC;SACP,IAAI,CAAC,cAAc,CAAC;SACpB,QAAQ,CACP,+CAA+C;QAC7C,4BAA4B;QAC5B,sFAAsF;QACtF,yDAAyD;QACzD,oFAAoF;QACpF,wFAAwF;QACxF,sFAAsF;QACtF,SAAS,CACZ;IACH,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;S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AAI,SAAS,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAClF,IAAI,SAAS,CAAC,OAAO,KAAK,cAAc;QAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC5F,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACnD,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * @module core/shell/raterVocabulary
3
+ *
4
+ * **The approvals gate's closed vocabularies, and nothing else.** Three lists: the outcomes a rater
5
+ * may return, the actions the gate may resolve to, and the deterministic preflights that can floor a
6
+ * command. Each is the SINGLE place its members are written down.
7
+ *
8
+ * ## Why they live apart from {@link ./rater.js}, which owns their meaning
9
+ *
10
+ * A vocabulary has two kinds of consumer. The gate itself needs the words *and* the machinery around
11
+ * them. A **checker** — a schema, a report axis, a compile-time guard in another package — needs only
12
+ * the words, and must be able to read them without loading a rating prompt, a structured-output
13
+ * boundary and a chat-model client. `rater.js` imports LangChain and Zod; a suite parser that had to
14
+ * import it to learn which actions exist would pull the whole model layer into a parse.
15
+ *
16
+ * So this module has **no imports at all**, and it must stay that way. `rater.js` re-exports every
17
+ * symbol here, so the gate's own callers are unaffected and there is exactly one spelling of each
18
+ * word in the codebase.
19
+ *
20
+ * **A checker that RESTATES one of these lists is the failure this module exists to prevent.** A
21
+ * restated list does not grow when the gate grows: the new member is simply never recognised, and
22
+ * the checker keeps reporting success over a vocabulary it no longer covers. Derive from these
23
+ * arrays — ideally as a total `Record` keyed on the type, so a new member is a compile error rather
24
+ * than a silence.
25
+ */
26
+ /**
27
+ * (Spec §4.1) — the **four** outcomes the rater may return. There is no ordering knob and no
28
+ * threshold: each outcome's consequence is fixed by the rung
29
+ * ({@link import('./rater.js').mapVerdictToAction}).
30
+ *
31
+ * - `safe` — no harmful effect.
32
+ * - `destructive` — **the catch-all**: harmful, but recoverable from inside the session, and not
33
+ * an attack — **and anything the rater cannot assess**. The rating prompt defines it *by
34
+ * exclusion* ("not safe, not catastrophic and not an attack") precisely so no command can fall
35
+ * outside the four.
36
+ * - `catastrophic` — *can this be undone from inside the session?* Irreversible without something
37
+ * OUTSIDE the session: rescue media, a backup, a re-provision, a restore from a third party.
38
+ * Escalates at both rated rungs; never negotiable and never sticky (§4.2).
39
+ * - `attack` — *is something hostile acting here?* The command's own **structure** evidences
40
+ * compromise (§4.1.1: credential targeting, privilege escalation / permission weakening,
41
+ * persistence, deception, obfuscation). It is the only outcome that HALTS the run.
42
+ *
43
+ * **`catastrophic` and `attack` are not ranked against each other** — they ask different
44
+ * questions, and the spec says so explicitly. A command can be both; `attack` wins the
45
+ * *consequence* (a manipulated session cannot be trusted to continue) but MUST NOT swallow the
46
+ * finding — see the §6.1 clause in {@link import('./rater.js').buildRaterSystemPrompt}. Nothing
47
+ * here may be written as a severity comparison between the two.
48
+ */
49
+ export declare const RATER_OUTCOMES: readonly ['safe', 'destructive', 'catastrophic', 'attack'];
50
+ /** One outcome of {@link RATER_OUTCOMES}. */
51
+ export type RaterOutcome = (typeof RATER_OUTCOMES)[number];
52
+ /**
53
+ * The actions the approvals gate can resolve to for a single gated call, BEFORE the human prompt.
54
+ * {@link import('./rater.js').mapVerdictToAction} is the whole mapping from an outcome and a rung
55
+ * onto one of these, and its docblock carries the table.
56
+ *
57
+ * - `approve` — approve ONCE; do not touch the human or the allow-list.
58
+ * - `escalate` — fall through to the human approval callback, carrying the verdict when one
59
+ * exists. Where there is no human, §6.2 turns this into an immediate non-zero exit — that
60
+ * translation belongs to the runner, not to the mapping.
61
+ * - `halt` — **end the agent loop** (§4.2). Reserved for `attack`. It is not a rejection the
62
+ * model can respond to and offers it no moves; no rung except `bypass` can turn it into
63
+ * anything else.
64
+ * - `reject` — (§5): hand the rater's explanation back to the **agent** as the refused call's tool
65
+ * result (§7), opening a round of the negotiation. Returned for `destructive` at `auto` and
66
+ * nowhere else.
67
+ *
68
+ * **`reject` says the outcome is negotiable, NOT that the negotiation may continue.** The mapping is
69
+ * keyed on the rung and knows nothing about how many rounds have been spent; §5.3's consecutive cap
70
+ * and the reachability bound live with the state they count, in the runner, which turns a `reject`
71
+ * into an escalation once either is spent. Putting the counters into the mapping would make a pure
72
+ * rung-keyed table depend on session history, and would give the eval target
73
+ * (`@gaunt-sloth/batch`'s `raterTarget`) an action that varies with something it does not model.
74
+ *
75
+ * There is deliberately **no `abstain` arm.** A command whose target the gate cannot statically
76
+ * resolve is rated like any other, under §6.1's rule — *deterministic checks fire only where we are
77
+ * confident something is a threat; where we cannot tell, the model decides*. A parser reporting that
78
+ * it could not resolve a string is not a detection, so it earns no action of its own; what it earns
79
+ * is a neutral note in the rating prompt
80
+ * ({@link import('./abstention.js').buildParserPreflightNote}) and a real rating. That is also what
81
+ * keeps the ceiling reachable: an action of its own would make `catastrophic` and `attack`
82
+ * unreachable for every composed, substituting or redirecting command, so `pwd && rm -rf ~` could
83
+ * only ever be floored at `destructive`.
84
+ *
85
+ * There is deliberately **no `refuse` arm for `catastrophic`** (§4.2). The deterministic members of
86
+ * that class — fork bomb, `mkfs`, `rm -rf /`, `dd` to a block device — are already refused
87
+ * unappealably by the §8 hardline floor under every rung including `bypass`, so a refusing
88
+ * `catastrophic` would add nothing for the commands that motivate the idea. What it would newly
89
+ * refuse is the remainder the floor cannot reach, every member of which has routine legitimate use
90
+ * (a staging database, an ephemeral `terraform destroy`, a preview namespace). An unmeasured
91
+ * classifier belongs behind a human who can correct it; a refusal has no correction path.
92
+ *
93
+ * **This list is exhaustive by construction, and downstream must treat it that way.** Anything that
94
+ * enumerates actions — a report axis, an eval suite's declared enum, a rendering table — has to
95
+ * derive from here. The failure mode of a restatement is silent rather than loud: an action the
96
+ * enumerator does not know is not an error it can raise, it is a row it quietly files under
97
+ * "unrecognized", and the thing that was being measured simply stops being measured.
98
+ */
99
+ export declare const RATER_ACTIONS: readonly ['approve', 'escalate', 'halt', 'reject'];
100
+ /** One action of {@link RATER_ACTIONS}. */
101
+ export type RaterAction = (typeof RATER_ACTIONS)[number];
102
+ /**
103
+ * The deterministic preflights that can floor a command at `destructive`, in the FIXED order
104
+ * {@link import('./rater.js').preflightFloorFinding} evaluates them.
105
+ *
106
+ * - `script-env-leak` — an interpreter invocation expanding an ALL_CAPS environment variable into
107
+ * its arguments. §11.1b's narrowing of the `attack` clause rests on this arm firing.
108
+ * - `open-world` — (§4.6) a host literal in a fetch/transfer position. Its reason NAMES THE HOST,
109
+ * so, unlike the other arm's, its text varies per command: identify this arm by its `kind`, never
110
+ * by matching its prose.
111
+ *
112
+ * They are arms of a single decision rather than independent checks, and the outcome is identical
113
+ * whichever fires — the order is the order of the *explanation* a human reads. Anything that
114
+ * attributes a floored decision to a mechanism must key on this list, so that a preflight added to
115
+ * the gate cannot go unattributed.
116
+ */
117
+ export declare const PREFLIGHT_FLOOR_KINDS: readonly ['script-env-leak', 'open-world'];
118
+ /** One preflight of {@link PREFLIGHT_FLOOR_KINDS}. */
119
+ export type PreflightFloorKind = (typeof PREFLIGHT_FLOOR_KINDS)[number];