nolo-cli 0.29.1 → 0.29.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 (87) hide show
  1. package/{_executeModel-TN7FW73L.js → _executeModel-BFVTGZXE.js} +23 -23
  2. package/{action-6BM26ZYM.js → action-LG32A6DJ.js} +5 -5
  3. package/{addContentAction-HLTFX56O.js → addContentAction-MPGMBJTQ.js} +4 -4
  4. package/{addDialogAgentAction-Q2TYWDO6.js → addDialogAgentAction-ZH23WDID.js} +3 -3
  5. package/{agentDeleteCommand-VP4VLCMG.js → agentDeleteCommand-4S4STG42.js} +11 -11
  6. package/{agentEmailCommands-N32KWVCX.js → agentEmailCommands-3F4IP4DI.js} +26 -26
  7. package/{agentListCommands-MXITEBUS.js → agentListCommands-JCRV2XF6.js} +13 -13
  8. package/{agentMachineCommands-47Y2XEZZ.js → agentMachineCommands-KYXPYSFP.js} +11 -11
  9. package/{agentRecordCommands-AK6ZRJLD.js → agentRecordCommands-UADUPIXO.js} +26 -26
  10. package/{agentRunCommand-24SNVDNC.js → agentRunCommand-MJWSR53W.js} +26 -26
  11. package/{agentRuntimeLocal-VI3NHLDU.js → agentRuntimeLocal-PC5RRRPT.js} +12 -12
  12. package/{agentSlice-D666DABC.js → agentSlice-C5OYLNBT.js} +4 -4
  13. package/{appDeleteCommands-SF2V6QYZ.js → appDeleteCommands-ZXODZ5AD.js} +12 -12
  14. package/{appDeployCommands-3EPVR545.js → appDeployCommands-AWC6JPZH.js} +12 -12
  15. package/{appDeployStatusCommands-O65Y747J.js → appDeployStatusCommands-74NXMDAI.js} +12 -12
  16. package/{appGetCommands-AHDOF4SS.js → appGetCommands-6YGIAP5L.js} +12 -12
  17. package/{appListCommands-Y7YCXODU.js → appListCommands-DZWBHMNK.js} +12 -12
  18. package/{chunk-4MCHUZUI.js → chunk-32ZM6HVI.js} +1 -1
  19. package/{chunk-XISENOC2.js → chunk-4BDPDTJU.js} +2 -2
  20. package/{chunk-GVYU3EVI.js → chunk-5ZXNLOAG.js} +3 -3
  21. package/{chunk-WPRSBZYN.js → chunk-6HTWA77J.js} +1 -1
  22. package/{chunk-YRMUYZ5H.js → chunk-BBGRJB5E.js} +2 -2
  23. package/{chunk-MHHYH3JA.js → chunk-DF7SMWEV.js} +1 -1
  24. package/{chunk-WNENLKKI.js → chunk-FVOSIYXM.js} +8 -8
  25. package/{chunk-JYSXE6LE.js → chunk-G2BZ43DV.js} +3 -3
  26. package/{chunk-BOPFLKHA.js → chunk-GC34RRTQ.js} +1 -1
  27. package/{chunk-7CP4UOUV.js → chunk-GMJS5AYP.js} +3 -3
  28. package/{chunk-XMAMUPXU.js → chunk-H5S4XUGI.js} +11 -11
  29. package/{chunk-FVY6KI5A.js → chunk-HEXXIS77.js} +1 -1
  30. package/{chunk-STRCGEC6.js → chunk-HRJEPMZY.js} +11 -7
  31. package/{chunk-Z3LLUGD5.js → chunk-HRPWRVBI.js} +1 -1
  32. package/{chunk-PMSG3OGF.js → chunk-HYSJHRWD.js} +4 -4
  33. package/{chunk-INWBJPQC.js → chunk-IC7W63RM.js} +2 -2
  34. package/{chunk-DBUNOYLF.js → chunk-JSB4N6NU.js} +1 -1
  35. package/{chunk-33K2M3AU.js → chunk-KEF5OBOZ.js} +2 -15
  36. package/{chunk-NWT2WUCY.js → chunk-L6RBX4L4.js} +1 -1
  37. package/{chunk-YBHJZVWO.js → chunk-NXMJ55RU.js} +15 -8
  38. package/{chunk-SNMJPH7J.js → chunk-OEWEE4VW.js} +1 -1
  39. package/{chunk-Y52E3TIS.js → chunk-OLWMGSW2.js} +10 -10
  40. package/{chunk-PB7G5MAM.js → chunk-OMP5L5NF.js} +1 -1
  41. package/{chunk-F7S2SH5C.js → chunk-Q5RXHXKU.js} +9 -9
  42. package/{chunk-I5TJCJQP.js → chunk-QC6ZWDSV.js} +1 -1
  43. package/{chunk-STOUEEBU.js → chunk-R3JSTDQO.js} +1 -1
  44. package/{chunk-ENUJPSZN.js → chunk-R7LOFGRE.js} +2 -2
  45. package/{chunk-MUI34IA2.js → chunk-RJBTU7AS.js} +4 -4
  46. package/{chunk-GFVFYNL7.js → chunk-TOGGHWHI.js} +2 -2
  47. package/{chunk-SLOGKB7M.js → chunk-TOW4E763.js} +9 -1
  48. package/{chunk-PFTK5SEB.js → chunk-UEOPA6MV.js} +22 -1
  49. package/{chunk-RD6AOXQI.js → chunk-UFL6WHHJ.js} +21 -21
  50. package/{chunk-BPZSJH5X.js → chunk-VKBTAQWT.js} +3 -3
  51. package/{chunk-3LJ4RSSF.js → chunk-W2LZV5GE.js} +1 -1
  52. package/{chunk-2AX4ZWSG.js → chunk-WMB7GVPN.js} +26 -25
  53. package/{chunk-P6TB7JIA.js → chunk-Z54ZAZZC.js} +2 -2
  54. package/{createAgentAutomationAction-VK3N263U.js → createAgentAutomationAction-BK4UZJKU.js} +9 -9
  55. package/{createDialogAction-KWZ74S2G.js → createDialogAction-MJJUI2MK.js} +10 -10
  56. package/{createPageAction-3CIZL5ZL.js → createPageAction-YMZ7K363.js} +9 -9
  57. package/{db-W5UHK4P3.js → db-IPCJ43PW.js} +10 -6
  58. package/{dbSlice-GOKRGQ47.js → dbSlice-6QJYQUBV.js} +3 -3
  59. package/{dialogCommands-N4XKI6ZU.js → dialogCommands-OKH45ASS.js} +12 -12
  60. package/{dialogSlice-TKYB6VLO.js → dialogSlice-UDOKNDHB.js} +9 -9
  61. package/{docCreateCommands-DTDKANXX.js → docCreateCommands-MCLMR4TE.js} +11 -11
  62. package/{docDeleteCommands-U4NB6OHK.js → docDeleteCommands-ONDHI7JV.js} +12 -12
  63. package/{docReadCommands-SDVQM3BH.js → docReadCommands-FCXBMISW.js} +11 -11
  64. package/{docStore-E5QAM75M.js → docStore-N66O4CGH.js} +10 -10
  65. package/{docUpdateCommands-O2O644FV.js → docUpdateCommands-T3XN6XOX.js} +11 -11
  66. package/{handleSendMessageAction-7OVC2SVU.js → handleSendMessageAction-KC4AYUZP.js} +9 -9
  67. package/index.js +40 -40
  68. package/localDialogRead-UFLBS6OT.js +38 -0
  69. package/{machineCommands-6GNFKAVC.js → machineCommands-DIMRFA3Y.js} +25 -25
  70. package/{machineWsRunDispatch-2DCHVG3U.js → machineWsRunDispatch-2DYJZI6Z.js} +25 -25
  71. package/package.json +1 -1
  72. package/{read-A23NKT3O.js → read-C7Y6LSBM.js} +2 -2
  73. package/{readDocTool-JAM5BI5Q.js → readDocTool-TOHRYJHP.js} +1 -1
  74. package/{readlineWorkspace-KELDMUNZ.js → readlineWorkspace-HUPHMLDG.js} +29 -29
  75. package/{removeDialogAgentAction-K4HOWFHO.js → removeDialogAgentAction-WZXPOH5S.js} +5 -5
  76. package/{runAgentClientLoop-R3S7YN6Z.js → runAgentClientLoop-5TGSUKHV.js} +20 -20
  77. package/{setDialogExtraReferencesAction-JD7J7JM4.js → setDialogExtraReferencesAction-INZY2ENI.js} +4 -4
  78. package/{setPrimaryDialogAgentAction-YWSA5XEU.js → setPrimaryDialogAgentAction-WCVLPYCF.js} +5 -5
  79. package/{settingSlice-22GTX6CA.js → settingSlice-IDUM4LWU.js} +4 -4
  80. package/{spaceCommands-WM6W3WMQ.js → spaceCommands-XSSDB3YK.js} +11 -11
  81. package/{spaceSlice-RC2APBOD.js → spaceSlice-BXDCO6PT.js} +9 -9
  82. package/{streamAgentChatTurn-Q655CCVP.js → streamAgentChatTurn-HRFMVSVC.js} +23 -23
  83. package/{switchDialogAgentAction-6JKFBJVR.js → switchDialogAgentAction-YBFFCBOD.js} +3 -3
  84. package/{toolApiClient-ISM4ZQX4.js → toolApiClient-WVTUYOFM.js} +2 -2
  85. package/{tools-A6MUIA3Q.js → tools-5V6FHWQU.js} +18 -18
  86. package/{updateDialogTitleAction-DQYY564Y.js → updateDialogTitleAction-W62C4W4K.js} +9 -9
  87. package/localDialogRead-JXTAHW2E.js +0 -26
@@ -11,7 +11,7 @@ import {
11
11
  patch,
12
12
  remove,
13
13
  write
14
- } from "./chunk-JYSXE6LE.js";
14
+ } from "./chunk-G2BZ43DV.js";
15
15
  import {
16
16
  createAgentKey,
17
17
  toTrimmedString
@@ -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-TN7FW73L.js");
303
+ const { _executeModel } = await import("./_executeModel-BFVTGZXE.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-R3S7YN6Z.js");
324
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-5TGSUKHV.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-Q655CCVP.js");
340
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-HRFMVSVC.js");
341
341
  return streamAgentChatTurnHandler(args, thunkApi);
342
342
  }),
343
343
  /**
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-XMAMUPXU.js";
3
+ } from "./chunk-H5S4XUGI.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-WFHXMLHZ.js";
@@ -12,7 +12,7 @@ import {
12
12
  resolveAgentRecordFromHybridStore,
13
13
  sanitizeAgentRecordForCliOutput,
14
14
  writeAgentRecord
15
- } from "./chunk-I5TJCJQP.js";
15
+ } from "./chunk-QC6ZWDSV.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-VHBWHNVT.js";
@@ -25,9 +25,17 @@ var extractCustomId = (key) => {
25
25
  };
26
26
  var PUBLIC_AGENT_KEY_PREFIX = "agent-pub-";
27
27
  var publicAgentKey = (id) => `${PUBLIC_AGENT_KEY_PREFIX}${id}`;
28
+ var ownedAgentKeyPrefix = (userId) => `agent-${userId}-`;
29
+ var ownedAgentKey = (userId, id) => id.startsWith(ownedAgentKeyPrefix(userId)) ? id : `${ownedAgentKeyPrefix(userId)}${id}`;
30
+ var isOwnedAgentKey = (key, userId) => typeof key === "string" && key.startsWith(ownedAgentKeyPrefix(userId));
31
+ var parseOwnedAgentId = (key, userId) => isOwnedAgentKey(key, userId) ? key.slice(ownedAgentKeyPrefix(userId).length) || null : null;
28
32
 
29
33
  export {
30
34
  extractUserId,
31
35
  extractCustomId,
32
- publicAgentKey
36
+ PUBLIC_AGENT_KEY_PREFIX,
37
+ publicAgentKey,
38
+ ownedAgentKey,
39
+ isOwnedAgentKey,
40
+ parseOwnedAgentId
33
41
  };
@@ -8,6 +8,11 @@ import {
8
8
  asNonEmptyStringArray,
9
9
  asTrimmedNonEmptyStringArray
10
10
  } from "./chunk-I42VC5KR.js";
11
+ import {
12
+ isOwnedAgentKey,
13
+ ownedAgentKey,
14
+ publicAgentKey
15
+ } from "./chunk-TOW4E763.js";
11
16
  import {
12
17
  isRecord
13
18
  } from "./chunk-KUG52IAP.js";
@@ -15,6 +20,20 @@ import {
15
20
  asOptionalTrimmedString
16
21
  } from "./chunk-G3SUCT4W.js";
17
22
 
23
+ // packages/agent-runtime/agentRecordKeys.ts
24
+ function buildAgentRuntimeAgentLookupKeys(args) {
25
+ if (/^agent(-pub)?-/.test(args.agentRef)) {
26
+ return [args.agentRef];
27
+ }
28
+ return [
29
+ ownedAgentKey(args.userId, args.agentRef),
30
+ publicAgentKey(args.agentRef)
31
+ ];
32
+ }
33
+ function shouldFetchAgentRuntimeRecordRemotely(dbKey) {
34
+ return /^agent(-pub)?-/.test(dbKey);
35
+ }
36
+
18
37
  // packages/agent-runtime/runtimeToolSurface.ts
19
38
  var DEFAULT_PRIVATE_NOLO_WORKSPACE_TOOLS = [
20
39
  "listDialogs",
@@ -88,7 +107,7 @@ function inferOwnerIdFromRuntimeAgentKey(value) {
88
107
  function resolveRuntimeToolSurfaceForAgent(args) {
89
108
  const agentKey = typeof args.agentKey === "string" ? args.agentKey : "";
90
109
  const currentUserId = typeof args.currentUserId === "string" ? args.currentUserId : "";
91
- const inferredOwnerId = args.agentOwnerId ?? (currentUserId && agentKey.startsWith(`agent-${currentUserId}-`) ? currentUserId : inferOwnerIdFromRuntimeAgentKey(agentKey));
110
+ const inferredOwnerId = args.agentOwnerId ?? (currentUserId && isOwnedAgentKey(agentKey, currentUserId) ? currentUserId : inferOwnerIdFromRuntimeAgentKey(agentKey));
92
111
  const publicRef = isPublicRuntimeAgentRef(agentKey);
93
112
  const visibility = args.trustedPrivateInvocation === true ? "private" : publicRef || args.isPublic === true || args.sharingLevel === "public" ? "public" : "private";
94
113
  return resolveRuntimeToolSurface({
@@ -600,6 +619,8 @@ function buildNoloWorkspaceCommandArgs(call) {
600
619
  }
601
620
 
602
621
  export {
622
+ buildAgentRuntimeAgentLookupKeys,
623
+ shouldFetchAgentRuntimeRecordRemotely,
603
624
  resolveRuntimeToolSurfaceForAgent,
604
625
  redactAgentRecordForWorkspaceTool,
605
626
  NOLO_WORKSPACE_TOOL_NAMES,
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  deleteServerSyncedCredential,
14
14
  runLlm
15
- } from "./chunk-MUI34IA2.js";
15
+ } from "./chunk-RJBTU7AS.js";
16
16
  import {
17
17
  isOAuthApiKeyRef
18
18
  } from "./chunk-YYLHWIW6.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-CWMSB67P.js";
22
22
  import {
23
23
  cleanupCliSessionForDialog
24
- } from "./chunk-INWBJPQC.js";
24
+ } from "./chunk-IC7W63RM.js";
25
25
  import {
26
26
  getActiveDialogAgentId,
27
27
  getDialogAgentIds,
@@ -43,7 +43,7 @@ import {
43
43
  resolveAutoExecutionProfile,
44
44
  resolveBuiltinPlatformAgentRecord,
45
45
  serializeMessageContent
46
- } from "./chunk-PMSG3OGF.js";
46
+ } from "./chunk-HYSJHRWD.js";
47
47
  import {
48
48
  createFileCredentialBroker
49
49
  } from "./chunk-5CS33IBL.js";
@@ -81,7 +81,7 @@ import {
81
81
  selectRemoteServer,
82
82
  selectRemoteServers,
83
83
  selectRemoteSyncServers
84
- } from "./chunk-ENUJPSZN.js";
84
+ } from "./chunk-R7LOFGRE.js";
85
85
  import {
86
86
  asRecordOrEmpty
87
87
  } from "./chunk-KX6YBIHG.js";
@@ -92,7 +92,7 @@ import {
92
92
  createSpaceKey,
93
93
  localSpaceAuthorityPatchStamp,
94
94
  normalizeSpaceId
95
- } from "./chunk-DBUNOYLF.js";
95
+ } from "./chunk-JSB4N6NU.js";
96
96
  import {
97
97
  patch,
98
98
  read,
@@ -105,7 +105,7 @@ import {
105
105
  uploadFileAction,
106
106
  upsertSSREntity,
107
107
  write
108
- } from "./chunk-JYSXE6LE.js";
108
+ } from "./chunk-G2BZ43DV.js";
109
109
  import {
110
110
  DB_PREFIX,
111
111
  SEPARATOR,
@@ -143,7 +143,7 @@ import {
143
143
  } from "./chunk-QSJ3HFEF.js";
144
144
  import {
145
145
  readAction
146
- } from "./chunk-NWT2WUCY.js";
146
+ } from "./chunk-L6RBX4L4.js";
147
147
  import {
148
148
  DEVICE_LOCAL_OWNER_ID,
149
149
  asyncThunkCreator,
@@ -187,7 +187,7 @@ import {
187
187
  import {
188
188
  extractCustomId,
189
189
  extractUserId
190
- } from "./chunk-SLOGKB7M.js";
190
+ } from "./chunk-TOW4E763.js";
191
191
  import {
192
192
  isRecord
193
193
  } from "./chunk-KUG52IAP.js";
@@ -5567,7 +5567,7 @@ var messageSlice = createSliceWithThunks({
5567
5567
  runtimeOptions: args.runtimeOptions
5568
5568
  });
5569
5569
  if (agentKeyToUse) {
5570
- const { streamAgentChatTurn } = await import("./agentSlice-D666DABC.js");
5570
+ const { streamAgentChatTurn } = await import("./agentSlice-C5OYLNBT.js");
5571
5571
  await dispatch(
5572
5572
  streamAgentChatTurn({
5573
5573
  agentKey: agentKeyToUse,
@@ -8306,7 +8306,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
8306
8306
  }
8307
8307
  if (isCurrentDialog) {
8308
8308
  await thunkApi.dispatch(resetMsgs());
8309
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-TKYB6VLO.js");
8309
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-UDOKNDHB.js");
8310
8310
  dispatch(clearPendingAttachments2());
8311
8311
  clearWorkflow();
8312
8312
  }
@@ -8315,39 +8315,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
8315
8315
 
8316
8316
  // packages/chat/dialog/dialogSlice.ts
8317
8317
  var runCreateDialogAction = async (args, thunkApi) => {
8318
- const { createDialogAction } = await import("./createDialogAction-KWZ74S2G.js");
8318
+ const { createDialogAction } = await import("./createDialogAction-MJJUI2MK.js");
8319
8319
  return createDialogAction(args, thunkApi);
8320
8320
  };
8321
8321
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
8322
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-VK3N263U.js");
8322
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-BK4UZJKU.js");
8323
8323
  return createAgentAutomationAction(args, thunkApi);
8324
8324
  };
8325
8325
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
8326
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-DQYY564Y.js");
8326
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-W62C4W4K.js");
8327
8327
  return updateDialogTitleAction(args, thunkApi);
8328
8328
  };
8329
8329
  var runAddDialogAgentAction = async (args, thunkApi) => {
8330
- const { addDialogAgentAction } = await import("./addDialogAgentAction-Q2TYWDO6.js");
8330
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-ZH23WDID.js");
8331
8331
  return addDialogAgentAction(args, thunkApi);
8332
8332
  };
8333
8333
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
8334
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-K4HOWFHO.js");
8334
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-WZXPOH5S.js");
8335
8335
  return removeDialogAgentAction(args, thunkApi);
8336
8336
  };
8337
8337
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
8338
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-YWSA5XEU.js");
8338
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-WCVLPYCF.js");
8339
8339
  return setPrimaryDialogAgentAction(args, thunkApi);
8340
8340
  };
8341
8341
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
8342
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-6JKFBJVR.js");
8342
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-YBFFCBOD.js");
8343
8343
  return switchDialogAgentAction(args, thunkApi);
8344
8344
  };
8345
8345
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
8346
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-JD7J7JM4.js");
8346
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-INZY2ENI.js");
8347
8347
  return setDialogExtraReferencesAction(args, thunkApi);
8348
8348
  };
8349
8349
  var runHandleSendMessageAction = async (args, thunkApi) => {
8350
- const { handleSendMessageAction } = await import("./handleSendMessageAction-7OVC2SVU.js");
8350
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-KC4AYUZP.js");
8351
8351
  return handleSendMessageAction(args, thunkApi);
8352
8352
  };
8353
8353
  function clearDialogState() {
@@ -8360,7 +8360,7 @@ var createPageAndAddReference = createAsyncThunk(
8360
8360
  async (payload, { dispatch, getState, rejectWithValue }) => {
8361
8361
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
8362
8362
  try {
8363
- const { createDocState } = await import("./docStore-E5QAM75M.js");
8363
+ const { createDocState } = await import("./docStore-N66O4CGH.js");
8364
8364
  const pageKey = await createDocState(
8365
8365
  { slateData, title },
8366
8366
  { dispatch, getState }
@@ -14611,7 +14611,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
14611
14611
  const spaceKey = createSpaceKey.space(spaceId);
14612
14612
  const readSpace = async (dbKey) => {
14613
14613
  try {
14614
- const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-GOKRGQ47.js");
14614
+ const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-6QJYQUBV.js");
14615
14615
  if (fresh) {
14616
14616
  return await dispatch(readAndWait2(dbKey)).unwrap();
14617
14617
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateContentTitle
3
- } from "./chunk-RD6AOXQI.js";
3
+ } from "./chunk-UFL6WHHJ.js";
4
4
  import {
5
5
  require_date_fns
6
6
  } from "./chunk-M76ECQRD.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  patch,
15
15
  readAndWait
16
- } from "./chunk-JYSXE6LE.js";
16
+ } from "./chunk-G2BZ43DV.js";
17
17
  import {
18
18
  asOptionalTrimmedString
19
19
  } from "./chunk-G3SUCT4W.js";
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
367
367
  }
368
368
  }
369
369
  async function createDocState(args, thunkApi) {
370
- const { createPageAction } = await import("./createPageAction-3CIZL5ZL.js");
370
+ const { createPageAction } = await import("./createPageAction-YMZ7K363.js");
371
371
  return createPageAction(args, thunkApi);
372
372
  }
373
373
  function subscribe(listener) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_AGENT_BASE_POLICY,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE
4
- } from "./chunk-ENUJPSZN.js";
4
+ } from "./chunk-R7LOFGRE.js";
5
5
 
6
6
  // packages/ai/policy/runtimePolicy.ts
7
7
  var clampLevel = (value, fallback) => {
@@ -11,11 +11,11 @@ import {
11
11
  readPageFunc,
12
12
  readPageFunctionSchema,
13
13
  slateToSimplifiedMarkdown
14
- } from "./chunk-BOPFLKHA.js";
14
+ } from "./chunk-GC34RRTQ.js";
15
15
  import {
16
16
  sortSafeAgentSummaries,
17
17
  toSafeAgentSummary
18
- } from "./chunk-STRCGEC6.js";
18
+ } from "./chunk-HRJEPMZY.js";
19
19
  import {
20
20
  getUserDataItemTimestamp,
21
21
  mergeAndDedupUserData
@@ -28,10 +28,10 @@ import {
28
28
  } from "./chunk-VF4K2QE6.js";
29
29
  import {
30
30
  createDocState
31
- } from "./chunk-BPZSJH5X.js";
31
+ } from "./chunk-VKBTAQWT.js";
32
32
  import {
33
33
  setDialogExtraReferencesAction
34
- } from "./chunk-WPRSBZYN.js";
34
+ } from "./chunk-6HTWA77J.js";
35
35
  import {
36
36
  extractMentionsFromSlate
37
37
  } from "./chunk-VP4WJWKW.js";
@@ -44,7 +44,7 @@ import {
44
44
  buildBuiltinObjectSkillDbKey,
45
45
  buildBuiltinObjectSkillPageContent,
46
46
  createDialogAction
47
- } from "./chunk-7CP4UOUV.js";
47
+ } from "./chunk-GMJS5AYP.js";
48
48
  import {
49
49
  addCategory,
50
50
  addContentToSpace,
@@ -75,13 +75,13 @@ import {
75
75
  updateContentCategory,
76
76
  updateContentTitle,
77
77
  updateStep
78
- } from "./chunk-RD6AOXQI.js";
78
+ } from "./chunk-UFL6WHHJ.js";
79
79
  import {
80
80
  createAgent,
81
81
  runLlm,
82
82
  streamAgentChatTurn,
83
83
  updateAgent
84
- } from "./chunk-MUI34IA2.js";
84
+ } from "./chunk-RJBTU7AS.js";
85
85
  import {
86
86
  CODING_SKILL_SLUGS,
87
87
  buildCodingSkillConfig,
@@ -102,6 +102,7 @@ import {
102
102
  } from "./chunk-ZWJOGMKH.js";
103
103
  import {
104
104
  NOLO_WORKSPACE_TOOL_NAMES,
105
+ buildAgentRuntimeAgentLookupKeys,
105
106
  buildNoloSubjectRefQueryTarget,
106
107
  buildNoloTableQueryRequest,
107
108
  clampNoloPositiveInteger,
@@ -113,10 +114,10 @@ import {
113
114
  redactAgentRecordForWorkspaceTool,
114
115
  resolveNoloDialogInput,
115
116
  verifyNoloDialogSubjectRefQuery
116
- } from "./chunk-PFTK5SEB.js";
117
+ } from "./chunk-UEOPA6MV.js";
117
118
  import {
118
119
  buildDatabaseFileContentUrl
119
- } from "./chunk-PMSG3OGF.js";
120
+ } from "./chunk-HYSJHRWD.js";
120
121
  import {
121
122
  DEFAULT_MODEL
122
123
  } from "./chunk-GT3GG2H7.js";
@@ -131,7 +132,7 @@ import {
131
132
  getRequestConfig,
132
133
  getToolBaseUrl,
133
134
  getToolRequestContext
134
- } from "./chunk-PB7G5MAM.js";
135
+ } from "./chunk-OMP5L5NF.js";
135
136
  import {
136
137
  getActiveDialogKey,
137
138
  require_react,
@@ -155,7 +156,7 @@ import {
155
156
  } from "./chunk-HNMXYYJR.js";
156
157
  import {
157
158
  shareResourceAction
158
- } from "./chunk-Z3LLUGD5.js";
159
+ } from "./chunk-HRPWRVBI.js";
159
160
  import {
160
161
  AGENT_UPDATE_FIELD_NAMES,
161
162
  nolotusId,
@@ -163,7 +164,7 @@ import {
163
164
  selectAutoApproveSelfUpdateFields,
164
165
  selectCurrentServer,
165
166
  selectSyncServers
166
- } from "./chunk-ENUJPSZN.js";
167
+ } from "./chunk-R7LOFGRE.js";
167
168
  import {
168
169
  asRecordOrEmpty
169
170
  } from "./chunk-KX6YBIHG.js";
@@ -171,7 +172,7 @@ import {
171
172
  addContentAction,
172
173
  createSpaceKey,
173
174
  normalizeSpaceId
174
- } from "./chunk-DBUNOYLF.js";
175
+ } from "./chunk-JSB4N6NU.js";
175
176
  import {
176
177
  patch,
177
178
  read,
@@ -180,7 +181,7 @@ import {
180
181
  selectById,
181
182
  toTimestampMs,
182
183
  write
183
- } from "./chunk-JYSXE6LE.js";
184
+ } from "./chunk-G2BZ43DV.js";
184
185
  import {
185
186
  SEPARATOR,
186
187
  createAgentKey,
@@ -206,7 +207,7 @@ import {
206
207
  import {
207
208
  DEFAULT_CODE_PLANNER_EXECUTOR_CANDIDATE_KEYS,
208
209
  readAction
209
- } from "./chunk-NWT2WUCY.js";
210
+ } from "./chunk-L6RBX4L4.js";
210
211
  import {
211
212
  createAsyncThunk,
212
213
  getRuntimeServerContext,
@@ -223,7 +224,7 @@ import {
223
224
  } from "./chunk-3EUW3WEO.js";
224
225
  import {
225
226
  extractCustomId
226
- } from "./chunk-SLOGKB7M.js";
227
+ } from "./chunk-TOW4E763.js";
227
228
  import {
228
229
  isRecord
229
230
  } from "./chunk-KUG52IAP.js";
@@ -14773,7 +14774,7 @@ async function deleteDialogsFunc(args, thunkApi) {
14773
14774
  const deletedDialogIds = [];
14774
14775
  const deletedDialogKeys = [];
14775
14776
  const failures = [];
14776
- const { deleteDialog } = await import("./dialogSlice-TKYB6VLO.js");
14777
+ const { deleteDialog } = await import("./dialogSlice-UDOKNDHB.js");
14777
14778
  for (const target of targets) {
14778
14779
  try {
14779
14780
  await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
@@ -14921,7 +14922,7 @@ async function readAgentFunc(args, thunkApi) {
14921
14922
  const rawAgent = asTrimmedString(args?.agent) || asTrimmedString(args?.agentKey) || asTrimmedString(args?.id);
14922
14923
  if (!rawAgent) throw new Error("readAgent requires agent.");
14923
14924
  const raw = rawAgent.startsWith("http://") || rawAgent.startsWith("https://") ? new URL(rawAgent).pathname.split("/").filter(Boolean).at(-1) ?? rawAgent : rawAgent;
14924
- const candidates = raw.startsWith("agent-") ? [raw] : [`agent-${userId}-${raw}`, `agent-pub-${raw}`];
14925
+ const candidates = buildAgentRuntimeAgentLookupKeys({ agentRef: raw, userId });
14925
14926
  for (const candidate of candidates) {
14926
14927
  const record = await readBestRecord(thunkApi, candidate, true);
14927
14928
  if (record) {
@@ -15042,7 +15043,7 @@ var readSkillDocFunctionSchema = {
15042
15043
  }
15043
15044
  };
15044
15045
  async function readSkillDocFunc(args, thunkApi) {
15045
- const { buildReadDocResult } = await import("./readDocTool-JAM5BI5Q.js");
15046
+ const { buildReadDocResult } = await import("./readDocTool-TOHRYJHP.js");
15046
15047
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
15047
15048
  if (typeof id !== "string" || !id.trim()) {
15048
15049
  throw new Error("readSkillDoc requires id or doc.");
@@ -19717,7 +19718,7 @@ var cloudflareCrawlStatusFunctionSchema = {
19717
19718
  async function cloudflareCrawlStatusFunc(args, thunkApi) {
19718
19719
  const { jobId, limit, status, cursor } = args;
19719
19720
  if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
19720
- const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-ISM4ZQX4.js");
19721
+ const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-WVTUYOFM.js");
19721
19722
  const { baseUrl, token } = getToolRequestContext2(thunkApi);
19722
19723
  const params = new URLSearchParams();
19723
19724
  if (limit !== void 0) params.set("limit", String(limit));
@@ -20492,7 +20493,7 @@ var selectUserIdFromState = (state) => typeof state?.auth?.currentUser?.userId =
20492
20493
  var selectCurrentServerFromState = (state) => typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : null;
20493
20494
  async function addImageContentToSpace(input) {
20494
20495
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
20495
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-HLTFX56O.js")).addContentAction;
20496
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-MPGMBJTQ.js")).addContentAction;
20496
20497
  await addContentAction2(
20497
20498
  {
20498
20499
  spaceId: input.spaceId,
@@ -24175,7 +24176,7 @@ var executeToolRun = createAsyncThunk(
24175
24176
  if (!executionInput) {
24176
24177
  throw new Error(`ToolRun ${id} has no input to execute with.`);
24177
24178
  }
24178
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-A6MUIA3Q.js");
24179
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-5V6FHWQU.js");
24179
24180
  const { executor } = findToolExecutor2(run.toolName);
24180
24181
  toolRunStarted({
24181
24182
  id: run.id,
@@ -24199,7 +24200,7 @@ var executeToolRun = createAsyncThunk(
24199
24200
  const latestState = thunkApi.getState();
24200
24201
  const userId = latestState.auth?.currentUser?.userId;
24201
24202
  if (userId) {
24202
- const { fetchUserSpaceMemberships } = await import("./spaceSlice-RC2APBOD.js");
24203
+ const { fetchUserSpaceMemberships } = await import("./spaceSlice-BXDCO6PT.js");
24203
24204
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
24204
24205
  }
24205
24206
  }
@@ -26682,7 +26683,7 @@ async function updateDocFunc(args, thunkApi) {
26682
26683
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
26683
26684
  };
26684
26685
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
26685
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-E5QAM75M.js");
26686
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-N66O4CGH.js");
26686
26687
  if (getDocState().pageKey === id) {
26687
26688
  applyExternalDocUpdate({
26688
26689
  slateData: finalSlateData,
@@ -26707,7 +26708,7 @@ async function updateDocFunc(args, thunkApi) {
26707
26708
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
26708
26709
  async function dispatchSetSettings(thunkApi, changes) {
26709
26710
  const injectedSetSettings = thunkApi?.extra?.setSettings;
26710
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-22GTX6CA.js")).setSettings;
26711
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-IDUM4LWU.js")).setSettings;
26711
26712
  await thunkApi.dispatch(setSettings(changes)).unwrap();
26712
26713
  }
26713
26714
  var updateUserPreferenceProfileFunctionSchema = {
@@ -11,7 +11,7 @@ import {
11
11
  planContextUsage,
12
12
  resolveBuiltinPlatformAgentConfig,
13
13
  serializeMessageContent
14
- } from "./chunk-PMSG3OGF.js";
14
+ } from "./chunk-HYSJHRWD.js";
15
15
  import {
16
16
  clipCompactText
17
17
  } from "./chunk-5MMAK75Q.js";
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-QSJ3HFEF.js";
41
41
  import {
42
42
  PUBLIC_KIMI_K26_IMAGE_AGENT_KEY
43
- } from "./chunk-NWT2WUCY.js";
43
+ } from "./chunk-L6RBX4L4.js";
44
44
  import {
45
45
  isRecord
46
46
  } from "./chunk-KUG52IAP.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-RD6AOXQI.js";
3
+ } from "./chunk-UFL6WHHJ.js";
4
4
  import "./chunk-XOIF2TNF.js";
5
5
  import "./chunk-MRC4Q34M.js";
6
6
  import "./chunk-SIZQB7BD.js";
7
- import "./chunk-MUI34IA2.js";
7
+ import "./chunk-RJBTU7AS.js";
8
8
  import "./chunk-YYLHWIW6.js";
9
9
  import "./chunk-CWMSB67P.js";
10
- import "./chunk-INWBJPQC.js";
10
+ import "./chunk-IC7W63RM.js";
11
11
  import "./chunk-5RGU3J7P.js";
12
12
  import "./chunk-M76ECQRD.js";
13
13
  import "./chunk-L65QKSVJ.js";
14
- import "./chunk-PMSG3OGF.js";
14
+ import "./chunk-HYSJHRWD.js";
15
15
  import "./chunk-5MMAK75Q.js";
16
16
  import "./chunk-5CS33IBL.js";
17
17
  import "./chunk-JZPBVBIY.js";
@@ -22,14 +22,14 @@ import "./chunk-DWLEOOGR.js";
22
22
  import "./chunk-HNMXYYJR.js";
23
23
  import "./chunk-L3QFIBZG.js";
24
24
  import "./chunk-YTA2QOEE.js";
25
- import "./chunk-ENUJPSZN.js";
25
+ import "./chunk-R7LOFGRE.js";
26
26
  import "./chunk-Y5GCAMGP.js";
27
27
  import "./chunk-UZ6XXCVR.js";
28
28
  import "./chunk-KX6YBIHG.js";
29
- import "./chunk-DBUNOYLF.js";
29
+ import "./chunk-JSB4N6NU.js";
30
30
  import {
31
31
  write
32
- } from "./chunk-JYSXE6LE.js";
32
+ } from "./chunk-G2BZ43DV.js";
33
33
  import {
34
34
  buildAgentAutomationOwnerIndexValue,
35
35
  createAgentAutomationKey,
@@ -39,7 +39,7 @@ import "./chunk-WWC7I6TA.js";
39
39
  import "./chunk-SKDNBYZK.js";
40
40
  import "./chunk-I42VC5KR.js";
41
41
  import "./chunk-QSJ3HFEF.js";
42
- import "./chunk-NWT2WUCY.js";
42
+ import "./chunk-L6RBX4L4.js";
43
43
  import {
44
44
  selectIdentityUserId
45
45
  } from "./chunk-XMLRJUU5.js";
@@ -49,7 +49,7 @@ import {
49
49
  asTrimmedString
50
50
  } from "./chunk-3EUW3WEO.js";
51
51
  import "./chunk-U6VC4MU4.js";
52
- import "./chunk-SLOGKB7M.js";
52
+ import "./chunk-TOW4E763.js";
53
53
  import "./chunk-KUG52IAP.js";
54
54
  import "./chunk-LCBAMY2M.js";
55
55
  import "./chunk-4SN6J65J.js";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  createDialogAction,
3
3
  isLocalOwnerDialogAgents
4
- } from "./chunk-7CP4UOUV.js";
5
- import "./chunk-RD6AOXQI.js";
4
+ } from "./chunk-GMJS5AYP.js";
5
+ import "./chunk-UFL6WHHJ.js";
6
6
  import "./chunk-XOIF2TNF.js";
7
7
  import "./chunk-MRC4Q34M.js";
8
8
  import "./chunk-SIZQB7BD.js";
9
- import "./chunk-MUI34IA2.js";
9
+ import "./chunk-RJBTU7AS.js";
10
10
  import "./chunk-YYLHWIW6.js";
11
11
  import "./chunk-CWMSB67P.js";
12
- import "./chunk-INWBJPQC.js";
12
+ import "./chunk-IC7W63RM.js";
13
13
  import "./chunk-5RGU3J7P.js";
14
14
  import "./chunk-M76ECQRD.js";
15
15
  import "./chunk-L65QKSVJ.js";
16
16
  import "./chunk-CF7S2RYZ.js";
17
17
  import "./chunk-ZWJOGMKH.js";
18
18
  import "./chunk-WZSRQNQG.js";
19
- import "./chunk-PMSG3OGF.js";
19
+ import "./chunk-HYSJHRWD.js";
20
20
  import "./chunk-5MMAK75Q.js";
21
21
  import "./chunk-5CS33IBL.js";
22
22
  import "./chunk-JZPBVBIY.js";
@@ -27,24 +27,24 @@ import "./chunk-DWLEOOGR.js";
27
27
  import "./chunk-HNMXYYJR.js";
28
28
  import "./chunk-L3QFIBZG.js";
29
29
  import "./chunk-YTA2QOEE.js";
30
- import "./chunk-ENUJPSZN.js";
30
+ import "./chunk-R7LOFGRE.js";
31
31
  import "./chunk-Y5GCAMGP.js";
32
32
  import "./chunk-UZ6XXCVR.js";
33
33
  import "./chunk-KX6YBIHG.js";
34
- import "./chunk-DBUNOYLF.js";
35
- import "./chunk-JYSXE6LE.js";
34
+ import "./chunk-JSB4N6NU.js";
35
+ import "./chunk-G2BZ43DV.js";
36
36
  import "./chunk-NRY4GCKJ.js";
37
37
  import "./chunk-WWC7I6TA.js";
38
38
  import "./chunk-SKDNBYZK.js";
39
39
  import "./chunk-I42VC5KR.js";
40
40
  import "./chunk-QSJ3HFEF.js";
41
- import "./chunk-NWT2WUCY.js";
41
+ import "./chunk-L6RBX4L4.js";
42
42
  import "./chunk-XMLRJUU5.js";
43
43
  import "./chunk-R5V5G73M.js";
44
44
  import "./chunk-GBRG75BQ.js";
45
45
  import "./chunk-3EUW3WEO.js";
46
46
  import "./chunk-U6VC4MU4.js";
47
- import "./chunk-SLOGKB7M.js";
47
+ import "./chunk-TOW4E763.js";
48
48
  import "./chunk-KUG52IAP.js";
49
49
  import "./chunk-LCBAMY2M.js";
50
50
  import "./chunk-4SN6J65J.js";