@yeaft/webchat-agent 1.0.369 → 1.0.371

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.
Binary file
@@ -16,6 +16,6 @@
16
16
  </head>
17
17
  <body>
18
18
  <div id="app"></div>
19
- <script type="module" src="app.bundle.js?v=5377daaf"></script>
19
+ <script type="module" src="app.bundle.js?v=2fb9fc18"></script>
20
20
  </body>
21
21
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "1.0.369",
3
+ "version": "1.0.371",
4
4
  "description": "Remote worker agent for Yeaft Web Code Agent — connects the native Yeaft engine, CLI providers, and workbench tools",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -456,9 +456,9 @@ export function classifyFetchError(err, opts = {}) {
456
456
  * NOTE: there is intentionally NO body / response truncation here. The whole
457
457
  * point of the "copy request" debug feature is to capture EXACTLY what we
458
458
  * sent to the LLM. A truncated copy is worse than useless — it lies about
459
- * what the model saw. If the resulting payload is too large for the debug
460
- * store, the fix is to bound retention (drop oldest turns), not to mutilate
461
- * individual payloads. See `MAX_YEAFT_DEBUG_LOOPS` in `web/stores/chat.js`.
459
+ * what the model saw. Full payloads therefore stay in the Agent's bounded,
460
+ * file-backed debug trace and are fetched for one Turn on demand; live browser
461
+ * events carry summary metadata only.
462
462
  *
463
463
  * @param {{ url: string, method: string, headers: object, body: any }} req
464
464
  * @returns {{ url: string, method: string, headers: object, body: any }}
@@ -4241,6 +4241,10 @@ function handleEngineEvent(event, hctx) {
4241
4241
  break;
4242
4242
 
4243
4243
  case 'tool_exec':
4244
+ // Full tool output is already durable in the file-backed debug trace and
4245
+ // is fetched on demand when the user opens this Turn. Do not mirror it
4246
+ // into the always-on browser store: a long-lived tab otherwise retains
4247
+ // every large Bash/FileRead result even while the debug panel is closed.
4244
4248
  sendSessionEvent({
4245
4249
  type: 'tool_exec',
4246
4250
  turnId: event.turnId,
@@ -4249,7 +4253,6 @@ function handleEngineEvent(event, hctx) {
4249
4253
  name: event.name,
4250
4254
  durationMs: event.durationMs,
4251
4255
  isError: event.isError,
4252
- toolOutput: event.toolOutput,
4253
4256
  }, envelope);
4254
4257
  break;
4255
4258
 
@@ -4299,26 +4302,21 @@ function handleEngineEvent(event, hctx) {
4299
4302
  break;
4300
4303
 
4301
4304
  case 'loop':
4302
- // feat-6af5f9f1 PR B: replaces the old `debug_turn` event. Same
4303
- // payload shape plus turnId + loopNumber + usage.totalTokens.
4304
- // feat-debug-timestamp: also forward `at` (epoch ms) so the
4305
- // debug panel can render per-loop HH:MM:SS.
4305
+ // Live clients only need bounded summary metadata. The complete request,
4306
+ // response, prompt, messages, and tool calls are already persisted by
4307
+ // DebugTrace and fetched for one Turn on demand. Forwarding those growing
4308
+ // snapshots on every loop made a long-lived browser tab retain hundreds
4309
+ // of MiB (or GiB) while the debug panel was closed.
4306
4310
  sendSessionEvent({
4307
4311
  type: 'loop',
4308
4312
  turnId: event.turnId,
4309
4313
  loopNumber: event.loopNumber,
4310
4314
  model: event.model,
4311
- systemPrompt: event.systemPrompt,
4312
- messages: event.messages,
4313
- response: event.response,
4314
- toolCalls: event.toolCalls,
4315
4315
  usage: event.usage,
4316
4316
  latencyMs: event.latencyMs,
4317
4317
  ttfbMs: event.ttfbMs,
4318
4318
  stopReason: event.stopReason,
4319
4319
  at: event.at,
4320
- rawRequest: event.rawRequest,
4321
- rawResponse: event.rawResponse,
4322
4320
  }, envelope);
4323
4321
  break;
4324
4322