nolo-cli 0.30.1 → 0.31.0-alpha.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.
Files changed (108) hide show
  1. package/{_executeModel-FYUR7PQU.js → _executeModel-K47XKKPU.js} +32 -31
  2. package/{action-FENWPT3C.js → action-HI3VRQLP.js} +7 -7
  3. package/{addContentAction-Z5S5ZQ7I.js → addContentAction-NCURJ6PK.js} +6 -6
  4. package/{addDialogAgentAction-VUNVD2XR.js → addDialogAgentAction-RCY4ECF4.js} +5 -5
  5. package/{agentDeleteCommand-HHP47ZB2.js → agentDeleteCommand-7BBZCONG.js} +26 -25
  6. package/{agentEmailCommands-H6KRDTQW.js → agentEmailCommands-D6FAT5HM.js} +38 -37
  7. package/{agentListCommands-GNVFOTB4.js → agentListCommands-YPNNMGSJ.js} +28 -27
  8. package/{agentMachineCommands-4HJHI26F.js → agentMachineCommands-VYRVSKUC.js} +26 -25
  9. package/{agentRecordCommands-W6ITUONM.js → agentRecordCommands-4J52H5NK.js} +37 -36
  10. package/{agentRunCommand-VDLU4VKR.js → agentRunCommand-LH4RA6FA.js} +38 -37
  11. package/{agentRunControl-AKBN2366.js → agentRunControl-SCIVRZWX.js} +9 -1
  12. package/{agentRuntimeLocal-3X3ZTFT2.js → agentRuntimeLocal-G7GK545E.js} +23 -22
  13. package/{agentSlice-5HYCSSTE.js → agentSlice-4ZLEPC3M.js} +6 -6
  14. package/{appDeleteCommands-WFUF34TE.js → appDeleteCommands-AOZED7QJ.js} +27 -26
  15. package/{appDeployCommands-J2EAE53G.js → appDeployCommands-XJY27BDS.js} +27 -26
  16. package/{appDeployStatusCommands-RLXDEHTV.js → appDeployStatusCommands-HKZYAPB2.js} +27 -26
  17. package/{appGetCommands-ZGV3CKCM.js → appGetCommands-VXJLPRYI.js} +27 -26
  18. package/{appListCommands-3VRX3EJI.js → appListCommands-3LU6AB4G.js} +27 -26
  19. package/{authCommand-RR5LAYSW.js → authCommand-3GQR43KB.js} +5 -5
  20. package/{chunk-ZFTCLBEX.js → chunk-2IJAKBK2.js} +3 -1
  21. package/chunk-2K4NDPT5.js +1524 -0
  22. package/{chunk-6QP7LEI6.js → chunk-2MSOY7A5.js} +49 -33
  23. package/{chunk-3IPBZISR.js → chunk-2YT3KLHX.js} +1 -1
  24. package/{chunk-GABCPUMC.js → chunk-3IU7WEJD.js} +1 -1
  25. package/{chunk-Q24P6TUS.js → chunk-43EPBPZ2.js} +1 -1
  26. package/{chunk-5NPAOURO.js → chunk-4URO6HMS.js} +1 -1
  27. package/{chunk-S342XWCB.js → chunk-5EDVWWE3.js} +1 -1
  28. package/{chunk-CTLXD6HB.js → chunk-5JQRISUS.js} +3 -3
  29. package/{chunk-4ZMTXQFB.js → chunk-5MVFYKBL.js} +5 -5
  30. package/{chunk-R5V5G73M.js → chunk-5RDLGLAP.js} +0 -1
  31. package/{chunk-4SAV7BD7.js → chunk-7KNERA53.js} +53 -15
  32. package/{chunk-XORE26Z4.js → chunk-7S54ZGF6.js} +2 -2
  33. package/{chunk-IZ3CBMD5.js → chunk-ATK5WJOA.js} +4 -4
  34. package/chunk-BGTUGS3T.js +702 -0
  35. package/{chunk-YX26YZL4.js → chunk-C3NYMZTQ.js} +16 -14
  36. package/{chunk-R2JHVPHL.js → chunk-CPUZW54L.js} +4 -4
  37. package/{chunk-PJY5AH5A.js → chunk-DPR66GY6.js} +1 -1
  38. package/{chunk-3Z6SPX5X.js → chunk-E2CFIWQR.js} +31 -23
  39. package/{chunk-PACNSC37.js → chunk-E3APEOIM.js} +1 -1
  40. package/{chunk-7QW64TCG.js → chunk-EATVNXFX.js} +7 -7
  41. package/{chunk-G5JHHUAK.js → chunk-F3MP7CP6.js} +1 -1
  42. package/{chunk-YK2QRWTO.js → chunk-FLYQAMF4.js} +3 -3
  43. package/{chunk-446VANPP.js → chunk-G5GVZAXF.js} +4 -4
  44. package/{chunk-KH3JS4D5.js → chunk-H6COXALE.js} +78 -27
  45. package/{chunk-MNUJETMH.js → chunk-K76HYM3O.js} +1 -1
  46. package/{chunk-DKRT67FG.js → chunk-KGEVMUMI.js} +3 -3
  47. package/{chunk-A4JDTA5T.js → chunk-LAXMH7JY.js} +6 -6
  48. package/{chunk-TAS3THIF.js → chunk-LBEWOWVL.js} +4 -4
  49. package/{chunk-72NVMKWA.js → chunk-NEGMZP6Q.js} +1 -1
  50. package/{chunk-QDNVDGLN.js → chunk-NMK2JHKM.js} +9 -7
  51. package/{chunk-JRI2BRJY.js → chunk-OT2AXEQD.js} +26 -5
  52. package/{chunk-LWP3HB56.js → chunk-PTHDLIRB.js} +1 -1
  53. package/{chunk-V5BWE46D.js → chunk-Q6L3O67D.js} +2 -2
  54. package/{chunk-LWYIHJKD.js → chunk-QHWPAW5M.js} +2 -2
  55. package/{chunk-KWCLUYGQ.js → chunk-QL6ELRVS.js} +1 -1
  56. package/chunk-RJ7KLCWY.js +5134 -0
  57. package/{chunk-WJD5RNVB.js → chunk-SFWZUTCI.js} +1 -1
  58. package/{chunk-WTPC3XD4.js → chunk-UDA3ZYLW.js} +1 -1
  59. package/{chunk-YLADSPDU.js → chunk-V54H24CQ.js} +2 -2
  60. package/{chunk-F3A5IZSX.js → chunk-WEID4JLC.js} +2 -2
  61. package/{chunk-IUA36RS4.js → chunk-WMH2G6XJ.js} +58 -124
  62. package/{chunk-4PWB7JRR.js → chunk-XFG3BAKN.js} +1 -0
  63. package/chunk-XGJ75KN2.js +7889 -0
  64. package/{chunk-2TZP235J.js → chunk-XPML3KYZ.js} +6 -6
  65. package/{chunk-2NYIVLAY.js → chunk-YHGHADBQ.js} +2 -2
  66. package/{chunk-MV6UZXZU.js → chunk-YJZGAAVX.js} +14 -12
  67. package/{chunk-BOL2D2JW.js → chunk-ZJ2WITOO.js} +2 -2
  68. package/{chunk-DWQNDGO7.js → chunk-ZJH3LKEW.js} +2 -2
  69. package/{createAgentAutomationAction-EKABYSSA.js → createAgentAutomationAction-AECD5YCU.js} +13 -12
  70. package/{createDialogAction-HLP6TV4H.js → createDialogAction-MZUC37CA.js} +14 -13
  71. package/{createPageAction-4NEEWW6S.js → createPageAction-KRTBWM2S.js} +13 -12
  72. package/{db-IPCJ43PW.js → db-6DPSJ6WT.js} +4 -2
  73. package/{dbSlice-OBV7VFCF.js → dbSlice-BBL3PEVW.js} +5 -5
  74. package/{deleteFile-AC45HYSM.js → deleteFile-RJTEPOT4.js} +3 -3
  75. package/{dialogCommands-XB3ZNSP3.js → dialogCommands-RFADXVV6.js} +27 -26
  76. package/{dialogSlice-4IWM2WIY.js → dialogSlice-EWNZ2HFD.js} +12 -12
  77. package/{docCreateCommands-QSPTTAN7.js → docCreateCommands-ZHX6SX5M.js} +26 -25
  78. package/{docDeleteCommands-2E6JZXCP.js → docDeleteCommands-3EEM7ITO.js} +27 -26
  79. package/{docReadCommands-N2DQVLLT.js → docReadCommands-JOMLMZTC.js} +26 -25
  80. package/{docStore-PFZCPHPC.js → docStore-YKTKKH3N.js} +14 -13
  81. package/{docUpdateCommands-53KFSYEP.js → docUpdateCommands-PGAYLKLC.js} +26 -25
  82. package/{getPricing-67TQVKFV.js → getPricing-QO5TYNCK.js} +2 -2
  83. package/{handleSendMessageAction-4IYJTQAL.js → handleSendMessageAction-VX4CGWAJ.js} +12 -12
  84. package/index.js +63 -63
  85. package/{localDialogRead-P72W2U2R.js → localDialogRead-3DBXVYXS.js} +1 -1
  86. package/{machineCommands-CR34SD5W.js → machineCommands-A2WFB37F.js} +36 -35
  87. package/{machineWsRunDispatch-G4O3NQ3I.js → machineWsRunDispatch-E5R54UWZ.js} +36 -35
  88. package/package.json +1 -1
  89. package/{read-QK7ZRX6G.js → read-64OQDO3I.js} +3 -3
  90. package/{readDocTool-EYDMVRBL.js → readDocTool-MXM3T6PE.js} +1 -1
  91. package/{readlineWorkspace-UAF5D7TC.js → readlineWorkspace-S4A6UYVJ.js} +125 -79
  92. package/{removeDialogAgentAction-TBW3UZJW.js → removeDialogAgentAction-NEKVAMSH.js} +7 -7
  93. package/{runAgentClientLoop-R5WNOWHI.js → runAgentClientLoop-C6IIUQ36.js} +27 -26
  94. package/{setDialogExtraReferencesAction-Q3ANF2NR.js → setDialogExtraReferencesAction-WTOHQDIV.js} +6 -6
  95. package/{setPrimaryDialogAgentAction-FQ5R3EFJ.js → setPrimaryDialogAgentAction-LDJOYC4F.js} +7 -7
  96. package/{settingSlice-JKKV2T7O.js → settingSlice-4M37TN7V.js} +6 -6
  97. package/{skillDiscovery-I3QRA7NE.js → skillDiscovery-Y3HALY2U.js} +3 -3
  98. package/{spaceCommands-RZN5K5ND.js → spaceCommands-SKCMLOC6.js} +210 -28
  99. package/{spaceSlice-3BVGRL3V.js → spaceSlice-6VOPELQN.js} +13 -12
  100. package/{streamAgentChatTurn-RVOJZ2HO.js → streamAgentChatTurn-623CNKWF.js} +35 -32
  101. package/{switchDialogAgentAction-QQGVE4SL.js → switchDialogAgentAction-XVWGKR2Z.js} +5 -5
  102. package/{tableCommands-PRJNWN6Q.js → tableCommands-RJZ3V4TF.js} +1 -1
  103. package/{tools-QAKUH2P6.js → tools-IN4B36PN.js} +21 -20
  104. package/{tuiSummaryLlmCaller-YQBN5IMG.js → tuiSummaryLlmCaller-SRZ4QQUP.js} +19 -5
  105. package/{updateDialogTitleAction-4O5PZVQR.js → updateDialogTitleAction-4ABIVEYY.js} +18 -16
  106. package/chunk-EIQDGAAE.js +0 -5083
  107. package/chunk-O6YCGBJB.js +0 -16338
  108. package/chunk-OB6FBSH3.js +0 -47
@@ -5,10 +5,10 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-3IPBZISR.js";
8
+ } from "./chunk-2YT3KLHX.js";
9
9
  import {
10
10
  EMPTY_ASSISTANT_REPAIR_PROMPT
11
- } from "./chunk-IUA36RS4.js";
11
+ } from "./chunk-WMH2G6XJ.js";
12
12
  import {
13
13
  accumulateToolCallDelta,
14
14
  createThinkParserState,
@@ -20,12 +20,12 @@ import {
20
20
  } from "./chunk-N7J63Q6C.js";
21
21
  import {
22
22
  performFetchRequest
23
- } from "./chunk-MV6UZXZU.js";
23
+ } from "./chunk-YJZGAAVX.js";
24
24
  import {
25
25
  createSSEParser,
26
26
  findToolExecutor,
27
27
  toolDefinitionsByName
28
- } from "./chunk-6QP7LEI6.js";
28
+ } from "./chunk-2MSOY7A5.js";
29
29
  import {
30
30
  createToolRunId,
31
31
  getToolResultErrorData,
@@ -33,21 +33,23 @@ import {
33
33
  toolRunSetPending,
34
34
  toolRunStarted,
35
35
  toolRunSucceeded
36
- } from "./chunk-2TZP235J.js";
36
+ } from "./chunk-XPML3KYZ.js";
37
37
  import {
38
38
  getPublicImageAgentMode
39
- } from "./chunk-PACNSC37.js";
39
+ } from "./chunk-E3APEOIM.js";
40
+ import {
41
+ selectCurrentSpaceId
42
+ } from "./chunk-XGJ75KN2.js";
40
43
  import {
41
44
  addToolMessage,
42
45
  getModelInfo,
43
46
  messageStreamEnd,
44
47
  messageStreaming,
45
- selectCurrentSpaceId,
46
48
  updateToolMessage
47
- } from "./chunk-O6YCGBJB.js";
49
+ } from "./chunk-RJ7KLCWY.js";
48
50
  import {
49
51
  streamAgentChatTurn
50
- } from "./chunk-4ZMTXQFB.js";
52
+ } from "./chunk-5MVFYKBL.js";
51
53
  import {
52
54
  toErrorMessage
53
55
  } from "./chunk-HNMXYYJR.js";
@@ -58,23 +60,23 @@ import {
58
60
  } from "./chunk-3ASDTTEI.js";
59
61
  import {
60
62
  getApiEndpoint
61
- } from "./chunk-EIQDGAAE.js";
63
+ } from "./chunk-2K4NDPT5.js";
62
64
  import {
63
65
  selectCurrentServer
64
- } from "./chunk-446VANPP.js";
66
+ } from "./chunk-G5GVZAXF.js";
65
67
  import {
66
68
  write
67
- } from "./chunk-A4JDTA5T.js";
69
+ } from "./chunk-LAXMH7JY.js";
68
70
  import {
69
71
  extractCustomId
70
72
  } from "./chunk-TOW4E763.js";
71
73
  import {
72
74
  createAsyncThunk,
73
75
  selectIdentityToken
74
- } from "./chunk-ZFTCLBEX.js";
76
+ } from "./chunk-2IJAKBK2.js";
75
77
  import {
76
78
  isAbortError
77
- } from "./chunk-R5V5G73M.js";
79
+ } from "./chunk-5RDLGLAP.js";
78
80
  import {
79
81
  createDialogMessageKeyAndId,
80
82
  dialogMessageKey,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-3Z6SPX5X.js";
4
+ } from "./chunk-E2CFIWQR.js";
5
5
  import {
6
6
  runLocalAgentTurn
7
- } from "./chunk-IUA36RS4.js";
7
+ } from "./chunk-WMH2G6XJ.js";
8
8
  import {
9
9
  clipMultilineText
10
- } from "./chunk-2TZP235J.js";
10
+ } from "./chunk-XPML3KYZ.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
- } from "./chunk-4ZMTXQFB.js";
13
+ } from "./chunk-5MVFYKBL.js";
14
14
  import {
15
15
  toErrorMessage
16
16
  } from "./chunk-HNMXYYJR.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MEMORY_USE_GUIDANCE,
3
3
  wrapHistoricalSummaryWithReplayGuard
4
- } from "./chunk-4PWB7JRR.js";
4
+ } from "./chunk-XFG3BAKN.js";
5
5
 
6
6
  // packages/agent-runtime/turnContext.ts
7
7
  var DEFAULT_RECENT_CONTENT_LIMIT = 10;
@@ -4,7 +4,7 @@ import {
4
4
  refreshAntigravityOAuthToken,
5
5
  refreshOpenAiCodexToken,
6
6
  xaiRefresh
7
- } from "./chunk-WJD5RNVB.js";
7
+ } from "./chunk-SFWZUTCI.js";
8
8
  import {
9
9
  ackRunRecord,
10
10
  checkStaleRun,
@@ -15,8 +15,9 @@ import {
15
15
  gcRunRecords,
16
16
  queryRunRecords,
17
17
  releaseRunRecordAck,
18
- spawnLocalBackgroundRun
19
- } from "./chunk-4SAV7BD7.js";
18
+ spawnLocalBackgroundRun,
19
+ terminateRunProcess
20
+ } from "./chunk-7KNERA53.js";
20
21
  import {
21
22
  CliProviderQuotaError,
22
23
  executeCli
@@ -26,7 +27,7 @@ import {
26
27
  } from "./chunk-WJRJDX2W.js";
27
28
  import {
28
29
  buildLocalAgentLookupKeys
29
- } from "./chunk-72NVMKWA.js";
30
+ } from "./chunk-NEGMZP6Q.js";
30
31
  import {
31
32
  LOCAL_CODEX_AGENT_ID,
32
33
  LOCAL_CODEX_AGENT_KEY,
@@ -53,7 +54,7 @@ import {
53
54
  readOpenAiCompatibleSseCompletion,
54
55
  resolveAgentNextAvailableAt,
55
56
  resolveOpenAiCompatibleProviderConfig
56
- } from "./chunk-7QW64TCG.js";
57
+ } from "./chunk-EATVNXFX.js";
57
58
  import {
58
59
  buildPlatformChatCompletionRequest,
59
60
  canUsePlatformChatProvider,
@@ -63,7 +64,7 @@ import {
63
64
  readSseDataValues,
64
65
  resolvePlatformChatProviderConfig,
65
66
  shouldUsePlatformChatProvider
66
- } from "./chunk-XORE26Z4.js";
67
+ } from "./chunk-7S54ZGF6.js";
67
68
  import {
68
69
  buildCliPrompt
69
70
  } from "./chunk-ATNTHIZI.js";
@@ -73,25 +74,25 @@ import {
73
74
  import {
74
75
  inlineImageUrlsForCustomProvider,
75
76
  prepareTools
76
- } from "./chunk-3IPBZISR.js";
77
+ } from "./chunk-2YT3KLHX.js";
77
78
  import {
78
79
  inferCaptureIntent,
79
80
  resolveHistoricalToolContentCap,
80
81
  summarizeToolArguments
81
- } from "./chunk-IUA36RS4.js";
82
+ } from "./chunk-WMH2G6XJ.js";
82
83
  import {
83
84
  getAntigravityUserAgent,
84
85
  isAntigravityOAuthAgent,
85
86
  readAntigravityProjectId,
86
87
  resolveAntigravityCloudCodeBaseUrl
87
- } from "./chunk-2NYIVLAY.js";
88
+ } from "./chunk-YHGHADBQ.js";
88
89
  import {
89
90
  convertMessagesToResponsesInput,
90
91
  toResponsesTools
91
92
  } from "./chunk-D34RI6NI.js";
92
93
  import {
93
94
  resolvePlatformAuthToken
94
- } from "./chunk-WTPC3XD4.js";
95
+ } from "./chunk-UDA3ZYLW.js";
95
96
  import {
96
97
  buildDialogFallbackTitleFromUserInput,
97
98
  normalizeDialogTitle
@@ -103,7 +104,7 @@ import {
103
104
  readXhsProfileFunctionSchema,
104
105
  rememberMemoryFunctionSchema,
105
106
  setTodoListFunc
106
- } from "./chunk-6QP7LEI6.js";
107
+ } from "./chunk-2MSOY7A5.js";
107
108
  import {
108
109
  createDrainExhaustedResponse,
109
110
  isCoreDrainingBody,
@@ -127,24 +128,24 @@ import {
127
128
  parseNoloWorkspaceToolArguments,
128
129
  resolveAgentRequiredPackIds,
129
130
  resolveRuntimeToolSurfaceForAgent
130
- } from "./chunk-2TZP235J.js";
131
+ } from "./chunk-XPML3KYZ.js";
131
132
  import {
132
133
  applyTokenUsageToDayStats,
133
134
  prepareTokenUsageData,
134
135
  resolveBuiltinPlatformAgentConfig,
135
136
  runKeyed
136
- } from "./chunk-O6YCGBJB.js";
137
+ } from "./chunk-RJ7KLCWY.js";
137
138
  import {
138
139
  BUILTIN_TITLE_LLM_CONFIG,
139
140
  clipCompactText
140
- } from "./chunk-OB6FBSH3.js";
141
+ } from "./chunk-BGTUGS3T.js";
141
142
  import {
142
143
  createFileCredentialBroker,
143
144
  fetchServerSyncedCredential,
144
145
  resolveCurrentRunRuntimeToolPolicy,
145
146
  resolveLocalWorkspaceExecutorOptionsFromPolicy,
146
147
  resolveRequestedRuntimeToolNames
147
- } from "./chunk-4ZMTXQFB.js";
148
+ } from "./chunk-5MVFYKBL.js";
148
149
  import {
149
150
  createOAuthTokenStore,
150
151
  isTokenExpired,
@@ -162,7 +163,7 @@ import {
162
163
  } from "./chunk-DWLEOOGR.js";
163
164
  import {
164
165
  isAdaptiveThinkingModelId
165
- } from "./chunk-EIQDGAAE.js";
166
+ } from "./chunk-2K4NDPT5.js";
166
167
  import {
167
168
  isCompiledBinary,
168
169
  parseUserIdFromAuthToken
@@ -175,7 +176,7 @@ import {
175
176
  } from "./chunk-QSJ3HFEF.js";
176
177
  import {
177
178
  isSystemBuiltinTrustedAgentKey
178
- } from "./chunk-DWQNDGO7.js";
179
+ } from "./chunk-ZJH3LKEW.js";
179
180
  import {
180
181
  NOLO_CLUSTER_SERVERS
181
182
  } from "./chunk-LCBAMY2M.js";
@@ -2713,12 +2714,19 @@ function createCliControlAgentRunExecutor(deps = {}) {
2713
2714
  }
2714
2715
  }
2715
2716
  if (typeof record.pid === "number") {
2716
- try {
2717
- (deps.kill ?? ((pid, signal) => process.kill(pid, signal)))(
2718
- record.pid,
2719
- "SIGTERM"
2720
- );
2721
- } catch {
2717
+ const confirmed = await terminateRunProcess(record, "SIGTERM", deps);
2718
+ if (!confirmed) {
2719
+ return {
2720
+ content: JSON.stringify({
2721
+ runId: record.runId,
2722
+ found: true,
2723
+ status: record.status,
2724
+ stopConfirmed: false
2725
+ }),
2726
+ metadata: {
2727
+ displayData: `stop failed: process ${record.pid} still alive after SIGKILL`
2728
+ }
2729
+ };
2722
2730
  }
2723
2731
  }
2724
2732
  finalizeRunRecord(record.runId, { status: "killed" }, deps);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-CWMSB67P.js";
4
4
  import {
5
5
  getModelConfig
6
- } from "./chunk-EIQDGAAE.js";
6
+ } from "./chunk-2K4NDPT5.js";
7
7
  import {
8
8
  asOptionalFiniteNumber
9
9
  } from "./chunk-WWC7I6TA.js";
@@ -4,14 +4,14 @@ import {
4
4
  providerHttpFailure,
5
5
  readSseFrames,
6
6
  throwIfChatCompletionStreamFailed
7
- } from "./chunk-XORE26Z4.js";
7
+ } from "./chunk-7S54ZGF6.js";
8
8
  import {
9
9
  sanitizeForOutbound
10
10
  } from "./chunk-T27IEBNQ.js";
11
11
  import {
12
12
  parseToolArgumentsJson,
13
13
  resolveHistoricalToolContentCap
14
- } from "./chunk-IUA36RS4.js";
14
+ } from "./chunk-WMH2G6XJ.js";
15
15
  import {
16
16
  createThinkParserState,
17
17
  createToolCallAccumulator,
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  requiresBareImageUrl,
24
24
  toBareImageUrlMessages
25
- } from "./chunk-QDNVDGLN.js";
25
+ } from "./chunk-NMK2JHKM.js";
26
26
  import {
27
27
  shouldStripReasoningContentForOutbound,
28
28
  toOpenAiCompatibleMessages
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  buildProviderAuthHeaders,
32
32
  buildProviderExecutionPlan
33
- } from "./chunk-WTPC3XD4.js";
33
+ } from "./chunk-UDA3ZYLW.js";
34
34
  import {
35
35
  buildDialogFallbackTitleFromUserInput
36
36
  } from "./chunk-2MBTWINN.js";
@@ -39,7 +39,7 @@ import {
39
39
  buildNoloWorkspaceCommandArgs,
40
40
  noloStringArg,
41
41
  parseNoloWorkspaceToolArguments
42
- } from "./chunk-2TZP235J.js";
42
+ } from "./chunk-XPML3KYZ.js";
43
43
  import {
44
44
  toErrorMessage
45
45
  } from "./chunk-HNMXYYJR.js";
@@ -4086,7 +4086,7 @@ function buildLoadSkillExecutor(args) {
4086
4086
  metadata: { loadSkill: true, resolved: false }
4087
4087
  };
4088
4088
  }
4089
- const { resolveSkillByName } = await import("./skillDiscovery-I3QRA7NE.js");
4089
+ const { resolveSkillByName } = await import("./skillDiscovery-Y3HALY2U.js");
4090
4090
  const resolved = resolveSkillByName(args.cwd, name);
4091
4091
  if (!resolved) {
4092
4092
  const { resolveCodingBuiltinSlug, buildCodingSkillContentBySlug } = await import("./codingSkills-V35TRR4Y.js");
@@ -4124,7 +4124,7 @@ ${body}`,
4124
4124
  };
4125
4125
  }
4126
4126
  async function formatUnknownSkillMessage(cwd, requestedName) {
4127
- const { discoverSkills } = await import("./skillDiscovery-I3QRA7NE.js");
4127
+ const { discoverSkills } = await import("./skillDiscovery-Y3HALY2U.js");
4128
4128
  let available = [];
4129
4129
  try {
4130
4130
  available = discoverSkills(cwd).map((s) => s.name);
@@ -52,7 +52,7 @@ async function readDocFunc(args, thunkApi) {
52
52
  throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
53
53
  }
54
54
  try {
55
- const { readAction } = await import("./read-QK7ZRX6G.js");
55
+ const { readAction } = await import("./read-64OQDO3I.js");
56
56
  const pageData = await readAction({ dbKey: id }, thunkApi);
57
57
  if (!pageData) {
58
58
  throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateContentTitle
3
- } from "./chunk-O6YCGBJB.js";
3
+ } from "./chunk-XGJ75KN2.js";
4
4
  import {
5
5
  require_date_fns
6
6
  } from "./chunk-M76ECQRD.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  patch,
15
15
  readAndWait
16
- } from "./chunk-A4JDTA5T.js";
16
+ } from "./chunk-LAXMH7JY.js";
17
17
  import {
18
18
  asOptionalTrimmedString
19
19
  } from "./chunk-G3SUCT4W.js";
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
367
367
  }
368
368
  }
369
369
  async function createDocState(args, thunkApi) {
370
- const { createPageAction } = await import("./createPageAction-4NEEWW6S.js");
370
+ const { createPageAction } = await import("./createPageAction-KRTBWM2S.js");
371
371
  return createPageAction(args, thunkApi);
372
372
  }
373
373
  function subscribe(listener) {
@@ -7,13 +7,13 @@ import {
7
7
  toTimestampMs,
8
8
  upsert,
9
9
  write
10
- } from "./chunk-A4JDTA5T.js";
10
+ } from "./chunk-LAXMH7JY.js";
11
11
  import {
12
12
  asTrimmedLowercaseString
13
13
  } from "./chunk-QSJ3HFEF.js";
14
14
  import {
15
15
  BUILTIN_NOLO_AGENT_KEY
16
- } from "./chunk-DWQNDGO7.js";
16
+ } from "./chunk-ZJH3LKEW.js";
17
17
  import {
18
18
  asyncThunkCreator,
19
19
  buildCreateSlice,
@@ -21,12 +21,12 @@ import {
21
21
  createAsyncThunk,
22
22
  createSelector,
23
23
  selectIdentityUserId
24
- } from "./chunk-ZFTCLBEX.js";
24
+ } from "./chunk-2IJAKBK2.js";
25
25
  import {
26
26
  getAllServers,
27
27
  getIsDesktopApp,
28
28
  isProduction
29
- } from "./chunk-R5V5G73M.js";
29
+ } from "./chunk-5RDLGLAP.js";
30
30
  import {
31
31
  SERVERS
32
32
  } from "./chunk-LCBAMY2M.js";
@@ -19,12 +19,12 @@ import {
19
19
  parseAgentRunEvent,
20
20
  t,
21
21
  toolLabel
22
- } from "./chunk-3Z6SPX5X.js";
22
+ } from "./chunk-E2CFIWQR.js";
23
23
  import {
24
24
  createRunActivityTracker,
25
25
  finalizeRunRecord,
26
26
  spawnLocalBackgroundRun
27
- } from "./chunk-4SAV7BD7.js";
27
+ } from "./chunk-7KNERA53.js";
28
28
  import {
29
29
  CliProviderQuotaError
30
30
  } from "./chunk-JDSUTNYY.js";
@@ -38,14 +38,14 @@ import {
38
38
  normalizeAgentHandle,
39
39
  readDbRecord,
40
40
  resolveAgentRecordFromHybridStore
41
- } from "./chunk-MNUJETMH.js";
41
+ } from "./chunk-K76HYM3O.js";
42
42
  import {
43
43
  NOLO_PROJECT_MANAGER_AGENT_KEY,
44
44
  isLocalCliAgentKey
45
45
  } from "./chunk-K6QEHQZ3.js";
46
46
  import {
47
47
  buildSkillDiscoveryContextLayer
48
- } from "./chunk-KWCLUYGQ.js";
48
+ } from "./chunk-QL6ELRVS.js";
49
49
  import {
50
50
  applyModelLayerOverride,
51
51
  buildModelLayerOverride
@@ -58,7 +58,7 @@ import {
58
58
  LOCAL_TURN_ABORTED_CODE,
59
59
  readActionGate,
60
60
  readCommandActionGatePayload
61
- } from "./chunk-IUA36RS4.js";
61
+ } from "./chunk-WMH2G6XJ.js";
62
62
  import {
63
63
  createThinkParserState,
64
64
  flushThinkParser,
@@ -70,13 +70,13 @@ import {
70
70
  buildMemoryUseGuidanceLayer,
71
71
  partitionScopedBlocks,
72
72
  renderTurnContextBlocksWithScope
73
- } from "./chunk-PJY5AH5A.js";
73
+ } from "./chunk-DPR66GY6.js";
74
74
  import {
75
75
  resolvePlatformAuthToken
76
- } from "./chunk-WTPC3XD4.js";
76
+ } from "./chunk-UDA3ZYLW.js";
77
77
  import {
78
78
  formatAgentListCard
79
- } from "./chunk-6QP7LEI6.js";
79
+ } from "./chunk-2MSOY7A5.js";
80
80
  import {
81
81
  isGatewayHttpStatus
82
82
  } from "./chunk-Z5MXSEOJ.js";
@@ -95,17 +95,17 @@ import {
95
95
  chooseMemoryOwners,
96
96
  loadMemoryCandidatesFromDb,
97
97
  resolveAgentMemoryPolicy
98
- } from "./chunk-JRI2BRJY.js";
98
+ } from "./chunk-OT2AXEQD.js";
99
99
  import {
100
100
  API_REPORTED_COST_MULTIPLIER,
101
101
  DEFAULT_CONTEXT_WINDOW,
102
102
  getModelContextWindow,
103
103
  normalizeUsage,
104
104
  parseUiAskChoiceContent
105
- } from "./chunk-O6YCGBJB.js";
105
+ } from "./chunk-RJ7KLCWY.js";
106
106
  import {
107
107
  clipCompactText
108
- } from "./chunk-OB6FBSH3.js";
108
+ } from "./chunk-BGTUGS3T.js";
109
109
  import {
110
110
  toErrorMessage
111
111
  } from "./chunk-HNMXYYJR.js";
@@ -114,7 +114,7 @@ import {
114
114
  } from "./chunk-DWLEOOGR.js";
115
115
  import {
116
116
  findModelConfig
117
- } from "./chunk-EIQDGAAE.js";
117
+ } from "./chunk-2K4NDPT5.js";
118
118
  import {
119
119
  readPipeText,
120
120
  spawnProcess
@@ -124,14 +124,14 @@ import {
124
124
  } from "./chunk-A7GB5UGH.js";
125
125
  import {
126
126
  parsePositiveFiniteNumberOrFallback
127
- } from "./chunk-446VANPP.js";
127
+ } from "./chunk-G5GVZAXF.js";
128
128
  import {
129
129
  asTrimmedLowercaseString
130
130
  } from "./chunk-QSJ3HFEF.js";
131
131
  import {
132
132
  BUILTIN_NOLO_AGENT_KEY,
133
133
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
134
- } from "./chunk-DWQNDGO7.js";
134
+ } from "./chunk-ZJH3LKEW.js";
135
135
  import {
136
136
  isLoopbackUrl
137
137
  } from "./chunk-4SN6J65J.js";
@@ -3538,7 +3538,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
3538
3538
  // packages/cli/client/agentRun.ts
3539
3539
  import { ulid } from "ulid";
3540
3540
  async function loadRunLocalAgentTurn() {
3541
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-3X3ZTFT2.js");
3541
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-G7GK545E.js");
3542
3542
  return runLocalAgentTurn;
3543
3543
  }
3544
3544
  async function resolveCurrentMachineId(options) {
@@ -4464,6 +4464,28 @@ var KIND_TITLES = {
4464
4464
  semantic: "Semantic",
4465
4465
  procedural: "Procedural"
4466
4466
  };
4467
+ var estimateTokens = (text) => {
4468
+ let cjk = 0;
4469
+ let ascii = 0;
4470
+ for (const ch of text) {
4471
+ const code = ch.codePointAt(0) ?? 0;
4472
+ if (code >= 13312 && code <= 40959) cjk += 1;
4473
+ else ascii += 1;
4474
+ }
4475
+ return Math.ceil(cjk * 1.5 + ascii / 4);
4476
+ };
4477
+ var OVERLAY_HEADER_LINES = [
4478
+ "--- Memory Overlay ---",
4479
+ "\u4EE5\u4E0B\u662F\u5F53\u524D\u8BF7\u6C42\u53EF\u7528\u7684\u8BB0\u5FC6\u4E8B\u5B9E\uFF1B\u76F8\u5173\u65F6\u76F4\u63A5\u57FA\u4E8E\u8FD9\u4E9B\u8BB0\u5FC6\u56DE\u7B54\u3002",
4480
+ "\u7528\u6237\u5F53\u524D\u8F93\u5165\u4F18\u5148\u4E8E\u8BB0\u5FC6\uFF1B\u8BB0\u5FC6\u53EA\u8F85\u52A9\u7406\u89E3\uFF0C\u4E0D\u8981\u6C42\u8FCE\u5408\u3002",
4481
+ ""
4482
+ ];
4483
+ var OVERLAY_HEADER_TOKENS = estimateTokens(OVERLAY_HEADER_LINES.join("\n"));
4484
+ var KIND_PRIORITY = {
4485
+ semantic: 0,
4486
+ procedural: 1,
4487
+ episodic: 2
4488
+ };
4467
4489
  var normalizeDisplayContent = (item) => {
4468
4490
  const normalized = item.content.trim().replace(/^(你要记住|请记住|以后记住|记住)[,,。.\s::]*/u, "").replace(/[。!?!?]+$/u, "").trim();
4469
4491
  const stripPrefix = (prefix) => normalized.startsWith(prefix) ? normalized.slice(prefix.length).trim() : normalized;
@@ -4503,8 +4525,10 @@ var normalizeDisplayContent = (item) => {
4503
4525
  }
4504
4526
  return normalized;
4505
4527
  };
4506
- var buildMemoryOverlay = (items) => {
4528
+ var buildMemoryOverlay = (items, options) => {
4507
4529
  if (items.length === 0) return null;
4530
+ const maxTokens = options?.maxTokens ?? 800;
4531
+ const perKindLimit = options?.perKindLimit ?? 3;
4508
4532
  const byKind = {
4509
4533
  episodic: [],
4510
4534
  semantic: [],
@@ -4513,17 +4537,43 @@ var buildMemoryOverlay = (items) => {
4513
4537
  for (const item of items) {
4514
4538
  byKind[item.kind].push(item);
4515
4539
  }
4516
- const sections = Object.entries(byKind).filter(([, list]) => list.length > 0).map(([kind, list]) => {
4517
- const lines = list.slice(0, 3).map((item) => `- ${normalizeDisplayContent(item)}`);
4518
- return [`[${KIND_TITLES[kind]}]`, ...lines].join("\n");
4540
+ const cappedByKind = Object.entries(byKind).filter(([, list]) => list.length > 0).map(([kind, list]) => [kind, list.slice(0, perKindLimit)]);
4541
+ const remainingBudget = maxTokens - OVERLAY_HEADER_TOKENS;
4542
+ if (remainingBudget <= 0) {
4543
+ return OVERLAY_HEADER_LINES.join("\n");
4544
+ }
4545
+ const allLines = [];
4546
+ for (const [kind, list] of cappedByKind) {
4547
+ for (const item of list) {
4548
+ const lineText = `- ${normalizeDisplayContent(item)}`;
4549
+ allLines.push({
4550
+ kind,
4551
+ lineText,
4552
+ lineTokens: estimateTokens(lineText)
4553
+ });
4554
+ }
4555
+ }
4556
+ allLines.sort((a, b) => {
4557
+ const pa = KIND_PRIORITY[a.kind] ?? 99;
4558
+ const pb = KIND_PRIORITY[b.kind] ?? 99;
4559
+ return pa - pb;
4519
4560
  });
4520
- return [
4521
- "--- Memory Overlay ---",
4522
- "\u4EE5\u4E0B\u662F\u5F53\u524D\u8BF7\u6C42\u53EF\u7528\u7684\u8BB0\u5FC6\u4E8B\u5B9E\uFF1B\u76F8\u5173\u65F6\u76F4\u63A5\u57FA\u4E8E\u8FD9\u4E9B\u8BB0\u5FC6\u56DE\u7B54\u3002",
4523
- "\u7528\u6237\u5F53\u524D\u8F93\u5165\u4F18\u5148\u4E8E\u8BB0\u5FC6\uFF1B\u8BB0\u5FC6\u53EA\u8F85\u52A9\u7406\u89E3\uFF0C\u4E0D\u8981\u6C42\u8FCE\u5408\u3002",
4524
- "",
4525
- ...sections
4526
- ].join("\n");
4561
+ let usedTokens = 0;
4562
+ const keptByKind = {};
4563
+ for (const candidate of allLines) {
4564
+ if (usedTokens + candidate.lineTokens > remainingBudget) continue;
4565
+ usedTokens += candidate.lineTokens;
4566
+ if (!keptByKind[candidate.kind]) keptByKind[candidate.kind] = [];
4567
+ keptByKind[candidate.kind].push(candidate.lineText);
4568
+ }
4569
+ const kindOrder = ["semantic", "procedural", "episodic"];
4570
+ const sections = kindOrder.filter((kind) => keptByKind[kind] && keptByKind[kind].length > 0).map((kind) => {
4571
+ return [`[${KIND_TITLES[kind]}]`, ...keptByKind[kind]].join("\n");
4572
+ });
4573
+ if (sections.length === 0) {
4574
+ return OVERLAY_HEADER_LINES.join("\n");
4575
+ }
4576
+ return [...OVERLAY_HEADER_LINES, ...sections].join("\n");
4527
4577
  };
4528
4578
 
4529
4579
  // packages/ai/memory/rank.ts
@@ -4632,6 +4682,7 @@ var rankMemoryCandidates = (items, query, context) => {
4632
4682
 
4633
4683
  // packages/ai/memory/runtime.ts
4634
4684
  var COLD_STORAGE_CONFIDENCE = 0.3;
4685
+ var MEMORY_OVERLAY_TOKEN_BUDGET = 800;
4635
4686
  var normalizeSelectedContent = (text) => text.trim().replace(/^(你要记住|请记住|以后记住|记住)[,,。.\s::]*/u, "").replace(/[。!?!?]+$/u, "").trim();
4636
4687
  var STACK_TERMS = [
4637
4688
  "typescript",
@@ -4776,7 +4827,7 @@ var resolveMemoryRuntime = async (input) => {
4776
4827
  await touchMemoryItemsInDb(input.db, ranked);
4777
4828
  return {
4778
4829
  selectedItems: ranked,
4779
- promptBlock: buildMemoryOverlay(ranked)
4830
+ promptBlock: buildMemoryOverlay(ranked, { maxTokens: MEMORY_OVERLAY_TOKEN_BUDGET })
4780
4831
  };
4781
4832
  };
4782
4833
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
3
  shouldReadAgentKeyRemotely
4
- } from "./chunk-72NVMKWA.js";
4
+ } from "./chunk-NEGMZP6Q.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
7
7
  } from "./chunk-K6QEHQZ3.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  selectCurrentServer,
3
3
  selectRemoteServers
4
- } from "./chunk-446VANPP.js";
4
+ } from "./chunk-G5GVZAXF.js";
5
5
  import {
6
6
  noloDeleteRequest,
7
7
  noloWriteRequest,
8
8
  selectIdentityUser,
9
9
  selectIdentityUserId
10
- } from "./chunk-ZFTCLBEX.js";
10
+ } from "./chunk-2IJAKBK2.js";
11
11
  import {
12
12
  normalizeTimeFields
13
- } from "./chunk-R5V5G73M.js";
13
+ } from "./chunk-5RDLGLAP.js";
14
14
  import {
15
15
  createUserKey,
16
16
  extractAgentInfo,