openfox 2.0.146 → 2.0.148

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 (32) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/CHANGELOG.md +22 -0
  3. package/dist/{auto-continue-IENGLXVQ.js → auto-continue-NODN37EK.js} +2 -2
  4. package/dist/{chat-handler-RJUJHVOX.js → chat-handler-PETIVNGQ.js} +4 -4
  5. package/dist/{chunk-EZEFBLPY.js → chunk-6UU3W3XO.js} +3 -3
  6. package/dist/{chunk-7IETJ4D4.js → chunk-772W5PF7.js} +37 -29
  7. package/dist/chunk-DKHY5UNR.js +7 -0
  8. package/dist/{chunk-QR6FIHIP.js → chunk-EJKAN7HK.js} +23 -16
  9. package/dist/{chunk-5D4MQG7P.js → chunk-F6QMFCHQ.js} +4 -4
  10. package/dist/{chunk-L43S7FJM.js → chunk-LNJOQAXT.js} +2 -2
  11. package/dist/{chunk-7BIGFGU5.js → chunk-NELDQCPC.js} +285 -115
  12. package/dist/{chunk-OS4P2KQJ.js → chunk-V4BEYGBJ.js} +7 -7
  13. package/dist/cli/dev.js +1 -1
  14. package/dist/cli/index.js +1 -1
  15. package/dist/{dynamic-context-IQUBKUCX.js → dynamic-context-CM3M2EJC.js} +2 -2
  16. package/dist/{export-import-NAQDPRET.js → export-import-UITAIBU5.js} +2 -2
  17. package/dist/{launch-EUU25RFE.js → launch-E6SDDTHE.js} +5 -5
  18. package/dist/{orchestrator-PPAIE2UH.js → orchestrator-MVQIPITF.js} +4 -4
  19. package/dist/package.json +1 -1
  20. package/dist/{processor-7XMJPNCD.js → processor-UTBTJVV5.js} +3 -3
  21. package/dist/{serve-3GNQNYG6.js → serve-XGIHFEC6.js} +8 -8
  22. package/dist/server/index.d.ts +3 -0
  23. package/dist/server/index.js +7 -7
  24. package/dist/{server-C4LB436R.js → server-F66GXJUS.js} +6 -6
  25. package/dist/skill-defaults/workflows/SKILL.md +149 -16
  26. package/dist/{tools-OH3WW6Q4.js → tools-NIOESJYT.js} +2 -2
  27. package/dist/{update-PG63SDV3.js → update-X6BS6MUF.js} +2 -2
  28. package/dist/web/assets/{index-jXXIgPm-.js → index-CkVmYTBd.js} +82 -82
  29. package/dist/web/index.html +1 -1
  30. package/dist/web/sw.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/chunk-EABIZXTG.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.148 - 2026-09-14
4
+
5
+ ### Bug Fixes
6
+
7
+ - **Sub-agent responses no longer truncate in long sessions** — sub-agent output is now budgeted against its own context instead of the parent session's, so plans and reviews run to completion even when the orchestrator session is huge.
8
+
9
+ ## 2.0.147 - 2026-09-14
10
+
11
+ ### Features
12
+
13
+ - **Parallel workflow steps** — run sub-agent and shell steps concurrently inside one workflow step, capped by max concurrency, with per-child output keys to branch on.
14
+ - **Parallel step editor** — build parallel steps in the workflow UI with a child list, per-child sub-agent/shell configuration, and slug-safe child ids.
15
+ - **Project dropdown on session rows** — switch projects, start sessions, or open tasks directly from the home session list.
16
+
17
+ ### Enhancements
18
+
19
+ - **Agent steps honor per-agent model overrides** — workflow steps pinned to a specific model (e.g. builder on Qwen) now actually run on it, matching the existing sub-agent behavior.
20
+
21
+ ### Bug Fixes
22
+
23
+ - **Background process logs stream live** — the log viewer shows new output as it arrives without reopening the panel.
24
+
3
25
  ## 2.0.146 - 2026-09-12
4
26
 
5
27
  ### Bug Fixes
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.148 - 2026-09-14
4
+
5
+ ### Bug Fixes
6
+
7
+ - **Sub-agent responses no longer truncate in long sessions** — sub-agent output is now budgeted against its own context instead of the parent session's, so plans and reviews run to completion even when the orchestrator session is huge.
8
+
9
+ ## 2.0.147 - 2026-09-14
10
+
11
+ ### Features
12
+
13
+ - **Parallel workflow steps** — run sub-agent and shell steps concurrently inside one workflow step, capped by max concurrency, with per-child output keys to branch on.
14
+ - **Parallel step editor** — build parallel steps in the workflow UI with a child list, per-child sub-agent/shell configuration, and slug-safe child ids.
15
+ - **Project dropdown on session rows** — switch projects, start sessions, or open tasks directly from the home session list.
16
+
17
+ ### Enhancements
18
+
19
+ - **Agent steps honor per-agent model overrides** — workflow steps pinned to a specific model (e.g. builder on Qwen) now actually run on it, matching the existing sub-agent behavior.
20
+
21
+ ### Bug Fixes
22
+
23
+ - **Background process logs stream live** — the log viewer shows new output as it arrives without reopening the panel.
24
+
3
25
  ## 2.0.146 - 2026-09-12
4
26
 
5
27
  ### Bug Fixes
@@ -1,4 +1,4 @@
1
- import "./chunk-QR6FIHIP.js";
1
+ import "./chunk-EJKAN7HK.js";
2
2
  import "./chunk-OAN4BXEW.js";
3
3
  import "./chunk-DJH6LMBT.js";
4
4
  import "./chunk-PHR64A6U.js";
@@ -108,4 +108,4 @@ export {
108
108
  planBootContinuation,
109
109
  runBootAutoContinuations
110
110
  };
111
- //# sourceMappingURL=auto-continue-IENGLXVQ.js.map
111
+ //# sourceMappingURL=auto-continue-NODN37EK.js.map
@@ -5,9 +5,9 @@ import {
5
5
  } from "./chunk-ORIPUMOQ.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-5D4MQG7P.js";
9
- import "./chunk-L43S7FJM.js";
10
- import "./chunk-QR6FIHIP.js";
8
+ } from "./chunk-F6QMFCHQ.js";
9
+ import "./chunk-LNJOQAXT.js";
10
+ import "./chunk-EJKAN7HK.js";
11
11
  import "./chunk-OAN4BXEW.js";
12
12
  import "./chunk-DJH6LMBT.js";
13
13
  import "./chunk-PHR64A6U.js";
@@ -181,4 +181,4 @@ export {
181
181
  startChatSession,
182
182
  stopSessionExecution
183
183
  };
184
- //# sourceMappingURL=chat-handler-RJUJHVOX.js.map
184
+ //# sourceMappingURL=chat-handler-PETIVNGQ.js.map
@@ -252,7 +252,7 @@ async function runCli(options) {
252
252
  break;
253
253
  }
254
254
  case "update": {
255
- const { runUpdate } = await import("./update-PG63SDV3.js");
255
+ const { runUpdate } = await import("./update-X6BS6MUF.js");
256
256
  const code = await runUpdate();
257
257
  if (code !== 0) {
258
258
  process.exit(code);
@@ -265,7 +265,7 @@ async function runCli(options) {
265
265
  if (!configExists) {
266
266
  await runNetworkSetup(mode);
267
267
  }
268
- const { runServe } = await import("./serve-3GNQNYG6.js");
268
+ const { runServe } = await import("./serve-XGIHFEC6.js");
269
269
  const serveOptions = { mode };
270
270
  if (values.port) serveOptions.port = parseInt(values.port);
271
271
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -277,4 +277,4 @@ async function runCli(options) {
277
277
  export {
278
278
  runCli
279
279
  };
280
- //# sourceMappingURL=chunk-EZEFBLPY.js.map
280
+ //# sourceMappingURL=chunk-6UU3W3XO.js.map
@@ -9,10 +9,10 @@ import {
9
9
  terminalManager,
10
10
  tokenFromPassword,
11
11
  verifyPassword
12
- } from "./chunk-OS4P2KQJ.js";
12
+ } from "./chunk-V4BEYGBJ.js";
13
13
  import {
14
14
  TEMPLATE_VARIABLES
15
- } from "./chunk-7BIGFGU5.js";
15
+ } from "./chunk-NELDQCPC.js";
16
16
  import {
17
17
  projectSessionStatus
18
18
  } from "./chunk-T3S5MTMD.js";
@@ -42,7 +42,7 @@ import {
42
42
  setMcpManagerForTools,
43
43
  setMcpTools,
44
44
  setNotifyMcpServersChanged
45
- } from "./chunk-QR6FIHIP.js";
45
+ } from "./chunk-EJKAN7HK.js";
46
46
  import {
47
47
  deleteOwnedSkill,
48
48
  deleteProjectSkill,
@@ -224,7 +224,7 @@ import {
224
224
  } from "./chunk-YNMP647F.js";
225
225
  import {
226
226
  VERSION
227
- } from "./chunk-EABIZXTG.js";
227
+ } from "./chunk-DKHY5UNR.js";
228
228
  import {
229
229
  deleteProject,
230
230
  getProject,
@@ -2849,6 +2849,7 @@ var SessionManager = class {
2849
2849
  // Sessions already warned about an unresolvable provider — getContextState runs on every
2850
2850
  // turn, and the warning is only worth one line per session.
2851
2851
  unknownProviderWarned = /* @__PURE__ */ new Set();
2852
+ subAgentContextSizes = /* @__PURE__ */ new Map();
2852
2853
  switchLocks = /* @__PURE__ */ new Map();
2853
2854
  workspaceCreationLocks = /* @__PURE__ */ new Map();
2854
2855
  // Cooperative pause: in-memory only (a pause is only meaningful for a live,
@@ -3147,8 +3148,8 @@ var SessionManager = class {
3147
3148
  * @throws Error for invalid payloads or unknown project
3148
3149
  */
3149
3150
  async importSession(projectId, rawPayload) {
3150
- const { parseSessionExport, IMPORTED_SESSION_REMINDER, SESSION_EXPORT_VERSION } = await import("./export-import-NAQDPRET.js");
3151
- const { injectContextDriftReminders, getToolSetFingerprint } = await import("./dynamic-context-IQUBKUCX.js");
3151
+ const { parseSessionExport, IMPORTED_SESSION_REMINDER, SESSION_EXPORT_VERSION } = await import("./export-import-UITAIBU5.js");
3152
+ const { injectContextDriftReminders, getToolSetFingerprint } = await import("./dynamic-context-CM3M2EJC.js");
3152
3153
  const { loadAllAgentsDefault: loadAllAgentsDefault2, resolveDefaultAgentId } = await import("./registry-24U5BZAJ.js");
3153
3154
  const payload = parseSessionExport(rawPayload);
3154
3155
  if (payload.version !== SESSION_EXPORT_VERSION) {
@@ -3901,6 +3902,9 @@ var SessionManager = class {
3901
3902
  const currentTokens = promptTokens + completionTokens;
3902
3903
  const compactionCount = subAgentId ? 0 : state?.contextState.compactionCount ?? 0;
3903
3904
  const dynamicContextChanged = this.getDynamicContextChanged(sessionId);
3905
+ if (subAgentId) {
3906
+ this.subAgentContextSizes.set(subAgentId, currentTokens);
3907
+ }
3904
3908
  emitContextState(
3905
3909
  sessionId,
3906
3910
  currentTokens,
@@ -3913,6 +3917,10 @@ var SessionManager = class {
3913
3917
  );
3914
3918
  logger.debug("Context state updated", { sessionId, promptTokens, maxTokens, subAgentId });
3915
3919
  }
3920
+ /** Tokens used by a sub-agent's own scoped context (fresh, never-compacted). */
3921
+ getSubAgentContextTokens(subAgentId) {
3922
+ return this.subAgentContextSizes.get(subAgentId);
3923
+ }
3916
3924
  // ============================================================================
3917
3925
  // Criteria Operations (delegates to EventStore)
3918
3926
  // ============================================================================
@@ -7248,7 +7256,7 @@ function detectWsl() {
7248
7256
  // src/server/index.ts
7249
7257
  var __dirname3 = dirname7(fileURLToPath6(import.meta.url));
7250
7258
  async function announceContextDrift(sessionManager, sessionIds) {
7251
- const { injectContextDriftRemindersForSessions } = await import("./dynamic-context-IQUBKUCX.js");
7259
+ const { injectContextDriftRemindersForSessions } = await import("./dynamic-context-CM3M2EJC.js");
7252
7260
  await injectContextDriftRemindersForSessions(sessionManager, sessionIds);
7253
7261
  }
7254
7262
  async function createServerHandle(config3) {
@@ -7364,7 +7372,7 @@ async function createServerHandle(config3) {
7364
7372
  toolRegistry = createToolRegistry();
7365
7373
  logger.info("MCP tools registered", { count: mcpTools.length });
7366
7374
  }
7367
- const { signalMcpReady } = await import("./server-C4LB436R.js");
7375
+ const { signalMcpReady } = await import("./server-F66GXJUS.js");
7368
7376
  signalMcpReady();
7369
7377
  }
7370
7378
  const app = express();
@@ -7581,7 +7589,7 @@ async function createServerHandle(config3) {
7581
7589
  app.use("/api", sessionFavoriteRouter);
7582
7590
  const { createTasksService } = await import("./service-KMOSB6SU.js");
7583
7591
  const { registerTaskRoutes } = await import("./tasks-X5DM553T.js");
7584
- const { setTasksService } = await import("./tools-OH3WW6Q4.js");
7592
+ const { setTasksService } = await import("./tools-NIOESJYT.js");
7585
7593
  const tasksService = createTasksService({
7586
7594
  sessionManager,
7587
7595
  config: config3,
@@ -7904,7 +7912,7 @@ All file and git operations should use this branch.
7904
7912
  const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-FTS5W6FX.js");
7905
7913
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, buildSessionStatsMessages, foldPendingConfirmations } = await import("./folding-VWRMYZ5T.js");
7906
7914
  const { computeSessionStatsSummary } = await import("./stats-2QMXP6G4.js");
7907
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-OH3WW6Q4.js");
7915
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-NIOESJYT.js");
7908
7916
  const { getMaxVisibleItems } = await import("./settings-FQUDSGZF.js");
7909
7917
  const session = sessionManager.getSession(req.params.id);
7910
7918
  if (!session) {
@@ -7935,7 +7943,7 @@ All file and git operations should use this branch.
7935
7943
  });
7936
7944
  app.get("/api/sessions/:id/status", async (req, res) => {
7937
7945
  const { projectSessionStatus: projectSessionStatus2 } = await import("./session-status-UFO5IFI7.js");
7938
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-OH3WW6Q4.js");
7946
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-NIOESJYT.js");
7939
7947
  const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-FTS5W6FX.js");
7940
7948
  const { foldPendingConfirmations } = await import("./folding-VWRMYZ5T.js");
7941
7949
  const sessionId = req.params["id"];
@@ -7971,8 +7979,8 @@ All file and git operations should use this branch.
7971
7979
  if (!session) {
7972
7980
  return res.status(404).json({ error: "Session not found" });
7973
7981
  }
7974
- const { stopSessionExecution } = await import("./chat-handler-RJUJHVOX.js");
7975
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-OH3WW6Q4.js");
7982
+ const { stopSessionExecution } = await import("./chat-handler-PETIVNGQ.js");
7983
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NIOESJYT.js");
7976
7984
  sessionManager.clearMessageQueue(sessionId);
7977
7985
  stopSessionExecution(sessionId, sessionManager);
7978
7986
  abortSession(sessionId);
@@ -8204,7 +8212,7 @@ All file and git operations should use this branch.
8204
8212
  }
8205
8213
  sessionManager.setDangerLevel(sessionId, dangerLevel);
8206
8214
  if (dangerLevel === "dangerous") {
8207
- const { autoApprovePendingConfirmationsForSession } = await import("./tools-OH3WW6Q4.js");
8215
+ const { autoApprovePendingConfirmationsForSession } = await import("./tools-NIOESJYT.js");
8208
8216
  const approvedCallIds = autoApprovePendingConfirmationsForSession(sessionId);
8209
8217
  for (const callId of approvedCallIds) {
8210
8218
  wssExports.broadcastForSession(sessionId, {
@@ -8239,7 +8247,7 @@ All file and git operations should use this branch.
8239
8247
  setSessionDisabledServers(sessionId, disabledServers);
8240
8248
  const messages = session.messages ?? [];
8241
8249
  if (messages.length === 0) {
8242
- const { applyDynamicContext } = await import("./dynamic-context-IQUBKUCX.js");
8250
+ const { applyDynamicContext } = await import("./dynamic-context-CM3M2EJC.js");
8243
8251
  const modelName = session.providerModel ?? providerManager.getCurrentModel();
8244
8252
  await applyDynamicContext(sessionManager, sessionId, modelName);
8245
8253
  } else {
@@ -8273,7 +8281,7 @@ All file and git operations should use this branch.
8273
8281
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
8274
8282
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
8275
8283
  }
8276
- const { providePathConfirmation: providePathConfirmation2, getConfirmationSessionId } = await import("./tools-OH3WW6Q4.js");
8284
+ const { providePathConfirmation: providePathConfirmation2, getConfirmationSessionId } = await import("./tools-NIOESJYT.js");
8277
8285
  const pendingSessionId = getConfirmationSessionId(callId);
8278
8286
  if (!pendingSessionId) {
8279
8287
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -8288,7 +8296,7 @@ All file and git operations should use this branch.
8288
8296
  const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-FTS5W6FX.js");
8289
8297
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-VWRMYZ5T.js");
8290
8298
  const { createSessionStateMessage } = await import("./protocol-M4DFHA32.js");
8291
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-OH3WW6Q4.js");
8299
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-NIOESJYT.js");
8292
8300
  const { getMaxVisibleItems } = await import("./settings-FQUDSGZF.js");
8293
8301
  const eventStore = getEventStore2();
8294
8302
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
@@ -8326,7 +8334,7 @@ All file and git operations should use this branch.
8326
8334
  if (!skip && typeof answer !== "string") {
8327
8335
  return res.status(400).json({ error: "answer is required when not skipping" });
8328
8336
  }
8329
- const { provideAnswer: provideAnswer2 } = await import("./tools-OH3WW6Q4.js");
8337
+ const { provideAnswer: provideAnswer2 } = await import("./tools-NIOESJYT.js");
8330
8338
  const found = provideAnswer2(callId, answer ?? "", skip ?? false);
8331
8339
  if (!found) {
8332
8340
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -8392,7 +8400,7 @@ All file and git operations should use this branch.
8392
8400
  backend: activeProvider?.backend ?? llmClient.getBackend(),
8393
8401
  model: llmClient.getModel()
8394
8402
  };
8395
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-PPAIE2UH.js");
8403
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-MVQIPITF.js");
8396
8404
  runAgentTurn(
8397
8405
  {
8398
8406
  sessionManager,
@@ -8430,8 +8438,8 @@ All file and git operations should use this branch.
8430
8438
  if (!session) {
8431
8439
  return res.status(404).json({ error: "Session not found" });
8432
8440
  }
8433
- const { stopSessionExecution } = await import("./chat-handler-RJUJHVOX.js");
8434
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-OH3WW6Q4.js");
8441
+ const { stopSessionExecution } = await import("./chat-handler-PETIVNGQ.js");
8442
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NIOESJYT.js");
8435
8443
  const queuedMessages = sessionManager.getQueueState(sessionId);
8436
8444
  sessionManager.clearMessageQueue(sessionId);
8437
8445
  stopSessionExecution(sessionId, sessionManager);
@@ -8554,7 +8562,7 @@ All file and git operations should use this branch.
8554
8562
  return res.status(404).json({ error: "Session not found" });
8555
8563
  }
8556
8564
  try {
8557
- const { buildSessionExport } = await import("./export-import-NAQDPRET.js");
8565
+ const { buildSessionExport } = await import("./export-import-UITAIBU5.js");
8558
8566
  const payload = buildSessionExport(sessionManager, sessionId);
8559
8567
  const filename = `${(payload.session.title ?? "session").replace(/[^a-zA-Z0-9-_]/g, "_")}.openfox-session.json`;
8560
8568
  res.setHeader("Content-Disposition", `attachment; filename="${filename}"`);
@@ -9377,7 +9385,7 @@ All file and git operations should use this branch.
9377
9385
  });
9378
9386
  async function rebuildMcpTools() {
9379
9387
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-ZY4FC4C4.js");
9380
- const { setMcpTools: setMcpTools2 } = await import("./tools-OH3WW6Q4.js");
9388
+ const { setMcpTools: setMcpTools2 } = await import("./tools-NIOESJYT.js");
9381
9389
  const mcpTools = createMcpTools2(mcpManager);
9382
9390
  setMcpTools2(mcpTools);
9383
9391
  toolRegistry = createToolRegistry();
@@ -9953,7 +9961,7 @@ All file and git operations should use this branch.
9953
9961
  );
9954
9962
  const wss = wssExports.wss;
9955
9963
  deferTasksBroadcast = (_projectId, payload) => wssExports.broadcastAll({ type: "tasks.update", payload });
9956
- const { launchWorkflowRun, abortRunnerRun } = await import("./launch-EUU25RFE.js");
9964
+ const { launchWorkflowRun, abortRunnerRun } = await import("./launch-E6SDDTHE.js");
9957
9965
  deferTasksLaunchWorkflow = (sessionId, launch) => {
9958
9966
  const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
9959
9967
  let llmClient = getLLMClient();
@@ -9998,7 +10006,7 @@ All file and git operations should use this branch.
9998
10006
  const state = sessionManager.getContextState(sessionId);
9999
10007
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
10000
10008
  });
10001
- const { QueueProcessor } = await import("./processor-7XMJPNCD.js");
10009
+ const { QueueProcessor } = await import("./processor-UTBTJVV5.js");
10002
10010
  const queueProcessor = new QueueProcessor({
10003
10011
  sessionManager,
10004
10012
  providerManager,
@@ -10011,7 +10019,7 @@ All file and git operations should use this branch.
10011
10019
  const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FQUDSGZF.js");
10012
10020
  if (getSetting2(SETTINGS_KEYS.AUTO_CONTINUE_ON_BOOT) === "true") {
10013
10021
  const { getStaleRunningSessionIds } = await import("./store-OWOLXB74.js");
10014
- const { runBootAutoContinuations } = await import("./auto-continue-IENGLXVQ.js");
10022
+ const { runBootAutoContinuations } = await import("./auto-continue-NODN37EK.js");
10015
10023
  const staleIds = getStaleRunningSessionIds();
10016
10024
  if (staleIds.length > 0) {
10017
10025
  const continued = runBootAutoContinuations(staleIds, {
@@ -10055,8 +10063,8 @@ All file and git operations should use this branch.
10055
10063
  launchWorkflow: (sessionId, launch) => deferTasksLaunchWorkflow(sessionId, launch),
10056
10064
  stopSession: (sessionId) => {
10057
10065
  void (async () => {
10058
- const { stopSessionExecution } = await import("./chat-handler-RJUJHVOX.js");
10059
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-OH3WW6Q4.js");
10066
+ const { stopSessionExecution } = await import("./chat-handler-PETIVNGQ.js");
10067
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NIOESJYT.js");
10060
10068
  sessionManager.clearMessageQueue(sessionId);
10061
10069
  stopSessionExecution(sessionId, sessionManager);
10062
10070
  abortSession(sessionId);
@@ -10183,4 +10191,4 @@ export {
10183
10191
  createServerHandle,
10184
10192
  createServer
10185
10193
  };
10186
- //# sourceMappingURL=chunk-7IETJ4D4.js.map
10194
+ //# sourceMappingURL=chunk-772W5PF7.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.148";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-DKHY5UNR.js.map
@@ -1162,6 +1162,16 @@ function resolveLLMClientForAgent(agentId, fallbackClient, providerManager, pinn
1162
1162
  override: effectiveEffort ? { ...override, reasoningEffort: effectiveEffort } : override
1163
1163
  };
1164
1164
  }
1165
+ function buildAgentOverrideStatsIdentity(providerManager, client, override) {
1166
+ const provider = providerManager.getProviders().find((p) => p.id === override.providerId);
1167
+ return {
1168
+ providerId: override.providerId,
1169
+ providerName: provider?.name ?? override.providerId,
1170
+ backend: provider?.backend ?? client.getBackend(),
1171
+ model: override.model,
1172
+ ...override.reasoningEffort ? { reasoningEffort: override.reasoningEffort } : {}
1173
+ };
1174
+ }
1165
1175
 
1166
1176
  // src/server/chat/tool-streaming.ts
1167
1177
  function parseProgressMessage(message) {
@@ -1606,11 +1616,12 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
1606
1616
  );
1607
1617
  };
1608
1618
  const contextState = sessionManager.getContextState(sessionId);
1609
- previousContextTokens = contextState.currentTokens;
1619
+ const subAgentContextTokens = config.subAgentMetadata ? sessionManager.getSubAgentContextTokens?.(config.subAgentMetadata.subAgentId) ?? 0 : void 0;
1620
+ previousContextTokens = subAgentContextTokens ?? contextState.currentTokens;
1610
1621
  const contextWindow = sessionManager.getCurrentModelContext(sessionId, config.mode);
1611
1622
  const availableForOutput = Math.max(
1612
1623
  256,
1613
- contextWindow - contextState.currentTokens - pendingToolResultTokens - OUTPUT_RESERVE_TOKENS
1624
+ contextWindow - previousContextTokens - pendingToolResultTokens - OUTPUT_RESERVE_TOKENS
1614
1625
  );
1615
1626
  let modelSettings = config.modelSettings ?? sessionManager.getCurrentModelSettings(sessionId, config.mode);
1616
1627
  if (modelSettings && currentMaxTokensOverride !== void 0) {
@@ -1759,9 +1770,11 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
1759
1770
  if (!compacting) {
1760
1771
  const contextState = sessionManager.getContextState(sessionId);
1761
1772
  const { shouldCompact, appendCompactionPrompt } = await import("./compactor-YY7PO2XE.js");
1773
+ const compactionTokens = config.subAgentMetadata ? sessionManager.getSubAgentContextTokens?.(config.subAgentMetadata.subAgentId) ?? 0 : contextState.currentTokens;
1774
+ const compactionWindow = config.subAgentMetadata ? sessionManager.getCurrentModelContext(sessionId, config.mode) : contextState.maxTokens;
1762
1775
  if (shouldCompact(
1763
- contextState.currentTokens,
1764
- contextState.maxTokens,
1776
+ compactionTokens,
1777
+ compactionWindow,
1765
1778
  sessionManager.getModelCompactionThreshold(sessionId, config.mode) ?? runtimeConfig.context.compactionThreshold
1766
1779
  )) {
1767
1780
  appendCompactionPrompt(sessionId, append);
@@ -2241,14 +2254,7 @@ async function executeSubAgent(options) {
2241
2254
  if (resolved.usedOverride && resolved.override) {
2242
2255
  hasOverride = true;
2243
2256
  llmClient = resolved.client;
2244
- const provider = effectiveProviderManager.getProviders().find((p) => p.id === resolved.override.providerId);
2245
- statsIdentity = {
2246
- providerId: resolved.override.providerId,
2247
- providerName: provider?.name ?? resolved.override.providerId,
2248
- backend: provider?.backend ?? resolved.client.getBackend(),
2249
- model: resolved.override.model,
2250
- ...resolved.override.reasoningEffort ? { reasoningEffort: resolved.override.reasoningEffort } : {}
2251
- };
2257
+ statsIdentity = buildAgentOverrideStatsIdentity(effectiveProviderManager, resolved.client, resolved.override);
2252
2258
  const overrideEffort = effectiveProviderManager.resolveModelEffort(
2253
2259
  resolved.override.providerId,
2254
2260
  resolved.override.model,
@@ -2475,7 +2481,7 @@ var callSubAgentTool = {
2475
2481
  };
2476
2482
  }
2477
2483
  try {
2478
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-OH3WW6Q4.js");
2484
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-NIOESJYT.js");
2479
2485
  const toolRegistry = getToolRegistryForAgent2(agentDef);
2480
2486
  const turnMetrics = new TurnMetrics();
2481
2487
  const result = await executeSubAgent({
@@ -3579,11 +3585,11 @@ var mcpConfigTool = createTool(
3579
3585
  async function notifyContextChanged(sessionId) {
3580
3586
  context.sessionManager.setDynamicContextChanged(sessionId, true);
3581
3587
  mcpNotifyChanged?.(sessionId);
3582
- const { injectContextDriftReminders } = await import("./dynamic-context-IQUBKUCX.js");
3588
+ const { injectContextDriftReminders } = await import("./dynamic-context-CM3M2EJC.js");
3583
3589
  await injectContextDriftReminders(context.sessionManager, sessionId);
3584
3590
  }
3585
3591
  async function rebuildTools() {
3586
- const { setMcpTools: setMcpTools2 } = await import("./tools-OH3WW6Q4.js");
3592
+ const { setMcpTools: setMcpTools2 } = await import("./tools-NIOESJYT.js");
3587
3593
  const mcpTools = createMcpTools(mcpManagerForTools);
3588
3594
  setMcpTools2(mcpTools);
3589
3595
  }
@@ -4702,6 +4708,7 @@ export {
4702
4708
  getAgentModelOverride,
4703
4709
  setAgentModelOverride,
4704
4710
  resolveLLMClientForAgent,
4711
+ buildAgentOverrideStatsIdentity,
4705
4712
  runTopLevelAgentLoop,
4706
4713
  createAssemblyResult,
4707
4714
  getConversationMessages,
@@ -4725,4 +4732,4 @@ export {
4725
4732
  getToolRegistryForAgent,
4726
4733
  createToolRegistry
4727
4734
  };
4728
- //# sourceMappingURL=chunk-QR6FIHIP.js.map
4735
+ //# sourceMappingURL=chunk-EJKAN7HK.js.map
@@ -3,14 +3,14 @@ import {
3
3
  checkToolChangesAndInject,
4
4
  computeDynamicContextHash,
5
5
  getToolFingerprint
6
- } from "./chunk-L43S7FJM.js";
6
+ } from "./chunk-LNJOQAXT.js";
7
7
  import {
8
8
  createAssemblyResult,
9
9
  getConversationMessages,
10
10
  getToolRegistryForAgent,
11
11
  processEventsForConversation,
12
12
  runTopLevelAgentLoop
13
- } from "./chunk-QR6FIHIP.js";
13
+ } from "./chunk-EJKAN7HK.js";
14
14
  import {
15
15
  getAllInstructions,
16
16
  getEnabledSkillMetadata
@@ -357,7 +357,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
357
357
  getConversationMessages: buildGetConversationMessages(options.sessionId, resolveAgentClient, append),
358
358
  injectAgentReminder: () => injectAgentReminder(options.sessionId, agentDef),
359
359
  rebuildCachedContext: async () => {
360
- const { applyDynamicContext } = await import("./dynamic-context-IQUBKUCX.js");
360
+ const { applyDynamicContext } = await import("./dynamic-context-CM3M2EJC.js");
361
361
  await applyDynamicContext(options.sessionManager, options.sessionId, agentLlmClient.getModel());
362
362
  },
363
363
  ...options.initialCompacting ? { initialCompacting: true } : {},
@@ -387,4 +387,4 @@ export {
387
387
  runChatTurn,
388
388
  runAgentTurn
389
389
  };
390
- //# sourceMappingURL=chunk-5D4MQG7P.js.map
390
+ //# sourceMappingURL=chunk-F6QMFCHQ.js.map
@@ -329,7 +329,7 @@ function resolveAgentDef(sessionManager, sessionId) {
329
329
  });
330
330
  }
331
331
  async function getEffectiveToolDefinitions(agentDef, sessionId, modelName) {
332
- const { getToolRegistryForAgent } = await import("./tools-OH3WW6Q4.js");
332
+ const { getToolRegistryForAgent } = await import("./tools-NIOESJYT.js");
333
333
  const { isDescribeImageEligible } = await import("./describe-image-Z5WS6YU3.js");
334
334
  const all = getToolRegistryForAgent(agentDef, sessionId).definitions;
335
335
  const eligible = await isDescribeImageEligible(modelName);
@@ -398,4 +398,4 @@ export {
398
398
  computeSessionHash,
399
399
  applyDynamicContext
400
400
  };
401
- //# sourceMappingURL=chunk-L43S7FJM.js.map
401
+ //# sourceMappingURL=chunk-LNJOQAXT.js.map