@gaunt-sloth/core 2.0.0-beta.2 → 2.0.0-beta.4

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 (65) hide show
  1. package/dist/config/shell-policy.d.ts +2 -2
  2. package/dist/config/shell-policy.js +3 -3
  3. package/dist/config/tool-descriptions.d.ts +5 -5
  4. package/dist/config/tool-descriptions.js +3 -3
  5. package/dist/core/GthAbstractAgent.d.ts +67 -1
  6. package/dist/core/GthAbstractAgent.js +248 -4
  7. package/dist/core/GthAbstractAgent.js.map +1 -1
  8. package/dist/core/GthAgentRunner.d.ts +91 -10
  9. package/dist/core/GthAgentRunner.js +327 -21
  10. package/dist/core/GthAgentRunner.js.map +1 -1
  11. package/dist/core/GthLangChainAgent.d.ts +3 -2
  12. package/dist/core/GthLangChainAgent.js +25 -5
  13. package/dist/core/GthLangChainAgent.js.map +1 -1
  14. package/dist/core/reasoningBlocks.d.ts +4 -6
  15. package/dist/core/reasoningBlocks.js +4 -6
  16. package/dist/core/reasoningBlocks.js.map +1 -1
  17. package/dist/core/refusal.d.ts +54 -1
  18. package/dist/core/refusal.js +109 -1
  19. package/dist/core/refusal.js.map +1 -1
  20. package/dist/core/shell/ShellCommandFailedError.d.ts +4 -4
  21. package/dist/core/shell/ShellCommandFailedError.js +4 -4
  22. package/dist/core/shell/openWorld.d.ts +4 -3
  23. package/dist/core/shell/openWorld.js +4 -3
  24. package/dist/core/shell/openWorld.js.map +1 -1
  25. package/dist/core/terminationNotice.d.ts +111 -0
  26. package/dist/core/terminationNotice.js +209 -0
  27. package/dist/core/terminationNotice.js.map +1 -0
  28. package/dist/core/terminationReason.d.ts +271 -0
  29. package/dist/core/terminationReason.js +405 -0
  30. package/dist/core/terminationReason.js.map +1 -0
  31. package/dist/core/toolDisplay.d.ts +49 -2
  32. package/dist/core/toolDisplay.js +137 -19
  33. package/dist/core/toolDisplay.js.map +1 -1
  34. package/dist/core/types.d.ts +33 -6
  35. package/dist/core/types.js.map +1 -1
  36. package/dist/providers/geminiSchemaSanitizer.d.ts +2 -2
  37. package/dist/providers/geminiSchemaSanitizer.js +2 -2
  38. package/dist/providers/geminiThinking.d.ts +10 -5
  39. package/dist/providers/geminiThinking.js +10 -5
  40. package/dist/providers/geminiThinking.js.map +1 -1
  41. package/dist/runtime/askStructured.d.ts +22 -0
  42. package/dist/runtime/askStructured.js +53 -0
  43. package/dist/runtime/askStructured.js.map +1 -1
  44. package/dist/runtime/conversation.d.ts +11 -0
  45. package/dist/runtime/conversation.js +13 -1
  46. package/dist/runtime/conversation.js.map +1 -1
  47. package/dist/runtime/singleShot.d.ts +11 -0
  48. package/dist/runtime/singleShot.js +21 -1
  49. package/dist/runtime/singleShot.js.map +1 -1
  50. package/dist/utils/aiignoreUtils.d.ts +6 -0
  51. package/dist/utils/aiignoreUtils.js +69 -1
  52. package/dist/utils/aiignoreUtils.js.map +1 -1
  53. package/dist/utils/debugDump.d.ts +54 -0
  54. package/dist/utils/debugDump.js +32 -0
  55. package/dist/utils/debugDump.js.map +1 -1
  56. package/dist/utils/displayWidth.d.ts +10 -5
  57. package/dist/utils/displayWidth.js +148 -54
  58. package/dist/utils/displayWidth.js.map +1 -1
  59. package/dist/utils/llmUtils.d.ts +1 -1
  60. package/dist/utils/llmUtils.js +1 -1
  61. package/dist/utils/systemPromptNotes.d.ts +3 -3
  62. package/dist/utils/systemPromptNotes.js +3 -3
  63. package/dist/utils/vertexaiUtils.js +100 -1
  64. package/dist/utils/vertexaiUtils.js.map +1 -1
  65. package/package.json +4 -3
@@ -23,24 +23,38 @@
23
23
  * rules below are defined over, so the two agree by construction and a sliced string's width is
24
24
  * exactly the sum of the widths of the clusters kept.
25
25
  *
26
- * ## What the slices expect: PLAIN text
27
- *
28
- * {@link displayWidth} is ANSI-aware and the slices are NOT, and that asymmetry is a contract
29
- * rather than an oversight. An escape sequence is not one cluster — the terminal swallows it
30
- * whole, but `ESC`, `[`, `3`, `5`, `m` segment as five, four of them printable so the two
31
- * disagree on an escape-bearing string and a slice can both under-fill its budget and cut inside
32
- * a sequence. Feed the slices the text a user will read, and colour it afterwards; that is what
33
- * every caller here does, since both render surfaces map a style tag to their own escapes at the
34
- * very end. Making the slices ANSI-aware would change what a coloured preview line renders as,
35
- * which is a decision for whoever needs it and not a silent detail of this module.
36
- *
37
- * That asymmetry is also why a slice decides "does the whole string fit?" two different ways. For
38
- * plain text the cluster walk decides it: the widths of the clusters sum to the width of the
39
- * string, so walking until the budget is blown answers the question and answers it WITHOUT
40
- * touching the rest of the input — which is what keeps a megabyte-long preview line from being
41
- * measured end to end before it is cut at column 200. Only escape-bearing text is measured whole
42
- * first, because there the two rulers disagree and a coloured string that MEASURES as fitting must
43
- * be handed back whole rather than cut short by the bytes of its own escapes.
26
+ * ## What the slices cut: text, with its escapes carried along
27
+ *
28
+ * The slices are ANSI-aware, and they agree with {@link displayWidth} by construction. An escape
29
+ * sequence is not one cluster — the terminal swallows it whole, but `ESC`, `[`, `3`, `5`, `m`
30
+ * segment as five, four of them printable. A walk that spent budget on those printable bytes
31
+ * would answer a different question from the ruler it is paired with, since `string-width` strips
32
+ * escapes before measuring; and at a budget narrower than the content it would cut INSIDE a
33
+ * sequence, handing the terminal a mutilated escape.
34
+ *
35
+ * So a sequence is an indivisible token costing zero columns. It is kept whole, and it is carried
36
+ * along with the text it introduces, so a truncated coloured string still renders coloured. A
37
+ * sequence whose text is entirely cut away is dropped with that text rather than left dangling at
38
+ * the end of the result, where it would style nothing and leak its colour into whatever the caller
39
+ * appends next an ellipsis, the next parameter, the status tag.
40
+ *
41
+ * **The result stays a genuine prefix (or suffix) of the input: no reset is appended.** Terminal
42
+ * state belongs to the surface that owns the line, and both render surfaces already open and close
43
+ * their own styling around each line they draw; an `ESC[0m` injected at the cut would close that
44
+ * wrapper early and un-style everything after it.
45
+ *
46
+ * Because escapes cost no budget, the clusters kept sum to the width of the string as
47
+ * {@link displayWidth} measures it, so the cluster walk decides "does the whole string fit?" on
48
+ * its own — incrementally, stopping at the budget, WITHOUT a pre-measurement of the input. That is
49
+ * what keeps a megabyte-long preview line from being measured end to end before it is cut at
50
+ * column 200, and it is why the escape-bearing case needs no separate ruler.
51
+ *
52
+ * The one input the two do not agree on is an escape sequence placed INSIDE a grapheme cluster,
53
+ * between a base character and its combining mark. The measurement strips the sequence and joins
54
+ * what is left into one cluster; the walk cannot, because the sequence has already broken the
55
+ * cluster in two. The walk then counts such a string WIDER than it renders, which spends budget
56
+ * that is not needed and can leave a slice short — never over its budget, which is the direction
57
+ * that matters.
44
58
  *
45
59
  * ## Why ambiguous-width characters stay NARROW — and the one place they must not
46
60
  *
@@ -75,8 +89,8 @@ const GRAPHEME_SEGMENTER = new Intl.Segmenter(undefined, { granularity: 'graphem
75
89
  /**
76
90
  * Terminal columns `text` occupies. Zero-width clusters (combining marks, default-ignorables)
77
91
  * count 0, wide clusters (CJK, emoji, fullwidth forms) count 2, everything else 1. ANSI escape
78
- * sequences are not counted, so a pre-coloured string measures as what the user sees — but the
79
- * slices below do not share that awareness, so do not read this as a licence to feed them one.
92
+ * sequences are not counted, so a pre-coloured string measures as what the user sees — and the
93
+ * slices below share that awareness, so a coloured string may be handed to either of them.
80
94
  */
81
95
  export function displayWidth(text) {
82
96
  return stringWidth(text);
@@ -104,22 +118,78 @@ export function firstCluster(text) {
104
118
  return segment;
105
119
  return '';
106
120
  }
107
- /** The clusters of `text`, in order — the only unit either slice is allowed to cut between. */
108
- function clusters(text) {
109
- const out = [];
110
- for (const { segment } of GRAPHEME_SEGMENTER.segment(text))
111
- out.push(segment);
112
- return out;
113
- }
114
121
  /**
115
- * Whether the whole-string measurement is the only ruler that can answer "does this fit" for
116
- * `text` true exactly when it carries an escape introducer (`ESC`, or the one-byte `CSI`), the
117
- * two characters `string-width` itself strips on. On anything else the cluster widths sum to the
118
- * whole-string width, so the walk decides the same question incrementally and a pre-measurement
119
- * would be a second full pass over the input for nothing.
122
+ * The code points a sequence can begin with: `ESC` (U+001B) and the one-byte `CSI` (U+009B) — the
123
+ * same two characters `string-width` itself tests for before it strips.
124
+ */
125
+ const ESCAPE_INTRODUCER_CODES = new Set([0x00_1b, 0x00_9b]);
126
+ /**
127
+ * One ANSI escape sequence — an OSC string, or a CSI/two-character sequence — as a source pattern.
128
+ *
129
+ * This is the grammar of `ansi-regex`, which is what `strip-ansi` matches with and therefore what
130
+ * `string-width` removes before it measures. It is reproduced here rather than imported so the walk
131
+ * can never end up on a DIFFERENT copy of that package from the one `string-width` resolves: two
132
+ * versions in one tree would let the ruler and the walk disagree about where a sequence ends, which
133
+ * is the exact defect this module's ANSI-awareness exists to prevent. The spec cross-checks this
134
+ * pattern against `strip-ansi` itself, so a divergence fails loudly rather than silently.
135
+ *
136
+ * The OSC payload stops at the first terminator character instead of scanning ahead for one, so an
137
+ * unterminated OSC introducer cannot rescan the rest of the input — which is what keeps the walk
138
+ * linear on a long line full of half-written escapes rather than quadratic.
139
+ */
140
+ const ANSI_SEQUENCE_SOURCE = [
141
+ '(?:\\u001B\\][^\\u0007\\u001B\\u009C]*(?:\\u0007|\\u001B\\u005C|\\u009C))',
142
+ '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]',
143
+ ].join('|');
144
+ /**
145
+ * The same grammar anchored with the sticky flag, so it answers "does a sequence START here?" in
146
+ * one step at a known index rather than searching forward for the next one anywhere in the string.
147
+ *
148
+ * Module-level, because compiling it per slice would tax the common case that never uses it. Its
149
+ * `lastIndex` is written immediately before every `exec`, with nothing in between, so a second walk
150
+ * that begins while the first is suspended cannot observe a stale position.
120
151
  */
121
- function needsWholeStringMeasure(text) {
122
- return text.includes('\u001B') || text.includes('\u009B');
152
+ const ANSI_SEQUENCE_AT_INDEX = new RegExp(ANSI_SEQUENCE_SOURCE, 'y');
153
+ /**
154
+ * The pieces of `text` in order — whole escape sequences and whole grapheme clusters, the only
155
+ * units either slice is allowed to cut between.
156
+ *
157
+ * Lazy, and that is the point: the head slice stops pulling at its budget, so a megabyte-long line
158
+ * costs the length of the RESULT rather than the length of the input.
159
+ *
160
+ * An escape introducer is always its own cluster, because the segmentation rules break on both
161
+ * sides of a control character — so a sequence can only ever begin where a cluster begins, and one
162
+ * anchored match there settles how far it runs. The clusters it spans are then skipped. A cluster
163
+ * that STRADDLES the end of a sequence (a combining mark binding to the sequence's final byte)
164
+ * yields only the part beyond it, so the pieces always reassemble into the input exactly.
165
+ */
166
+ function* widthTokens(text) {
167
+ let index = 0;
168
+ for (const { segment, index: at } of GRAPHEME_SEGMENTER.segment(text)) {
169
+ const end = at + segment.length;
170
+ if (end <= index)
171
+ continue; // wholly inside a sequence already yielded
172
+ if (at < index) {
173
+ // Straddles the end of that sequence: only what lies beyond it is still unyielded.
174
+ const rest = text.slice(index, end);
175
+ index = end;
176
+ yield { text: rest, escape: false };
177
+ continue;
178
+ }
179
+ if (segment.length === 1 && ESCAPE_INTRODUCER_CODES.has(segment.charCodeAt(0))) {
180
+ ANSI_SEQUENCE_AT_INDEX.lastIndex = at;
181
+ const match = ANSI_SEQUENCE_AT_INDEX.exec(text);
182
+ if (match !== null) {
183
+ index = at + match[0].length;
184
+ yield { text: match[0], escape: true };
185
+ continue;
186
+ }
187
+ // An introducer that begins no sequence falls through as an ordinary cluster. It is a
188
+ // control character, so it measures zero and costs no budget either way.
189
+ }
190
+ index = end;
191
+ yield { text: segment, escape: false };
192
+ }
123
193
  }
124
194
  /**
125
195
  * The longest LEADING run of whole clusters whose total width is at most `maxWidth` — i.e. keep
@@ -146,50 +216,74 @@ export function sliceToMaxWidth(text, maxWidth) {
146
216
  }
147
217
  /**
148
218
  * 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.
219
+ * rather than chosen here so a caller cannot end up measured by one and cut by the other — reading
220
+ * the budget narrow and spending it wide would hand back a string that overruns the very budget the
221
+ * caller asked to be held to.
222
+ *
223
+ * The input is measured ONCE, incrementally, by the walk itself: escapes cost nothing, so the
224
+ * clusters kept sum to what {@link displayWidth} would report for them, and "does the whole string
225
+ * fit?" is answered by reaching the end rather than by a separate pass over the input first.
226
+ *
227
+ * Escapes are held back until a cluster is actually kept, so a sequence whose text all falls
228
+ * outside the budget is dropped with it instead of trailing the result and colouring whatever the
229
+ * caller appends next.
152
230
  */
153
231
  function sliceHeadToWidth(text, maxWidth, measure) {
154
232
  if (maxWidth <= 0)
155
233
  return '';
156
- if (needsWholeStringMeasure(text) && measure(text) <= maxWidth)
157
- return text;
158
234
  let width = 0;
159
235
  let kept = '';
160
- for (const { segment } of GRAPHEME_SEGMENTER.segment(text)) {
161
- const clusterWidth = measure(segment);
236
+ let pendingEscapes = '';
237
+ for (const token of widthTokens(text)) {
238
+ if (token.escape) {
239
+ pendingEscapes += token.text;
240
+ continue;
241
+ }
242
+ const clusterWidth = measure(token.text);
162
243
  if (width + clusterWidth > maxWidth)
163
- break;
244
+ return kept;
164
245
  width += clusterWidth;
165
- kept += segment;
246
+ kept += pendingEscapes + token.text;
247
+ pendingEscapes = '';
166
248
  }
167
- return kept;
249
+ // Every token fitted, so the answer is the input itself — returned rather than reassembled, so
250
+ // a caller comparing the result with what it passed in gets the identity it is testing for.
251
+ return text;
168
252
  }
169
253
  /**
170
254
  * The longest TRAILING run of whole clusters whose total width is at most `maxWidth` — i.e. keep
171
255
  * the tail, lose the head. The mirror of {@link sliceToWidth}, for values whose end is the
172
256
  * informative part (a path's leaf directory).
173
257
  *
174
- * This one materialises the clusters: it walks backwards, and cluster boundaries are only
175
- * derivable from the front. Its callers pass a path or a model id, so the input is a line rather
176
- * than a file.
258
+ * This one materialises the pieces: it walks backwards, and both cluster and sequence boundaries
259
+ * are only derivable from the front. Its callers pass a path or a model id, so the input is a line
260
+ * rather than a file.
261
+ *
262
+ * Keeping the END means the escapes that OPENED a style sit in the discarded head and go with it,
263
+ * so a tail comes back in the terminal's default styling. Only the sequences inside the kept span
264
+ * are carried, which leaves the tail ending in whatever state the whole string ended in — the cut
265
+ * introduces no bleed of its own.
177
266
  */
178
267
  export function sliceEndToWidth(text, maxWidth) {
179
268
  if (maxWidth <= 0)
180
269
  return '';
181
- if (needsWholeStringMeasure(text) && displayWidth(text) <= maxWidth)
182
- return text;
183
- const all = clusters(text);
270
+ const all = [...widthTokens(text)];
184
271
  let width = 0;
185
272
  let kept = '';
273
+ let pendingEscapes = '';
186
274
  for (let index = all.length - 1; index >= 0; index--) {
187
- const clusterWidth = displayWidth(all[index]);
275
+ const token = all[index];
276
+ if (token.escape) {
277
+ pendingEscapes = token.text + pendingEscapes;
278
+ continue;
279
+ }
280
+ const clusterWidth = displayWidth(token.text);
188
281
  if (width + clusterWidth > maxWidth)
189
- break;
282
+ return kept;
190
283
  width += clusterWidth;
191
- kept = all[index] + kept;
284
+ kept = token.text + pendingEscapes + kept;
285
+ pendingEscapes = '';
192
286
  }
193
- return kept;
287
+ return text;
194
288
  }
195
289
  //# sourceMappingURL=displayWidth.js.map
@@ -1 +1 @@
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,iBAA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AAK,CAAC,CAAC;QACzB,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,cAAc,GAAG,KAAK,CAAC,IAAI,GAAG,cAAc,CAAC;YAC7C,SAAS;QACX,CAAC;QACD,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,KAAK,GAAG,YAAY,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;QACjD,KAAK,IAAI,YAAY,CAAC;QACtB,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,cAAc,GAAG,IAAI,CAAC;QAC1C,cAAc,GAAG,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -32,7 +32,7 @@ export declare function readCodePrompt(config: PromptReadConfig): string;
32
32
  export declare function readExecPrompt(config: PromptReadConfig): string;
33
33
  /**
34
34
  * GS2-79 — the SINGLE place a command's mode prompt is chosen, for every site that composes a
35
- * system prompt via {@link buildSystemMessages}: both agent backends and the subagent profiles.
35
+ * system prompt via {@link buildSystemMessages}: the agent and the subagent profiles.
36
36
  *
37
37
  * It exists because the selection used to be an inline three-branch ternary copied to each of
38
38
  * those sites, and a command missing from one copy is silently served the CHAT prompt — the
@@ -117,7 +117,7 @@ export function readExecPrompt(config) {
117
117
  }
118
118
  /**
119
119
  * GS2-79 — the SINGLE place a command's mode prompt is chosen, for every site that composes a
120
- * system prompt via {@link buildSystemMessages}: both agent backends and the subagent profiles.
120
+ * system prompt via {@link buildSystemMessages}: the agent and the subagent profiles.
121
121
  *
122
122
  * It exists because the selection used to be an inline three-branch ternary copied to each of
123
123
  * those sites, and a command missing from one copy is silently served the CHAT prompt — the
@@ -93,9 +93,9 @@ export interface CommitCoAuthor {
93
93
  * it literally (the overwhelmingly common case, and a literal name is what makes the instruction
94
94
  * actionable); when it is not, the note names no tool, keeps both prohibitions and the file form,
95
95
  * and supplies the compliant path that remains: do not commit, and hand the message back to the
96
- * user. That branch states no availability claim of its own — the backends read the same
97
- * `filesystem` value but register filesystem tools differently, so a note asserting "you have no
98
- * file-writing tool" could be flatly false on one of them.
96
+ * user. That branch states no availability claim of its own — registering filesystem tools is the
97
+ * agent's decision, made from the same `filesystem` value, so a note asserting "you have no
98
+ * file-writing tool" could be flatly false.
99
99
  *
100
100
  * The note's prose carries **no backtick and no other markup** — including no angle-bracket
101
101
  * placeholder: it is the one piece of guidance whose subject is how to write a commit message, so
@@ -117,9 +117,9 @@ export function appendCwdNote(systemPrompt, cwd) {
117
117
  * it literally (the overwhelmingly common case, and a literal name is what makes the instruction
118
118
  * actionable); when it is not, the note names no tool, keeps both prohibitions and the file form,
119
119
  * and supplies the compliant path that remains: do not commit, and hand the message back to the
120
- * user. That branch states no availability claim of its own — the backends read the same
121
- * `filesystem` value but register filesystem tools differently, so a note asserting "you have no
122
- * file-writing tool" could be flatly false on one of them.
120
+ * user. That branch states no availability claim of its own — registering filesystem tools is the
121
+ * agent's decision, made from the same `filesystem` value, so a note asserting "you have no
122
+ * file-writing tool" could be flatly false.
123
123
  *
124
124
  * The note's prose carries **no backtick and no other markup** — including no angle-bracket
125
125
  * placeholder: it is the one piece of guidance whose subject is how to write a commit message, so
@@ -1,3 +1,4 @@
1
+ import { env } from '#src/utils/systemUtils.js';
1
2
  export function isVertexGoogleLlm(llm) {
2
3
  if (!llm || typeof llm !== 'object') {
3
4
  return false;
@@ -70,12 +71,110 @@ const VERTEX_AUTH_GUIDANCE = {
70
71
  'Check the one this session is configured for — a Google AI Studio key is not valid for ' +
71
72
  'Vertex AI endpoints.',
72
73
  };
74
+ /**
75
+ * The longest value still treated as a filesystem path. 260 is Windows' classic `MAX_PATH`, which is
76
+ * a defensible ceiling for a path and sits an order of magnitude below any credential: the deepest
77
+ * realistic ADC path — a CI runner's temp directory plus
78
+ * `application_default_credentials.json` — is around 120 characters, while a service-account key is
79
+ * ~1700 as JSON and ~2300 base64-encoded. Nothing has to land in the gap for the test to be useful.
80
+ */
81
+ const MAX_CREDENTIAL_PATH_LENGTH = 260;
82
+ /**
83
+ * Whether a value is the credential ITSELF rather than a path to one.
84
+ *
85
+ * Deliberately tested by SIZE first rather than by shape. The shape test alone (`{`) catches a
86
+ * pasted JSON key and misses the base64 form that CI secret stores hand out, and widening it one
87
+ * encoding at a time only ever covers the last spelling somebody thought of — the value is
88
+ * attacker-irrelevant but user-supplied and its formats are open-ended. Length closes the class
89
+ * because every credential is enormous next to every path. The shape test is kept alongside it for
90
+ * the short, hand-trimmed JSON that a size test alone would let through.
91
+ */
92
+ function isCredentialContent(value) {
93
+ return value.length > MAX_CREDENTIAL_PATH_LENGTH || value.trimStart().startsWith('{');
94
+ }
95
+ /**
96
+ * Where an ADC session's credentials are being read from when an environment variable names a file,
97
+ * and the spelling of the variable that named it — `undefined` when no such variable is in play.
98
+ *
99
+ * THIS IS THE ONE ENVIRONMENT READ IN THIS FILE AND IT IS DELIBERATE, so read it against the
100
+ * comment on {@link vertexAuthMode} rather than as a contradiction of it. That function decides
101
+ * WHICH credential is in use and must keep doing so from the constructed client alone. This one
102
+ * decides nothing: the session has already been classified as ADC from the client, and the
103
+ * environment is consulted only to compose the DIAGNOSTIC SENTENCE for it. Read-only, through the
104
+ * `systemUtils` accessor like every other environment read in this package.
105
+ *
106
+ * It is not client-derived because there is nothing client-derived to be had. Measured on
107
+ * google-auth-library 10.9.1: `GoogleAuth.keyFilename` is populated only from constructor options,
108
+ * so on a Vertex client it is `undefined` both with and without the variable set, and stays
109
+ * `undefined` after a resolution attempt. The only artifact a successful resolution leaves behind is
110
+ * `jsonContent` — the parsed key file, which holds the private key and must never be printed.
111
+ *
112
+ * Mirrors `googleauth.js` rather than reinventing it: both spellings, upper case first, and an empty
113
+ * value falls through to the well-known file instead of counting as set.
114
+ */
115
+ function adcCredentialFileFromEnvironment() {
116
+ for (const variable of ['GOOGLE_APPLICATION_CREDENTIALS', 'google_application_credentials']) {
117
+ const path = env[variable];
118
+ if (!path) {
119
+ continue;
120
+ }
121
+ // First non-empty wins, exactly as the library's `||` does — so a value that is credential
122
+ // CONTENT rather than a path ends the search rather than falling through to the other spelling.
123
+ //
124
+ // Pasting the service-account key into the variable instead of writing it to a file is a common
125
+ // CI misconfiguration, and such a session must NOT be described below. There is no file for the
126
+ // message to point at, so naming one would be exactly the kind of claim-that-does-not-hold this
127
+ // hint exists to avoid; and the value is a private key, while this message also reaches the log
128
+ // stream and debug dumps. It falls back to the pinned `adc` sentence, which asserts nothing
129
+ // about where the credentials came from.
130
+ return isCredentialContent(path) ? undefined : { variable, path };
131
+ }
132
+ return undefined;
133
+ }
134
+ /**
135
+ * The remedy for an ADC session whose credentials come from a file named in the environment.
136
+ *
137
+ * The diagnosis is the same as the plain `adc` one and is CORRECT — this really is ADC. What
138
+ * differs is that the plain remedy is inert here: `google-auth-library` resolves this variable
139
+ * before it reads the well-known file, so `gcloud auth application-default login` writes a file
140
+ * this session never opens, reports success, and leaves the failure exactly where it was. Naming
141
+ * the command anyway is the point — the reader has usually just run it.
142
+ */
143
+ function adcFromEnvironmentGuidance(variable, path) {
144
+ return ('This session authenticates through Application Default Credentials, and those credentials ' +
145
+ 'come from `' +
146
+ variable +
147
+ '` in your environment, which points at `' +
148
+ path +
149
+ '`. That variable is resolved BEFORE the well-known credentials file, so ' +
150
+ '`gcloud auth application-default login` writes a file this session never reads and the ' +
151
+ 'failure survives it. Repair or replace the credentials in the file above, or unset ' +
152
+ '`' +
153
+ variable +
154
+ '` so the well-known Application Default Credentials file is used instead. ' +
155
+ 'No API key is in use — a `type: vertexai` config ignores any `GOOGLE_API_KEY` in your ' +
156
+ 'environment, so unsetting that will not help here.');
157
+ }
158
+ /**
159
+ * The sentence for a classified session. Only the ADC branch is refined further, and only into the
160
+ * one sub-case whose remedy would otherwise be inert; every other mode returns its pinned string
161
+ * unchanged.
162
+ */
163
+ function vertexAuthGuidance(mode) {
164
+ if (mode === 'adc') {
165
+ const fromEnvironment = adcCredentialFileFromEnvironment();
166
+ if (fromEnvironment) {
167
+ return adcFromEnvironmentGuidance(fromEnvironment.variable, fromEnvironment.path);
168
+ }
169
+ }
170
+ return VERTEX_AUTH_GUIDANCE[mode];
171
+ }
73
172
  export function enhanceVertexUnauthorizedMessage(originalMessage, llm) {
74
173
  if (!isVertexGoogleLlm(llm) || !VERTEX_AUTH_ERROR_PATTERN.test(originalMessage)) {
75
174
  return originalMessage;
76
175
  }
77
176
  return (`${originalMessage}\n\n` +
78
177
  'Vertex AI authentication failed. ' +
79
- `${VERTEX_AUTH_GUIDANCE[vertexAuthMode(llm)]}\n`);
178
+ `${vertexAuthGuidance(vertexAuthMode(llm))}\n`);
80
179
  }
81
180
  //# sourceMappingURL=vertexaiUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertexaiUtils.js","sourceRoot":"","sources":["../../src/utils/vertexaiUtils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,GAA6B,CAAC;IAC5C,OAAO,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC;AACnC,CAAC;AAED,4DAA4D;AAC5D,gEAAgE;AAChE,gFAAgF;AAChF,qFAAqF;AACrF,MAAM,yBAAyB,GAAG,4DAA4D,CAAC;AAY/F;;;;;;;;GAQG;AACH,SAAS,cAAc,CAAC,GAAY;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GACV,GAGD,EAAE,SAAS,CAAC;QACb,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC;YACjE,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACrC,OAAO,gBA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,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IACD,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,eAAuB,EAAE,GAAY;IACpF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAChF,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,OAAO,CACL,GAAG,eAAe,MAAM;QACxB,mCAAmC;QACnC,GAAG,kBAAkB,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,CAC/C,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaunt-sloth/core",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "Core utilities and types for Gaunt Sloth",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@langchain/core": "^1.2.9",
34
- "@langchain/langgraph": "^1.4.12",
34
+ "@langchain/langgraph": "^1.4.13",
35
35
  "jiti": "^2.7.0",
36
36
  "jsonc-parser": "^3.3.1",
37
37
  "langchain": "^1.5.10",
@@ -89,6 +89,7 @@
89
89
  "scripts": {
90
90
  "build": "tsc",
91
91
  "schema:generate": "node scripts/generate-config-schema.mjs",
92
- "surface:generate": "node scripts/generate-type-surface.mjs"
92
+ "surface:generate": "node scripts/generate-type-surface.mjs",
93
+ "value-surface:generate": "node scripts/generate-value-surface.mjs"
93
94
  }
94
95
  }