nolo-cli 0.189.0-alpha.1 → 0.190.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 (99) hide show
  1. package/{_executeModel-7GFCTOFY.js → _executeModel-SWF5L2QJ.js} +22 -22
  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-RZBGWFD7.js} +23 -23
  6. package/{agentEmailCommands-WYZKZBPZ.js → agentEmailCommands-WLI22RW4.js} +24 -24
  7. package/{agentListCommands-POWEO3US.js → agentListCommands-RL5BMN2E.js} +7 -7
  8. package/{agentMachineCommands-LD4UKJ47.js → agentMachineCommands-F3NUJ2L6.js} +5 -5
  9. package/{agentRecordCommands-O6SOBL37.js → agentRecordCommands-P56UX5EH.js} +23 -23
  10. package/{agentRunCommand-JZ5CH3DL.js → agentRunCommand-75PMX2RJ.js} +24 -24
  11. package/{agentRuntimeLocal-G4KEXO5D.js → agentRuntimeLocal-3H7ZXM5X.js} +3 -3
  12. package/{agentSlice-STUDWJJZ.js → agentSlice-YGT6LLK6.js} +3 -3
  13. package/{appDeleteCommands-GZPGKI2Z.js → appDeleteCommands-AUDFCIFP.js} +7 -7
  14. package/{appDeployCommands-5UU3V5OK.js → appDeployCommands-ZMVIKSPY.js} +7 -7
  15. package/{appDeployStatusCommands-2ZB2QZ22.js → appDeployStatusCommands-LQNUHHGW.js} +7 -7
  16. package/{appGetCommands-YSZFBV5G.js → appGetCommands-WVCAHY4P.js} +7 -7
  17. package/{appListCommands-W6D7XIFX.js → appListCommands-4HHNJQUI.js} +7 -7
  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-C46BXHEE.js} +1 -1
  22. package/{chunk-H6FUDBS3.js → chunk-23QZ43OQ.js} +5 -5
  23. package/{chunk-5LVGXDSL.js → chunk-2CYD3OWD.js} +1 -1
  24. package/{chunk-4MZCYEK5.js → chunk-4KH2J6P7.js} +2 -2
  25. package/{chunk-XTM23OUX.js → chunk-4MYCKDSI.js} +2 -2
  26. package/{chunk-RGTPR57U.js → chunk-4YS6SAUO.js} +4 -4
  27. package/{chunk-LOQYQUM2.js → chunk-53PBXLID.js} +1 -1
  28. package/{chunk-KOIGM3KU.js → chunk-5DPVRMSY.js} +1 -1
  29. package/{chunk-GSX7Z46F.js → chunk-5HAPEKNH.js} +1 -1
  30. package/{chunk-RANCLEEC.js → chunk-6PV7VEEE.js} +10 -10
  31. package/{chunk-JOOWHDGM.js → chunk-A5BLRE3G.js} +1 -1
  32. package/{chunk-Y2ZDNW2H.js → chunk-B2N5GZBU.js} +2 -2
  33. package/{chunk-7SJG5ZNX.js → chunk-B6EZB6DW.js} +1 -1
  34. package/{chunk-CLGAGPEM.js → chunk-CNMQATUF.js} +1 -1
  35. package/{chunk-ER4UTWWS.js → chunk-DFF6B7P7.js} +1 -1
  36. package/{chunk-TNVE3CAV.js → chunk-DNHR4SIB.js} +4 -4
  37. package/{chunk-WMHWFFTE.js → chunk-ECX3NKRD.js} +46 -0
  38. package/{chunk-ZIOYHDYW.js → chunk-EWY63OTN.js} +2 -2
  39. package/{chunk-MMOISK6N.js → chunk-FLOZJJZO.js} +3 -3
  40. package/{chunk-R6AJKHEU.js → chunk-FSOJN3F7.js} +3 -3
  41. package/{chunk-WBCYL63M.js → chunk-GYVLAHA4.js} +1 -1
  42. package/{chunk-OKFKGCTS.js → chunk-HTLIKE5U.js} +2 -2
  43. package/{chunk-7N6C3IHF.js → chunk-JCDNXY6M.js} +2 -2
  44. package/{chunk-S4W4GV3B.js → chunk-K6TZSON4.js} +1 -1
  45. package/{chunk-3QFOYFJW.js → chunk-LMHU2NXQ.js} +4 -4
  46. package/{chunk-YUZIPPER.js → chunk-NHUH5CDA.js} +2 -2
  47. package/{chunk-2SUNC7EM.js → chunk-P277FU5Z.js} +12 -12
  48. package/{chunk-PCPQWTXJ.js → chunk-PD2YRFAI.js} +1 -1
  49. package/{chunk-O2MBTX37.js → chunk-RKUSD72B.js} +4 -4
  50. package/{chunk-J7QGWFT6.js → chunk-SIZY5XFD.js} +36 -11
  51. package/{chunk-OXOXPREC.js → chunk-SM56M7N7.js} +1 -1
  52. package/{chunk-J6ACCFU6.js → chunk-TFSMPRAY.js} +4 -4
  53. package/{chunk-IFN7MHWL.js → chunk-UGCQKKXW.js} +1 -1
  54. package/{chunk-63RO7QWZ.js → chunk-UNOILAZP.js} +10 -0
  55. package/{chunk-HVV4B6OL.js → chunk-W622GBH3.js} +2 -2
  56. package/{chunk-7GXK3WTO.js → chunk-WAZ6BTSC.js} +1 -1
  57. package/{chunk-4OTMONZL.js → chunk-XECMQMCS.js} +9 -9
  58. package/{chunk-6G5V4Y3V.js → chunk-XY6RHOUI.js} +19 -19
  59. package/{chunk-PVZ3GB25.js → chunk-ZLBQ55HI.js} +5 -5
  60. package/{chunk-RBVR7P3M.js → chunk-ZRATZ7OH.js} +18 -18
  61. package/{commandRegistry-AXZLPIPP.js → commandRegistry-IG7CJFTP.js} +61 -61
  62. package/{contentThunks-E4DHXF3M.js → contentThunks-UOENCNOK.js} +8 -8
  63. package/{cooldownCommands-ZERBBSWJ.js → cooldownCommands-4XKJFEBW.js} +1 -1
  64. package/{createAgentAutomationAction-2P2II7B3.js → createAgentAutomationAction-4STTL3XS.js} +8 -8
  65. package/{createDialogAction-MFZGE5EO.js → createDialogAction-2L47HM5V.js} +10 -10
  66. package/{createPageAction-SBU2YCNR.js → createPageAction-6QX7NS6V.js} +8 -8
  67. package/{dbSlice-2O3YBVPP.js → dbSlice-QAUXABCC.js} +2 -2
  68. package/{dialogCommands-AQLB3TG2.js → dialogCommands-VCQO2OFM.js} +7 -7
  69. package/{dialogSlice-GKPCUQWM.js → dialogSlice-5M2W5QZZ.js} +7 -7
  70. package/{dialogUsageCommand-44XMU6DD.js → dialogUsageCommand-QTG6ILEJ.js} +58 -5
  71. package/{docCreateCommands-AND3EMIY.js → docCreateCommands-7FAETK4S.js} +6 -6
  72. package/{docDeleteCommands-WA7CPPN3.js → docDeleteCommands-IVA4T2VS.js} +7 -7
  73. package/{docReadCommands-A4JLU4WF.js → docReadCommands-F63GIAYX.js} +6 -6
  74. package/{docStore-DOZVBVKZ.js → docStore-FOMW62P6.js} +3 -3
  75. package/{docUpdateCommands-33PDSHS3.js → docUpdateCommands-QEC4Y2HQ.js} +6 -6
  76. package/{fetchMessages-QLW7INJJ.js → fetchMessages-HWBVATSE.js} +1 -1
  77. package/{handleSendMessageAction-FY4RBJEA.js → handleSendMessageAction-6PA7PBAE.js} +15 -15
  78. package/index.js +6 -6
  79. package/{keys-N6HQICY5.js → keys-P4ZDOVJW.js} +11 -1
  80. package/{localDialogRead-55YDVPNU.js → localDialogRead-CT5HGDMC.js} +1 -1
  81. package/{localRuntimeAdapter-VOTHX3NK.js → localRuntimeAdapter-UZVDGE24.js} +21 -21
  82. package/{machineCommands-FDTN3A5S.js → machineCommands-JMHZ2BFI.js} +22 -22
  83. package/{machineWsRunDispatch-PPVYOERM.js → machineWsRunDispatch-5CYUKV3K.js} +22 -22
  84. package/{memberThunks-VXT36MZP.js → memberThunks-ZAE52VIP.js} +3 -3
  85. package/package.json +1 -1
  86. package/{readlineWorkspace-6SU3QTTY.js → readlineWorkspace-G5EZWTPW.js} +83 -37
  87. package/{removeDialogAgentAction-PK24DJ2J.js → removeDialogAgentAction-YEPO5AYI.js} +3 -3
  88. package/{runAgentClientLoop-CFIM6MXT.js → runAgentClientLoop-5P42KTXW.js} +20 -20
  89. package/{secretCommands-UYVNIQIN.js → secretCommands-N6CMCJDZ.js} +1 -1
  90. package/{setDialogExtraReferencesAction-BN4IBUO6.js → setDialogExtraReferencesAction-EH5GWDAJ.js} +3 -3
  91. package/{setPrimaryDialogAgentAction-JR5SMLZY.js → setPrimaryDialogAgentAction-PNWRK6IY.js} +3 -3
  92. package/{settingThunks-RJZQHL7H.js → settingThunks-7VCWB6P7.js} +2 -2
  93. package/{spaceCommands-BI3TRIAK.js → spaceCommands-6IH5EH6B.js} +5 -5
  94. package/{streamAgentChatTurn-3BS7IAFR.js → streamAgentChatTurn-LK4RYXJ6.js} +22 -22
  95. package/{switchDialogAgentAction-TSIXBNRH.js → switchDialogAgentAction-23BFWJMV.js} +2 -2
  96. package/{tools-PCTUYG54.js → tools-RGZRKCCX.js} +17 -17
  97. package/{updateCommands-6GKGM7NR.js → updateCommands-KE6LP3QX.js} +3 -3
  98. package/{updateDialogTitleAction-ZHFIMEQL.js → updateDialogTitleAction-HEON2XAV.js} +8 -8
  99. package/{windowsSelfUpdate-4N7JCG2M.js → windowsSelfUpdate-26TSFXEZ.js} +2 -2
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-ZIOYHDYW.js";
8
+ } from "./chunk-EWY63OTN.js";
9
9
  import {
10
10
  CONFIRMATION_INPUT_KEYS,
11
11
  INVALID_TOOL_ARGS_REPLACEMENT,
@@ -14,16 +14,16 @@ import {
14
14
  performFetchRequest,
15
15
  sanitizeOutboundMessages,
16
16
  stripModelToolArgs
17
- } from "./chunk-MMOISK6N.js";
17
+ } from "./chunk-FLOZJJZO.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-6G5V4Y3V.js";
21
+ } from "./chunk-XY6RHOUI.js";
22
22
  import {
23
23
  classifyApiError,
24
24
  classifyGenerationError,
25
25
  extractErrorDiagnostics
26
- } from "./chunk-3QFOYFJW.js";
26
+ } from "./chunk-LMHU2NXQ.js";
27
27
  import {
28
28
  createSSEParser,
29
29
  createToolRunId,
@@ -32,7 +32,7 @@ import {
32
32
  toolRunSetPending,
33
33
  toolRunStarted,
34
34
  toolRunSucceeded
35
- } from "./chunk-O2MBTX37.js";
35
+ } from "./chunk-RKUSD72B.js";
36
36
  import {
37
37
  getPublicImageAgentMode
38
38
  } from "./chunk-VIDPVFP3.js";
@@ -45,10 +45,10 @@ import {
45
45
  messageStreaming,
46
46
  toolResultNeedsUserConfirmation,
47
47
  updateToolMessage
48
- } from "./chunk-RBVR7P3M.js";
48
+ } from "./chunk-ZRATZ7OH.js";
49
49
  import {
50
50
  streamAgentChatTurn
51
- } from "./chunk-PVZ3GB25.js";
51
+ } from "./chunk-ZLBQ55HI.js";
52
52
  import {
53
53
  addActiveController,
54
54
  removeActiveController,
@@ -59,7 +59,7 @@ import {
59
59
  } from "./chunk-32ZKZET7.js";
60
60
  import {
61
61
  write
62
- } from "./chunk-Y2ZDNW2H.js";
62
+ } from "./chunk-B2N5GZBU.js";
63
63
  import {
64
64
  createAsyncThunk
65
65
  } from "./chunk-WRCZXJ4N.js";
@@ -88,7 +88,7 @@ import {
88
88
  } from "./chunk-OHRDHS4N.js";
89
89
  import {
90
90
  EMPTY_ASSISTANT_REPAIR_PROMPT
91
- } from "./chunk-S4W4GV3B.js";
91
+ } from "./chunk-K6TZSON4.js";
92
92
  import {
93
93
  getModelInfo
94
94
  } from "./chunk-JIFYXQRD.js";
@@ -109,7 +109,7 @@ import {
109
109
  } from "./chunk-KUG52IAP.js";
110
110
  import {
111
111
  toTrimmedString
112
- } from "./chunk-WMHWFFTE.js";
112
+ } from "./chunk-ECX3NKRD.js";
113
113
  import {
114
114
  createDialogMessageKeyAndId,
115
115
  dialogMessageKey
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-32ZKZET7.js";
4
4
  import {
5
5
  patch
6
- } from "./chunk-Y2ZDNW2H.js";
6
+ } from "./chunk-B2N5GZBU.js";
7
7
  import {
8
8
  getIsDesktopApp
9
9
  } from "./chunk-6Q7UTJKR.js";
@@ -53,7 +53,7 @@ import {
53
53
  import {
54
54
  fileKey,
55
55
  getFileIdFromKey
56
- } from "./chunk-WMHWFFTE.js";
56
+ } from "./chunk-ECX3NKRD.js";
57
57
  import {
58
58
  ulid
59
59
  } from "./chunk-XJWWBO34.js";
@@ -782,7 +782,7 @@ var dbSlice = createSliceWithThunks({
782
782
  // 这里改成动态 import,运行期才解析,彻底断开这条边。
783
783
  share: create.asyncThunk(
784
784
  async (config, thunkApi) => {
785
- const { shareResourceAction } = await import("./action-HQXK4ZT4.js");
785
+ const { shareResourceAction } = await import("./action-BHWB4MOK.js");
786
786
  return shareResourceAction(config, thunkApi);
787
787
  }
788
788
  ),
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  patch,
6
6
  read
7
- } from "./chunk-Y2ZDNW2H.js";
7
+ } from "./chunk-B2N5GZBU.js";
8
8
  import {
9
9
  DEVICE_LOCAL_OWNER_ID,
10
10
  isDeviceLocalSpaceBody
@@ -21,7 +21,7 @@ import {
21
21
  sanitizeShareData,
22
22
  shareKey,
23
23
  toNonEmptyString
24
- } from "./chunk-WMHWFFTE.js";
24
+ } from "./chunk-ECX3NKRD.js";
25
25
 
26
26
  // packages/share/action.ts
27
27
  var generateToken = () => {
@@ -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,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-J7QGWFT6.js";
4
+ } from "./chunk-SIZY5XFD.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-O2MBTX37.js";
7
+ } from "./chunk-RKUSD72B.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-HVV4B6OL.js";
10
+ } from "./chunk-W622GBH3.js";
11
11
  import {
12
12
  applyToolSurfaceConstraints
13
13
  } from "./chunk-UBLITLAZ.js";
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-Y6ROFCZO.js";
39
39
  import {
40
40
  t
41
- } from "./chunk-63RO7QWZ.js";
41
+ } from "./chunk-UNOILAZP.js";
42
42
  import {
43
43
  asTrimmedNonEmptyStringArray
44
44
  } from "./chunk-I42VC5KR.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,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-6G5V4Y3V.js";
3
+ } from "./chunk-XY6RHOUI.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-RBVR7P3M.js";
6
+ } from "./chunk-ZRATZ7OH.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-AKE53VMW.js";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-HS7MLR74.js";
4
4
  import {
5
5
  performServerProxyFetchWithRetry
6
- } from "./chunk-3QFOYFJW.js";
6
+ } from "./chunk-LMHU2NXQ.js";
7
7
  import {
8
8
  fetchServerSyncedCredential
9
- } from "./chunk-PVZ3GB25.js";
9
+ } from "./chunk-ZLBQ55HI.js";
10
10
  import {
11
11
  buildSkillGuidancePromptBlock
12
- } from "./chunk-GSX7Z46F.js";
12
+ } from "./chunk-5HAPEKNH.js";
13
13
  import {
14
14
  CREDENTIAL_HYGIENE_RULE,
15
15
  DELETE_SAFETY_RED_LINE,
@@ -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-UOENCNOK.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-6QX7NS6V.js");
376
376
  return createPageAction(args, thunkApi);
377
377
  }
378
378
  function subscribe(listener) {
@@ -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";
@@ -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";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-3QFOYFJW.js";
4
+ } from "./chunk-LMHU2NXQ.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-RBVR7P3M.js";
7
+ } from "./chunk-ZRATZ7OH.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-OWYYDMGJ.js";
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  isPageKey,
18
18
  isTableMetaKey
19
- } from "./chunk-WMHWFFTE.js";
19
+ } from "./chunk-ECX3NKRD.js";
20
20
  import {
21
21
  isDialogRecordKey
22
22
  } from "./chunk-XJWWBO34.js";
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-O2MBTX37.js";
5
+ } from "./chunk-RKUSD72B.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -21,13 +21,13 @@ import {
21
21
  } from "./chunk-AGIM7IMJ.js";
22
22
  import {
23
23
  fetchAndCacheMessages
24
- } from "./chunk-RBVR7P3M.js";
24
+ } from "./chunk-ZRATZ7OH.js";
25
25
  import {
26
26
  createSpaceKey
27
27
  } from "./chunk-UAD2WT54.js";
28
28
  import {
29
29
  read
30
- } from "./chunk-Y2ZDNW2H.js";
30
+ } from "./chunk-B2N5GZBU.js";
31
31
  import {
32
32
  getRuntimeServerContext
33
33
  } from "./chunk-7UODCAWW.js";
@@ -35,7 +35,7 @@ import {
35
35
  extractRuntimePageCapabilities,
36
36
  resolveBuiltinSkillPage,
37
37
  resolveSkillGraphFromRoots
38
- } from "./chunk-GSX7Z46F.js";
38
+ } from "./chunk-5HAPEKNH.js";
39
39
  import {
40
40
  isAbortError
41
41
  } from "./chunk-7DPNBQSV.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-KOIGM3KU.js";
4
+ } from "./chunk-5DPVRMSY.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-WBCYL63M.js";
7
+ } from "./chunk-GYVLAHA4.js";
8
8
  import {
9
9
  deriveCredentialGroup
10
10
  } from "./chunk-53RSTB7T.js";
@@ -9,7 +9,7 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-5LVGXDSL.js";
12
+ } from "./chunk-2CYD3OWD.js";
13
13
  import {
14
14
  parsePositiveFiniteNumberOrFallback
15
15
  } from "./chunk-Y5GCAMGP.js";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  readDbRecord,
21
21
  resolveAgentRecordFromHybridStore
22
- } from "./chunk-WBCYL63M.js";
22
+ } from "./chunk-GYVLAHA4.js";
23
23
  import {
24
24
  INSTABOX_RUN_CONFIG_ENV,
25
25
  createCliLocalRuntimeAdapter,
@@ -38,7 +38,7 @@ import {
38
38
  resolveFileWriteGateEnabled,
39
39
  resolveLocalUserId,
40
40
  validateInstaboxWorkspaceSelection
41
- } from "./chunk-J7QGWFT6.js";
41
+ } from "./chunk-SIZY5XFD.js";
42
42
  import {
43
43
  clearCredentialAvailability,
44
44
  readEffectiveCredentialEntry,
@@ -72,14 +72,14 @@ import {
72
72
  } from "./chunk-BMQ2MJUK.js";
73
73
  import {
74
74
  resolveCliLocalRuntimeKeyCapability
75
- } from "./chunk-6G5V4Y3V.js";
75
+ } from "./chunk-XY6RHOUI.js";
76
76
  import {
77
77
  isTransientFetchError
78
78
  } from "./chunk-KFHREHUQ.js";
79
79
  import {
80
80
  parseUiCard,
81
81
  uiCardFallback
82
- } from "./chunk-O2MBTX37.js";
82
+ } from "./chunk-RKUSD72B.js";
83
83
  import {
84
84
  isGatewayHttpStatus
85
85
  } from "./chunk-NF64D32W.js";
@@ -88,7 +88,7 @@ import {
88
88
  chooseMemoryOwners,
89
89
  loadMemoryCandidatesFromDb,
90
90
  resolveAgentMemoryPolicy
91
- } from "./chunk-H6FUDBS3.js";
91
+ } from "./chunk-23QZ43OQ.js";
92
92
  import {
93
93
  API_REPORTED_COST_MULTIPLIER,
94
94
  estimateMessagesTokens,
@@ -96,7 +96,7 @@ import {
96
96
  resolveAgentContextWindow,
97
97
  resolveOccupancy,
98
98
  resolveOccupancyWindow
99
- } from "./chunk-RBVR7P3M.js";
99
+ } from "./chunk-ZRATZ7OH.js";
100
100
  import {
101
101
  isCliAuthorityBrokerProtocolError,
102
102
  isCliAuthorityBrokerTimeoutError,
@@ -116,7 +116,7 @@ import {
116
116
  LOCAL_AGENT_CONFIG_MISSING_CODE,
117
117
  LOCAL_TURN_ABORTED_CODE,
118
118
  readActionGate
119
- } from "./chunk-HVV4B6OL.js";
119
+ } from "./chunk-W622GBH3.js";
120
120
  import {
121
121
  resolveAgentRuntimeConfigFromRecord
122
122
  } from "./chunk-N7E3LQ4A.js";
@@ -144,7 +144,7 @@ import {
144
144
  } from "./chunk-WJZOQR2J.js";
145
145
  import {
146
146
  normalizeUsage
147
- } from "./chunk-S4W4GV3B.js";
147
+ } from "./chunk-K6TZSON4.js";
148
148
  import {
149
149
  isOAuthApiKeyRef
150
150
  } from "./chunk-UKZX3NHN.js";
@@ -228,10 +228,10 @@ import {
228
228
  t,
229
229
  toolLabel,
230
230
  toolLabelVariants
231
- } from "./chunk-63RO7QWZ.js";
231
+ } from "./chunk-UNOILAZP.js";
232
232
  import {
233
233
  createMemoryKey
234
- } from "./chunk-WMHWFFTE.js";
234
+ } from "./chunk-ECX3NKRD.js";
235
235
  import {
236
236
  ulid
237
237
  } from "./chunk-XJWWBO34.js";
@@ -11378,7 +11378,7 @@ function isBalanceExhaustedError(error) {
11378
11378
 
11379
11379
  // packages/cli/client/agentRun.ts
11380
11380
  async function loadRunLocalAgentTurn() {
11381
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-G4KEXO5D.js");
11381
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-3H7ZXM5X.js");
11382
11382
  return runLocalAgentTurn;
11383
11383
  }
11384
11384
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-WBCYL63M.js";
4
+ } from "./chunk-GYVLAHA4.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-VYNMQ6HW.js";
9
9
  import {
10
10
  fetchAndCacheTableRows
11
- } from "./chunk-RGTPR57U.js";
11
+ } from "./chunk-4YS6SAUO.js";
12
12
  import {
13
13
  require_react
14
14
  } from "./chunk-YDH3FDFQ.js";
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  resolveBuiltinCapability,
24
24
  resolveBuiltinSkillEntry
25
- } from "./chunk-GSX7Z46F.js";
25
+ } from "./chunk-5HAPEKNH.js";
26
26
  import {
27
27
  DEFAULT_SYSTEM_AGENT_CAPABILITIES
28
28
  } from "./chunk-EUGTFFO6.js";
@@ -521,7 +521,7 @@ var executeToolRun = createAsyncThunk(
521
521
  if (!executionInput) {
522
522
  throw new Error(`ToolRun ${id} has no input to execute with.`);
523
523
  }
524
- const { findToolExecutor } = await import("./tools-PCTUYG54.js");
524
+ const { findToolExecutor } = await import("./tools-RGZRKCCX.js");
525
525
  const { executor } = findToolExecutor(run.toolName);
526
526
  toolRunStarted({
527
527
  id: run.id,
@@ -545,7 +545,7 @@ var executeToolRun = createAsyncThunk(
545
545
  const latestState = thunkApi.getState();
546
546
  const userId = selectIdentityUserId(latestState);
547
547
  if (userId) {
548
- const { fetchUserSpaceMemberships } = await import("./memberThunks-VXT36MZP.js");
548
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-ZAE52VIP.js");
549
549
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
550
550
  }
551
551
  }
@@ -60,7 +60,7 @@ import {
60
60
  import {
61
61
  inlineImageUrlsForCustomProvider,
62
62
  prepareTools
63
- } from "./chunk-ZIOYHDYW.js";
63
+ } from "./chunk-EWY63OTN.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-XY6RHOUI.js";
86
86
  import {
87
87
  fetchWithTransientRetry,
88
88
  isTransientFetchError
@@ -93,7 +93,7 @@ import {
93
93
  } from "./chunk-53RSTB7T.js";
94
94
  import {
95
95
  resolveAgentRequiredPackIds
96
- } from "./chunk-O2MBTX37.js";
96
+ } from "./chunk-RKUSD72B.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-ZRATZ7OH.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-ZLBQ55HI.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-W622GBH3.js";
173
173
  import {
174
174
  accumulateGeminiChunks,
175
175
  buildGeminiGenerateContentRequest,
@@ -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);
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-ZC3CMUKU.js";
11
11
  import {
12
12
  createKey
13
- } from "./chunk-WMHWFFTE.js";
13
+ } from "./chunk-ECX3NKRD.js";
14
14
 
15
15
  // packages/ai/tools/codeWorkDiscipline.ts
16
16
  var CODE_WORK_DISCIPLINE_BODY = `## \u6548\u7387\u4F18\u5148\uFF08\u7701 token\uFF09