nolo-cli 0.189.0-alpha.1 → 0.189.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/{_executeModel-7GFCTOFY.js → _executeModel-QOFXEPSS.js} +25 -25
  2. package/{action-HQXK4ZT4.js → action-BHWB4MOK.js} +2 -2
  3. package/{addContentAction-3WAN3OWY.js → addContentAction-BY375D35.js} +3 -3
  4. package/{addDialogAgentAction-WNQBFR5G.js → addDialogAgentAction-HOZYOCWC.js} +2 -2
  5. package/{agentDeleteCommand-GXYAEUFQ.js → agentDeleteCommand-LRSEXEB6.js} +27 -27
  6. package/{agentEmailCommands-WYZKZBPZ.js → agentEmailCommands-2DA2QEMT.js} +28 -28
  7. package/{agentListCommands-POWEO3US.js → agentListCommands-QPK6UASU.js} +11 -11
  8. package/{agentMachineCommands-LD4UKJ47.js → agentMachineCommands-ZJRERHQH.js} +8 -8
  9. package/{agentRecordCommands-O6SOBL37.js → agentRecordCommands-GCX7AEMX.js} +27 -27
  10. package/{agentRunCommand-JZ5CH3DL.js → agentRunCommand-4SK32PJ3.js} +28 -28
  11. package/{agentRuntimeLocal-G4KEXO5D.js → agentRuntimeLocal-3U5XRLAK.js} +5 -5
  12. package/{agentSlice-STUDWJJZ.js → agentSlice-65HNASAY.js} +3 -3
  13. package/{appDeleteCommands-GZPGKI2Z.js → appDeleteCommands-SHM3KTWX.js} +10 -10
  14. package/{appDeployCommands-5UU3V5OK.js → appDeployCommands-WT5PP4UE.js} +10 -10
  15. package/{appDeployStatusCommands-2ZB2QZ22.js → appDeployStatusCommands-QTJB5BD5.js} +10 -10
  16. package/{appGetCommands-YSZFBV5G.js → appGetCommands-XYTHPEAY.js} +10 -10
  17. package/{appListCommands-W6D7XIFX.js → appListCommands-2XJ33HSC.js} +10 -10
  18. package/{authCommand-L6C4LLOU.js → authCommand-RV5MQDWN.js} +3 -3
  19. package/{authCommands-RFLKIPBT.js → authCommands-MZUXPRYJ.js} +2 -2
  20. package/{builtinSkillRegistry-2VN6JG4U.js → builtinSkillRegistry-7MBUY5EY.js} +3 -3
  21. package/{chromeOpsCommands-BTIWDYLA.js → chromeOpsCommands-BA6CS4DI.js} +5 -1
  22. package/{chunk-3QFOYFJW.js → chunk-4ITFEPCV.js} +4 -4
  23. package/{chunk-XTM23OUX.js → chunk-4OB2TWTW.js} +2 -2
  24. package/{chunk-GSX7Z46F.js → chunk-5HAPEKNH.js} +1 -1
  25. package/{chunk-PVZ3GB25.js → chunk-5IWKNSOS.js} +5 -5
  26. package/{chunk-53RSTB7T.js → chunk-5N5FMA7J.js} +1 -1
  27. package/{chunk-RANCLEEC.js → chunk-5TAX33Z3.js} +10 -10
  28. package/{chunk-O2MBTX37.js → chunk-6XWKAFHB.js} +4 -4
  29. package/{chunk-H6FUDBS3.js → chunk-7DQTUEMG.js} +5 -5
  30. package/{chunk-JOOWHDGM.js → chunk-A5BLRE3G.js} +1 -1
  31. package/{chunk-Y2ZDNW2H.js → chunk-B2N5GZBU.js} +2 -2
  32. package/{chunk-7SJG5ZNX.js → chunk-B6EZB6DW.js} +1 -1
  33. package/{chunk-4OTMONZL.js → chunk-BPQ7HF7B.js} +9 -9
  34. package/{chunk-CLGAGPEM.js → chunk-CNMQATUF.js} +1 -1
  35. package/{chunk-6G5V4Y3V.js → chunk-CNWXWENP.js} +67 -43
  36. package/{chunk-KOIGM3KU.js → chunk-CWHFD46Z.js} +1 -1
  37. package/{chunk-ER4UTWWS.js → chunk-DFF6B7P7.js} +1 -1
  38. package/{chunk-PCPQWTXJ.js → chunk-DM6EHCHZ.js} +1 -1
  39. package/{chunk-WMHWFFTE.js → chunk-ECX3NKRD.js} +46 -0
  40. package/{chunk-R6AJKHEU.js → chunk-FWWNKGI2.js} +3 -3
  41. package/{chunk-WBCYL63M.js → chunk-GFTVBBN3.js} +2 -2
  42. package/{chunk-J6ACCFU6.js → chunk-GU6DMIHV.js} +5 -5
  43. package/{chunk-7N6C3IHF.js → chunk-HDAK6PC4.js} +2 -2
  44. package/{chunk-OKFKGCTS.js → chunk-HTLIKE5U.js} +2 -2
  45. package/{chunk-J7QGWFT6.js → chunk-HV7UAV6R.js} +39 -14
  46. package/{chunk-LOQYQUM2.js → chunk-JGJVDP2W.js} +17 -17
  47. package/{chunk-S4W4GV3B.js → chunk-K6TZSON4.js} +1 -1
  48. package/{chunk-RGTPR57U.js → chunk-KKUMQLZV.js} +4 -4
  49. package/{chunk-MMOISK6N.js → chunk-KZMDPBOW.js} +4 -4
  50. package/{chunk-4MZCYEK5.js → chunk-LRIMG3ZZ.js} +2 -2
  51. package/{chunk-HVV4B6OL.js → chunk-MEJLTHBK.js} +214 -47
  52. package/{chunk-UBLITLAZ.js → chunk-NABJEYPJ.js} +1 -0
  53. package/{chunk-I3HWJODB.js → chunk-OWCWVNX2.js} +1 -1
  54. package/{chunk-OXOXPREC.js → chunk-SM56M7N7.js} +1 -1
  55. package/{chunk-TNVE3CAV.js → chunk-UF3YPO4W.js} +5 -5
  56. package/{chunk-IFN7MHWL.js → chunk-UGCQKKXW.js} +1 -1
  57. package/{chunk-63RO7QWZ.js → chunk-UNOILAZP.js} +10 -0
  58. package/{chunk-7GXK3WTO.js → chunk-WAZ6BTSC.js} +1 -1
  59. package/{chunk-5LVGXDSL.js → chunk-WDJMTI5S.js} +2 -2
  60. package/{chunk-ZIOYHDYW.js → chunk-WXJBMIJG.js} +2 -2
  61. package/{chunk-RJ3EYB5G.js → chunk-X3RWBJDQ.js} +1 -1
  62. package/{chunk-YUZIPPER.js → chunk-YEFDL5BJ.js} +9 -3
  63. package/{chunk-RBVR7P3M.js → chunk-Z6L7XGF3.js} +18 -18
  64. package/{chunk-2SUNC7EM.js → chunk-ZZHMEFIF.js} +12 -12
  65. package/{commandRegistry-AXZLPIPP.js → commandRegistry-C47OOI5Q.js} +61 -61
  66. package/{contentThunks-E4DHXF3M.js → contentThunks-XEJIAVHB.js} +8 -8
  67. package/{cooldownCommands-ZERBBSWJ.js → cooldownCommands-4XKJFEBW.js} +1 -1
  68. package/{createAgentAutomationAction-2P2II7B3.js → createAgentAutomationAction-3DJQXHA2.js} +8 -8
  69. package/{createDialogAction-MFZGE5EO.js → createDialogAction-25VQQSAD.js} +10 -10
  70. package/{createPageAction-SBU2YCNR.js → createPageAction-EPTJF4F2.js} +8 -8
  71. package/{dbSlice-2O3YBVPP.js → dbSlice-QAUXABCC.js} +2 -2
  72. package/{dialogCommands-AQLB3TG2.js → dialogCommands-5RJ2ZD6I.js} +10 -10
  73. package/{dialogSlice-GKPCUQWM.js → dialogSlice-HYSCQTOK.js} +7 -7
  74. package/{dialogUsageCommand-44XMU6DD.js → dialogUsageCommand-QTG6ILEJ.js} +58 -5
  75. package/{docCreateCommands-AND3EMIY.js → docCreateCommands-F7IOVRUN.js} +9 -9
  76. package/{docDeleteCommands-WA7CPPN3.js → docDeleteCommands-YM75VYQH.js} +10 -10
  77. package/{docReadCommands-A4JLU4WF.js → docReadCommands-B6OOQQ2K.js} +9 -9
  78. package/{docStore-DOZVBVKZ.js → docStore-XW4O276W.js} +3 -3
  79. package/{docUpdateCommands-33PDSHS3.js → docUpdateCommands-WP6N64X5.js} +9 -9
  80. package/{fetchMessages-QLW7INJJ.js → fetchMessages-HWBVATSE.js} +1 -1
  81. package/{handleSendMessageAction-FY4RBJEA.js → handleSendMessageAction-AJQAPKZG.js} +15 -15
  82. package/index.js +6 -6
  83. package/{keys-N6HQICY5.js → keys-P4ZDOVJW.js} +11 -1
  84. package/{localDialogRead-55YDVPNU.js → localDialogRead-CT5HGDMC.js} +1 -1
  85. package/{localRuntimeAdapter-VOTHX3NK.js → localRuntimeAdapter-ZNBHLFHQ.js} +25 -25
  86. package/{machineCommands-FDTN3A5S.js → machineCommands-OJL3YYC7.js} +26 -26
  87. package/{machineWsRunDispatch-PPVYOERM.js → machineWsRunDispatch-HVHO5FF7.js} +26 -26
  88. package/{memberThunks-VXT36MZP.js → memberThunks-QWAAGQBS.js} +155 -52
  89. package/package.json +1 -1
  90. package/{readlineWorkspace-6SU3QTTY.js → readlineWorkspace-RXUSSWVA.js} +87 -41
  91. package/{removeDialogAgentAction-PK24DJ2J.js → removeDialogAgentAction-YEPO5AYI.js} +3 -3
  92. package/{runAgentClientLoop-CFIM6MXT.js → runAgentClientLoop-45RESAY7.js} +23 -23
  93. package/{secretCommands-UYVNIQIN.js → secretCommands-N6CMCJDZ.js} +1 -1
  94. package/{setDialogExtraReferencesAction-BN4IBUO6.js → setDialogExtraReferencesAction-EH5GWDAJ.js} +3 -3
  95. package/{setPrimaryDialogAgentAction-JR5SMLZY.js → setPrimaryDialogAgentAction-PNWRK6IY.js} +3 -3
  96. package/{settingThunks-RJZQHL7H.js → settingThunks-7VCWB6P7.js} +2 -2
  97. package/{spaceCommands-BI3TRIAK.js → spaceCommands-KW4V3QIE.js} +8 -8
  98. package/{streamAgentChatTurn-3BS7IAFR.js → streamAgentChatTurn-INSFKUQL.js} +25 -25
  99. package/{switchDialogAgentAction-TSIXBNRH.js → switchDialogAgentAction-23BFWJMV.js} +2 -2
  100. package/{tools-PCTUYG54.js → tools-WRQ4V7ML.js} +19 -19
  101. package/{updateCommands-6GKGM7NR.js → updateCommands-KE6LP3QX.js} +3 -3
  102. package/{updateDialogTitleAction-ZHFIMEQL.js → updateDialogTitleAction-Q3Z2YFIU.js} +8 -8
  103. package/{windowsSelfUpdate-4N7JCG2M.js → windowsSelfUpdate-26TSFXEZ.js} +2 -2
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  assembleAgentDiscoveryResult,
6
6
  resolveDiscoveryScope
7
- } from "./chunk-53RSTB7T.js";
7
+ } from "./chunk-5N5FMA7J.js";
8
8
  import {
9
9
  getUserDataItemTimestamp,
10
10
  mergeAndDedupUserData
@@ -17,6 +17,7 @@ import {
17
17
  } from "./chunk-VF4K2QE6.js";
18
18
  import {
19
19
  addMemberSpace,
20
+ applyFetchSpaceFulfilled,
20
21
  fetchAuthoritativeRemoteSpace,
21
22
  getAllMemberSpaces,
22
23
  removeMemberSpace,
@@ -24,9 +25,8 @@ import {
24
25
  setMembershipLoaded,
25
26
  setMembershipLoading,
26
27
  setMembershipRejected,
27
- setSpaceInitialized,
28
28
  updateMemberSpaceName
29
- } from "./chunk-LOQYQUM2.js";
29
+ } from "./chunk-JGJVDP2W.js";
30
30
  import {
31
31
  ToolResultError,
32
32
  clipMultilineText,
@@ -38,7 +38,7 @@ import {
38
38
  toolRunUpdated,
39
39
  uiCardFallback,
40
40
  waitForAbortableDelay
41
- } from "./chunk-O2MBTX37.js";
41
+ } from "./chunk-6XWKAFHB.js";
42
42
  import {
43
43
  isGatewayHttpStatus
44
44
  } from "./chunk-NF64D32W.js";
@@ -55,7 +55,7 @@ import {
55
55
  } from "./chunk-VYNMQ6HW.js";
56
56
  import {
57
57
  createDocState
58
- } from "./chunk-R6AJKHEU.js";
58
+ } from "./chunk-FWWNKGI2.js";
59
59
  import {
60
60
  ToolApiError,
61
61
  buildToolRequestHeaders,
@@ -66,7 +66,7 @@ import {
66
66
  } from "./chunk-MYOH447Z.js";
67
67
  import {
68
68
  setDialogExtraReferencesAction
69
- } from "./chunk-ER4UTWWS.js";
69
+ } from "./chunk-DFF6B7P7.js";
70
70
  import {
71
71
  readDocFunc,
72
72
  readDocFunctionSchema,
@@ -82,7 +82,7 @@ import {
82
82
  } from "./chunk-63W5N6P3.js";
83
83
  import {
84
84
  createDialogAction
85
- } from "./chunk-H6FUDBS3.js";
85
+ } from "./chunk-7DQTUEMG.js";
86
86
  import {
87
87
  DEFAULT_COLLAPSED_CATEGORIES,
88
88
  addContentToSpace,
@@ -99,7 +99,7 @@ import {
99
99
  updateContentCategory,
100
100
  updateContentTitle,
101
101
  writeStoredCollapsedCategories
102
- } from "./chunk-RGTPR57U.js";
102
+ } from "./chunk-KKUMQLZV.js";
103
103
  import {
104
104
  getCurrentSpaceId,
105
105
  getCurrentSpaceIdRaw,
@@ -122,14 +122,14 @@ import {
122
122
  selectMsgById,
123
123
  uiAskChoiceFunc,
124
124
  uiAskChoiceFunctionSchema
125
- } from "./chunk-RBVR7P3M.js";
125
+ } from "./chunk-Z6L7XGF3.js";
126
126
  import {
127
127
  createAgent,
128
128
  deleteServerSyncedCredential,
129
129
  runLlm,
130
130
  streamAgentChatTurn,
131
131
  updateAgent
132
- } from "./chunk-PVZ3GB25.js";
132
+ } from "./chunk-5IWKNSOS.js";
133
133
  import {
134
134
  buildMediaToolConfirmation,
135
135
  normalizeMediaConfirmExecutionRevision
@@ -138,7 +138,7 @@ import {
138
138
  UNCATEGORIZED_ID,
139
139
  addContentAction,
140
140
  checkSpaceMembership
141
- } from "./chunk-7SJG5ZNX.js";
141
+ } from "./chunk-B6EZB6DW.js";
142
142
  import {
143
143
  createSpaceKey,
144
144
  normalizeSpaceId
@@ -153,7 +153,7 @@ import {
153
153
  } from "./chunk-YDH3FDFQ.js";
154
154
  import {
155
155
  shareResourceAction
156
- } from "./chunk-CLGAGPEM.js";
156
+ } from "./chunk-CNMQATUF.js";
157
157
  import {
158
158
  selectCurrentServer,
159
159
  selectSyncServers
@@ -169,7 +169,7 @@ import {
169
169
  selectEntities,
170
170
  toTimestampMs,
171
171
  write
172
- } from "./chunk-Y2ZDNW2H.js";
172
+ } from "./chunk-B2N5GZBU.js";
173
173
  import {
174
174
  readAction
175
175
  } from "./chunk-LBXUNNDS.js";
@@ -199,10 +199,10 @@ import {
199
199
  import {
200
200
  listBuiltinSkills,
201
201
  resolveBuiltinSkillByName
202
- } from "./chunk-GSX7Z46F.js";
202
+ } from "./chunk-5HAPEKNH.js";
203
203
  import {
204
204
  CAPABILITY_PACKS
205
- } from "./chunk-OXOXPREC.js";
205
+ } from "./chunk-SM56M7N7.js";
206
206
  import {
207
207
  buildSkillDocMarkdown,
208
208
  normalizeSkillModalities,
@@ -229,7 +229,7 @@ import {
229
229
  resolveNoloDialogInput,
230
230
  resolveReadOnlyToolConstraints,
231
231
  verifyNoloDialogSubjectRefQuery
232
- } from "./chunk-UBLITLAZ.js";
232
+ } from "./chunk-NABJEYPJ.js";
233
233
  import {
234
234
  clipCompactText
235
235
  } from "./chunk-5MMAK75Q.js";
@@ -308,7 +308,7 @@ import {
308
308
  rowKey,
309
309
  splitKey,
310
310
  toTrimmedString
311
- } from "./chunk-WMHWFFTE.js";
311
+ } from "./chunk-ECX3NKRD.js";
312
312
  import {
313
313
  dialogMessageRange,
314
314
  isDialogKey,
@@ -3884,7 +3884,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3884
3884
  const deletedDialogIds = [];
3885
3885
  const deletedDialogKeys = [];
3886
3886
  const failures = [];
3887
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-GKPCUQWM.js");
3887
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-HYSCQTOK.js");
3888
3888
  for (const target of targets) {
3889
3889
  try {
3890
3890
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -4468,6 +4468,7 @@ var createInitialState = () => ({
4468
4468
  agentIds: [],
4469
4469
  contentIds: [],
4470
4470
  favoritedAtById: {},
4471
+ displaySummaryById: {},
4471
4472
  initialized: false,
4472
4473
  loading: false,
4473
4474
  snapshotComplete: false,
@@ -4491,9 +4492,11 @@ function removeFavoriteLocally(payload) {
4491
4492
  state = {
4492
4493
  ...state,
4493
4494
  agentIds: state.agentIds.filter((item) => item !== id),
4494
- favoritedAtById: { ...state.favoritedAtById }
4495
+ favoritedAtById: { ...state.favoritedAtById },
4496
+ displaySummaryById: { ...state.displaySummaryById }
4495
4497
  };
4496
4498
  delete state.favoritedAtById[id];
4499
+ delete state.displaySummaryById[id];
4497
4500
  notify();
4498
4501
  return;
4499
4502
  }
@@ -4501,9 +4504,11 @@ function removeFavoriteLocally(payload) {
4501
4504
  state = {
4502
4505
  ...state,
4503
4506
  contentIds: state.contentIds.filter((item) => item !== id),
4504
- favoritedAtById: { ...state.favoritedAtById }
4507
+ favoritedAtById: { ...state.favoritedAtById },
4508
+ displaySummaryById: { ...state.displaySummaryById }
4505
4509
  };
4506
4510
  delete state.favoritedAtById[id];
4511
+ delete state.displaySummaryById[id];
4507
4512
  notify();
4508
4513
  }
4509
4514
  }
@@ -4978,6 +4983,24 @@ var deleteSpaceAction = async (input, thunkAPI) => {
4978
4983
  return { spaceId, strategy };
4979
4984
  };
4980
4985
 
4986
+ // packages/create/space/withTimeout.ts
4987
+ var SPACE_LOCAL_READ_TIMEOUT_MS = 1500;
4988
+ var withTimeout = async (promise, ms = SPACE_LOCAL_READ_TIMEOUT_MS) => {
4989
+ let timer;
4990
+ try {
4991
+ return await Promise.race([
4992
+ promise,
4993
+ new Promise((resolve) => {
4994
+ timer = setTimeout(() => resolve(null), ms);
4995
+ })
4996
+ ]);
4997
+ } catch {
4998
+ return null;
4999
+ } finally {
5000
+ if (timer) clearTimeout(timer);
5001
+ }
5002
+ };
5003
+
4981
5004
  // packages/create/space/fetchSpaceAction.ts
4982
5005
  var fetchSpaceAction = async (input, thunkAPI) => {
4983
5006
  const rawSpaceId = typeof input === "string" ? input : input?.spaceId;
@@ -4990,15 +5013,9 @@ var fetchSpaceAction = async (input, thunkAPI) => {
4990
5013
  const spaceKey = createSpaceKey.space(spaceId);
4991
5014
  const readSpace = async (dbKey) => {
4992
5015
  try {
4993
- const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-2O3YBVPP.js");
4994
- if (fresh) {
4995
- return await dispatch(readAndWait2(dbKey)).unwrap();
4996
- }
4997
- return await dispatch(
4998
- read2({
4999
- dbKey
5000
- })
5001
- ).unwrap();
5016
+ const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-QAUXABCC.js");
5017
+ const readPromise = fresh ? dispatch(readAndWait2(dbKey)).unwrap() : dispatch(read2({ dbKey })).unwrap();
5018
+ return await withTimeout(readPromise);
5002
5019
  } catch {
5003
5020
  return null;
5004
5021
  }
@@ -5155,16 +5172,6 @@ var fetchSpaceSidebarStateAction = async (spaceId, thunkAPI) => {
5155
5172
  };
5156
5173
  };
5157
5174
 
5158
- // packages/create/space/applyFetchSpaceFulfilled.ts
5159
- function applyFetchSpaceFulfilled(payload) {
5160
- const { spaceId, spaceData } = payload;
5161
- const currentSpaceId = getCurrentSpaceIdRaw();
5162
- if (!currentSpaceId || currentSpaceId === spaceId) {
5163
- setCurrentSpaceBoth(spaceId, spaceData);
5164
- setSpaceInitialized();
5165
- }
5166
- }
5167
-
5168
5175
  // packages/create/space/changeSpaceAction.ts
5169
5176
  var getSpaceUpdatedAt2 = (space) => {
5170
5177
  if (!space) return 0;
@@ -5241,6 +5248,7 @@ var fetchSpaceSidebarState = createAsyncThunk(
5241
5248
  }
5242
5249
  }
5243
5250
  );
5251
+ var SPACE_SWITCH_TIMEOUT_MS = 1e4;
5244
5252
  var changeSpace = createAsyncThunk(
5245
5253
  "space/changeSpace",
5246
5254
  async (arg, thunkAPI) => {
@@ -5249,8 +5257,22 @@ var changeSpace = createAsyncThunk(
5249
5257
  setMembershipLoading();
5250
5258
  setCurrentSpace(null);
5251
5259
  }
5260
+ const actionPromise = changeSpaceAction(arg, thunkAPI);
5261
+ actionPromise.catch(() => {
5262
+ });
5263
+ let timeoutTimer;
5252
5264
  try {
5253
- const payload = await changeSpaceAction(arg, thunkAPI);
5265
+ const payload = await Promise.race([
5266
+ actionPromise,
5267
+ new Promise((_, reject) => {
5268
+ timeoutTimer = setTimeout(
5269
+ () => reject(
5270
+ new Error("\u5207\u6362\u7A7A\u95F4\u8D85\u65F6\uFF1A\u672C\u5730\u5B58\u50A8\u6216\u670D\u52A1\u7AEF\u672A\u5728\u65F6\u9650\u5185\u8FD4\u56DE")
5271
+ ),
5272
+ SPACE_SWITCH_TIMEOUT_MS
5273
+ );
5274
+ })
5275
+ ]);
5254
5276
  setCurrentSpaceBoth(payload.spaceId, payload.spaceData);
5255
5277
  setMembershipLoaded();
5256
5278
  setCollapsedCategories(
@@ -5263,6 +5285,8 @@ var changeSpace = createAsyncThunk(
5263
5285
  setCurrentSpaceBoth(null, null);
5264
5286
  setCollapsedCategories({}, null);
5265
5287
  throw error;
5288
+ } finally {
5289
+ if (timeoutTimer) clearTimeout(timeoutTimer);
5266
5290
  }
5267
5291
  }
5268
5292
  );
@@ -11637,7 +11661,7 @@ var selectUserIdFromState = (state2) => {
11637
11661
  var selectCurrentServerFromState = (state2) => typeof state2?.settings?.currentServer === "string" ? state2.settings.currentServer : null;
11638
11662
  async function addImageContentToSpace(input) {
11639
11663
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
11640
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-3WAN3OWY.js")).addContentAction;
11664
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-BY375D35.js")).addContentAction;
11641
11665
  await addContentAction2(
11642
11666
  {
11643
11667
  spaceId: input.spaceId,
@@ -18566,7 +18590,7 @@ async function updateDocFunc(args, thunkApi) {
18566
18590
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
18567
18591
  };
18568
18592
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
18569
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-DOZVBVKZ.js");
18593
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-XW4O276W.js");
18570
18594
  if (getDocState().pageKey === id) {
18571
18595
  applyExternalDocUpdate({
18572
18596
  slateData: finalSlateData,
@@ -18591,7 +18615,7 @@ async function updateDocFunc(args, thunkApi) {
18591
18615
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
18592
18616
  async function dispatchSetSettings(thunkApi, changes) {
18593
18617
  const injectedSetSettings = thunkApi?.extra?.setSettings;
18594
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-RJZQHL7H.js")).setSettings;
18618
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-7VCWB6P7.js")).setSettings;
18595
18619
  await thunkApi.dispatch(setSettings(changes)).unwrap();
18596
18620
  }
18597
18621
  var updateUserPreferenceProfileFunctionSchema = {
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-WBCYL63M.js";
5
+ } from "./chunk-GFTVBBN3.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-OXME3PEE.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-Y2ZDNW2H.js";
10
+ } from "./chunk-B2N5GZBU.js";
11
11
 
12
12
  // packages/chat/dialog/actions/setDialogExtraReferencesAction.ts
13
13
  var setDialogExtraReferencesAction = async (extraReferences, thunkApi) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-WBCYL63M.js";
4
+ } from "./chunk-GFTVBBN3.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -2990,6 +2990,47 @@ var createTokenKey = {
2990
2990
  end: createKey("token", userId, "\uFFFF")
2991
2991
  })
2992
2992
  };
2993
+ var TOKEN_DIALOG_INDEX_PREFIX = "idx-token-dialog";
2994
+ var encodeTokenIndexSegment = (segment) => {
2995
+ let out = "";
2996
+ for (const ch of segment) {
2997
+ if (/[A-Za-z0-9]/.test(ch)) {
2998
+ out += ch;
2999
+ continue;
3000
+ }
3001
+ for (const byte of new TextEncoder().encode(ch)) {
3002
+ out += `%${byte.toString(16).toUpperCase().padStart(2, "0")}`;
3003
+ }
3004
+ }
3005
+ return out;
3006
+ };
3007
+ var createTokenDialogIndexKey = Object.assign(
3008
+ (userId, dialogId, callId) => createKey(
3009
+ TOKEN_DIALOG_INDEX_PREFIX,
3010
+ encodeTokenIndexSegment(userId),
3011
+ encodeTokenIndexSegment(dialogId),
3012
+ encodeTokenIndexSegment(callId)
3013
+ ),
3014
+ {
3015
+ /** 某个用户在某个对话下的全部索引项范围(范围扫描用) */
3016
+ rangeOfDialog: (userId, dialogId) => ({
3017
+ start: createKey(
3018
+ TOKEN_DIALOG_INDEX_PREFIX,
3019
+ encodeTokenIndexSegment(userId),
3020
+ encodeTokenIndexSegment(dialogId),
3021
+ ""
3022
+ ),
3023
+ end: createKey(
3024
+ TOKEN_DIALOG_INDEX_PREFIX,
3025
+ encodeTokenIndexSegment(userId),
3026
+ encodeTokenIndexSegment(dialogId),
3027
+ "\uFFFF"
3028
+ )
3029
+ })
3030
+ }
3031
+ );
3032
+ var TOKEN_DIALOG_INDEX_FORMAT = "v2";
3033
+ var createTokenDialogBackfillKey = (userId) => createKey("idx-tokendlg-backfill", encodeTokenIndexSegment(userId));
2993
3034
  var createTokenStatsKey = Object.assign(
2994
3035
  (userId, dateKey) => createKey("token", "stats", "day", "user", userId, dateKey),
2995
3036
  {
@@ -3461,6 +3502,11 @@ export {
3461
3502
  memorySubjectKindRange,
3462
3503
  createTransactionKey,
3463
3504
  createTokenKey,
3505
+ TOKEN_DIALOG_INDEX_PREFIX,
3506
+ encodeTokenIndexSegment,
3507
+ createTokenDialogIndexKey,
3508
+ TOKEN_DIALOG_INDEX_FORMAT,
3509
+ createTokenDialogBackfillKey,
3464
3510
  createTokenStatsKey,
3465
3511
  createTokenStatsAppliedKey,
3466
3512
  isTokenStatsKey,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  readAndWait
10
- } from "./chunk-Y2ZDNW2H.js";
10
+ } from "./chunk-B2N5GZBU.js";
11
11
  import {
12
12
  toErrorMessage
13
13
  } from "./chunk-HNMXYYJR.js";
@@ -333,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
333
333
  ).unwrap();
334
334
  if (dbSpaceId) {
335
335
  try {
336
- const { updateContentTitle } = await import("./contentThunks-E4DHXF3M.js");
336
+ const { updateContentTitle } = await import("./contentThunks-XEJIAVHB.js");
337
337
  await dispatch(
338
338
  updateContentTitle({
339
339
  spaceId: dbSpaceId,
@@ -372,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
372
372
  }
373
373
  }
374
374
  async function createDocState(args, thunkApi) {
375
- const { createPageAction } = await import("./createPageAction-SBU2YCNR.js");
375
+ const { createPageAction } = await import("./createPageAction-EPTJF4F2.js");
376
376
  return createPageAction(args, thunkApi);
377
377
  }
378
378
  function subscribe(listener) {
@@ -3,7 +3,7 @@ import {
3
3
  classifyAgentApiKeyRef,
4
4
  formatUnsupportedAgentApiKeyRefMessage,
5
5
  shouldReadAgentKeyRemotely
6
- } from "./chunk-RJ3EYB5G.js";
6
+ } from "./chunk-X3RWBJDQ.js";
7
7
  import {
8
8
  resolveCliAgentKeyInput
9
9
  } from "./chunk-NBTY7YJF.js";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-Y6ROFCZO.js";
24
24
  import {
25
25
  createAgentKey
26
- } from "./chunk-WMHWFFTE.js";
26
+ } from "./chunk-ECX3NKRD.js";
27
27
 
28
28
  // packages/cli/agentRecordHelpers.ts
29
29
  import { readFileSync } from "node:fs";
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-KOIGM3KU.js";
10
+ } from "./chunk-CWHFD46Z.js";
11
11
  import {
12
12
  parsePositiveFiniteNumberOrFallback
13
13
  } from "./chunk-Y5GCAMGP.js";
@@ -43,7 +43,7 @@ import {
43
43
  boundSummaryText,
44
44
  buildDialogReadEnvelope,
45
45
  projectDialogReadForAgent
46
- } from "./chunk-UBLITLAZ.js";
46
+ } from "./chunk-NABJEYPJ.js";
47
47
  import {
48
48
  asRecordOrEmpty
49
49
  } from "./chunk-KX6YBIHG.js";
@@ -69,7 +69,7 @@ import {
69
69
  } from "./chunk-4SN6J65J.js";
70
70
  import {
71
71
  t
72
- } from "./chunk-63RO7QWZ.js";
72
+ } from "./chunk-UNOILAZP.js";
73
73
  import {
74
74
  asNonEmptyStringArray,
75
75
  asTrimmedNonEmptyStringArray
@@ -780,7 +780,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
780
780
  return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
781
781
  }
782
782
  async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
783
- const reader = readLocalDialog ?? (await import("./localDialogRead-55YDVPNU.js")).readDialogFromLocalDb;
783
+ const reader = readLocalDialog ?? (await import("./localDialogRead-CT5HGDMC.js")).readDialogFromLocalDb;
784
784
  const result = await reader({ dialogKey, dialogId, limit });
785
785
  return {
786
786
  ...result,
@@ -795,7 +795,7 @@ async function readLocalDialogAtDbPathDefault(args) {
795
795
  );
796
796
  }
797
797
  const db = await getDefaultCliLocalRuntimeDb();
798
- const { readDialogFromLocalDb: reader } = await import("./localDialogRead-55YDVPNU.js");
798
+ const { readDialogFromLocalDb: reader } = await import("./localDialogRead-CT5HGDMC.js");
799
799
  return reader({ ...args, db });
800
800
  }
801
801
  async function readDialogFromLocalDbWithFallback(args) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-3QFOYFJW.js";
4
+ } from "./chunk-4ITFEPCV.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-RBVR7P3M.js";
7
+ } from "./chunk-Z6L7XGF3.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-OWYYDMGJ.js";
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-Y6ROFCZO.js";
16
16
  import {
17
17
  scheduleWindowsSelfUpdate
18
- } from "./chunk-7GXK3WTO.js";
18
+ } from "./chunk-WAZ6BTSC.js";
19
19
  import {
20
20
  t
21
- } from "./chunk-63RO7QWZ.js";
21
+ } from "./chunk-UNOILAZP.js";
22
22
 
23
23
  // packages/cli/updateCommands.ts
24
24
  import { existsSync, readFileSync, accessSync, constants } from "node:fs";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  OAUTH_PROVIDER_REFS,
21
21
  buildLocalAgentLookupKeys
22
- } from "./chunk-RJ3EYB5G.js";
22
+ } from "./chunk-X3RWBJDQ.js";
23
23
  import {
24
24
  LOCAL_CODEX_AGENT_ID,
25
25
  LOCAL_CODEX_AGENT_KEY,
@@ -60,7 +60,7 @@ import {
60
60
  import {
61
61
  inlineImageUrlsForCustomProvider,
62
62
  prepareTools
63
- } from "./chunk-ZIOYHDYW.js";
63
+ } from "./chunk-WXJBMIJG.js";
64
64
  import {
65
65
  getServerProviderSecret
66
66
  } from "./chunk-HS7MLR74.js";
@@ -82,7 +82,7 @@ import {
82
82
  resolveCliLocalRuntimeKeyCapability,
83
83
  resolveCliLocalSpawnDispatch,
84
84
  resolveStartAgentRunCwd
85
- } from "./chunk-6G5V4Y3V.js";
85
+ } from "./chunk-CNWXWENP.js";
86
86
  import {
87
87
  fetchWithTransientRetry,
88
88
  isTransientFetchError
@@ -90,10 +90,10 @@ import {
90
90
  import {
91
91
  deriveCredentialGroup,
92
92
  deriveCustomProviderCredentialGroup
93
- } from "./chunk-53RSTB7T.js";
93
+ } from "./chunk-5N5FMA7J.js";
94
94
  import {
95
95
  resolveAgentRequiredPackIds
96
- } from "./chunk-O2MBTX37.js";
96
+ } from "./chunk-6XWKAFHB.js";
97
97
  import {
98
98
  applyBuiltinAgentRuntimeOverride,
99
99
  applyTokenUsageToDayStats,
@@ -102,14 +102,14 @@ import {
102
102
  resolveBuiltinPlatformAgentConfig,
103
103
  runKeyed,
104
104
  validateAskChoiceInput
105
- } from "./chunk-RBVR7P3M.js";
105
+ } from "./chunk-Z6L7XGF3.js";
106
106
  import {
107
107
  BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
108
108
  BUILTIN_TITLE_LLM_CONFIG
109
109
  } from "./chunk-523DITKR.js";
110
110
  import {
111
111
  fetchServerSyncedCredential
112
- } from "./chunk-PVZ3GB25.js";
112
+ } from "./chunk-5IWKNSOS.js";
113
113
  import {
114
114
  getDefaultCliLocalRuntimeDb
115
115
  } from "./chunk-P64WRQYV.js";
@@ -125,7 +125,7 @@ import {
125
125
  applySystemBuiltinSkillFilter,
126
126
  expandEnabledPacks,
127
127
  resolveEffectiveEnabledPacks
128
- } from "./chunk-OXOXPREC.js";
128
+ } from "./chunk-SM56M7N7.js";
129
129
  import {
130
130
  DEFAULT_HYBRID_READ_TIMEOUT_MS,
131
131
  Duration_exports,
@@ -169,7 +169,7 @@ import {
169
169
  runExecShellGates,
170
170
  validateConfiguredRootExecutionLease,
171
171
  verifyOwnerRouteAck
172
- } from "./chunk-HVV4B6OL.js";
172
+ } from "./chunk-MEJLTHBK.js";
173
173
  import {
174
174
  accumulateGeminiChunks,
175
175
  buildGeminiGenerateContentRequest,
@@ -228,7 +228,7 @@ import {
228
228
  parseNoloWorkspaceToolArguments,
229
229
  resolveRequestToolSurface,
230
230
  resolveRuntimeToolSurfaceForAgent
231
- } from "./chunk-UBLITLAZ.js";
231
+ } from "./chunk-NABJEYPJ.js";
232
232
  import {
233
233
  isCapacitySaturatedRateLimit,
234
234
  mergeAvailabilityDeadline,
@@ -242,7 +242,7 @@ import {
242
242
  } from "./chunk-2MBTWINN.js";
243
243
  import {
244
244
  normalizeUsage
245
- } from "./chunk-S4W4GV3B.js";
245
+ } from "./chunk-K6TZSON4.js";
246
246
  import {
247
247
  isDevinOAuthAgent
248
248
  } from "./chunk-5ZUL4CUO.js";
@@ -378,12 +378,13 @@ import {
378
378
  import {
379
379
  agentRunCardLabels,
380
380
  t
381
- } from "./chunk-63RO7QWZ.js";
381
+ } from "./chunk-UNOILAZP.js";
382
382
  import {
383
+ createTokenDialogIndexKey,
383
384
  createTokenKey,
384
385
  createTokenStatsKey,
385
386
  createUserKey
386
- } from "./chunk-WMHWFFTE.js";
387
+ } from "./chunk-ECX3NKRD.js";
387
388
  import {
388
389
  dialogMessageKey,
389
390
  dialogMessagePrefix,
@@ -11817,6 +11818,22 @@ function isRemoteAuthEndpoint(endpoint) {
11817
11818
  return false;
11818
11819
  }
11819
11820
 
11821
+ // packages/ai/token/tokenDialogIndex.ts
11822
+ function buildTokenDialogIndexOps(args) {
11823
+ const userId = (args.userId ?? "").trim();
11824
+ const dialogId = (args.dialogId ?? "").trim();
11825
+ const callId = (args.callId ?? "").trim();
11826
+ const recordKey = (args.recordKey ?? "").trim();
11827
+ if (!userId || !dialogId || !callId || !recordKey) return [];
11828
+ return [
11829
+ {
11830
+ type: "put",
11831
+ key: createTokenDialogIndexKey(userId, dialogId, callId),
11832
+ value: { userId, dialogId, callId, recordKey }
11833
+ }
11834
+ ];
11835
+ }
11836
+
11820
11837
  // packages/cli/client/localRuntimeDialog.ts
11821
11838
  import { appendFileSync, mkdirSync as mkdirSync3 } from "fs";
11822
11839
  import { homedir } from "os";
@@ -12008,7 +12025,15 @@ async function writeLocalTokenRecord(args) {
12008
12025
  type: "token",
12009
12026
  ...prepared.tokenData
12010
12027
  };
12011
- await args.store.write(recordKey, tokenRecord);
12028
+ await args.store.batch([
12029
+ { type: "put", key: recordKey, value: tokenRecord },
12030
+ ...buildTokenDialogIndexOps({
12031
+ userId: args.userId,
12032
+ dialogId: typeof prepared.tokenData.dialogId === "string" ? prepared.tokenData.dialogId : "",
12033
+ callId,
12034
+ recordKey
12035
+ })
12036
+ ]);
12012
12037
  ops.push({ type: "put", key: recordKey, value: tokenRecord });
12013
12038
  const dateKey = format(timestamp, "yyyy-MM-dd");
12014
12039
  const statsKey = createTokenStatsKey(args.userId, dateKey);