nolo-cli 0.53.0-alpha.1 → 0.54.0-alpha.2

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 (110) hide show
  1. package/{_executeModel-36GKPAEZ.js → _executeModel-ANY4SIAS.js} +34 -35
  2. package/{action-IU6ON7ZB.js → action-Q4W5JPI5.js} +7 -7
  3. package/{addContentAction-5V5CCI3I.js → addContentAction-O25HFR37.js} +6 -6
  4. package/{addDialogAgentAction-KF3KZZNZ.js → addDialogAgentAction-GH7AUPPB.js} +5 -5
  5. package/{agentDeleteCommand-SBODEUPE.js → agentDeleteCommand-JWIKNWWI.js} +17 -17
  6. package/{agentEmailCommands-ME7BCY5S.js → agentEmailCommands-PL22BEU5.js} +39 -40
  7. package/{agentListCommands-QBWPKN5D.js → agentListCommands-6NR7AQEK.js} +19 -19
  8. package/{agentMachineCommands-KFFUPELZ.js → agentMachineCommands-TASPU6OA.js} +18 -18
  9. package/{agentRecordCommands-4BF6JIHS.js → agentRecordCommands-Z64TA63M.js} +38 -39
  10. package/{agentRunCommand-4MA7D6SV.js → agentRunCommand-4QJQLPRW.js} +39 -40
  11. package/{agentRuntimeLocal-RD52NPCG.js → agentRuntimeLocal-PCJJ56J2.js} +17 -17
  12. package/{agentSlice-AJABGQHU.js → agentSlice-KYLDUSNN.js} +6 -6
  13. package/{appDeleteCommands-I42NL3LP.js → appDeleteCommands-WLHMJAVT.js} +19 -19
  14. package/{appDeployCommands-CZWHXVPU.js → appDeployCommands-CKON7N2E.js} +19 -19
  15. package/{appDeployStatusCommands-PIQYXACM.js → appDeployStatusCommands-PXRLDASH.js} +19 -19
  16. package/{appGetCommands-CI2OWLT7.js → appGetCommands-RAB5RM4M.js} +19 -19
  17. package/{appListCommands-LWLSHPCP.js → appListCommands-GU57FB62.js} +19 -19
  18. package/{authCommand-WLWOEVYI.js → authCommand-QOPOEYEK.js} +7 -7
  19. package/{chatQueueReduxAdapter-V37RK3A6.js → chatQueueReduxAdapter-5O2WLITN.js} +16 -16
  20. package/chunk-2BWU4ORW.js +2574 -0
  21. package/{chunk-SG65C33A.js → chunk-32I5RVMY.js} +4 -4
  22. package/{chunk-X7S7OFUX.js → chunk-3QJTD6DO.js} +4 -4
  23. package/{chunk-CY5KIIPU.js → chunk-3Z3DXZBD.js} +12 -12
  24. package/{chunk-RO2IUWZE.js → chunk-4NN3EK7H.js} +1 -1
  25. package/{chunk-Y7TGWSUN.js → chunk-56W233KG.js} +1 -1
  26. package/{chunk-C2WF2OY7.js → chunk-5WADL4O7.js} +1 -1
  27. package/{chunk-QTH72J3N.js → chunk-6BGAQ3KR.js} +116 -23
  28. package/{chunk-67Q6IHM5.js → chunk-6FQ2552G.js} +142 -62
  29. package/{chunk-6XIE5ZGI.js → chunk-6HIGYUBQ.js} +1 -1
  30. package/{chunk-XPW6JLOB.js → chunk-6SZ52ORL.js} +8 -8
  31. package/{chunk-4ZL2KBI7.js → chunk-757BGY6Y.js} +1 -1
  32. package/{chunk-SQTVMYMU.js → chunk-7APQB6R6.js} +3 -3
  33. package/{chunk-QF27IZB3.js → chunk-7K5VMB4Q.js} +3 -3
  34. package/{chunk-V2IPBG5U.js → chunk-AA564GBL.js} +2 -2
  35. package/{chunk-76UA7376.js → chunk-AV6KQCM5.js} +6 -6
  36. package/{chunk-PGKZ2KGE.js → chunk-BJLYCOZK.js} +24 -24
  37. package/{chunk-VKSBVRGP.js → chunk-CVT7L2WZ.js} +1 -1
  38. package/{chunk-JVKFKKYN.js → chunk-D3JQPONH.js} +1 -1
  39. package/{chunk-KHCLMKZZ.js → chunk-EY7V7REW.js} +280 -6
  40. package/{chunk-4RXXP6WD.js → chunk-FGEYVPPR.js} +2 -2
  41. package/{chunk-AZ6DT2UD.js → chunk-GBADO3SM.js} +1 -1
  42. package/chunk-GLGD2JGY.js +1766 -0
  43. package/{chunk-POLE2QLO.js → chunk-GV35EHNA.js} +126 -59
  44. package/{chunk-HR5XDXYM.js → chunk-H4RYESI6.js} +3 -3
  45. package/{chunk-W3RZLXMA.js → chunk-IKTHA3JH.js} +2 -2
  46. package/{chunk-XB7ACJFH.js → chunk-INXBNYCG.js} +3 -3
  47. package/{chunk-F22JQTSX.js → chunk-KUUTWU4I.js} +3 -3
  48. package/{chunk-DFY6O64O.js → chunk-LA4IDAK7.js} +12 -12
  49. package/{chunk-IVKEJD7I.js → chunk-LN3OQJGG.js} +1 -1
  50. package/{chunk-YZ2WE6CW.js → chunk-MFI4FGHX.js} +2 -2
  51. package/{chunk-LGUQHYAL.js → chunk-O5FLGN2L.js} +3 -2
  52. package/{chunk-HCBQVVFZ.js → chunk-PAHILFNT.js} +1 -1
  53. package/{chunk-HHBXCRJS.js → chunk-PYKV6FSC.js} +1 -1
  54. package/{chunk-BO3YFOZR.js → chunk-QDHZCAH3.js} +1 -1
  55. package/{chunk-L3JWI7WX.js → chunk-QOKAKDPE.js} +15 -11
  56. package/{chunk-B54WOZ77.js → chunk-RTLJUGQH.js} +1 -1
  57. package/{chunk-Z7A54NFZ.js → chunk-RU5D3B22.js} +1 -1
  58. package/{chunk-JBL24PK6.js → chunk-SP3DPVBH.js} +2 -2
  59. package/{chunk-TZRB2I2M.js → chunk-TI5BCZCH.js} +18 -18
  60. package/{chunk-KOZ2G3ZG.js → chunk-U2A47SVI.js} +5 -5
  61. package/{chunk-3YVCM5PE.js → chunk-U5Z7LFZF.js} +1 -1
  62. package/{chunk-DIQCV4FR.js → chunk-UITMHBVK.js} +1 -1
  63. package/{chunk-H5QLIP6S.js → chunk-UW4INMD2.js} +2 -2
  64. package/{chunk-5SLTA66C.js → chunk-V4KZGLOI.js} +30 -30
  65. package/{chunk-AV4Z57LV.js → chunk-VRJUIUIY.js} +2 -2
  66. package/{chunk-5XCW6RQG.js → chunk-VRZIH5JO.js} +1 -1
  67. package/{chunk-2JYSSXLY.js → chunk-VULELK4T.js} +2 -2
  68. package/{chunk-VFN256RI.js → chunk-WL3UOGYO.js} +25 -0
  69. package/{chunk-PJASTA2U.js → chunk-Y7LNKP32.js} +3 -3
  70. package/{chunk-OZKJBDG4.js → chunk-YBV6QJKM.js} +14 -8
  71. package/{codingSkills-BYQI6EPT.js → codingSkills-BCQXRZOI.js} +3 -4
  72. package/{createAgentAutomationAction-5OZIWOK4.js → createAgentAutomationAction-UJLNFFFC.js} +17 -17
  73. package/{createDialogAction-334CHPJF.js → createDialogAction-TJCX6GUE.js} +20 -21
  74. package/{createPageAction-LXY22WTA.js → createPageAction-N3IYABHV.js} +18 -19
  75. package/{dbSlice-FWF5F4L7.js → dbSlice-D5CNGWPD.js} +5 -5
  76. package/{deleteFile-NPZ64DFN.js → deleteFile-44TUM34Y.js} +3 -3
  77. package/{dialogCommands-4MGUHAJI.js → dialogCommands-35M6RBAC.js} +18 -18
  78. package/{dialogSlice-76W7S3C4.js → dialogSlice-KO7ADD7H.js} +16 -16
  79. package/{docCreateCommands-346W5443.js → docCreateCommands-VXHZWQ3P.js} +20 -21
  80. package/{docDeleteCommands-FKEEPUUS.js → docDeleteCommands-4WFAJR6A.js} +20 -21
  81. package/{docReadCommands-AACI4DVO.js → docReadCommands-OYREEFAR.js} +20 -21
  82. package/{docStore-N7QTPHAX.js → docStore-5BU76DFK.js} +18 -18
  83. package/{docUpdateCommands-WHWVZ2XE.js → docUpdateCommands-A7QERSME.js} +20 -21
  84. package/{getPricing-JNOCWYDH.js → getPricing-HAU62AFM.js} +3 -3
  85. package/{handleSendMessageAction-EAXEX5AX.js → handleSendMessageAction-OSGQJQ45.js} +16 -16
  86. package/index.js +58 -58
  87. package/{machineCommands-XNWLQVTN.js → machineCommands-J43U3TX5.js} +38 -39
  88. package/{machineWsRunDispatch-56HWQ67L.js → machineWsRunDispatch-Z2Z6STXZ.js} +38 -39
  89. package/{models-N4NXQ44D.js → models-4QF4BJVY.js} +2 -2
  90. package/package.json +2 -3
  91. package/{read-J7RVVCHH.js → read-RGNPI5H2.js} +3 -3
  92. package/{readDocTool-G2WBM4IH.js → readDocTool-6ESWKTXD.js} +1 -1
  93. package/{readlineWorkspace-AXTB7DJC.js → readlineWorkspace-YRPV6JPN.js} +485 -222
  94. package/{removeDialogAgentAction-RMPISD42.js → removeDialogAgentAction-JYT73FU2.js} +7 -7
  95. package/{runAgentClientLoop-PU3R3UXA.js → runAgentClientLoop-5YM5WMAY.js} +32 -33
  96. package/{setDialogExtraReferencesAction-7BUTHDAL.js → setDialogExtraReferencesAction-D564LMYQ.js} +6 -6
  97. package/{setPrimaryDialogAgentAction-WCYIBGZ4.js → setPrimaryDialogAgentAction-ACY3BLYA.js} +7 -7
  98. package/{settingSlice-7NN2MI6Y.js → settingSlice-MKI3MNZJ.js} +6 -6
  99. package/{skillDiscovery-COX56OBO.js → skillDiscovery-GPUDHDTZ.js} +1 -2
  100. package/{spaceCommands-JYI3X4N2.js → spaceCommands-MY26V52L.js} +17 -17
  101. package/{spaceSlice-ERZ3RGWC.js → spaceSlice-JUIXC365.js} +17 -17
  102. package/{streamAgentChatTurn-2IH4MTQC.js → streamAgentChatTurn-XV5X5TNQ.js} +36 -37
  103. package/{switchDialogAgentAction-WGMMQHDI.js → switchDialogAgentAction-CJ5H6SAR.js} +5 -5
  104. package/{tableCommands-P2TXJ3CF.js → tableCommands-R6WFRDYF.js} +1 -1
  105. package/{tools-DJUTQEMP.js → tools-MIMELA2Y.js} +27 -28
  106. package/{tuiSummaryLlmCaller-U4EGD2SX.js → tuiSummaryLlmCaller-XJ5BKNNS.js} +12 -12
  107. package/{updateDialogTitleAction-OVOPGTC3.js → updateDialogTitleAction-EIZUSWHR.js} +17 -17
  108. package/chunk-AETZ7AD6.js +0 -274
  109. package/chunk-EUG45QJR.js +0 -6104
  110. package/chunk-OFZPJ3NT.js +0 -114
@@ -19,7 +19,7 @@ import {
19
19
  parseAgentRunEvent,
20
20
  t,
21
21
  toolLabel
22
- } from "./chunk-POLE2QLO.js";
22
+ } from "./chunk-GV35EHNA.js";
23
23
  import {
24
24
  getReadableCliDb
25
25
  } from "./chunk-43CXXVJD.js";
@@ -52,7 +52,7 @@ import {
52
52
  } from "./chunk-LTRXGFMS.js";
53
53
  import {
54
54
  formatAgentListCard
55
- } from "./chunk-5SLTA66C.js";
55
+ } from "./chunk-V4KZGLOI.js";
56
56
  import {
57
57
  isTransientFetchError
58
58
  } from "./chunk-5XTOKQLW.js";
@@ -74,31 +74,31 @@ import {
74
74
  chooseMemoryOwners,
75
75
  loadMemoryCandidatesFromDb,
76
76
  resolveAgentMemoryPolicy
77
- } from "./chunk-XPW6JLOB.js";
77
+ } from "./chunk-6SZ52ORL.js";
78
78
  import {
79
79
  API_REPORTED_COST_MULTIPLIER,
80
80
  normalizeUsage,
81
81
  parseUiAskChoiceContent
82
- } from "./chunk-PGKZ2KGE.js";
82
+ } from "./chunk-BJLYCOZK.js";
83
83
  import {
84
84
  getDefaultCliLocalRuntimeDb
85
85
  } from "./chunk-IA3A5373.js";
86
86
  import {
87
87
  buildSkillDiscoveryContextLayer
88
- } from "./chunk-OFZPJ3NT.js";
88
+ } from "./chunk-2BWU4ORW.js";
89
89
  import {
90
90
  parseExternalSkillMarkdown,
91
91
  parseSkillDocProtocol
92
- } from "./chunk-AETZ7AD6.js";
92
+ } from "./chunk-EY7V7REW.js";
93
93
  import {
94
94
  LOCAL_AGENT_CONFIG_MISSING_CODE,
95
95
  LOCAL_TURN_ABORTED_CODE,
96
96
  readActionGate,
97
97
  readCommandActionGatePayload
98
- } from "./chunk-QTH72J3N.js";
98
+ } from "./chunk-6BGAQ3KR.js";
99
99
  import {
100
100
  resolveAgentRuntimeConfigFromRecord
101
- } from "./chunk-VKSBVRGP.js";
101
+ } from "./chunk-CVT7L2WZ.js";
102
102
  import {
103
103
  createThinkParserState,
104
104
  flushThinkParser,
@@ -107,20 +107,20 @@ import {
107
107
  import {
108
108
  resolveClientVersion,
109
109
  resolvePlatformAuthToken
110
- } from "./chunk-JBL24PK6.js";
110
+ } from "./chunk-SP3DPVBH.js";
111
111
  import {
112
112
  isQuotaExhaustedError
113
113
  } from "./chunk-IWUMSAQF.js";
114
114
  import {
115
115
  DEFAULT_CONTEXT_WINDOW,
116
116
  getModelContextWindow
117
- } from "./chunk-F22JQTSX.js";
117
+ } from "./chunk-KUUTWU4I.js";
118
118
  import {
119
119
  clipCompactText
120
- } from "./chunk-HR5XDXYM.js";
120
+ } from "./chunk-H4RYESI6.js";
121
121
  import {
122
122
  findModelConfig
123
- } from "./chunk-BO3YFOZR.js";
123
+ } from "./chunk-QDHZCAH3.js";
124
124
  import {
125
125
  compactWhitespace
126
126
  } from "./chunk-DWLEOOGR.js";
@@ -145,7 +145,7 @@ import {
145
145
  CLIENT_VERSION_TOO_OLD_CODE,
146
146
  NOLO_CLIENT_VERSION_HEADER,
147
147
  buildClientVersionUpgradeMessage
148
- } from "./chunk-VFN256RI.js";
148
+ } from "./chunk-WL3UOGYO.js";
149
149
  import {
150
150
  parsePositiveFiniteNumberOrFallback
151
151
  } from "./chunk-Y5GCAMGP.js";
@@ -159,7 +159,7 @@ import {
159
159
  BUILTIN_NOLO_AGENT_KEY,
160
160
  BUILTIN_NOLO_AGENT_NAME,
161
161
  builtinAgentCatalogEntryById
162
- } from "./chunk-2JYSSXLY.js";
162
+ } from "./chunk-VULELK4T.js";
163
163
  import {
164
164
  parsePublicAgentId
165
165
  } from "./chunk-BJIRLHJR.js";
@@ -1240,13 +1240,6 @@ function setActiveThemeMode(mode) {
1240
1240
  function setActiveBrightness(brightness) {
1241
1241
  setActiveThemeMode(brightness ?? "terminal");
1242
1242
  }
1243
- var activeDensity = "spacious";
1244
- function getActiveDensity() {
1245
- return activeDensity;
1246
- }
1247
- function setActiveDensity(density) {
1248
- activeDensity = density;
1249
- }
1250
1243
  var TRUECOLOR_TERM_PROGRAMS = /* @__PURE__ */ new Set([
1251
1244
  "iterm.app",
1252
1245
  "wezterm",
@@ -3999,36 +3992,45 @@ function formatToolTraceLine(text, colorEnabled, accent = "none") {
3999
3992
  return `${dimCliText(text, true)}
4000
3993
  `;
4001
3994
  }
3995
+ var cleanUserText = (value) => stripAnsi2(value).replace(/[\r\n]+/g, " ").replace(/\s+/g, " ").trim();
4002
3996
  function renderRunCard(snapshot, opts) {
4003
3997
  const labels = agentRunCardLabels();
4004
3998
  const timing = { startedAt: snapshot.startedAt, finishedAt: snapshot.finishedAt };
4005
- const name = snapshot.agentName ?? "agent";
4006
- if (isAgentRunTerminalStatus(snapshot.status)) {
4007
- return formatFinishedRunCard(name, snapshot.status, {
4008
- runId: snapshot.runId,
4009
- toolCallCount: snapshot.toolCallCount,
4010
- lastToolNames: snapshot.lastToolNames,
4011
- lastAssistantText: snapshot.lastAssistantText,
4012
- errorMessage: snapshot.errorMessage,
4013
- logLines: snapshot.logLines,
4014
- timing,
4015
- ...opts?.includeLogTail !== void 0 ? { includeLogTail: opts.includeLogTail } : {},
4016
- labels
4017
- });
4018
- }
4019
- return formatStatusRunCard(name, snapshot.status, {
3999
+ const safe = opts?.safe === true;
4000
+ const name = safe ? cleanUserText(snapshot.agentName ?? "agent") : snapshot.agentName ?? "agent";
4001
+ const source = safe ? {
4002
+ ...snapshot,
4003
+ agentName: snapshot.agentName ? cleanUserText(snapshot.agentName) : snapshot.agentName,
4004
+ taskPreview: snapshot.taskPreview ? cleanUserText(snapshot.taskPreview) : snapshot.taskPreview,
4005
+ lastAssistantText: snapshot.lastAssistantText ? cleanUserText(snapshot.lastAssistantText) : snapshot.lastAssistantText,
4006
+ lastToolNames: snapshot.lastToolNames?.map(cleanUserText)
4007
+ } : snapshot;
4008
+ const hadError = safe && Boolean(source.errorMessage?.trim());
4009
+ const errorFields = safe ? { errorMessage: void 0, logLines: void 0 } : { errorMessage: source.errorMessage, logLines: source.logLines };
4010
+ const body = isAgentRunTerminalStatus(snapshot.status) ? formatFinishedRunCard(name, snapshot.status, {
4011
+ runId: snapshot.runId,
4012
+ toolCallCount: source.toolCallCount,
4013
+ lastToolNames: source.lastToolNames,
4014
+ lastAssistantText: source.lastAssistantText,
4015
+ ...errorFields,
4016
+ timing,
4017
+ ...opts?.includeLogTail !== void 0 ? { includeLogTail: opts.includeLogTail } : {},
4018
+ labels
4019
+ }) : formatStatusRunCard(name, snapshot.status, {
4020
4020
  runId: snapshot.runId,
4021
- toolCallCount: snapshot.toolCallCount,
4022
- lastToolNames: snapshot.lastToolNames,
4023
- lastAssistantText: snapshot.lastAssistantText,
4024
- errorMessage: snapshot.errorMessage,
4025
- logLines: snapshot.logLines,
4021
+ toolCallCount: source.toolCallCount,
4022
+ lastToolNames: source.lastToolNames,
4023
+ lastAssistantText: source.lastAssistantText,
4024
+ ...errorFields,
4026
4025
  timing,
4027
4026
  ...opts?.includeLogTail !== void 0 ? { includeLogTail: opts.includeLogTail } : {},
4028
4027
  labels
4029
4028
  });
4029
+ return hadError ? `${body}
4030
+ error ${t("runDiagnosticsHidden")}` : body;
4030
4031
  }
4031
- function recoverOrchestrationCard(event, toolName) {
4032
+ function recoverOrchestrationCard(event, toolName, opts) {
4033
+ const safe = opts?.safe === true;
4032
4034
  const content = typeof event.content === "string" ? event.content : "";
4033
4035
  const trimmed = content.trim();
4034
4036
  if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return null;
@@ -4059,27 +4061,30 @@ function recoverOrchestrationCard(event, toolName) {
4059
4061
  if (!parsedEvent) return null;
4060
4062
  const { kind, snapshot } = parsedEvent;
4061
4063
  if (kind === "start") {
4062
- return formatStartRunCard(snapshot.agentName ?? "agent", snapshot.status, {
4063
- task: snapshot.taskPreview,
4064
+ const name = safe ? cleanUserText(snapshot.agentName ?? "agent") : snapshot.agentName ?? "agent";
4065
+ const task = snapshot.taskPreview ? safe ? cleanUserText(snapshot.taskPreview) : snapshot.taskPreview : snapshot.taskPreview;
4066
+ return formatStartRunCard(name, snapshot.status, {
4067
+ task,
4064
4068
  runId: snapshot.runId,
4065
4069
  labels
4066
4070
  });
4067
4071
  }
4068
4072
  if (kind === "gone") return formatNotFoundRunCard(labels);
4069
4073
  if (kind === "stop") return formatStopRunCard(snapshot.status, labels);
4070
- return renderRunCard(snapshot);
4074
+ return renderRunCard(snapshot, opts);
4071
4075
  }
4072
4076
  function parseControlAgentRunStatusEvent(event) {
4073
4077
  const parsed = parseAgentRunEvent(event);
4074
4078
  return parsed?.kind === "status" ? parsed.snapshot : null;
4075
4079
  }
4076
- function formatOrchestrationCardBlock(event, toolName, colorEnabled) {
4080
+ function formatOrchestrationCardBlock(event, toolName, colorEnabled, opts) {
4081
+ const safe = opts?.safe === true;
4077
4082
  const rawLabel = toolLabel(toolName);
4078
4083
  const bakedCard = typeof event.metadata?.displayData === "string" && event.metadata.displayData.trim() ? event.metadata.displayData : "";
4079
- const rawDataStr = recoverOrchestrationCard(event, toolName) || bakedCard || (typeof event.content === "string" ? event.content : "");
4084
+ const rawDataStr = recoverOrchestrationCard(event, toolName, { safe }) || bakedCard || (typeof event.content === "string" ? event.content : "");
4080
4085
  const failed = event.type === "tool-error" || isFailedToolResult(event) || Boolean(event.metadata?.failed) || /^Error:/i.test(rawDataStr.trim());
4081
4086
  if (failed) {
4082
- const firstLine = rawDataStr.trim().split("\n")[0] || event.summary || event.message || t("toolFailed");
4087
+ const firstLine = safe ? t("toolFailed") : rawDataStr.trim().split("\n")[0] || event.summary || event.message || t("toolFailed");
4083
4088
  const message = clip(firstLine, 96);
4084
4089
  if (!colorEnabled) {
4085
4090
  return `\u2717 ${rawLabel} ${message}
@@ -4092,11 +4097,12 @@ function formatOrchestrationCardBlock(event, toolName, colorEnabled) {
4092
4097
  `;
4093
4098
  }
4094
4099
  const displayData = rawDataStr.trim();
4095
- const lines = displayData ? displayData.split("\n").filter((line) => !/^\s*agent\s+agent\s*$/.test(line)) : [];
4100
+ const lines = displayData ? displayData.split("\n") : [];
4101
+ const projected = safe ? sanitizeRunCardForNormal(lines) : lines;
4096
4102
  if (!colorEnabled) {
4097
4103
  let out2 = `\u25CF ${rawLabel}
4098
4104
  `;
4099
- for (const line of lines) {
4105
+ for (const line of projected) {
4100
4106
  out2 += ` ${line}
4101
4107
  `;
4102
4108
  }
@@ -4106,12 +4112,40 @@ function formatOrchestrationCardBlock(event, toolName, colorEnabled) {
4106
4112
  const labelPart = themeText(rawLabel, "muted", true);
4107
4113
  let out = `${bullet} ${labelPart}
4108
4114
  `;
4109
- for (const line of lines) {
4115
+ for (const line of projected) {
4110
4116
  out += ` ${themeText(line, "muted", true)}
4111
4117
  `;
4112
4118
  }
4113
4119
  return out;
4114
4120
  }
4121
+ function sanitizeRunCardForNormal(lines) {
4122
+ const out = [];
4123
+ let errorIndent = null;
4124
+ for (const line of lines) {
4125
+ if (/^(log tail:?|日志尾部:?)$/i.test(line.trim())) {
4126
+ if (out.length > 0 && out[out.length - 1].trim() === "") out.pop();
4127
+ break;
4128
+ }
4129
+ if (/^\s*error\b/i.test(line)) {
4130
+ out.push(` error ${t("runDiagnosticsHidden")}`);
4131
+ errorIndent = line.length - line.trimStart().length;
4132
+ continue;
4133
+ }
4134
+ if (errorIndent !== null) {
4135
+ if (line.trim() === "") {
4136
+ errorIndent = null;
4137
+ out.push(line);
4138
+ continue;
4139
+ }
4140
+ const indent = line.length - line.trimStart().length;
4141
+ const isLabelRow = /^\s{2}[a-z][a-zA-Z0-9]*\s{2,}/.test(line);
4142
+ if (indent > errorIndent && !isLabelRow) continue;
4143
+ errorIndent = null;
4144
+ }
4145
+ out.push(line);
4146
+ }
4147
+ return out;
4148
+ }
4115
4149
  function mergeRunSnapshot(previous, next) {
4116
4150
  return {
4117
4151
  ...previous,
@@ -4176,10 +4210,10 @@ function formatNormalToolLine(event, pending, colorEnabled) {
4176
4210
  if (block) return block;
4177
4211
  }
4178
4212
  if (event.type === "tool-result" && (toolName === "listAgents" || toolName === "startAgentRun" || toolName === "controlAgentRun")) {
4179
- return formatOrchestrationCardBlock(event, toolName, colorEnabled);
4213
+ return formatOrchestrationCardBlock(event, toolName, colorEnabled, { safe: true });
4180
4214
  }
4181
4215
  if (event.type === "tool-result" && toolName === "loadSkill") {
4182
- return formatLoadSkillBlock(event, colorEnabled) ?? "";
4216
+ return formatLoadSkillBlock(event, colorEnabled, { safe: true }) ?? "";
4183
4217
  }
4184
4218
  const label = toolLabel(toolName);
4185
4219
  if (readActionGate(event.metadata?.actionGate)) {
@@ -4382,14 +4416,14 @@ function formatTodoListForCli(event, colorEnabled) {
4382
4416
  const text = [`\u2611 Todo (${todos.length})`, ...lines].join("\n") + "\n";
4383
4417
  return colorEnabled ? themeText(text, "chrome") : text;
4384
4418
  }
4385
- function formatLoadSkillBlock(event, colorEnabled) {
4419
+ function formatLoadSkillBlock(event, colorEnabled, opts) {
4386
4420
  if (event.type !== "tool-result" || event.toolName !== "loadSkill") return null;
4387
4421
  const skillName = resolveLoadSkillName(event);
4388
4422
  const content = typeof event.content === "string" ? event.content : "";
4389
4423
  const failed = /^Skill\s+"[^"]*"\s+not found/.test(content) || isFailedToolResult(event);
4390
4424
  const labelText = t("usedSkillLabel");
4391
4425
  if (failed) {
4392
- const message = clip(content.split("\n")[0] || t("toolFailed"), 96);
4426
+ const message = opts?.safe === true ? t("toolFailed") : clip(content.split("\n")[0] || t("toolFailed"), 96);
4393
4427
  return formatToolTraceLine(`\u25B8 ${labelText} (${skillName}) \u2717 ${message}`, colorEnabled, "error");
4394
4428
  }
4395
4429
  if (!colorEnabled) {
@@ -4882,7 +4916,7 @@ ${this.text}
4882
4916
  0,
4883
4917
  Math.floor((Date.now() - this.startTime) / 1e3)
4884
4918
  );
4885
- const thinkingPart = this.thinkingHint ? `: ${truncateThinkingHint(this.thinkingHint, 60)}` : "";
4919
+ const thinkingPart = this.thinkingHint ? dimCliText(`: ${truncateThinkingHint(this.thinkingHint, 60)}`) : "";
4886
4920
  return `${themeColorSequence("accent")}${frame}\x1B[39m ${this.text}${thinkingPart} (${formatElapsed(elapsedSeconds)})`;
4887
4921
  }
4888
4922
  };
@@ -4950,6 +4984,20 @@ function createCliTurnOutput(params) {
4950
4984
  let everStreamedAnyText = false;
4951
4985
  let printedAssistantLabel = false;
4952
4986
  let thinkState = createThinkParserState();
4987
+ let thinkingFirstAt = null;
4988
+ let thinkingLastAt = 0;
4989
+ const markThinkingActivity = () => {
4990
+ const now = Date.now();
4991
+ if (thinkingFirstAt === null) thinkingFirstAt = now;
4992
+ thinkingLastAt = now;
4993
+ };
4994
+ const writeThinkingTrace = () => {
4995
+ if (thinkingFirstAt === null) return;
4996
+ const seconds = Math.max(0, Math.round((thinkingLastAt - thinkingFirstAt) / 1e3));
4997
+ thinkingFirstAt = null;
4998
+ options.output.write(`${dimCliText(t("thinkingTraceLine", formatElapsed(seconds)))}
4999
+ `);
5000
+ };
4953
5001
  let compactionEvent = null;
4954
5002
  const assistantLabelManaged = options.output.assistantLabelManaged === true;
4955
5003
  const writeToolOutput = (chunk) => {
@@ -4969,9 +5017,11 @@ function createCliTurnOutput(params) {
4969
5017
  thinkState = parsed.state;
4970
5018
  if (!parsed.content && !parsed.reasoning) return;
4971
5019
  if (showThinking && parsed.reasoning) {
5020
+ markThinkingActivity();
4972
5021
  spinner.setThinkingHint(parsed.reasoning);
4973
5022
  }
4974
5023
  if (!parsed.content) return;
5024
+ writeThinkingTrace();
4975
5025
  spinner.stop();
4976
5026
  options.activityReporter?.(null);
4977
5027
  if (!printedAssistantLabel) {
@@ -5031,7 +5081,10 @@ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}`);
5031
5081
  writeVisibleAssistantChunk(chunk);
5032
5082
  },
5033
5083
  pushThinking(chunk) {
5034
- if (showThinking) spinner.setThinkingHint(chunk);
5084
+ if (showThinking) {
5085
+ markThinkingActivity();
5086
+ spinner.setThinkingHint(chunk);
5087
+ }
5035
5088
  },
5036
5089
  handleToolEvent,
5037
5090
  /** 记录一条 compaction 观测事件(TUI 在 turn 结束时渲染一行 dim 摘要)。 */
@@ -5046,6 +5099,7 @@ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}`);
5046
5099
  finish(fallbackContent) {
5047
5100
  spinner.stop();
5048
5101
  options.activityReporter?.(null);
5102
+ writeThinkingTrace();
5049
5103
  const flushedThink = flushThinkParser(thinkState);
5050
5104
  thinkState = flushedThink.state;
5051
5105
  if (flushedThink.content) {
@@ -5266,6 +5320,10 @@ ${describeClientVersionTooOldFailure(message, error)}`);
5266
5320
  function resolveAuthToken2(env) {
5267
5321
  return resolvePlatformAuthToken(env);
5268
5322
  }
5323
+ function resolveFileWriteGateEnabled(env) {
5324
+ const raw = (env.NOLO_CLI_WRITE_GATE ?? "").trim().toLowerCase();
5325
+ return raw !== "off" && raw !== "0" && raw !== "false";
5326
+ }
5269
5327
  function isMachineBoundLocalhostCustomProvider(agentConfig) {
5270
5328
  const machineId = agentConfig?.runtimeBinding && typeof agentConfig.runtimeBinding === "object" ? String(agentConfig.runtimeBinding.machineId ?? "").trim() : "";
5271
5329
  const providerUrl = asTrimmedString(agentConfig?.customProviderUrl);
@@ -5357,7 +5415,16 @@ function isKnownServerPlatformAgent(options) {
5357
5415
  // packages/core/collapsedPaste.ts
5358
5416
  var COLLAPSE_PASTE_MIN_LINES = 8;
5359
5417
  var COLLAPSE_PASTE_MIN_CHARS = 400;
5360
- var COLLAPSED_PASTE_PLACEHOLDER_RE = /\[paste #(\d+) · (\d+) lines\]/g;
5418
+ var COLLAPSED_PASTE_PLACEHOLDER_RE = (
5419
+ // 兼容两种格式:旧 `[paste #N · L lines]` 与新 `[paste #N · L lines · preview]`。
5420
+ // preview 段用负向先行断言排除模型引用(`…; full content available via
5421
+ // readPastedText(pasteId=N)`):legacy 无 scope 的模型引用与新 chip 形状重叠,
5422
+ // 若被当作 chip 匹配,跨会话残留的引用会被错误展开/替换(破坏 durable
5423
+ // fallback 语义)。preview 与模型引用尾段在生成时都不会包含该标记原文之外
5424
+ // 的歧义,此处按"完整模型引用尾段"精确排除。
5425
+ /\[paste #(\d+) · (\d+) lines(?: · (?![^\]]*; full content available via readPastedText\(pasteId=\d+\))([^\]]*))?\]/g
5426
+ );
5427
+ var COLLAPSED_PASTE_PREVIEW_MAX_CHARS = 24;
5361
5428
  var COLLAPSED_PASTE_MODEL_REFERENCE_RE = /\[paste #(\d+)(?: scope:([a-zA-Z0-9_-]+))? · [^\]]+; full content available via readPastedText\(pasteId=(\d+)\)\]/g;
5362
5429
  function countTextLines(text) {
5363
5430
  if (text.length === 0) return 0;
@@ -5397,9 +5464,22 @@ function estimatePasteBytes(text) {
5397
5464
  }
5398
5465
  return bytes;
5399
5466
  }
5467
+ function buildCollapsedPastePreview(text) {
5468
+ const firstNonEmptyLine = text.split(/\r\n|\r|\n/).find((line) => line.trim().length > 0) ?? "";
5469
+ let preview = compactWhitespace(firstNonEmptyLine);
5470
+ preview = preview.replace(new RegExp("\\]|\\p{C}", "gu"), "").trim();
5471
+ if (preview.length === 0) return "";
5472
+ const chars = Array.from(preview);
5473
+ if (chars.length > COLLAPSED_PASTE_PREVIEW_MAX_CHARS) {
5474
+ return chars.slice(0, COLLAPSED_PASTE_PREVIEW_MAX_CHARS).join("") + "\u2026";
5475
+ }
5476
+ return preview;
5477
+ }
5400
5478
  function formatCollapsedPastePlaceholder(id, text) {
5401
5479
  const lines = countTextLines(text);
5402
- return `[paste #${id} \xB7 ${lines} lines]`;
5480
+ const preview = buildCollapsedPastePreview(text);
5481
+ if (!preview) return `[paste #${id} \xB7 ${lines} lines]`;
5482
+ return `[paste #${id} \xB7 ${lines} lines \xB7 ${preview}]`;
5403
5483
  }
5404
5484
  function generatePasteScope() {
5405
5485
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
@@ -5512,7 +5592,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
5512
5592
  // packages/cli/client/agentRun.ts
5513
5593
  import { ulid } from "ulid";
5514
5594
  async function loadRunLocalAgentTurn() {
5515
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-RD52NPCG.js");
5595
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-PCJJ56J2.js");
5516
5596
  return runLocalAgentTurn;
5517
5597
  }
5518
5598
  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();
@@ -6137,6 +6217,8 @@ async function runLocalAgentTurnForCli(options, settings) {
6137
6217
  contextReferenceResolver: (reference) => canResolveCollapsedPasteReference(options.pastedTextStore, reference)
6138
6218
  } : {},
6139
6219
  continueDialogId: currentDialogId,
6220
+ fileWriteSessionId: currentDialogId,
6221
+ fileWriteGateEnabled: resolveFileWriteGateEnabled(options.env),
6140
6222
  spaceId: options.spaceId,
6141
6223
  category: options.category,
6142
6224
  inheritedFromDialogKey: options.inheritedFromDialogKey,
@@ -7546,8 +7628,6 @@ export {
7546
7628
  getActiveThemeMode,
7547
7629
  setActiveThemeMode,
7548
7630
  setActiveBrightness,
7549
- getActiveDensity,
7550
- setActiveDensity,
7551
7631
  detectSystemBrightnessFromEnv,
7552
7632
  resolveTuiBrightness,
7553
7633
  resolveTuiThemeMode,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildSkillDocMarkdown
3
- } from "./chunk-AETZ7AD6.js";
3
+ } from "./chunk-EY7V7REW.js";
4
4
 
5
5
  // packages/cli/docPageHelpers.ts
6
6
  import { readFileSync } from "node:fs";
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-DFY6O64O.js";
3
+ } from "./chunk-LA4IDAK7.js";
4
4
  import {
5
5
  prepareAndPersistMessage,
6
6
  uiAskChoiceFunc,
7
7
  uiAskChoiceFunctionSchema
8
- } from "./chunk-PGKZ2KGE.js";
8
+ } from "./chunk-BJLYCOZK.js";
9
9
  import {
10
10
  require_date_fns
11
11
  } from "./chunk-M76ECQRD.js";
12
12
  import {
13
13
  TOOL_PACKS
14
- } from "./chunk-LGUQHYAL.js";
14
+ } from "./chunk-O5FLGN2L.js";
15
15
  import {
16
16
  buildSkillDocMarkdown
17
- } from "./chunk-AETZ7AD6.js";
17
+ } from "./chunk-EY7V7REW.js";
18
18
  import {
19
19
  PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
20
20
  PLATFORM_HOSTED_KIMI_PROVIDER
21
- } from "./chunk-VFN256RI.js";
21
+ } from "./chunk-WL3UOGYO.js";
22
22
  import {
23
23
  read,
24
24
  readAndWait,
25
25
  removeCachedEntity,
26
26
  upsertSSREntity,
27
27
  write
28
- } from "./chunk-76UA7376.js";
28
+ } from "./chunk-AV6KQCM5.js";
29
29
  import {
30
30
  createAgentKey,
31
31
  createDialogKey,
@@ -40,10 +40,10 @@ import {
40
40
  } from "./chunk-BJIRLHJR.js";
41
41
  import {
42
42
  selectIdentityUserId
43
- } from "./chunk-HHBXCRJS.js";
43
+ } from "./chunk-PYKV6FSC.js";
44
44
  import {
45
45
  isDevelopment
46
- } from "./chunk-L3JWI7WX.js";
46
+ } from "./chunk-QOKAKDPE.js";
47
47
  import {
48
48
  isRecord
49
49
  } from "./chunk-KUG52IAP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-JBL24PK6.js";
3
+ } from "./chunk-SP3DPVBH.js";
4
4
  import {
5
5
  toErrorMessage
6
6
  } from "./chunk-HNMXYYJR.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  selectCurrentServer,
3
3
  selectRemoteServers
4
- } from "./chunk-X7S7OFUX.js";
4
+ } from "./chunk-3QJTD6DO.js";
5
5
  import {
6
6
  createUserKey,
7
7
  extractAgentInfo,
@@ -16,10 +16,10 @@ import {
16
16
  noloWriteRequest,
17
17
  selectIdentityUser,
18
18
  selectIdentityUserId
19
- } from "./chunk-HHBXCRJS.js";
19
+ } from "./chunk-PYKV6FSC.js";
20
20
  import {
21
21
  normalizeTimeFields
22
- } from "./chunk-L3JWI7WX.js";
22
+ } from "./chunk-QOKAKDPE.js";
23
23
 
24
24
  // packages/share/action.ts
25
25
  var generateToken = () => {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-POLE2QLO.js";
4
+ } from "./chunk-GV35EHNA.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-5SLTA66C.js";
7
+ } from "./chunk-V4KZGLOI.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-QTH72J3N.js";
10
+ } from "./chunk-6BGAQ3KR.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
13
  } from "./chunk-NQ4N4IGO.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  TOOL_PACKS,
3
3
  buildCodeWorkDiscipline
4
- } from "./chunk-LGUQHYAL.js";
4
+ } from "./chunk-O5FLGN2L.js";
5
5
  import {
6
6
  buildSkillDocMarkdown,
7
7
  resolvePageSkillMetadata
8
- } from "./chunk-AETZ7AD6.js";
8
+ } from "./chunk-EY7V7REW.js";
9
9
  import {
10
10
  canonicalizeToolNames
11
11
  } from "./chunk-O6OSWFZQ.js";
@@ -8,12 +8,12 @@ import {
8
8
  loadFileFromIndexedDb,
9
9
  removeAction,
10
10
  saveFileToIndexedDb
11
- } from "./chunk-YZ2WE6CW.js";
11
+ } from "./chunk-MFI4FGHX.js";
12
12
  import {
13
13
  readAction,
14
14
  readRequestManager,
15
15
  resolveAgentReadServers
16
- } from "./chunk-2JYSSXLY.js";
16
+ } from "./chunk-VULELK4T.js";
17
17
  import {
18
18
  asyncThunkCreator,
19
19
  buildCreateSlice,
@@ -33,13 +33,13 @@ import {
33
33
  shouldReplaceLocalWithRemoteRecord,
34
34
  shouldReplicateLocalRecord,
35
35
  uploadToCurrentServer
36
- } from "./chunk-HHBXCRJS.js";
36
+ } from "./chunk-PYKV6FSC.js";
37
37
  import {
38
38
  fetchFromClientDb,
39
39
  fetchFromServer,
40
40
  logger,
41
41
  normalizeTimeFields
42
- } from "./chunk-L3JWI7WX.js";
42
+ } from "./chunk-QOKAKDPE.js";
43
43
  import {
44
44
  isTombstoneRecord
45
45
  } from "./chunk-GBRG75BQ.js";
@@ -707,7 +707,7 @@ var dbSlice = createSliceWithThunks({
707
707
  // 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
708
708
  read: create.asyncThunk(
709
709
  async (payload, thunkApi) => {
710
- const { readAction: readAction2 } = await import("./read-J7RVVCHH.js");
710
+ const { readAction: readAction2 } = await import("./read-RGNPI5H2.js");
711
711
  return readAction2(payload, thunkApi);
712
712
  },
713
713
  {
@@ -781,7 +781,7 @@ var dbSlice = createSliceWithThunks({
781
781
  // 这里改成动态 import,运行期才解析,彻底断开这条边。
782
782
  share: create.asyncThunk(
783
783
  async (config, thunkApi) => {
784
- const { shareResourceAction } = await import("./action-IU6ON7ZB.js");
784
+ const { shareResourceAction } = await import("./action-Q4W5JPI5.js");
785
785
  return shareResourceAction(config, thunkApi);
786
786
  }
787
787
  ),