@genesislcap/foundation-ai 14.469.0 → 14.470.0

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.
@@ -2080,10 +2080,41 @@
2080
2080
  "isAbstract": false,
2081
2081
  "name": "getLifetimeCost"
2082
2082
  },
2083
+ {
2084
+ "kind": "Method",
2085
+ "canonicalReference": "@genesislcap/foundation-ai!AnthropicTransport#getLifetimeSavings:member(1)",
2086
+ "docComment": "/**\n * Estimated USD saved by prompt caching (net of write premiums) across this instance.\n */\n",
2087
+ "excerptTokens": [
2088
+ {
2089
+ "kind": "Content",
2090
+ "text": "getLifetimeSavings(): "
2091
+ },
2092
+ {
2093
+ "kind": "Content",
2094
+ "text": "number"
2095
+ },
2096
+ {
2097
+ "kind": "Content",
2098
+ "text": ";"
2099
+ }
2100
+ ],
2101
+ "isStatic": false,
2102
+ "returnTypeTokenRange": {
2103
+ "startIndex": 1,
2104
+ "endIndex": 2
2105
+ },
2106
+ "releaseTag": "Beta",
2107
+ "isProtected": false,
2108
+ "overloadIndex": 1,
2109
+ "parameters": [],
2110
+ "isOptional": false,
2111
+ "isAbstract": false,
2112
+ "name": "getLifetimeSavings"
2113
+ },
2083
2114
  {
2084
2115
  "kind": "Method",
2085
2116
  "canonicalReference": "@genesislcap/foundation-ai!AnthropicTransport#resetLifetimeCost:member(1)",
2086
- "docComment": "/**\n * Reset the lifetime cost counter. Intended for chat-clear / new-session flows.\n */\n",
2117
+ "docComment": "/**\n * Reset the lifetime cost + savings counters. Intended for chat-clear / new-session flows.\n */\n",
2087
2118
  "excerptTokens": [
2088
2119
  {
2089
2120
  "kind": "Content",
@@ -2281,6 +2312,32 @@
2281
2312
  }
2282
2313
  ]
2283
2314
  },
2315
+ {
2316
+ "kind": "TypeAlias",
2317
+ "canonicalReference": "@genesislcap/foundation-ai!CachePolicy:type",
2318
+ "docComment": "/**\n * Prompt-cache policy for a chat request, resolved per turn. **Provider-neutral intent, provider-specific effect** — read this carefully, the two providers differ sharply:\n *\n * - **Anthropic** — `scope` controls where explicit `cache_control` breakpoints are placed (see each variant). This is the *only* way Anthropic caches; no scope → no caching. - **Gemini** — `scope` is effectively a **no-op**. Gemini 2.5+ does *implicit* caching automatically and always-on, caching as much of the stable prefix as it can (everything up to the volatile tail) on every request — regardless of `scope`, **including under `'default'`**. We issue no explicit `cachedContent`, so nothing here changes the Gemini request. Do NOT expect `'tools'`/`'prompt'` to *limit* Gemini caching, nor `'default'` to *disable* it; the most you control on Gemini is keeping the prefix byte-stable so implicit caching can engage.\n *\n * Omit, or use `{ scope: 'default' }`, to add no breakpoints of our own.\n *\n * @beta\n */\n",
2319
+ "excerptTokens": [
2320
+ {
2321
+ "kind": "Content",
2322
+ "text": "export type CachePolicy = "
2323
+ },
2324
+ {
2325
+ "kind": "Content",
2326
+ "text": "{\n scope: 'default';\n} | {\n scope: 'tools' | 'prompt' | 'history';\n ttl?: '5m' | '1h';\n}"
2327
+ },
2328
+ {
2329
+ "kind": "Content",
2330
+ "text": ";"
2331
+ }
2332
+ ],
2333
+ "fileUrlPath": "src/types/chat.types.ts",
2334
+ "releaseTag": "Beta",
2335
+ "name": "CachePolicy",
2336
+ "typeTokenRange": {
2337
+ "startIndex": 1,
2338
+ "endIndex": 2
2339
+ }
2340
+ },
2284
2341
  {
2285
2342
  "kind": "Interface",
2286
2343
  "canonicalReference": "@genesislcap/foundation-ai!ChatAgentConfig:interface",
@@ -3611,6 +3668,34 @@
3611
3668
  "endIndex": 3
3612
3669
  }
3613
3670
  },
3671
+ {
3672
+ "kind": "PropertySignature",
3673
+ "canonicalReference": "@genesislcap/foundation-ai!ChatRequestOptions#cachePolicy:member",
3674
+ "docComment": "/**\n * Prompt-cache policy for this turn. See {@link CachePolicy} — Anthropic places explicit `cache_control` breakpoints per `scope`; Gemini caches implicitly regardless. Omit to add no breakpoints of our own.\n *\n * @beta\n */\n",
3675
+ "excerptTokens": [
3676
+ {
3677
+ "kind": "Content",
3678
+ "text": "cachePolicy?: "
3679
+ },
3680
+ {
3681
+ "kind": "Reference",
3682
+ "text": "CachePolicy",
3683
+ "canonicalReference": "@genesislcap/foundation-ai!CachePolicy:type"
3684
+ },
3685
+ {
3686
+ "kind": "Content",
3687
+ "text": ";"
3688
+ }
3689
+ ],
3690
+ "isReadonly": false,
3691
+ "isOptional": true,
3692
+ "releaseTag": "Beta",
3693
+ "name": "cachePolicy",
3694
+ "propertyTypeTokenRange": {
3695
+ "startIndex": 1,
3696
+ "endIndex": 2
3697
+ }
3698
+ },
3614
3699
  {
3615
3700
  "kind": "PropertySignature",
3616
3701
  "canonicalReference": "@genesislcap/foundation-ai!ChatRequestOptions#signal:member",
@@ -3666,6 +3751,33 @@
3666
3751
  "endIndex": 2
3667
3752
  }
3668
3753
  },
3754
+ {
3755
+ "kind": "PropertySignature",
3756
+ "canonicalReference": "@genesislcap/foundation-ai!ChatRequestOptions#tailContext:member",
3757
+ "docComment": "/**\n * Operator/volatile context to inject at the **very tail** of the outbound messages — after the stored history *and* after any cache breakpoint — so the model sees it every turn without invalidating the cached prefix. **Never persisted to stored history**; it is re-supplied per request. Anthropic appends it as a text block on the final user turn; Gemini as a trailing `user` content. The caller is responsible for any framing (e.g. a `<system-reminder>` / `<current_context>` marker) so the model reads it as ambient context, not user input.\n *\n * @beta\n */\n",
3758
+ "excerptTokens": [
3759
+ {
3760
+ "kind": "Content",
3761
+ "text": "tailContext?: "
3762
+ },
3763
+ {
3764
+ "kind": "Content",
3765
+ "text": "string"
3766
+ },
3767
+ {
3768
+ "kind": "Content",
3769
+ "text": ";"
3770
+ }
3771
+ ],
3772
+ "isReadonly": false,
3773
+ "isOptional": true,
3774
+ "releaseTag": "Beta",
3775
+ "name": "tailContext",
3776
+ "propertyTypeTokenRange": {
3777
+ "startIndex": 1,
3778
+ "endIndex": 2
3779
+ }
3780
+ },
3669
3781
  {
3670
3782
  "kind": "PropertySignature",
3671
3783
  "canonicalReference": "@genesislcap/foundation-ai!ChatRequestOptions#temperature:member",
@@ -4344,7 +4456,7 @@
4344
4456
  },
4345
4457
  {
4346
4458
  "kind": "Content",
4347
- "text": ";\n }>;\n completeSubAgent?: (result: unknown) => void;\n releaseAgent?: () => void;\n condenseWhen: (policy: "
4459
+ "text": ";\n }>;\n completeSubAgent?: (result: unknown) => void;\n releaseAgent?: () => void;\n endPhase?: () => void;\n condenseWhen: (policy: "
4348
4460
  },
4349
4461
  {
4350
4462
  "kind": "Reference",
@@ -5354,7 +5466,7 @@
5354
5466
  {
5355
5467
  "kind": "TypeAlias",
5356
5468
  "canonicalReference": "@genesislcap/foundation-ai!CondenseTrigger:type",
5357
- "docComment": "/**\n * When a tool call's declared payload(s) become stale and should be condensed out of the to-model history. The kinds form a spectrum of widening staleness horizons — call, model-call, request, and agent-flow.\n *\n * - `superseded` — keep only the LATEST call sharing `by` in the history sent to the model; collapse the targeted payload of all earlier ones. The natural key is the resource identity (e.g. a file path), so reads and writes of the same path share a `by` and an earlier read collapses once a later write/read of the same path lands. A re-call with the same `by` re-arms automatically. - `age` — a tool result first reaches the model on the model-call AFTER the call, so `turns` is how many model-calls may see the full result before it collapses: `turns: 1` lets the model read it on exactly one model-call, then collapses it; `turns: 2` keeps it for two; and so on. Use `turns >= 1`. The clock is monotonic across user turns (a sub-agent invocation counts as one call in the parent loop). For keyless payloads (grep / source / doc dumps). - `turnEnd` — collapse once the user turn (`sendMessage`) that made the call has ended: the payload stays full for the rest of that request, then collapses on every later one. \"Relevant only to the request that fetched it.\" This is the right choice for a non-pinned agent (one that answers and hands straight back to the user); reach for it whenever the payload is per-request. - `agentEnd` — collapse once the agent's *continuous activation* ends. An activation spans every turn the agent stays in control — a pinned stateful flow is one activation across all its turns (mid-flow `requestInteraction` round-trips and turn boundaries do NOT end it) — and it ends only when the agent hands off to a different agent or releases its pin (`releaseAgent` / `completeSubAgent`). The right choice for a multi-turn stateful flow whose payload is needed throughout but dead afterwards (where `turnEnd` would be too eager). NOTE: for a non-pinned agent, \"the agent\" is only considered to have ended when routing actually moves to a *different* agent — if the classifier re-selects the same agent on the next turn it is treated as the same activation, so use `turnEnd` (not `agentEnd`) when you want per-request collapse on a non-stateful agent.\n *\n * @beta\n */\n",
5469
+ "docComment": "/**\n * When a tool call's declared payload(s) become stale and should be condensed out of the to-model history. The kinds form a spectrum of widening staleness horizons — call, model-call, request, and agent-flow.\n *\n * - `superseded` — keep only the LATEST call sharing `by` in the history sent to the model; collapse the targeted payload of all earlier ones. The natural key is the resource identity (e.g. a file path), so reads and writes of the same path share a `by` and an earlier read collapses once a later write/read of the same path lands. A re-call with the same `by` re-arms automatically. - `age` — a tool result first reaches the model on the model-call AFTER the call, so `turns` is how many model-calls may see the full result before it collapses: `turns: 1` lets the model read it on exactly one model-call, then collapses it; `turns: 2` keeps it for two; and so on. Use `turns >= 1`. The clock is monotonic across user turns (a sub-agent invocation counts as one call in the parent loop). For keyless payloads (grep / source / doc dumps). - `turnEnd` — collapse once the user turn (`sendMessage`) that made the call has ended: the payload stays full for the rest of that request, then collapses on every later one. \"Relevant only to the request that fetched it.\" This is the right choice for a non-pinned agent (one that answers and hands straight back to the user); reach for it whenever the payload is per-request. - `agentEnd` — collapse once the agent's *continuous activation* ends. An activation spans every turn the agent stays in control — a pinned stateful flow is one activation across all its turns (mid-flow `requestInteraction` round-trips and turn boundaries do NOT end it) — and it ends only when the agent hands off to a different agent or releases its pin (`releaseAgent` / `completeSubAgent`). The right choice for a multi-turn stateful flow whose payload is needed throughout but dead afterwards (where `turnEnd` would be too eager). NOTE: for a non-pinned agent, \"the agent\" is only considered to have ended when routing actually moves to a *different* agent — if the classifier re-selects the same agent on the next turn it is treated as the same activation, so use `turnEnd` (not `agentEnd`) when you want per-request collapse on a non-stateful agent. - `phaseEnd` — collapse once the agent declares the current *phase* finished by calling `endPhase()` from a tool handler. A phase is an app-defined span *within* one activation — narrower than `agentEnd` (which only fires at whole- agent disposal) and phase-aware in a way `age:N` is not. The intended use is a long, multi-phase stateful flow (e.g. a bootstrap journey) that wants to trim each phase's grounding reads as it moves on, without waiting for the whole agent to end. It is NOT tied to any state-machine library: the author fires `endPhase()` from whichever tool handlers advance their own notion of state, exactly as `condenseWhen` is itself called from tool handlers. If `endPhase()` is never called, the payload still collapses at `agentEnd` — so `phaseEnd` degrades to `agentEnd` rather than never firing.\n *\n * @beta\n */\n",
5358
5470
  "excerptTokens": [
5359
5471
  {
5360
5472
  "kind": "Content",
@@ -5362,7 +5474,7 @@
5362
5474
  },
5363
5475
  {
5364
5476
  "kind": "Content",
5365
- "text": "{\n kind: 'superseded';\n by: string;\n} | {\n kind: 'age';\n turns: number;\n} | {\n kind: 'turnEnd';\n} | {\n kind: 'agentEnd';\n}"
5477
+ "text": "{\n kind: 'superseded';\n by: string;\n} | {\n kind: 'age';\n turns: number;\n} | {\n kind: 'turnEnd';\n} | {\n kind: 'agentEnd';\n} | {\n kind: 'phaseEnd';\n}"
5366
5478
  },
5367
5479
  {
5368
5480
  "kind": "Content",
@@ -5420,10 +5532,38 @@
5420
5532
  "parameters": [],
5421
5533
  "name": "getLifetimeCost"
5422
5534
  },
5535
+ {
5536
+ "kind": "MethodSignature",
5537
+ "canonicalReference": "@genesislcap/foundation-ai!CostReportingTransport#getLifetimeSavings:member(1)",
5538
+ "docComment": "/**\n * Estimated USD saved by prompt caching vs paying full input price, accumulated across this instance. Net of cache-write premiums, so it can be briefly negative before reads accrue.\n */\n",
5539
+ "excerptTokens": [
5540
+ {
5541
+ "kind": "Content",
5542
+ "text": "getLifetimeSavings(): "
5543
+ },
5544
+ {
5545
+ "kind": "Content",
5546
+ "text": "number"
5547
+ },
5548
+ {
5549
+ "kind": "Content",
5550
+ "text": ";"
5551
+ }
5552
+ ],
5553
+ "isOptional": false,
5554
+ "returnTypeTokenRange": {
5555
+ "startIndex": 1,
5556
+ "endIndex": 2
5557
+ },
5558
+ "releaseTag": "Beta",
5559
+ "overloadIndex": 1,
5560
+ "parameters": [],
5561
+ "name": "getLifetimeSavings"
5562
+ },
5423
5563
  {
5424
5564
  "kind": "MethodSignature",
5425
5565
  "canonicalReference": "@genesislcap/foundation-ai!CostReportingTransport#resetLifetimeCost:member(1)",
5426
- "docComment": "/**\n * Reset the lifetime cost counter. Intended for chat-clear / new-session flows.\n */\n",
5566
+ "docComment": "/**\n * Reset the lifetime cost + savings counters. Intended for chat-clear / new-session flows.\n */\n",
5427
5567
  "excerptTokens": [
5428
5568
  {
5429
5569
  "kind": "Content",
@@ -6622,10 +6762,41 @@
6622
6762
  "isAbstract": false,
6623
6763
  "name": "getLifetimeCost"
6624
6764
  },
6765
+ {
6766
+ "kind": "Method",
6767
+ "canonicalReference": "@genesislcap/foundation-ai!GeminiTransport#getLifetimeSavings:member(1)",
6768
+ "docComment": "/**\n * Estimated USD saved by context caching across this instance (implicit caching → always ≥ 0).\n */\n",
6769
+ "excerptTokens": [
6770
+ {
6771
+ "kind": "Content",
6772
+ "text": "getLifetimeSavings(): "
6773
+ },
6774
+ {
6775
+ "kind": "Content",
6776
+ "text": "number"
6777
+ },
6778
+ {
6779
+ "kind": "Content",
6780
+ "text": ";"
6781
+ }
6782
+ ],
6783
+ "isStatic": false,
6784
+ "returnTypeTokenRange": {
6785
+ "startIndex": 1,
6786
+ "endIndex": 2
6787
+ },
6788
+ "releaseTag": "Beta",
6789
+ "isProtected": false,
6790
+ "overloadIndex": 1,
6791
+ "parameters": [],
6792
+ "isOptional": false,
6793
+ "isAbstract": false,
6794
+ "name": "getLifetimeSavings"
6795
+ },
6625
6796
  {
6626
6797
  "kind": "Method",
6627
6798
  "canonicalReference": "@genesislcap/foundation-ai!GeminiTransport#resetLifetimeCost:member(1)",
6628
- "docComment": "/**\n * Reset the lifetime cost counter. Intended for chat-clear / new-session flows.\n */\n",
6799
+ "docComment": "/**\n * Reset the lifetime cost + savings counters. Intended for chat-clear / new-session flows.\n */\n",
6629
6800
  "excerptTokens": [
6630
6801
  {
6631
6802
  "kind": "Content",
@@ -8299,6 +8470,238 @@
8299
8470
  ],
8300
8471
  "extendsTokenRanges": []
8301
8472
  },
8473
+ {
8474
+ "kind": "Class",
8475
+ "canonicalReference": "@genesislcap/foundation-ai!ResponseTruncatedError:class",
8476
+ "docComment": "/**\n * Thrown when a response stops at `stop_reason: 'max_tokens'` while it still carries tool calls. The model ran out of its output-token budget mid-stream, so the truncated tool call's argument JSON was cut off before it closed — the arguments are incomplete and the call is unusable (e.g. a `vfs_write` whose `content` never finished serializing). Rather than hand a corrupt tool call to the caller — which silently runs with missing args and tends to be retried into an identical wall — the transport raises this so the failure is loud and diagnosable.\n *\n * It is deterministic: re-issuing the same request hits the same cap. The remedy is to raise the provider's `maxTokens` (see {@link AnthropicAIConfig.maxTokens}) or to split the work into smaller outputs — not to retry verbatim.\n *\n * @beta\n */\n",
8477
+ "excerptTokens": [
8478
+ {
8479
+ "kind": "Content",
8480
+ "text": "export declare class ResponseTruncatedError extends "
8481
+ },
8482
+ {
8483
+ "kind": "Reference",
8484
+ "text": "Error",
8485
+ "canonicalReference": "!Error:interface"
8486
+ },
8487
+ {
8488
+ "kind": "Content",
8489
+ "text": " "
8490
+ }
8491
+ ],
8492
+ "fileUrlPath": "src/transports/anthropic-transport.ts",
8493
+ "releaseTag": "Beta",
8494
+ "isAbstract": false,
8495
+ "name": "ResponseTruncatedError",
8496
+ "preserveMemberOrder": false,
8497
+ "members": [
8498
+ {
8499
+ "kind": "Constructor",
8500
+ "canonicalReference": "@genesislcap/foundation-ai!ResponseTruncatedError:constructor(1)",
8501
+ "docComment": "/**\n * Constructs a new instance of the `ResponseTruncatedError` class\n */\n",
8502
+ "excerptTokens": [
8503
+ {
8504
+ "kind": "Content",
8505
+ "text": "constructor(\n model: "
8506
+ },
8507
+ {
8508
+ "kind": "Content",
8509
+ "text": "string"
8510
+ },
8511
+ {
8512
+ "kind": "Content",
8513
+ "text": ", \n maxTokens: "
8514
+ },
8515
+ {
8516
+ "kind": "Content",
8517
+ "text": "number"
8518
+ },
8519
+ {
8520
+ "kind": "Content",
8521
+ "text": ", \n outputTokens: "
8522
+ },
8523
+ {
8524
+ "kind": "Content",
8525
+ "text": "number | undefined"
8526
+ },
8527
+ {
8528
+ "kind": "Content",
8529
+ "text": ", \n toolNames: "
8530
+ },
8531
+ {
8532
+ "kind": "Content",
8533
+ "text": "string[]"
8534
+ },
8535
+ {
8536
+ "kind": "Content",
8537
+ "text": ");"
8538
+ }
8539
+ ],
8540
+ "releaseTag": "Beta",
8541
+ "isProtected": false,
8542
+ "overloadIndex": 1,
8543
+ "parameters": [
8544
+ {
8545
+ "parameterName": "model",
8546
+ "parameterTypeTokenRange": {
8547
+ "startIndex": 1,
8548
+ "endIndex": 2
8549
+ },
8550
+ "isOptional": false
8551
+ },
8552
+ {
8553
+ "parameterName": "maxTokens",
8554
+ "parameterTypeTokenRange": {
8555
+ "startIndex": 3,
8556
+ "endIndex": 4
8557
+ },
8558
+ "isOptional": false
8559
+ },
8560
+ {
8561
+ "parameterName": "outputTokens",
8562
+ "parameterTypeTokenRange": {
8563
+ "startIndex": 5,
8564
+ "endIndex": 6
8565
+ },
8566
+ "isOptional": false
8567
+ },
8568
+ {
8569
+ "parameterName": "toolNames",
8570
+ "parameterTypeTokenRange": {
8571
+ "startIndex": 7,
8572
+ "endIndex": 8
8573
+ },
8574
+ "isOptional": false
8575
+ }
8576
+ ]
8577
+ },
8578
+ {
8579
+ "kind": "Property",
8580
+ "canonicalReference": "@genesislcap/foundation-ai!ResponseTruncatedError#maxTokens:member",
8581
+ "docComment": "/**\n * The `max_tokens` cap the request was sent with.\n */\n",
8582
+ "excerptTokens": [
8583
+ {
8584
+ "kind": "Content",
8585
+ "text": "readonly maxTokens: "
8586
+ },
8587
+ {
8588
+ "kind": "Content",
8589
+ "text": "number"
8590
+ },
8591
+ {
8592
+ "kind": "Content",
8593
+ "text": ";"
8594
+ }
8595
+ ],
8596
+ "isReadonly": true,
8597
+ "isOptional": false,
8598
+ "releaseTag": "Beta",
8599
+ "name": "maxTokens",
8600
+ "propertyTypeTokenRange": {
8601
+ "startIndex": 1,
8602
+ "endIndex": 2
8603
+ },
8604
+ "isStatic": false,
8605
+ "isProtected": false,
8606
+ "isAbstract": false
8607
+ },
8608
+ {
8609
+ "kind": "Property",
8610
+ "canonicalReference": "@genesislcap/foundation-ai!ResponseTruncatedError#model:member",
8611
+ "docComment": "/**\n * The model that produced the truncated response.\n */\n",
8612
+ "excerptTokens": [
8613
+ {
8614
+ "kind": "Content",
8615
+ "text": "readonly model: "
8616
+ },
8617
+ {
8618
+ "kind": "Content",
8619
+ "text": "string"
8620
+ },
8621
+ {
8622
+ "kind": "Content",
8623
+ "text": ";"
8624
+ }
8625
+ ],
8626
+ "isReadonly": true,
8627
+ "isOptional": false,
8628
+ "releaseTag": "Beta",
8629
+ "name": "model",
8630
+ "propertyTypeTokenRange": {
8631
+ "startIndex": 1,
8632
+ "endIndex": 2
8633
+ },
8634
+ "isStatic": false,
8635
+ "isProtected": false,
8636
+ "isAbstract": false
8637
+ },
8638
+ {
8639
+ "kind": "Property",
8640
+ "canonicalReference": "@genesislcap/foundation-ai!ResponseTruncatedError#outputTokens:member",
8641
+ "docComment": "/**\n * Output tokens generated before truncation, when the usage block is present.\n */\n",
8642
+ "excerptTokens": [
8643
+ {
8644
+ "kind": "Content",
8645
+ "text": "readonly outputTokens: "
8646
+ },
8647
+ {
8648
+ "kind": "Content",
8649
+ "text": "number | undefined"
8650
+ },
8651
+ {
8652
+ "kind": "Content",
8653
+ "text": ";"
8654
+ }
8655
+ ],
8656
+ "isReadonly": true,
8657
+ "isOptional": false,
8658
+ "releaseTag": "Beta",
8659
+ "name": "outputTokens",
8660
+ "propertyTypeTokenRange": {
8661
+ "startIndex": 1,
8662
+ "endIndex": 2
8663
+ },
8664
+ "isStatic": false,
8665
+ "isProtected": false,
8666
+ "isAbstract": false
8667
+ },
8668
+ {
8669
+ "kind": "Property",
8670
+ "canonicalReference": "@genesislcap/foundation-ai!ResponseTruncatedError#toolNames:member",
8671
+ "docComment": "/**\n * Names of the tool call(s) on the truncated turn (the last is the cut-off one).\n */\n",
8672
+ "excerptTokens": [
8673
+ {
8674
+ "kind": "Content",
8675
+ "text": "readonly toolNames: "
8676
+ },
8677
+ {
8678
+ "kind": "Content",
8679
+ "text": "string[]"
8680
+ },
8681
+ {
8682
+ "kind": "Content",
8683
+ "text": ";"
8684
+ }
8685
+ ],
8686
+ "isReadonly": true,
8687
+ "isOptional": false,
8688
+ "releaseTag": "Beta",
8689
+ "name": "toolNames",
8690
+ "propertyTypeTokenRange": {
8691
+ "startIndex": 1,
8692
+ "endIndex": 2
8693
+ },
8694
+ "isStatic": false,
8695
+ "isProtected": false,
8696
+ "isAbstract": false
8697
+ }
8698
+ ],
8699
+ "extendsTokenRange": {
8700
+ "startIndex": 1,
8701
+ "endIndex": 2
8702
+ },
8703
+ "implementsTokenRanges": []
8704
+ },
8302
8705
  {
8303
8706
  "kind": "Interface",
8304
8707
  "canonicalReference": "@genesislcap/foundation-ai!ServerAIConfig:interface",
@@ -8425,7 +8828,7 @@
8425
8828
  {
8426
8829
  "kind": "TypeAlias",
8427
8830
  "canonicalReference": "@genesislcap/foundation-ai!SubAgentFailureReason:type",
8428
- "docComment": "/**\n * Why a sub-agent run ended without producing a structured result via `completeSubAgent`. Surfaced on the `{ ok: false }` branch of `requestSubAgent` so the parent tool handler can decide how to recover.\n *\n * - `max_iterations` — the sub-agent's tool loop ended without calling its completion tool (hit the iteration cap, or — defensively — a provider ignored forced tool use and returned a free-text turn). - `malformed_tool_call` — the provider repeatedly returned an unparseable tool call (e.g. Gemini `MALFORMED_FUNCTION_CALL`) after retries. - `empty_response` — the model repeatedly returned an empty response after retries. - `unknown_tool_limit` — the model repeatedly called tools that aren't available to it. - `timeout` — the sub-agent did not finish within {@link SubAgentRequestOptions.timeoutMs}; its run was aborted.\n *\n * @beta\n */\n",
8831
+ "docComment": "/**\n * Why a sub-agent run ended without producing a structured result via `completeSubAgent`. Surfaced on the `{ ok: false }` branch of `requestSubAgent` so the parent tool handler can decide how to recover.\n *\n * - `max_iterations` — the sub-agent's tool loop ended without calling its completion tool (hit the iteration cap, or — defensively — a provider ignored forced tool use and returned a free-text turn). - `malformed_tool_call` — the provider repeatedly returned an unparseable tool call (e.g. Gemini `MALFORMED_FUNCTION_CALL`) after retries. - `empty_response` — the model repeatedly returned an empty response after retries. - `unknown_tool_limit` — the model repeatedly called tools that aren't available to it. - `timeout` — the sub-agent did not finish within {@link SubAgentRequestOptions.timeoutMs}; its run was aborted. - `response_truncated` — a turn stopped at the provider's output-token cap with an incomplete tool call; deterministic, so it is not retried.\n *\n * @beta\n */\n",
8429
8832
  "excerptTokens": [
8430
8833
  {
8431
8834
  "kind": "Content",
@@ -8433,7 +8836,7 @@
8433
8836
  },
8434
8837
  {
8435
8838
  "kind": "Content",
8436
- "text": "'max_iterations' | 'malformed_tool_call' | 'empty_response' | 'unknown_tool_limit' | 'timeout'"
8839
+ "text": "'max_iterations' | 'malformed_tool_call' | 'empty_response' | 'unknown_tool_limit' | 'timeout' | 'response_truncated'"
8437
8840
  },
8438
8841
  {
8439
8842
  "kind": "Content",