nolo-cli 0.254.0-alpha.1 → 0.255.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/{_executeModel-OMDET3E2.js → _executeModel-XD2EAFVG.js} +44 -43
  2. package/{action-4MADDU52.js → action-C6IQAKN4.js} +5 -5
  3. package/{addContentAction-MT4BECXT.js → addContentAction-53364YDW.js} +8 -8
  4. package/{addDialogAgentAction-ZZTJ5GBD.js → addDialogAgentAction-U5DD5EN5.js} +7 -7
  5. package/{agentDeleteCommand-5WXEECFH.js → agentDeleteCommand-AI2AAFA4.js} +59 -58
  6. package/{agentEmailCommands-3QWBB2JL.js → agentEmailCommands-I544I2MU.js} +60 -59
  7. package/{agentListCommands-WTEF5RKJ.js → agentListCommands-3NB4FDIJ.js} +26 -25
  8. package/{agentMachineCommands-DP44GKA6.js → agentMachineCommands-RZEHM6NS.js} +22 -21
  9. package/{agentRecordCommands-4I7P34GJ.js → agentRecordCommands-X2AVD6Y2.js} +59 -58
  10. package/{agentRunCommand-VAKWFXJV.js → agentRunCommand-XU5TL3WO.js} +63 -59
  11. package/{agentRunControl-5ABAIBQT.js → agentRunControl-3TIVJ3SR.js} +3 -2
  12. package/{agentRuntimeLocal-IO3GGTCJ.js → agentRuntimeLocal-3MAEFYSB.js} +18 -17
  13. package/{agentSlice-5ZSVWJHV.js → agentSlice-ZFY3PT3D.js} +9 -9
  14. package/{appDeleteCommands-ZQ4ZEKTC.js → appDeleteCommands-J5BTYVPC.js} +24 -23
  15. package/{appDeployCommands-4XT7PFW5.js → appDeployCommands-I3JIN7TN.js} +24 -23
  16. package/{appDeployStatusCommands-5RVMRYQW.js → appDeployStatusCommands-BKJVLIOV.js} +24 -23
  17. package/{appGetCommands-VH5W3RFK.js → appGetCommands-67JTU36H.js} +24 -23
  18. package/{appListCommands-TAHZLAL3.js → appListCommands-HF4GFCN4.js} +24 -23
  19. package/{authCommand-HBO5G6RL.js → authCommand-Y3CXNAYM.js} +4 -4
  20. package/{builtinSkillRegistry-66PEOD4Y.js → builtinSkillRegistry-FVEEO4U2.js} +3 -3
  21. package/{chromeOpsCommands-AA555ANS.js → chromeOpsCommands-W5I2AEOV.js} +1 -1
  22. package/{chunk-D3WOFN6N.js → chunk-223KZUJ6.js} +1 -1
  23. package/{chunk-MICGEDCN.js → chunk-24Z44WHO.js} +27 -27
  24. package/{chunk-MR72IIX5.js → chunk-2BHHT2TR.js} +4 -4
  25. package/{chunk-NXNHG3QT.js → chunk-3W2J3LFB.js} +21 -10
  26. package/{chunk-2RCMFPUZ.js → chunk-46FETNLF.js} +2 -2
  27. package/{chunk-CO6E7YK6.js → chunk-5P3PPQVP.js} +1 -1
  28. package/{chunk-KR4W72OK.js → chunk-6FONTXR7.js} +45 -25
  29. package/{chunk-KWARDHBI.js → chunk-6N4IKMTH.js} +37 -2
  30. package/{chunk-M7GMJBQJ.js → chunk-6VEO7Z3Y.js} +3 -3
  31. package/{chunk-2VYX3ZCR.js → chunk-6VNBJ7GI.js} +5 -5
  32. package/{chunk-GK772DEV.js → chunk-7BIJFGKS.js} +3 -3
  33. package/{chunk-3SEBCWLD.js → chunk-7EUJ65PF.js} +2057 -223
  34. package/{chunk-4GWNEPY6.js → chunk-7PTWFSZZ.js} +1 -1
  35. package/{chunk-CIAV4WK2.js → chunk-7WHCIA5V.js} +2 -2
  36. package/{chunk-MCQXBKC6.js → chunk-AAYDROBM.js} +2 -2
  37. package/{chunk-53UOBNTI.js → chunk-ADYWV732.js} +8 -8
  38. package/{chunk-WLHUANWZ.js → chunk-AIFQKNPP.js} +1 -1
  39. package/{chunk-GFXPPQZN.js → chunk-AKBNCTPY.js} +1 -1
  40. package/{chunk-HEUHCHAR.js → chunk-BD22OFDQ.js} +3 -3
  41. package/{chunk-SID2TFMV.js → chunk-BXGU6274.js} +104 -55
  42. package/{chunk-SCY2O7CU.js → chunk-BZMDWGQQ.js} +2 -2
  43. package/{chunk-YYHWEVBI.js → chunk-CAPHUP3M.js} +2 -2
  44. package/{chunk-JKO32CCL.js → chunk-CBIGMWMI.js} +1 -1
  45. package/{chunk-JP2BH4NC.js → chunk-CEKRIR22.js} +1 -1
  46. package/{chunk-6AJIU6OC.js → chunk-D53SPVAC.js} +3 -3
  47. package/{chunk-HS4JGZQH.js → chunk-DWES4SXY.js} +1 -1
  48. package/{chunk-3272HU62.js → chunk-E47JZP2R.js} +1 -1
  49. package/{chunk-D4CUS6NT.js → chunk-E4HBZDV6.js} +3 -3
  50. package/{chunk-2G3XMM3O.js → chunk-EXD7S7QW.js} +41 -5
  51. package/{chunk-YGDYYFRX.js → chunk-GYX6XTAI.js} +3 -5
  52. package/{chunk-HKPIFK7F.js → chunk-H3KLIPAL.js} +5 -5
  53. package/{chunk-NEDBPW44.js → chunk-H6EKTB6X.js} +2 -2
  54. package/{chunk-VYRTLHIT.js → chunk-HDKMVYNJ.js} +1 -1
  55. package/chunk-HEVRQGGH.js +106 -0
  56. package/{chunk-4CL6QIQZ.js → chunk-HPDLPEUG.js} +2 -2
  57. package/{chunk-YW5L3XOO.js → chunk-HZQGCFPJ.js} +10 -10
  58. package/{chunk-7STRX24O.js → chunk-JAAYO52G.js} +8 -7
  59. package/{chunk-QV32GSVO.js → chunk-JPZKKSGT.js} +1 -1
  60. package/{chunk-Z2ZCKNKX.js → chunk-JW6OURKM.js} +261 -228
  61. package/{chunk-TA2JQUWA.js → chunk-K5X4D2TS.js} +156 -1767
  62. package/{chunk-IGK4OXAO.js → chunk-KF7M2UEK.js} +499 -7
  63. package/{chunk-VZCBYCHV.js → chunk-KG27JIG4.js} +2 -2
  64. package/{chunk-PTY2VZM5.js → chunk-KO5GO2BC.js} +6 -8
  65. package/{chunk-GJKEOBCV.js → chunk-KRDG2XCI.js} +10 -10
  66. package/{chunk-OLS2J3WE.js → chunk-LLUBUHNT.js} +1 -1
  67. package/{chunk-ZAKWT4XQ.js → chunk-LQ4CQKTS.js} +3 -3
  68. package/{chunk-52M4RYVP.js → chunk-MDHI2LWF.js} +1 -1
  69. package/{chunk-XWR2YD4L.js → chunk-MLK3FEXG.js} +1 -1
  70. package/{chunk-KQBGXCKM.js → chunk-MNFUKRRU.js} +3 -3
  71. package/{chunk-FRC2DNTN.js → chunk-NAW2SN54.js} +1 -1
  72. package/{chunk-UHW6SCVK.js → chunk-NUHQO3RB.js} +1 -1
  73. package/{chunk-CYGFNMCH.js → chunk-OKAXQFON.js} +1 -1
  74. package/{chunk-P4JX7YMQ.js → chunk-ONTHDYFU.js} +22 -2
  75. package/{chunk-PR25J652.js → chunk-PNBQ5JTA.js} +1 -1
  76. package/{chunk-MW3XUUYS.js → chunk-PVHY7Y6T.js} +6 -6
  77. package/{chunk-K4LLTJUO.js → chunk-Q2MPKE4B.js} +5 -105
  78. package/{chunk-AX63ZU2W.js → chunk-Q66O5LN3.js} +4 -4
  79. package/{chunk-6WI4PFPP.js → chunk-QEVT4LQ3.js} +68 -54
  80. package/{chunk-OMIXG25B.js → chunk-QGFLVQ6E.js} +1 -1
  81. package/{chunk-25BDZGD7.js → chunk-QJKDHR4Y.js} +2 -2
  82. package/{chunk-IDCGMZLC.js → chunk-QNZRR3NT.js} +9 -9
  83. package/{chunk-WMMKHEGQ.js → chunk-R3FZHW4Q.js} +12 -12
  84. package/{chunk-KZAT2M2V.js → chunk-RIWKZT7E.js} +22 -0
  85. package/{chunk-OWXOXKH7.js → chunk-SCAC3NM5.js} +2 -2
  86. package/{chunk-EG3JTV7H.js → chunk-TCAAHWCY.js} +2 -2
  87. package/{chunk-NMGG3NUB.js → chunk-U6QNVOR5.js} +1 -1
  88. package/{chunk-5UYDG6HP.js → chunk-V5NK6KMF.js} +8 -13
  89. package/{chunk-AIHNB5QH.js → chunk-VQR2ACSC.js} +6 -4
  90. package/{chunk-HEQJ5XND.js → chunk-WS36XPJD.js} +2 -2
  91. package/{chunk-MRYKRL2V.js → chunk-WSLL7VV4.js} +2 -2
  92. package/{dialogUsageCommand-3JMINURR.js → chunk-Y2TCTNUD.js} +19 -12
  93. package/{chunk-4Z7Q4QZF.js → chunk-YKCFDOO4.js} +765 -29
  94. package/{chunk-DNY33GGQ.js → chunk-YN23INFZ.js} +1 -1
  95. package/{chunk-5HUO7SEX.js → chunk-YQLAFJRQ.js} +1 -1
  96. package/{chunk-VPSPVLCM.js → chunk-ZMJMHXYX.js} +3 -3
  97. package/{chunk-W4S5FQWQ.js → chunk-ZTHAJU3O.js} +1 -1
  98. package/{cliAgentConfigHelpers-FKBPFPKR.js → cliAgentConfigHelpers-BXHQ3PXP.js} +2 -2
  99. package/{cliLocalAgentRecordReader-2WBUVRVD.js → cliLocalAgentRecordReader-Q6677YID.js} +22 -21
  100. package/{commandRegistry-DONNI3FW.js → commandRegistry-YCKR4SWB.js} +82 -78
  101. package/{contentThunks-THSXC6WQ.js → contentThunks-R2ZLM2Z3.js} +20 -20
  102. package/{cooldownCommands-PT5L4LNB.js → cooldownCommands-TVZBWUN3.js} +1 -1
  103. package/{createAgentAutomationAction-WNQOJ4DG.js → createAgentAutomationAction-Q665HFZS.js} +20 -20
  104. package/{createDialogAction-YORDQFFC.js → createDialogAction-VOGA6VXH.js} +21 -21
  105. package/{createPageAction-2S7V5OCW.js → createPageAction-FICG35GF.js} +21 -21
  106. package/{dbSlice-HXFRXGI3.js → dbSlice-RWPSVHBC.js} +7 -7
  107. package/{deleteFile-QDSZVTUJ.js → deleteFile-ECU6FU5C.js} +5 -5
  108. package/{dialogCommands-MEH4CVRL.js → dialogCommands-TCIB4AMT.js} +28 -25
  109. package/{dialogNotifyCommand-JKYVSR6K.js → dialogNotifyCommand-IASQGEMW.js} +3 -3
  110. package/{dialogSlice-JOICDGQU.js → dialogSlice-SCZJH2Q3.js} +18 -18
  111. package/dialogTraceCommand-E3BYXL3D.js +961 -0
  112. package/dialogUsageCommand-WJ3U6KZU.js +27 -0
  113. package/{docCreateCommands-MVAYVGQ5.js → docCreateCommands-UHY2QSEL.js} +23 -22
  114. package/{docDeleteCommands-TKXPRA3O.js → docDeleteCommands-JX53B6VB.js} +24 -23
  115. package/{docReadCommands-MR2YKCZP.js → docReadCommands-H5XZBEYD.js} +23 -22
  116. package/{docStore-NKVLWCXX.js → docStore-KTTOVQLL.js} +8 -8
  117. package/{docUpdateCommands-VJ6A6F7F.js → docUpdateCommands-YYYU6CHT.js} +23 -22
  118. package/{handleSendMessageAction-SNNYOQ4P.js → handleSendMessageAction-FRGNSG6B.js} +32 -32
  119. package/{hostCredentialCreate-SDQUFL23.js → hostCredentialCreate-V5EDFPAV.js} +59 -58
  120. package/index.js +7 -7
  121. package/{localRuntimeAdapter-JHYH5ZIR.js → localRuntimeAdapter-VMGFXQOJ.js} +58 -57
  122. package/{machineCommands-BXSBRM7L.js → machineCommands-AUPY2QB6.js} +59 -58
  123. package/{machineWsRunDispatch-KEXSHGSD.js → machineWsRunDispatch-KNOARY66.js} +59 -58
  124. package/{mcpLocalAuthorizeCommand-Y3SOZFXT.js → mcpLocalAuthorizeCommand-RBXJDE6J.js} +2 -2
  125. package/{memberThunks-ZXEUM6DH.js → memberThunks-43B7UYC5.js} +9 -9
  126. package/package.json +1 -1
  127. package/{projectArchive-FDYE7VNC.js → projectArchive-KON534LA.js} +21 -21
  128. package/{read-T5WPCAY7.js → read-KG6INYUT.js} +5 -5
  129. package/{readDocTool-DW4DCRQG.js → readDocTool-N3GA52JR.js} +1 -1
  130. package/{readlineWorkspace-ME2C64XI.js → readlineWorkspace-MHYNJR5O.js} +599 -840
  131. package/{removeDialogAgentAction-MXJEB77K.js → removeDialogAgentAction-EEVSOQOJ.js} +9 -9
  132. package/{runAgentClientLoop-UAGXVYW5.js → runAgentClientLoop-YRGQCRC4.js} +51 -40
  133. package/{secretCommands-BXAQEOES.js → secretCommands-POD67M6Y.js} +2 -2
  134. package/{setDialogExtraReferencesAction-BILVMHM7.js → setDialogExtraReferencesAction-DNO5POHA.js} +8 -8
  135. package/{setPrimaryDialogAgentAction-CUBBWACR.js → setPrimaryDialogAgentAction-QABBEO4C.js} +9 -9
  136. package/{settingThunks-BRBBAGEK.js → settingThunks-DVKG4X4S.js} +10 -10
  137. package/{skillDiscovery-MDDKPTW3.js → skillDiscovery-5GEGWJ6N.js} +3 -3
  138. package/{spaceCommands-K4HHG7OO.js → spaceCommands-USN52WYJ.js} +22 -21
  139. package/{streamAgentChatTurn-RZUB6JTH.js → streamAgentChatTurn-EQO3ULUB.js} +62 -50
  140. package/{switchDialogAgentAction-SSI2CSNE.js → switchDialogAgentAction-KYWJSGOO.js} +7 -7
  141. package/{tableCommands-C3P2HHKK.js → tableCommands-EFA754RE.js} +2 -2
  142. package/{tools-23F5EEVM.js → tools-UME4HYSH.js} +36 -35
  143. package/{tuiRestart-7IKI6JZK.js → tuiRestart-VN5F4GYU.js} +4 -3
  144. package/tuiSummaryLlmCaller-HROLGN4F.js +1 -1
  145. package/{updateCommands-BZ4YDHNM.js → updateCommands-L32TVOI7.js} +3 -3
  146. package/{updateDialogTitleAction-TJWT4LXL.js → updateDialogTitleAction-NZIGJL5Q.js} +20 -20
  147. package/{usageCommand-HVCMX7BG.js → usageCommand-WI6SQOPB.js} +1 -1
  148. package/{usageRebuildCommand-VMPIZ2ME.js → usageRebuildCommand-WQRLLZAT.js} +2 -2
  149. package/{windowsSelfUpdate-4BAXX7C3.js → windowsSelfUpdate-AGVLDVQS.js} +2 -2
  150. package/lib-62SWPXNF.js +0 -21042
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  patch,
6
6
  selectById
7
- } from "./chunk-53UOBNTI.js";
7
+ } from "./chunk-ADYWV732.js";
8
8
  import {
9
9
  getActiveDialogKey
10
10
  } from "./chunk-U35UUM5K.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  patch,
6
6
  readAndWait
7
- } from "./chunk-53UOBNTI.js";
7
+ } from "./chunk-ADYWV732.js";
8
8
  import {
9
9
  require_react
10
10
  } from "./chunk-RD3QLZQV.js";
@@ -335,7 +335,7 @@ async function saveDocState(arg, { dispatch, getState }) {
335
335
  ).unwrap();
336
336
  if (dbSpaceId) {
337
337
  try {
338
- const { updateContentTitle } = await import("./contentThunks-THSXC6WQ.js");
338
+ const { updateContentTitle } = await import("./contentThunks-R2ZLM2Z3.js");
339
339
  await dispatch(
340
340
  updateContentTitle({
341
341
  spaceId: dbSpaceId,
@@ -378,7 +378,7 @@ async function saveDocState(arg, { dispatch, getState }) {
378
378
  }
379
379
  }
380
380
  async function createDocState(args, thunkApi) {
381
- const { createPageAction } = await import("./createPageAction-2S7V5OCW.js");
381
+ const { createPageAction } = await import("./createPageAction-FICG35GF.js");
382
382
  return createPageAction(args, thunkApi);
383
383
  }
384
384
  function subscribe(listener) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-E6A5NHDH.js";
4
4
  import {
5
5
  t
6
- } from "./chunk-5UYDG6HP.js";
6
+ } from "./chunk-V5NK6KMF.js";
7
7
 
8
8
  // packages/core/secretsStore.ts
9
9
  import {
@@ -9,7 +9,7 @@ import {
9
9
  isCompleteInstructionOutput,
10
10
  sanitizeToolOutputText,
11
11
  scrubSecrets
12
- } from "./chunk-PTY2VZM5.js";
12
+ } from "./chunk-KO5GO2BC.js";
13
13
  import {
14
14
  asTrimmedString
15
15
  } from "./chunk-3EUW3WEO.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  selectCurrentServer,
3
3
  selectRemoteServers
4
- } from "./chunk-SCY2O7CU.js";
4
+ } from "./chunk-BZMDWGQQ.js";
5
5
  import {
6
6
  noloDeleteRequest,
7
7
  noloWriteRequest
8
- } from "./chunk-W4S5FQWQ.js";
8
+ } from "./chunk-ZTHAJU3O.js";
9
9
  import {
10
10
  normalizeTimeFields
11
- } from "./chunk-VYRTLHIT.js";
11
+ } from "./chunk-HDKMVYNJ.js";
12
12
  import {
13
13
  selectIdentityUser,
14
14
  selectIdentityUserId
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  t
3
- } from "./chunk-5UYDG6HP.js";
3
+ } from "./chunk-V5NK6KMF.js";
4
4
 
5
5
  // packages/cli/windowsSelfUpdate.ts
6
6
  import { spawn } from "node:child_process";
@@ -5,7 +5,7 @@ import {
5
5
  mapDiscoveredSkillsToCatalogEntries,
6
6
  resolveSkillCatalog,
7
7
  resolveSkillCatalogSync
8
- } from "./chunk-5HUO7SEX.js";
8
+ } from "./chunk-YQLAFJRQ.js";
9
9
  import {
10
10
  load
11
11
  } from "./chunk-KHCLMKZZ.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-YZMNK53S.js";
8
8
  import {
9
9
  resolveLocalUserId
10
- } from "./chunk-OMIXG25B.js";
10
+ } from "./chunk-QGFLVQ6E.js";
11
11
  import {
12
12
  toErrorMessage
13
13
  } from "./chunk-HNMXYYJR.js";
@@ -5,7 +5,10 @@ import {
5
5
  } from "./chunk-S25VJYXV.js";
6
6
  import {
7
7
  findPowerShellExecutable
8
- } from "./chunk-KWARDHBI.js";
8
+ } from "./chunk-6N4IKMTH.js";
9
+ import {
10
+ resolveModelTier
11
+ } from "./chunk-HEVRQGGH.js";
9
12
  import {
10
13
  AUTH_ERROR_PATTERNS
11
14
  } from "./chunk-EWQ3HGNZ.js";
@@ -1366,6 +1369,10 @@ function buildResultFrontMatter(input) {
1366
1369
  ["cacheInputTokens", input.cacheUsage?.input_tokens],
1367
1370
  ["cacheCachedTokens", input.cacheUsage?.cached_tokens],
1368
1371
  ["cacheHitRatio", input.cacheUsage?.cache_hit_ratio],
1372
+ // run 级 token 总量与生效档位(结构化回溯用;缺省省略,绝不写 0/unknown)
1373
+ ["inputTokens", input.inputTokens],
1374
+ ["outputTokens", input.outputTokens],
1375
+ ["modelTier", input.modelTier],
1369
1376
  ["dialogId", input.dialogId],
1370
1377
  ["server", input.server],
1371
1378
  ["serverSync", input.serverSync],
@@ -3359,6 +3366,16 @@ function transitionRunToTerminal(runId, update, deps = {}, options = {}) {
3359
3366
  if (update.cacheUsage) {
3360
3367
  record2.cacheHitRatio = update.cacheUsage.cache_hit_ratio;
3361
3368
  record2.cacheCachedTokens = update.cacheUsage.cached_tokens;
3369
+ if (typeof update.cacheUsage.input_tokens === "number") {
3370
+ record2.inputTokens = update.cacheUsage.input_tokens;
3371
+ }
3372
+ if (typeof update.cacheUsage.output_tokens === "number") {
3373
+ record2.outputTokens = update.cacheUsage.output_tokens;
3374
+ }
3375
+ }
3376
+ const resolvedTier = record2.selectionCheck?.modelTier ?? resolveModelTier(record2.model);
3377
+ if (resolvedTier !== "unknown" || record2.selectionCheck?.modelTier) {
3378
+ record2.modelTier = resolvedTier;
3362
3379
  }
3363
3380
  record2.endedAt = now().toISOString();
3364
3381
  let resultWriteFailed = false;
@@ -3402,7 +3419,10 @@ function transitionRunToTerminal(runId, update, deps = {}, options = {}) {
3402
3419
  serverSync: update.serverSync,
3403
3420
  cwd: record2.cwd,
3404
3421
  continuedFrom: record2.continuedFrom,
3405
- ...update.cacheUsage ? { cacheUsage: update.cacheUsage } : {}
3422
+ ...update.cacheUsage ? { cacheUsage: update.cacheUsage } : {},
3423
+ ...typeof record2.inputTokens === "number" ? { inputTokens: record2.inputTokens } : {},
3424
+ ...typeof record2.outputTokens === "number" ? { outputTokens: record2.outputTokens } : {},
3425
+ ...record2.modelTier ? { modelTier: record2.modelTier } : {}
3406
3426
  },
3407
3427
  update.lastAssistantText ?? ""
3408
3428
  );
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  readDbRecord,
9
9
  writeAgentRecord
10
- } from "./chunk-D4CUS6NT.js";
10
+ } from "./chunk-E4HBZDV6.js";
11
11
  import {
12
12
  parseUserIdFromAuthToken,
13
13
  readOption,
@@ -2,26 +2,26 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-GJKEOBCV.js";
5
+ } from "./chunk-KRDG2XCI.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
9
9
  import {
10
10
  resolvePageReadMarkdown,
11
11
  slateToSimplifiedMarkdown
12
- } from "./chunk-NMGG3NUB.js";
12
+ } from "./chunk-U6QNVOR5.js";
13
13
  import {
14
14
  extractCategorizedMentions
15
15
  } from "./chunk-AGIM7IMJ.js";
16
16
  import {
17
17
  fetchAndCacheMessages
18
- } from "./chunk-MICGEDCN.js";
18
+ } from "./chunk-24Z44WHO.js";
19
19
  import {
20
20
  createSpaceKey
21
21
  } from "./chunk-UAD2WT54.js";
22
22
  import {
23
23
  read
24
- } from "./chunk-53UOBNTI.js";
24
+ } from "./chunk-ADYWV732.js";
25
25
  import {
26
26
  createDrainExhaustedResponse,
27
27
  isCoreDrainingBody,
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-3L2WKC3W.js";
31
31
  import {
32
32
  getRuntimeServerContext
33
- } from "./chunk-4CL6QIQZ.js";
33
+ } from "./chunk-HPDLPEUG.js";
34
34
  import {
35
35
  classifyGenerationError
36
36
  } from "./chunk-TLE77UJ5.js";
@@ -49,7 +49,7 @@ import {
49
49
  resolveBuiltinSkillEntry,
50
50
  resolveBuiltinSkillPage,
51
51
  resolveSkillGraphFromRoots
52
- } from "./chunk-Z2ZCKNKX.js";
52
+ } from "./chunk-JW6OURKM.js";
53
53
  import {
54
54
  resolvePageSkillMetadata
55
55
  } from "./chunk-AETZ7AD6.js";
@@ -5,6 +5,9 @@ import {
5
5
  import {
6
6
  asRecordOrEmpty
7
7
  } from "./chunk-KX6YBIHG.js";
8
+ import {
9
+ MODEL_TIER_GUIDANCE
10
+ } from "./chunk-HEVRQGGH.js";
8
11
  import {
9
12
  dialogIdFromKey,
10
13
  isSupportedDialogId,
@@ -581,104 +584,6 @@ function shouldFetchAgentRuntimeRecordRemotely(dbKey) {
581
584
  return /^agent(-pub)?-/.test(dbKey);
582
585
  }
583
586
 
584
- // packages/ai/agent/dispatchSelectionPolicy.ts
585
- var DISPATCH_TIER_RANK = { easy: 0, normal: 1, complex: 2, extreme: 3 };
586
- var MODEL_TIERS = [
587
- {
588
- tier: "extreme",
589
- models: ["Claude Fable 5.1/5.2\u3001Opus 5.5", "GPT-6/6.2 Astra", "Gemini 4 Neon/Carbon"],
590
- pattern: /^(?:gpt-6(?:[.-]2)?-astra|claude-(?:fable-5[.-][12]|opus-5[.-]5)|gemini-4-(?:neon|carbon))(?:$|[-@])/
591
- },
592
- {
593
- tier: "complex",
594
- models: [
595
- "GPT-5.6/6/6.1/6.2 Sol\u30015.6/6.1 Terra",
596
- "Claude Sonnet 5.5",
597
- "Gemini 4 Hydrogen/Argon\u30012.5 Pro",
598
- "Kimi K3/K3.1 Pro",
599
- "DeepSeek V4 Pro"
600
- ],
601
- pattern: /^(?:gpt-(?:(?:5[.-]6|6(?:[.-][12])?)-sol|(?:5[.-]6|6[.-]1)-terra)|gemini-(?:4-(?:hydrogen|argon)|2[.-]5-pro)|claude-sonnet-5[.-]5|kimi-k3(?:[.-]1-pro)?|k3(?:-256k)?|deepseek-v4-pro)(?:$|[-@])/
602
- },
603
- {
604
- tier: "normal",
605
- models: [
606
- "Claude Haiku 4.5/5.5",
607
- "DeepSeek Flash\uFF08\u5404\u4EE3\uFF09",
608
- "GLM 5.3/Flash",
609
- "MiMo V2.6 Pro",
610
- "Grok 4.6/4.7",
611
- "Gemini 3.6-3.8 Flash",
612
- "LongCat 2.5"
613
- ],
614
- pattern: /^(?:claude-haiku-[45][.-]5|deepseek-(?:[a-z0-9.-]+-)?flash|glm-5[.-]3|mimo-v2[.-]6-pro|grok-4[.-][67]|gemini-3[.-][678]-flash|longcat-2[.-]5)(?:$|[-@])/
615
- },
616
- {
617
- tier: "easy",
618
- models: ["MiniMax M3.1 Flash", "GPT-5.6/6 Luna"],
619
- pattern: /^(?:minimax-m3[.-]1-flash|gpt-(?:5[.-]6|6)-luna)(?:$|[-@])/
620
- }
621
- ];
622
- var MODEL_TIER_GUIDANCE = MODEL_TIERS.map(
623
- ({ tier, models }) => `${tier}: ${models.join("\u3001")}`
624
- ).join("\n");
625
- var DIFFICULTY_GRADING_ORDER = `- **\u5148\u5224\u6863\u518D\u9009\u6A21\u578B**\uFF08\u89C4\u5212\u590D\u6742\u2260\u6267\u884C\u590D\u6742\uFF09\uFF1A\u5148\u5B9A\u5B50\u4EFB\u52A1 difficulty \u518D\u9009\u8BE5\u6863\u80DC\u4EFB\u6A21\u578B\uFF1B\u91CD\u8981\u5EA6\u3001\u6587\u4EF6\u6570\u3001\u8017\u65F6\u3001\u53D1\u5E03\u5B89\u5168\u76EE\u5F55\u4E0D\u5347\u6863\uFF0C\u300C\u66F4\u7A33\u59A5/\u66F4\u5B89\u5168/\u72EC\u7ACB review\u300D\u4E0D\u662F\u5347\u6863\u7406\u7531\uFF0C\u9009\u8DB3\u591F\u80DC\u4EFB\u7684\u6700\u4F4E\u6863\uFF0C\u4E0D\u4E3A\u964D\u6863\u62C6\u788E\u3002`;
626
- var DIFFICULTY_GRADING_TIERS = ` - \u56DB\u6863\uFF1Aeasy\uFF1D\u6839\u56E0\u4E0E\u505A\u6CD5\u660E\u786E\u3001\u5C40\u90E8\u53EF\u9A8C\uFF1Bnormal\uFF1D\u6309\u65E2\u5B9A\u5951\u7EA6\u5B9E\u73B0/\u9A8C\u8BC1\u6216\u5C40\u90E8\u5B9A\u4F4D\uFF1Bcomplex\uFF1D\u591A\u6839\u56E0\u3001\u8DE8\u72B6\u6001\u6216\u5E76\u53D1\u517C\u5BB9\u53D6\u820D\uFF1Bextreme\uFF1D\u67B6\u6784\u672A\u5B9A\u6216\u5B89\u5168/\u5B8C\u6574\u6027\u91CD\u5927\u53D6\u820D\u3002\u5347\u6863\u987B\u6307\u51FA\u672C\u5757\u672A\u51B3\u70B9\uFF0C\u4E0D\u6309\u9879\u76EE\u6574\u4F53\u5B9A\u6863\u3002\u5B9E\u73B0\u4E0E\u590D\u5BA1\u91CD\u5224\uFF0C\u4E0D\u7EE7\u627F\u89C4\u5212\u6863\u3002`;
627
- function resolveModelTier(model) {
628
- if (typeof model !== "string") return "unknown";
629
- const id = model.trim().toLowerCase().split("/").at(-1).replace(/\s+/g, "-");
630
- if (id.includes("-image") || id.startsWith("nano-banana")) return "unknown";
631
- return MODEL_TIERS.find(({ pattern }) => pattern.test(id))?.tier ?? "unknown";
632
- }
633
- function normalizeDispatchDifficulty(value) {
634
- if (value === "easy" || value === "\u7B80\u5355") return "easy";
635
- if (value === "complex" || value === "\u590D\u6742") return "complex";
636
- if (value === "extreme" || value === "\u6781\u7AEF\u590D\u6742" || value === "\u6781\u5176\u590D\u6742")
637
- return "extreme";
638
- return "normal";
639
- }
640
- function normalizeSelectionReason(value) {
641
- if (typeof value !== "string") return void 0;
642
- const trimmed = value.trim();
643
- return trimmed.length > 0 ? trimmed : void 0;
644
- }
645
- function requiresSelectionReason(difficulty, modelTier) {
646
- return modelTier !== "unknown" && DISPATCH_TIER_RANK[modelTier] - DISPATCH_TIER_RANK[difficulty] >= 2;
647
- }
648
- function checkDispatchSelection(input) {
649
- const dimension = input.dimension === "design_frontend" || input.dimension === "writing" ? input.dimension : "general";
650
- const difficulty = normalizeDispatchDifficulty(input.difficulty);
651
- const modelTier = resolveModelTier(input.model);
652
- const status = modelTier === "unknown" ? "unknown" : modelTier === difficulty ? "matched" : "mismatch";
653
- const selectionReason = normalizeSelectionReason(input.selectionReason);
654
- const message = status === "matched" ? void 0 : status === "unknown" ? "\u6A21\u578B\u6863\u4F4D\u672A\u77E5\uFF1B\u6309\u9886\u57DF\u4E0E\u53EF\u7528\u6027\u5224\u65AD\uFF0C\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002" : selectionReason ? "\u6863\u4F4D\u4E0E\u96BE\u5EA6\u4E0D\u4E00\u81F4\uFF1B\u5DF2\u7ED9\u51FA\u8DE8\u6863\u7406\u7531\uFF0C\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002" : requiresSelectionReason(difficulty, modelTier) ? "\u6A21\u578B\u9AD8\u51FA\u4EFB\u52A1\u96BE\u5EA6\u81F3\u5C11\u4E24\u6863\uFF1B\u542F\u52A8\u524D\u9700\u5728 selectionReason \u8BF4\u660E\u7406\u7531\u3002" : "\u6863\u4F4D\u4E0E\u96BE\u5EA6\u4E0D\u4E00\u81F4\uFF1B\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002";
655
- return {
656
- dimension,
657
- difficulty,
658
- modelTier,
659
- status,
660
- ...message ? { message } : {},
661
- ...selectionReason ? { selectionReason } : {}
662
- };
663
- }
664
- function checkDispatchSelectionAdmission(input) {
665
- const check = checkDispatchSelection(input);
666
- if (!requiresSelectionReason(check.difficulty, check.modelTier) || check.selectionReason)
667
- return { ok: true, check };
668
- const error = {
669
- code: "selection_reason_required",
670
- message: `\u8DE8\u6863\u9009\u62E9\u7F3A\u5C11 selectionReason\uFF1A\u6A21\u578B\u6863\u4F4D ${check.modelTier} \u9AD8\u51FA\u4EFB\u52A1\u96BE\u5EA6 ${check.difficulty} \u81F3\u5C11\u4E24\u6863\uFF0C\u8BF7\u8865\u5145\u672C\u6B21\u8DE8\u6863\u7684\u5177\u4F53\u7406\u7531\u540E\u518D\u542F\u52A8\u3002`,
671
- hint: "\u8865\u4E00\u53E5\u672C\u6B21\u4E3A\u4EC0\u4E48\u8FD9\u6837\u8DE8\u6863\uFF08\u5982\u9886\u57DF\u4F18\u52BF\u3001\u7528\u6237\u660E\u786E\u6307\u5B9A\uFF09\u5373\u53EF\uFF1B\u53EA\u6821\u9A8C\u7406\u7531\u662F\u5426\u5B58\u5728\uFF0C\u4E0D\u4EE3\u8868\u5DF2\u6838\u5B9E\u7528\u6237\u6388\u6743\u3001\u989D\u5EA6/\u8D39\u7528\u6743\u9650\u6216\u7F51\u7EDC\u53EF\u7528\u6027\u3002"
672
- };
673
- return { ok: false, check, error };
674
- }
675
- function assertDispatchSelectionAdmission(input) {
676
- const admission = checkDispatchSelectionAdmission(input);
677
- if (!admission.ok && admission.error)
678
- throw new Error(`${admission.error.message} ${admission.error.hint}`);
679
- return admission.check;
680
- }
681
-
682
587
  // packages/ai/agent/agentSelectionPriority.ts
683
588
  function parseAgentTimestamp(value) {
684
589
  if (typeof value === "number" && Number.isFinite(value)) return value;
@@ -795,8 +700,8 @@ var CLOSED_OBJECT_SCHEMA_TOOL_NAMES = /* @__PURE__ */ new Set([
795
700
  function stringToolParam(description) {
796
701
  return { type: "string", description };
797
702
  }
798
- var READ_DIALOG_TOOL_DESCRIPTION = `Read a persisted dialog (meta + messages) by full dbKey (dialog-<userId>-<id>) or dialog URL; use listDialogs when unclear. A bare id only resolves for the currently logged-in user \u2014 pass user/server. For runs, do not poll a running dialog's full transcript: prefer controlAgentRun, else mode="status" for a compact snapshot; read the transcript only after done/failed/cancelled. Response is budgeted: reasoning_content, tool_calls, tool results and metadata are head-truncated (truncated, messagesTotal/messagesReturned, estimatedOriginalChars/omittedChars). For review or verification, read mode="status" plus the final verdict and take diffs from the worktree instead of pulling the full execution transcript.`;
799
- var LIST_AGENTS_TOOL_DESCRIPTION = "List agents for delegation. Default scope='all' dedupes the user's own/favorite agents (owned, OAuth, custom-API, local) with the public marketplace; scope='public' discovers shared/marketplace agents only. Public agents may consume platform credits \u2014 check billingSource. Each entry's agentKey is runnable (agent-<userId>-<id> / agent-pub-<id>): Copy the agentKey verbatim; use the runnable agentKey exactly and do not infer it from the display name. Copy `agentKey` verbatim into startAgentRun. Returns planningRecommendation (reason, currentTier, requiresPaidApproval): advice when planning is needed, not authorization. Rate-limited agents are listed too: availabilityStatus/availabilityReason/nextAvailableAt are reference info \u2014 advisory annotations, not dispatch gates; unavailableCount counts them. Fan-out guard limits only same-batch concurrency (sharing a credential alone is not a dependency) unless allowUnknownCredential confirms.";
703
+ var READ_DIALOG_TOOL_DESCRIPTION = `Read a persisted dialog (meta + messages) by full dbKey (dialog-<userId>-<id>) or dialog URL; use listDialogs when unclear. A bare id only resolves for the currently logged-in user \u2014 pass user/server. For runs, do not poll a running dialog's full transcript: prefer controlAgentRun, else mode="status" for a compact snapshot; read the transcript only after done/failed/cancelled. Responses are budgeted: reasoning_content, tool_calls, tool results and metadata are head-truncated (truncated, messagesTotal/messagesReturned, omittedChars). For review or verification take diffs from the worktree instead of the full transcript.`;
704
+ var LIST_AGENTS_TOOL_DESCRIPTION = "List agents for delegation. Default scope='all' dedupes the user's own/favorite agents (owned, OAuth, custom-API, local) with the public marketplace; scope='public' discovers shared/marketplace agents only (they may consume platform credits \u2014 check billingSource). Each entry has a runnable agentKey (agent-<userId>-<id> / agent-pub-<id>): Copy the agentKey verbatim and do not infer it from the display name. Copy `agentKey` verbatim into startAgentRun. Returns planningRecommendation (reason, currentTier, requiresPaidApproval): advice when planning is needed, not authorization. availabilityStatus/availabilityReason/nextAvailableAt are advisory reference info, not dispatch gates; unavailableCount counts them. The fan-out guard limits same-batch concurrency only (sharing a credential alone is not a dependency) unless allowUnknownCredential confirms.";
800
705
  function buildNoloWorkspaceOpenAiTools(args) {
801
706
  const toolNames = new Set(args.toolNames ?? []);
802
707
  const tools = [];
@@ -1353,11 +1258,6 @@ var AGENT_THREAD_ACTIVE_STATUSES = ["pending", "running"];
1353
1258
  var AGENT_THREAD_TERMINAL_STATUSES = ["done", "failed", "cancelled", "orphaned"];
1354
1259
 
1355
1260
  export {
1356
- DISPATCH_TIER_RANK,
1357
- DIFFICULTY_GRADING_ORDER,
1358
- DIFFICULTY_GRADING_TIERS,
1359
- resolveModelTier,
1360
- assertDispatchSelectionAdmission,
1361
1261
  resolveAgentSelectionPriority,
1362
1262
  compareAgentSelection,
1363
1263
  AGENT_SELECTION_PRIORITY_INSTRUCTIONS,
@@ -14,16 +14,16 @@ import {
14
14
  import {
15
15
  addContentToSpace,
16
16
  resolveCreationSpaceId
17
- } from "./chunk-YW5L3XOO.js";
17
+ } from "./chunk-HZQGCFPJ.js";
18
18
  import {
19
19
  runtime_default
20
- } from "./chunk-MICGEDCN.js";
20
+ } from "./chunk-24Z44WHO.js";
21
21
  import {
22
22
  getCurrentSpaceId
23
- } from "./chunk-DNY33GGQ.js";
23
+ } from "./chunk-YN23INFZ.js";
24
24
  import {
25
25
  write
26
- } from "./chunk-53UOBNTI.js";
26
+ } from "./chunk-ADYWV732.js";
27
27
  import {
28
28
  selectIdentityUserId
29
29
  } from "./chunk-PXYBUFDB.js";