nolo-cli 0.98.0-alpha.1 → 0.98.0-alpha.3

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 (60) hide show
  1. package/{_executeModel-FHVQOYWX.js → _executeModel-MA3D2J4W.js} +13 -13
  2. package/{agentDeleteCommand-4427YKQF.js → agentDeleteCommand-FHUJH5X4.js} +6 -6
  3. package/{agentEmailCommands-LYDIAUOP.js → agentEmailCommands-KNYBWNMA.js} +16 -16
  4. package/{agentListCommands-O4AEMQVV.js → agentListCommands-GATRXEMT.js} +6 -6
  5. package/{agentMachineCommands-F6IHXMPD.js → agentMachineCommands-N62I3D5Q.js} +7 -7
  6. package/{agentRecordCommands-BDLFOU7E.js → agentRecordCommands-GOC5K27T.js} +16 -16
  7. package/{agentRunCommand-HSSYFGMC.js → agentRunCommand-JP2U3MQF.js} +16 -16
  8. package/{agentRunControl-WCTKX5VL.js → agentRunControl-AVJR4JW4.js} +1 -1
  9. package/{agentRuntimeLocal-IW3IM5P6.js → agentRuntimeLocal-VXZSDIGT.js} +6 -6
  10. package/{agentSlice-G54NT6PX.js → agentSlice-65ETD734.js} +1 -1
  11. package/{appDeleteCommands-ZXLXNRHF.js → appDeleteCommands-PDZ7HQYH.js} +6 -6
  12. package/{appDeployCommands-PWB4YERK.js → appDeployCommands-KLLW32YA.js} +6 -6
  13. package/{appDeployStatusCommands-2EZKZP7Y.js → appDeployStatusCommands-IPNJ445T.js} +6 -6
  14. package/{appGetCommands-JNUKOWHO.js → appGetCommands-QA57XGXS.js} +6 -6
  15. package/{appListCommands-6X3H67SS.js → appListCommands-YBTAUFZS.js} +6 -6
  16. package/{chatQueueReduxAdapter-VJXYSZ2D.js → chatQueueReduxAdapter-5QOW43T4.js} +4 -4
  17. package/{chunk-HOBJGHLD.js → chunk-2FA3ITSX.js} +10 -10
  18. package/{chunk-NEDZDG3M.js → chunk-4OEFYTWL.js} +1 -1
  19. package/{chunk-4EZHSKTB.js → chunk-5H7KJX7J.js} +1 -1
  20. package/{chunk-SDTTBMBU.js → chunk-6VFARHZW.js} +5 -5
  21. package/{chunk-7REEVK4I.js → chunk-AD2L6YCC.js} +2 -2
  22. package/{chunk-F5OE5KSJ.js → chunk-D2QT5FW4.js} +1 -1
  23. package/{chunk-STHU4Y5X.js → chunk-DHDVZFNC.js} +10 -10
  24. package/{chunk-ASQYTZTR.js → chunk-DNCEALKX.js} +48 -9
  25. package/{chunk-GGMVRZRO.js → chunk-FSX24MR3.js} +9 -9
  26. package/{chunk-FEEHCOBD.js → chunk-FUUHG5LT.js} +1 -1
  27. package/{chunk-SPUTJ4DW.js → chunk-GABFWSOQ.js} +4 -4
  28. package/{chunk-DL2LVM5E.js → chunk-GZBATRJA.js} +2 -2
  29. package/{chunk-WGR3J4Q6.js → chunk-I3TQJXQ7.js} +8 -2
  30. package/{chunk-L7I247DF.js → chunk-L5UXH3B2.js} +1 -1
  31. package/{chunk-IIBAPOTQ.js → chunk-N2WELJE7.js} +2 -2
  32. package/{chunk-VQW3EKYS.js → chunk-PELKTR62.js} +6 -6
  33. package/{chunk-XTAZCQUT.js → chunk-TVYSVSA2.js} +3 -3
  34. package/{chunk-RTUYRRBM.js → chunk-UY2NBS4V.js} +1 -1
  35. package/{chunk-AVV3M6CX.js → chunk-V4I3A7DR.js} +3 -3
  36. package/{chunk-2YMRWISD.js → chunk-ZCYXJSTU.js} +1 -1
  37. package/{chunk-SL4QHSPQ.js → chunk-ZMD2CQFC.js} +14 -11
  38. package/{contentThunks-D6QQKIPF.js → contentThunks-Y6FA2TCW.js} +5 -5
  39. package/{createAgentAutomationAction-UIPWW4DG.js → createAgentAutomationAction-JXAFQO5V.js} +5 -5
  40. package/{createDialogAction-573VVP3X.js → createDialogAction-O2QABXZF.js} +6 -6
  41. package/{createPageAction-LRFSS6TD.js → createPageAction-GUQDPKO5.js} +5 -5
  42. package/{dialogCommands-KFK2FF5B.js → dialogCommands-JJDASFIL.js} +6 -6
  43. package/{dialogSlice-EXLC5XTD.js → dialogSlice-J2YJNE6E.js} +4 -4
  44. package/{docCreateCommands-V777WOZ7.js → docCreateCommands-OB3X3EQM.js} +6 -6
  45. package/{docDeleteCommands-5KHT7Z5Q.js → docDeleteCommands-WMHRGF22.js} +6 -6
  46. package/{docReadCommands-BLROGWP3.js → docReadCommands-NWGGLIAZ.js} +6 -6
  47. package/{docStore-DZNGJXX7.js → docStore-6KKYKAGQ.js} +1 -1
  48. package/{docUpdateCommands-QXOZHQ5H.js → docUpdateCommands-3DDSOLPS.js} +6 -6
  49. package/{handleSendMessageAction-OROTZBPO.js → handleSendMessageAction-A4XLEEPU.js} +4 -4
  50. package/index.js +47 -47
  51. package/{machineCommands-IJWERHRH.js → machineCommands-Y64KAIRW.js} +16 -16
  52. package/{machineWsRunDispatch-XQ36M4L7.js → machineWsRunDispatch-M366L2LJ.js} +16 -16
  53. package/package.json +1 -1
  54. package/{readlineWorkspace-EB3362L3.js → readlineWorkspace-45XNHFXU.js} +16 -16
  55. package/{runAgentClientLoop-3MR2NPWR.js → runAgentClientLoop-ADZRHNG6.js} +11 -11
  56. package/{spaceCommands-TIDVUPDV.js → spaceCommands-E7MQ4VU2.js} +6 -6
  57. package/{streamAgentChatTurn-CLP2JWCQ.js → streamAgentChatTurn-TUP7YO3H.js} +13 -13
  58. package/{tools-OXEEBABR.js → tools-2VDNDFET.js} +8 -8
  59. package/{tuiSummaryLlmCaller-VJY3YD2Q.js → tuiSummaryLlmCaller-WFRWERGK.js} +2 -2
  60. package/{updateDialogTitleAction-4YWKF2OE.js → updateDialogTitleAction-KSWXWWFT.js} +5 -5
@@ -27,7 +27,7 @@ import {
27
27
  resolveLocalUserId,
28
28
  t,
29
29
  toolLabel
30
- } from "./chunk-SL4QHSPQ.js";
30
+ } from "./chunk-ZMD2CQFC.js";
31
31
  import {
32
32
  createRunActivityTracker,
33
33
  popSingleQueueMessage,
@@ -35,7 +35,7 @@ import {
35
35
  resolveRunQueuePath,
36
36
  settleRunTerminalAuthoritatively,
37
37
  spawnLocalBackgroundRun
38
- } from "./chunk-WGR3J4Q6.js";
38
+ } from "./chunk-I3TQJXQ7.js";
39
39
  import {
40
40
  clearCredentialAvailability,
41
41
  readCredentialEntry,
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-LTRXGFMS.js";
65
65
  import {
66
66
  formatAgentListCard
67
- } from "./chunk-GGMVRZRO.js";
67
+ } from "./chunk-FSX24MR3.js";
68
68
  import {
69
69
  isTransientFetchError
70
70
  } from "./chunk-5UTFL4QJ.js";
@@ -85,11 +85,11 @@ import {
85
85
  chooseMemoryOwners,
86
86
  loadMemoryCandidatesFromDb,
87
87
  resolveAgentMemoryPolicy
88
- } from "./chunk-IIBAPOTQ.js";
88
+ } from "./chunk-N2WELJE7.js";
89
89
  import {
90
90
  API_REPORTED_COST_MULTIPLIER,
91
91
  parseUiAskChoiceContent
92
- } from "./chunk-STHU4Y5X.js";
92
+ } from "./chunk-DHDVZFNC.js";
93
93
  import {
94
94
  isOAuthApiKeyRef
95
95
  } from "./chunk-YYLHWIW6.js";
@@ -112,10 +112,10 @@ import {
112
112
  LOCAL_AGENT_CONFIG_MISSING_CODE,
113
113
  LOCAL_TURN_ABORTED_CODE,
114
114
  readActionGate
115
- } from "./chunk-SDTTBMBU.js";
115
+ } from "./chunk-6VFARHZW.js";
116
116
  import {
117
117
  resolveAgentRuntimeConfigFromRecord
118
- } from "./chunk-4EZHSKTB.js";
118
+ } from "./chunk-5H7KJX7J.js";
119
119
  import {
120
120
  createThinkParserState,
121
121
  flushThinkParser,
@@ -138,10 +138,10 @@ import {
138
138
  DEFAULT_CONTEXT_WINDOW,
139
139
  getModelContextWindow,
140
140
  normalizeUsage
141
- } from "./chunk-NEDZDG3M.js";
141
+ } from "./chunk-4OEFYTWL.js";
142
142
  import {
143
143
  clipCompactText
144
- } from "./chunk-ASQYTZTR.js";
144
+ } from "./chunk-DNCEALKX.js";
145
145
  import {
146
146
  findModelConfig
147
147
  } from "./chunk-OIVSQH2O.js";
@@ -10433,7 +10433,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
10433
10433
  // packages/cli/client/agentRun.ts
10434
10434
  import { ulid as ulid2 } from "ulid";
10435
10435
  async function loadRunLocalAgentTurn() {
10436
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-IW3IM5P6.js");
10436
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-VXZSDIGT.js");
10437
10437
  return runLocalAgentTurn;
10438
10438
  }
10439
10439
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeTimingMs
3
- } from "./chunk-ASQYTZTR.js";
3
+ } from "./chunk-DNCEALKX.js";
4
4
  import {
5
5
  MODEL_LOOKUP_MAP
6
6
  } from "./chunk-OIVSQH2O.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5ZUL4CUO.js";
4
4
  import {
5
5
  getModelContextWindow
6
- } from "./chunk-NEDZDG3M.js";
6
+ } from "./chunk-4OEFYTWL.js";
7
7
  import {
8
8
  findModelConfig,
9
9
  getProviderByModelName
@@ -8,7 +8,7 @@ import {
8
8
  readSseFrames,
9
9
  streamSseDataValues,
10
10
  throwIfChatCompletionStreamFailed
11
- } from "./chunk-2YMRWISD.js";
11
+ } from "./chunk-ZCYXJSTU.js";
12
12
  import {
13
13
  DEVIN_CONNECT_URL
14
14
  } from "./chunk-Q5FJJ6XI.js";
@@ -20,7 +20,7 @@ import {
20
20
  resolveHistoricalToolContentCap,
21
21
  resolveToolOutputProfile,
22
22
  stripImagePartsFromMessages
23
- } from "./chunk-4EZHSKTB.js";
23
+ } from "./chunk-5H7KJX7J.js";
24
24
  import {
25
25
  downgradeUnparsableToolCalls,
26
26
  hasParsableObjectArguments,
@@ -46,7 +46,7 @@ import {
46
46
  requiresBareImageUrl,
47
47
  resolveToolGuidedSections,
48
48
  toBareImageUrlMessages
49
- } from "./chunk-L7I247DF.js";
49
+ } from "./chunk-L5UXH3B2.js";
50
50
  import {
51
51
  convertMessagesToResponsesInput,
52
52
  extractReasoningFromResponseOutput,
@@ -93,7 +93,7 @@ import {
93
93
  resolveEmptyAssistantFallbackMessage,
94
94
  resolveEmptyAssistantOutcome,
95
95
  resolveTruncatedReasoningTailLog
96
- } from "./chunk-NEDZDG3M.js";
96
+ } from "./chunk-4OEFYTWL.js";
97
97
  import {
98
98
  COMPACTION_SUMMARY_SCHEMA_VERSION,
99
99
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
@@ -112,7 +112,7 @@ import {
112
112
  resolveCompressionTriggerRatio,
113
113
  truncateToolOutputForContext,
114
114
  withProviderCallTimingFields
115
- } from "./chunk-ASQYTZTR.js";
115
+ } from "./chunk-DNCEALKX.js";
116
116
  import {
117
117
  estimateTokenCount
118
118
  } from "./chunk-PSCNXBYA.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-GGMVRZRO.js";
3
+ } from "./chunk-FSX24MR3.js";
4
4
  import {
5
5
  i18n_default
6
- } from "./chunk-STHU4Y5X.js";
6
+ } from "./chunk-DHDVZFNC.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-O6OSWFZQ.js";
@@ -9,7 +9,7 @@ import {
9
9
  initReactI18next,
10
10
  instance,
11
11
  toast
12
- } from "./chunk-STHU4Y5X.js";
12
+ } from "./chunk-DHDVZFNC.js";
13
13
  import {
14
14
  require_date_fns
15
15
  } from "./chunk-M76ECQRD.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-AGGIDPCZ.js";
15
15
  import {
16
16
  runLlm
17
- } from "./chunk-XTAZCQUT.js";
17
+ } from "./chunk-TVYSVSA2.js";
18
18
  import {
19
19
  cleanupCliSessionForDialog
20
20
  } from "./chunk-TOP2VXOR.js";
@@ -55,7 +55,7 @@ import {
55
55
  getModelInfo,
56
56
  normalizeUsage,
57
57
  resolveAutoExecutionProfile
58
- } from "./chunk-NEDZDG3M.js";
58
+ } from "./chunk-4OEFYTWL.js";
59
59
  import {
60
60
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
61
61
  buildCompactionMetricsFromPlan,
@@ -66,7 +66,7 @@ import {
66
66
  normalizeAssistantContentBuffer,
67
67
  planCompression,
68
68
  serializeMessageContent
69
- } from "./chunk-ASQYTZTR.js";
69
+ } from "./chunk-DNCEALKX.js";
70
70
  import {
71
71
  findModelConfig,
72
72
  getModelConfig
@@ -17474,7 +17474,7 @@ var messageSlice = createSliceWithThunks({
17474
17474
  runtimeOptions: args.runtimeOptions
17475
17475
  });
17476
17476
  if (agentKeyToUse) {
17477
- const { streamAgentChatTurn } = await import("./agentSlice-G54NT6PX.js");
17477
+ const { streamAgentChatTurn } = await import("./agentSlice-65ETD734.js");
17478
17478
  await dispatch(
17479
17479
  streamAgentChatTurn({
17480
17480
  agentKey: agentKeyToUse,
@@ -18610,7 +18610,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
18610
18610
  }
18611
18611
  if (isCurrentDialog) {
18612
18612
  await thunkApi.dispatch(resetMsgs());
18613
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-EXLC5XTD.js");
18613
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-J2YJNE6E.js");
18614
18614
  dispatch(clearPendingAttachments2());
18615
18615
  }
18616
18616
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -18618,15 +18618,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
18618
18618
 
18619
18619
  // packages/chat/dialog/dialogSlice.ts
18620
18620
  var runCreateDialogAction = async (args, thunkApi) => {
18621
- const { createDialogAction } = await import("./createDialogAction-573VVP3X.js");
18621
+ const { createDialogAction } = await import("./createDialogAction-O2QABXZF.js");
18622
18622
  return createDialogAction(args, thunkApi);
18623
18623
  };
18624
18624
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
18625
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-UIPWW4DG.js");
18625
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-JXAFQO5V.js");
18626
18626
  return createAgentAutomationAction(args, thunkApi);
18627
18627
  };
18628
18628
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
18629
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-4YWKF2OE.js");
18629
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-KSWXWWFT.js");
18630
18630
  return updateDialogTitleAction(args, thunkApi);
18631
18631
  };
18632
18632
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -18650,7 +18650,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
18650
18650
  return setDialogExtraReferencesAction(args, thunkApi);
18651
18651
  };
18652
18652
  var runHandleSendMessageAction = async (args, thunkApi) => {
18653
- const { handleSendMessageAction } = await import("./handleSendMessageAction-OROTZBPO.js");
18653
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-A4XLEEPU.js");
18654
18654
  return handleSendMessageAction(args, thunkApi);
18655
18655
  };
18656
18656
  function clearDialogState() {
@@ -18663,7 +18663,7 @@ var createPageAndAddReference = createAsyncThunk(
18663
18663
  async (payload, { dispatch, getState, rejectWithValue }) => {
18664
18664
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
18665
18665
  try {
18666
- const { createDocState } = await import("./docStore-DZNGJXX7.js");
18666
+ const { createDocState } = await import("./docStore-6KKYKAGQ.js");
18667
18667
  const pageKey = await createDocState(
18668
18668
  { slateData, title },
18669
18669
  { dispatch, getState }
@@ -367,6 +367,7 @@ var truncateToolOutputForContext = (text, contextWindow) => {
367
367
  // packages/ai/context/planCompression.ts
368
368
  var MIN_COMPRESS_COUNT = 5;
369
369
  var ACTIVE_SUMMARY_TAIL_KEEP_COUNT = 2;
370
+ var COMPACTION_RETENTION_CUSHION_RATIO = 0.18;
370
371
  var MIN_TRIGGER_PENDING_COUNT = MIN_COMPRESS_COUNT + ACTIVE_SUMMARY_TAIL_KEEP_COUNT;
371
372
  var getMessageTokenCount = (msg) => {
372
373
  const content = serializeMessageContent(msg.content) || "";
@@ -465,15 +466,42 @@ function calculateCompressCount(pendingMsgs, rawMessageBudget, opts) {
465
466
  }
466
467
  return pendingMsgs.length - keepCount;
467
468
  }
469
+ function resolveEffectiveCompactionBudgets(args) {
470
+ const {
471
+ contextWindow,
472
+ triggerRatio,
473
+ historyBudget,
474
+ rawMessageBudget,
475
+ summaryTokens,
476
+ cushionRatio = COMPACTION_RETENTION_CUSHION_RATIO
477
+ } = args;
478
+ const maxRetainedRatio = Math.max(
479
+ 0.2,
480
+ Number((triggerRatio - cushionRatio).toFixed(4))
481
+ );
482
+ const maxRetainedHistoryBudget = Math.floor(contextWindow * maxRetainedRatio);
483
+ const effectiveHistoryBudget = Math.min(historyBudget, maxRetainedHistoryBudget);
484
+ const effectiveRawMessageBudget = Math.min(
485
+ rawMessageBudget,
486
+ Math.max(0, effectiveHistoryBudget - summaryTokens)
487
+ );
488
+ return {
489
+ effectiveHistoryBudget,
490
+ effectiveRawMessageBudget,
491
+ maxRetainedRatio
492
+ };
493
+ }
468
494
  function guardToolChainBoundary(pendingMsgs, compressCount) {
469
495
  let count = compressCount;
470
- while (count > 0 && count < pendingMsgs.length && pendingMsgs[count].role === "tool") {
471
- count--;
496
+ while (count < pendingMsgs.length && pendingMsgs[count].role === "tool") {
497
+ count++;
472
498
  }
473
- if (count > 0) {
474
- const lastCompressed = pendingMsgs[count - 1];
475
- if (hasOpenEndedToolCall(lastCompressed)) {
499
+ while (count > 0 && hasOpenEndedToolCall(pendingMsgs[count - 1])) {
500
+ if (count < pendingMsgs.length && pendingMsgs[count].role === "tool") {
501
+ count++;
502
+ } else {
476
503
  count--;
504
+ break;
477
505
  }
478
506
  }
479
507
  return count;
@@ -548,11 +576,22 @@ function planCompression(input) {
548
576
  emptyReason: "not-triggered"
549
577
  });
550
578
  }
551
- let compressCount = calculateCompressCount(pendingMsgs, rawMessageBudget, {
552
- keepTailCount: shouldRunActiveSummary || triggeredByRealUsage || triggeredByColdResume,
553
- totalUsed,
554
- historyBudget
579
+ const { effectiveHistoryBudget, effectiveRawMessageBudget } = resolveEffectiveCompactionBudgets({
580
+ contextWindow,
581
+ triggerRatio,
582
+ historyBudget,
583
+ rawMessageBudget,
584
+ summaryTokens
555
585
  });
586
+ let compressCount = calculateCompressCount(
587
+ pendingMsgs,
588
+ effectiveRawMessageBudget,
589
+ {
590
+ keepTailCount: shouldRunActiveSummary || triggeredByRealUsage || triggeredByColdResume,
591
+ totalUsed,
592
+ historyBudget: effectiveHistoryBudget
593
+ }
594
+ );
556
595
  compressCount = guardToolChainBoundary(pendingMsgs, compressCount);
557
596
  if (compressCount < MIN_COMPRESS_COUNT) {
558
597
  return emptyPlan(startIndex, {
@@ -81,10 +81,10 @@ import {
81
81
  } from "./chunk-VF4K2QE6.js";
82
82
  import {
83
83
  createDocState
84
- } from "./chunk-DL2LVM5E.js";
84
+ } from "./chunk-GZBATRJA.js";
85
85
  import {
86
86
  createDialogAction
87
- } from "./chunk-IIBAPOTQ.js";
87
+ } from "./chunk-N2WELJE7.js";
88
88
  import {
89
89
  DEFAULT_COLLAPSED_CATEGORIES,
90
90
  addContentToSpace,
@@ -102,7 +102,7 @@ import {
102
102
  updateContentCategory,
103
103
  updateContentTitle,
104
104
  writeStoredCollapsedCategories
105
- } from "./chunk-F5OE5KSJ.js";
105
+ } from "./chunk-D2QT5FW4.js";
106
106
  import {
107
107
  getCurrentSpaceId,
108
108
  getCurrentSpaceIdRaw,
@@ -124,14 +124,14 @@ import {
124
124
  selectMsgById,
125
125
  uiAskChoiceFunc,
126
126
  uiAskChoiceFunctionSchema
127
- } from "./chunk-STHU4Y5X.js";
127
+ } from "./chunk-DHDVZFNC.js";
128
128
  import {
129
129
  createAgent,
130
130
  deleteServerSyncedCredential,
131
131
  runLlm,
132
132
  streamAgentChatTurn,
133
133
  updateAgent
134
- } from "./chunk-XTAZCQUT.js";
134
+ } from "./chunk-TVYSVSA2.js";
135
135
  import {
136
136
  getActiveDialogKey,
137
137
  selectCurrentDialogKey,
@@ -179,7 +179,7 @@ import {
179
179
  } from "./chunk-FDTR4QJ6.js";
180
180
  import {
181
181
  buildDatabaseFileContentUrl
182
- } from "./chunk-ASQYTZTR.js";
182
+ } from "./chunk-DNCEALKX.js";
183
183
  import {
184
184
  DEFAULT_MODEL
185
185
  } from "./chunk-OIVSQH2O.js";
@@ -3945,7 +3945,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3945
3945
  const deletedDialogIds = [];
3946
3946
  const deletedDialogKeys = [];
3947
3947
  const failures = [];
3948
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-EXLC5XTD.js");
3948
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-J2YJNE6E.js");
3949
3949
  for (const target of targets) {
3950
3950
  try {
3951
3951
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -14906,7 +14906,7 @@ var executeToolRun = createAsyncThunk(
14906
14906
  if (!executionInput) {
14907
14907
  throw new Error(`ToolRun ${id} has no input to execute with.`);
14908
14908
  }
14909
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-OXEEBABR.js");
14909
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-2VDNDFET.js");
14910
14910
  const { executor } = findToolExecutor2(run.toolName);
14911
14911
  toolRunStarted({
14912
14912
  id: run.id,
@@ -17413,7 +17413,7 @@ async function updateDocFunc(args, thunkApi) {
17413
17413
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
17414
17414
  };
17415
17415
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
17416
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-DZNGJXX7.js");
17416
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-6KKYKAGQ.js");
17417
17417
  if (getDocState().pageKey === id) {
17418
17418
  applyExternalDocUpdate({
17419
17419
  slateData: finalSlateData,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-SPUTJ4DW.js";
4
+ } from "./chunk-GABFWSOQ.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  clipMultilineText,
9
9
  fetchAndSerializeTable
10
- } from "./chunk-GGMVRZRO.js";
10
+ } from "./chunk-FSX24MR3.js";
11
11
  import {
12
12
  isGatewayHttpStatus
13
13
  } from "./chunk-NF64D32W.js";
@@ -28,13 +28,13 @@ import {
28
28
  } from "./chunk-MEYIRKDN.js";
29
29
  import {
30
30
  fetchAndCacheMessages
31
- } from "./chunk-STHU4Y5X.js";
31
+ } from "./chunk-DHDVZFNC.js";
32
32
  import {
33
33
  shouldUseServerProxy
34
34
  } from "./chunk-YYLHWIW6.js";
35
35
  import {
36
36
  fetchServerSyncedCredential
37
- } from "./chunk-XTAZCQUT.js";
37
+ } from "./chunk-TVYSVSA2.js";
38
38
  import {
39
39
  buildSkillGuidancePromptBlock,
40
40
  extractRuntimePageCapabilities,
@@ -48,7 +48,7 @@ import {
48
48
  detectDispatchIntentFromMessages,
49
49
  normalizeChatCompletionsBodyForProvider,
50
50
  resolveToolGuidedSections
51
- } from "./chunk-L7I247DF.js";
51
+ } from "./chunk-L5UXH3B2.js";
52
52
  import {
53
53
  convertMessagesToResponsesInput,
54
54
  getUsageRequestOptions,
@@ -326,7 +326,7 @@ async function saveDocState(arg, { dispatch, getState }) {
326
326
  ).unwrap();
327
327
  if (dbSpaceId) {
328
328
  try {
329
- const { updateContentTitle } = await import("./contentThunks-D6QQKIPF.js");
329
+ const { updateContentTitle } = await import("./contentThunks-Y6FA2TCW.js");
330
330
  await dispatch(
331
331
  updateContentTitle({
332
332
  spaceId: dbSpaceId,
@@ -365,7 +365,7 @@ async function saveDocState(arg, { dispatch, getState }) {
365
365
  }
366
366
  }
367
367
  async function createDocState(args, thunkApi) {
368
- const { createPageAction } = await import("./createPageAction-LRFSS6TD.js");
368
+ const { createPageAction } = await import("./createPageAction-GUQDPKO5.js");
369
369
  return createPageAction(args, thunkApi);
370
370
  }
371
371
  function subscribe(listener) {
@@ -1473,14 +1473,20 @@ async function terminateRunProcess(record, initialSignal, deps) {
1473
1473
  signalGroup(initialSignal);
1474
1474
  if (initialSignal === "SIGTERM") {
1475
1475
  const deadline = nowMs() + TERMINATE_GRACE_MS;
1476
- while (!isPidGone(pid, deps) && nowMs() < deadline) {
1476
+ const maxIterations = Math.ceil(TERMINATE_GRACE_MS / TERMINATE_POLL_MS) + 1;
1477
+ let iterations = 0;
1478
+ while (!isPidGone(pid, deps) && nowMs() < deadline && iterations < maxIterations) {
1479
+ iterations += 1;
1477
1480
  await sleep(TERMINATE_POLL_MS);
1478
1481
  }
1479
1482
  }
1480
1483
  if (!isPidGone(pid, deps)) {
1481
1484
  signalGroup("SIGKILL");
1482
1485
  const killDeadline = nowMs() + TERMINATE_KILL_GRACE_MS;
1483
- while (!isPidGone(pid, deps) && nowMs() < killDeadline) {
1486
+ const maxIterations = Math.ceil(TERMINATE_KILL_GRACE_MS / TERMINATE_POLL_MS) + 1;
1487
+ let iterations = 0;
1488
+ while (!isPidGone(pid, deps) && nowMs() < killDeadline && iterations < maxIterations) {
1489
+ iterations += 1;
1484
1490
  await sleep(TERMINATE_POLL_MS);
1485
1491
  }
1486
1492
  }
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-IIVGDG4I.js";
8
8
  import {
9
9
  getModelContextWindow
10
- } from "./chunk-NEDZDG3M.js";
10
+ } from "./chunk-4OEFYTWL.js";
11
11
  import {
12
12
  estimateTokenCount
13
13
  } from "./chunk-PSCNXBYA.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-F5OE5KSJ.js";
3
+ } from "./chunk-D2QT5FW4.js";
4
4
  import {
5
5
  prepareAndPersistMessage,
6
6
  uiAskChoiceFunc,
7
7
  uiAskChoiceFunctionSchema
8
- } from "./chunk-STHU4Y5X.js";
8
+ } from "./chunk-DHDVZFNC.js";
9
9
  import {
10
10
  require_date_fns
11
11
  } from "./chunk-M76ECQRD.js";
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-7REEVK4I.js";
8
+ } from "./chunk-AD2L6YCC.js";
9
9
  import {
10
10
  INVALID_TOOL_ARGS_REPLACEMENT,
11
11
  buildInvalidToolCallSelfHealResult,
12
12
  parseToolCallArguments,
13
13
  performFetchRequest,
14
14
  sanitizeOutboundMessages
15
- } from "./chunk-SPUTJ4DW.js";
15
+ } from "./chunk-GABFWSOQ.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,7 +23,7 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-GGMVRZRO.js";
26
+ } from "./chunk-FSX24MR3.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
@@ -35,10 +35,10 @@ import {
35
35
  messageStreamEnd,
36
36
  messageStreaming,
37
37
  updateToolMessage
38
- } from "./chunk-STHU4Y5X.js";
38
+ } from "./chunk-DHDVZFNC.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-XTAZCQUT.js";
41
+ } from "./chunk-TVYSVSA2.js";
42
42
  import {
43
43
  addActiveController,
44
44
  removeActiveController,
@@ -56,7 +56,7 @@ import {
56
56
  import {
57
57
  EMPTY_ASSISTANT_REPAIR_PROMPT,
58
58
  getModelInfo
59
- } from "./chunk-NEDZDG3M.js";
59
+ } from "./chunk-4OEFYTWL.js";
60
60
  import {
61
61
  getApiEndpoint
62
62
  } from "./chunk-OIVSQH2O.js";
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
304
304
  const overrides = {};
305
305
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
306
306
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
307
- const { _executeModel } = await import("./_executeModel-FHVQOYWX.js");
307
+ const { _executeModel } = await import("./_executeModel-MA3D2J4W.js");
308
308
  return _executeModel(
309
309
  {
310
310
  isStreaming: args.isStreaming ?? false,
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
325
325
  * - 循环直到无工具调用或触发其他运行时停止条件
326
326
  */
327
327
  runAgent: create.asyncThunk(async (args, thunkApi) => {
328
- const { runAgentClientLoop } = await import("./runAgentClientLoop-3MR2NPWR.js");
328
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-ADZRHNG6.js");
329
329
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
330
330
  {
331
331
  agentKey: args.agentKey,
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
341
341
  * 聊天轮次流式 Agent 调用
342
342
  */
343
343
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
344
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-CLP2JWCQ.js");
344
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-TUP7YO3H.js");
345
345
  return streamAgentChatTurnHandler(args, thunkApi);
346
346
  }),
347
347
  /**
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-SL4QHSPQ.js";
3
+ } from "./chunk-ZMD2CQFC.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-LS2ZANRJ.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-SL4QHSPQ.js";
4
+ } from "./chunk-ZMD2CQFC.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-GGMVRZRO.js";
7
+ } from "./chunk-FSX24MR3.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-SDTTBMBU.js";
10
+ } from "./chunk-6VFARHZW.js";
11
11
  import {
12
12
  applyToolSurfaceConstraints
13
13
  } from "./chunk-IIVGDG4I.js";
@@ -40,7 +40,7 @@ import {
40
40
  clipCompactText,
41
41
  isMeaningfulChatCompletionOutput,
42
42
  isMeaningfulResponsesOutput
43
- } from "./chunk-ASQYTZTR.js";
43
+ } from "./chunk-DNCEALKX.js";
44
44
  import {
45
45
  NOLO_CLIENT_VERSION_HEADER,
46
46
  isPlatformMimoProviderModel