flavor-code 1.3.7 → 1.3.8

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.
@@ -16,7 +16,7 @@ import {
16
16
  redactErrorText,
17
17
  transcriptReducer,
18
18
  withTimeout
19
- } from "./chunk-K2AOT2BI.js";
19
+ } from "./chunk-GAQJZBOF.js";
20
20
  import "./chunk-IG4Z23CL.js";
21
21
  import {
22
22
  Box_default,
@@ -4,7 +4,7 @@ import {
4
4
  message,
5
5
  redactErrorText,
6
6
  redactSecrets
7
- } from "./chunk-K2AOT2BI.js";
7
+ } from "./chunk-GAQJZBOF.js";
8
8
 
9
9
  // src/rpc/server.ts
10
10
  import { createInterface } from "readline";
@@ -20649,7 +20649,7 @@ async function createProductionRuntime(options) {
20649
20649
  maxEntries: config.memory.maxEntries,
20650
20650
  maxEntryChars: config.memory.maxEntryChars
20651
20651
  }) : void 0;
20652
- const autoStoredContents = [];
20652
+ const autoStoredContents = /* @__PURE__ */ new Map();
20653
20653
  let memoryBehavior = DEFAULT_MEMORY_BEHAVIOR;
20654
20654
  if (memoryStore !== void 0) {
20655
20655
  try {
@@ -21400,7 +21400,7 @@ async function createProductionRuntime(options) {
21400
21400
  });
21401
21401
  const memoryCoordinator = memoryStore !== void 0 ? new MemoryCoordinator({
21402
21402
  review: (taskId, candidates) => {
21403
- memoryReviews.offer(taskId, candidates);
21403
+ if (memoryLifecycle.taskId === taskId) memoryReviews.offer(taskId, candidates);
21404
21404
  },
21405
21405
  remember: async (taskId, candidates) => {
21406
21406
  let stored = 0;
@@ -21408,7 +21408,9 @@ async function createProductionRuntime(options) {
21408
21408
  const result = await memoryStore.rememberForTask(taskId, candidate);
21409
21409
  if (result.added) {
21410
21410
  stored += 1;
21411
- autoStoredContents.push(candidate.content);
21411
+ const contents = autoStoredContents.get(taskId) ?? [];
21412
+ contents.push(candidate.content);
21413
+ autoStoredContents.set(taskId, contents);
21412
21414
  }
21413
21415
  }
21414
21416
  if (stored > 0) await refreshMemoryState();
@@ -21425,34 +21427,85 @@ async function createProductionRuntime(options) {
21425
21427
  if (memoryCoordinator !== void 0) {
21426
21428
  memoryCoordinator.onError = (error) => diagnostics.push(`Long-term memory extraction failed: ${message(error)}`);
21427
21429
  }
21430
+ const backgroundMemoryTasks = /* @__PURE__ */ new Map();
21431
+ const memoryTaskKey = (task) => `${task.taskId}:${task.transcriptHash}`;
21432
+ const captureMemoryTask = () => {
21433
+ const messageStart = memoryLifecycle.messageStart ?? 0;
21434
+ const messages = harness.main.context.snapshot().messages.slice(messageStart);
21435
+ return {
21436
+ taskId: memoryLifecycle.taskId ?? sessionId,
21437
+ messageStart,
21438
+ messages,
21439
+ transcriptHash: memoryTranscriptHash(messages)
21440
+ };
21441
+ };
21442
+ const evaluateMemoryTask = async (task) => {
21443
+ autoStoredContents.delete(task.taskId);
21444
+ const finalization = memoryCoordinator === void 0 || !config.memory.autoExtract || options.approvalPolicy === "deny" ? { evaluated: true, candidates: false, stored: 0 } : await memoryCoordinator.finalize(task.taskId, task.messages);
21445
+ if (!finalization.evaluated) {
21446
+ if (memoryLifecycle.taskId === task.taskId && memoryLifecycle.transcriptHash === task.transcriptHash) {
21447
+ memoryLifecycle = { status: "active", taskId: task.taskId, messageStart: task.messageStart };
21448
+ await persist();
21449
+ }
21450
+ return "Long-term-memory evaluation failed; retry /finish after checking diagnostics.";
21451
+ }
21452
+ if (memoryLifecycle.taskId === task.taskId) {
21453
+ memoryLifecycle = {
21454
+ status: "completed",
21455
+ taskId: task.taskId,
21456
+ messageStart: task.messageStart,
21457
+ finalizedAt: (/* @__PURE__ */ new Date()).toISOString(),
21458
+ transcriptHash: task.transcriptHash
21459
+ };
21460
+ await persist();
21461
+ }
21462
+ if (finalization.candidates && finalization.stored > 0) {
21463
+ const storedText = autoStoredContents.get(task.taskId)?.[0] ?? "a high-confidence memory";
21464
+ autoStoredContents.delete(task.taskId);
21465
+ return `Long-term memory updated. Stored high-confidence entry: "${storedText}". Run /forget to remove it if undesired.`;
21466
+ }
21467
+ autoStoredContents.delete(task.taskId);
21468
+ return finalization.candidates ? "Long-term-memory evaluation completed. Review the generated candidates before anything is stored." : "Long-term-memory evaluation completed; no durable candidates passed the threshold.";
21469
+ };
21428
21470
  const finalizeMemoryTask = async (manual = false) => {
21429
- const allMessages = harness.main.context.snapshot().messages;
21430
- const messages = allMessages.slice(memoryLifecycle.messageStart ?? 0);
21431
- const transcriptHash = memoryTranscriptHash(messages);
21432
- if (memoryLifecycle.status === "completed" && memoryLifecycle.transcriptHash === transcriptHash) {
21471
+ const task = captureMemoryTask();
21472
+ const key = memoryTaskKey(task);
21473
+ if (memoryLifecycle.status === "completed" && memoryLifecycle.transcriptHash === task.transcriptHash) {
21474
+ const backgroundResult = await backgroundMemoryTasks.get(key);
21475
+ if (backgroundResult?.startsWith("Long-term-memory evaluation failed")) return backgroundResult;
21433
21476
  return "This conversation segment was already evaluated for long-term memory.";
21434
21477
  }
21435
21478
  if (!manual && memoryBehavior.autoExtractPaused) {
21436
21479
  return "Automatic long-term-memory extraction is paused after repeated dismissals; use /finish, /remember, or an explicit \u201Cremember\u201D request to store memory manually.";
21437
21480
  }
21438
- autoStoredContents.length = 0;
21439
- const finalization = memoryCoordinator === void 0 || !config.memory.autoExtract || options.approvalPolicy === "deny" ? { evaluated: true, candidates: false, stored: 0 } : await memoryCoordinator.finalize(memoryLifecycle.taskId ?? sessionId, messages);
21440
- if (!finalization.evaluated) {
21441
- return "Long-term-memory evaluation failed; retry /finish after checking diagnostics.";
21442
- }
21481
+ return evaluateMemoryTask(task);
21482
+ };
21483
+ const scheduleAutomaticMemoryTask = () => {
21484
+ const task = captureMemoryTask();
21485
+ const key = memoryTaskKey(task);
21443
21486
  memoryLifecycle = {
21444
21487
  status: "completed",
21445
- taskId: memoryLifecycle.taskId ?? sessionId,
21446
- messageStart: memoryLifecycle.messageStart ?? 0,
21488
+ taskId: task.taskId,
21489
+ messageStart: task.messageStart,
21447
21490
  finalizedAt: (/* @__PURE__ */ new Date()).toISOString(),
21448
- transcriptHash
21491
+ transcriptHash: task.transcriptHash
21449
21492
  };
21450
- await persist();
21451
- if (finalization.candidates && finalization.stored > 0) {
21452
- const storedText = autoStoredContents[0] ?? "a high-confidence memory";
21453
- return `Long-term memory updated. Stored high-confidence entry: "${storedText}". Run /forget to remove it if undesired.`;
21454
- }
21455
- return finalization.candidates ? "Long-term-memory evaluation completed. Review the generated candidates before anything is stored." : "Long-term-memory evaluation completed; no durable candidates passed the threshold.";
21493
+ const operation = evaluateMemoryTask(task).then((result) => {
21494
+ if (result.startsWith("Long-term-memory evaluation failed")) {
21495
+ emitOutput({ type: "notice", message: "Automatic long-term-memory evaluation failed; use /finish to retry after checking diagnostics." });
21496
+ } else if (result.startsWith("Long-term-memory evaluation completed. Review") || result.startsWith("Long-term memory updated.")) {
21497
+ emitOutput({ type: "notice", message: result });
21498
+ }
21499
+ return result;
21500
+ }).finally(() => {
21501
+ if (backgroundMemoryTasks.get(key) === operation) backgroundMemoryTasks.delete(key);
21502
+ });
21503
+ backgroundMemoryTasks.set(key, operation);
21504
+ void operation.catch(() => void 0);
21505
+ };
21506
+ const flushMemoryTasks = async () => {
21507
+ await memoryCoordinator?.flush();
21508
+ await Promise.allSettled([...backgroundMemoryTasks.values()]);
21456
21509
  };
21457
21510
  let explicitMemoryRequest;
21458
21511
  let automaticMemoryTask = false;
@@ -21492,6 +21545,7 @@ async function createProductionRuntime(options) {
21492
21545
  explicit.taskId,
21493
21546
  harness.main.context.snapshot().messages.slice(explicit.messageStart)
21494
21547
  );
21548
+ autoStoredContents.delete(explicit.taskId);
21495
21549
  if (!result.evaluated) {
21496
21550
  emitOutput({ type: "notice", message: "Explicit long-term-memory request could not be analyzed; nothing was stored." });
21497
21551
  } else if (result.stored > 0) {
@@ -21507,12 +21561,7 @@ async function createProductionRuntime(options) {
21507
21561
  }
21508
21562
  }
21509
21563
  if (explicit === void 0 && automatic && event.payload.outcome === "completed" && memoryCoordinator !== void 0 && config.memory.autoExtract && options.approvalPolicy !== "deny" && !memoryBehavior.autoExtractPaused) {
21510
- const result = await finalizeMemoryTask();
21511
- if (result.startsWith("Long-term-memory evaluation failed")) {
21512
- emitOutput({ type: "notice", message: "Automatic long-term-memory evaluation failed; use /finish to retry after checking diagnostics." });
21513
- } else if (result.startsWith("Long-term-memory evaluation completed. Review") || result.startsWith("Long-term memory updated.")) {
21514
- emitOutput({ type: "notice", message: result });
21515
- }
21564
+ scheduleAutomaticMemoryTask();
21516
21565
  }
21517
21566
  if (event.payload.outcome === "cancelled" && (taskPlan !== void 0 || taskGraph !== void 0)) {
21518
21567
  interruptedTaskPlanNeedsReassessment = true;
@@ -21527,14 +21576,9 @@ async function createProductionRuntime(options) {
21527
21576
  emitOutput({ type: "tasks-cleared" });
21528
21577
  await persist();
21529
21578
  return { decision: "allow" };
21530
- }, {
21531
- // This handler awaits long-term-memory model calls; the 10s default timeout
21532
- // would abort them mid-flight and surface a TimeoutError through the Stop hook.
21533
- timeoutMs: 3e5,
21534
- failurePolicy: "allow"
21535
- });
21579
+ }, { failurePolicy: "allow" });
21536
21580
  hooks.on("SessionEnd", async () => {
21537
- await memoryCoordinator?.flush();
21581
+ await flushMemoryTasks();
21538
21582
  await persist();
21539
21583
  return { decision: "allow" };
21540
21584
  }, { timeoutMs: 3e5, failurePolicy: "allow" });
@@ -22291,7 +22335,7 @@ ${renderMemoryDocument(entries)}`;
22291
22335
  if (collaborationEventPump !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "collaboration-event-pump", collaborationEventPump);
22292
22336
  mcpDiscarded = true;
22293
22337
  if (sleepScheduler !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "sleep-scheduler", sleepScheduler.dispose());
22294
- if (memoryCoordinator !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "memory-flush", memoryCoordinator.flush());
22338
+ if (memoryCoordinator !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "memory-flush", flushMemoryTasks());
22295
22339
  await boundedStep(stepTimeoutMs, diagnostics, "persist", persist());
22296
22340
  if (persistTail !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "persist-tail", persistTail);
22297
22341
  if (ideSessionId !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "ide-end-session", ide.endSession(ideSessionId));
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import { createRequire } from "node:module"; const require = createRequire(impor
3
3
  import {
4
4
  FlavorRpcServer,
5
5
  TraceRecorder
6
- } from "./chunk-VPJ7KY3T.js";
6
+ } from "./chunk-EJCI3VB5.js";
7
7
  import {
8
8
  staticTaskLines
9
9
  } from "./chunk-KKIBYDJI.js";
@@ -23,7 +23,7 @@ import {
23
23
  packageVersion,
24
24
  redactErrorText,
25
25
  runPalBroker
26
- } from "./chunk-K2AOT2BI.js";
26
+ } from "./chunk-GAQJZBOF.js";
27
27
  import {
28
28
  McpServerConfigSchema,
29
29
  McpServerNameSchema,
@@ -877,7 +877,7 @@ async function runInteractiveCli(props) {
877
877
  const [{ render, AlternateScreen }, { createElement }, { App }] = await Promise.all([
878
878
  import("./claude-ink-ORUA7GWG.js"),
879
879
  import("react"),
880
- import("./app-NHRRG3YA.js")
880
+ import("./app-OLOUQDIG.js")
881
881
  ]);
882
882
  const instance = await render(createElement(
883
883
  AlternateScreen,
@@ -24434,7 +24434,7 @@ async function createProductionRuntime(options) {
24434
24434
  maxEntries: config.memory.maxEntries,
24435
24435
  maxEntryChars: config.memory.maxEntryChars
24436
24436
  }) : void 0;
24437
- const autoStoredContents = [];
24437
+ const autoStoredContents = /* @__PURE__ */ new Map();
24438
24438
  let memoryBehavior = DEFAULT_MEMORY_BEHAVIOR;
24439
24439
  if (memoryStore !== void 0) {
24440
24440
  try {
@@ -25185,7 +25185,7 @@ async function createProductionRuntime(options) {
25185
25185
  });
25186
25186
  const memoryCoordinator = memoryStore !== void 0 ? new MemoryCoordinator({
25187
25187
  review: (taskId, candidates) => {
25188
- memoryReviews.offer(taskId, candidates);
25188
+ if (memoryLifecycle.taskId === taskId) memoryReviews.offer(taskId, candidates);
25189
25189
  },
25190
25190
  remember: async (taskId, candidates) => {
25191
25191
  let stored = 0;
@@ -25193,7 +25193,9 @@ async function createProductionRuntime(options) {
25193
25193
  const result = await memoryStore.rememberForTask(taskId, candidate);
25194
25194
  if (result.added) {
25195
25195
  stored += 1;
25196
- autoStoredContents.push(candidate.content);
25196
+ const contents = autoStoredContents.get(taskId) ?? [];
25197
+ contents.push(candidate.content);
25198
+ autoStoredContents.set(taskId, contents);
25197
25199
  }
25198
25200
  }
25199
25201
  if (stored > 0) await refreshMemoryState();
@@ -25210,34 +25212,85 @@ async function createProductionRuntime(options) {
25210
25212
  if (memoryCoordinator !== void 0) {
25211
25213
  memoryCoordinator.onError = (error) => diagnostics.push(`Long-term memory extraction failed: ${message(error)}`);
25212
25214
  }
25215
+ const backgroundMemoryTasks = /* @__PURE__ */ new Map();
25216
+ const memoryTaskKey = (task) => `${task.taskId}:${task.transcriptHash}`;
25217
+ const captureMemoryTask = () => {
25218
+ const messageStart = memoryLifecycle.messageStart ?? 0;
25219
+ const messages = harness.main.context.snapshot().messages.slice(messageStart);
25220
+ return {
25221
+ taskId: memoryLifecycle.taskId ?? sessionId,
25222
+ messageStart,
25223
+ messages,
25224
+ transcriptHash: memoryTranscriptHash(messages)
25225
+ };
25226
+ };
25227
+ const evaluateMemoryTask = async (task) => {
25228
+ autoStoredContents.delete(task.taskId);
25229
+ const finalization = memoryCoordinator === void 0 || !config.memory.autoExtract || options.approvalPolicy === "deny" ? { evaluated: true, candidates: false, stored: 0 } : await memoryCoordinator.finalize(task.taskId, task.messages);
25230
+ if (!finalization.evaluated) {
25231
+ if (memoryLifecycle.taskId === task.taskId && memoryLifecycle.transcriptHash === task.transcriptHash) {
25232
+ memoryLifecycle = { status: "active", taskId: task.taskId, messageStart: task.messageStart };
25233
+ await persist();
25234
+ }
25235
+ return "Long-term-memory evaluation failed; retry /finish after checking diagnostics.";
25236
+ }
25237
+ if (memoryLifecycle.taskId === task.taskId) {
25238
+ memoryLifecycle = {
25239
+ status: "completed",
25240
+ taskId: task.taskId,
25241
+ messageStart: task.messageStart,
25242
+ finalizedAt: (/* @__PURE__ */ new Date()).toISOString(),
25243
+ transcriptHash: task.transcriptHash
25244
+ };
25245
+ await persist();
25246
+ }
25247
+ if (finalization.candidates && finalization.stored > 0) {
25248
+ const storedText = autoStoredContents.get(task.taskId)?.[0] ?? "a high-confidence memory";
25249
+ autoStoredContents.delete(task.taskId);
25250
+ return `Long-term memory updated. Stored high-confidence entry: "${storedText}". Run /forget to remove it if undesired.`;
25251
+ }
25252
+ autoStoredContents.delete(task.taskId);
25253
+ return finalization.candidates ? "Long-term-memory evaluation completed. Review the generated candidates before anything is stored." : "Long-term-memory evaluation completed; no durable candidates passed the threshold.";
25254
+ };
25213
25255
  const finalizeMemoryTask = async (manual = false) => {
25214
- const allMessages = harness.main.context.snapshot().messages;
25215
- const messages = allMessages.slice(memoryLifecycle.messageStart ?? 0);
25216
- const transcriptHash = memoryTranscriptHash(messages);
25217
- if (memoryLifecycle.status === "completed" && memoryLifecycle.transcriptHash === transcriptHash) {
25256
+ const task = captureMemoryTask();
25257
+ const key = memoryTaskKey(task);
25258
+ if (memoryLifecycle.status === "completed" && memoryLifecycle.transcriptHash === task.transcriptHash) {
25259
+ const backgroundResult = await backgroundMemoryTasks.get(key);
25260
+ if (backgroundResult?.startsWith("Long-term-memory evaluation failed")) return backgroundResult;
25218
25261
  return "This conversation segment was already evaluated for long-term memory.";
25219
25262
  }
25220
25263
  if (!manual && memoryBehavior.autoExtractPaused) {
25221
25264
  return "Automatic long-term-memory extraction is paused after repeated dismissals; use /finish, /remember, or an explicit \u201Cremember\u201D request to store memory manually.";
25222
25265
  }
25223
- autoStoredContents.length = 0;
25224
- const finalization = memoryCoordinator === void 0 || !config.memory.autoExtract || options.approvalPolicy === "deny" ? { evaluated: true, candidates: false, stored: 0 } : await memoryCoordinator.finalize(memoryLifecycle.taskId ?? sessionId, messages);
25225
- if (!finalization.evaluated) {
25226
- return "Long-term-memory evaluation failed; retry /finish after checking diagnostics.";
25227
- }
25266
+ return evaluateMemoryTask(task);
25267
+ };
25268
+ const scheduleAutomaticMemoryTask = () => {
25269
+ const task = captureMemoryTask();
25270
+ const key = memoryTaskKey(task);
25228
25271
  memoryLifecycle = {
25229
25272
  status: "completed",
25230
- taskId: memoryLifecycle.taskId ?? sessionId,
25231
- messageStart: memoryLifecycle.messageStart ?? 0,
25273
+ taskId: task.taskId,
25274
+ messageStart: task.messageStart,
25232
25275
  finalizedAt: (/* @__PURE__ */ new Date()).toISOString(),
25233
- transcriptHash
25276
+ transcriptHash: task.transcriptHash
25234
25277
  };
25235
- await persist();
25236
- if (finalization.candidates && finalization.stored > 0) {
25237
- const storedText = autoStoredContents[0] ?? "a high-confidence memory";
25238
- return `Long-term memory updated. Stored high-confidence entry: "${storedText}". Run /forget to remove it if undesired.`;
25239
- }
25240
- return finalization.candidates ? "Long-term-memory evaluation completed. Review the generated candidates before anything is stored." : "Long-term-memory evaluation completed; no durable candidates passed the threshold.";
25278
+ const operation = evaluateMemoryTask(task).then((result) => {
25279
+ if (result.startsWith("Long-term-memory evaluation failed")) {
25280
+ emitOutput({ type: "notice", message: "Automatic long-term-memory evaluation failed; use /finish to retry after checking diagnostics." });
25281
+ } else if (result.startsWith("Long-term-memory evaluation completed. Review") || result.startsWith("Long-term memory updated.")) {
25282
+ emitOutput({ type: "notice", message: result });
25283
+ }
25284
+ return result;
25285
+ }).finally(() => {
25286
+ if (backgroundMemoryTasks.get(key) === operation) backgroundMemoryTasks.delete(key);
25287
+ });
25288
+ backgroundMemoryTasks.set(key, operation);
25289
+ void operation.catch(() => void 0);
25290
+ };
25291
+ const flushMemoryTasks = async () => {
25292
+ await memoryCoordinator?.flush();
25293
+ await Promise.allSettled([...backgroundMemoryTasks.values()]);
25241
25294
  };
25242
25295
  let explicitMemoryRequest;
25243
25296
  let automaticMemoryTask = false;
@@ -25277,6 +25330,7 @@ async function createProductionRuntime(options) {
25277
25330
  explicit.taskId,
25278
25331
  harness.main.context.snapshot().messages.slice(explicit.messageStart)
25279
25332
  );
25333
+ autoStoredContents.delete(explicit.taskId);
25280
25334
  if (!result.evaluated) {
25281
25335
  emitOutput({ type: "notice", message: "Explicit long-term-memory request could not be analyzed; nothing was stored." });
25282
25336
  } else if (result.stored > 0) {
@@ -25292,12 +25346,7 @@ async function createProductionRuntime(options) {
25292
25346
  }
25293
25347
  }
25294
25348
  if (explicit === void 0 && automatic && event.payload.outcome === "completed" && memoryCoordinator !== void 0 && config.memory.autoExtract && options.approvalPolicy !== "deny" && !memoryBehavior.autoExtractPaused) {
25295
- const result = await finalizeMemoryTask();
25296
- if (result.startsWith("Long-term-memory evaluation failed")) {
25297
- emitOutput({ type: "notice", message: "Automatic long-term-memory evaluation failed; use /finish to retry after checking diagnostics." });
25298
- } else if (result.startsWith("Long-term-memory evaluation completed. Review") || result.startsWith("Long-term memory updated.")) {
25299
- emitOutput({ type: "notice", message: result });
25300
- }
25349
+ scheduleAutomaticMemoryTask();
25301
25350
  }
25302
25351
  if (event.payload.outcome === "cancelled" && (taskPlan !== void 0 || taskGraph !== void 0)) {
25303
25352
  interruptedTaskPlanNeedsReassessment = true;
@@ -25312,14 +25361,9 @@ async function createProductionRuntime(options) {
25312
25361
  emitOutput({ type: "tasks-cleared" });
25313
25362
  await persist();
25314
25363
  return { decision: "allow" };
25315
- }, {
25316
- // This handler awaits long-term-memory model calls; the 10s default timeout
25317
- // would abort them mid-flight and surface a TimeoutError through the Stop hook.
25318
- timeoutMs: 3e5,
25319
- failurePolicy: "allow"
25320
- });
25364
+ }, { failurePolicy: "allow" });
25321
25365
  hooks.on("SessionEnd", async () => {
25322
- await memoryCoordinator?.flush();
25366
+ await flushMemoryTasks();
25323
25367
  await persist();
25324
25368
  return { decision: "allow" };
25325
25369
  }, { timeoutMs: 3e5, failurePolicy: "allow" });
@@ -26076,7 +26120,7 @@ ${renderMemoryDocument(entries)}`;
26076
26120
  if (collaborationEventPump !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "collaboration-event-pump", collaborationEventPump);
26077
26121
  mcpDiscarded = true;
26078
26122
  if (sleepScheduler !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "sleep-scheduler", sleepScheduler.dispose());
26079
- if (memoryCoordinator !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "memory-flush", memoryCoordinator.flush());
26123
+ if (memoryCoordinator !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "memory-flush", flushMemoryTasks());
26080
26124
  await boundedStep(stepTimeoutMs, diagnostics, "persist", persist());
26081
26125
  if (persistTail !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "persist-tail", persistTail);
26082
26126
  if (ideSessionId !== void 0) await boundedStep(stepTimeoutMs, diagnostics, "ide-end-session", ide.endSession(ideSessionId));
package/dist/sdk/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  FlavorRpcServer,
5
5
  TraceRecordSchema,
6
6
  TraceRecorder
7
- } from "../chunk-VPJ7KY3T.js";
7
+ } from "../chunk-EJCI3VB5.js";
8
8
  import {
9
9
  AgentMessageQueue,
10
10
  DockerExecutionEnvironment,
@@ -13,7 +13,7 @@ import {
13
13
  WorkspaceCheckpointStore,
14
14
  buildDockerInvocation,
15
15
  createProductionRuntime
16
- } from "../chunk-K2AOT2BI.js";
16
+ } from "../chunk-GAQJZBOF.js";
17
17
  import "../chunk-IG4Z23CL.js";
18
18
  import "../chunk-RQTYHUMK.js";
19
19
  import "../chunk-S32JRDZK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flavor-code",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "author": "YachuanWzh",
5
5
  "type": "module",
6
6
  "publishConfig": {