@byok-sdk/client 0.10.0 → 0.10.1

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/dist/index.js CHANGED
@@ -13023,6 +13023,7 @@ var TaskRunner = class {
13023
13023
  gitLease,
13024
13024
  gitBaseline,
13025
13025
  summaryParts: [],
13026
+ finalTextParts: [],
13026
13027
  batcher: new ProgressBatcher(
13027
13028
  (seq, events) => {
13028
13029
  const projected = active.egressEnabled ? this.deps.agentEgress?.projectLatestValue({
@@ -13328,6 +13329,9 @@ var TaskRunner = class {
13328
13329
  if (event.type === "usage") {
13329
13330
  active.lastUsage = event;
13330
13331
  }
13332
+ if (event.type === "tool_use" || event.type === "tool_result" || event.type === "needs_approval") {
13333
+ active.finalTextParts.length = 0;
13334
+ }
13331
13335
  if (event.type === "needs_approval") {
13332
13336
  active.batcher.flush();
13333
13337
  const { taskId } = active;
@@ -13361,7 +13365,8 @@ var TaskRunner = class {
13361
13365
  this.sendAgentMessageRecord(outbox, record);
13362
13366
  return;
13363
13367
  }
13364
- const body = finalOutput.trim();
13368
+ const finalTextRun = active.finalTextParts.join("").trim();
13369
+ const body = finalTextRun !== "" ? finalTextRun : finalOutput.trim();
13365
13370
  if (outbox === void 0 || active.agentRef === void 0) {
13366
13371
  active.pendingMessageCompletion = void 0;
13367
13372
  await this.fail(active.taskId, "required Agent message lane is unavailable for this task", false);
@@ -13405,6 +13410,7 @@ var TaskRunner = class {
13405
13410
  }
13406
13411
  if (event.type === "progress") {
13407
13412
  active.summaryParts.push(event.text);
13413
+ active.finalTextParts.push(event.text);
13408
13414
  }
13409
13415
  if (event.type === "artifact") {
13410
13416
  if (active.agentRef !== void 0 && this.deps.agentEgress !== void 0) {