nolo-cli 0.12.0 → 0.14.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 (89) hide show
  1. package/{_executeModel-4F7VZR5U.js → _executeModel-SQVV6CXR.js} +27 -28
  2. package/{action-OTOWUMPW.js → action-Q5CBVUV5.js} +7 -7
  3. package/{addContentAction-JGBUVR7K.js → addContentAction-ZCJJ3XOL.js} +6 -6
  4. package/{addDialogAgentAction-V6CL2UCF.js → addDialogAgentAction-ROUQPBVI.js} +5 -5
  5. package/{agentDeleteCommand-MMRSG6AB.js → agentDeleteCommand-TSY5OSG7.js} +18 -18
  6. package/{agentEmailCommands-YFVKOGM7.js → agentEmailCommands-YX57M3P7.js} +34 -35
  7. package/{agentListCommands-2PZHIQ3I.js → agentListCommands-S65H4AVT.js} +19 -19
  8. package/{agentMachineCommands-55UUZNHF.js → agentMachineCommands-ELNLSTE4.js} +18 -18
  9. package/{agentRecordCommands-BTP3OAPL.js → agentRecordCommands-HVCGO2XK.js} +32 -33
  10. package/{agentRunCommand-WCO4B6VK.js → agentRunCommand-EOFDKKFI.js} +33 -35
  11. package/{agentRuntimeLocal-QDJCBXM2.js → agentRuntimeLocal-F4FWS5Z4.js} +16 -16
  12. package/{agentSlice-6JAJOU3X.js → agentSlice-R3WAV3VG.js} +7 -7
  13. package/{authCommand-DMW336GT.js → authCommand-O7SL3WW5.js} +4 -4
  14. package/{chunk-2BVGERJ2.js → chunk-2KNEWIDU.js} +106 -11
  15. package/{chunk-WVTBAALN.js → chunk-2MW6QFIQ.js} +2 -2
  16. package/{chunk-KWBH4RAL.js → chunk-3DKS6UER.js} +88 -29
  17. package/{chunk-3MI5LDDU.js → chunk-4GXQ74DF.js} +2 -2
  18. package/{chunk-4LG74DRG.js → chunk-4IJYA27C.js} +1 -1
  19. package/{chunk-TA7VKOHU.js → chunk-7H3O7ZA2.js} +6 -3
  20. package/{chunk-YUMYYXPI.js → chunk-7ULBTAQK.js} +16 -16
  21. package/{chunk-EIMX5ER5.js → chunk-ACPNKI3V.js} +7 -7
  22. package/{chunk-5V524MHX.js → chunk-AEMXZOAK.js} +14 -13
  23. package/{chunk-OPM2DE2J.js → chunk-AGUNTRZV.js} +4 -4
  24. package/{chunk-Y5P3ZRGC.js → chunk-BHKOPLWJ.js} +6 -6
  25. package/{chunk-IVAOVLM7.js → chunk-BOJVWKNA.js} +1 -1
  26. package/{chunk-MG6BVV3T.js → chunk-BRODTPXY.js} +170 -98
  27. package/{chunk-C3BFP57W.js → chunk-CANREHJB.js} +1 -1
  28. package/{chunk-DPFWKRHG.js → chunk-CFX7LP6W.js} +2 -2
  29. package/{chunk-QJSTNKJY.js → chunk-DSCG2DY5.js} +1 -1
  30. package/{chunk-JU7J7EAV.js → chunk-EC2EU2F4.js} +3 -3
  31. package/{chunk-VBSWHE5W.js → chunk-FLY6L3KA.js} +1 -1
  32. package/{chunk-MZHSAPZP.js → chunk-HXPBV44X.js} +33 -29
  33. package/{chunk-TQYYGE6G.js → chunk-IVOFAQ5R.js} +3 -3
  34. package/{chunk-WPHL6ALY.js → chunk-JTINRTBT.js} +1 -1
  35. package/{chunk-DHVDBZGS.js → chunk-K4S6CYKK.js} +39 -27
  36. package/{chunk-XHQWJUW4.js → chunk-NJVPXLRY.js} +1 -1
  37. package/{chunk-3XF6LCCN.js → chunk-O2S35KSZ.js} +2 -2
  38. package/{chunk-H5Y2H2N6.js → chunk-OIMX7MM4.js} +1 -1
  39. package/{chunk-5S4SWV5G.js → chunk-PB2DHBEQ.js} +1 -1
  40. package/{chunk-QUHUVG6Y.js → chunk-QRBZS6G4.js} +2 -2
  41. package/{chunk-RWO5DGXI.js → chunk-QV25QXE2.js} +3 -3
  42. package/{chunk-JFANOO7I.js → chunk-SJQVOEIV.js} +3 -3
  43. package/{chunk-CGDQDXKZ.js → chunk-TSJBYH7X.js} +1 -1
  44. package/{chunk-LUKQQJFL.js → chunk-UW3WOIWJ.js} +1 -1
  45. package/{chunk-VKG4HXYV.js → chunk-V6PGKRZC.js} +9 -9
  46. package/{chunk-ARSC56DC.js → chunk-XZY4TCZO.js} +1 -1
  47. package/{chunk-O4FOPRCP.js → chunk-YX4H7EP4.js} +1 -1
  48. package/{chunk-FSUZIGIG.js → chunk-ZEYSZ5WG.js} +76 -62
  49. package/{createAgentAutomationAction-4NY4JLOK.js → createAgentAutomationAction-LL2UAZL3.js} +13 -13
  50. package/{createDialogAction-I5WUWFJ6.js → createDialogAction-MSMUS4NO.js} +14 -15
  51. package/{createPageAction-HFTIQ7TW.js → createPageAction-MGN4CQWL.js} +13 -13
  52. package/{dbSlice-J4PUZ6Y5.js → dbSlice-35VY6LYX.js} +5 -5
  53. package/{deleteFile-M7UNIUOO.js → deleteFile-WPWVZE4B.js} +3 -3
  54. package/{dialogCommands-SVXRJFZS.js → dialogCommands-7EKKHEGO.js} +19 -19
  55. package/{dialogSlice-35LA3ZRG.js → dialogSlice-ZRYCGVVH.js} +13 -13
  56. package/{docCreateCommands-Z7RIAYKQ.js → docCreateCommands-YCU2BINI.js} +18 -18
  57. package/{docDeleteCommands-NEYHUVZF.js → docDeleteCommands-CEB54GNO.js} +19 -19
  58. package/{docReadCommands-I4US2SDE.js → docReadCommands-Z2OZTAIA.js} +18 -18
  59. package/{docStore-3CP2IO6M.js → docStore-AYLR7HES.js} +14 -14
  60. package/{docUpdateCommands-UU5HQBRP.js → docUpdateCommands-VU2TNBPM.js} +18 -18
  61. package/fetchMessages-KTNM7QAR.js +1 -1
  62. package/getPricing-UGDJHI7M.js +1 -1
  63. package/{handleSendMessageAction-FWTLQGOZ.js → handleSendMessageAction-D4UALBU5.js} +13 -13
  64. package/index.js +42 -42
  65. package/{machineCommands-STHZKBDJ.js → machineCommands-65QZPPET.js} +33 -34
  66. package/{machineWsRunDispatch-7YHT4TPT.js → machineWsRunDispatch-35QVFHKA.js} +31 -32
  67. package/package.json +1 -1
  68. package/{read-2MIMRBZ2.js → read-SIWMJRHC.js} +3 -3
  69. package/{readDocTool-QHVGQHUJ.js → readDocTool-TCYJY4PP.js} +1 -1
  70. package/{readlineWorkspace-KT3OV7JP.js → readlineWorkspace-U4PN6GH2.js} +95 -52
  71. package/{removeDialogAgentAction-XUZYQBV4.js → removeDialogAgentAction-DPSDJL5F.js} +7 -7
  72. package/{runAgentClientLoop-FP2K33ZO.js → runAgentClientLoop-HND2XKNI.js} +24 -25
  73. package/{setDialogExtraReferencesAction-PTAIFKGM.js → setDialogExtraReferencesAction-6UPTOPJA.js} +5 -5
  74. package/{setPrimaryDialogAgentAction-HRFTDB44.js → setPrimaryDialogAgentAction-PFDHN53I.js} +7 -7
  75. package/{settingSlice-VGRJUSE5.js → settingSlice-6M2BKFW5.js} +6 -6
  76. package/{spaceCommands-GN73BCOB.js → spaceCommands-NP75DOJW.js} +18 -18
  77. package/{spaceSlice-WTFNKOVA.js → spaceSlice-J44RNCGS.js} +13 -13
  78. package/{streamAgentChatTurn-HBAQQVNK.js → streamAgentChatTurn-MNBTNJDU.js} +44 -41
  79. package/{tools-TPQYTLQZ.js → tools-R2M77NZJ.js} +18 -19
  80. package/{tuiSummaryLlmCaller-XDC7WG4K.js → tuiSummaryLlmCaller-2D65LKWM.js} +3 -3
  81. package/{updateDialogTitleAction-AWXNPUQJ.js → updateDialogTitleAction-ERVV47T7.js} +13 -13
  82. package/chunk-HNW7IJSK.js +0 -71
  83. package/chunk-XENYHRUE.js +0 -104
  84. package/understanding-3CUQQ6SV.js +0 -271
  85. package/{chunk-PDL2AV3E.js → chunk-5CS33IBL.js} +3 -3
  86. package/{chunk-TSUJOM6N.js → chunk-DVRHHFEA.js} +3 -3
  87. package/{chunk-TOILAPLH.js → chunk-EHLHSX7R.js} +3 -3
  88. package/{chunk-TYPHUVK5.js → chunk-KTFJUPDW.js} +3 -3
  89. package/{chunk-NCGFB7NN.js → chunk-OIQPORYI.js} +3 -3
@@ -3,7 +3,7 @@ import {
3
3
  refreshAntigravityOAuthToken,
4
4
  refreshOpenAiCodexToken,
5
5
  refreshXaiOAuthToken
6
- } from "./chunk-TOILAPLH.js";
6
+ } from "./chunk-EHLHSX7R.js";
7
7
  import {
8
8
  CliProviderQuotaError,
9
9
  executeCli
@@ -12,7 +12,7 @@ import {
12
12
  buildLocalAgentLookupKeys,
13
13
  normalizeAgentHandle,
14
14
  shouldReadAgentKeyRemotely
15
- } from "./chunk-VBSWHE5W.js";
15
+ } from "./chunk-FLY6L3KA.js";
16
16
  import {
17
17
  LOCAL_CODEX_AGENT_ID,
18
18
  LOCAL_CODEX_AGENT_KEY,
@@ -21,20 +21,20 @@ import {
21
21
  } from "./chunk-VHBWHNVT.js";
22
22
  import {
23
23
  inferCaptureIntent
24
- } from "./chunk-QJSTNKJY.js";
24
+ } from "./chunk-DSCG2DY5.js";
25
25
  import {
26
26
  buildCliPrompt
27
27
  } from "./chunk-ATNTHIZI.js";
28
28
  import {
29
29
  inlineImageUrlsForCustomProvider,
30
30
  prepareTools
31
- } from "./chunk-C3BFP57W.js";
31
+ } from "./chunk-CANREHJB.js";
32
32
  import {
33
33
  getAntigravityUserAgent,
34
34
  isAntigravityOAuthAgent,
35
35
  readAntigravityProjectId,
36
36
  resolveAntigravityCloudCodeBaseUrl
37
- } from "./chunk-H5Y2H2N6.js";
37
+ } from "./chunk-OIMX7MM4.js";
38
38
  import {
39
39
  FORCED_TOOLS,
40
40
  addDefaultLightWebToolsForConfiguredAgents,
@@ -49,8 +49,9 @@ import {
49
49
  readXPostFunc,
50
50
  readXPostFunctionSchema,
51
51
  readXhsProfileFunc,
52
- readXhsProfileFunctionSchema
53
- } from "./chunk-MZHSAPZP.js";
52
+ readXhsProfileFunctionSchema,
53
+ rememberMemoryFunctionSchema
54
+ } from "./chunk-HXPBV44X.js";
54
55
  import {
55
56
  createDrainExhaustedResponse,
56
57
  isCoreDrainingBody,
@@ -62,13 +63,13 @@ import {
62
63
  } from "./chunk-OWOHNGCN.js";
63
64
  import {
64
65
  prepareTokenUsageData
65
- } from "./chunk-FSUZIGIG.js";
66
+ } from "./chunk-ZEYSZ5WG.js";
66
67
  import {
67
68
  BUILTIN_TITLE_LLM_CONFIG
68
69
  } from "./chunk-V2J635L5.js";
69
70
  import {
70
71
  fetchServerSyncedCredential
71
- } from "./chunk-Y5P3ZRGC.js";
72
+ } from "./chunk-BHKOPLWJ.js";
72
73
  import {
73
74
  buildAgentRuntimeDialogWritePlan,
74
75
  buildLocalWorkspaceOpenAiTools,
@@ -81,7 +82,7 @@ import {
81
82
  parseSseDataLineJson,
82
83
  readOpenAiCompatibleSseCompletion,
83
84
  resolveOpenAiCompatibleProviderConfig
84
- } from "./chunk-MG6BVV3T.js";
85
+ } from "./chunk-BRODTPXY.js";
85
86
  import {
86
87
  buildPlatformChatCompletionRequest,
87
88
  canUsePlatformChatProvider,
@@ -91,14 +92,14 @@ import {
91
92
  resolveLegacyDeepSeekProxyChatFallback,
92
93
  resolvePlatformChatProviderConfig,
93
94
  shouldUsePlatformChatProvider
94
- } from "./chunk-5S4SWV5G.js";
95
+ } from "./chunk-PB2DHBEQ.js";
95
96
  import {
96
97
  resolveAgentRuntimeConfigFromRecord
97
- } from "./chunk-NCGFB7NN.js";
98
+ } from "./chunk-OIQPORYI.js";
98
99
  import {
99
100
  parseToolArgumentsJson,
100
101
  summarizeToolArguments
101
- } from "./chunk-TA7VKOHU.js";
102
+ } from "./chunk-7H3O7ZA2.js";
102
103
  import {
103
104
  buildLoadSkillExecutor,
104
105
  buildNoloWorkspaceCliToolExecutors,
@@ -115,13 +116,16 @@ import {
115
116
  resolveCurrentRunRuntimeToolPolicy,
116
117
  resolveLocalWorkspaceExecutorOptionsFromPolicy,
117
118
  resolveRequestedRuntimeToolNames
118
- } from "./chunk-PDL2AV3E.js";
119
+ } from "./chunk-5CS33IBL.js";
119
120
  import {
120
121
  createOAuthTokenStore,
121
122
  isTokenExpired,
122
123
  readOAuthCredential,
123
124
  resolveFreshAccessToken
124
125
  } from "./chunk-JZPBVBIY.js";
126
+ import {
127
+ compactWhitespace
128
+ } from "./chunk-DWLEOOGR.js";
125
129
  import {
126
130
  checkStaleRun,
127
131
  finalizeRunRecord,
@@ -135,9 +139,6 @@ import {
135
139
  import {
136
140
  getDefaultCliLocalRuntimeDb
137
141
  } from "./chunk-H33743XH.js";
138
- import {
139
- compactWhitespace
140
- } from "./chunk-DWLEOOGR.js";
141
142
  import {
142
143
  asRecordOrEmpty
143
144
  } from "./chunk-KX6YBIHG.js";
@@ -158,13 +159,13 @@ import {
158
159
  PUBLIC_GLM_52_AGENT_KEY,
159
160
  PUBLIC_KIMI_K26_IMAGE_AGENT_KEY,
160
161
  PUBLIC_KIMI_K27_CODING_AGENT_KEY
161
- } from "./chunk-XHQWJUW4.js";
162
- import {
163
- isRecord
164
- } from "./chunk-KUG52IAP.js";
162
+ } from "./chunk-NJVPXLRY.js";
165
163
  import {
166
164
  asTrimmedString
167
165
  } from "./chunk-3EUW3WEO.js";
166
+ import {
167
+ isRecord
168
+ } from "./chunk-KUG52IAP.js";
168
169
  import {
169
170
  isCompiledBinary,
170
171
  parseUserIdFromAuthToken
@@ -287,6 +288,14 @@ var STRINGS = {
287
288
  en: "queued",
288
289
  zh: "\u6392\u961F"
289
290
  },
291
+ flushQueuedIdleHint: {
292
+ en: "Flushed {0} queued messages as one.",
293
+ zh: "\u5DF2\u628A {0} \u6761\u6392\u961F\u6D88\u606F\u5408\u5E76\u53D1\u9001\u3002"
294
+ },
295
+ flushQueuedBusyHint: {
296
+ en: "Stopped this reply and flushed {0} queued messages as one.",
297
+ zh: "\u5DF2\u505C\u6B62\u5F53\u524D\u56DE\u590D\uFF0C\u5E76\u628A {0} \u6761\u6392\u961F\u6D88\u606F\u5408\u5E76\u53D1\u9001\u3002"
298
+ },
290
299
  turnStopped: {
291
300
  en: "Stopped this reply.",
292
301
  zh: "\u5DF2\u505C\u6B62\u672C\u6B21\u56DE\u590D\u3002"
@@ -1802,6 +1811,10 @@ var LOCAL_SERVER_WEB_TOOL_NAMES = ["fetchWebpage", "exa_search"];
1802
1811
  var LOCAL_SERVER_WEB_TOOL_NAME_SET = new Set(
1803
1812
  LOCAL_SERVER_WEB_TOOL_NAMES
1804
1813
  );
1814
+ var LOCAL_SERVER_MEMORY_TOOL_NAMES = ["rememberMemory"];
1815
+ var LOCAL_SERVER_MEMORY_TOOL_NAME_SET = new Set(
1816
+ LOCAL_SERVER_MEMORY_TOOL_NAMES
1817
+ );
1805
1818
 
1806
1819
  // packages/core/fetchWebpageShaping.ts
1807
1820
  var FETCH_WEBPAGE_PREVIEW_LENGTH = 1200;
@@ -1909,7 +1922,7 @@ async function fetchWebpageLocally(args) {
1909
1922
 
1910
1923
  // packages/cli/client/cliServerPlatformToolExecutors.ts
1911
1924
  function buildServerPlatformToolExecutors(args) {
1912
- const postServer = async (path, body) => {
1925
+ const postServer = async (path, body, opts) => {
1913
1926
  const serverUrl = resolveRuntimeServerUrl(args.env);
1914
1927
  const authToken = resolveRuntimeAuthToken(args.env);
1915
1928
  if (!serverUrl)
@@ -1920,14 +1933,16 @@ function buildServerPlatformToolExecutors(args) {
1920
1933
  throw new Error(
1921
1934
  "server platform tools require AUTH_TOKEN or NOLO_MACHINE_API_KEY."
1922
1935
  );
1923
- const response = await args.fetchImpl(`${serverUrl}${path}`, {
1936
+ const url = `${serverUrl}${path}`;
1937
+ const init = {
1924
1938
  method: "POST",
1925
1939
  headers: {
1926
1940
  "Content-Type": "application/json",
1927
1941
  Authorization: `Bearer ${authToken}`
1928
1942
  },
1929
1943
  body: JSON.stringify(body)
1930
- });
1944
+ };
1945
+ const response = opts?.retryTransient ? await fetchWithTransientRetry(args.fetchImpl, url, init) : await args.fetchImpl(url, init);
1931
1946
  const text = await response.text().catch(() => "");
1932
1947
  if (!response.ok) {
1933
1948
  throw new Error(
@@ -2028,7 +2043,33 @@ function buildServerPlatformToolExecutors(args) {
2028
2043
  }
2029
2044
  ])
2030
2045
  );
2031
- return { ...tableExecutors, ...webExecutors };
2046
+ const rememberMemory = async (call) => {
2047
+ const parsed = parseNoloWorkspaceToolArguments(call.arguments);
2048
+ const content = typeof parsed.content === "string" ? parsed.content.trim() : "";
2049
+ if (!content) {
2050
+ return {
2051
+ content: JSON.stringify({
2052
+ error: "rememberMemory \u9700\u8981\u975E\u7A7A content\u3002"
2053
+ }),
2054
+ metadata: { serverPlatformTool: true, memoryWrite: false }
2055
+ };
2056
+ }
2057
+ const body = {
2058
+ content,
2059
+ scope: parsed.scope ?? "auto",
2060
+ kind: parsed.kind ?? "episodic",
2061
+ source: "agent-inferred"
2062
+ };
2063
+ if (args.agentKey) body.agentKey = args.agentKey;
2064
+ const raw = await postServer("/api/memory/remember", body, {
2065
+ retryTransient: true
2066
+ });
2067
+ return {
2068
+ content: raw,
2069
+ metadata: { serverPlatformTool: true, memoryWrite: true }
2070
+ };
2071
+ };
2072
+ return { ...tableExecutors, ...webExecutors, rememberMemory };
2032
2073
  }
2033
2074
 
2034
2075
  // packages/cli/client/cliAgentRunToolExecutors.ts
@@ -2149,6 +2190,15 @@ function createCliControlAgentRunExecutor(deps = {}) {
2149
2190
  startedAt: reconciled.startedAt,
2150
2191
  endedAt: reconciled.endedAt ?? null,
2151
2192
  exitCode: reconciled.exitCode ?? null,
2193
+ // Expose dialogId so the caller can read the agent's actual output
2194
+ // via `nolo dialog read <dialogId>`. The dialog is the authoritative
2195
+ // result store; the run log is the child process stdout/stderr,
2196
+ // whose contents vary by provider (some stream tokens to stdout,
2197
+ // some only emit startup + stderr). Because status does not carry
2198
+ // logTail by default, a "done" run with an empty logTail is
2199
+ // indistinguishable from a hung run without this field. Surfacing
2200
+ // dialogId gives the caller a reliable way to fetch the result.
2201
+ ...reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
2152
2202
  ...logTail !== void 0 ? { logTail } : {},
2153
2203
  ...logLines ? { logLines } : {}
2154
2204
  }),
@@ -2243,7 +2293,8 @@ function buildLocalToolExecutors(args) {
2243
2293
  }),
2244
2294
  ...buildServerPlatformToolExecutors({
2245
2295
  env: args.env,
2246
- fetchImpl: args.fetchImpl
2296
+ fetchImpl: args.fetchImpl,
2297
+ agentKey: args.agentKey
2247
2298
  }),
2248
2299
  ...buildCliWorkspaceToolExecutors({
2249
2300
  env: args.env,
@@ -9331,6 +9382,12 @@ function buildServerPlatformOpenAiTools(args) {
9331
9382
  )
9332
9383
  );
9333
9384
  return [
9385
+ ...toolNameSet.has("rememberMemory") ? [
9386
+ {
9387
+ type: "function",
9388
+ function: rememberMemoryFunctionSchema
9389
+ }
9390
+ ] : [],
9334
9391
  ...toolNameSet.has("read_xhs_profile") ? [
9335
9392
  {
9336
9393
  type: "function",
@@ -9788,17 +9845,19 @@ function createCliLocalRuntimeAdapter(deps) {
9788
9845
  ...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {},
9789
9846
  ...deps.requestUserChoice ? { requestUserChoice: deps.requestUserChoice } : {},
9790
9847
  ...deps.pastedTextStore ? { pastedTextStore: deps.pastedTextStore } : {},
9848
+ agentKey: agentConfig?.key,
9791
9849
  ...runtimeToolExecutionLimits
9792
9850
  });
9793
- if (agentConfig && !deps.pastedTextStore) {
9851
+ const exposedAgentConfig = agentConfig ? { ...agentConfig, exposedToolNames: activeAgentToolNames } : agentConfig;
9852
+ if (exposedAgentConfig && !deps.pastedTextStore) {
9794
9853
  preparedAgentRuntimeCache.set(cacheKey, {
9795
- agentConfig,
9854
+ agentConfig: exposedAgentConfig,
9796
9855
  activeAgentToolNames,
9797
9856
  runtimeToolExecutionLimits,
9798
9857
  localToolExecutors
9799
9858
  });
9800
9859
  }
9801
- return agentConfig;
9860
+ return exposedAgentConfig;
9802
9861
  },
9803
9862
  loadDialogHistory: async (dialogId) => readDialogMessages({
9804
9863
  dialogId,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-CGDQDXKZ.js";
4
+ } from "./chunk-TSJBYH7X.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-VC6OZXO5.js";
11
11
  import {
12
12
  createSpaceKey
13
- } from "./chunk-WVTBAALN.js";
13
+ } from "./chunk-2MW6QFIQ.js";
14
14
  import {
15
15
  asTrimmedLowercaseString
16
16
  } from "./chunk-QSJ3HFEF.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-TOILAPLH.js";
4
+ } from "./chunk-EHLHSX7R.js";
5
5
  import {
6
6
  toErrorMessage
7
7
  } from "./chunk-HNMXYYJR.js";
@@ -2,7 +2,7 @@ import {
2
2
  buildCurrentTimeBlock,
3
3
  buildIdentityBlock,
4
4
  buildRuntimeGuidanceBlocks
5
- } from "./chunk-LUKQQJFL.js";
5
+ } from "./chunk-UW3WOIWJ.js";
6
6
  import {
7
7
  canonicalizeToolNames
8
8
  } from "./chunk-B4KT7RN2.js";
@@ -12,7 +12,7 @@ import {
12
12
  planCompression,
13
13
  planContextUsage,
14
14
  serializeMessageContent
15
- } from "./chunk-JFANOO7I.js";
15
+ } from "./chunk-SJQVOEIV.js";
16
16
  import {
17
17
  clipCompactText
18
18
  } from "./chunk-5MMAK75Q.js";
@@ -818,6 +818,7 @@ var TOOL_METADATA_KEYS = [
818
818
  "code",
819
819
  "error",
820
820
  "message",
821
+ "warnings",
821
822
  "pasteId",
822
823
  "source"
823
824
  ];
@@ -1171,7 +1172,9 @@ async function runLocalAgentTurn(input) {
1171
1172
  agentId: agentConfig.key,
1172
1173
  model: agentConfig.model
1173
1174
  });
1174
- const agentTools = canonicalizeToolNames(agentConfig.toolNames ?? []);
1175
+ const agentTools = canonicalizeToolNames(
1176
+ agentConfig.exposedToolNames ?? agentConfig.toolNames ?? []
1177
+ );
1175
1178
  const guidanceBlocks = buildRuntimeGuidanceBlocks(agentTools);
1176
1179
  const guidanceScopes = [
1177
1180
  guidanceBlocks.startupProtocol,
@@ -5,10 +5,13 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-C3BFP57W.js";
8
+ } from "./chunk-CANREHJB.js";
9
9
  import {
10
10
  performFetchRequest
11
- } from "./chunk-5V524MHX.js";
11
+ } from "./chunk-AEMXZOAK.js";
12
+ import {
13
+ getPublicImageAgentMode
14
+ } from "./chunk-VIDPVFP3.js";
12
15
  import {
13
16
  createSSEParser,
14
17
  createToolRunId,
@@ -19,23 +22,20 @@ import {
19
22
  toolRunSetPending,
20
23
  toolRunStarted,
21
24
  toolRunSucceeded
22
- } from "./chunk-MZHSAPZP.js";
23
- import {
24
- getPublicImageAgentMode
25
- } from "./chunk-VIDPVFP3.js";
25
+ } from "./chunk-HXPBV44X.js";
26
26
  import {
27
27
  addToolMessage,
28
28
  messageStreamEnd,
29
29
  messageStreaming,
30
30
  selectCurrentSpaceId,
31
31
  updateToolMessage
32
- } from "./chunk-FSUZIGIG.js";
32
+ } from "./chunk-ZEYSZ5WG.js";
33
33
  import {
34
34
  streamAgentChatTurn
35
- } from "./chunk-Y5P3ZRGC.js";
35
+ } from "./chunk-BHKOPLWJ.js";
36
36
  import {
37
37
  EMPTY_ASSISTANT_REPAIR_PROMPT
38
- } from "./chunk-TA7VKOHU.js";
38
+ } from "./chunk-7H3O7ZA2.js";
39
39
  import {
40
40
  accumulateToolCallDelta,
41
41
  createThinkParserState,
@@ -44,7 +44,7 @@ import {
44
44
  } from "./chunk-3WGLLTK4.js";
45
45
  import {
46
46
  getModelInfo
47
- } from "./chunk-JFANOO7I.js";
47
+ } from "./chunk-SJQVOEIV.js";
48
48
  import {
49
49
  getApiEndpoint
50
50
  } from "./chunk-OGGHETUE.js";
@@ -61,10 +61,10 @@ import {
61
61
  } from "./chunk-HNMXYYJR.js";
62
62
  import {
63
63
  selectCurrentServer
64
- } from "./chunk-JU7J7EAV.js";
64
+ } from "./chunk-EC2EU2F4.js";
65
65
  import {
66
66
  write
67
- } from "./chunk-VKG4HXYV.js";
67
+ } from "./chunk-V6PGKRZC.js";
68
68
  import {
69
69
  createDialogMessageKeyAndId,
70
70
  dialogMessageKey,
@@ -73,16 +73,16 @@ import {
73
73
  import {
74
74
  createAsyncThunk,
75
75
  selectIdentityToken
76
- } from "./chunk-TSUJOM6N.js";
76
+ } from "./chunk-DVRHHFEA.js";
77
77
  import {
78
78
  isAbortError
79
79
  } from "./chunk-OOSFSFMA.js";
80
- import {
81
- isRecord
82
- } from "./chunk-KUG52IAP.js";
83
80
  import {
84
81
  asTrimmedString
85
82
  } from "./chunk-3EUW3WEO.js";
83
+ import {
84
+ isRecord
85
+ } from "./chunk-KUG52IAP.js";
86
86
  import {
87
87
  asOptionalTrimmedString
88
88
  } from "./chunk-G3SUCT4W.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-KWBH4RAL.js";
4
+ } from "./chunk-3DKS6UER.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-MZHSAPZP.js";
7
+ } from "./chunk-HXPBV44X.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-TA7VKOHU.js";
10
+ } from "./chunk-7H3O7ZA2.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
- } from "./chunk-PDL2AV3E.js";
13
+ } from "./chunk-5CS33IBL.js";
14
14
  import {
15
15
  toErrorMessage
16
16
  } from "./chunk-HNMXYYJR.js";
@@ -24,15 +24,15 @@ import {
24
24
  import {
25
25
  asTrimmedNonEmptyStringArray
26
26
  } from "./chunk-I42VC5KR.js";
27
- import {
28
- isRecord
29
- } from "./chunk-KUG52IAP.js";
30
27
  import {
31
28
  asTrimmedString
32
29
  } from "./chunk-3EUW3WEO.js";
33
30
  import {
34
31
  asOptionalPositiveFiniteNumber
35
32
  } from "./chunk-U6VC4MU4.js";
33
+ import {
34
+ isRecord
35
+ } from "./chunk-KUG52IAP.js";
36
36
  import {
37
37
  parseUserIdFromAuthToken
38
38
  } from "./chunk-5NBHQD4D.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
3
3
  isAntigravityOAuthAgent
4
- } from "./chunk-H5Y2H2N6.js";
4
+ } from "./chunk-OIMX7MM4.js";
5
5
  import {
6
6
  clipMultilineText,
7
7
  fetchAndSerializeTable,
8
8
  waitForAbortableDelay
9
- } from "./chunk-MZHSAPZP.js";
9
+ } from "./chunk-HXPBV44X.js";
10
10
  import {
11
11
  createDrainExhaustedResponse,
12
12
  isCoreDrainingBody,
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-RQSOAMPJ.js";
17
17
  import {
18
18
  slateToSimplifiedMarkdown
19
- } from "./chunk-IVAOVLM7.js";
19
+ } from "./chunk-BOJVWKNA.js";
20
20
  import {
21
21
  extractCategorizedMentions
22
22
  } from "./chunk-VP4WJWKW.js";
@@ -26,17 +26,17 @@ import {
26
26
  import {
27
27
  fetchAndCacheMessages,
28
28
  shouldUseServerProxy
29
- } from "./chunk-FSUZIGIG.js";
29
+ } from "./chunk-ZEYSZ5WG.js";
30
30
  import {
31
31
  fetchServerSyncedCredential
32
- } from "./chunk-Y5P3ZRGC.js";
32
+ } from "./chunk-BHKOPLWJ.js";
33
33
  import {
34
34
  buildCurrentTimeBlock,
35
35
  buildIdentityBlock,
36
36
  buildRuntimeGuidanceBlocks,
37
37
  requiresBareImageUrl,
38
38
  toBareImageUrlMessages
39
- } from "./chunk-LUKQQJFL.js";
39
+ } from "./chunk-UW3WOIWJ.js";
40
40
  import {
41
41
  buildProviderAuthHeaders,
42
42
  convertMessagesToResponsesInput,
@@ -44,13 +44,13 @@ import {
44
44
  preserveAgentStateFields,
45
45
  resolvePlatformChatCompletionsEndpoint,
46
46
  resolvePlatformResponsesEndpoint
47
- } from "./chunk-TYPHUVK5.js";
47
+ } from "./chunk-KTFJUPDW.js";
48
48
  import {
49
49
  canonicalizeToolNames
50
50
  } from "./chunk-B4KT7RN2.js";
51
51
  import {
52
52
  estimateTokenCount
53
- } from "./chunk-JFANOO7I.js";
53
+ } from "./chunk-SJQVOEIV.js";
54
54
  import {
55
55
  clampReasoningEffort,
56
56
  getModelConfig,
@@ -58,7 +58,7 @@ import {
58
58
  } from "./chunk-OGGHETUE.js";
59
59
  import {
60
60
  createFileCredentialBroker
61
- } from "./chunk-PDL2AV3E.js";
61
+ } from "./chunk-5CS33IBL.js";
62
62
  import {
63
63
  MEMORY_USE_GUIDANCE,
64
64
  wrapHistoricalSummaryWithReplayGuard
@@ -76,10 +76,10 @@ import {
76
76
  } from "./chunk-524BDL33.js";
77
77
  import {
78
78
  createSpaceKey
79
- } from "./chunk-WVTBAALN.js";
79
+ } from "./chunk-2MW6QFIQ.js";
80
80
  import {
81
81
  read
82
- } from "./chunk-VKG4HXYV.js";
82
+ } from "./chunk-V6PGKRZC.js";
83
83
  import {
84
84
  asNonEmptyStringArray
85
85
  } from "./chunk-I42VC5KR.js";
@@ -88,7 +88,7 @@ import {
88
88
  } from "./chunk-QSJ3HFEF.js";
89
89
  import {
90
90
  getRuntimeServerContext
91
- } from "./chunk-TSUJOM6N.js";
91
+ } from "./chunk-DVRHHFEA.js";
92
92
  import {
93
93
  isAbortError
94
94
  } from "./chunk-OOSFSFMA.js";
@@ -827,8 +827,9 @@ var KNOWLEDGE_MANAGEMENT_INSTRUCTIONS = `--- \u77E5\u8BC6\u7BA1\u7406 ---
827
827
  \u4F55\u65F6\u6C89\u6DC0\uFF1A\u7528\u6237\u7ED9\u4E86\u53EF\u590D\u7528\u4FE1\u606F / \u5B8C\u6210\u6709\u4EF7\u503C\u8C03\u7814 \u2192 createDoc\uFF08\u5E76 updateAgent \u52A0\u5165 references\uFF09\uFF1B\u7D22\u5F15\u7F3A\u5165\u53E3 \u2192 updateDoc \u8865 @mention\u3002\u4E0D\u8981\u628A\u4E00\u6B21\u6027\u5185\u5BB9\u5199\u6210\u77E5\u8BC6\u9875\u3002`;
828
828
  var MEMORY_CAPTURE_INSTRUCTIONS = `--- \u957F\u671F\u8BB0\u5FC6 ---
829
829
  \u4F60\u53EF\u7528 rememberMemory \u628A\u503C\u5F97\u957F\u671F\u4FDD\u7559\u7684\u4FE1\u606F\u5199\u6210\u4E00\u6761 episodic memory\u3002
830
+ - \u9ED8\u8BA4\u5C31\u8BB0\uFF08\u4E0D\u8981\u53CD\u590D\u81EA\u95EE\u662F\u5426\u591F\u683C\uFF09\uFF1A\u7528\u6237\u8BF4\u51FA\u300C\u8BB0\u4F4F/\u8BB0\u5F97/\u522B\u5FD8\u4E86/\u4EE5\u540E\u90FD/\u4E0B\u6B21/\u522B\u518D/\u6211\u559C\u6B22/\u6211\u4E0D\u559C\u6B22/\u6211\u4E60\u60EF\u300D\u8FD9\u7C7B\u8BDD\u65F6\uFF0C\u76F4\u63A5\u8C03\u7528 rememberMemory\u3002\u7528\u6237\u8868\u8FBE\u5BF9\u56DE\u590D\u65B9\u5F0F\u7684\u8981\u6C42\uFF08\u7BC7\u5E45\u3001\u7ED3\u6784\u3001\u8BED\u6C14\u3001\u79F0\u547C\u3001\u8BE6\u7565\uFF09\u540C\u6837\u9ED8\u8BA4\u8BB0\u4E0B\u2014\u2014\u8FD9\u7C7B\u504F\u597D\u6B63\u662F\u8DE8\u5BF9\u8BDD\u6700\u8BE5\u590D\u7528\u7684\u3002
830
831
  - \u8BB0\u5F55\uFF1A\u7A33\u5B9A\u4E14\u5BF9\u672A\u6765\u534F\u4F5C\u6709\u5E2E\u52A9\u7684\u7528\u6237\u504F\u597D/\u5224\u65AD\u6807\u51C6/\u4FE1\u606F\u7EC4\u7EC7\u4E60\u60EF/\u573A\u666F\u5316\u6289\u62E9\uFF1B\u540E\u7EED\u53CD\u590D\u7528\u5230\u7684\u7A7A\u95F4\u5171\u8BC6\u3001\u534F\u4F5C\u7EA6\u5B9A\u3001\u56E2\u961F\u89C4\u5219\uFF1B\u4E0E\u5F53\u524D Agent \u6302\u94A9\u7684\u6709\u6548\u505A\u6CD5\u3002
831
- - \u4E0D\u8BB0\u5F55\uFF1A\u4E00\u6B21\u6027\u4EFB\u52A1\u7EC6\u8282\u3001\u5F88\u5FEB\u8FC7\u671F\u7684\u4E8B\u5B9E\u3001\u4E3A\u51D1\u6570\u52C9\u5F3A\u62BD\u51FA\u7684\u5185\u5BB9\u3002
832
+ - \u4E0D\u8BB0\u5F55\uFF1A\u4E00\u6B21\u6027\u4EFB\u52A1\u7EC6\u8282\u3001\u5F53\u524D\u4EFB\u52A1\u8FDB\u5EA6\u3001\u5F88\u5FEB\u8FC7\u671F\u7684\u4E8B\u5B9E\u3001\u4E3A\u51D1\u6570\u52C9\u5F3A\u62BD\u51FA\u7684\u5185\u5BB9\u3002
832
833
  - scope \u6309\u5185\u5BB9\u6027\u8D28\u9009\uFF0C\u4E0D\u56FA\u5B9A\u4F18\u5148\u67D0\u4E00\u5C42\uFF1A
833
834
  - Space \u534F\u4F5C\u7EA6\u5B9A/\u56E2\u961F\u89C4\u5219 \u2192 scope=space\uFF08\u4EC5\u5F53\u5F53\u524D dialog \u5DF2\u7ED1\u5B9A space\uFF09
834
835
  - \u7528\u6237\u4E2A\u4EBA\u8EAB\u4EFD\u6216\u7EAF\u4E2A\u4EBA\u504F\u597D \u2192 scope=auto\uFF08\u9ED8\u8BA4\u8BB0\u5230\u7528\u6237\uFF0C\u6240\u6709 Agent \u90FD\u80FD\u53EC\u56DE\uFF09
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-O4FOPRCP.js";
10
+ } from "./chunk-YX4H7EP4.js";
11
11
  import {
12
12
  buildDialogAttachmentPlan,
13
13
  extractFileContentIds
@@ -25,12 +25,12 @@ import {
25
25
  asNonEmptyStringArray,
26
26
  asTrimmedNonEmptyStringArray
27
27
  } from "./chunk-I42VC5KR.js";
28
- import {
29
- isRecord
30
- } from "./chunk-KUG52IAP.js";
31
28
  import {
32
29
  asTrimmedString
33
30
  } from "./chunk-3EUW3WEO.js";
31
+ import {
32
+ isRecord
33
+ } from "./chunk-KUG52IAP.js";
34
34
  import {
35
35
  parseUserIdFromAuthToken,
36
36
  readOption,
@@ -3,7 +3,7 @@ import {
3
3
  createFileCredentialBroker,
4
4
  migrateAgentSecrets,
5
5
  normalizeAgentRuntimeToolPolicy
6
- } from "./chunk-PDL2AV3E.js";
6
+ } from "./chunk-5CS33IBL.js";
7
7
  import {
8
8
  asRecordOrEmpty
9
9
  } from "./chunk-KX6YBIHG.js";
@@ -11,7 +11,7 @@ import {
11
11
  patch,
12
12
  remove,
13
13
  write
14
- } from "./chunk-VKG4HXYV.js";
14
+ } from "./chunk-V6PGKRZC.js";
15
15
  import {
16
16
  createAgentKey,
17
17
  toTrimmedString
@@ -20,7 +20,7 @@ import {
20
20
  asyncThunkCreator,
21
21
  buildCreateSlice,
22
22
  getRuntimeServerContext
23
- } from "./chunk-TSUJOM6N.js";
23
+ } from "./chunk-DVRHHFEA.js";
24
24
  import {
25
25
  asTrimmedString
26
26
  } from "./chunk-3EUW3WEO.js";
@@ -300,7 +300,7 @@ var slice = createSliceWithThunks({
300
300
  const overrides = {};
301
301
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
302
302
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
303
- const { _executeModel } = await import("./_executeModel-4F7VZR5U.js");
303
+ const { _executeModel } = await import("./_executeModel-SQVV6CXR.js");
304
304
  return _executeModel(
305
305
  {
306
306
  isStreaming: args.isStreaming ?? false,
@@ -321,7 +321,7 @@ var slice = createSliceWithThunks({
321
321
  * - 循环直到无工具调用或触发其他运行时停止条件
322
322
  */
323
323
  runAgent: create.asyncThunk(async (args, thunkApi) => {
324
- const { runAgentClientLoop } = await import("./runAgentClientLoop-FP2K33ZO.js");
324
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-HND2XKNI.js");
325
325
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
326
326
  {
327
327
  agentKey: args.agentKey,
@@ -337,7 +337,7 @@ var slice = createSliceWithThunks({
337
337
  * 聊天轮次流式 Agent 调用
338
338
  */
339
339
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
340
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-HBAQQVNK.js");
340
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-MNBTNJDU.js");
341
341
  return streamAgentChatTurnHandler(args, thunkApi);
342
342
  }),
343
343
  /**
@@ -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-2MIMRBZ2.js");
202
+ const { readAction } = await import("./read-SIWMJRHC.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`);