@luckydraw/cumulus 1.0.31 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/gateway/static/blex.min.js +13 -7
- package/dist/lib/adaptive-context-budget.d.ts +35 -1
- package/dist/lib/adaptive-context-budget.d.ts.map +1 -1
- package/dist/lib/adaptive-context-budget.js +22 -6
- package/dist/lib/adaptive-context-budget.js.map +1 -1
- package/dist/lib/gateway.d.ts.map +1 -1
- package/dist/lib/gateway.js +28 -3
- package/dist/lib/gateway.js.map +1 -1
- package/dist/tui/components/App.d.ts.map +1 -1
- package/dist/tui/components/App.js +30 -20
- package/dist/tui/components/App.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.0.32
|
|
4
|
+
|
|
5
|
+
Patch release. The adaptive context budget's feedback loop can run in both directions for the first time — its "how full was this prompt?" sensor was pointed at the model's response instead of the prompt. Also picks up `@luckydraw/blex@0.1.19`, so mermaid diagrams render without text spilling outside their boxes.
|
|
6
|
+
|
|
7
|
+
- **The adaptive budget has never once grown, on any thread.** Measured across all 91 `*.adaptive.json` sidecars on the gateway: 0 GROW, 107 SHRINK, 813 FLAT — 49 threads sitting on the 100,000 floor, including every high-traffic one. `recordTurn`'s `tokensUsed` is documented as "tokens actually packed into the prompt", but the gateway fed it `estimateTokens(fullResponse) + userQueryTokens` — the assistant's **output** plus one prompt component, excluding the system prompt, the recent-conversation window and **all retrieved context**, the largest part and the one the budget exists to size. Growth needs `tokensUsed ≥ 55,250` at the floor; the largest value that shape ever produced anywhere is 7,615. Shrink needs TTFT alone, so it worked — hence a one-way ratchet.
|
|
8
|
+
- **One helper, every caller.** New exported `packedPromptTokens()` sums the five real components (instructions, always-include, recent window, RAG, user message). The gateway feeds it from the figures it already computes for `debug.systemPromptBreakdown`; the agentic path overwrites the instructions figure with its own text, since that branch sends a different instruction block. The TUI, which fed a _third_ definition (the RAG slice alone), now uses the same helper — a source-level test fails if either call site diverges again (Rule #8).
|
|
9
|
+
- **Capacity is measured against the budget the retriever actually gets.** `atCapacity` compared against a private `effectiveBudget()` (`0.75×CL − 10,000`) while packing used `getTotalContextBudget()` (`CL × 2/3`) — two notions of "the budget" in one class, ~55k apart at a 775k pin. The private one is deleted, not kept alongside.
|
|
10
|
+
- Policy constants are untouched, but this is **not** a no-op: the grow branch is now reachable, so a thread that packs ≥85% of its budget and answers in under 4s can grow by 1.2×. Whether larger budgets help is a separate, benchable question (task 088 P3 measured dilution as the real failure class) — this restores a mechanism that only ever ran one way, and makes the sidecars record real packed totals.
|
|
11
|
+
- RLM-touching: bench pass — 2/2 real cases, 12/12 ladder, static prompt 1791/1800, speed line held against a same-session control run on unmodified HEAD (the differ's flag against the older `after-162.json` baseline was machine drift, not the change). 1654/1654 tests green (+9), tsc clean, build clean, lint delta 0, three negative controls proven.
|
|
12
|
+
|
|
3
13
|
## v1.0.31
|
|
4
14
|
|
|
5
15
|
Patch release. The stall classifier now gets an output budget a reasoning model can actually finish in — closing the last case where it failed closed and never nudged.
|