@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.
- package/dist/config/configDiscovery.d.ts +79 -0
- package/dist/config/configDiscovery.js +80 -0
- package/dist/config/configDiscovery.js.map +1 -0
- package/dist/config/loader.d.ts +6 -5
- package/dist/config/loader.js +229 -92
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +3 -2
- package/dist/config/schema.js +57 -9
- package/dist/config/schema.js.map +1 -1
- package/dist/config/shell-policy.d.ts +58 -26
- package/dist/config/shell-policy.js +60 -27
- package/dist/config/shell-policy.js.map +1 -1
- package/dist/config/tool-descriptions.d.ts +6 -6
- package/dist/config/tool-descriptions.js +7 -7
- package/dist/config/tool-descriptions.js.map +1 -1
- package/dist/config/types.d.ts +34 -31
- package/dist/config/types.js.map +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/core/GthAbstractAgent.d.ts +11 -13
- package/dist/core/GthAbstractAgent.js +9 -11
- package/dist/core/GthAbstractAgent.js.map +1 -1
- package/dist/core/GthAgentRunner.d.ts +17 -33
- package/dist/core/GthAgentRunner.js +31 -41
- package/dist/core/GthAgentRunner.js.map +1 -1
- package/dist/core/GthLangChainAgent.js +25 -34
- package/dist/core/GthLangChainAgent.js.map +1 -1
- package/dist/core/approvals/toolAnnotationSources.d.ts +4 -4
- package/dist/core/approvals/toolAnnotationSources.js +8 -8
- package/dist/core/debugCapture.d.ts +2 -3
- package/dist/core/debugCapture.js +1 -2
- package/dist/core/debugCapture.js.map +1 -1
- package/dist/core/gthLeanAgentFactory.d.ts +4 -4
- package/dist/core/gthLeanAgentFactory.js +4 -4
- package/dist/core/reasoningBlocks.d.ts +7 -2
- package/dist/core/reasoningBlocks.js +7 -2
- package/dist/core/reasoningBlocks.js.map +1 -1
- package/dist/core/shell/ShellCommandFailedError.d.ts +3 -4
- package/dist/core/shell/ShellCommandFailedError.js +3 -4
- package/dist/core/shell/ShellCommandFailedError.js.map +1 -1
- package/dist/core/shell/approvalStop.d.ts +68 -29
- package/dist/core/shell/approvalStop.js +178 -28
- package/dist/core/shell/approvalStop.js.map +1 -1
- package/dist/core/shell/hardline.d.ts +22 -0
- package/dist/core/shell/hardline.js +81 -0
- package/dist/core/shell/hardline.js.map +1 -1
- package/dist/core/shell/negotiation.d.ts +81 -2
- package/dist/core/shell/negotiation.js +144 -11
- package/dist/core/shell/negotiation.js.map +1 -1
- package/dist/core/shell/rater.d.ts +7 -69
- package/dist/core/shell/rater.js +5 -24
- package/dist/core/shell/rater.js.map +1 -1
- package/dist/core/shell/raterVocabulary.d.ts +119 -0
- package/dist/core/shell/raterVocabulary.js +114 -0
- package/dist/core/shell/raterVocabulary.js.map +1 -0
- package/dist/core/types.d.ts +17 -3
- package/dist/providers/anthropic.js +12 -0
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/configurationPassthrough.d.ts +107 -0
- package/dist/providers/configurationPassthrough.js +148 -0
- package/dist/providers/configurationPassthrough.js.map +1 -0
- package/dist/providers/geminiThinking.d.ts +8 -0
- package/dist/providers/geminiThinking.js +33 -13
- package/dist/providers/geminiThinking.js.map +1 -1
- package/dist/providers/google-genai.js +11 -0
- package/dist/providers/google-genai.js.map +1 -1
- package/dist/providers/groq.js +12 -0
- package/dist/providers/groq.js.map +1 -1
- package/dist/providers/ollama.js +12 -0
- package/dist/providers/ollama.js.map +1 -1
- package/dist/providers/openrouter.d.ts +23 -0
- package/dist/providers/openrouter.js +71 -4
- package/dist/providers/openrouter.js.map +1 -1
- package/dist/providers/vertexai.js +12 -0
- package/dist/providers/vertexai.js.map +1 -1
- package/dist/providers/xai.js +20 -0
- package/dist/providers/xai.js.map +1 -1
- package/dist/runtime/conversation.d.ts +2 -2
- package/dist/runtime/conversation.js +19 -4
- package/dist/runtime/conversation.js.map +1 -1
- package/dist/runtime/singleShot.d.ts +2 -3
- package/dist/runtime/singleShot.js +22 -7
- package/dist/runtime/singleShot.js.map +1 -1
- package/dist/utils/systemPromptNotes.d.ts +17 -20
- package/dist/utils/systemPromptNotes.js +22 -24
- package/dist/utils/systemPromptNotes.js.map +1 -1
- package/dist/utils/untrustedText.d.ts +24 -4
- package/dist/utils/untrustedText.js +25 -4
- package/dist/utils/untrustedText.js.map +1 -1
- package/package.json +4 -4
- package/schema/gsloth-config.schema.json +0 -1
|
@@ -76,8 +76,8 @@ export const SHELL_DEFAULT_TIMEOUT_MS = 120_000;
|
|
|
76
76
|
export const SHELL_DEFAULT_MAX_OUTPUT_BYTES = 100_000;
|
|
77
77
|
/**
|
|
78
78
|
* Normalize the {@link GthDevToolsConfig.shell} opt-in (bare boolean or
|
|
79
|
-
* `{ enabled }`) to a plain boolean. Centralized so
|
|
80
|
-
*
|
|
79
|
+
* `{ enabled }`) to a plain boolean. Centralized so tool emission and interrupt
|
|
80
|
+
* wiring agree on what "shell enabled" means.
|
|
81
81
|
*
|
|
82
82
|
* EXT-12 / CFG-18 — default-resolution is `enabled ?? default`. An EXPLICIT `enabled` always wins
|
|
83
83
|
* (a bare boolean, or the object form's `enabled`), so `shell: false` / `{ enabled: false }` remains
|
|
@@ -288,16 +288,25 @@ export const APPROVAL_WRITE_MODIFIER_HINT = 'Manual also has a Write variant tha
|
|
|
288
288
|
* The wording is constrained by four normative rules (state what the mode PERMITS, state the
|
|
289
289
|
* allow-list carve-out, never claim safety this system cannot deliver, use the display spelling)
|
|
290
290
|
* plus §8.1 — the hardline floor is real but is NEVER advertised, so descriptions cite only
|
|
291
|
-
* protections the user can inspect and extend, i.e. the deny list.
|
|
291
|
+
* protections the user can inspect and extend, i.e. the deny list. Six further constraints bind
|
|
292
292
|
* every edit here:
|
|
293
293
|
*
|
|
294
294
|
* 1. **No description may imply containment.** The gate protects against accidents, not intent, and
|
|
295
295
|
* a working-folder claim collapses the moment the agent has a shell — `write_file` refuses a
|
|
296
296
|
* path that `touch` then writes. The narrow true form (the built-in file *tools* are confined)
|
|
297
297
|
* is stated once, on `write`, alongside the fact that the shell is not confined that way.
|
|
298
|
-
* 2. **Claims are scoped to the session the user is in
|
|
299
|
-
*
|
|
300
|
-
*
|
|
298
|
+
* 2. **Claims are scoped to the session the user is in — ratified by Andrew on 2026-08-13** as the
|
|
299
|
+
* standing rule for every in-product approval promise ([[CFG-40]]), so it is a decision and not
|
|
300
|
+
* a habit inherited from whichever string happened to be written last. What makes it true
|
|
301
|
+
* rather than merely convenient: these strings render on terminal surfaces only, and every
|
|
302
|
+
* surface that renders them is a session a person is sitting in, so a claim scoped to *this
|
|
303
|
+
* session* describes the only place the sentence appears rather than hedging around a
|
|
304
|
+
* falsehood. Unscoped it would not: a sentence whose subject is "Gaunt Sloth" and whose claim
|
|
305
|
+
* is that it always asks is false over the AG-UI and ACP servers, which never drain an approval
|
|
306
|
+
* interrupt ([[EXT-54]] — worth fixing on its own merits, never as a gate on this copy).
|
|
307
|
+
* **That is also the boundary: the moment an approvals string is rendered by a server surface
|
|
308
|
+
* this ruling stops covering it**, and the scoped sentence has to be re-earned there rather
|
|
309
|
+
* than inherited from here.
|
|
301
310
|
* 3. **`assisted` MUST keep the sentence saying files are still rewritten and deleted without
|
|
302
311
|
* asking** — it sounds safer than it is, and that clause is the correction.
|
|
303
312
|
* 4. **A qualification may not live in the second sentence alone.** The picker, the text fallback
|
|
@@ -311,6 +320,31 @@ export const APPROVAL_WRITE_MODIFIER_HINT = 'Manual also has a Write variant tha
|
|
|
311
320
|
* promise the user watches it happen. The rounds reach a person at the escalation, all of them
|
|
312
321
|
* at once, and nothing renders them before that ([[TUI-C26]]), so a sentence implying a live
|
|
313
322
|
* commentary would be describing a screen that does not exist.
|
|
323
|
+
* 6. **Every rated rung states a LIMIT ON USE in its opener, and `recoverable` is the word that
|
|
324
|
+
* carries it** ([[CFG-48]]). A rated rung settles some risky commands without asking anyone, so
|
|
325
|
+
* the sentence offering it has to say what kind of work that is acceptable for — and a
|
|
326
|
+
* *terminus* is not a limit on use. "then asks you" and "anything riskier comes to you" say
|
|
327
|
+
* where the exchange ends; they do not say when the mode is a bad idea, which is what the three
|
|
328
|
+
* UNRATED rungs each say ("not a mode to leave running", "a bounded stretch", "a throwaway
|
|
329
|
+
* environment you would not mind losing"). Constraint 4 is why it must be the opener: the three
|
|
330
|
+
* surfaces a user chooses from print `firstSentence` and nothing else.
|
|
331
|
+
*
|
|
332
|
+
* **"Unrated", not "deterministic", and the distinction is this file's own.** The complement of
|
|
333
|
+
* {@link isRatedRung} is `{manual, write, bypass}` — the rungs that consult no rater. That is NOT
|
|
334
|
+
* the set {@link isDeterministicRung} names, which is `{manual, write}`: `bypass` gates nothing at
|
|
335
|
+
* all, so it is not a rung that decides deterministically, it is the absence of a decision. Prose
|
|
336
|
+
* elsewhere in the repo calls the three "deterministic"; against the predicate exported a hundred
|
|
337
|
+
* lines below, that reading is wrong, so this constraint says "unrated" and means the complement.
|
|
338
|
+
*
|
|
339
|
+
* **A lexical test watches the word, and its failure is not a false positive.** "Carries a
|
|
340
|
+
* limit-on-use clause" has no mechanical predicate, so the rule names its own carrier token
|
|
341
|
+
* instead: `packages/app/spec/tui/slashCommands.spec.ts` — *"every rated rung's opener says what
|
|
342
|
+
* kind of work it is for, and only the rated ones do"* — takes the rated set from
|
|
343
|
+
* {@link isRatedRung} rather than a literal pair, so a sixth rated rung is required to carry a
|
|
344
|
+
* clause on the day it is added, and asserts the three unrated rungs do NOT carry the token, so
|
|
345
|
+
* that spreading `recoverable` across all five cannot satisfy it. Rewriting this copy is fine;
|
|
346
|
+
* dropping the word is the thing that must not happen quietly, because that is exactly how
|
|
347
|
+
* Auto's cautionary clause was lost once already — in an ordinary rewrite that broke no test.
|
|
314
348
|
*
|
|
315
349
|
* Everything these two sentences cannot hold lives at {@link APPROVAL_PROTECTION_DOCS_URL}, which
|
|
316
350
|
* the surfaces print beside the copy rather than each description repeating it.
|
|
@@ -324,12 +358,12 @@ export const APPROVAL_RUNG_DESCRIPTIONS = {
|
|
|
324
358
|
'file tools run free inside your working folder. The shell is not confined that way, so shell ' +
|
|
325
359
|
'commands, MCP calls and custom tools still come to you, until you tell it to always allow a ' +
|
|
326
360
|
'command.',
|
|
327
|
-
assisted: 'For everyday work: safe commands run, anything riskier comes to you — usually
|
|
328
|
-
'explaining what it does. Gaunt Sloth can still rewrite and delete files in your
|
|
329
|
-
'folder without asking — "safe" means each action is checked for reaching outside
|
|
330
|
-
'or harming your system, not that nothing changes.',
|
|
331
|
-
auto: 'For work you want to keep moving: Auto sends a risky command back to the agent
|
|
332
|
-
'justify a few times, then
|
|
361
|
+
assisted: 'For everyday, recoverable work: safe commands run, anything riskier comes to you — usually ' +
|
|
362
|
+
'with a line explaining what it does. Gaunt Sloth can still rewrite and delete files in your ' +
|
|
363
|
+
'working folder without asking — "safe" means each action is checked for reaching outside ' +
|
|
364
|
+
'that folder or harming your system, not that nothing changes.',
|
|
365
|
+
auto: 'For recoverable work you want to keep moving: Auto sends a risky command back to the agent ' +
|
|
366
|
+
'to fix or justify a few times, then asks you. It is not safe — Gaunt Sloth will change and ' +
|
|
333
367
|
'delete things, your deny list still applies, and when it does ask, you are shown the whole ' +
|
|
334
368
|
'argument that led there.',
|
|
335
369
|
bypass: 'No gate, for a throwaway environment you would not mind losing. Whatever Gaunt Sloth decides ' +
|
|
@@ -407,7 +441,7 @@ export function isDeterministicRung(rung) {
|
|
|
407
441
|
* - At the two **deterministic** rungs, a tool is gated when the rung's own grant does not cover its
|
|
408
442
|
* access class ({@link isAccessClassGrantedAtRung}). At `manual` that leaves only the built-in
|
|
409
443
|
* READ tools free; at `write`, the built-in read and write tools. The write built-ins, the shell,
|
|
410
|
-
*
|
|
444
|
+
* MCP tools and custom/agent-authored tools all escalate to the human.
|
|
411
445
|
* - At `assisted`, `auto` and `bypass` nothing but the shell is gated. **That split is
|
|
412
446
|
* deliberate and load-bearing, not tidiness.** At a rated rung a gated non-shell call reaches the
|
|
413
447
|
* `subject.kind !== 'shell'` arm of `GthAgentRunner.decideToolApproval`, which floors it at
|
|
@@ -422,9 +456,9 @@ export function isDeterministicRung(rung) {
|
|
|
422
456
|
* a disabled shell tool is never bound, so the two agree.
|
|
423
457
|
*
|
|
424
458
|
* **This takes no bound toolset**, which is what lets `GthAgentRunner` ask it about a single
|
|
425
|
-
* arriving call: the runner sees the names the graph registered, and
|
|
426
|
-
*
|
|
427
|
-
*
|
|
459
|
+
* arriving call: the runner sees only the names the graph registered, and a graph builder that
|
|
460
|
+
* registers tools of its own leaves them off that list. A decision that consulted a bound list
|
|
461
|
+
* would grant such a tool at `manual` purely because the runner could not see it.
|
|
428
462
|
*/
|
|
429
463
|
export function isToolGatedAtRung(options) {
|
|
430
464
|
const { toolName, rung, gateShell } = options;
|
|
@@ -451,8 +485,8 @@ export function isToolGatedAtRung(options) {
|
|
|
451
485
|
* **Derived from the bound toolset, never a hand-written list.** A static list of built-ins would
|
|
452
486
|
* leave MCP, custom and agent-authored tools out — the exact tools with no access class and so the
|
|
453
487
|
* exact tools the deterministic rungs must escalate. `boundToolNames` must therefore be the FINAL
|
|
454
|
-
* toolset the graph is handed, including
|
|
455
|
-
*
|
|
488
|
+
* toolset the graph is handed, including any tool the graph builder registers itself, which by
|
|
489
|
+
* definition never appears in the array gsloth passes it.
|
|
456
490
|
*
|
|
457
491
|
* Order is stable: the shell first, then bound order. Duplicates are collapsed, so a caller may pass
|
|
458
492
|
* overlapping name sources without deduplicating first.
|
|
@@ -520,9 +554,8 @@ export function commandAnswersApprovals(command) {
|
|
|
520
554
|
* {@link APPROVAL_RUNGS}, which in practice is the shell plus every bound tool that is not a
|
|
521
555
|
* built-in READ tool.
|
|
522
556
|
*
|
|
523
|
-
* One derivation for
|
|
524
|
-
*
|
|
525
|
-
* same middleware through deepagents' `interruptOn`, and a set computed twice is a set that drifts.
|
|
557
|
+
* One derivation for every backend, for the same reason {@link resolveShellApprovalGate} is one: a
|
|
558
|
+
* set computed twice is a set that drifts.
|
|
526
559
|
*
|
|
527
560
|
* **Deliberately rung-independent.** The interrupt is installed once, when the agent is built, and
|
|
528
561
|
* `/approvals <rung>` then moves the rung for the rest of the session without rebuilding it. Only a
|
|
@@ -674,12 +707,12 @@ export function resolveApprovals(config, command) {
|
|
|
674
707
|
};
|
|
675
708
|
}
|
|
676
709
|
/**
|
|
677
|
-
* EXT-52 — the ONE shell approval-gate policy
|
|
678
|
-
* (`GthLangChainAgent` = lean/default
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
710
|
+
* EXT-52 — the ONE shell approval-gate policy every agent backend resolves
|
|
711
|
+
* (`GthLangChainAgent` = lean/default). It decides whether the opt-in `run_shell_command` tool is
|
|
712
|
+
* gated behind the per-command approval interrupt, and which status notice (if any) the backend
|
|
713
|
+
* should surface. A backend contributes only HOW it installs the interrupt; the policy and its
|
|
714
|
+
* user-facing copy live here so no two can drift (and so a later rename of this config surface has
|
|
715
|
+
* one place to change).
|
|
683
716
|
*
|
|
684
717
|
* CFG-27 — **the tool is gated whenever it is enabled, at every rung including `bypass`.** CFG-26
|
|
685
718
|
* used to leave it UNGATED under `bypass` outside interactive `code`, which the ladder cannot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-policy.js","sourceRoot":"","sources":["../../src/config/shell-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAmB,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAuE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,WAAW;IACX,iBAAiB;CACT,CAAC;AAEX,kDAAkD;AAClD,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,GAAG,sBAAsB,EAAE,eAAe,CAAC,CA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ACL,iFAAiF;oBACjF,uFAAuF;oBACvF,sBAAsB;aACzB;SACF,CAAC;IACJ,CAAC;IACD,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,2FAA2F;QAC3F,2FAA2F;QAC3F,0FAA0F;QAC1F,8FAA8F;QAC9F,8FAA8F;QAC9F,8FAA8F;QAC9F,sFAAsF;QACtF,OAAO;YACL,SAAS;YACT,MAAM,EAAE;gBACN,KAAK,EAAE,WAAW,CAAC,IAAI;gBACvB,OAAO,EACL,sEAAsE,IAAI,KAAK;oBAC/E,sEAAsE;aACzE;SACF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,SAAS;QACT,MAAM,EAAE;YACN,KAAK,EAAE,WAAW,CAAC,IAAI;YACvB,OAAO,EAAE,gFAAgF,IAAI,IAAI;SAClG;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -68,12 +68,12 @@ export declare const RUNG_TOOL_DESCRIPTION_SUFFIXES: Readonly<Record<ApprovalRun
|
|
|
68
68
|
*/
|
|
69
69
|
export type BuiltInToolAccess = 'read' | 'write';
|
|
70
70
|
/**
|
|
71
|
-
* Access class per built-in tool name.
|
|
72
|
-
* `GthFileSystemToolkit`
|
|
73
|
-
*
|
|
74
|
-
*
|
|
71
|
+
* Access class per built-in tool name. Keyed by NAME, not by owner, so it covers gsloth's own
|
|
72
|
+
* `GthFileSystemToolkit` and the conventional filesystem names (`ls`/`glob`/`grep`, and the
|
|
73
|
+
* `read_file`/`write_file`/`edit_file` the two conventions share) that a graph builder or an MCP
|
|
74
|
+
* server may register instead. One flat table serves them all.
|
|
75
75
|
*
|
|
76
|
-
* Deliberately absent: `run_shell_command`,
|
|
76
|
+
* Deliberately absent: `run_shell_command`, the fixed dev-command tools,
|
|
77
77
|
* `gth_web_fetch`, `gth_checklist`, `gth_status_update`, `show_a2ui_surface`, MCP/custom/A2A tools.
|
|
78
78
|
* None of them is "reading or writing files in the working folder", so none is granted by a rung's
|
|
79
79
|
* access class, and at `manual`/`write` every one of them escalates to the human.
|
|
@@ -126,7 +126,7 @@ export declare function getRungToolDescriptionSuffix(rung: ApprovalRung): string
|
|
|
126
126
|
* - `read` — granted at every rung (§2.1).
|
|
127
127
|
* - `write` — granted from `write` up (§2.2, and §2.3/§2.4 which grant "everything `write` grants"),
|
|
128
128
|
* so it escalates at `manual`.
|
|
129
|
-
* - **no class at all** — the shell,
|
|
129
|
+
* - **no class at all** — the shell, a network call, an MCP tool, a custom or
|
|
130
130
|
* agent-authored tool: granted by no rung. There is no implicit exemption; a tool is free here
|
|
131
131
|
* only by appearing in {@link BUILT_IN_TOOL_ACCESS}.
|
|
132
132
|
*
|
|
@@ -36,12 +36,12 @@ export const RUNG_TOOL_DESCRIPTION_SUFFIXES = {
|
|
|
36
36
|
/** The distinct suffix strings, for {@link stripRungToolDescriptionSuffix}'s idempotency check. */
|
|
37
37
|
const ALL_SUFFIXES = Array.from(new Set(Object.values(RUNG_TOOL_DESCRIPTION_SUFFIXES).filter((s) => s !== null)));
|
|
38
38
|
/**
|
|
39
|
-
* Access class per built-in tool name.
|
|
40
|
-
* `GthFileSystemToolkit`
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* Access class per built-in tool name. Keyed by NAME, not by owner, so it covers gsloth's own
|
|
40
|
+
* `GthFileSystemToolkit` and the conventional filesystem names (`ls`/`glob`/`grep`, and the
|
|
41
|
+
* `read_file`/`write_file`/`edit_file` the two conventions share) that a graph builder or an MCP
|
|
42
|
+
* server may register instead. One flat table serves them all.
|
|
43
43
|
*
|
|
44
|
-
* Deliberately absent: `run_shell_command`,
|
|
44
|
+
* Deliberately absent: `run_shell_command`, the fixed dev-command tools,
|
|
45
45
|
* `gth_web_fetch`, `gth_checklist`, `gth_status_update`, `show_a2ui_surface`, MCP/custom/A2A tools.
|
|
46
46
|
* None of them is "reading or writing files in the working folder", so none is granted by a rung's
|
|
47
47
|
* access class, and at `manual`/`write` every one of them escalates to the human.
|
|
@@ -68,7 +68,7 @@ export const BUILT_IN_TOOL_ACCESS = {
|
|
|
68
68
|
move_file: 'write',
|
|
69
69
|
delete_file: 'write',
|
|
70
70
|
delete_directory: 'write',
|
|
71
|
-
//
|
|
71
|
+
// Conventional filesystem read names not already listed above
|
|
72
72
|
ls: 'read',
|
|
73
73
|
glob: 'read',
|
|
74
74
|
grep: 'read',
|
|
@@ -136,7 +136,7 @@ export function getRungToolDescriptionSuffix(rung) {
|
|
|
136
136
|
* - `read` — granted at every rung (§2.1).
|
|
137
137
|
* - `write` — granted from `write` up (§2.2, and §2.3/§2.4 which grant "everything `write` grants"),
|
|
138
138
|
* so it escalates at `manual`.
|
|
139
|
-
* - **no class at all** — the shell,
|
|
139
|
+
* - **no class at all** — the shell, a network call, an MCP tool, a custom or
|
|
140
140
|
* agent-authored tool: granted by no rung. There is no implicit exemption; a tool is free here
|
|
141
141
|
* only by appearing in {@link BUILT_IN_TOOL_ACCESS}.
|
|
142
142
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-descriptions.js","sourceRoot":"","sources":["../../src/config/tool-descriptions.ts"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAkD;IAC3F,MAAM,EACJ,4FAA4F;QAC5F,yCAAyC;IAC3C,KAAK,EACH,4FAA4F;QAC5F,yCAAyC;IAC3C,QAAQ,EACN,+FAA+F;QAC/F,uEAAuE;IACzE,IAAI,EACF,gGAAgG;QAChG,uEAAuE;IACzE,MAAM,EAAE,IAAI;CACb,CAAC;AAEF,mGAAmG;AACnG,MAAM,YAAY,GAAsB,KAAK,CAAC,IAAI,CAChD,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAC9F,CAAC;AAUF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,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AAE,UAAU,CAAC;YAAE,SAAS;QACvD,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -71,10 +71,12 @@ export interface CommandToolingConfig {
|
|
|
71
71
|
binaryFormats?: false | BinaryFormatConfig[];
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* GS2-33 — one profile-backed subagent declaration. When the parent agent spawns this subagent
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
74
|
+
* GS2-33 — one profile-backed subagent declaration. When the parent agent spawns this subagent,
|
|
75
|
+
* the CHILD resolves the named config {@link profile} through the GS2-1 cascade, so it runs under
|
|
76
|
+
* THAT profile's model + tools + prompt (e.g. a cheap flash-lite profile for recall/search
|
|
77
|
+
* subagents while the parent runs on a strong model).
|
|
78
|
+
*
|
|
79
|
+
* No backend spawns subagents today — see the `subagents` field on {@link GthConfig}.
|
|
78
80
|
*
|
|
79
81
|
* The `profile` is a named profile block created by `gth config profile create <name>` — a
|
|
80
82
|
* `.gsloth/.gsloth-settings/<name>/` config dir, the same discovery convention `--profile` /
|
|
@@ -100,24 +102,19 @@ export interface GthConfig {
|
|
|
100
102
|
llm: BaseChatModel;
|
|
101
103
|
/**
|
|
102
104
|
* Selects the agent backend.
|
|
103
|
-
* - `lean` (default when omitted): the plain LangChain agent ({@link GthLangChainAgent}). It is
|
|
104
|
-
* given gsloth's full toolset (filesystem + hardened dev/shell + the `gth_checklist` planning
|
|
105
|
-
* tool), with no deepagents machinery (no `/large_tool_results` offload). This is the
|
|
106
|
-
* recommended backend and the default for the CLI (code/chat), single-shot (ask/exec), and
|
|
107
|
-
* the AG-UI/api server.
|
|
108
|
-
* - `deep` (**experimental**, opt-in): the deepagents runtime (subagents, `write_todos`,
|
|
109
|
-
* summarization, tool-result offload). Selecting it emits a warning. It can exhibit
|
|
110
|
-
* path-divergence and sporadic failures and carries extra internal workarounds; prefer `lean`.
|
|
111
105
|
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* and
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
106
|
+
* `lean` — the plain LangChain agent ({@link GthLangChainAgent}), given gsloth's full toolset
|
|
107
|
+
* (filesystem + hardened dev/shell + the `gth_checklist` planning tool) — is the only backend,
|
|
108
|
+
* and what runs when the key is omitted. Every command resolves the same one, so the key selects
|
|
109
|
+
* nothing today; it exists so a config can name what it runs on, and so a second backend has a
|
|
110
|
+
* name to arrive under.
|
|
111
|
+
*
|
|
112
|
+
* The retired `deep` value is a hard config error, not a coercion — see `RETIRED_AGENT_BACKENDS`
|
|
113
|
+
* in `config/schema.ts` for why substituting a different agent for the one a config named is the
|
|
114
|
+
* wrong kindness.
|
|
118
115
|
*/
|
|
119
116
|
agent?: {
|
|
120
|
-
backend?: '
|
|
117
|
+
backend?: 'lean';
|
|
121
118
|
};
|
|
122
119
|
/**
|
|
123
120
|
* GS2-7 (B20) — local, opt-in session history store. DEFAULT OFF (absent = disabled): a default
|
|
@@ -422,9 +419,10 @@ export interface GthConfig {
|
|
|
422
419
|
* stashed by the loader from the raw `llm.type` before the built `BaseChatModel` replaces the raw
|
|
423
420
|
* spec. INTERNAL (loader-set, never user-supplied), so it is deliberately absent from the config
|
|
424
421
|
* schema. {@link import('#src/utils/systemPromptNotes.js').resolveModelIdentity} PREFERS this over
|
|
425
|
-
* the live model's `_llmType()` for the injected identity, because
|
|
426
|
-
*
|
|
427
|
-
* otherwise mislabel the provider half. Absent for module
|
|
422
|
+
* the live model's `_llmType()` for the injected identity, because that is the model class's own
|
|
423
|
+
* label rather than the gth provider namespace (`huggingface` reports `openai`, and both Gemini
|
|
424
|
+
* providers report `google`) and would otherwise mislabel the provider half. Absent for module
|
|
425
|
+
* configs (which hand us an already-built
|
|
428
426
|
* LLM with no raw `type`), where resolution falls back to the guarded `_llmType()`.
|
|
429
427
|
*/
|
|
430
428
|
modelProviderType?: string;
|
|
@@ -455,12 +453,16 @@ export interface GthConfig {
|
|
|
455
453
|
redact?: boolean;
|
|
456
454
|
};
|
|
457
455
|
/**
|
|
458
|
-
* Transient (runtime-only) extra filesystem roots the agent
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
456
|
+
* Transient (runtime-only) extra filesystem roots the agent may read/write for THIS run, in
|
|
457
|
+
* addition to the cwd sandbox. Populated by `gth exec --allow-dir <path>` (repeatable); never
|
|
458
|
+
* persisted to a config file.
|
|
459
|
+
*
|
|
460
|
+
* **Currently inert.** The permission layer that widened the sandbox belonged to the deepagents
|
|
461
|
+
* backend; the filesystem toolkit the lean agent uses is rooted at the cwd and has no notion of
|
|
462
|
+
* extra roots. The field, the flag and the config merge policy are kept so a config and a script
|
|
463
|
+
* that already declare roots keep working when widening returns, and `gth exec` says plainly
|
|
464
|
+
* that the flag does nothing rather than announcing a widening that never happens — a warning
|
|
465
|
+
* about a guardrail that was not actually removed teaches the user to distrust the warnings.
|
|
464
466
|
*/
|
|
465
467
|
allowDirs?: string[];
|
|
466
468
|
/**
|
|
@@ -533,9 +535,10 @@ export interface GthConfig {
|
|
|
533
535
|
* GS2-33 — profile-backed subagents. Each entry names a subagent and the {@link
|
|
534
536
|
* SubagentProfileSpec.profile named config profile} the CHILD resolves when the parent spawns it,
|
|
535
537
|
* so a subagent can run under a different model/tools/prompt than the parent (a cheap profile for
|
|
536
|
-
* recall/search while the parent runs on a strong model).
|
|
537
|
-
*
|
|
538
|
-
*
|
|
538
|
+
* recall/search while the parent runs on a strong model). **Currently honored by nothing:** its
|
|
539
|
+
* only consumer was the deep (deepagents) backend, whose `task` tool gained one selectable
|
|
540
|
+
* subagent per entry, and that backend has been removed. The key is still accepted and warns on
|
|
541
|
+
* use; the lean backend's own subagent primitive lands in GS2-25.
|
|
539
542
|
*/
|
|
540
543
|
subagents?: SubagentProfileSpec[];
|
|
541
544
|
}
|
package/dist/config/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAusBA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,UAAU;IACV,WAAW;IACX,MAAM;IACN,UAAU;IACV,QAAQ;IACR,cAAc;IACd,KAAK;IACL,YAAY;IACZ,aAAa;IACb,QAAQ;CACA,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* - `config/loader.ts` — discovery + the layered load/merge pipeline.
|
|
17
17
|
* - `config/providerKeys.ts` — {@link MissingProviderKeyError}, the catchable error a load raises
|
|
18
18
|
* when a provider has no resolvable API key.
|
|
19
|
+
* - `config/configDiscovery.ts` — {@link ConfigDiscoveryError}, the catchable error a load raises
|
|
20
|
+
* when a named identity profile does not resolve or a config layer is malformed.
|
|
19
21
|
* - `config/schema.ts` — the Zod schema (single source of truth) + JSON-Schema generator.
|
|
20
22
|
* - `config/tool-descriptions.ts` — EXT-58: the rung-aware tool-description suffixes (§4.5) and
|
|
21
23
|
* the granted-built-in table the rater's alternative suggestion draws on (§4.4).
|
|
@@ -33,3 +35,4 @@ export * from '#src/config/defaults.js';
|
|
|
33
35
|
export * from '#src/config/loader.js';
|
|
34
36
|
export * from '#src/config/profiles.js';
|
|
35
37
|
export * from '#src/config/providerKeys.js';
|
|
38
|
+
export * from '#src/config/configDiscovery.js';
|
package/dist/config.js
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* - `config/loader.ts` — discovery + the layered load/merge pipeline.
|
|
17
17
|
* - `config/providerKeys.ts` — {@link MissingProviderKeyError}, the catchable error a load raises
|
|
18
18
|
* when a provider has no resolvable API key.
|
|
19
|
+
* - `config/configDiscovery.ts` — {@link ConfigDiscoveryError}, the catchable error a load raises
|
|
20
|
+
* when a named identity profile does not resolve or a config layer is malformed.
|
|
19
21
|
* - `config/schema.ts` — the Zod schema (single source of truth) + JSON-Schema generator.
|
|
20
22
|
* - `config/tool-descriptions.ts` — EXT-58: the rung-aware tool-description suffixes (§4.5) and
|
|
21
23
|
* the granted-built-in table the rater's alternative suggestion draws on (§4.4).
|
|
@@ -33,4 +35,5 @@ export * from '#src/config/defaults.js';
|
|
|
33
35
|
export * from '#src/config/loader.js';
|
|
34
36
|
export * from '#src/config/profiles.js';
|
|
35
37
|
export * from '#src/config/providerKeys.js';
|
|
38
|
+
export * from '#src/config/configDiscovery.js';
|
|
36
39
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC"}
|
|
@@ -11,15 +11,14 @@ import { type RefusalInfo } from '#src/core/refusal.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* Shared, graph-agnostic agent plumbing.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* build the compiled LangGraph in {@link init}; everything downstream — invoking,
|
|
14
|
+
* A backend differs from another only in how it builds the compiled LangGraph in {@link init} —
|
|
15
|
+
* today that is the lean {@link GthLangChainAgent} (`createAgent`, in core); everything downstream — invoking,
|
|
17
16
|
* streaming to the console, emitting typed {@link AgentStreamEvent}s, client-tool
|
|
18
17
|
* `interrupt()` stubbing, suspend/resume, and cleanup — is identical and lives here.
|
|
19
18
|
*
|
|
20
|
-
* The base operates solely on the structural {@link GthCompiledGraph} surface, so it
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* The base operates solely on the structural {@link GthCompiledGraph} surface, so it does NOT
|
|
20
|
+
* import a graph builder. Subclasses construct the graph and assign it to {@link agent} in their
|
|
21
|
+
* `init()`.
|
|
23
22
|
*/
|
|
24
23
|
export declare abstract class GthAbstractAgent implements GthAgentInterface {
|
|
25
24
|
protected statusUpdate: StatusUpdateCallback;
|
|
@@ -31,8 +30,8 @@ export declare abstract class GthAbstractAgent implements GthAgentInterface {
|
|
|
31
30
|
* Opt-in debug sink for the TUI `/debug` panel. Set AFTER {@link init} via
|
|
32
31
|
* `runner.getAgent()`; read lazily inside each backend's `wrapModelCall` capture middleware
|
|
33
32
|
* so that when it is `undefined` (the normal path) the middleware is a transparent
|
|
34
|
-
* pass-through. Lives on the base so
|
|
35
|
-
*
|
|
33
|
+
* pass-through. Lives on the base so every backend supports it; the AG-UI server / non-TUI
|
|
34
|
+
* callers simply never set it, so those contracts are unchanged.
|
|
36
35
|
*/
|
|
37
36
|
debugCapture: DebugCapture | undefined;
|
|
38
37
|
/**
|
|
@@ -113,9 +112,8 @@ export declare abstract class GthAbstractAgent implements GthAgentInterface {
|
|
|
113
112
|
* with what the gate will actually do is worse than no description at all".
|
|
114
113
|
*
|
|
115
114
|
* `additionalToolNames` covers tools the graph builder registers itself and that therefore never
|
|
116
|
-
* appear in `tools
|
|
117
|
-
* are
|
|
118
|
-
* rater's suggestion list reflects what the deep model actually has.
|
|
115
|
+
* appear in `tools`. Their descriptions are not ours to write, so they cannot be suffixed here;
|
|
116
|
+
* they are recorded only so the rater's suggestion list reflects what the model actually has.
|
|
119
117
|
*/
|
|
120
118
|
protected registerApprovalsAwareTools<T extends DescribableTool>(tools: T[], options: {
|
|
121
119
|
rung: ApprovalRung;
|
|
@@ -151,8 +149,8 @@ export declare abstract class GthAbstractAgent implements GthAgentInterface {
|
|
|
151
149
|
*/
|
|
152
150
|
private getStateMessageCount;
|
|
153
151
|
/**
|
|
154
|
-
* Build the underlying compiled graph and assign it to {@link agent}. This is the
|
|
155
|
-
*
|
|
152
|
+
* Build the underlying compiled graph and assign it to {@link agent}. This is the part a
|
|
153
|
+
* backend implements; everything else on the base is shared.
|
|
156
154
|
*/
|
|
157
155
|
abstract init(command: GthCommand | undefined, configIn: GthConfig, checkpointer?: BaseCheckpointSaver | undefined): Promise<void>;
|
|
158
156
|
/**
|
|
@@ -119,15 +119,14 @@ function pickReasoningDelta(kwargs) {
|
|
|
119
119
|
/**
|
|
120
120
|
* Shared, graph-agnostic agent plumbing.
|
|
121
121
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* build the compiled LangGraph in {@link init}; everything downstream — invoking,
|
|
122
|
+
* A backend differs from another only in how it builds the compiled LangGraph in {@link init} —
|
|
123
|
+
* today that is the lean {@link GthLangChainAgent} (`createAgent`, in core); everything downstream — invoking,
|
|
125
124
|
* streaming to the console, emitting typed {@link AgentStreamEvent}s, client-tool
|
|
126
125
|
* `interrupt()` stubbing, suspend/resume, and cleanup — is identical and lives here.
|
|
127
126
|
*
|
|
128
|
-
* The base operates solely on the structural {@link GthCompiledGraph} surface, so it
|
|
129
|
-
*
|
|
130
|
-
*
|
|
127
|
+
* The base operates solely on the structural {@link GthCompiledGraph} surface, so it does NOT
|
|
128
|
+
* import a graph builder. Subclasses construct the graph and assign it to {@link agent} in their
|
|
129
|
+
* `init()`.
|
|
131
130
|
*/
|
|
132
131
|
export class GthAbstractAgent {
|
|
133
132
|
statusUpdate;
|
|
@@ -139,8 +138,8 @@ export class GthAbstractAgent {
|
|
|
139
138
|
* Opt-in debug sink for the TUI `/debug` panel. Set AFTER {@link init} via
|
|
140
139
|
* `runner.getAgent()`; read lazily inside each backend's `wrapModelCall` capture middleware
|
|
141
140
|
* so that when it is `undefined` (the normal path) the middleware is a transparent
|
|
142
|
-
* pass-through. Lives on the base so
|
|
143
|
-
*
|
|
141
|
+
* pass-through. Lives on the base so every backend supports it; the AG-UI server / non-TUI
|
|
142
|
+
* callers simply never set it, so those contracts are unchanged.
|
|
144
143
|
*/
|
|
145
144
|
debugCapture;
|
|
146
145
|
/**
|
|
@@ -232,9 +231,8 @@ export class GthAbstractAgent {
|
|
|
232
231
|
* with what the gate will actually do is worse than no description at all".
|
|
233
232
|
*
|
|
234
233
|
* `additionalToolNames` covers tools the graph builder registers itself and that therefore never
|
|
235
|
-
* appear in `tools
|
|
236
|
-
* are
|
|
237
|
-
* rater's suggestion list reflects what the deep model actually has.
|
|
234
|
+
* appear in `tools`. Their descriptions are not ours to write, so they cannot be suffixed here;
|
|
235
|
+
* they are recorded only so the rater's suggestion list reflects what the model actually has.
|
|
238
236
|
*/
|
|
239
237
|
registerApprovalsAwareTools(tools, options) {
|
|
240
238
|
applyRungAwareToolDescriptions(tools, {
|