@gaunt-sloth/core 2.0.0-alpha.29 → 2.0.0-alpha.30
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/schema.d.ts +48 -48
- package/dist/config/schema.js +55 -29
- package/dist/config/schema.js.map +1 -1
- package/dist/config/shell-policy.d.ts +241 -26
- package/dist/config/shell-policy.js +353 -52
- package/dist/config/shell-policy.js.map +1 -1
- package/dist/config/tool-descriptions.d.ts +78 -32
- package/dist/config/tool-descriptions.js +72 -29
- package/dist/config/tool-descriptions.js.map +1 -1
- package/dist/config/types.d.ts +9 -4
- package/dist/config/types.js.map +1 -1
- package/dist/core/GthAbstractAgent.d.ts +13 -5
- package/dist/core/GthAbstractAgent.js +42 -13
- package/dist/core/GthAbstractAgent.js.map +1 -1
- package/dist/core/GthAgentRunner.d.ts +203 -9
- package/dist/core/GthAgentRunner.js +646 -39
- package/dist/core/GthAgentRunner.js.map +1 -1
- package/dist/core/GthLangChainAgent.js +58 -17
- package/dist/core/GthLangChainAgent.js.map +1 -1
- package/dist/core/reasoningBlocks.d.ts +60 -0
- package/dist/core/reasoningBlocks.js +98 -0
- package/dist/core/reasoningBlocks.js.map +1 -0
- package/dist/core/refusal.js +6 -2
- package/dist/core/refusal.js.map +1 -1
- package/dist/core/shell/approvalCapture.d.ts +271 -0
- package/dist/core/shell/approvalCapture.js +108 -0
- package/dist/core/shell/approvalCapture.js.map +1 -0
- package/dist/core/shell/approvalStop.d.ts +16 -7
- package/dist/core/shell/approvalStop.js +18 -7
- package/dist/core/shell/approvalStop.js.map +1 -1
- package/dist/core/shell/escalationSeverity.d.ts +141 -0
- package/dist/core/shell/escalationSeverity.js +89 -0
- package/dist/core/shell/escalationSeverity.js.map +1 -0
- package/dist/core/shell/framing.d.ts +190 -0
- package/dist/core/shell/framing.js +633 -0
- package/dist/core/shell/framing.js.map +1 -0
- package/dist/core/shell/hardline.d.ts +81 -0
- package/dist/core/shell/hardline.js +607 -0
- package/dist/core/shell/hardline.js.map +1 -0
- package/dist/core/shell/negotiation.d.ts +249 -0
- package/dist/core/shell/negotiation.js +355 -0
- package/dist/core/shell/negotiation.js.map +1 -0
- package/dist/core/shell/normalize.d.ts +5 -5
- package/dist/core/shell/normalize.js +5 -5
- package/dist/core/shell/rater.d.ts +353 -18
- package/dist/core/shell/rater.js +556 -39
- package/dist/core/shell/rater.js.map +1 -1
- package/dist/core/shell/rejection.d.ts +1 -1
- package/dist/core/types.d.ts +97 -4
- package/dist/providers/geminiThinking.d.ts +52 -0
- package/dist/providers/geminiThinking.js +72 -0
- package/dist/providers/geminiThinking.js.map +1 -0
- package/dist/providers/google-genai.js +4 -1
- package/dist/providers/google-genai.js.map +1 -1
- package/dist/providers/vertexai.js +4 -1
- package/dist/providers/vertexai.js.map +1 -1
- package/dist/runtime/askStructured.d.ts +45 -3
- package/dist/runtime/askStructured.js +46 -5
- package/dist/runtime/askStructured.js.map +1 -1
- package/dist/runtime/conversation.d.ts +2 -1
- package/dist/runtime/conversation.js +2 -1
- package/dist/runtime/conversation.js.map +1 -1
- package/dist/runtime/singleShot.d.ts +3 -2
- package/dist/runtime/singleShot.js +3 -2
- package/dist/runtime/singleShot.js.map +1 -1
- package/dist/utils/debugDump.d.ts +19 -0
- package/dist/utils/debugDump.js +11 -0
- package/dist/utils/debugDump.js.map +1 -1
- package/dist/utils/displayWidth.d.ts +23 -0
- package/dist/utils/displayWidth.js +61 -6
- package/dist/utils/displayWidth.js.map +1 -1
- package/dist/utils/systemPromptNotes.d.ts +12 -1
- package/dist/utils/systemPromptNotes.js +24 -2
- package/dist/utils/systemPromptNotes.js.map +1 -1
- package/package.json +1 -1
- package/schema/gsloth-config.schema.json +48 -48
|
@@ -21,8 +21,9 @@ import { getProjectDir } from '#src/utils/systemUtils.js';
|
|
|
21
21
|
* @param resolvers - Optional agent resolvers (tools/middleware)
|
|
22
22
|
* @param command - The originating command (defaults to `ask`); selects the agent mode prompt
|
|
23
23
|
* @param agentFactory - Optional backend factory (B5). When omitted the runner uses its built-in
|
|
24
|
-
* lean {@link GthLangChainAgent} default
|
|
25
|
-
*
|
|
24
|
+
* lean {@link GthLangChainAgent} default and warns if `agent.backend` asked for `deep`, since
|
|
25
|
+
* omitting it opts the run out of that key. The app layer passes
|
|
26
|
+
* `resolveAgentFactory(config, 'lean')` so an explicit `agent.backend` is honored.
|
|
26
27
|
* @returns A {@link SingleShotResult}: `ok` is `true` when the run completed without error, `false`
|
|
27
28
|
* when it failed (so callers such as `exec` can set a non-zero exit code); `answer`/`tokensInput`/
|
|
28
29
|
* `tokensOutput`/`tools` carry the SUT's answer text and run stats for callers that need them
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleShot.js","sourceRoot":"","sources":["../../src/runtime/singleShot.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAe1D
|
|
1
|
+
{"version":3,"file":"singleShot.js","sourceRoot":"","sources":["../../src/runtime/singleShot.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBA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7D,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;SACnC,CAAC,CAAC;QAEH,iBAAiB,EAAE,IAAI,EAAE,CAAC;QAE1B,IAAI,MAAM,CAAC,iBAAiB,KAAK,KAAK,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,yEAAyE;QAC1F,CAAC;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC;gBACH,eAAe,EAAE,CAAC;gBAClB,kBAAkB,EAAE,CAAC;gBACrB,cAAc,CAAC,mCAAmC,QAAQ,EAAE,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,YAAY,CAAC,mCAAmC,QAAQ,EAAE,CAAC,CAAC;gBAC5D,YAAY,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;QAED,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9D,CAAC;YAAS,CAAC;QACT,+FAA+F;QAC/F,2FAA2F;QAC3F,2FAA2F;QAC3F,+FAA+F;QAC/F,wFAAwF;QACxF,uEAAuE;QACvE,iBAAiB,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LastModelRequest } from '#src/core/debugCapture.js';
|
|
2
|
+
import type { ApprovalDecisionCapture } from '#src/core/shell/approvalCapture.js';
|
|
2
3
|
/**
|
|
3
4
|
* GS2-46/GS2-47 — `/debug-dump`: a live-session diagnostic archive. GS2-46 shipped it raw; GS2-47
|
|
4
5
|
* adds a shared secret-redaction pass ({@link file://./redactSecrets.ts}) that is ON BY DEFAULT and
|
|
@@ -38,6 +39,24 @@ export interface WriteDebugDumpInput {
|
|
|
38
39
|
* files are simply omitted.
|
|
39
40
|
*/
|
|
40
41
|
modelRequest?: LastModelRequest;
|
|
42
|
+
/**
|
|
43
|
+
* [[TUI-C27]] — the approvals gate's own record of every gated decision this session made:
|
|
44
|
+
* **what the rater was SHOWN and what it ANSWERED**, on the approving branch as much as the
|
|
45
|
+
* rejecting one, plus which stage of the gate decided.
|
|
46
|
+
*
|
|
47
|
+
* Threaded straight from `runner.getApprovalCaptures()` by the caller, exactly as
|
|
48
|
+
* {@link modelRequest} is threaded from the agent. ADDITIVE & optional: present and non-empty ⇒
|
|
49
|
+
* `approvals.json`; absent or empty ⇒ the file is simply omitted (a session that gated nothing
|
|
50
|
+
* has nothing to say about it).
|
|
51
|
+
*
|
|
52
|
+
* It goes through the same {@link renderStructured} pass as `transcript.json` and
|
|
53
|
+
* `model-messages.json` — the [[GS2-47]]/[[GS2-54]] literal + pattern redaction over the secret
|
|
54
|
+
* values {@link collectSecretValues} harvested from env and config. That is deliberate reuse
|
|
55
|
+
* rather than a policy of its own: the captured rating prompt carries the user's own last five
|
|
56
|
+
* messages verbatim plus the command, so it is at least as sensitive as the transcript, and a
|
|
57
|
+
* second redaction policy for one artifact is how two policies come to disagree.
|
|
58
|
+
*/
|
|
59
|
+
approvals?: readonly ApprovalDecisionCapture[];
|
|
41
60
|
}
|
|
42
61
|
export interface WriteDebugDumpResult {
|
|
43
62
|
/** The absolute path to the archive directory just written. */
|
package/dist/utils/debugDump.js
CHANGED
|
@@ -250,6 +250,17 @@ export function writeDebugDump(input) {
|
|
|
250
250
|
// artifact from transcript.json (the conversation view): the two are distinct arrays.
|
|
251
251
|
writeFileSync(resolve(archiveDir, 'model-messages.json'), renderStructured(input.modelRequest.messages ?? [], redact, secrets), 'utf8');
|
|
252
252
|
}
|
|
253
|
+
// [[TUI-C27]] — approvals.json: the gate's own record of every gated decision, INCLUDING the
|
|
254
|
+
// approving branch, which previously left no trace anywhere in this archive. Each entry carries
|
|
255
|
+
// the exact prompt the rater was sent and its raw answer, so a reader can state what the rater was
|
|
256
|
+
// shown as well as what it said — specifically whether the user's own messages were in its view at
|
|
257
|
+
// round N, which is the first question anyone asks of a negotiation and the one no artifact here
|
|
258
|
+
// could answer. Same `renderStructured` pass as transcript.json (see `WriteDebugDumpInput`).
|
|
259
|
+
// Written only when there is something to write, so a session that gated nothing omits the file
|
|
260
|
+
// rather than shipping an empty array that reads as "the gate recorded nothing".
|
|
261
|
+
if (input.approvals && input.approvals.length > 0) {
|
|
262
|
+
writeFileSync(resolve(archiveDir, 'approvals.json'), renderStructured(input.approvals, redact, secrets), 'utf8');
|
|
263
|
+
}
|
|
253
264
|
// getSlothVersion() reads the installed package.json via the install dir set at CLI startup
|
|
254
265
|
// (setEntryPoint); guarded so a dump can never fail just because that wasn't wired (e.g. an
|
|
255
266
|
// unusual embedding), falling back to 'unknown'.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugDump.js","sourceRoot":"","sources":["../../src/utils/debugDump.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,WAAW,GACZ,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"debugDump.js","sourceRoot":"","sources":["../../src/utils/debugDump.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,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AW,EAAE;QACnC,oFAAoF;QACpF,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC;QAClC,GAAG,EAAE;YACH,UAAU;YACV,WAAW,EAAE,OAAO,CAAC,OAAO;YAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,KAAK,CAAC,gBAAgB,IAAI,SAAS;SAC3C;QACD,yFAAyF;QACzF,0FAA0F;QAC1F,yFAAyF;QACzF,MAAM,EAAE,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI;QACzD,YAAY,EAAE,iBAAiB,EAAE,CAAC,KAAK,CAAC,CAAC,0BAA0B,CAAC;QACpE,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,IAAI;KAC7C,CAAC;IAEF,sFAAsF;IACtF,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAClD,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAEhF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -5,6 +5,23 @@
|
|
|
5
5
|
* slices below do not share that awareness, so do not read this as a licence to feed them one.
|
|
6
6
|
*/
|
|
7
7
|
export declare function displayWidth(text: string): number;
|
|
8
|
+
/**
|
|
9
|
+
* Terminal columns `text` occupies **at most** — the same measurement as {@link displayWidth} but
|
|
10
|
+
* counting East-Asian Ambiguous characters as two columns rather than one, which is the widest any
|
|
11
|
+
* terminal will render them.
|
|
12
|
+
*
|
|
13
|
+
* For a budget that must hold on a terminal whose ambiguous-width policy is unknown, this is the
|
|
14
|
+
* only sound ruler: it is the supremum over the policies a terminal can be configured with, so a
|
|
15
|
+
* string that fits under it fits under all of them. See the module docblock for when to reach for
|
|
16
|
+
* this rather than {@link displayWidth}.
|
|
17
|
+
*/
|
|
18
|
+
export declare function maxDisplayWidth(text: string): number;
|
|
19
|
+
/**
|
|
20
|
+
* The first grapheme cluster of `text`, or `''` when it is empty — i.e. the smallest piece a cut
|
|
21
|
+
* can leave behind, for a caller that has to make progress through a string one drawable glyph at
|
|
22
|
+
* a time.
|
|
23
|
+
*/
|
|
24
|
+
export declare function firstCluster(text: string): string;
|
|
8
25
|
/**
|
|
9
26
|
* The longest LEADING run of whole clusters whose total width is at most `maxWidth` — i.e. keep
|
|
10
27
|
* the head, lose the tail. Total (never throws): a non-positive `maxWidth` yields `''`.
|
|
@@ -18,6 +35,12 @@ export declare function displayWidth(text: string): number;
|
|
|
18
35
|
* line, which is unbounded.
|
|
19
36
|
*/
|
|
20
37
|
export declare function sliceToWidth(text: string, maxWidth: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* {@link sliceToWidth} measured by {@link maxDisplayWidth} — the head that fits the budget on any
|
|
40
|
+
* terminal, whatever it does with Ambiguous characters. The cut for a budget that must hold rather
|
|
41
|
+
* than merely look right.
|
|
42
|
+
*/
|
|
43
|
+
export declare function sliceToMaxWidth(text: string, maxWidth: number): string;
|
|
21
44
|
/**
|
|
22
45
|
* The longest TRAILING run of whole clusters whose total width is at most `maxWidth` — i.e. keep
|
|
23
46
|
* the tail, lose the head. The mirror of {@link sliceToWidth}, for values whose end is the
|
|
@@ -42,14 +42,29 @@
|
|
|
42
42
|
* first, because there the two rulers disagree and a coloured string that MEASURES as fitting must
|
|
43
43
|
* be handed back whole rather than cut short by the bytes of its own escapes.
|
|
44
44
|
*
|
|
45
|
-
* ## Why ambiguous-width characters stay NARROW
|
|
45
|
+
* ## Why ambiguous-width characters stay NARROW — and the one place they must not
|
|
46
46
|
*
|
|
47
47
|
* `string-width` defaults to treating East-Asian "Ambiguous" characters as one column, and that
|
|
48
48
|
* default is load-bearing here rather than incidental: the sloth face is block elements, the
|
|
49
49
|
* wordmark is box-drawing, and `…` is U+2026 — all Ambiguous. Counting them as two columns would
|
|
50
|
-
* measure the 16-column face at 32 and shatter the layout it anchors.
|
|
51
|
-
*
|
|
52
|
-
* that policy fails loudly instead of quietly doubling the art.
|
|
50
|
+
* measure the 16-column face at 32 and shatter the layout it anchors. So {@link displayWidth} and
|
|
51
|
+
* {@link sliceToWidth} keep the default, and the specs pin the face at 16 and the wordmark at 19 so
|
|
52
|
+
* a change of that policy fails loudly instead of quietly doubling the art.
|
|
53
|
+
*
|
|
54
|
+
* That default is an **assumption about the reader's terminal**, and it is one this process cannot
|
|
55
|
+
* check: an Ambiguous character occupies one cell or two depending on how the terminal is
|
|
56
|
+
* configured, and several CJK locales — plus an option in xterm, urxvt and mlterm — choose two.
|
|
57
|
+
* For layout art that assumption is free, because being wrong only makes the art look wrong.
|
|
58
|
+
*
|
|
59
|
+
* It is **not** free where a budget is a security boundary. {@link maxDisplayWidth} and
|
|
60
|
+
* {@link sliceToMaxWidth} are the sanctioned exception: they measure Ambiguous as **two** columns,
|
|
61
|
+
* i.e. the widest a terminal can render the string, so text fitted with them fits under *either*
|
|
62
|
+
* policy. Use them wherever a row that overruns its budget would be wrapped by the terminal into a
|
|
63
|
+
* consequence rather than into an untidy screen — `core/shell/framing` frames untrusted text this
|
|
64
|
+
* way, because there a wrapped continuation line starts at column 0 and can forge a dialog's chrome.
|
|
65
|
+
* The cost is under-fill: on a terminal that does render Ambiguous narrow, such a row can stop short
|
|
66
|
+
* of its budget. Under-fill is cosmetic; overrun is not. True Wide characters (CJK ideographs,
|
|
67
|
+
* emoji, fullwidth forms) measure 2 under both, so the common CJK case is unaffected either way.
|
|
53
68
|
*/
|
|
54
69
|
import stringWidth from 'string-width';
|
|
55
70
|
/**
|
|
@@ -66,6 +81,29 @@ const GRAPHEME_SEGMENTER = new Intl.Segmenter(undefined, { granularity: 'graphem
|
|
|
66
81
|
export function displayWidth(text) {
|
|
67
82
|
return stringWidth(text);
|
|
68
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Terminal columns `text` occupies **at most** — the same measurement as {@link displayWidth} but
|
|
86
|
+
* counting East-Asian Ambiguous characters as two columns rather than one, which is the widest any
|
|
87
|
+
* terminal will render them.
|
|
88
|
+
*
|
|
89
|
+
* For a budget that must hold on a terminal whose ambiguous-width policy is unknown, this is the
|
|
90
|
+
* only sound ruler: it is the supremum over the policies a terminal can be configured with, so a
|
|
91
|
+
* string that fits under it fits under all of them. See the module docblock for when to reach for
|
|
92
|
+
* this rather than {@link displayWidth}.
|
|
93
|
+
*/
|
|
94
|
+
export function maxDisplayWidth(text) {
|
|
95
|
+
return stringWidth(text, { ambiguousIsNarrow: false });
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The first grapheme cluster of `text`, or `''` when it is empty — i.e. the smallest piece a cut
|
|
99
|
+
* can leave behind, for a caller that has to make progress through a string one drawable glyph at
|
|
100
|
+
* a time.
|
|
101
|
+
*/
|
|
102
|
+
export function firstCluster(text) {
|
|
103
|
+
for (const { segment } of GRAPHEME_SEGMENTER.segment(text))
|
|
104
|
+
return segment;
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
69
107
|
/** The clusters of `text`, in order — the only unit either slice is allowed to cut between. */
|
|
70
108
|
function clusters(text) {
|
|
71
109
|
const out = [];
|
|
@@ -96,14 +134,31 @@ function needsWholeStringMeasure(text) {
|
|
|
96
134
|
* line, which is unbounded.
|
|
97
135
|
*/
|
|
98
136
|
export function sliceToWidth(text, maxWidth) {
|
|
137
|
+
return sliceHeadToWidth(text, maxWidth, displayWidth);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* {@link sliceToWidth} measured by {@link maxDisplayWidth} — the head that fits the budget on any
|
|
141
|
+
* terminal, whatever it does with Ambiguous characters. The cut for a budget that must hold rather
|
|
142
|
+
* than merely look right.
|
|
143
|
+
*/
|
|
144
|
+
export function sliceToMaxWidth(text, maxWidth) {
|
|
145
|
+
return sliceHeadToWidth(text, maxWidth, maxDisplayWidth);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The head-slice both public cuts are made of, given the ruler to measure with. The ruler is passed
|
|
149
|
+
* rather than chosen here so the whole-string shortcut and the cluster walk can never end up on
|
|
150
|
+
* different ones — measuring the shortcut narrow and the walk wide would hand back a string that
|
|
151
|
+
* overruns the very budget the caller asked to be held to.
|
|
152
|
+
*/
|
|
153
|
+
function sliceHeadToWidth(text, maxWidth, measure) {
|
|
99
154
|
if (maxWidth <= 0)
|
|
100
155
|
return '';
|
|
101
|
-
if (needsWholeStringMeasure(text) &&
|
|
156
|
+
if (needsWholeStringMeasure(text) && measure(text) <= maxWidth)
|
|
102
157
|
return text;
|
|
103
158
|
let width = 0;
|
|
104
159
|
let kept = '';
|
|
105
160
|
for (const { segment } of GRAPHEME_SEGMENTER.segment(text)) {
|
|
106
|
-
const clusterWidth =
|
|
161
|
+
const clusterWidth = measure(segment);
|
|
107
162
|
if (width + clusterWidth > maxWidth)
|
|
108
163
|
break;
|
|
109
164
|
width += clusterWidth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayWidth.js","sourceRoot":"","sources":["../../src/utils/displayWidth.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"displayWidth.js","sourceRoot":"","sources":["../../src/utils/displayWidth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,K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G,EAAE,CAAC;IACd,KAAK,MAAM,EAAE,OAAO,EAAE,IAAI,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3D,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,KAAK,GAAG,YAAY,GAAG,QAAQ;YAAE,MAAM;QAC3C,KAAK,IAAI,YAAY,CAAC;QACtB,IAAI,IAAI,OAAO,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,QAAgB;IAC5D,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC7B,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,QAAQ;QAAE,OAAO,IAAI,CAAC;IACjF,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9C,IAAI,KAAK,GAAG,YAAY,GAAG,QAAQ;YAAE,MAAM;QAC3C,KAAK,IAAI,YAAY,CAAC;QACtB,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -66,7 +66,8 @@ export interface CommitCoAuthor {
|
|
|
66
66
|
*
|
|
67
67
|
* Gaunt Sloth has **no dedicated git-commit tool** — the agent commits by calling
|
|
68
68
|
* `run_shell_command` with `git commit`, composing the message (including any trailer) itself. That
|
|
69
|
-
* leaves
|
|
69
|
+
* leaves three things it must be told, and all three live here because all three are about
|
|
70
|
+
* committing:
|
|
70
71
|
*
|
|
71
72
|
* 1. **WHO the co-author is.** Left unguided, models emit their own model name from trained habit,
|
|
72
73
|
* which is factually wrong: the commit was produced by *Gaunt Sloth*, not by the model. The note
|
|
@@ -81,6 +82,16 @@ export interface CommitCoAuthor {
|
|
|
81
82
|
* than merely forbidding the construct — naming a construct without its mechanism has been
|
|
82
83
|
* measured not to work. A file path carries no shell metacharacters, so the file form removes the
|
|
83
84
|
* failure mode instead of asking the model to avoid it.
|
|
85
|
+
* 3. **HOW the change is staged.** Rule 2 leaves the message file untracked in the working tree at
|
|
86
|
+
* `git add` time, so an unscoped `git add -A` / `git add .` / `git commit -a` sweeps it into the
|
|
87
|
+
* commit and onto the pull request. The note states that mechanism, steers staging to named
|
|
88
|
+
* paths, and allows the last resort for a change too large to enumerate only once the message
|
|
89
|
+
* file is out of the tree — an escape hatch that kept the file would reintroduce exactly the
|
|
90
|
+
* defect the rule closes. It binds at `git add` time, MID-flow while the model is still acting,
|
|
91
|
+
* because the tidy-up step at the end is the one that gets dropped. The scratchpad sentence
|
|
92
|
+
* beside it names NO path: the write tool refuses any path outside the working folder at every
|
|
93
|
+
* approval mode, so naming one buys a refused call. EXT-97 is the interim mitigation; the
|
|
94
|
+
* mechanism that owns the file end to end is EXT-93.
|
|
84
95
|
*
|
|
85
96
|
* **The clause that names the writing tool is gated on `filesystem`** (EXT-84), through the one
|
|
86
97
|
* shared derivation {@link isWriteFileToolRegistered} — the same interpretation that decides which
|
|
@@ -90,7 +90,8 @@ export function appendCwdNote(systemPrompt, cwd) {
|
|
|
90
90
|
*
|
|
91
91
|
* Gaunt Sloth has **no dedicated git-commit tool** — the agent commits by calling
|
|
92
92
|
* `run_shell_command` with `git commit`, composing the message (including any trailer) itself. That
|
|
93
|
-
* leaves
|
|
93
|
+
* leaves three things it must be told, and all three live here because all three are about
|
|
94
|
+
* committing:
|
|
94
95
|
*
|
|
95
96
|
* 1. **WHO the co-author is.** Left unguided, models emit their own model name from trained habit,
|
|
96
97
|
* which is factually wrong: the commit was produced by *Gaunt Sloth*, not by the model. The note
|
|
@@ -105,6 +106,16 @@ export function appendCwdNote(systemPrompt, cwd) {
|
|
|
105
106
|
* than merely forbidding the construct — naming a construct without its mechanism has been
|
|
106
107
|
* measured not to work. A file path carries no shell metacharacters, so the file form removes the
|
|
107
108
|
* failure mode instead of asking the model to avoid it.
|
|
109
|
+
* 3. **HOW the change is staged.** Rule 2 leaves the message file untracked in the working tree at
|
|
110
|
+
* `git add` time, so an unscoped `git add -A` / `git add .` / `git commit -a` sweeps it into the
|
|
111
|
+
* commit and onto the pull request. The note states that mechanism, steers staging to named
|
|
112
|
+
* paths, and allows the last resort for a change too large to enumerate only once the message
|
|
113
|
+
* file is out of the tree — an escape hatch that kept the file would reintroduce exactly the
|
|
114
|
+
* defect the rule closes. It binds at `git add` time, MID-flow while the model is still acting,
|
|
115
|
+
* because the tidy-up step at the end is the one that gets dropped. The scratchpad sentence
|
|
116
|
+
* beside it names NO path: the write tool refuses any path outside the working folder at every
|
|
117
|
+
* approval mode, so naming one buys a refused call. EXT-97 is the interim mitigation; the
|
|
118
|
+
* mechanism that owns the file end to end is EXT-93.
|
|
108
119
|
*
|
|
109
120
|
* **The clause that names the writing tool is gated on `filesystem`** (EXT-84), through the one
|
|
110
121
|
* shared derivation {@link isWriteFileToolRegistered} — the same interpretation that decides which
|
|
@@ -164,7 +175,18 @@ export function appendCommitCoAuthorNote(systemPrompt, coAuthor, modelIdentity,
|
|
|
164
175
|
'commands, backticks and markup out of it.\n' +
|
|
165
176
|
'Never pass a commit message inline with the -m option: inside double quotes a POSIX shell ' +
|
|
166
177
|
'expands backtick and dollar-parenthesis constructs before git ever runs, so a message that ' +
|
|
167
|
-
`quotes code is executed as a command. ${messageFileRule}
|
|
178
|
+
`quotes code is executed as a command. ${messageFileRule}\n` +
|
|
179
|
+
// EXT-97 — universal, so composed OUTSIDE the `filesystem` ternary above: it is about WHERE the
|
|
180
|
+
// file goes and HOW the change is staged, not about which tool writes it.
|
|
181
|
+
'If this session has given you a scratchpad location, write that message file there instead ' +
|
|
182
|
+
'of into the project.\n' +
|
|
183
|
+
'Stage the files you changed by naming their paths, one git add per path or several paths in ' +
|
|
184
|
+
'one git add. Do not stage with git add -A, git add . or git commit -a: an unscoped add ' +
|
|
185
|
+
'stages every untracked file in the working tree, including the commit message file you just ' +
|
|
186
|
+
'wrote, so it lands in the commit and on the pull request. Never stage the commit message ' +
|
|
187
|
+
'file itself. Only when a change genuinely touches too many files to name is an unscoped add ' +
|
|
188
|
+
'acceptable, and then first move the commit message file out of the working tree or delete ' +
|
|
189
|
+
'it, and check with git status what else the add is about to sweep in.';
|
|
168
190
|
return systemPrompt ? `${systemPrompt}\n\n${note}` : note;
|
|
169
191
|
}
|
|
170
192
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemPromptNotes.js","sourceRoot":"","sources":["../../src/utils/systemPromptNotes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GAErB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,aAAa,GACd,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,4FAA4F;IAC5F,wFAAwF;IACxF,2DAA2D,CAAC;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,iBAAiB,CAAC,YAAgC;IAChE,IAAI,IAAY,CAAC;IACjB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,IAAI;YACF,sFAAsF;gBACtF,qFAAqF;gBACrF,uFAAuF;gBACvF,4FAA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
|
406
406
|
"write",
|
|
407
|
-
"
|
|
408
|
-
"
|
|
407
|
+
"assisted",
|
|
408
|
+
"auto",
|
|
409
409
|
"bypass"
|
|
410
410
|
]
|
|
411
411
|
},
|
|
@@ -415,10 +415,10 @@
|
|
|
415
415
|
"mode": {
|
|
416
416
|
"type": "string",
|
|
417
417
|
"enum": [
|
|
418
|
-
"
|
|
418
|
+
"manual",
|
|
419
419
|
"write",
|
|
420
|
-
"
|
|
421
|
-
"
|
|
420
|
+
"assisted",
|
|
421
|
+
"auto",
|
|
422
422
|
"bypass"
|
|
423
423
|
]
|
|
424
424
|
},
|
|
@@ -748,10 +748,10 @@
|
|
|
748
748
|
{
|
|
749
749
|
"type": "string",
|
|
750
750
|
"enum": [
|
|
751
|
-
"
|
|
751
|
+
"manual",
|
|
752
752
|
"write",
|
|
753
|
-
"
|
|
754
|
-
"
|
|
753
|
+
"assisted",
|
|
754
|
+
"auto",
|
|
755
755
|
"bypass"
|
|
756
756
|
]
|
|
757
757
|
},
|
|
@@ -761,10 +761,10 @@
|
|
|
761
761
|
"mode": {
|
|
762
762
|
"type": "string",
|
|
763
763
|
"enum": [
|
|
764
|
-
"
|
|
764
|
+
"manual",
|
|
765
765
|
"write",
|
|
766
|
-
"
|
|
767
|
-
"
|
|
766
|
+
"assisted",
|
|
767
|
+
"auto",
|
|
768
768
|
"bypass"
|
|
769
769
|
]
|
|
770
770
|
},
|
|
@@ -1066,10 +1066,10 @@
|
|
|
1066
1066
|
{
|
|
1067
1067
|
"type": "string",
|
|
1068
1068
|
"enum": [
|
|
1069
|
-
"
|
|
1069
|
+
"manual",
|
|
1070
1070
|
"write",
|
|
1071
|
-
"
|
|
1072
|
-
"
|
|
1071
|
+
"assisted",
|
|
1072
|
+
"auto",
|
|
1073
1073
|
"bypass"
|
|
1074
1074
|
]
|
|
1075
1075
|
},
|
|
@@ -1079,10 +1079,10 @@
|
|
|
1079
1079
|
"mode": {
|
|
1080
1080
|
"type": "string",
|
|
1081
1081
|
"enum": [
|
|
1082
|
-
"
|
|
1082
|
+
"manual",
|
|
1083
1083
|
"write",
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1084
|
+
"assisted",
|
|
1085
|
+
"auto",
|
|
1086
1086
|
"bypass"
|
|
1087
1087
|
]
|
|
1088
1088
|
},
|
|
@@ -1375,10 +1375,10 @@
|
|
|
1375
1375
|
{
|
|
1376
1376
|
"type": "string",
|
|
1377
1377
|
"enum": [
|
|
1378
|
-
"
|
|
1378
|
+
"manual",
|
|
1379
1379
|
"write",
|
|
1380
|
-
"
|
|
1381
|
-
"
|
|
1380
|
+
"assisted",
|
|
1381
|
+
"auto",
|
|
1382
1382
|
"bypass"
|
|
1383
1383
|
]
|
|
1384
1384
|
},
|
|
@@ -1388,10 +1388,10 @@
|
|
|
1388
1388
|
"mode": {
|
|
1389
1389
|
"type": "string",
|
|
1390
1390
|
"enum": [
|
|
1391
|
-
"
|
|
1391
|
+
"manual",
|
|
1392
1392
|
"write",
|
|
1393
|
-
"
|
|
1394
|
-
"
|
|
1393
|
+
"assisted",
|
|
1394
|
+
"auto",
|
|
1395
1395
|
"bypass"
|
|
1396
1396
|
]
|
|
1397
1397
|
},
|
|
@@ -1664,10 +1664,10 @@
|
|
|
1664
1664
|
{
|
|
1665
1665
|
"type": "string",
|
|
1666
1666
|
"enum": [
|
|
1667
|
-
"
|
|
1667
|
+
"manual",
|
|
1668
1668
|
"write",
|
|
1669
|
-
"
|
|
1670
|
-
"
|
|
1669
|
+
"assisted",
|
|
1670
|
+
"auto",
|
|
1671
1671
|
"bypass"
|
|
1672
1672
|
]
|
|
1673
1673
|
},
|
|
@@ -1677,10 +1677,10 @@
|
|
|
1677
1677
|
"mode": {
|
|
1678
1678
|
"type": "string",
|
|
1679
1679
|
"enum": [
|
|
1680
|
-
"
|
|
1680
|
+
"manual",
|
|
1681
1681
|
"write",
|
|
1682
|
-
"
|
|
1683
|
-
"
|
|
1682
|
+
"assisted",
|
|
1683
|
+
"auto",
|
|
1684
1684
|
"bypass"
|
|
1685
1685
|
]
|
|
1686
1686
|
},
|
|
@@ -1953,10 +1953,10 @@
|
|
|
1953
1953
|
{
|
|
1954
1954
|
"type": "string",
|
|
1955
1955
|
"enum": [
|
|
1956
|
-
"
|
|
1956
|
+
"manual",
|
|
1957
1957
|
"write",
|
|
1958
|
-
"
|
|
1959
|
-
"
|
|
1958
|
+
"assisted",
|
|
1959
|
+
"auto",
|
|
1960
1960
|
"bypass"
|
|
1961
1961
|
]
|
|
1962
1962
|
},
|
|
@@ -1966,10 +1966,10 @@
|
|
|
1966
1966
|
"mode": {
|
|
1967
1967
|
"type": "string",
|
|
1968
1968
|
"enum": [
|
|
1969
|
-
"
|
|
1969
|
+
"manual",
|
|
1970
1970
|
"write",
|
|
1971
|
-
"
|
|
1972
|
-
"
|
|
1971
|
+
"assisted",
|
|
1972
|
+
"auto",
|
|
1973
1973
|
"bypass"
|
|
1974
1974
|
]
|
|
1975
1975
|
},
|
|
@@ -2242,10 +2242,10 @@
|
|
|
2242
2242
|
{
|
|
2243
2243
|
"type": "string",
|
|
2244
2244
|
"enum": [
|
|
2245
|
-
"
|
|
2245
|
+
"manual",
|
|
2246
2246
|
"write",
|
|
2247
|
-
"
|
|
2248
|
-
"
|
|
2247
|
+
"assisted",
|
|
2248
|
+
"auto",
|
|
2249
2249
|
"bypass"
|
|
2250
2250
|
]
|
|
2251
2251
|
},
|
|
@@ -2255,10 +2255,10 @@
|
|
|
2255
2255
|
"mode": {
|
|
2256
2256
|
"type": "string",
|
|
2257
2257
|
"enum": [
|
|
2258
|
-
"
|
|
2258
|
+
"manual",
|
|
2259
2259
|
"write",
|
|
2260
|
-
"
|
|
2261
|
-
"
|
|
2260
|
+
"assisted",
|
|
2261
|
+
"auto",
|
|
2262
2262
|
"bypass"
|
|
2263
2263
|
]
|
|
2264
2264
|
},
|
|
@@ -2531,10 +2531,10 @@
|
|
|
2531
2531
|
{
|
|
2532
2532
|
"type": "string",
|
|
2533
2533
|
"enum": [
|
|
2534
|
-
"
|
|
2534
|
+
"manual",
|
|
2535
2535
|
"write",
|
|
2536
|
-
"
|
|
2537
|
-
"
|
|
2536
|
+
"assisted",
|
|
2537
|
+
"auto",
|
|
2538
2538
|
"bypass"
|
|
2539
2539
|
]
|
|
2540
2540
|
},
|
|
@@ -2544,10 +2544,10 @@
|
|
|
2544
2544
|
"mode": {
|
|
2545
2545
|
"type": "string",
|
|
2546
2546
|
"enum": [
|
|
2547
|
-
"
|
|
2547
|
+
"manual",
|
|
2548
2548
|
"write",
|
|
2549
|
-
"
|
|
2550
|
-
"
|
|
2549
|
+
"assisted",
|
|
2550
|
+
"auto",
|
|
2551
2551
|
"bypass"
|
|
2552
2552
|
]
|
|
2553
2553
|
},
|