nolo-cli 0.47.0 → 0.48.0

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 (89) hide show
  1. package/{_executeModel-Q4NLKUPH.js → _executeModel-36GKPAEZ.js} +25 -25
  2. package/{action-FLLC2SIX.js → action-IU6ON7ZB.js} +4 -4
  3. package/{addContentAction-SVSPUUK4.js → addContentAction-5V5CCI3I.js} +3 -3
  4. package/{addDialogAgentAction-W3JGU4F7.js → addDialogAgentAction-KF3KZZNZ.js} +2 -2
  5. package/{agentDeleteCommand-6MHA67Q2.js → agentDeleteCommand-SBODEUPE.js} +12 -12
  6. package/{agentEmailCommands-L3XZ237J.js → agentEmailCommands-ME7BCY5S.js} +30 -30
  7. package/{agentListCommands-6PIBJFKH.js → agentListCommands-QBWPKN5D.js} +12 -12
  8. package/{agentMachineCommands-POTNZ57E.js → agentMachineCommands-KFFUPELZ.js} +13 -13
  9. package/{agentRecordCommands-IMRKLUIK.js → agentRecordCommands-4BF6JIHS.js} +29 -29
  10. package/{agentRunCommand-LFZCDJLJ.js → agentRunCommand-4MA7D6SV.js} +29 -29
  11. package/{agentRuntimeLocal-BVUV26QD.js → agentRuntimeLocal-RD52NPCG.js} +12 -12
  12. package/{agentSlice-CIN6FY6Z.js → agentSlice-AJABGQHU.js} +3 -3
  13. package/{appDeleteCommands-QZBYALTD.js → appDeleteCommands-I42NL3LP.js} +14 -14
  14. package/{appDeployCommands-UDUJPOBN.js → appDeployCommands-CZWHXVPU.js} +14 -14
  15. package/{appDeployStatusCommands-P2ZTUCDR.js → appDeployStatusCommands-PIQYXACM.js} +14 -14
  16. package/{appGetCommands-346YWTIX.js → appGetCommands-CI2OWLT7.js} +14 -14
  17. package/{appListCommands-ML7PAZXO.js → appListCommands-LWLSHPCP.js} +14 -14
  18. package/{authCommand-7A4LJ7RD.js → authCommand-WLWOEVYI.js} +6 -6
  19. package/{chatQueueReduxAdapter-46OTJS77.js → chatQueueReduxAdapter-V37RK3A6.js} +11 -11
  20. package/{chunk-Z5NW3O7V.js → chunk-2JYSSXLY.js} +8 -0
  21. package/{chunk-D45NILIX.js → chunk-3YVCM5PE.js} +1 -1
  22. package/{chunk-3EEK7T3D.js → chunk-4RXXP6WD.js} +1 -1
  23. package/{chunk-UYWXQCPH.js → chunk-4ZL2KBI7.js} +1 -1
  24. package/{chunk-UL3AIGAQ.js → chunk-5SLTA66C.js} +22 -22
  25. package/{chunk-FJHLA6SX.js → chunk-5XCW6RQG.js} +1 -1
  26. package/{chunk-FTGZTG2J.js → chunk-67Q6IHM5.js} +184 -50
  27. package/{chunk-WVGEBWA6.js → chunk-76UA7376.js} +3 -3
  28. package/{chunk-YB7675WX.js → chunk-AV4Z57LV.js} +3 -1
  29. package/{chunk-K3HS5RNN.js → chunk-AZ6DT2UD.js} +1 -1
  30. package/{chunk-LFLWZX76.js → chunk-B54WOZ77.js} +1 -1
  31. package/{chunk-UX4WJK6W.js → chunk-BO3YFOZR.js} +10 -1
  32. package/{chunk-H3YNPYSN.js → chunk-CY5KIIPU.js} +10 -10
  33. package/{chunk-QPIMHSA5.js → chunk-DFY6O64O.js} +8 -8
  34. package/{chunk-MKZRKDQM.js → chunk-DIQCV4FR.js} +1 -1
  35. package/{chunk-V5LQH25J.js → chunk-F22JQTSX.js} +2 -2
  36. package/{chunk-U72222TN.js → chunk-H5QLIP6S.js} +1 -1
  37. package/{chunk-2X5S4IBZ.js → chunk-HCBQVVFZ.js} +1 -1
  38. package/{chunk-GK74OOFT.js → chunk-HR5XDXYM.js} +2 -2
  39. package/{chunk-CKCHKUQZ.js → chunk-IVKEJD7I.js} +1 -1
  40. package/{chunk-2PGAWTDB.js → chunk-JBL24PK6.js} +1 -1
  41. package/{chunk-BEDKTILE.js → chunk-JVKFKKYN.js} +1 -1
  42. package/{chunk-EK6J2BLB.js → chunk-KOZ2G3ZG.js} +4 -4
  43. package/{chunk-HMMOAG2I.js → chunk-OZKJBDG4.js} +6 -3
  44. package/{chunk-6DYGT4IA.js → chunk-PGKZ2KGE.js} +20 -20
  45. package/{chunk-KZCDMZ6M.js → chunk-PJASTA2U.js} +3 -3
  46. package/{chunk-OTYXCO4M.js → chunk-POLE2QLO.js} +26 -21
  47. package/{chunk-QKF5I66W.js → chunk-QF27IZB3.js} +3 -3
  48. package/{chunk-D57WA7W3.js → chunk-QTH72J3N.js} +6 -6
  49. package/{chunk-AYXSUBVC.js → chunk-RO2IUWZE.js} +1 -1
  50. package/{chunk-HAPCUPEO.js → chunk-SG65C33A.js} +2 -2
  51. package/{chunk-HGDOIDQ4.js → chunk-SQTVMYMU.js} +1 -1
  52. package/{chunk-5Z7NTYAZ.js → chunk-TZRB2I2M.js} +14 -13
  53. package/{chunk-4UOFNBUR.js → chunk-VKSBVRGP.js} +1 -1
  54. package/{chunk-E5HKZ4TR.js → chunk-W3RZLXMA.js} +1 -1
  55. package/{chunk-EMEUU5IY.js → chunk-X7S7OFUX.js} +2 -2
  56. package/{chunk-IGQMIZ5L.js → chunk-XB7ACJFH.js} +2 -2
  57. package/{chunk-XY3V7K4L.js → chunk-XPW6JLOB.js} +22 -4
  58. package/{createAgentAutomationAction-OFRNHZWC.js → createAgentAutomationAction-5OZIWOK4.js} +12 -12
  59. package/{createDialogAction-2FF2JSWP.js → createDialogAction-334CHPJF.js} +13 -13
  60. package/{createPageAction-6MTVIU3J.js → createPageAction-LXY22WTA.js} +12 -12
  61. package/{dbSlice-XWUM4QOF.js → dbSlice-FWF5F4L7.js} +2 -2
  62. package/{dialogCommands-MMLBXSBC.js → dialogCommands-4MGUHAJI.js} +12 -12
  63. package/{dialogSlice-MONRO6AH.js → dialogSlice-76W7S3C4.js} +11 -11
  64. package/{docCreateCommands-K53AHACN.js → docCreateCommands-346W5443.js} +13 -13
  65. package/{docDeleteCommands-MJVGF67W.js → docDeleteCommands-FKEEPUUS.js} +13 -13
  66. package/{docReadCommands-VWNRVF6W.js → docReadCommands-AACI4DVO.js} +13 -13
  67. package/{docStore-A3UWWGMV.js → docStore-N7QTPHAX.js} +13 -13
  68. package/{docUpdateCommands-QUDD5TUR.js → docUpdateCommands-WHWVZ2XE.js} +13 -13
  69. package/{getPricing-AQ5MSXFO.js → getPricing-JNOCWYDH.js} +2 -2
  70. package/{handleSendMessageAction-6TQ7JM5X.js → handleSendMessageAction-EAXEX5AX.js} +11 -11
  71. package/index.js +47 -47
  72. package/{machineCommands-W7QEV6Q6.js → machineCommands-XNWLQVTN.js} +29 -29
  73. package/{machineWsRunDispatch-5P6X4WMI.js → machineWsRunDispatch-56HWQ67L.js} +29 -29
  74. package/package.json +1 -1
  75. package/{read-DQQ75VI3.js → read-J7RVVCHH.js} +1 -1
  76. package/{readDocTool-HCQQFAZD.js → readDocTool-G2WBM4IH.js} +1 -1
  77. package/{readlineWorkspace-PPPF6OCO.js → readlineWorkspace-AXTB7DJC.js} +142 -93
  78. package/{removeDialogAgentAction-DNONRKST.js → removeDialogAgentAction-RMPISD42.js} +4 -4
  79. package/{runAgentClientLoop-YBZTAE2J.js → runAgentClientLoop-PU3R3UXA.js} +23 -23
  80. package/{setDialogExtraReferencesAction-ERHUPT3F.js → setDialogExtraReferencesAction-7BUTHDAL.js} +3 -3
  81. package/{setPrimaryDialogAgentAction-6C2HYNEC.js → setPrimaryDialogAgentAction-WCYIBGZ4.js} +4 -4
  82. package/{settingSlice-YVRJFKQX.js → settingSlice-7NN2MI6Y.js} +3 -3
  83. package/{spaceCommands-FDZ4P33G.js → spaceCommands-JYI3X4N2.js} +12 -12
  84. package/{spaceSlice-NTZBL55S.js → spaceSlice-ERZ3RGWC.js} +12 -12
  85. package/{streamAgentChatTurn-N56LGQG4.js → streamAgentChatTurn-2IH4MTQC.js} +27 -27
  86. package/{switchDialogAgentAction-HP57XYFP.js → switchDialogAgentAction-WGMMQHDI.js} +2 -2
  87. package/{tools-GROQHVCL.js → tools-DJUTQEMP.js} +18 -18
  88. package/{tuiSummaryLlmCaller-32XPVSRB.js → tuiSummaryLlmCaller-U4EGD2SX.js} +8 -8
  89. package/{updateDialogTitleAction-WYAVJPLS.js → updateDialogTitleAction-OVOPGTC3.js} +12 -12
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-2PGAWTDB.js";
3
+ } from "./chunk-JBL24PK6.js";
4
4
  import {
5
5
  toErrorMessage
6
6
  } from "./chunk-HNMXYYJR.js";
@@ -28,7 +28,7 @@ import {
28
28
  readPageFunc,
29
29
  readPageFunctionSchema,
30
30
  slateToSimplifiedMarkdown
31
- } from "./chunk-FJHLA6SX.js";
31
+ } from "./chunk-5XCW6RQG.js";
32
32
  import {
33
33
  TASK_PREVIEW_MAX,
34
34
  buildDelegatedTaskContent,
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-INZZJSQF.js";
44
44
  import {
45
45
  createDocState
46
- } from "./chunk-KZCDMZ6M.js";
46
+ } from "./chunk-PJASTA2U.js";
47
47
  import {
48
48
  ToolApiError,
49
49
  buildToolRequestHeaders,
@@ -54,7 +54,7 @@ import {
54
54
  } from "./chunk-BANYWEYY.js";
55
55
  import {
56
56
  setDialogExtraReferencesAction
57
- } from "./chunk-2X5S4IBZ.js";
57
+ } from "./chunk-HCBQVVFZ.js";
58
58
  import {
59
59
  extractMentionsFromSlate
60
60
  } from "./chunk-MEYIRKDN.js";
@@ -70,7 +70,7 @@ import {
70
70
  buildBuiltinObjectSkillDbKey,
71
71
  buildBuiltinObjectSkillPageContent,
72
72
  createDialogAction
73
- } from "./chunk-XY3V7K4L.js";
73
+ } from "./chunk-XPW6JLOB.js";
74
74
  import {
75
75
  addCategory,
76
76
  addContentToSpace,
@@ -90,7 +90,7 @@ import {
90
90
  loadTableRows,
91
91
  updateContentCategory,
92
92
  updateContentTitle
93
- } from "./chunk-QPIMHSA5.js";
93
+ } from "./chunk-DFY6O64O.js";
94
94
  import {
95
95
  normalizeAppRouteId,
96
96
  resolveDialogRuntimeAgentKey,
@@ -100,13 +100,13 @@ import {
100
100
  selectMsgById,
101
101
  uiAskChoiceFunc,
102
102
  uiAskChoiceFunctionSchema
103
- } from "./chunk-6DYGT4IA.js";
103
+ } from "./chunk-PGKZ2KGE.js";
104
104
  import {
105
105
  createAgent,
106
106
  runLlm,
107
107
  streamAgentChatTurn,
108
108
  updateAgent
109
- } from "./chunk-EK6J2BLB.js";
109
+ } from "./chunk-KOZ2G3ZG.js";
110
110
  import {
111
111
  getActiveDialogKey,
112
112
  require_react,
@@ -151,10 +151,10 @@ import {
151
151
  } from "./chunk-IWUMSAQF.js";
152
152
  import {
153
153
  buildDatabaseFileContentUrl
154
- } from "./chunk-GK74OOFT.js";
154
+ } from "./chunk-HR5XDXYM.js";
155
155
  import {
156
156
  DEFAULT_MODEL
157
- } from "./chunk-UX4WJK6W.js";
157
+ } from "./chunk-BO3YFOZR.js";
158
158
  import {
159
159
  compactWhitespace
160
160
  } from "./chunk-DWLEOOGR.js";
@@ -167,7 +167,7 @@ import {
167
167
  } from "./chunk-O6OSWFZQ.js";
168
168
  import {
169
169
  shareResourceAction
170
- } from "./chunk-HGDOIDQ4.js";
170
+ } from "./chunk-SQTVMYMU.js";
171
171
  import {
172
172
  AGENT_UPDATE_FIELD_NAMES,
173
173
  nolotusId,
@@ -175,7 +175,7 @@ import {
175
175
  selectAutoApproveSelfUpdateFields,
176
176
  selectCurrentServer,
177
177
  selectSyncServers
178
- } from "./chunk-EMEUU5IY.js";
178
+ } from "./chunk-X7S7OFUX.js";
179
179
  import {
180
180
  asRecordOrEmpty
181
181
  } from "./chunk-KX6YBIHG.js";
@@ -183,7 +183,7 @@ import {
183
183
  addContentAction,
184
184
  createSpaceKey,
185
185
  normalizeSpaceId
186
- } from "./chunk-3EEK7T3D.js";
186
+ } from "./chunk-4RXXP6WD.js";
187
187
  import {
188
188
  patch,
189
189
  read,
@@ -192,7 +192,7 @@ import {
192
192
  selectById,
193
193
  toTimestampMs,
194
194
  write
195
- } from "./chunk-WVGEBWA6.js";
195
+ } from "./chunk-76UA7376.js";
196
196
  import {
197
197
  SEPARATOR,
198
198
  createAgentKey,
@@ -218,7 +218,7 @@ import {
218
218
  import {
219
219
  DEFAULT_CODE_PLANNER_EXECUTOR_CANDIDATE_KEYS,
220
220
  readAction
221
- } from "./chunk-Z5NW3O7V.js";
221
+ } from "./chunk-2JYSSXLY.js";
222
222
  import {
223
223
  extractCustomId
224
224
  } from "./chunk-BJIRLHJR.js";
@@ -12071,7 +12071,7 @@ var buildFormDataFromArgs = async (args) => {
12071
12071
  const trimmedModel = toTrimmedString(model);
12072
12072
  const trimmedProvider = toTrimmedString(provider);
12073
12073
  const modelConfig = await findModelConfig(trimmedModel, trimmedProvider);
12074
- const { getModelPricing } = await import("./getPricing-AQ5MSXFO.js");
12074
+ const { getModelPricing } = await import("./getPricing-JNOCWYDH.js");
12075
12075
  const normalizedTools = tools ?? [];
12076
12076
  const resolvedRuntimeToolPolicy = runtimeToolPolicy ?? (normalizedTools.includes("execShell") ? HOSTED_EXEC_RUNTIME_TOOL_POLICY : void 0);
12077
12077
  const formData = {
@@ -15385,7 +15385,7 @@ async function deleteDialogsFunc(args, thunkApi) {
15385
15385
  const deletedDialogIds = [];
15386
15386
  const deletedDialogKeys = [];
15387
15387
  const failures = [];
15388
- const { deleteDialog } = await import("./dialogSlice-MONRO6AH.js");
15388
+ const { deleteDialog } = await import("./dialogSlice-76W7S3C4.js");
15389
15389
  for (const target of targets) {
15390
15390
  try {
15391
15391
  await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
@@ -15680,7 +15680,7 @@ var readSkillDocFunctionSchema = {
15680
15680
  }
15681
15681
  };
15682
15682
  async function readSkillDocFunc(args, thunkApi) {
15683
- const { buildReadDocResult } = await import("./readDocTool-HCQQFAZD.js");
15683
+ const { buildReadDocResult } = await import("./readDocTool-G2WBM4IH.js");
15684
15684
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
15685
15685
  if (typeof id !== "string" || !id.trim()) {
15686
15686
  throw new Error("readSkillDoc requires id or doc.");
@@ -21135,7 +21135,7 @@ var selectUserIdFromState = (state) => typeof state?.auth?.currentUser?.userId =
21135
21135
  var selectCurrentServerFromState = (state) => typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : null;
21136
21136
  async function addImageContentToSpace(input) {
21137
21137
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
21138
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-SVSPUUK4.js")).addContentAction;
21138
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-5V5CCI3I.js")).addContentAction;
21139
21139
  await addContentAction2(
21140
21140
  {
21141
21141
  spaceId: input.spaceId,
@@ -24957,7 +24957,7 @@ var executeToolRun = createAsyncThunk(
24957
24957
  if (!executionInput) {
24958
24958
  throw new Error(`ToolRun ${id} has no input to execute with.`);
24959
24959
  }
24960
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-GROQHVCL.js");
24960
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-DJUTQEMP.js");
24961
24961
  const { executor } = findToolExecutor2(run.toolName);
24962
24962
  toolRunStarted({
24963
24963
  id: run.id,
@@ -24981,7 +24981,7 @@ var executeToolRun = createAsyncThunk(
24981
24981
  const latestState = thunkApi.getState();
24982
24982
  const userId = latestState.auth?.currentUser?.userId;
24983
24983
  if (userId) {
24984
- const { fetchUserSpaceMemberships } = await import("./spaceSlice-NTZBL55S.js");
24984
+ const { fetchUserSpaceMemberships } = await import("./spaceSlice-ERZ3RGWC.js");
24985
24985
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
24986
24986
  }
24987
24987
  }
@@ -27464,7 +27464,7 @@ async function updateDocFunc(args, thunkApi) {
27464
27464
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
27465
27465
  };
27466
27466
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
27467
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-A3UWWGMV.js");
27467
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-N7QTPHAX.js");
27468
27468
  if (getDocState().pageKey === id) {
27469
27469
  applyExternalDocUpdate({
27470
27470
  slateData: finalSlateData,
@@ -27489,7 +27489,7 @@ async function updateDocFunc(args, thunkApi) {
27489
27489
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
27490
27490
  async function dispatchSetSettings(thunkApi, changes) {
27491
27491
  const injectedSetSettings = thunkApi?.extra?.setSettings;
27492
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-YVRJFKQX.js")).setSettings;
27492
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-7NN2MI6Y.js")).setSettings;
27493
27493
  await thunkApi.dispatch(setSettings(changes)).unwrap();
27494
27494
  }
27495
27495
  var updateUserPreferenceProfileFunctionSchema = {
@@ -199,7 +199,7 @@ async function readDocFunc(args, thunkApi) {
199
199
  throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
200
200
  }
201
201
  try {
202
- const { readAction } = await import("./read-DQQ75VI3.js");
202
+ const { readAction } = await import("./read-J7RVVCHH.js");
203
203
  const pageData = await readAction({ dbKey: id }, thunkApi);
204
204
  if (!pageData) {
205
205
  throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
@@ -19,7 +19,7 @@ import {
19
19
  parseAgentRunEvent,
20
20
  t,
21
21
  toolLabel
22
- } from "./chunk-OTYXCO4M.js";
22
+ } from "./chunk-POLE2QLO.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-UL3AIGAQ.js";
55
+ } from "./chunk-5SLTA66C.js";
56
56
  import {
57
57
  isTransientFetchError
58
58
  } from "./chunk-5XTOKQLW.js";
@@ -74,12 +74,12 @@ import {
74
74
  chooseMemoryOwners,
75
75
  loadMemoryCandidatesFromDb,
76
76
  resolveAgentMemoryPolicy
77
- } from "./chunk-XY3V7K4L.js";
77
+ } from "./chunk-XPW6JLOB.js";
78
78
  import {
79
79
  API_REPORTED_COST_MULTIPLIER,
80
80
  normalizeUsage,
81
81
  parseUiAskChoiceContent
82
- } from "./chunk-6DYGT4IA.js";
82
+ } from "./chunk-PGKZ2KGE.js";
83
83
  import {
84
84
  getDefaultCliLocalRuntimeDb
85
85
  } from "./chunk-IA3A5373.js";
@@ -95,10 +95,10 @@ import {
95
95
  LOCAL_TURN_ABORTED_CODE,
96
96
  readActionGate,
97
97
  readCommandActionGatePayload
98
- } from "./chunk-D57WA7W3.js";
98
+ } from "./chunk-QTH72J3N.js";
99
99
  import {
100
100
  resolveAgentRuntimeConfigFromRecord
101
- } from "./chunk-4UOFNBUR.js";
101
+ } from "./chunk-VKSBVRGP.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-2PGAWTDB.js";
110
+ } from "./chunk-JBL24PK6.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-V5LQH25J.js";
117
+ } from "./chunk-F22JQTSX.js";
118
118
  import {
119
119
  clipCompactText
120
- } from "./chunk-GK74OOFT.js";
120
+ } from "./chunk-HR5XDXYM.js";
121
121
  import {
122
122
  findModelConfig
123
- } from "./chunk-UX4WJK6W.js";
123
+ } from "./chunk-BO3YFOZR.js";
124
124
  import {
125
125
  compactWhitespace
126
126
  } from "./chunk-DWLEOOGR.js";
@@ -159,7 +159,7 @@ import {
159
159
  BUILTIN_NOLO_AGENT_KEY,
160
160
  BUILTIN_NOLO_AGENT_NAME,
161
161
  builtinAgentCatalogEntryById
162
- } from "./chunk-Z5NW3O7V.js";
162
+ } from "./chunk-2JYSSXLY.js";
163
163
  import {
164
164
  parsePublicAgentId
165
165
  } from "./chunk-BJIRLHJR.js";
@@ -3717,7 +3717,7 @@ function tokenize(value, options) {
3717
3717
  }
3718
3718
 
3719
3719
  // packages/cli/client/toolOutput.ts
3720
- function normalizeToolDisplayMode(raw, fallback = "compact") {
3720
+ function normalizeToolDisplayMode(raw, fallback = "normal") {
3721
3721
  const normalized = asTrimmedLowercaseString(raw);
3722
3722
  if (normalized === "hide" || normalized === "off" || normalized === "false" || normalized === "0") {
3723
3723
  return "hide";
@@ -3725,8 +3725,11 @@ function normalizeToolDisplayMode(raw, fallback = "compact") {
3725
3725
  if (normalized === "verbose" || normalized === "debug" || normalized === "trace" || normalized === "full") {
3726
3726
  return "verbose";
3727
3727
  }
3728
- if (normalized === "compact" || normalized === "minimal" || normalized === "short") {
3729
- return "compact";
3728
+ if (normalized === "normal" || normalized === "summary" || normalized === "on") {
3729
+ return "normal";
3730
+ }
3731
+ if (normalized === "pro" || normalized === "compact" || normalized === "minimal" || normalized === "short") {
3732
+ return "pro";
3730
3733
  }
3731
3734
  return fallback;
3732
3735
  }
@@ -3738,7 +3741,7 @@ function resolveToolDisplayMode(env = process.env) {
3738
3741
  if (legacyTrace === "verbose" || legacyTrace === "full") {
3739
3742
  return "verbose";
3740
3743
  }
3741
- return normalizeToolDisplayMode(env.NOLO_CLI_TOOLS ?? env.NOLO_TOOLS, "compact");
3744
+ return normalizeToolDisplayMode(env.NOLO_CLI_TOOLS ?? env.NOLO_TOOLS, "normal");
3742
3745
  }
3743
3746
  function shouldEmitToolEvents(mode) {
3744
3747
  return mode !== "hide";
@@ -3752,6 +3755,9 @@ function formatActiveToolLabel(event) {
3752
3755
  const label = toolLabel(toolName);
3753
3756
  return args ? `${label} ${args}` : label;
3754
3757
  }
3758
+ function formatConservativeActiveToolLabel(event) {
3759
+ return toolLabel(event.toolName || "tool");
3760
+ }
3755
3761
  function compactResultHint(event) {
3756
3762
  const gate = readActionGate(event.metadata?.actionGate);
3757
3763
  if (gate) {
@@ -4160,6 +4166,36 @@ function formatVerboseToolEvent(event, colorEnabled) {
4160
4166
  colorEnabled
4161
4167
  );
4162
4168
  }
4169
+ function formatNormalToolLine(event, pending, colorEnabled) {
4170
+ if (event.type === "tool-call") return "";
4171
+ const toolName = event.toolName || pending?.toolName || "tool";
4172
+ const todoBlock = formatTodoListForCli(event, colorEnabled);
4173
+ if (todoBlock) return todoBlock;
4174
+ if (event.type === "tool-result" && (event.toolName === "ask_user" || event.metadata?.uiAskChoice)) {
4175
+ const block = formatUiAskChoiceBlock(event, colorEnabled);
4176
+ if (block) return block;
4177
+ }
4178
+ if (event.type === "tool-result" && (toolName === "listAgents" || toolName === "startAgentRun" || toolName === "controlAgentRun")) {
4179
+ return formatOrchestrationCardBlock(event, toolName, colorEnabled);
4180
+ }
4181
+ if (event.type === "tool-result" && toolName === "loadSkill") {
4182
+ return formatLoadSkillBlock(event, colorEnabled) ?? "";
4183
+ }
4184
+ const label = toolLabel(toolName);
4185
+ if (readActionGate(event.metadata?.actionGate)) {
4186
+ return formatToolTraceLine(`\u25B8 ${label} ! ${t("toolNeedsAction")}`, colorEnabled, "error");
4187
+ }
4188
+ if (event.type === "tool-error") {
4189
+ return formatToolTraceLine(`\u25B8 ${label} \u2717 ${t("toolFailed")}`, colorEnabled, "error");
4190
+ }
4191
+ if (event.metadata?.timedOut) {
4192
+ return formatToolTraceLine(`\u25B8 ${label} \u2717 ${t("toolTimedOut")}`, colorEnabled, "error");
4193
+ }
4194
+ if (isFailedToolResult(event)) {
4195
+ return formatToolTraceLine(`\u25B8 ${label} \u2717 ${t("toolFailed")}`, colorEnabled, "error");
4196
+ }
4197
+ return formatToolTraceLine(`\u25B8 ${label} \u2713`, colorEnabled);
4198
+ }
4163
4199
  function isReadToolName(name) {
4164
4200
  if (!name) return false;
4165
4201
  return name === "read" || name === "readFile" || name === "read_file" || name === "readWorkspaceFile";
@@ -4346,6 +4382,26 @@ function formatTodoListForCli(event, colorEnabled) {
4346
4382
  const text = [`\u2611 Todo (${todos.length})`, ...lines].join("\n") + "\n";
4347
4383
  return colorEnabled ? themeText(text, "chrome") : text;
4348
4384
  }
4385
+ function formatLoadSkillBlock(event, colorEnabled) {
4386
+ if (event.type !== "tool-result" || event.toolName !== "loadSkill") return null;
4387
+ const skillName = resolveLoadSkillName(event);
4388
+ const content = typeof event.content === "string" ? event.content : "";
4389
+ const failed = /^Skill\s+"[^"]*"\s+not found/.test(content) || isFailedToolResult(event);
4390
+ const labelText = t("usedSkillLabel");
4391
+ if (failed) {
4392
+ const message = clip(content.split("\n")[0] || t("toolFailed"), 96);
4393
+ return formatToolTraceLine(`\u25B8 ${labelText} (${skillName}) \u2717 ${message}`, colorEnabled, "error");
4394
+ }
4395
+ if (!colorEnabled) {
4396
+ return `\u2726 ${labelText}: ${skillName}
4397
+ `;
4398
+ }
4399
+ const star = themeText("\u2726", "success", true);
4400
+ const labelPart = themeText(labelText, "muted", true);
4401
+ const namePart = themeText(skillName, "chrome", true);
4402
+ return `${star} ${labelPart}: ${namePart}
4403
+ `;
4404
+ }
4349
4405
  function formatCompactToolLine(event, pending, colorEnabled) {
4350
4406
  const toolName = event.toolName || pending?.toolName || "tool";
4351
4407
  const todoBlock = formatTodoListForCli(event, colorEnabled);
@@ -4376,25 +4432,8 @@ function formatCompactToolLine(event, pending, colorEnabled) {
4376
4432
  const message = clip(event.message ?? t("toolFailed"), 96);
4377
4433
  return formatToolTraceLine(`\u25B8 ${label} \u2717 ${message}`, colorEnabled, "error");
4378
4434
  }
4379
- if (event.type === "tool-result" && toolName === "loadSkill") {
4380
- const skillName = resolveLoadSkillName(event);
4381
- const content = typeof event.content === "string" ? event.content : "";
4382
- const failed2 = /^Skill\s+"[^"]*"\s+not found/.test(content) || isFailedToolResult(event);
4383
- const labelText = t("usedSkillLabel");
4384
- if (failed2) {
4385
- const message = clip(content.split("\n")[0] || t("toolFailed"), 96);
4386
- return formatToolTraceLine(`\u25B8 ${labelText} (${skillName}) \u2717 ${message}`, colorEnabled, "error");
4387
- }
4388
- if (!colorEnabled) {
4389
- return `\u2726 ${labelText}: ${skillName}
4390
- `;
4391
- }
4392
- const star = themeText("\u2726", "success", true);
4393
- const labelPart = themeText(labelText, "muted", true);
4394
- const namePart = themeText(skillName, "chrome", true);
4395
- return `${star} ${labelPart}: ${namePart}
4396
- `;
4397
- }
4435
+ const loadSkillBlock = formatLoadSkillBlock(event, colorEnabled);
4436
+ if (loadSkillBlock) return loadSkillBlock;
4398
4437
  if (event.type === "tool-result" && (toolName === "listAgents" || toolName === "startAgentRun" || toolName === "controlAgentRun")) {
4399
4438
  return formatOrchestrationCardBlock(event, toolName, colorEnabled);
4400
4439
  }
@@ -4561,6 +4600,18 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled(),
4561
4600
  const formatter = (event) => {
4562
4601
  if (mode === "hide") return "";
4563
4602
  if (mode === "verbose") return formatVerboseToolEvent(event, colorEnabled);
4603
+ if (mode === "normal") {
4604
+ if (event.type === "tool-call") {
4605
+ pending.set(event.toolCallId, {
4606
+ toolName: event.toolName,
4607
+ argumentsPreview: event.argumentsPreview
4608
+ });
4609
+ return "";
4610
+ }
4611
+ const call2 = pending.get(event.toolCallId);
4612
+ pending.delete(event.toolCallId);
4613
+ return formatNormalToolLine(event, call2, colorEnabled);
4614
+ }
4564
4615
  if (event.toolName === "controlAgentRun") {
4565
4616
  if (event.type === "tool-call") {
4566
4617
  pending.set(event.toolCallId, {
@@ -4837,6 +4888,7 @@ ${this.text}
4837
4888
  };
4838
4889
 
4839
4890
  // packages/cli/client/agentRunOutput.ts
4891
+ var IDENTITY_LABEL_SEPARATOR = " > ";
4840
4892
  function formatCompactionSummaryLine(event) {
4841
4893
  if (!event) return "";
4842
4894
  const action = event.reason === "tool_stub" ? "stub \u5DE5\u5177\u8F93\u51FA" : "\u751F\u6210\u5386\u53F2\u6458\u8981";
@@ -4899,6 +4951,15 @@ function createCliTurnOutput(params) {
4899
4951
  let printedAssistantLabel = false;
4900
4952
  let thinkState = createThinkParserState();
4901
4953
  let compactionEvent = null;
4954
+ const assistantLabelManaged = options.output.assistantLabelManaged === true;
4955
+ const writeToolOutput = (chunk) => {
4956
+ if (!chunk) return;
4957
+ if (typeof options.output.writeToolBlock === "function") {
4958
+ options.output.writeToolBlock(chunk);
4959
+ } else {
4960
+ options.output.write(chunk);
4961
+ }
4962
+ };
4902
4963
  const renderWriter = createRenderAwareStreamWriter({
4903
4964
  write: (chunk) => options.output.write(chunk)
4904
4965
  });
@@ -4914,8 +4975,10 @@ function createCliTurnOutput(params) {
4914
4975
  spinner.stop();
4915
4976
  options.activityReporter?.(null);
4916
4977
  if (!printedAssistantLabel) {
4917
- options.output.write(`
4918
- ${options.agentName} > `);
4978
+ if (!assistantLabelManaged) {
4979
+ options.output.write(`
4980
+ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}`);
4981
+ }
4919
4982
  printedAssistantLabel = true;
4920
4983
  }
4921
4984
  streamedAssistantText = true;
@@ -4939,10 +5002,10 @@ ${options.agentName} > `);
4939
5002
  streamedAssistantText = false;
4940
5003
  }
4941
5004
  if (chunk) {
4942
- options.output.write(chunk);
5005
+ writeToolOutput(chunk);
4943
5006
  }
4944
- if (toolDisplayMode === "compact" && event.type === "tool-call") {
4945
- const activeLabel = formatActiveToolLabel(event);
5007
+ if ((toolDisplayMode === "compact" || toolDisplayMode === "pro" || toolDisplayMode === "normal") && event.type === "tool-call") {
5008
+ const activeLabel = toolDisplayMode === "normal" ? formatConservativeActiveToolLabel(event) : formatActiveToolLabel(event);
4946
5009
  spinner.show(activeLabel);
4947
5010
  options.activityReporter?.(activeLabel);
4948
5011
  }
@@ -4962,7 +5025,7 @@ ${options.agentName} > `);
4962
5025
  if (eventMode !== "jsonl" && formatToolEvent.flush) {
4963
5026
  const pendingToolOutput = formatToolEvent.flush();
4964
5027
  if (pendingToolOutput) {
4965
- options.output.write(pendingToolOutput);
5028
+ writeToolOutput(pendingToolOutput);
4966
5029
  }
4967
5030
  }
4968
5031
  writeVisibleAssistantChunk(chunk);
@@ -4990,7 +5053,7 @@ ${options.agentName} > `);
4990
5053
  }
4991
5054
  const pendingToolOutput = formatToolEvent.flush ? formatToolEvent.flush() : "";
4992
5055
  if (pendingToolOutput) {
4993
- options.output.write(pendingToolOutput);
5056
+ writeToolOutput(pendingToolOutput);
4994
5057
  }
4995
5058
  if (streamedAssistantText) {
4996
5059
  renderWriter.flush();
@@ -5000,13 +5063,18 @@ ${options.agentName} > `);
5000
5063
  } else {
5001
5064
  const content = fallbackContent ? formatAssistantResponseForCli(fallbackContent.trim()) : "";
5002
5065
  if (content) {
5003
- options.output.write(`
5004
- ${options.agentName} > ${content}
5005
- `);
5066
+ options.output.write(
5067
+ assistantLabelManaged ? `${content}
5068
+ ` : `
5069
+ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}${content}
5070
+ `
5071
+ );
5006
5072
  } else {
5007
- options.output.write(`
5008
- ${options.agentName} > (no text response)
5009
- `);
5073
+ options.output.write(
5074
+ assistantLabelManaged ? "(no text response)\n" : `
5075
+ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}(no text response)
5076
+ `
5077
+ );
5010
5078
  }
5011
5079
  }
5012
5080
  const compactionLine = formatCompactionSummaryLine(compactionEvent);
@@ -5444,9 +5512,65 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
5444
5512
  // packages/cli/client/agentRun.ts
5445
5513
  import { ulid } from "ulid";
5446
5514
  async function loadRunLocalAgentTurn() {
5447
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-BVUV26QD.js");
5515
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-RD52NPCG.js");
5448
5516
  return runLocalAgentTurn;
5449
5517
  }
5518
+ 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();
5519
+ function extractEmbeddedErrorMessage(message) {
5520
+ const match = /"message"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(message);
5521
+ if (!match) return void 0;
5522
+ try {
5523
+ const decoded = JSON.parse(`"${match[1]}"`);
5524
+ if (typeof decoded !== "string" || !decoded.trim()) return void 0;
5525
+ const cleaned = decoded.replace(/[\u0000-\u001f\u007f]/g, "");
5526
+ return cleaned.trim() ? cleaned : void 0;
5527
+ } catch {
5528
+ return void 0;
5529
+ }
5530
+ }
5531
+ function parseEmbeddedBalanceDetails(message) {
5532
+ const jsonStart = message.indexOf('{"error"');
5533
+ if (jsonStart < 0) return void 0;
5534
+ try {
5535
+ let depth = 0;
5536
+ let inString = false;
5537
+ let escaped = false;
5538
+ let jsonEnd = -1;
5539
+ for (let i = jsonStart; i < message.length; i += 1) {
5540
+ const char = message[i];
5541
+ if (inString) {
5542
+ if (escaped) escaped = false;
5543
+ else if (char === "\\") escaped = true;
5544
+ else if (char === '"') inString = false;
5545
+ } else if (char === '"') {
5546
+ inString = true;
5547
+ } else if (char === "{") {
5548
+ depth += 1;
5549
+ } else if (char === "}" && --depth === 0) {
5550
+ jsonEnd = i + 1;
5551
+ break;
5552
+ }
5553
+ }
5554
+ if (jsonEnd < 0) return void 0;
5555
+ const parsed = JSON.parse(message.slice(jsonStart, jsonEnd));
5556
+ if (!parsed || typeof parsed !== "object") return void 0;
5557
+ const error = parsed.error;
5558
+ if (!error || typeof error !== "object") return void 0;
5559
+ const details = error.details;
5560
+ if (!details || typeof details !== "object") return void 0;
5561
+ const requiredBalance = details.requiredBalance;
5562
+ const currentBalance = details.currentBalance;
5563
+ if (typeof requiredBalance !== "number" || typeof currentBalance !== "number") {
5564
+ return void 0;
5565
+ }
5566
+ if (!Number.isFinite(requiredBalance) || !Number.isFinite(currentBalance) || requiredBalance <= 0) {
5567
+ return void 0;
5568
+ }
5569
+ return { required: String(requiredBalance), current: String(currentBalance) };
5570
+ } catch {
5571
+ return void 0;
5572
+ }
5573
+ }
5450
5574
  async function resolveCurrentMachineId(options) {
5451
5575
  return options.currentMachineIdResolver ? options.currentMachineIdResolver(options.env) : detectCurrentMachineId(options.env);
5452
5576
  }
@@ -5677,7 +5801,6 @@ function describeLocalRunFailure(message, rawError) {
5677
5801
  busyDetail = rawError.detail.trim();
5678
5802
  }
5679
5803
  if (/PLATFORM_LLM_BUSY|服务器紧张/.test(message)) {
5680
- const stripDebugNoise = (s) => s.replace(/\s*raw=".*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
5681
5804
  const shown = stripDebugNoise(
5682
5805
  message.replace(/\s*\(PLATFORM_LLM_BUSY\)\s*$/, "")
5683
5806
  );
@@ -5688,7 +5811,18 @@ function describeLocalRunFailure(message, rawError) {
5688
5811
  if (/UPSTREAM_402|Insufficient Balance|余额不足|insufficient\s+balance/i.test(
5689
5812
  message
5690
5813
  )) {
5691
- return `${RUN_UNAVAILABLE_PREFIX} (${message}). ${NO_FALLBACK} Top up your balance, then send again (or say "\u7EE7\u7EED") \u2014 if a dialog was kept, context is preserved.
5814
+ const cleanedMessage = stripDebugNoise(message);
5815
+ const fallback = cleanedMessage.replace(
5816
+ /^[^:]*provider failed: HTTP \d{3}\s*/,
5817
+ ""
5818
+ );
5819
+ const balanceDetails = parseEmbeddedBalanceDetails(cleanedMessage);
5820
+ const shownMessage = balanceDetails ? t(
5821
+ "balanceInsufficientReason",
5822
+ balanceDetails.required,
5823
+ balanceDetails.current
5824
+ ) : extractEmbeddedErrorMessage(cleanedMessage) ?? fallback;
5825
+ return `[nolo] ${shownMessage}
5692
5826
  `;
5693
5827
  }
5694
5828
  const cls = classifyLocalRunError(message);
@@ -13,7 +13,7 @@ import {
13
13
  readAction,
14
14
  readRequestManager,
15
15
  resolveAgentReadServers
16
- } from "./chunk-Z5NW3O7V.js";
16
+ } from "./chunk-2JYSSXLY.js";
17
17
  import {
18
18
  asyncThunkCreator,
19
19
  buildCreateSlice,
@@ -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-DQQ75VI3.js");
710
+ const { readAction: readAction2 } = await import("./read-J7RVVCHH.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-FLLC2SIX.js");
784
+ const { shareResourceAction } = await import("./action-IU6ON7ZB.js");
785
785
  return shareResourceAction(config, thunkApi);
786
786
  }
787
787
  ),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelConfig
3
- } from "./chunk-UX4WJK6W.js";
3
+ } from "./chunk-BO3YFOZR.js";
4
4
  import {
5
5
  isPlatformHostedDeepseekModel,
6
6
  isPlatformHostedOpenAIImageModel,
@@ -18,6 +18,8 @@ var PLATFORM_CHAT_COMPLETIONS_ENDPOINTS = {
18
18
  fireworks: "https://api.fireworks.ai/inference/v1/chat/completions",
19
19
  google: "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",
20
20
  openai: "https://api.openai.com/v1/chat/completions",
21
+ // xAI 官方 OpenAI 兼容模式(平台托管 Grok)
22
+ xai: "https://api.x.ai/v1/chat/completions",
21
23
  openrouter: "https://openrouter.ai/api/v1/chat/completions",
22
24
  // 千问 AI 平台 OpenAI 兼容模式
23
25
  qwen: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-D45NILIX.js";
4
+ } from "./chunk-3YVCM5PE.js";
5
5
  import {
6
6
  toErrorMessage
7
7
  } from "./chunk-HNMXYYJR.js";