nolo-cli 0.13.0 → 0.14.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 (89) hide show
  1. package/{_executeModel-4F7VZR5U.js → _executeModel-KMUDFYY2.js} +27 -28
  2. package/{action-OTOWUMPW.js → action-N3KXFO5V.js} +7 -7
  3. package/{addContentAction-JGBUVR7K.js → addContentAction-4Z762DMR.js} +6 -6
  4. package/{addDialogAgentAction-V6CL2UCF.js → addDialogAgentAction-FALLEKPR.js} +5 -5
  5. package/{agentDeleteCommand-MMRSG6AB.js → agentDeleteCommand-AZDVM4HQ.js} +18 -18
  6. package/{agentEmailCommands-VQENDYL5.js → agentEmailCommands-AP6MX4XN.js} +34 -35
  7. package/{agentListCommands-2PZHIQ3I.js → agentListCommands-OJLOXSKL.js} +19 -19
  8. package/{agentMachineCommands-Q3I3VDWS.js → agentMachineCommands-G4T4GU42.js} +18 -18
  9. package/{agentRecordCommands-RY7CSPPL.js → agentRecordCommands-RNENEXQI.js} +32 -33
  10. package/{agentRunCommand-U76NZ2G6.js → agentRunCommand-2VTOTQWA.js} +33 -35
  11. package/{agentRuntimeLocal-QDJCBXM2.js → agentRuntimeLocal-4CM3VHR3.js} +16 -16
  12. package/{agentSlice-6JAJOU3X.js → agentSlice-BLHSFM3Q.js} +7 -7
  13. package/{authCommand-DMW336GT.js → authCommand-O7SL3WW5.js} +4 -4
  14. package/{chunk-MZHSAPZP.js → chunk-2Q5FTOQA.js} +52 -37
  15. package/{chunk-MG6BVV3T.js → chunk-33K5FKRL.js} +170 -98
  16. package/{chunk-JFANOO7I.js → chunk-3B2LFO6R.js} +6 -3
  17. package/{chunk-WVTBAALN.js → chunk-3FCSMQAC.js} +2 -2
  18. package/{chunk-4LG74DRG.js → chunk-4IJYA27C.js} +1 -1
  19. package/{chunk-O4FOPRCP.js → chunk-4UUJFFMK.js} +1 -1
  20. package/{chunk-CGDQDXKZ.js → chunk-5R73BS7Y.js} +1 -1
  21. package/{chunk-VKG4HXYV.js → chunk-A5V7UEZJ.js} +9 -9
  22. package/{chunk-DPFWKRHG.js → chunk-BHK5ZAW7.js} +2 -2
  23. package/{chunk-UWNSWEEC.js → chunk-BMZRD37B.js} +137 -55
  24. package/{chunk-IVAOVLM7.js → chunk-BOJVWKNA.js} +1 -1
  25. package/{chunk-Y5P3ZRGC.js → chunk-CPGQAMHA.js} +6 -6
  26. package/{chunk-YUMYYXPI.js → chunk-DQUUZXUZ.js} +16 -16
  27. package/{chunk-BTYBYAMP.js → chunk-GGQW6DXG.js} +2 -2
  28. package/{chunk-5V524MHX.js → chunk-HJAMZQFI.js} +14 -13
  29. package/{chunk-WPHL6ALY.js → chunk-JTINRTBT.js} +1 -1
  30. package/{chunk-FSUZIGIG.js → chunk-LVJFD5HS.js} +76 -62
  31. package/{chunk-XHQWJUW4.js → chunk-NJVPXLRY.js} +1 -1
  32. package/{chunk-H5Y2H2N6.js → chunk-OIMX7MM4.js} +1 -1
  33. package/{chunk-QAJWQTLB.js → chunk-ONJIZ7UF.js} +42 -30
  34. package/{chunk-5S4SWV5G.js → chunk-PB2DHBEQ.js} +1 -1
  35. package/{chunk-C3BFP57W.js → chunk-RTHJF57Z.js} +1 -1
  36. package/{chunk-QUHUVG6Y.js → chunk-RZALKBP4.js} +2 -2
  37. package/{chunk-JU7J7EAV.js → chunk-S5UACFUP.js} +56 -4
  38. package/{chunk-ARSC56DC.js → chunk-S6V2Y72C.js} +1 -1
  39. package/{chunk-KGI44L4E.js → chunk-SE4YDESE.js} +7 -7
  40. package/{chunk-QJSTNKJY.js → chunk-T3X232L6.js} +1 -1
  41. package/{chunk-OPM2DE2J.js → chunk-TLNEQI2R.js} +4 -4
  42. package/{chunk-VBSWHE5W.js → chunk-TQCONXQ3.js} +1 -1
  43. package/{chunk-LUKQQJFL.js → chunk-UW3WOIWJ.js} +1 -1
  44. package/{chunk-RWO5DGXI.js → chunk-V6VXDXGY.js} +3 -3
  45. package/{chunk-2BVGERJ2.js → chunk-VFGBWVXO.js} +106 -11
  46. package/{chunk-TA7VKOHU.js → chunk-VQFY3VXW.js} +6 -3
  47. package/{chunk-TQYYGE6G.js → chunk-XBZL4SGS.js} +3 -3
  48. package/{chunk-3MI5LDDU.js → chunk-XIDYAII4.js} +2 -2
  49. package/{createAgentAutomationAction-4NY4JLOK.js → createAgentAutomationAction-RIOI4YZI.js} +13 -13
  50. package/{createDialogAction-I5WUWFJ6.js → createDialogAction-QBHFBWM4.js} +14 -15
  51. package/{createPageAction-HFTIQ7TW.js → createPageAction-GHVLL7YQ.js} +13 -13
  52. package/{dbSlice-J4PUZ6Y5.js → dbSlice-7Q23HSWH.js} +5 -5
  53. package/{deleteFile-M7UNIUOO.js → deleteFile-WPWVZE4B.js} +3 -3
  54. package/{dialogCommands-SVXRJFZS.js → dialogCommands-BQDGLVMO.js} +19 -19
  55. package/{dialogSlice-35LA3ZRG.js → dialogSlice-VNKDTTHR.js} +13 -13
  56. package/{docCreateCommands-Z7RIAYKQ.js → docCreateCommands-K2MPMXYF.js} +18 -18
  57. package/{docDeleteCommands-NEYHUVZF.js → docDeleteCommands-NBAARB77.js} +19 -19
  58. package/{docReadCommands-I4US2SDE.js → docReadCommands-S3MO5RPS.js} +18 -18
  59. package/{docStore-3CP2IO6M.js → docStore-W4KEEPCW.js} +14 -14
  60. package/{docUpdateCommands-UU5HQBRP.js → docUpdateCommands-EHEI7FCE.js} +18 -18
  61. package/fetchMessages-KTNM7QAR.js +1 -1
  62. package/getPricing-UGDJHI7M.js +1 -1
  63. package/{handleSendMessageAction-FWTLQGOZ.js → handleSendMessageAction-6BFLKGWQ.js} +13 -13
  64. package/index.js +42 -42
  65. package/{machineCommands-NGE4ZARV.js → machineCommands-R27VIC5L.js} +33 -34
  66. package/{machineWsRunDispatch-FISQUBI2.js → machineWsRunDispatch-5JH6QGHK.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-JK6P56TT.js → readlineWorkspace-RJ3TDGEK.js} +169 -57
  71. package/{removeDialogAgentAction-XUZYQBV4.js → removeDialogAgentAction-WKHZT6VJ.js} +7 -7
  72. package/{runAgentClientLoop-FP2K33ZO.js → runAgentClientLoop-6D7FP7CK.js} +24 -25
  73. package/{setDialogExtraReferencesAction-PTAIFKGM.js → setDialogExtraReferencesAction-GCI5QU6E.js} +5 -5
  74. package/{setPrimaryDialogAgentAction-HRFTDB44.js → setPrimaryDialogAgentAction-NRO57AS6.js} +7 -7
  75. package/{settingSlice-VGRJUSE5.js → settingSlice-FTWZ5ZHT.js} +8 -6
  76. package/{spaceCommands-GN73BCOB.js → spaceCommands-4R63UST3.js} +18 -18
  77. package/{spaceSlice-WTFNKOVA.js → spaceSlice-6PZEMRZM.js} +13 -13
  78. package/{streamAgentChatTurn-HBAQQVNK.js → streamAgentChatTurn-VW7433O6.js} +51 -42
  79. package/{tools-TPQYTLQZ.js → tools-MWNK4RKM.js} +18 -19
  80. package/{tuiSummaryLlmCaller-XDC7WG4K.js → tuiSummaryLlmCaller-2D65LKWM.js} +3 -3
  81. package/{updateDialogTitleAction-AWXNPUQJ.js → updateDialogTitleAction-3SKUPJIN.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
@@ -1,3 +1,6 @@
1
+ import {
2
+ resolveMachineId
3
+ } from "./chunk-6HYVJV7B.js";
1
4
  import {
2
5
  buildLocalRunEnv,
3
6
  isFullstackCodingAgentRef,
@@ -7,9 +10,6 @@ import {
7
10
  resolveServerUrl,
8
11
  writeUsage
9
12
  } from "./chunk-3QAF2LTL.js";
10
- import {
11
- resolveMachineId
12
- } from "./chunk-6HYVJV7B.js";
13
13
  import {
14
14
  agentRunCardLabels,
15
15
  createCliCallAgentToolExecutor,
@@ -18,7 +18,7 @@ import {
18
18
  isBuiltinNoloAgentRef,
19
19
  t,
20
20
  toolLabel
21
- } from "./chunk-UWNSWEEC.js";
21
+ } from "./chunk-BMZRD37B.js";
22
22
  import {
23
23
  CliProviderQuotaError
24
24
  } from "./chunk-CMKUBIGW.js";
@@ -28,10 +28,10 @@ import {
28
28
  import {
29
29
  readDbRecord,
30
30
  resolveAgentRecordFromHybridStore
31
- } from "./chunk-CGDQDXKZ.js";
31
+ } from "./chunk-5R73BS7Y.js";
32
32
  import {
33
33
  normalizeAgentHandle
34
- } from "./chunk-VBSWHE5W.js";
34
+ } from "./chunk-TQCONXQ3.js";
35
35
  import {
36
36
  NOLO_PROJECT_MANAGER_AGENT_KEY,
37
37
  isLocalCliAgentKey
@@ -48,14 +48,16 @@ import {
48
48
  formatStatusRunCard,
49
49
  formatStopRunCard,
50
50
  isAgentRunTerminalStatus
51
- } from "./chunk-MZHSAPZP.js";
51
+ } from "./chunk-2Q5FTOQA.js";
52
52
  import {
53
53
  isGatewayHttpStatus
54
54
  } from "./chunk-RQSOAMPJ.js";
55
55
  import {
56
56
  buildMemorySubjectsForAgent,
57
+ chooseMemoryOwners,
58
+ loadMemoryCandidatesFromDb,
57
59
  resolveAgentMemoryPolicy
58
- } from "./chunk-2BVGERJ2.js";
60
+ } from "./chunk-VFGBWVXO.js";
59
61
  import {
60
62
  parseExternalSkillMarkdown,
61
63
  parseSkillDocProtocol
@@ -64,30 +66,30 @@ import {
64
66
  API_REPORTED_COST_MULTIPLIER,
65
67
  normalizeUsage,
66
68
  parseUiAskChoiceContent
67
- } from "./chunk-FSUZIGIG.js";
69
+ } from "./chunk-LVJFD5HS.js";
68
70
  import {
69
71
  buildSkillDiscoveryContextBlock
70
72
  } from "./chunk-AS3ZQ3O2.js";
71
73
  import {
72
74
  buildPlatformChatCompletionRequest,
73
75
  parsePlatformChatCompletionData
74
- } from "./chunk-5S4SWV5G.js";
76
+ } from "./chunk-PB2DHBEQ.js";
75
77
  import {
76
78
  resolveAgentRuntimeConfigFromRecord
77
- } from "./chunk-NCGFB7NN.js";
79
+ } from "./chunk-OIQPORYI.js";
78
80
  import {
79
81
  LOCAL_AGENT_CONFIG_MISSING_CODE,
80
82
  LOCAL_TURN_ABORTED_CODE,
81
83
  readActionGate,
82
84
  readCommandActionGatePayload
83
- } from "./chunk-TA7VKOHU.js";
85
+ } from "./chunk-VQFY3VXW.js";
84
86
  import {
85
87
  resolvePlatformChatCompletionsEndpoint
86
- } from "./chunk-TYPHUVK5.js";
88
+ } from "./chunk-KTFJUPDW.js";
87
89
  import {
88
90
  DEFAULT_CONTEXT_WINDOW,
89
91
  getModelContextWindow
90
- } from "./chunk-JFANOO7I.js";
92
+ } from "./chunk-3B2LFO6R.js";
91
93
  import {
92
94
  clipCompactText
93
95
  } from "./chunk-5MMAK75Q.js";
@@ -98,6 +100,9 @@ import {
98
100
  buildMemoryOverlayLayer,
99
101
  buildMemoryUseGuidanceLayer
100
102
  } from "./chunk-QLUFR47U.js";
103
+ import {
104
+ compactWhitespace
105
+ } from "./chunk-DWLEOOGR.js";
101
106
  import {
102
107
  createRunActivityTracker,
103
108
  finalizeRunRecord,
@@ -109,16 +114,6 @@ import {
109
114
  import {
110
115
  getDefaultCliLocalRuntimeDb
111
116
  } from "./chunk-H33743XH.js";
112
- import {
113
- touchMemoryItemsInDb
114
- } from "./chunk-HNW7IJSK.js";
115
- import {
116
- chooseMemoryOwners,
117
- loadMemoryCandidatesFromDb
118
- } from "./chunk-XENYHRUE.js";
119
- import {
120
- compactWhitespace
121
- } from "./chunk-DWLEOOGR.js";
122
117
  import {
123
118
  readPipeText,
124
119
  spawnProcess
@@ -126,6 +121,9 @@ import {
126
121
  import {
127
122
  parsePositiveFiniteNumberOrFallback
128
123
  } from "./chunk-Y5GCAMGP.js";
124
+ import {
125
+ createMemoryKey
126
+ } from "./chunk-O4BU24WZ.js";
129
127
  import {
130
128
  asTrimmedLowercaseString
131
129
  } from "./chunk-QSJ3HFEF.js";
@@ -133,7 +131,7 @@ import {
133
131
  BUILTIN_NOLO_AGENT_KEY,
134
132
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
135
133
  PUBLIC_KIMI_K26_IMAGE_AGENT_KEY
136
- } from "./chunk-XHQWJUW4.js";
134
+ } from "./chunk-NJVPXLRY.js";
137
135
  import {
138
136
  asTrimmedString
139
137
  } from "./chunk-3EUW3WEO.js";
@@ -2946,10 +2944,10 @@ function createSseToolEventAdapter(onEvent) {
2946
2944
  const calls = Array.isArray(payload) ? payload : payload?.calls ?? [];
2947
2945
  pendingCalls = [];
2948
2946
  const events = [];
2949
- for (const name of calls) {
2947
+ for (const call of calls) {
2950
2948
  callIndex++;
2951
- const toolCallId = `sse-call-${callIndex}`;
2952
- const toolName = name || "tool";
2949
+ const toolCallId = typeof call === "string" && call.trim() ? `sse-call-${callIndex}` : typeof call === "object" && call.toolCallId ? call.toolCallId : `sse-call-${callIndex}`;
2950
+ const toolName = typeof call === "string" ? call || "tool" : call?.toolName || "tool";
2953
2951
  pendingCalls.push({ toolCallId, toolName });
2954
2952
  const event = {
2955
2953
  type: "tool-call",
@@ -3620,7 +3618,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
3620
3618
  // packages/cli/client/agentRun.ts
3621
3619
  import { ulid } from "ulid";
3622
3620
  async function loadRunLocalAgentTurn() {
3623
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QDJCBXM2.js");
3621
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-4CM3VHR3.js");
3624
3622
  return runLocalAgentTurn;
3625
3623
  }
3626
3624
  async function resolveCurrentMachineId(options) {
@@ -4057,7 +4055,7 @@ async function runLocalAgentTurnForCli(options, settings) {
4057
4055
  } : void 0;
4058
4056
  const currentDialogId = options.continueDialogId ?? ulid();
4059
4057
  const runChildTurn = async (input) => {
4060
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QDJCBXM2.js");
4058
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-4CM3VHR3.js");
4061
4059
  return runLocalAgentTurn(input);
4062
4060
  };
4063
4061
  const createFreshChildBaseAdapter = () => {
@@ -4521,6 +4519,20 @@ ${args.inspection.status.trim()}`] : [],
4521
4519
  ].join("\n");
4522
4520
  }
4523
4521
 
4522
+ // packages/ai/memory/storeShared.ts
4523
+ var touchMemoryItemsInDb = async (db, items, now = (/* @__PURE__ */ new Date()).toISOString()) => {
4524
+ if (items.length === 0) return;
4525
+ const batch = db.batch();
4526
+ for (const item of items) {
4527
+ batch.put(createMemoryKey(item.ownerType, item.ownerId, item.id), {
4528
+ ...item,
4529
+ lastActivatedAt: now,
4530
+ activationCount: (item.activationCount ?? 0) + 1
4531
+ });
4532
+ }
4533
+ await batch.write();
4534
+ };
4535
+
4524
4536
  // packages/ai/memory/overlay.ts
4525
4537
  var KIND_TITLES = {
4526
4538
  episodic: "Episodic",
@@ -19,7 +19,7 @@ import {
19
19
  resolveProviderTransportDecision,
20
20
  toOpenAiCompatibleMessages,
21
21
  toResponsesTools
22
- } from "./chunk-TYPHUVK5.js";
22
+ } from "./chunk-KTFJUPDW.js";
23
23
  import {
24
24
  clipCompactText
25
25
  } from "./chunk-5MMAK75Q.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-MZHSAPZP.js";
4
+ } from "./chunk-2Q5FTOQA.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-B4KT7RN2.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-O4FOPRCP.js";
4
+ } from "./chunk-4UUJFFMK.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-CGDQDXKZ.js";
7
+ } from "./chunk-5R73BS7Y.js";
8
8
  import {
9
9
  toSafeAgentSummary
10
10
  } from "./chunk-OOIN7HSO.js";
@@ -10,7 +10,7 @@ import {
10
10
  toTimestampMs,
11
11
  upsert,
12
12
  write
13
- } from "./chunk-VKG4HXYV.js";
13
+ } from "./chunk-A5V7UEZJ.js";
14
14
  import {
15
15
  createUserKey,
16
16
  createUserPreferenceKey,
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-QSJ3HFEF.js";
22
22
  import {
23
23
  BUILTIN_NOLO_AGENT_KEY
24
- } from "./chunk-XHQWJUW4.js";
24
+ } from "./chunk-NJVPXLRY.js";
25
25
  import {
26
26
  asyncThunkCreator,
27
27
  buildCreateSlice,
@@ -29,7 +29,7 @@ import {
29
29
  createAsyncThunk,
30
30
  createSelector,
31
31
  selectIdentityUserId
32
- } from "./chunk-TSUJOM6N.js";
32
+ } from "./chunk-DVRHHFEA.js";
33
33
  import {
34
34
  getAllServers,
35
35
  getIsDesktopApp,
@@ -65,6 +65,27 @@ var DEFAULT_USER_PREFERENCE_PROFILE = {
65
65
  spaceContextLevel: 3
66
66
  };
67
67
 
68
+ // packages/ai/tools/agentCapabilities.ts
69
+ var SYSTEM_AGENT_CAPABILITIES = [
70
+ {
71
+ id: "web-search",
72
+ label: "\u8054\u7F51\u641C\u7D22",
73
+ description: "\u8BA9 agent \u80FD\u641C\u7D22\u4E92\u8054\u7F51\u3001\u6293\u53D6\u7F51\u9875\u5185\u5BB9\uFF0C\u83B7\u53D6\u6700\u65B0\u4FE1\u606F\u3002",
74
+ tools: ["exa_search", "fetchWebpage"],
75
+ defaultEnabled: true,
76
+ icon: "\u{1F310}"
77
+ }
78
+ ];
79
+ var SYSTEM_AGENT_CAPABILITY_IDS = SYSTEM_AGENT_CAPABILITIES.map(
80
+ ({ id }) => id
81
+ );
82
+ var DEFAULT_SYSTEM_AGENT_CAPABILITIES = Object.fromEntries(
83
+ SYSTEM_AGENT_CAPABILITIES.map(({ id, defaultEnabled }) => [
84
+ id,
85
+ defaultEnabled
86
+ ])
87
+ );
88
+
68
89
  // packages/ai/policy/selfUpdateFields.ts
69
90
  var AGENT_UPDATE_FIELD_NAMES = [
70
91
  "name",
@@ -934,8 +955,11 @@ var initialState = {
934
955
  desktopChromeConnectorEnabled: false,
935
956
  developerModeEnabled: false,
936
957
  diagnosticModeEnabled: false,
937
- deleteShortcut: typeof window !== "undefined" && typeof window.navigator !== "undefined" && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) ? "meta+backspace" : "ctrl+backspace"
958
+ deleteShortcut: typeof window !== "undefined" && typeof window.navigator !== "undefined" && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) ? "meta+backspace" : "ctrl+backspace",
959
+ // 系统内置 Skill 默认全开;用户可在设置页单关。目前只有 web-search。
960
+ systemBuiltinSkills: { ...DEFAULT_SYSTEM_AGENT_CAPABILITIES }
938
961
  };
962
+ var DEFAULT_SYSTEM_BUILTIN_SKILLS = DEFAULT_SYSTEM_AGENT_CAPABILITIES;
939
963
 
940
964
  // packages/database/userPreferenceRegister.ts
941
965
  var USER_PREFERENCE_NAMES = {
@@ -1072,6 +1096,15 @@ var omitKeys = (record, keys) => {
1072
1096
  });
1073
1097
  return next;
1074
1098
  };
1099
+ var isRecordLike = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
1100
+ var normalizeSystemBuiltinSkills = (value, defaults) => {
1101
+ const base = isRecordLike(value) ? value : {};
1102
+ const result = { ...defaults };
1103
+ for (const key of Object.keys(base)) {
1104
+ result[key] = Boolean(base[key]);
1105
+ }
1106
+ return result;
1107
+ };
1075
1108
 
1076
1109
  // packages/app/settings/settingPersistence.ts
1077
1110
  var normalizeSettingChanges = (changes) => {
@@ -1131,6 +1164,15 @@ var normalizeSettingChanges = (changes) => {
1131
1164
  )
1132
1165
  };
1133
1166
  }
1167
+ if (hasOwn(normalizedChanges, "systemBuiltinSkills")) {
1168
+ normalizedChanges = {
1169
+ ...normalizedChanges,
1170
+ systemBuiltinSkills: normalizeSystemBuiltinSkills(
1171
+ normalizedChanges.systemBuiltinSkills,
1172
+ DEFAULT_SYSTEM_BUILTIN_SKILLS
1173
+ )
1174
+ };
1175
+ }
1134
1176
  return normalizedChanges;
1135
1177
  };
1136
1178
  var LOCAL_APPEARANCE_KEY_NAMES = [
@@ -1357,6 +1399,13 @@ var selectDeleteShortcut = (state) => {
1357
1399
  var selectEditorFontSize = (state) => state.settings.editorFontSize;
1358
1400
  var selectEditorAutoSave = (state) => state.settings.editorAutoSave;
1359
1401
  var selectEditorAutoSaveInterval = (state) => state.settings.editorAutoSaveInterval;
1402
+ var selectSystemBuiltinSkills = createSelector(
1403
+ [(state) => state.settings.systemBuiltinSkills],
1404
+ (systemBuiltinSkills) => normalizeSystemBuiltinSkills(
1405
+ systemBuiltinSkills,
1406
+ DEFAULT_SYSTEM_BUILTIN_SKILLS
1407
+ )
1408
+ );
1360
1409
 
1361
1410
  // packages/app/settings/editorConfigSelectors.ts
1362
1411
  var selectEditorCodeTheme = createSelector(
@@ -1958,6 +2007,8 @@ var settingSlice_default = settingSlice.reducer;
1958
2007
  export {
1959
2008
  DEFAULT_AGENT_BASE_POLICY,
1960
2009
  DEFAULT_USER_PREFERENCE_PROFILE,
2010
+ SYSTEM_AGENT_CAPABILITIES,
2011
+ SYSTEM_AGENT_CAPABILITY_IDS,
1961
2012
  AGENT_UPDATE_FIELD_NAMES,
1962
2013
  normalizeAgentUpdateFieldList,
1963
2014
  SYSTEM_DEFAULT_AGENT_ID,
@@ -2017,6 +2068,7 @@ export {
2017
2068
  selectEditorFontSize,
2018
2069
  selectEditorAutoSave,
2019
2070
  selectEditorAutoSaveInterval,
2071
+ selectSystemBuiltinSkills,
2020
2072
  selectEditorCodeTheme,
2021
2073
  selectEditorConfig,
2022
2074
  selectTheme,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-5V524MHX.js";
4
+ } from "./chunk-HJAMZQFI.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-UWNSWEEC.js";
4
+ } from "./chunk-BMZRD37B.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-MZHSAPZP.js";
7
+ } from "./chunk-2Q5FTOQA.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-TA7VKOHU.js";
10
+ } from "./chunk-VQFY3VXW.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,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_AGENT_BASE_POLICY,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE
4
- } from "./chunk-JU7J7EAV.js";
4
+ } from "./chunk-S5UACFUP.js";
5
5
 
6
6
  // packages/ai/policy/runtimePolicy.ts
7
7
  var clampLevel = (value, fallback) => {
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-O4FOPRCP.js";
10
+ } from "./chunk-4UUJFFMK.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,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-MG6BVV3T.js";
4
+ } from "./chunk-33K5FKRL.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isImageUrlPart
3
- } from "./chunk-TYPHUVK5.js";
3
+ } from "./chunk-KTFJUPDW.js";
4
4
  import {
5
5
  canonicalizeToolNames
6
6
  } from "./chunk-B4KT7RN2.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  selectCurrentServer
3
- } from "./chunk-JU7J7EAV.js";
3
+ } from "./chunk-S5UACFUP.js";
4
4
  import {
5
5
  patch
6
- } from "./chunk-VKG4HXYV.js";
6
+ } from "./chunk-A5V7UEZJ.js";
7
7
  import {
8
8
  selectIdentityToken
9
- } from "./chunk-TSUJOM6N.js";
9
+ } from "./chunk-DVRHHFEA.js";
10
10
  import {
11
11
  getIsDesktopApp
12
12
  } from "./chunk-OOSFSFMA.js";
@@ -3,17 +3,13 @@ import {
3
3
  prepareAndPersistMessage,
4
4
  uiAskChoiceFunc,
5
5
  uiAskChoiceFunctionSchema
6
- } from "./chunk-FSUZIGIG.js";
6
+ } from "./chunk-LVJFD5HS.js";
7
7
  import {
8
8
  require_date_fns
9
9
  } from "./chunk-M76ECQRD.js";
10
10
  import {
11
11
  extractCustomId
12
12
  } from "./chunk-DFFIZ25G.js";
13
- import {
14
- chooseMemoryOwners,
15
- loadMemoryCandidatesFromDb
16
- } from "./chunk-XENYHRUE.js";
17
13
  import {
18
14
  PLATFORM_HOSTED_GLM_52_MODEL,
19
15
  PLATFORM_HOSTED_GLM_PRICE,
@@ -25,25 +21,28 @@ import {
25
21
  removeCachedEntity,
26
22
  upsertSSREntity,
27
23
  write
28
- } from "./chunk-VKG4HXYV.js";
24
+ } from "./chunk-A5V7UEZJ.js";
29
25
  import {
30
26
  createAgentKey,
31
27
  createDialogKey,
32
28
  createKey,
33
- dialogMessageRange
29
+ createMemoryKey,
30
+ dialogMessageRange,
31
+ memoryOwnerRange,
32
+ memorySubjectKindRange
34
33
  } from "./chunk-O4BU24WZ.js";
35
34
  import {
36
35
  selectIdentityUserId
37
- } from "./chunk-TSUJOM6N.js";
38
- import {
39
- isRecord
40
- } from "./chunk-KUG52IAP.js";
36
+ } from "./chunk-DVRHHFEA.js";
41
37
  import {
42
38
  asTrimmedString
43
39
  } from "./chunk-3EUW3WEO.js";
44
40
  import {
45
41
  asOptionalPositiveFiniteNumber
46
42
  } from "./chunk-U6VC4MU4.js";
43
+ import {
44
+ isRecord
45
+ } from "./chunk-KUG52IAP.js";
47
46
  import {
48
47
  asOptionalTrimmedString
49
48
  } from "./chunk-G3SUCT4W.js";
@@ -511,6 +510,100 @@ var mergeGreetingWithRelationshipRecap = (input) => {
511
510
  \u5982\u679C\u4F60\u8FD8\u60F3\u63A5\u7740\u90A3\u4E2A\u70B9\u7EE7\u7EED\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4ECE\u90A3\u91CC\u5F80\u4E0B\u8D70\uFF1B\u5982\u679C\u60F3\u6362\u4E2A\u65B9\u5411\u4E5F\u53EF\u4EE5\u3002`;
512
511
  };
513
512
 
513
+ // packages/ai/memory/queryShared.ts
514
+ var chooseMemoryOwners = (input) => {
515
+ const owners = [];
516
+ if (input.userId) {
517
+ owners.push({ ownerType: "user", ownerId: input.userId });
518
+ }
519
+ if (input.spaceId) {
520
+ owners.push({ ownerType: "space", ownerId: input.spaceId });
521
+ }
522
+ return owners;
523
+ };
524
+ var loadOwnerItemsFromDb = async (db, owner, limit) => {
525
+ const range = memoryOwnerRange(owner.ownerType, owner.ownerId);
526
+ const refs = [];
527
+ for await (const [, value] of db.iterator({
528
+ gte: range.start,
529
+ lte: range.end,
530
+ reverse: true
531
+ })) {
532
+ refs.push(value ?? {});
533
+ if (refs.length >= limit) break;
534
+ }
535
+ const items = await Promise.all(
536
+ refs.map(
537
+ (ref) => typeof ref?.memoryId === "string" ? db.get(createMemoryKey(owner.ownerType, owner.ownerId, ref.memoryId)).catch(() => null) : Promise.resolve(null)
538
+ )
539
+ );
540
+ return items.filter((item) => !!item);
541
+ };
542
+ var loadSubjectKindItemsFromDb = async (db, subject, kind, limit) => {
543
+ const range = memorySubjectKindRange(subject.subjectType, subject.subjectId, kind);
544
+ const refs = [];
545
+ for await (const [, value] of db.iterator({
546
+ gte: range.start,
547
+ lte: range.end,
548
+ reverse: true
549
+ })) {
550
+ refs.push(value ?? {});
551
+ if (refs.length >= limit) break;
552
+ }
553
+ const items = await Promise.all(
554
+ refs.map(
555
+ (ref) => typeof ref?.memoryKey === "string" ? db.get(ref.memoryKey).catch(() => null) : Promise.resolve(null)
556
+ )
557
+ );
558
+ return items.filter((item) => !!item);
559
+ };
560
+ var loadMemoryCandidatesFromDb = async (db, input) => {
561
+ const kinds = input.kinds ?? ["episodic", "semantic", "procedural"];
562
+ const ownerLimit = input.ownerLimit ?? 12;
563
+ const ownerFallback = input.ownerFallback ?? "onSubjectMiss";
564
+ const ownerKeySet = new Set(
565
+ input.owners.filter((owner) => owner.ownerId).map((owner) => `${owner.ownerType}:${owner.ownerId}`)
566
+ );
567
+ const subjects = input.subjects.filter(
568
+ (subject) => !!subject.subjectId
569
+ );
570
+ const subjectResults = subjects.length > 0 ? await Promise.all(
571
+ subjects.flatMap(
572
+ (subject) => kinds.map(
573
+ (kind) => loadSubjectKindItemsFromDb(db, subject, kind, ownerLimit)
574
+ )
575
+ )
576
+ ) : [];
577
+ const subjectHitCount = subjectResults.reduce((sum, items) => sum + items.length, 0);
578
+ const shouldLoadOwnerFallback = ownerFallback !== "never" && (subjects.length === 0 || subjectHitCount === 0 || ownerFallback === "always");
579
+ const results = shouldLoadOwnerFallback ? await Promise.all(
580
+ [
581
+ ...subjectResults,
582
+ ...input.owners.map((owner) => loadOwnerItemsFromDb(db, owner, ownerLimit))
583
+ ]
584
+ ) : subjectResults;
585
+ const kindSet = new Set(kinds);
586
+ const seen = /* @__PURE__ */ new Set();
587
+ const merged = [];
588
+ for (const items of results) {
589
+ for (const item of items) {
590
+ if (seen.has(item.id)) continue;
591
+ if (!kindSet.has(item.kind)) continue;
592
+ if (ownerKeySet.size > 0 && !ownerKeySet.has(`${item.ownerType}:${item.ownerId}`)) {
593
+ continue;
594
+ }
595
+ if (!shouldLoadOwnerFallback && subjects.length > 0 && !subjects.some(
596
+ (subject) => subject.subjectType === item.subjectType && subject.subjectId === item.subjectId
597
+ )) {
598
+ continue;
599
+ }
600
+ seen.add(item.id);
601
+ merged.push(item);
602
+ }
603
+ }
604
+ return merged;
605
+ };
606
+
514
607
  // packages/ai/memory/understandingGreeting.ts
515
608
  var UNDERSTANDING_TAG = "understanding-memory";
516
609
  var facetPriority = {
@@ -996,6 +1089,8 @@ var createDialogAction = async (args, thunkApi) => {
996
1089
  export {
997
1090
  resolveAgentMemoryPolicy,
998
1091
  buildMemorySubjectsForAgent,
1092
+ chooseMemoryOwners,
1093
+ loadMemoryCandidatesFromDb,
999
1094
  isLocalOwnerDialogAgents,
1000
1095
  createDialogAction
1001
1096
  };
@@ -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-3B2LFO6R.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,