@genesislcap/ai-assistant 15.23.0 → 15.23.1-FUI-0.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 (33) hide show
  1. package/dist/ai-assistant.api.json +269 -5
  2. package/dist/ai-assistant.d.ts +256 -31
  3. package/dist/chat-driver.cjs +125 -58
  4. package/dist/chat-driver.cjs.map +2 -2
  5. package/dist/chat-driver.mjs +125 -58
  6. package/dist/chat-driver.mjs.map +2 -2
  7. package/dist/custom-elements.json +125 -6
  8. package/dist/dts/components/ai-driver/ai-driver.d.ts +63 -0
  9. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  10. package/dist/dts/components/chat-driver/chat-driver.d.ts +7 -0
  11. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  12. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +9 -1
  13. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  14. package/dist/dts/config/config.d.ts +53 -17
  15. package/dist/dts/config/config.d.ts.map +1 -1
  16. package/dist/dts/config/define-stateful-agent.d.ts +16 -1
  17. package/dist/dts/config/define-stateful-agent.d.ts.map +1 -1
  18. package/dist/dts/main/main.d.ts +102 -14
  19. package/dist/dts/main/main.d.ts.map +1 -1
  20. package/dist/dts/utils/context-tokens.d.ts +100 -43
  21. package/dist/dts/utils/context-tokens.d.ts.map +1 -1
  22. package/dist/dts/utils/history-transform.d.ts +7 -1
  23. package/dist/dts/utils/history-transform.d.ts.map +1 -1
  24. package/dist/dts/utils/resolve-context-budget.d.ts +8 -5
  25. package/dist/dts/utils/resolve-context-budget.d.ts.map +1 -1
  26. package/dist/esm/components/chat-driver/chat-driver.js +22 -2
  27. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +92 -0
  28. package/dist/esm/config/define-stateful-agent.js +1 -0
  29. package/dist/esm/main/main.js +170 -27
  30. package/dist/esm/utils/context-tokens.js +331 -106
  31. package/dist/esm/utils/history-transform.js +5 -5
  32. package/dist/esm/utils/resolve-context-budget.js +37 -7
  33. package/package.json +16 -16
@@ -1977,6 +1977,15 @@
1977
1977
  "privacy": "private",
1978
1978
  "description": "Pointer to this session's redux store. `@observable` (GENC-1351 §5.12) so that\n**swapping** it — the in-place session switch/re-key (`switchSession`) —\nforces every store-backed getter binding to re-evaluate against the NEW store.\nWithout this, FAST's per-store slice tracking would leave the view subscribed\nto the old store after a swap and it wouldn't re-render. (A same-store reset via\nredux actions re-renders without this; a store *swap* needs it.)"
1979
1979
  },
1980
+ {
1981
+ "kind": "field",
1982
+ "name": "_gateContextTokens",
1983
+ "type": {
1984
+ "text": "number | undefined"
1985
+ },
1986
+ "privacy": "private",
1987
+ "description": "FoundationAiAssistant.contextTokens as of the last moment no turn was\nrunning — the figure FoundationAiAssistant.contextGate is judged\nagainst (GENC-1582).\n\n**Why the gate reads a held figure and the gauge does not.** They answer\ndifferent questions. The gauge is a meter: \"how much context is in play right\nnow\", and a build that momentarily fills 900k of a 1M window should say so.\nThe gate answers \"may the next turn START\", which is only meaningful when no\nturn is running — the composer is disabled by `busy` throughout one anyway, so\na warning raised mid-turn is unactionable by construction.\n\nReading the live figure meant the pill went amber part-way through every large\nbuild and cleared itself at the end, because a `condenseWhen` agent's context\npeaks mid-turn and is shed before the turn finishes. A signal that fires and\nwithdraws on its own each time teaches people to ignore it.\n\n**Held, not latched.** The distinction matters, because `contextGate` is\ndocumented as derived-never-latched and the reason is a real dead end: a figure\npinned to a conversation that has since shrunk blocks the user out of the very\nactions that would fix it. This holds only for the duration of a turn and is\nrefreshed the moment one settles, so no shrink can outlive it — a compaction\nruns under `compacting` rather than `busy` and therefore updates it as it goes,\nand Clear drops it outright. What it costs is one turn of lag: a turn that\nballoons the resting size does not warn until it ends, which is the same trade\nthe flow-owner soften already makes deliberately.\n\nUnset falls back to the live figure, which is correct wherever there is no held\nvalue yet — first paint, and a remount, both of which happen at rest."
1988
+ },
1980
1989
  {
1981
1990
  "kind": "field",
1982
1991
  "name": "messages",
@@ -2011,6 +2020,17 @@
2011
2020
  ],
2012
2021
  "description": "Whether a state value counts as \"busy\" — a turn is active."
2013
2022
  },
2023
+ {
2024
+ "kind": "method",
2025
+ "name": "rearmContextGate",
2026
+ "privacy": "private",
2027
+ "return": {
2028
+ "type": {
2029
+ "text": "void"
2030
+ }
2031
+ },
2032
+ "description": "Re-arm FoundationAiAssistant.contextGate against the size the turn\njust left behind (GENC-1582).\n\nThe final call of a turn is made AFTER `agentEnd` condensation fires, so by\nthe time a turn settles `contextTokens` is the resting figure rather than the\nmid-turn peak — which is the number the reserve's thresholds are drawn\nagainst.\n\n**Called from BOTH settle paths, and it has to be.** A turn does not end\nthrough the `state` setter: `send()`'s `finally` writes `setState('idle')`\nstraight to the captured session ref, because the element may have\ndisconnected mid-turn, and that block then replicates the parts of the\nsetter's settle that matter. Arming the gate inline in the setter therefore\narmed it on the one path a real turn never takes — the gate silently kept\nfalling back to the live figure and the hold did nothing at all. Found by\ndriving a real UI Builder turn and reading `_gateContextTokens`, which was\n`undefined` from start to finish; no unit test noticed, because the test\nharness sets `state` through the property.\n\nOne method rather than two assignments so the two paths cannot drift again."
2033
+ },
2014
2034
  {
2015
2035
  "kind": "field",
2016
2036
  "name": "busy",
@@ -3965,7 +3985,7 @@
3965
3985
  "type": {
3966
3986
  "text": "ResolvedContextBudget"
3967
3987
  },
3968
- "description": "Context-headroom thresholds for the active model (GENC-1567) — the warning\nand block lines, plus the tail budget compaction aims at.\n\nThe agent's own `contextReserve` is deliberately NOT folded in here. This is\nthe AMBIENT budget, which protects any turn from any agent; a per-agent\nreserve is an additional, larger requirement checked when that agent takes\nownership of a flow, where there is a turn context to resolve its function\nform against.\n\nOverhead is read off `messages` (the Redux mirror) rather than the driver's\nown history, which the compaction plan uses. That is safe rather than sloppy:\n`estimateSystemOverhead` only looks at messages BEFORE the first usage-bearing\none, and the two lists agree completely that early — the drift between mirror\nand driver history is only ever at the tail.",
3988
+ "description": "Context-headroom thresholds for the active model (GENC-1567) — the warning\nand block lines, plus the tail budget compaction aims at.\n\nThe per-agent `contextReserve` IS folded in, via the driver (GENC-1582). It\nused to be described here as a separate, later check made when an agent took\nownership of a flow — but there is no such check, and by flow entry the send\nhas already been allowed. Resolving it here, before the send, is what makes it\na gate rather than a label.\n\nOverhead is read off `messages` (the Redux mirror) rather than the driver's\nown history, which the compaction plan uses. That is safe rather than sloppy:\n`estimateSystemOverhead` only looks at messages BEFORE the first usage-bearing\none, and the two lists agree completely that early — the drift between mirror\nand driver history is only ever at the tail.",
3969
3989
  "readonly": true
3970
3990
  },
3971
3991
  {
@@ -3983,7 +4003,6 @@
3983
4003
  "type": {
3984
4004
  "text": "'ok' | 'warn' | 'blocked'"
3985
4005
  },
3986
- "description": "How close this conversation is to the model's context window (GENC-1567).\n\n**Derived, never latched** — the opposite of FoundationAiAssistant.blocked.\nA budget wall stays set because nothing the user does fixes it; this clears\nitself the moment the conversation shrinks, which is precisely what the user\nis being asked to do. The two must not be conflated: `blocked` is also\ndeliberately preserved across `resetSession`, and a context gate obviously\nmust not survive starting a new chat.\n\n**A flow in progress is never blocked, only warned.** Machine state lives\noutside the transcript, so a stateful flow is not desynced by compaction —\nbut the summary can still drop detail the flow's own prompt leans on, and\nblocking mid-journey would strand the user between a flow they cannot finish\nand a compaction that is a poor idea right there. Letting the flow complete\nand gating on the way out is the lesser harm; the headroom reserve exists so\nthis is rare rather than routine.",
3987
4006
  "readonly": true
3988
4007
  },
3989
4008
  {
@@ -6237,6 +6256,24 @@
6237
6256
  "default": "4",
6238
6257
  "description": "Fallback ratio for messages with no measured anchor nearby. Shared with\n`condense-history.ts`, which uses it for the same purpose (reporting bytes\nshed as tokens) — one definition so the two never drift."
6239
6258
  },
6259
+ {
6260
+ "kind": "function",
6261
+ "name": "estimatePreambleTokens",
6262
+ "return": {
6263
+ "type": {
6264
+ "text": "number"
6265
+ }
6266
+ },
6267
+ "parameters": [
6268
+ {
6269
+ "name": "input",
6270
+ "type": {
6271
+ "text": "{\n systemPrompt?: string;\n toolDefinitions?: readonly { name: string }[];\n tailContext?: string;\n}"
6272
+ }
6273
+ }
6274
+ ],
6275
+ "description": "Token cost of everything a request carries that is NOT a message — the system\nprompt, the tool definitions, and the framed tail (GENC-1582).\n\n**Why this is measured per call rather than derived.** The preamble used to be\ninferred as a residual: the first measured prompt minus the char estimate of the\nmessages it covered. That derivation is accurate at the time, but it is taken\nONCE and never updated, while the preamble changes every time the agent changes\n— each agent brings its own system prompt and its own tool surface. Every\nattempt to patch the staleness downstream made it worse; the cap that used to\nsit in `calibrate` compared stored CHARACTERS against a wire-measured TOKEN\ntotal and collapsed the preamble to zero on any condensed session, which is the\nsame category error this module exists to fix. Measuring what is actually being\nsent removes the whole class of problem.\n\n**What is measured and what is not.** From the isa-platform session of\n2026-09-03 (project 067f0fca, `claude-sonnet-5`), the first anchor measured\n5,249 tokens against a single 290-character user message, so:\n\n| quantity | value | how |\n|---|---|---|\n| whole preamble, Bootstrap's first call | **5,173 tok** | MEASURED (5,249 − ~76 for the message) |\n| system prompt | **8,387 chars** | MEASURED (diag `turn` records it verbatim) |\n| system prompt in tokens | 2,097 | prose ratio applied to the measured chars |\n| 3 tool definitions | 3,076 tok (~1,025/tool) | **INFERRED as the residual** |\n\nThe tools figure is a residual in TOKENS, not a ratio: diagnostics record\n`toolNames` only, never the schemas, so their character count is unavailable and\n`PREAMBLE_JSON_CHARS_PER_TOKEN` could not be calibrated from it. It is consistent\nwith 3 — ~1,025 tokens per tool implies ~3,075 characters of schema per tool,\nwhich is the right order for a Create tool carrying descriptions and enum\noptions — but consistent is not measured, and the next person should not read it\nas such. To calibrate it properly, log serialized schema characters alongside the\nfirst anchor for one real session and solve for the ratio.\n\n`tailContext` counts. It is regenerated per turn rather than accumulated, so\ncompaction cannot remove it any more than it can remove the system prompt, which\nis the property that matters to every consumer of this figure."
6276
+ },
6240
6277
  {
6241
6278
  "kind": "variable",
6242
6279
  "name": "COMPACTION_SUMMARY_TOKEN_ESTIMATE",
@@ -6296,9 +6333,16 @@
6296
6333
  "type": {
6297
6334
  "text": "readonly ChatMessage[]"
6298
6335
  }
6336
+ },
6337
+ {
6338
+ "name": "preambleTokens",
6339
+ "optional": true,
6340
+ "type": {
6341
+ "text": "number"
6342
+ }
6299
6343
  }
6300
6344
  ],
6301
- "description": "Per-message token estimates, calibrated against measured prompt sizes wherever\nthe transcript provides them.\n\n**How the calibration works.** `inputTokens` on the message produced by a call\nis the size of that call's WHOLE prompt (the cache buckets break it down\nrather than add to it), so it covers `history[0 … i-1]`. Two consecutive\nanchors therefore bracket a segment whose exact measured cost is their\ndifference: `inputTokens[b] − inputTokens[a]` is what `history[a … b-1]` cost.\nWithin a segment the measured total is redistributed across its messages in\nproportion to their baseline estimate — segment granularity is all that is\nneeded, since compaction only ever cuts on boundaries.\n\nA non-positive delta means history SHRANK between the two calls (a compaction\nor a `condenseWhen` collapse landed in between); there is nothing to\ndistribute, so those messages keep their baseline.\n\nThe region before the first anchor keeps its baseline too: that anchor's\nmeasurement also contains the system prompt and tool definitions, which are\nnot attributable to any message — see estimateSystemOverhead."
6345
+ "description": "Per-message token estimates — each message's share of calibrate's\ntotal, in proportion to how big that message is NOW.\n\nUsed to choose and evaluate a compaction cut, so what matters is that the\nshares are in the same unit as the total and that they track the current size\nof each message. A payload `condenseWhen` has stubbed costs what the stub\ncosts; under the segment-chained scheme this replaced, it kept the cost it had\nwhen it was full and the difference was merely redistributed to its neighbours.\n\nSums to exactly `estimateContextTokens(history) - estimateSystemOverhead(history)`."
6302
6346
  },
6303
6347
  {
6304
6348
  "kind": "function",
@@ -6314,9 +6358,16 @@
6314
6358
  "type": {
6315
6359
  "text": "readonly ChatMessage[]"
6316
6360
  }
6361
+ },
6362
+ {
6363
+ "name": "preambleTokens",
6364
+ "optional": true,
6365
+ "type": {
6366
+ "text": "number"
6367
+ }
6317
6368
  }
6318
6369
  ],
6319
- "description": "Context consumed by everything that is NOT a message — the system prompt and\nthe tool definitions.\n\nDerived rather than guessed: the first measured prompt covers the messages\nbefore it plus that fixed preamble, so subtracting our estimate of those\nmessages leaves the preamble. Floored at zero, since an over-estimate of the\nearly messages would otherwise produce a negative overhead.\n\nIt matters for the gate because it is real context the user never sees in the\ntranscript, it does not shrink when history does, and on an agent with a large\ntool surface it is far from negligible."
6370
+ "description": "Context consumed by everything that is NOT a message — the system prompt and\nthe tool definitions.\n\nDerived rather than guessed: the first measured prompt covers the messages\nbefore it plus the preamble, so subtracting our estimate of those messages\nleaves the preamble. Floored at zero, since an over-estimate of the early\nmessages would otherwise produce a negative overhead, and capped at what the\ncurrent total has left after paying for each message's characters — see\ncalibrate for why that cap is load-bearing.\n\nIt is NOT a constant, which the first cut of this assumed. Each agent brings its\nown system prompt and its own tool surface, so it steps up and down as agents\nhand over; what is true is that it does not shrink when the MESSAGES do.\n\nIt matters for the gate because it is real context the user never sees in the\ntranscript, and on an agent with a large tool surface it is far from negligible."
6320
6371
  },
6321
6372
  {
6322
6373
  "kind": "function",
@@ -6334,7 +6385,7 @@
6334
6385
  }
6335
6386
  }
6336
6387
  ],
6337
- "description": "Total estimated context for a transcript — the preamble plus every message.\n\nOn a transcript with measured anchors this lands close to the last observed\n`inputTokens` by construction; the value of computing it rather than reading\nthat figure is that it stays defined for a hypothetical history (the tail a\ncompaction would leave behind), which is what projectCompaction needs."
6388
+ "description": "Total estimated context for a transcript — the figure the gauge shows and the\ncomposer gate is judged against.\n\nThe most recent usable measurement plus the char estimate of everything\nappended since it, which is as close as anything gets to \"how big is the prompt\nwe are about to send\". See calibrate for why it is anchored on that one\nmeasurement rather than accumulated across all of them.\n\nStays defined for a hypothetical history (the tail a compaction would leave\nbehind), which is what projectCompaction needs."
6338
6389
  },
6339
6390
  {
6340
6391
  "kind": "function",
@@ -6356,9 +6407,16 @@
6356
6407
  "type": {
6357
6408
  "text": "readonly ChatMessage[]"
6358
6409
  }
6410
+ },
6411
+ {
6412
+ "name": "preambleTokens",
6413
+ "optional": true,
6414
+ "type": {
6415
+ "text": "number"
6416
+ }
6359
6417
  }
6360
6418
  ],
6361
- "description": "Estimated size of the request that will actually be SENT, given the stored\nhistory it was derived from.\n\nThe two differ by design and can differ by a lot. `condenseWhen` replaces spent\ntool payloads with short stubs, and multi-agent masking blanks another agent's\npayloads — both on a copy, leaving stored history full-fat for the UI and the\nlog. A guard that measured stored history would therefore refuse turns whose\nreal request is a fraction of the size.\n\nNaively estimating the transformed copy does NOT work either, and the reason is\nsubtle: `inputTokens` anchors live on the stored messages and measured the\nuntransformed prompt, so calibrating against them re-inflates the estimate back\nto roughly what it was before the transform — exactly the figure we were trying\nto avoid.\n\nSo the calibrated total is scaled by how much smaller the request is in\ncharacters. That keeps the accuracy the measurements buy while still reflecting\nwhat the transform removed. The preamble is carried across unscaled: the system\nprompt and tool definitions are not what condensation touches."
6419
+ "description": "Estimated size of the request that will actually be SENT, given the stored\nhistory it was derived from.\n\nThe two differ by design and can differ by a lot. `condenseWhen` replaces spent\ntool payloads with short stubs, and multi-agent masking blanks another agent's\npayloads — both on a copy, leaving stored history full-fat for the UI and the\nlog. A guard that measured stored history would therefore refuse turns whose\nreal request is a fraction of the size.\n\nSo the request is estimated from its OWN characters, plus the preamble. Nothing\nis scaled: `requestHistory` IS the payload, so `baselineTokens` is already\nmeasuring the right bytes, and there is no transform left to correct for.\n\n**This previously applied a ratio, and a docblock here previously claimed it did\nnot.** Both were wrong, and the second is the part worth recording. The original\nexpression scaled the stored-history total by `requestChars / storedChars`,\nreasoning that `inputTokens` \"measured the untransformed prompt\". That premise is\nfalse — `inputTokens` measures the prompt that was SENT, transform already\napplied — and it is what made every figure in this module too large. The GENC-1582\nrewrite claimed to drop the ratio but only re-factored it: `scale` is\n`(total - overhead) / storedBaseline`, so `overhead + requestBaseline * scale` is\nthe identical expression rearranged. With the total now anchored on a measurement\nof an already-condensed prompt, that discounted the same shrinkage twice —\nmeasured at **5,034 against a last measured prompt of 120,000**, i.e. a guard that\nbelieved it had 995k spare. Under-estimating is the one direction this figure must\nnot err in, since its only job is refusing an overflow.\n\nThe preamble must be passed in for the same reason: `requestBaseline` counts\nmessage characters, and the system prompt and tool definitions are not messages,\nso without it the guard silently ignores the entire tool surface."
6362
6420
  },
6363
6421
  {
6364
6422
  "kind": "function",
@@ -6387,6 +6445,13 @@
6387
6445
  "type": {
6388
6446
  "text": "number"
6389
6447
  }
6448
+ },
6449
+ {
6450
+ "name": "preambleTokens",
6451
+ "optional": true,
6452
+ "type": {
6453
+ "text": "number"
6454
+ }
6390
6455
  }
6391
6456
  ],
6392
6457
  "description": "Project the effect of compacting at `cut`, WITHOUT running the summarizer.\n\nThis is what lets a gate tell the difference between \"compaction will unblock\nyou\" and \"compaction will spend a call and leave you exactly where you are\" —\na distinction the old boolean `canCompact()` could not express, because it\nanswered only whether a legal cut existed. A legal cut that covers four short\nmessages while a large tool loop sits in the tail is legal and useless.\n\nThe system preamble is carried across unchanged: compaction removes messages,\nnever the system prompt or the tool definitions."
@@ -6401,6 +6466,14 @@
6401
6466
  "module": "src/utils/context-tokens.ts"
6402
6467
  }
6403
6468
  },
6469
+ {
6470
+ "kind": "js",
6471
+ "name": "estimatePreambleTokens",
6472
+ "declaration": {
6473
+ "name": "estimatePreambleTokens",
6474
+ "module": "src/utils/context-tokens.ts"
6475
+ }
6476
+ },
6404
6477
  {
6405
6478
  "kind": "js",
6406
6479
  "name": "COMPACTION_SUMMARY_TOKEN_ESTIMATE",
@@ -7054,6 +7127,13 @@
7054
7127
  "type": {
7055
7128
  "text": "number"
7056
7129
  }
7130
+ },
7131
+ {
7132
+ "name": "preambleTokens",
7133
+ "optional": true,
7134
+ "type": {
7135
+ "text": "number"
7136
+ }
7057
7137
  }
7058
7138
  ],
7059
7139
  "description": "Index at which the verbatim tail begins — everything before it gets summarized\n— chosen so the tail fits `tailTokenBudget` (GENC-1567).\n\nWalks back from the end accumulating estimated tokens until the next message\nwould overrun the budget, then snaps FORWARD to the nearest safe boundary.\nForward is the correct direction: it can only shrink the tail, so the budget\nstill holds after the snap, whereas snapping backwards could blow it.\n\nReturns `null` when the whole transcript already fits (nothing worth doing) or\nwhen no safe boundary exists ahead of the walk — e.g. a tail that is one\nenormous, indivisible tool group, which no cut can shrink because a cut cannot\nsplit a message."
@@ -8712,6 +8792,15 @@
8712
8792
  "privacy": "private",
8713
8793
  "default": "systemPrompt"
8714
8794
  },
8795
+ {
8796
+ "kind": "field",
8797
+ "name": "lastPreambleTokens",
8798
+ "type": {
8799
+ "text": "number | undefined"
8800
+ },
8801
+ "privacy": "private",
8802
+ "description": "Preamble cost of the most recent request, set at the request-build site.\nRead through ChatDriver.getPreambleTokens."
8803
+ },
8715
8804
  {
8716
8805
  "kind": "field",
8717
8806
  "name": "toolDefinitions",
@@ -10002,6 +10091,16 @@
10002
10091
  ],
10003
10092
  "description": "Destructively compact older turns into a single `compacted-summary` message\n(GENC-1351 §5.7). Summarizes everything before a clean recent-tail boundary\nvia the registry-default provider's one-shot `prompt()`, then **atomically**\nreplaces the covered turns with one summary message at the head — history is\nmutated only on success. Rolling: any existing head summary is folded into\nthe new one. Returns the created summary message, or `null` when there is\nnothing worth compacting or the default provider cannot summarize."
10004
10093
  },
10094
+ {
10095
+ "kind": "method",
10096
+ "name": "getPreambleTokens",
10097
+ "return": {
10098
+ "type": {
10099
+ "text": "number | undefined"
10100
+ }
10101
+ },
10102
+ "description": "{@inheritDoc AiDriver.getPreambleTokens}"
10103
+ },
10005
10104
  {
10006
10105
  "kind": "method",
10007
10106
  "name": "isBusy",
@@ -11270,6 +11369,16 @@
11270
11369
  ],
11271
11370
  "description": "{@inheritDoc AiDriver.canCompact}"
11272
11371
  },
11372
+ {
11373
+ "kind": "method",
11374
+ "name": "getPreambleTokens",
11375
+ "return": {
11376
+ "type": {
11377
+ "text": "number | undefined"
11378
+ }
11379
+ },
11380
+ "description": "{@inheritDoc AiDriver.getPreambleTokens}"
11381
+ },
11273
11382
  {
11274
11383
  "kind": "method",
11275
11384
  "name": "getCompactionPlan",
@@ -11430,6 +11539,16 @@
11430
11539
  ],
11431
11540
  "description": "{@inheritDoc AiDriver.primeRestoredAgentState}"
11432
11541
  },
11542
+ {
11543
+ "kind": "method",
11544
+ "name": "getContextReserve",
11545
+ "return": {
11546
+ "type": {
11547
+ "text": "ContextReserveResolution | undefined"
11548
+ }
11549
+ },
11550
+ "description": "{@inheritDoc AiDriver.getContextReserve}\n\nTwo cases, because routing has two modes and they need opposite answers."
11551
+ },
11433
11552
  {
11434
11553
  "kind": "method",
11435
11554
  "name": "getActiveAgent",
@@ -5,6 +5,36 @@ import type { InteractionContext } from '../../types/interaction-context';
5
5
  import type { CompactionProjection } from '../../utils/context-tokens';
6
6
  import type { CompactionPlanOptions } from '../../utils/history-transform';
7
7
  import type { ContextGuardPolicy, TurnSnapshot } from '../chat-driver/chat-driver';
8
+ /**
9
+ * How much context headroom the next turn needs, and where that figure came from
10
+ * (GENC-1582).
11
+ *
12
+ * @internal
13
+ */
14
+ export interface ContextReserveResolution {
15
+ /** Tokens to keep free for one turn — the winning agent's peak growth. */
16
+ tokens: number;
17
+ /**
18
+ * Extra tokens above {@link ContextReserveResolution.tokens} at which the
19
+ * warning appears, when the winning agent declared one. Travels WITH the winner
20
+ * rather than being resolved separately: the two figures describe the same
21
+ * agent's turn, and pairing a lean agent's warning with a hungry agent's block
22
+ * would put the warning on the wrong side of it.
23
+ */
24
+ warnAheadTokens?: number;
25
+ /** The agent whose `contextReserve` this is. */
26
+ agentName: string;
27
+ /**
28
+ * Why this agent's reserve governs — which is what lets a blocked composer say
29
+ * something TRUE about an agent the user has not invoked yet.
30
+ *
31
+ * `locked`: a user pin or a flow-owner lock means the next turn can only go to
32
+ * this agent, so its reserve is the whole requirement. `reachable-max`: routing
33
+ * is automatic, so the turn could land on any agent the classifier can pick, and
34
+ * the hungriest of them is the one that has to fit.
35
+ */
36
+ basis: 'locked' | 'reachable-max';
37
+ }
8
38
  /** @internal */
9
39
  export interface AllAgentSummary {
10
40
  name: string;
@@ -86,6 +116,39 @@ export interface AiDriver extends EventTarget {
86
116
  * retain the active config implement it.
87
117
  */
88
118
  getActiveAgent?(): AgentConfig | undefined;
119
+ /**
120
+ * Headroom the next turn could need, and which agent set that requirement
121
+ * (GENC-1582). `undefined` when no agent the turn could land on declares a
122
+ * `contextReserve`, which leaves the ambient default in force.
123
+ *
124
+ * The host cannot work this out for itself: it depends on the user pin, the
125
+ * flow-owner lock and the classifier's candidate set, none of which it can see.
126
+ * Reading the ACTIVE agent instead — which is what the gate did first — asks the
127
+ * wrong question, because the agent that last ran is not the agent about to run.
128
+ * Under automatic routing they are routinely different, and the turn that hands
129
+ * over is exactly the one that needs the room.
130
+ *
131
+ * Optional — only drivers that route implement it.
132
+ */
133
+ getContextReserve?(): ContextReserveResolution | undefined;
134
+ /**
135
+ * Token cost of the last request's preamble — system prompt, tool definitions
136
+ * and framed tail (GENC-1582). `undefined` before the first call of a turn.
137
+ *
138
+ * A live getter rather than a field stamped on each message, deliberately: every
139
+ * consumer wants the CURRENT preamble, never its history, and a message field
140
+ * would mean a type change in `@genesislcap/foundation-ai` plus churn in every
141
+ * persisted session for a value nobody reads twice.
142
+ *
143
+ * It exists because the preamble cannot be derived reliably. Inferring it as
144
+ * "first measured prompt minus the messages it covered" is accurate once and then
145
+ * goes stale, since each agent brings its own prompt and tool surface — and every
146
+ * attempt to compensate downstream ended up comparing stored characters against
147
+ * wire tokens. The driver is the only place that knows what it just sent.
148
+ *
149
+ * Optional — only drivers that build requests implement it.
150
+ */
151
+ getPreambleTokens?(): number | undefined;
89
152
  /**
90
153
  * Set the mid-loop context guard (GENC-1567). `undefined` disables it.
91
154
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ai-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/ai-driver/ai-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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WAAW,EAAE,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,eAAe,EAAE,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAErB;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,sBAAsB,CAAC,IAAI,aAAa,CAAC,eAAe,CAAC,CAAC;IAE1D;;;;;OAKG;IACH,qBAAqB,IAAI,MAAM,CAAC;IAEhC;;;;OAIG;IACH,OAAO,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB"}
@@ -272,6 +272,11 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
272
272
  */
273
273
  private interactionContexts;
274
274
  private systemPrompt?;
275
+ /**
276
+ * Preamble cost of the most recent request, set at the request-build site.
277
+ * Read through {@link ChatDriver.getPreambleTokens}.
278
+ */
279
+ private lastPreambleTokens?;
275
280
  /**
276
281
  * Resolved tool definitions visible to the LLM. Folds mutate this in place
277
282
  * (push/pop on open/close). When `toolDefinitionsFactory` is set, this is
@@ -944,6 +949,8 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
944
949
  * nothing worth compacting or the default provider cannot summarize.
945
950
  */
946
951
  compact(options?: CompactionPlanOptions): Promise<ChatMessage | null>;
952
+ /** {@inheritDoc AiDriver.getPreambleTokens} */
953
+ getPreambleTokens(): number | undefined;
947
954
  isBusy(): boolean;
948
955
  /**
949
956
  * Wire a parent driver as the host for this driver's interactions. When set,
@@ -1 +1 @@
1
- {"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,kBAAkB,EAClB,cAAc,EAEd,cAAc,EACd,gBAAgB,EAGhB,WAAW,EAIX,cA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;IACG,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAqDrF,wFAAwF;IACxF,OAAO,CAAC,OAAO;IAKf;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;;;;;;;;OASG;IACH,OAAO,CAAC,cAAc;IAMtB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA+BxB,uFAAuF;IACvF,OAAO,CAAC,QAAQ;IAsChB,OAAO,CAAC,aAAa;IAQrB,8EAA8E;IAC9E,OAAO,CAAC,SAAS;IAWjB,mFAAmF;IACnF,OAAO,CAAC,2BAA2B;YAkCrB,WAAW;IAupCzB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,eAAe;CAoBxB"}
@@ -5,7 +5,7 @@ import type { DiagnosticEntry } from '../../state/persistence/diagnostics';
5
5
  import type { InteractionContext } from '../../types/interaction-context';
6
6
  import type { CompactionProjection } from '../../utils/context-tokens';
7
7
  import type { CompactionPlanOptions } from '../../utils/history-transform';
8
- import type { AiDriver, AllAgentSummary } from '../ai-driver/ai-driver';
8
+ import type { AiDriver, AllAgentSummary, ContextReserveResolution } from '../ai-driver/ai-driver';
9
9
  import { type ContextGuardPolicy, type TurnSnapshot } from '../chat-driver/chat-driver';
10
10
  /**
11
11
  * Why {@link OrchestratingDriver.classify} returned the agent it did — reported on the
@@ -201,6 +201,8 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
201
201
  compact(options?: CompactionPlanOptions): Promise<ChatMessage | null>;
202
202
  /** {@inheritDoc AiDriver.canCompact} */
203
203
  canCompact(options?: CompactionPlanOptions): boolean;
204
+ /** {@inheritDoc AiDriver.getPreambleTokens} */
205
+ getPreambleTokens(): number | undefined;
204
206
  /** {@inheritDoc AiDriver.getCompactionPlan} */
205
207
  getCompactionPlan(options?: CompactionPlanOptions): CompactionProjection | null;
206
208
  /** Delegates to the inner {@link ChatDriver} — turns are captured there. */
@@ -213,6 +215,12 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
213
215
  continueFromHistory(transientPrimer?: ChatMessage[]): Promise<ChatDriverResult>;
214
216
  /** {@inheritDoc AiDriver.primeRestoredAgentState} */
215
217
  primeRestoredAgentState(snapshots: Record<string, unknown>): void;
218
+ /**
219
+ * {@inheritDoc AiDriver.getContextReserve}
220
+ *
221
+ * Two cases, because routing has two modes and they need opposite answers.
222
+ */
223
+ getContextReserve(): ContextReserveResolution | undefined;
216
224
  /** {@inheritDoc AiDriver.getActiveAgent} */
217
225
  getActiveAgent(): AgentConfig | undefined;
218
226
  private applyAgent;
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrating-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/orchestrating-driver/orchestrating-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EACV,WAAW,EAKZ,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAI3E,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EAClB,MAAM,4BAA4B,CAAC;AAkBpC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,kDAAkD;AAChD,YAAY;AACd,6EAA6E;GAC3E,UAAU;AACZ;;;;;GAKG;GACD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AC,OAAO,CAAC,EAAE,qBAAqB,GAAG,oBAAoB,GAAG,IAAI;IAI/E,4EAA4E;IAC5E,gBAAgB,IAAI,aAAa,CAAC,YAAY,CAAC;IAI/C,sGAAsG;IACtG,sBAAsB,IAAI,aAAa,CAAC,eAAe,CAAC;IAIlD,cAAc,CAClB,OAAO,EAAE,WAAW,EAAE,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,eAAe,EAAE,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC;IAgBd,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;YAmC7E,mBAAmB;IAwJ3B,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrF,qDAAqD;IACrD,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIjE,4CAA4C;IAC5C,cAAc,IAAI,WAAW,GAAG,SAAS;YAI3B,UAAU;IA2GxB;;;;;;;;;;OAUG;YACW,kBAAkB;IAuBhC;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAKd;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB9B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAgCd,QAAQ;IAmMtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAe5B"}
1
+ {"version":3,"file":"orchestrating-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/orchestrating-driver/orchestrating-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEZ,M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GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrF,qDAAqD;IACrD,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIjE;;;;OAIG;IACH,iBAAiB,IAAI,wBAAwB,GAAG,SAAS;IAiDzD,4CAA4C;IAC5C,cAAc,IAAI,WAAW,GAAG,SAAS;YAI3B,UAAU;IA2GxB;;;;;;;;;;OAUG;YACW,kBAAkB;IAuBhC;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAKd;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB9B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAgCd,QAAQ;IAmMtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAe5B"}
@@ -118,21 +118,55 @@ export type ProviderInput = string | ((ctx: SystemPromptContext) => string | Pro
118
118
  */
119
119
  export type TemperatureInput = number | ((ctx: SystemPromptContext) => number | Promise<number>);
120
120
  /**
121
- * Context headroom an agent reserves for itself, in tokens.
121
+ * Context headroom an agent reserves for itself (GENC-1582).
122
122
  *
123
- * A plain number, unlike the value-or-resolver shape `provider` / `temperature` /
124
- * `resumable` use. The resolver form was drafted for it and removed before
125
- * release: the gate is recomputed from a synchronous getter with no turn context
126
- * to resolve against, so no path could ever have invoked one. Accepting a
127
- * type-correct option that is guaranteed to do nothing is worse than not
128
- * offering it — a warning after the fact still leaves the configuration inert.
123
+ * Two figures, because a turn has two costs and only one of them is permanent.
129
124
  *
130
- * It can widen to a resolver later without breaking a caller, since every
131
- * existing `number` stays valid.
125
+ * @beta
126
+ */
127
+ export interface ContextReserve {
128
+ /**
129
+ * Tokens that must be free before one of this agent's turns may START — the
130
+ * agent's PEAK growth, not its lasting cost.
131
+ *
132
+ * The peak is the binding figure even for an agent that sheds most of it again:
133
+ * `condenseWhen` stubs a spent payload at the end of the turn, so the room has
134
+ * to be there while the turn is running, before any of that fires.
135
+ */
136
+ tokens: number;
137
+ /**
138
+ * Extra tokens ABOVE {@link ContextReserve.tokens} at which the warning
139
+ * appears. Omit to fall back to `chatConfig.context.warnMultiplier`.
140
+ *
141
+ * The figure that belongs here is what one of this agent's turns costs
142
+ * PERMANENTLY — its growth measured after condensation, not at its peak. That
143
+ * makes the warning land exactly two turns before the block: at the warning
144
+ * line there is room for a full turn plus the residue it leaves, which is one
145
+ * turn, and then room for one more.
146
+ *
147
+ * It exists because the multiplier cannot express that. `warnMultiplier` scales
148
+ * the whole reserve, so an agent that peaks at 400k and keeps 30k gets a warning
149
+ * 800k below the window — a line every one of its turns crosses transiently and
150
+ * then clears, which is noise rather than a signal.
151
+ */
152
+ warnAheadTokens?: number;
153
+ }
154
+ /**
155
+ * Context headroom an agent reserves for itself: a token count, or a
156
+ * {@link ContextReserve} when the agent also wants to say where the warning goes.
157
+ *
158
+ * NOT the value-or-resolver shape `provider` / `temperature` / `resumable` use.
159
+ * The resolver form was drafted and removed before release: the gate is recomputed
160
+ * from a synchronous getter with no turn context to resolve against, so no path
161
+ * could ever have invoked one. Accepting a type-correct option guaranteed to do
162
+ * nothing is worse than not offering it.
163
+ *
164
+ * The object arm was added the way the plain form's docblock anticipated —
165
+ * additively, so every existing `number` stays valid and means what it did.
132
166
  *
133
167
  * @beta
134
168
  */
135
- export type ContextReserveInput = number;
169
+ export type ContextReserveInput = number | ContextReserve;
136
170
  /**
137
171
  * Tool-call mode for an agent. Either a static `ChatToolChoice` (resolved
138
172
  * once) or a function resolved each tool-loop iteration — pick the function form
@@ -506,13 +540,15 @@ interface BaseAgentConfig {
506
540
  * room it needs so that it does not have to be. An agent whose flow runs a long
507
541
  * tool loop, or returns large payloads, needs more than the global default.
508
542
  *
509
- * **When it takes effect.** The reserve is read from the agent that is already
510
- * ACTIVE, so it governs the gate from that agent's next send onwards — one turn
511
- * later than a true pre-flight. It is deliberately not enforced at flow entry:
512
- * `flow-owner-changed` fires while the driver is already routing the turn, so
513
- * gating there would mean aborting a turn in flight. An agent that activates
514
- * mid-turn therefore gets its first turn under the global reserve; the mid-loop
515
- * context guard is what stops that turn running away.
543
+ * **When it takes effect.** Before the send, as a real pre-flight (GENC-1582).
544
+ * The driver resolves it against how routing is currently constrained — the
545
+ * pinned or flow-owning agent when there is one, otherwise the largest reserve
546
+ * among the agents the classifier could route to — so a turn is refused before
547
+ * it can start rather than after. This used to read the agent that was already
548
+ * ACTIVE, which is a different agent from the one about to run whenever the
549
+ * orchestrator is doing its job, and the handover turn is exactly the one that
550
+ * needs the room. The mid-loop context guard remains the backstop for a turn
551
+ * that outgrows what it reserved.
516
552
  *
517
553
  * **Set this from measurement, not from a guess.** Per-turn `inputTokens` is
518
554
  * recorded for every call, so a single real run of the flow tells you its peak
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,WAAW,EACX,YAAY,EACZ,4BAA4B,EAC5B,kBAAkB,EAClB,cAAc,GACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,MAAM,EAAE,WAAW,CAAC;IACpB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,iCAAiC;IACjC,SAAS,EAAE,MAA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