nolo-cli 0.30.0 → 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-VBHHG7LT.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-LLGZXUYJ.js → agentDeleteCommand-7BBZCONG.js} +26 -25
  6. package/{agentEmailCommands-LC2FPN6G.js → agentEmailCommands-D6FAT5HM.js} +38 -37
  7. package/{agentListCommands-A6OBQ3QX.js → agentListCommands-YPNNMGSJ.js} +28 -27
  8. package/{agentMachineCommands-4O4Q5B5X.js → agentMachineCommands-VYRVSKUC.js} +26 -25
  9. package/{agentRecordCommands-W22RIQRV.js → agentRecordCommands-4J52H5NK.js} +37 -36
  10. package/{agentRunCommand-V4OBU4FB.js → agentRunCommand-LH4RA6FA.js} +38 -37
  11. package/{agentRunControl-AKBN2366.js → agentRunControl-SCIVRZWX.js} +9 -1
  12. package/{agentRuntimeLocal-I57YSGH4.js → agentRuntimeLocal-G7GK545E.js} +23 -22
  13. package/{agentSlice-3ZHY7RAO.js → agentSlice-4ZLEPC3M.js} +6 -6
  14. package/{appDeleteCommands-DJJF466K.js → appDeleteCommands-AOZED7QJ.js} +27 -26
  15. package/{appDeployCommands-WJZGIOEZ.js → appDeployCommands-XJY27BDS.js} +27 -26
  16. package/{appDeployStatusCommands-ICYXUJNO.js → appDeployStatusCommands-HKZYAPB2.js} +27 -26
  17. package/{appGetCommands-UOCWYJPV.js → appGetCommands-VXJLPRYI.js} +27 -26
  18. package/{appListCommands-EOKWTXPW.js → appListCommands-3LU6AB4G.js} +27 -26
  19. package/{authCommand-H5KE7K7K.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-SWOTB2TX.js → chunk-2MSOY7A5.js} +49 -33
  23. package/{chunk-W2YKDXT7.js → chunk-2YT3KLHX.js} +1 -1
  24. package/{chunk-HLG6GAUD.js → chunk-3IU7WEJD.js} +1 -1
  25. package/{chunk-Q24P6TUS.js → chunk-43EPBPZ2.js} +1 -1
  26. package/{chunk-3RIWR23B.js → chunk-4URO6HMS.js} +1 -1
  27. package/{chunk-UTQZ73QQ.js → chunk-5EDVWWE3.js} +1 -1
  28. package/{chunk-GVKTKT3O.js → chunk-5JQRISUS.js} +3 -3
  29. package/{chunk-GAGUBI42.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-MEUZFIAJ.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-DI6MXJK5.js → chunk-C3NYMZTQ.js} +16 -14
  36. package/{chunk-HI7QZNWX.js → chunk-CPUZW54L.js} +4 -4
  37. package/{chunk-PJY5AH5A.js → chunk-DPR66GY6.js} +1 -1
  38. package/{chunk-MMCVBEAD.js → chunk-E2CFIWQR.js} +42 -32
  39. package/{chunk-YWGSCF37.js → chunk-E3APEOIM.js} +1 -1
  40. package/{chunk-UKC5HU2C.js → chunk-EATVNXFX.js} +7 -7
  41. package/{chunk-G5JHHUAK.js → chunk-F3MP7CP6.js} +1 -1
  42. package/{chunk-FS5TTXPS.js → chunk-FLYQAMF4.js} +3 -3
  43. package/{chunk-446VANPP.js → chunk-G5GVZAXF.js} +4 -4
  44. package/{chunk-KWKD3BCC.js → chunk-H6COXALE.js} +78 -27
  45. package/{chunk-56IUA7RU.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-L3VQOVKK.js → chunk-LBEWOWVL.js} +4 -4
  49. package/{chunk-66O5MZYH.js → chunk-NEGMZP6Q.js} +1 -1
  50. package/{chunk-7CD24PU4.js → chunk-NMK2JHKM.js} +9 -7
  51. package/{chunk-QLV2GKU5.js → chunk-OT2AXEQD.js} +26 -5
  52. package/{chunk-CV6I4HBA.js → chunk-PTHDLIRB.js} +1 -1
  53. package/{chunk-2XM5KUNE.js → chunk-Q6L3O67D.js} +2 -2
  54. package/{chunk-G6VITLCZ.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-T3Y5EMJS.js → chunk-SFWZUTCI.js} +1 -1
  58. package/{chunk-XD5NQEOH.js → chunk-UDA3ZYLW.js} +1 -1
  59. package/{chunk-YLADSPDU.js → chunk-V54H24CQ.js} +2 -2
  60. package/{chunk-SZ5CBYMZ.js → chunk-WEID4JLC.js} +2 -2
  61. package/{chunk-KW47OSRJ.js → chunk-WMH2G6XJ.js} +91 -179
  62. package/{chunk-4PWB7JRR.js → chunk-XFG3BAKN.js} +1 -0
  63. package/chunk-XGJ75KN2.js +7889 -0
  64. package/{chunk-OYK7PA5U.js → chunk-XPML3KYZ.js} +6 -6
  65. package/{chunk-TJYWZ3LO.js → chunk-YHGHADBQ.js} +2 -2
  66. package/{chunk-DCWBP2O7.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-3GMH6ORX.js → createAgentAutomationAction-AECD5YCU.js} +13 -12
  70. package/{createDialogAction-R5MCL4RE.js → createDialogAction-MZUC37CA.js} +14 -13
  71. package/{createPageAction-QYTG656R.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-NUQGIXVZ.js → dialogCommands-RFADXVV6.js} +27 -26
  76. package/{dialogSlice-CFDECXEU.js → dialogSlice-EWNZ2HFD.js} +12 -12
  77. package/{docCreateCommands-UNFCXB5N.js → docCreateCommands-ZHX6SX5M.js} +26 -25
  78. package/{docDeleteCommands-NG5IVKE5.js → docDeleteCommands-3EEM7ITO.js} +27 -26
  79. package/{docReadCommands-6J7MUUX6.js → docReadCommands-JOMLMZTC.js} +26 -25
  80. package/{docStore-MZZWJM4F.js → docStore-YKTKKH3N.js} +14 -13
  81. package/{docUpdateCommands-6AW3VZOX.js → docUpdateCommands-PGAYLKLC.js} +26 -25
  82. package/{getPricing-XQYSSVV6.js → getPricing-QO5TYNCK.js} +2 -2
  83. package/{handleSendMessageAction-IU2QNTLM.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-Z2QEWTHZ.js → machineCommands-A2WFB37F.js} +36 -35
  87. package/{machineWsRunDispatch-SJTYHZHN.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-EY3BPXIU.js → readlineWorkspace-S4A6UYVJ.js} +125 -79
  92. package/{removeDialogAgentAction-TBW3UZJW.js → removeDialogAgentAction-NEKVAMSH.js} +7 -7
  93. package/{runAgentClientLoop-N3YDLTMS.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-R6AEQNLG.js → spaceCommands-SKCMLOC6.js} +210 -28
  99. package/{spaceSlice-MCH7RLLP.js → spaceSlice-6VOPELQN.js} +13 -12
  100. package/{streamAgentChatTurn-Q4U2CVMI.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-Y3UBLLYW.js → tools-IN4B36PN.js} +21 -20
  104. package/{tuiSummaryLlmCaller-4474IBTI.js → tuiSummaryLlmCaller-SRZ4QQUP.js} +19 -5
  105. package/{updateDialogTitleAction-3J7GH67I.js → updateDialogTitleAction-4ABIVEYY.js} +18 -16
  106. package/chunk-OB6FBSH3.js +0 -47
  107. package/chunk-THTAR67C.js +0 -16338
  108. package/chunk-VSTUQGLT.js +0 -4937
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readAction
3
- } from "./chunk-DWQNDGO7.js";
3
+ } from "./chunk-ZJH3LKEW.js";
4
4
  import "./chunk-TOW4E763.js";
5
- import "./chunk-ZFTCLBEX.js";
6
- import "./chunk-R5V5G73M.js";
5
+ import "./chunk-2IJAKBK2.js";
6
+ import "./chunk-5RDLGLAP.js";
7
7
  import "./chunk-LCBAMY2M.js";
8
8
  import "./chunk-4SN6J65J.js";
9
9
  import "./chunk-CF7PE763.js";
@@ -4,7 +4,7 @@ import {
4
4
  readDocFunctionSchema,
5
5
  readPageFunc,
6
6
  readPageFunctionSchema
7
- } from "./chunk-G5JHHUAK.js";
7
+ } from "./chunk-F3MP7CP6.js";
8
8
  import "./chunk-SWYMCHM7.js";
9
9
  import "./chunk-HNMXYYJR.js";
10
10
  import "./chunk-4VNS5WPM.js";
@@ -3,7 +3,7 @@ import {
3
3
  normalizeDialogRecord,
4
4
  readDialogSnapshot,
5
5
  sortDialogs
6
- } from "./chunk-L3VQOVKK.js";
6
+ } from "./chunk-LBEWOWVL.js";
7
7
  import {
8
8
  ANSI_ESCAPE_REGEX,
9
9
  COLLAPSED_PASTE_PLACEHOLDER_RE,
@@ -57,7 +57,7 @@ import {
57
57
  visibleWidth,
58
58
  wrapTextToLines,
59
59
  wrapTranscriptLine
60
- } from "./chunk-KWKD3BCC.js";
60
+ } from "./chunk-H6COXALE.js";
61
61
  import "./chunk-AOS5IN2I.js";
62
62
  import "./chunk-6HYVJV7B.js";
63
63
  import {
@@ -66,12 +66,12 @@ import {
66
66
  listRemoteAgents,
67
67
  listRemoteAgentsAcrossServers,
68
68
  normalizeListedAgent
69
- } from "./chunk-GVKTKT3O.js";
69
+ } from "./chunk-5JQRISUS.js";
70
70
  import "./chunk-ID4G2MAR.js";
71
71
  import {
72
72
  listUserRecordsFromServers,
73
73
  readLiveDbRecordAfterTombstoneMerge
74
- } from "./chunk-HLG6GAUD.js";
74
+ } from "./chunk-3IU7WEJD.js";
75
75
  import {
76
76
  createCliLocalRuntimeAdapter,
77
77
  initCliLocale,
@@ -79,13 +79,13 @@ import {
79
79
  readTimestamp,
80
80
  setCliLocale,
81
81
  t
82
- } from "./chunk-MMCVBEAD.js";
83
- import "./chunk-T3Y5EMJS.js";
82
+ } from "./chunk-E2CFIWQR.js";
83
+ import "./chunk-SFWZUTCI.js";
84
84
  import {
85
85
  checkStaleRun,
86
86
  isRunRecordClaimed,
87
87
  readRunRecord
88
- } from "./chunk-4SAV7BD7.js";
88
+ } from "./chunk-7KNERA53.js";
89
89
  import "./chunk-JDSUTNYY.js";
90
90
  import "./chunk-WJRJDX2W.js";
91
91
  import "./chunk-LM6IYQ3F.js";
@@ -97,8 +97,8 @@ import {
97
97
  deleteDbRecord,
98
98
  queryUserRecords,
99
99
  readDbRecord
100
- } from "./chunk-56IUA7RU.js";
101
- import "./chunk-66O5MZYH.js";
100
+ } from "./chunk-K76HYM3O.js";
101
+ import "./chunk-NEGMZP6Q.js";
102
102
  import {
103
103
  NOLO_DEFAULT_AGENT_KEY,
104
104
  resolveCliAgentKeyInput
@@ -106,14 +106,14 @@ import {
106
106
  import {
107
107
  buildSkillDiscoveryContextBlock,
108
108
  buildSkillDiscoveryContextLayer
109
- } from "./chunk-KWCLUYGQ.js";
109
+ } from "./chunk-QL6ELRVS.js";
110
110
  import {
111
111
  buildLocalWorkspaceOpenAiTools,
112
112
  buildLocalWorkspaceToolset,
113
113
  getProcessRegistry
114
- } from "./chunk-UKC5HU2C.js";
114
+ } from "./chunk-EATVNXFX.js";
115
115
  import "./chunk-ZNFJWEN4.js";
116
- import "./chunk-MEUZFIAJ.js";
116
+ import "./chunk-7S54ZGF6.js";
117
117
  import "./chunk-LTRXGFMS.js";
118
118
  import "./chunk-ATNTHIZI.js";
119
119
  import "./chunk-OIQPORYI.js";
@@ -121,30 +121,30 @@ import "./chunk-T27IEBNQ.js";
121
121
  import "./chunk-JEXVIMYZ.js";
122
122
  import {
123
123
  prepareTools
124
- } from "./chunk-W2YKDXT7.js";
124
+ } from "./chunk-2YT3KLHX.js";
125
125
  import {
126
126
  readCommandActionGatePayload
127
- } from "./chunk-KW47OSRJ.js";
127
+ } from "./chunk-WMH2G6XJ.js";
128
128
  import "./chunk-N7J63Q6C.js";
129
129
  import {
130
130
  buildAgentsMdLayer,
131
131
  partitionScopedBlocks,
132
132
  renderTurnContextBlocksWithScope
133
- } from "./chunk-PJY5AH5A.js";
134
- import "./chunk-TJYWZ3LO.js";
133
+ } from "./chunk-DPR66GY6.js";
134
+ import "./chunk-YHGHADBQ.js";
135
135
  import {
136
136
  buildCurrentTimeBlock,
137
137
  buildIdentityBlock,
138
138
  buildRuntimeGuidanceBlocks,
139
139
  resolveToolGuidedSections
140
- } from "./chunk-7CD24PU4.js";
140
+ } from "./chunk-NMK2JHKM.js";
141
141
  import "./chunk-D34RI6NI.js";
142
142
  import {
143
143
  resolvePlatformAuthToken
144
- } from "./chunk-XD5NQEOH.js";
145
- import "./chunk-4PWB7JRR.js";
144
+ } from "./chunk-UDA3ZYLW.js";
145
+ import "./chunk-XFG3BAKN.js";
146
146
  import "./chunk-2MBTWINN.js";
147
- import "./chunk-SWOTB2TX.js";
147
+ import "./chunk-2MSOY7A5.js";
148
148
  import "./chunk-Z5MXSEOJ.js";
149
149
  import {
150
150
  clipText,
@@ -157,32 +157,37 @@ import {
157
157
  runShowsLogTail,
158
158
  shortRunId
159
159
  } from "./chunk-KXKQO4Q6.js";
160
- import "./chunk-UTQZ73QQ.js";
160
+ import "./chunk-5EDVWWE3.js";
161
161
  import "./chunk-KQHGZWSV.js";
162
- import "./chunk-OYK7PA5U.js";
163
- import "./chunk-FS5TTXPS.js";
164
- import "./chunk-Q24P6TUS.js";
165
- import "./chunk-G5JHHUAK.js";
162
+ import "./chunk-XPML3KYZ.js";
163
+ import "./chunk-FLYQAMF4.js";
164
+ import "./chunk-43EPBPZ2.js";
165
+ import "./chunk-F3MP7CP6.js";
166
166
  import "./chunk-SWYMCHM7.js";
167
167
  import "./chunk-44HACRCK.js";
168
- import "./chunk-QLV2GKU5.js";
168
+ import "./chunk-OT2AXEQD.js";
169
169
  import "./chunk-DCDL3GC4.js";
170
- import "./chunk-YWGSCF37.js";
170
+ import "./chunk-E3APEOIM.js";
171
171
  import "./chunk-3LY4F7SV.js";
172
+ import "./chunk-XGJ75KN2.js";
172
173
  import {
173
174
  DEFAULT_CONTEXT_WINDOW,
174
- estimateTokenCount,
175
175
  extractReferenceKeysFromMessage,
176
- getModelContextWindow,
176
+ getModelContextWindow
177
+ } from "./chunk-RJ7KLCWY.js";
178
+ import {
179
+ buildCompactionMetricsFromPlan,
180
+ buildCompactionUserContent,
181
+ clipCompactText,
182
+ estimateTokenCount,
183
+ formatCompactionMetricsLog,
184
+ formatFileOperationsFromMessages,
185
+ formatMessagesForSummaryWithTruncation,
177
186
  planCompression,
178
187
  serializeMessageContent
179
- } from "./chunk-THTAR67C.js";
180
- import {
181
- buildBuiltinSummaryContent,
182
- clipCompactText
183
- } from "./chunk-OB6FBSH3.js";
184
- import "./chunk-IZ3CBMD5.js";
185
- import "./chunk-GAGUBI42.js";
188
+ } from "./chunk-BGTUGS3T.js";
189
+ import "./chunk-ATK5WJOA.js";
190
+ import "./chunk-5MVFYKBL.js";
186
191
  import "./chunk-JZPBVBIY.js";
187
192
  import "./chunk-5RGU3J7P.js";
188
193
  import "./chunk-M76ECQRD.js";
@@ -193,10 +198,10 @@ import {
193
198
  compactWhitespace
194
199
  } from "./chunk-DWLEOOGR.js";
195
200
  import "./chunk-3ASDTTEI.js";
196
- import "./chunk-YLADSPDU.js";
201
+ import "./chunk-V54H24CQ.js";
197
202
  import "./chunk-WTGCTVJG.js";
198
203
  import "./chunk-CWMSB67P.js";
199
- import "./chunk-VSTUQGLT.js";
204
+ import "./chunk-2K4NDPT5.js";
200
205
  import "./chunk-ZHXJ6M7T.js";
201
206
  import "./chunk-CAENRKNJ.js";
202
207
  import "./chunk-63W5N6P3.js";
@@ -222,20 +227,20 @@ import {
222
227
  import {
223
228
  DEFAULT_NOLO_SERVER_URL
224
229
  } from "./chunk-OLZBQWZU.js";
225
- import "./chunk-DKRT67FG.js";
226
- import "./chunk-446VANPP.js";
230
+ import "./chunk-KGEVMUMI.js";
231
+ import "./chunk-G5GVZAXF.js";
227
232
  import "./chunk-KX6YBIHG.js";
228
- import "./chunk-A4JDTA5T.js";
229
- import "./chunk-BOL2D2JW.js";
233
+ import "./chunk-LAXMH7JY.js";
234
+ import "./chunk-ZJ2WITOO.js";
230
235
  import {
231
236
  asTrimmedLowercaseString
232
237
  } from "./chunk-QSJ3HFEF.js";
233
- import "./chunk-DWQNDGO7.js";
238
+ import "./chunk-ZJH3LKEW.js";
234
239
  import {
235
240
  extractCustomId
236
241
  } from "./chunk-TOW4E763.js";
237
- import "./chunk-ZFTCLBEX.js";
238
- import "./chunk-R5V5G73M.js";
242
+ import "./chunk-2IJAKBK2.js";
243
+ import "./chunk-5RDLGLAP.js";
239
244
  import "./chunk-LCBAMY2M.js";
240
245
  import "./chunk-4SN6J65J.js";
241
246
  import "./chunk-CF7PE763.js";
@@ -486,12 +491,6 @@ async function addDialogToSpaceIfNeeded(fetchImpl, serverUrl, authToken, record)
486
491
  console.warn(`[nolo] compact: addDialogToSpace error: ${error}`);
487
492
  }
488
493
  }
489
- function formatMessagesForSummary(msgs) {
490
- return msgs.map((m) => {
491
- const content = serializeMessageContent(m.content) || "[\u975E\u6587\u672C\u5185\u5BB9]";
492
- return `${m.role}: ${content}`;
493
- }).join("\n");
494
- }
495
494
  async function resolveContextWindow(fetchImpl, serverUrl, authToken, agentKey) {
496
495
  if (!agentKey) return DEFAULT_CONTEXT_WINDOW;
497
496
  try {
@@ -549,11 +548,17 @@ async function compactDialog(options) {
549
548
  });
550
549
  if (plan.shouldCompress && plan.msgsToCompress.length > 0) {
551
550
  const previousSummary = current.summary || "";
552
- const messagesText = formatMessagesForSummary(plan.msgsToCompress);
553
- const promptContent = buildBuiltinSummaryContent(
554
- previousSummary,
555
- messagesText
551
+ const messagesText = formatMessagesForSummaryWithTruncation(plan.msgsToCompress);
552
+ const fileOpsText = formatFileOperationsFromMessages(
553
+ plan.msgsToCompress,
554
+ (name) => name
555
+ // CLI 端无 tool alias 系统,直接用原始名
556
556
  );
557
+ const promptContent = buildCompactionUserContent({
558
+ previousSummary,
559
+ messagesText,
560
+ fileOpsText
561
+ });
557
562
  try {
558
563
  const newSummary = await options.summaryLlmCaller(promptContent);
559
564
  if (newSummary && newSummary.trim()) {
@@ -579,9 +584,13 @@ async function compactDialog(options) {
579
584
  current.referenceKeys = Array.from(extractedKeys);
580
585
  summaryGenerated = true;
581
586
  compactedMessageCount = plan.compressCount;
582
- console.log(
583
- `[nolo] compact: compressed ${plan.compressCount} messages into summary (len: ${newSummary.trim().length})`
584
- );
587
+ const metrics = buildCompactionMetricsFromPlan({
588
+ reason: "manual",
589
+ previousSummary: current.summary || "",
590
+ plan,
591
+ newSummary: newSummary.trim()
592
+ });
593
+ console.log(formatCompactionMetricsLog(metrics));
585
594
  }
586
595
  } catch (error) {
587
596
  console.warn(`[nolo] compact: summary generation failed: ${error}`);
@@ -3637,7 +3646,6 @@ var SLASH_COMMANDS = [
3637
3646
  "/ctx",
3638
3647
  "/runtime",
3639
3648
  "/tools",
3640
- "/thinking",
3641
3649
  "/switch",
3642
3650
  "/agent",
3643
3651
  "/agents",
@@ -4726,6 +4734,18 @@ function finalizeCurrentTurn(history) {
4726
4734
  }
4727
4735
  }
4728
4736
  }
4737
+ function appendLocalTurn(history, command, output) {
4738
+ finalizeCurrentTurn(history);
4739
+ history.turns.push({
4740
+ role: "local",
4741
+ command,
4742
+ content: output
4743
+ });
4744
+ if (history.turns.length > MAX_TUI_HISTORY_TURNS) {
4745
+ history.turns = history.turns.slice(history.turns.length - MAX_TUI_HISTORY_TURNS);
4746
+ }
4747
+ resetStreamingTurnCache();
4748
+ }
4729
4749
  function applyOutputChunkToCurrentTurn(history, chunk) {
4730
4750
  const next = applyTerminalOutputToText(history.currentContent, chunk);
4731
4751
  if (next === history.currentContent) return false;
@@ -4753,7 +4773,7 @@ function fillUserBubbleRow(row, surfaceSeq, contentWidth) {
4753
4773
  }
4754
4774
  return renderSurfaceLine({ text: row, surface: surfaceSeq, padTo: contentWidth });
4755
4775
  }
4756
- function renderTurnBlock(role, content, contentWidth, colorEnabled) {
4776
+ function renderTurnBlock(role, content, contentWidth, colorEnabled, command) {
4757
4777
  content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
4758
4778
  const lines = [];
4759
4779
  if (role === "user") {
@@ -4772,6 +4792,21 @@ function renderTurnBlock(role, content, contentWidth, colorEnabled) {
4772
4792
  ...surfaceSeq ? rows.map((row) => fillUserBubbleRow(row, surfaceSeq, contentWidth)) : rows
4773
4793
  );
4774
4794
  }
4795
+ } else if (role === "local") {
4796
+ const dimSeq = colorEnabled ? "\x1B[2m" : "";
4797
+ const resetSeq = colorEnabled ? "\x1B[0m" : "";
4798
+ if (command) {
4799
+ lines.push(
4800
+ ...wrapTranscriptLine(`${dimSeq}\u203A ${command}${resetSeq}`, contentWidth)
4801
+ );
4802
+ }
4803
+ if (content) {
4804
+ for (const line of content.split("\n")) {
4805
+ lines.push(
4806
+ ...wrapTranscriptLine(`${dimSeq} ${line}${resetSeq}`, contentWidth)
4807
+ );
4808
+ }
4809
+ }
4775
4810
  } else {
4776
4811
  const styledEntry = styleAssistantTurn(content, colorEnabled);
4777
4812
  for (const logicalLine of styledEntry.split("\n")) {
@@ -4905,13 +4940,22 @@ function getAssistantPlainLines(content) {
4905
4940
  assistantPlainLinesCache.set(content, plainLines);
4906
4941
  return plainLines;
4907
4942
  }
4908
- function countTurnLines(role, content, contentWidth) {
4943
+ function countTurnLines(role, content, contentWidth, command) {
4909
4944
  content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
4910
4945
  let count = 0;
4911
4946
  if (role === "user") {
4912
4947
  for (const line of content.split("\n")) {
4913
4948
  count += wrapTranscriptLine(`\u2503 ${line}`, contentWidth, "\u2503 ").length;
4914
4949
  }
4950
+ } else if (role === "local") {
4951
+ if (command) {
4952
+ count += wrapTranscriptLine(`\u203A ${command}`, contentWidth).length;
4953
+ }
4954
+ if (content) {
4955
+ for (const line of content.split("\n")) {
4956
+ count += wrapTranscriptLine(` ${line}`, contentWidth).length;
4957
+ }
4958
+ }
4915
4959
  } else {
4916
4960
  const plainLines = getAssistantPlainLines(content);
4917
4961
  for (let i = 0; i < plainLines.length; i++) {
@@ -4935,7 +4979,7 @@ function buildTurnOffsets(history, contentWidth) {
4935
4979
  if (cached && cached.width === contentWidth) {
4936
4980
  lineCount = cached.count;
4937
4981
  } else {
4938
- lineCount = countTurnLines(turn.role, turn.content, contentWidth);
4982
+ lineCount = countTurnLines(turn.role, turn.content, contentWidth, turn.command);
4939
4983
  turnLineCountCache.set(turn, { width: contentWidth, count: lineCount });
4940
4984
  }
4941
4985
  entries.push({ startRow: offset, lineCount, separatorAbove });
@@ -4955,7 +4999,14 @@ function buildCopyViewLines(history) {
4955
4999
  for (const [index, turn] of turns.entries()) {
4956
5000
  if (index > 0) lines.push("");
4957
5001
  const normalized = stripAnsi(turn.content).replace(/\r\n/g, "\n").replace(/\r/g, "\n");
4958
- lines.push(...normalized.split("\n"));
5002
+ if (turn.role === "local") {
5003
+ if (turn.command) {
5004
+ lines.push(`\u203A ${stripAnsi(turn.command)}`);
5005
+ }
5006
+ lines.push(...normalized.split("\n"));
5007
+ } else {
5008
+ lines.push(...normalized.split("\n"));
5009
+ }
4959
5010
  }
4960
5011
  return lines;
4961
5012
  }
@@ -5019,7 +5070,7 @@ function renderHistory(output, history, inputLines) {
5019
5070
  lines = cached.lines;
5020
5071
  } else {
5021
5072
  renderCacheMissCount += 1;
5022
- lines = renderTurnBlock(turn.role, turn.content, contentWidth, colorEnabled);
5073
+ lines = renderTurnBlock(turn.role, turn.content, contentWidth, colorEnabled, turn.command);
5023
5074
  turnLineCache.set(turn, {
5024
5075
  width: contentWidth,
5025
5076
  color: colorEnabled,
@@ -6485,7 +6536,7 @@ async function startTuiWorkspace(options) {
6485
6536
  activeTurnAbort.abort();
6486
6537
  }
6487
6538
  };
6488
- const emitCommandOutput = (text) => {
6539
+ const emitCommandOutput = (text, command = "") => {
6489
6540
  if (!text) return;
6490
6541
  if (!isInteractiveInput(input)) {
6491
6542
  output.write(`${text}
@@ -6493,9 +6544,7 @@ async function startTuiWorkspace(options) {
6493
6544
  return;
6494
6545
  }
6495
6546
  history.followBottom = true;
6496
- startTurn(history, "assistant");
6497
- appendToCurrentTurn(history, text);
6498
- finalizeCurrentTurn(history);
6547
+ appendLocalTurn(history, command, text);
6499
6548
  renderHistoryToOutput();
6500
6549
  if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
6501
6550
  };
@@ -6516,21 +6565,17 @@ async function startTuiWorkspace(options) {
6516
6565
  const previousAgentKey = state.agentKey;
6517
6566
  state = result.nextState;
6518
6567
  const interactive = isInteractiveInput(input);
6519
- if (interactive && result.action?.type !== "chat") {
6520
- history.followBottom = true;
6521
- startTurn(history, "user");
6522
- appendToCurrentTurn(history, line.trim());
6523
- finalizeCurrentTurn(history);
6524
- renderHistoryToOutput();
6525
- if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
6526
- }
6527
- if (result.output) {
6528
- emitCommandOutput(result.output);
6568
+ if (result.action?.type !== "chat" && result.action?.type !== "exit" && result.output) {
6569
+ emitCommandOutput(result.output, interactive ? line.trim() : "");
6529
6570
  }
6530
6571
  if (state.agentKey !== previousAgentKey) {
6531
6572
  persistExplicitAgentSwitch(previousAgentKey);
6532
6573
  }
6533
- if (result.action?.type === "exit") return true;
6574
+ if (result.action?.type === "exit") {
6575
+ if (result.output) output.write(`${result.output}
6576
+ `);
6577
+ return true;
6578
+ }
6534
6579
  if (result.action?.type === "clear") {
6535
6580
  if (result.action.dialogId) {
6536
6581
  const authToken = resolvePlatformAuthToken(options.env ?? {});
@@ -7363,6 +7408,7 @@ ${renderStatusLine(state)}
7363
7408
  }
7364
7409
  export {
7365
7410
  ANSI_ESCAPE_REGEX,
7411
+ appendLocalTurn,
7366
7412
  appendToCurrentTurn,
7367
7413
  applyOutputChunkToCurrentTurn,
7368
7414
  applyScrollAction,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanupCliSessionForDialog
3
- } from "./chunk-IZ3CBMD5.js";
3
+ } from "./chunk-ATK5WJOA.js";
4
4
  import {
5
5
  getPrimaryDialogAgentId,
6
6
  removeDialogAgentId
@@ -12,18 +12,18 @@ import {
12
12
  getActiveDialogKey
13
13
  } from "./chunk-3ASDTTEI.js";
14
14
  import "./chunk-ZHXJ6M7T.js";
15
- import "./chunk-446VANPP.js";
15
+ import "./chunk-G5GVZAXF.js";
16
16
  import "./chunk-KX6YBIHG.js";
17
17
  import {
18
18
  patch,
19
19
  selectById
20
- } from "./chunk-A4JDTA5T.js";
21
- import "./chunk-BOL2D2JW.js";
20
+ } from "./chunk-LAXMH7JY.js";
21
+ import "./chunk-ZJ2WITOO.js";
22
22
  import "./chunk-QSJ3HFEF.js";
23
- import "./chunk-DWQNDGO7.js";
23
+ import "./chunk-ZJH3LKEW.js";
24
24
  import "./chunk-TOW4E763.js";
25
- import "./chunk-ZFTCLBEX.js";
26
- import "./chunk-R5V5G73M.js";
25
+ import "./chunk-2IJAKBK2.js";
26
+ import "./chunk-5RDLGLAP.js";
27
27
  import "./chunk-LCBAMY2M.js";
28
28
  import "./chunk-4SN6J65J.js";
29
29
  import "./chunk-CF7PE763.js";
@@ -1,74 +1,75 @@
1
1
  import {
2
2
  fetchAgentContexts
3
- } from "./chunk-2XM5KUNE.js";
3
+ } from "./chunk-Q6L3O67D.js";
4
4
  import {
5
5
  generateRequestBody,
6
6
  mergeReferences,
7
7
  performFetchRequest
8
- } from "./chunk-DCWBP2O7.js";
9
- import "./chunk-TJYWZ3LO.js";
10
- import "./chunk-7CD24PU4.js";
8
+ } from "./chunk-YJZGAAVX.js";
9
+ import "./chunk-YHGHADBQ.js";
10
+ import "./chunk-NMK2JHKM.js";
11
11
  import "./chunk-D34RI6NI.js";
12
- import "./chunk-XD5NQEOH.js";
13
- import "./chunk-4PWB7JRR.js";
12
+ import "./chunk-UDA3ZYLW.js";
13
+ import "./chunk-XFG3BAKN.js";
14
14
  import {
15
15
  findToolExecutor
16
- } from "./chunk-SWOTB2TX.js";
16
+ } from "./chunk-2MSOY7A5.js";
17
17
  import "./chunk-Z5MXSEOJ.js";
18
18
  import "./chunk-KXKQO4Q6.js";
19
- import "./chunk-UTQZ73QQ.js";
19
+ import "./chunk-5EDVWWE3.js";
20
20
  import "./chunk-KQHGZWSV.js";
21
21
  import {
22
22
  getToolResultErrorData
23
- } from "./chunk-OYK7PA5U.js";
24
- import "./chunk-FS5TTXPS.js";
25
- import "./chunk-Q24P6TUS.js";
26
- import "./chunk-G5JHHUAK.js";
23
+ } from "./chunk-XPML3KYZ.js";
24
+ import "./chunk-FLYQAMF4.js";
25
+ import "./chunk-43EPBPZ2.js";
26
+ import "./chunk-F3MP7CP6.js";
27
27
  import "./chunk-SWYMCHM7.js";
28
28
  import "./chunk-44HACRCK.js";
29
- import "./chunk-QLV2GKU5.js";
29
+ import "./chunk-OT2AXEQD.js";
30
30
  import "./chunk-DCDL3GC4.js";
31
31
  import "./chunk-3LY4F7SV.js";
32
+ import "./chunk-XGJ75KN2.js";
32
33
  import {
33
34
  updateTokensAction
34
- } from "./chunk-THTAR67C.js";
35
- import "./chunk-OB6FBSH3.js";
36
- import "./chunk-IZ3CBMD5.js";
37
- import "./chunk-GAGUBI42.js";
35
+ } from "./chunk-RJ7KLCWY.js";
36
+ import "./chunk-BGTUGS3T.js";
37
+ import "./chunk-ATK5WJOA.js";
38
+ import "./chunk-5MVFYKBL.js";
38
39
  import "./chunk-JZPBVBIY.js";
39
40
  import "./chunk-5RGU3J7P.js";
40
41
  import "./chunk-M76ECQRD.js";
41
42
  import "./chunk-HNMXYYJR.js";
42
43
  import "./chunk-DWLEOOGR.js";
43
44
  import "./chunk-3ASDTTEI.js";
44
- import "./chunk-YLADSPDU.js";
45
+ import "./chunk-V54H24CQ.js";
45
46
  import "./chunk-WTGCTVJG.js";
46
47
  import "./chunk-CWMSB67P.js";
47
48
  import {
48
49
  getApiEndpoint
49
- } from "./chunk-VSTUQGLT.js";
50
+ } from "./chunk-2K4NDPT5.js";
50
51
  import "./chunk-ZHXJ6M7T.js";
51
52
  import "./chunk-CAENRKNJ.js";
52
53
  import "./chunk-63W5N6P3.js";
53
54
  import "./chunk-VF4K2QE6.js";
54
- import "./chunk-DKRT67FG.js";
55
+ import "./chunk-KGEVMUMI.js";
55
56
  import {
56
57
  selectCurrentServer
57
- } from "./chunk-446VANPP.js";
58
+ } from "./chunk-G5GVZAXF.js";
58
59
  import "./chunk-KX6YBIHG.js";
59
60
  import {
60
61
  read
61
- } from "./chunk-A4JDTA5T.js";
62
- import "./chunk-BOL2D2JW.js";
62
+ } from "./chunk-LAXMH7JY.js";
63
+ import "./chunk-ZJ2WITOO.js";
63
64
  import "./chunk-QSJ3HFEF.js";
64
- import "./chunk-DWQNDGO7.js";
65
+ import "./chunk-ZJH3LKEW.js";
65
66
  import {
66
67
  extractCustomId
67
68
  } from "./chunk-TOW4E763.js";
68
69
  import {
69
70
  selectIdentityToken
70
- } from "./chunk-ZFTCLBEX.js";
71
- import "./chunk-R5V5G73M.js";
71
+ } from "./chunk-2IJAKBK2.js";
72
+ import "./chunk-5RDLGLAP.js";
72
73
  import "./chunk-LCBAMY2M.js";
73
74
  import "./chunk-4SN6J65J.js";
74
75
  import "./chunk-CF7PE763.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  setDialogExtraReferencesAction
3
- } from "./chunk-Q24P6TUS.js";
3
+ } from "./chunk-43EPBPZ2.js";
4
4
  import "./chunk-M76ECQRD.js";
5
5
  import "./chunk-3ASDTTEI.js";
6
- import "./chunk-A4JDTA5T.js";
7
- import "./chunk-BOL2D2JW.js";
6
+ import "./chunk-LAXMH7JY.js";
7
+ import "./chunk-ZJ2WITOO.js";
8
8
  import "./chunk-QSJ3HFEF.js";
9
- import "./chunk-DWQNDGO7.js";
9
+ import "./chunk-ZJH3LKEW.js";
10
10
  import "./chunk-TOW4E763.js";
11
- import "./chunk-ZFTCLBEX.js";
12
- import "./chunk-R5V5G73M.js";
11
+ import "./chunk-2IJAKBK2.js";
12
+ import "./chunk-5RDLGLAP.js";
13
13
  import "./chunk-LCBAMY2M.js";
14
14
  import "./chunk-4SN6J65J.js";
15
15
  import "./chunk-CF7PE763.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanupCliSessionForDialog
3
- } from "./chunk-IZ3CBMD5.js";
3
+ } from "./chunk-ATK5WJOA.js";
4
4
  import {
5
5
  getPrimaryDialogAgentId,
6
6
  replacePrimaryDialogAgentId
@@ -12,18 +12,18 @@ import {
12
12
  getActiveDialogKey
13
13
  } from "./chunk-3ASDTTEI.js";
14
14
  import "./chunk-ZHXJ6M7T.js";
15
- import "./chunk-446VANPP.js";
15
+ import "./chunk-G5GVZAXF.js";
16
16
  import "./chunk-KX6YBIHG.js";
17
17
  import {
18
18
  patch,
19
19
  selectById
20
- } from "./chunk-A4JDTA5T.js";
21
- import "./chunk-BOL2D2JW.js";
20
+ } from "./chunk-LAXMH7JY.js";
21
+ import "./chunk-ZJ2WITOO.js";
22
22
  import "./chunk-QSJ3HFEF.js";
23
- import "./chunk-DWQNDGO7.js";
23
+ import "./chunk-ZJH3LKEW.js";
24
24
  import "./chunk-TOW4E763.js";
25
- import "./chunk-ZFTCLBEX.js";
26
- import "./chunk-R5V5G73M.js";
25
+ import "./chunk-2IJAKBK2.js";
26
+ import "./chunk-5RDLGLAP.js";
27
27
  import "./chunk-LCBAMY2M.js";
28
28
  import "./chunk-4SN6J65J.js";
29
29
  import "./chunk-CF7PE763.js";
@@ -87,15 +87,15 @@ import {
87
87
  toggleEditorWordCount,
88
88
  toggleEnableReadCurrentSpace,
89
89
  toggleShowThinking
90
- } from "./chunk-446VANPP.js";
90
+ } from "./chunk-G5GVZAXF.js";
91
91
  import "./chunk-KX6YBIHG.js";
92
- import "./chunk-A4JDTA5T.js";
93
- import "./chunk-BOL2D2JW.js";
92
+ import "./chunk-LAXMH7JY.js";
93
+ import "./chunk-ZJ2WITOO.js";
94
94
  import "./chunk-QSJ3HFEF.js";
95
- import "./chunk-DWQNDGO7.js";
95
+ import "./chunk-ZJH3LKEW.js";
96
96
  import "./chunk-TOW4E763.js";
97
- import "./chunk-ZFTCLBEX.js";
98
- import "./chunk-R5V5G73M.js";
97
+ import "./chunk-2IJAKBK2.js";
98
+ import "./chunk-5RDLGLAP.js";
99
99
  import "./chunk-LCBAMY2M.js";
100
100
  import "./chunk-4SN6J65J.js";
101
101
  import "./chunk-CF7PE763.js";