nolo-cli 0.206.1 → 0.208.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 (113) hide show
  1. package/{_executeModel-U2XB3H4R.js → _executeModel-F4GZ3K75.js} +20 -20
  2. package/{agentDeleteCommand-NVXNQ2VQ.js → agentDeleteCommand-F2HW7SZI.js} +36 -36
  3. package/{agentEmailCommands-VUJOYASY.js → agentEmailCommands-6PJSMXBQ.js} +35 -35
  4. package/{agentListCommands-KDRCBFUE.js → agentListCommands-S54ZR3L7.js} +27 -47
  5. package/{agentMachineCommands-TGZIF2SL.js → agentMachineCommands-HN7VKXOV.js} +16 -16
  6. package/{agentProviderCommands-SKW4L6NN.js → agentProviderCommands-MN3ABDME.js} +2 -2
  7. package/{agentPullCommand-LGASFNH7.js → agentPullCommand-2JMJP5BS.js} +1 -1
  8. package/{agentRecordCommands-DM5UHNZM.js → agentRecordCommands-SZ6JTRZG.js} +32 -32
  9. package/{agentRunCommand-T6JGFAFZ.js → agentRunCommand-XEV3BK3L.js} +33 -33
  10. package/{agentRunControl-GOH5VSQU.js → agentRunControl-AF7BMR22.js} +3 -3
  11. package/{agentRuntimeLocal-N5S7NSJB.js → agentRuntimeLocal-KCC7QW7Z.js} +12 -12
  12. package/{agentSlice-6XXGHTPP.js → agentSlice-QHBCIRZZ.js} +1 -1
  13. package/{appDeleteCommands-VJNS4HSF.js → appDeleteCommands-7O4SMBTL.js} +18 -18
  14. package/{appDeployCommands-HLZIEHUP.js → appDeployCommands-4Y46KPQJ.js} +18 -18
  15. package/{appDeployStatusCommands-PT64TF2T.js → appDeployStatusCommands-WRAXA7AH.js} +18 -18
  16. package/{appGetCommands-FM2ICAF7.js → appGetCommands-RKC3OW5T.js} +18 -18
  17. package/{appListCommands-QVC3TKQD.js → appListCommands-3QVE4TSI.js} +18 -18
  18. package/authCommand-AUP7FHGM.js +69 -0
  19. package/{authCommands-MZUXPRYJ.js → authCommands-WK6E42L2.js} +2 -2
  20. package/{chromeOpsCommands-ECVS6CAO.js → chromeOpsCommands-HEN5AX2J.js} +1 -1
  21. package/{chunk-4NWJ3Z3G.js → chunk-25OB36GU.js} +1 -1
  22. package/{chunk-5MXA4LWL.js → chunk-27E2CBBY.js} +1 -1
  23. package/{chunk-3ZUXGHFS.js → chunk-2UZ22L3V.js} +4 -80
  24. package/{chunk-3UCYYSKN.js → chunk-35DNCETZ.js} +29 -29
  25. package/{chunk-7NMNKOW5.js → chunk-3IBHFELR.js} +2 -2
  26. package/{chunk-JASKVAYJ.js → chunk-3QKILTO3.js} +2 -2
  27. package/{chunk-PPCUXO3E.js → chunk-3RQVYR4B.js} +103 -0
  28. package/{chunk-YZGNKHUM.js → chunk-3V2QMRNN.js} +1 -1
  29. package/{chunk-BAPZCPYU.js → chunk-4LEGTOSR.js} +1 -1
  30. package/{chunk-64K7WX26.js → chunk-4WVJLODK.js} +1 -1
  31. package/{chunk-Y3ASVJWL.js → chunk-64D757HH.js} +3 -3
  32. package/{chunk-2Q3LOAFE.js → chunk-6HVBI6TI.js} +2 -2
  33. package/{chunk-U7HTU2S7.js → chunk-7AUQ3WCW.js} +1 -1
  34. package/{chunk-L5FZUSB6.js → chunk-AD26C3WW.js} +3 -3
  35. package/{chunk-4RERKW4Q.js → chunk-AJ65N2PX.js} +5 -5
  36. package/{chunk-5XNUQGLF.js → chunk-ALBTWLUE.js} +7 -7
  37. package/{chunk-P64WRQYV.js → chunk-AZMYUSVF.js} +1 -1
  38. package/{authCommand-NZC3H2EN.js → chunk-B2WYM23T.js} +18 -43
  39. package/{chunk-WC6TH54L.js → chunk-BF3TXGWM.js} +5 -5
  40. package/{chunk-PK5TD4ST.js → chunk-C2XZM3K4.js} +1 -1
  41. package/{chunk-5ZBZHVMF.js → chunk-CAB2CZ5H.js} +36 -19
  42. package/{chunk-ZCKXJTCW.js → chunk-CGQSAFXP.js} +10 -10
  43. package/{chunk-XNOILBHV.js → chunk-CKOO42G5.js} +1 -1
  44. package/{chunk-SEOM7GLZ.js → chunk-COWSUNBH.js} +1 -1
  45. package/{chunk-JBWLZ3CB.js → chunk-DA7CTWT4.js} +2 -2
  46. package/{chunk-YJ6UWOO5.js → chunk-DNQ5NOAR.js} +2 -2
  47. package/{chunk-NUAQ3QHF.js → chunk-FPCPCTSA.js} +2 -2
  48. package/{chunk-5OJDQAJ2.js → chunk-FQQWTOBR.js} +2 -2
  49. package/{chunk-7LJEJV4F.js → chunk-GMEAELJ6.js} +88 -1
  50. package/{chunk-7DQSP7JU.js → chunk-J5JTMQIA.js} +1 -1
  51. package/{chunk-EVG6HQQ7.js → chunk-JBOUVTZX.js} +2 -2
  52. package/{chunk-5BHQICF2.js → chunk-JRTNUU5Z.js} +25 -6
  53. package/{chunk-7T5TLIY4.js → chunk-LKDF3ATR.js} +1 -1
  54. package/{chunk-LKV5K7PW.js → chunk-MKK2YY5Q.js} +2 -2
  55. package/{chunk-73PRLLT6.js → chunk-MONJ5H3H.js} +5 -5
  56. package/{chunk-LEJSZV6V.js → chunk-P2ZLUIW2.js} +243 -15
  57. package/{chunk-YF4ZRVP3.js → chunk-PLYWH7XM.js} +1 -1
  58. package/{chunk-WPOKOKZA.js → chunk-PV6JJAUB.js} +1 -1
  59. package/{chunk-IAYMBPDZ.js → chunk-QOI7USOV.js} +2 -2
  60. package/{chunk-W45PCJHS.js → chunk-R56VAYY4.js} +1 -1
  61. package/{chunk-DDVXTOFJ.js → chunk-RIALQUSF.js} +8 -8
  62. package/{chunk-LTI5T3A6.js → chunk-SN5XE6GQ.js} +1 -1
  63. package/{chunk-D3DGBEYY.js → chunk-SU3QL7YG.js} +2 -2
  64. package/{chunk-MNWKNN6V.js → chunk-SZ4ADZFT.js} +1 -1
  65. package/{chunk-2GKUVGRT.js → chunk-THE5CKB2.js} +13 -5
  66. package/{chunk-ZRDUMMDG.js → chunk-UTBQCL6N.js} +9 -7
  67. package/{chunk-6AMR3AE6.js → chunk-UZT65S6D.js} +12 -1
  68. package/{chunk-K7ZZPUNO.js → chunk-WWSPE2GG.js} +12 -12
  69. package/{chunk-2PW2KOII.js → chunk-XDMGY5IU.js} +2 -2
  70. package/{chunk-UGCQKKXW.js → chunk-XE4Q46FF.js} +1 -1
  71. package/{chunk-QSAUX2Q2.js → chunk-YCEA47VH.js} +2 -2
  72. package/{chunk-LDPZBAQK.js → chunk-YY37MQSS.js} +2 -2
  73. package/{chunk-AWVFQMOV.js → chunk-ZYKJBRZ3.js} +5 -1
  74. package/{commandRegistry-PASVNTAX.js → commandRegistry-XVFA25FB.js} +70 -70
  75. package/{contentThunks-IXBWQP4P.js → contentThunks-V3CDW4YX.js} +4 -4
  76. package/{cooldownCommands-I4ETQ4AO.js → cooldownCommands-YL7H74YB.js} +3 -3
  77. package/{createAgentAutomationAction-7O7PFPDO.js → createAgentAutomationAction-FGWAYVEP.js} +4 -4
  78. package/{createDialogAction-DRHO4XCF.js → createDialogAction-UXAMBNR4.js} +5 -5
  79. package/{createPageAction-TFGJRDZX.js → createPageAction-S6HULJP6.js} +4 -4
  80. package/{db-2QOTXYGH.js → db-HUCI5R4G.js} +2 -2
  81. package/{dialogCommands-RYIONJLY.js → dialogCommands-HW6WWUII.js} +21 -21
  82. package/{dialogSlice-CXIZ5UTI.js → dialogSlice-TBITWBDH.js} +3 -3
  83. package/{dialogUsageCommand-QTG6ILEJ.js → dialogUsageCommand-ZCPPHPJ5.js} +1 -1
  84. package/{docCreateCommands-KC2V2RPX.js → docCreateCommands-ETFMIYE5.js} +16 -16
  85. package/{docDeleteCommands-S2SDQL2S.js → docDeleteCommands-HEDB7AHB.js} +17 -17
  86. package/{docReadCommands-3YGFKAOZ.js → docReadCommands-4T5EQQW6.js} +16 -16
  87. package/{docStore-5AHNSAEI.js → docStore-NFLRMEX3.js} +1 -1
  88. package/{docUpdateCommands-PU6MQTLW.js → docUpdateCommands-TYM5V565.js} +16 -16
  89. package/{getPricing-3PQY3TGI.js → getPricing-OQXBJ6VZ.js} +1 -1
  90. package/{handleSendMessageAction-SO3PD3YA.js → handleSendMessageAction-UCFZXCXP.js} +12 -12
  91. package/index.js +7 -7
  92. package/{localDialogRead-FUXGZ57B.js → localDialogRead-5VCMQQZF.js} +1 -1
  93. package/{localRuntimeAdapter-5B7QODVK.js → localRuntimeAdapter-JBXUIVNU.js} +29 -29
  94. package/{localRuntimeAuthority-NEGF3LRQ.js → localRuntimeAuthority-OYH4AE4G.js} +2 -2
  95. package/{localRuntimeDb-SDYFAEKA.js → localRuntimeDb-VBIMCWUC.js} +1 -1
  96. package/{machineCommands-U3DO4TFR.js → machineCommands-FDQA6NCY.js} +30 -30
  97. package/{machineWsRunDispatch-Y3IMIZO7.js → machineWsRunDispatch-VBTEUSVI.js} +30 -30
  98. package/package.json +1 -1
  99. package/{providerPresetApply-EQESXT6X.js → providerPresetApply-ZYMLQA46.js} +3 -3
  100. package/{providerRegistry-PZ56P43E.js → providerRegistry-E34XWDLJ.js} +3 -3
  101. package/{readlineWorkspace-32IDD2MQ.js → readlineWorkspace-SJY4M4YP.js} +558 -139
  102. package/{removeDialogAgentAction-BDLO7UC2.js → removeDialogAgentAction-UQFCQO6L.js} +1 -1
  103. package/{runAgentClientLoop-ERVJ4LFY.js → runAgentClientLoop-V4KMRRPJ.js} +18 -18
  104. package/{runtimeDoctorCommands-3VFVTGPI.js → runtimeDoctorCommands-PGAA47G5.js} +5 -5
  105. package/{secretCommands-RLIO3QK5.js → secretCommands-ZCZ4KVET.js} +1 -1
  106. package/{setPrimaryDialogAgentAction-PGBTR247.js → setPrimaryDialogAgentAction-23PMBXWD.js} +1 -1
  107. package/{spaceCommands-4UWABUD7.js → spaceCommands-JMU4R5LB.js} +15 -15
  108. package/{streamAgentChatTurn-2M4L7PF4.js → streamAgentChatTurn-SUWOIV4S.js} +22 -22
  109. package/{tools-GINHFGST.js → tools-JW4EEFK7.js} +13 -13
  110. package/{tuiSummaryLlmCaller-CEIZAKUV.js → tuiSummaryLlmCaller-4QCQ2TIN.js} +6 -6
  111. package/{updateCommands-X23W5F73.js → updateCommands-Q6CYAEYJ.js} +3 -3
  112. package/{updateDialogTitleAction-4EIHKTKR.js → updateDialogTitleAction-EDXTLVGM.js} +4 -4
  113. package/{windowsSelfUpdate-SVJKL6VH.js → windowsSelfUpdate-XSQVF2GK.js} +2 -2
@@ -9,17 +9,17 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-NUAQ3QHF.js";
12
+ } from "./chunk-FPCPCTSA.js";
13
13
  import {
14
14
  parsePositiveFiniteNumberOrFallback
15
15
  } from "./chunk-Y5GCAMGP.js";
16
16
  import {
17
17
  getReadableCliDb
18
- } from "./chunk-7DQSP7JU.js";
18
+ } from "./chunk-J5JTMQIA.js";
19
19
  import {
20
20
  readDbRecord,
21
21
  resolveAgentRecordFromHybridStore
22
- } from "./chunk-2PW2KOII.js";
22
+ } from "./chunk-XDMGY5IU.js";
23
23
  import {
24
24
  INSTABOX_RUN_CONFIG_ENV,
25
25
  createCliLocalRuntimeAdapter,
@@ -38,12 +38,12 @@ import {
38
38
  resolveFileWriteGateEnabled,
39
39
  resolveLocalUserId,
40
40
  validateInstaboxWorkspaceSelection
41
- } from "./chunk-3UCYYSKN.js";
41
+ } from "./chunk-35DNCETZ.js";
42
42
  import {
43
43
  clearCredentialAvailability,
44
44
  readEffectiveCredentialEntry,
45
45
  recordCredentialProbe
46
- } from "./chunk-W45PCJHS.js";
46
+ } from "./chunk-R56VAYY4.js";
47
47
  import {
48
48
  isLocalCliAgentKey
49
49
  } from "./chunk-NBTY7YJF.js";
@@ -72,14 +72,14 @@ import {
72
72
  } from "./chunk-BMQ2MJUK.js";
73
73
  import {
74
74
  resolveCliLocalRuntimeKeyCapability
75
- } from "./chunk-K7ZZPUNO.js";
75
+ } from "./chunk-WWSPE2GG.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-QSAUX2Q2.js";
82
+ } from "./chunk-YCEA47VH.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-LKV5K7PW.js";
91
+ } from "./chunk-MKK2YY5Q.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-ZCKXJTCW.js";
99
+ } from "./chunk-CGQSAFXP.js";
100
100
  import {
101
101
  isCliAuthorityBrokerProtocolError,
102
102
  isCliAuthorityBrokerTimeoutError,
@@ -104,7 +104,7 @@ import {
104
104
  } from "./chunk-5ZMIIR23.js";
105
105
  import {
106
106
  getDefaultCliLocalRuntimeDb
107
- } from "./chunk-P64WRQYV.js";
107
+ } from "./chunk-AZMYUSVF.js";
108
108
  import {
109
109
  buildSkillDiscoveryContextLayer
110
110
  } from "./chunk-CTZ4O3XD.js";
@@ -116,10 +116,10 @@ import {
116
116
  LOCAL_AGENT_CONFIG_MISSING_CODE,
117
117
  LOCAL_TURN_ABORTED_CODE,
118
118
  readActionGate
119
- } from "./chunk-ZRDUMMDG.js";
119
+ } from "./chunk-UTBQCL6N.js";
120
120
  import {
121
121
  resolveAgentRuntimeConfigFromRecord
122
- } from "./chunk-MNWKNN6V.js";
122
+ } from "./chunk-SZ4ADZFT.js";
123
123
  import {
124
124
  createThinkParserState,
125
125
  flushThinkParser,
@@ -135,7 +135,7 @@ import {
135
135
  mergeAvailabilityDeadline,
136
136
  resolveCooldownGate,
137
137
  resolveCredentialKeyWithFallback
138
- } from "./chunk-7LJEJV4F.js";
138
+ } from "./chunk-GMEAELJ6.js";
139
139
  import {
140
140
  ATTACHMENT_PART_TYPE,
141
141
  ATTACHMENT_PART_VERSION,
@@ -178,7 +178,7 @@ import {
178
178
  } from "./chunk-M2EJHDJP.js";
179
179
  import {
180
180
  isAntigravityOAuthAgent
181
- } from "./chunk-YF4ZRVP3.js";
181
+ } from "./chunk-PLYWH7XM.js";
182
182
  import {
183
183
  createRunActivityTracker,
184
184
  createShellApprovalChild,
@@ -193,7 +193,7 @@ import {
193
193
  serverOriginForDialog,
194
194
  settleRunTerminalAuthoritatively,
195
195
  spawnLocalBackgroundRun
196
- } from "./chunk-PK5TD4ST.js";
196
+ } from "./chunk-C2XZM3K4.js";
197
197
  import {
198
198
  formatAgentListCard,
199
199
  formatFinishedRunCard,
@@ -206,7 +206,7 @@ import {
206
206
  } from "./chunk-PJNFNEJE.js";
207
207
  import {
208
208
  resolveClientVersion
209
- } from "./chunk-WPOKOKZA.js";
209
+ } from "./chunk-PV6JJAUB.js";
210
210
  import {
211
211
  findModelConfig
212
212
  } from "./chunk-SM3NSZJV.js";
@@ -230,7 +230,7 @@ import {
230
230
  t,
231
231
  toolLabel,
232
232
  toolLabelVariants
233
- } from "./chunk-PPCUXO3E.js";
233
+ } from "./chunk-3RQVYR4B.js";
234
234
  import {
235
235
  createMemoryKey
236
236
  } from "./chunk-ECX3NKRD.js";
@@ -11412,7 +11412,7 @@ function isBalanceExhaustedError(error) {
11412
11412
 
11413
11413
  // packages/cli/client/agentRun.ts
11414
11414
  async function loadRunLocalAgentTurn() {
11415
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-N5S7NSJB.js");
11415
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-KCC7QW7Z.js");
11416
11416
  return runLocalAgentTurn;
11417
11417
  }
11418
11418
  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();
@@ -11777,7 +11777,7 @@ function buildAuthFailure(ctx) {
11777
11777
  `;
11778
11778
  }
11779
11779
  if (ctx.status === 403 && ctx.message.includes("owner-required proxy failed") && /"code"\s*:\s*"owner_oauth_unavailable"/i.test(ctx.message)) {
11780
- return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, the agent owner's OAuth credential is unavailable on the server \u2014 \u5206\u4EAB\u8005\uFF08agent \u6240\u6709\u8005\uFF09\u7684 OAuth \u51ED\u636E\u5728\u670D\u52A1\u7AEF\u4E0D\u53EF\u7528; owner_oauth_unavailable).
11780
+ return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, the agent owner's OAuth credential is unavailable on the server \u2014 ${OWNER_OAUTH_UNAVAILABLE_HINT}; owner_oauth_unavailable).
11781
11781
  \xB7 Ask the agent owner to run \`nolo auth <provider> --sync-to-server\` (or re-authenticate) / \u8BF7 owner \u6267\u884C \`nolo auth <provider> --sync-to-server\`\uFF08\u6216\u91CD\u65B0\u6388\u6743\uFF09
11782
11782
  \xB7 Re-logging in on your local machine will not resolve this (the credential belongs to the agent owner, not this machine) / \u4F60\u672C\u673A\u91CD\u65B0\u767B\u5F55\u4E0D\u4F1A\u89E3\u51B3
11783
11783
  \xB7 Running with --server will not bypass this (server runs also require the owner's credential) / --server \u4E5F\u7ED5\u4E0D\u8FC7\uFF08\u670D\u52A1\u7AEF\u8DEF\u5F84\u540C\u6837\u8981\u7528 owner \u51ED\u636E\uFF09
@@ -11791,11 +11791,25 @@ function buildAuthFailure(ctx) {
11791
11791
  \xB7 Ask the agent owner to re-share or grant access to this agent / \u8BF7\u8054\u7CFB owner \u91CD\u65B0\u5206\u4EAB\u6216\u6388\u6743
11792
11792
  \xB7 Re-logging in on your local machine will not resolve this (the grant must come from the agent owner) / \u4F60\u672C\u673A\u91CD\u65B0\u767B\u5F55\u4E0D\u4F1A\u89E3\u51B3
11793
11793
  Detail: ${ctx.message} ${NO_FALLBACK} ${SERVER_FALLBACK_HINT}
11794
+ `;
11795
+ }
11796
+ if (/invalid_grant/i.test(ctx.message)) {
11797
+ return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status ?? 401}, invalid_grant).
11798
+ Claude grant \u53EF\u80FD\u5DF2\u8D85\u8FC7 30 \u5929\uFF0C\u9700\u91CD\u65B0\u6388\u6743\uFF08\u5728 TUI \u91CC\u53EF\u76F4\u63A5\u6309\u56DE\u8F66\u8FD0\u884C /auth claude\uFF09 Detail: ${ctx.message} ${NO_FALLBACK} ${SERVER_FALLBACK_HINT}
11794
11799
  `;
11795
11800
  }
11796
11801
  return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, auth rejected). Detail: ${ctx.message} ${NO_FALLBACK} ${fix}, ${SERVER_FALLBACK_HINT}
11797
11802
  `;
11798
11803
  }
11804
+ var OWNER_OAUTH_UNAVAILABLE_HINT = "\u662F agent \u6240\u6709\u8005\u7684\u51ED\u636E\u95EE\u9898\uFF0C\u4F60\u672C\u673A\u91CD\u767B\u65E0\u6548";
11805
+ function isOwnerOAuthUnavailableError(error) {
11806
+ const msg = error instanceof Error ? error.message : typeof error === "string" ? error : "";
11807
+ return /owner_oauth_unavailable/i.test(msg);
11808
+ }
11809
+ function isInvalidGrantError(error) {
11810
+ const msg = error instanceof Error ? error.message : typeof error === "string" ? error : "";
11811
+ return /invalid_grant/i.test(msg);
11812
+ }
11799
11813
  function isAuthNoTokenBody(message) {
11800
11814
  return /"authCode"\s*:\s*"AUTH_NO_TOKEN"/i.test(message) || /no authentication token provided/i.test(message);
11801
11815
  }
@@ -16465,6 +16479,9 @@ export {
16465
16479
  readAgentsMdLayerFromDisk,
16466
16480
  emitTerminalProgramStatus,
16467
16481
  isBalanceExhaustedError,
16482
+ OWNER_OAUTH_UNAVAILABLE_HINT,
16483
+ isOwnerOAuthUnavailableError,
16484
+ isInvalidGrantError,
16468
16485
  runAgentTurn,
16469
16486
  resolveWorkflowReference,
16470
16487
  resolveSkillReference,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-523DITKR.js";
12
12
  import {
13
13
  runLlm
14
- } from "./chunk-Y3ASVJWL.js";
14
+ } from "./chunk-64D757HH.js";
15
15
  import {
16
16
  isMediaToolConfirmation
17
17
  } from "./chunk-QYPE3TS3.js";
@@ -11077,7 +11077,7 @@ var messageSlice = createSliceWithThunks({
11077
11077
  runtimeOptions: args.runtimeOptions
11078
11078
  });
11079
11079
  if (agentKeyToUse) {
11080
- const { streamAgentChatTurn } = await import("./agentSlice-6XXGHTPP.js");
11080
+ const { streamAgentChatTurn } = await import("./agentSlice-QHBCIRZZ.js");
11081
11081
  await dispatch(
11082
11082
  streamAgentChatTurn({
11083
11083
  agentKey: agentKeyToUse,
@@ -13891,7 +13891,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13891
13891
  }
13892
13892
  if (isCurrentDialog) {
13893
13893
  await thunkApi.dispatch(resetMsgs());
13894
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-CXIZ5UTI.js");
13894
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-TBITWBDH.js");
13895
13895
  dispatch(clearPendingAttachments2());
13896
13896
  }
13897
13897
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -13899,15 +13899,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13899
13899
 
13900
13900
  // packages/chat/dialog/dialogSlice.ts
13901
13901
  var runCreateDialogAction = async (args, thunkApi) => {
13902
- const { createDialogAction } = await import("./createDialogAction-DRHO4XCF.js");
13902
+ const { createDialogAction } = await import("./createDialogAction-UXAMBNR4.js");
13903
13903
  return createDialogAction(args, thunkApi);
13904
13904
  };
13905
13905
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13906
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-7O7PFPDO.js");
13906
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-FGWAYVEP.js");
13907
13907
  return createAgentAutomationAction(args, thunkApi);
13908
13908
  };
13909
13909
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13910
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-4EIHKTKR.js");
13910
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-EDXTLVGM.js");
13911
13911
  return updateDialogTitleAction(args, thunkApi);
13912
13912
  };
13913
13913
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -13915,11 +13915,11 @@ var runAddDialogAgentAction = async (args, thunkApi) => {
13915
13915
  return addDialogAgentAction(args, thunkApi);
13916
13916
  };
13917
13917
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
13918
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-BDLO7UC2.js");
13918
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-UQFCQO6L.js");
13919
13919
  return removeDialogAgentAction(args, thunkApi);
13920
13920
  };
13921
13921
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
13922
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-PGBTR247.js");
13922
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-23PMBXWD.js");
13923
13923
  return setPrimaryDialogAgentAction(args, thunkApi);
13924
13924
  };
13925
13925
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
@@ -13931,7 +13931,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13931
13931
  return setDialogExtraReferencesAction(args, thunkApi);
13932
13932
  };
13933
13933
  var runHandleSendMessageAction = async (args, thunkApi) => {
13934
- const { handleSendMessageAction } = await import("./handleSendMessageAction-SO3PD3YA.js");
13934
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-UCFZXCXP.js");
13935
13935
  return handleSendMessageAction(args, thunkApi);
13936
13936
  };
13937
13937
  function clearDialogState() {
@@ -13944,7 +13944,7 @@ var createPageAndAddReference = createAsyncThunk(
13944
13944
  async (payload, { dispatch, getState, rejectWithValue }) => {
13945
13945
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13946
13946
  try {
13947
- const { createDocState } = await import("./docStore-5AHNSAEI.js");
13947
+ const { createDocState } = await import("./docStore-NFLRMEX3.js");
13948
13948
  const pageKey = await createDocState(
13949
13949
  { slateData, title },
13950
13950
  { dispatch, getState }
@@ -5,7 +5,7 @@ import {
5
5
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
6
  isAntigravityCloudCodeBaseUrl,
7
7
  isAntigravityOAuthAgent
8
- } from "./chunk-YF4ZRVP3.js";
8
+ } from "./chunk-PLYWH7XM.js";
9
9
  import {
10
10
  isOpenAiResponsesModel,
11
11
  resolvePlatformChatCompletionsEndpoint,
@@ -7,7 +7,7 @@ import {
7
7
  deleteDialog,
8
8
  runtime_default,
9
9
  toast
10
- } from "./chunk-ZCKXJTCW.js";
10
+ } from "./chunk-CGQSAFXP.js";
11
11
  import {
12
12
  UNCATEGORIZED_ID,
13
13
  addContentAction,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveAgentCallPlan
3
- } from "./chunk-XNOILBHV.js";
3
+ } from "./chunk-CKOO42G5.js";
4
4
  import {
5
5
  SUBSCRIPTION_OAUTH_PROVIDERS
6
- } from "./chunk-YF4ZRVP3.js";
6
+ } from "./chunk-PLYWH7XM.js";
7
7
  import {
8
8
  findModelConfig,
9
9
  getProviderByModelName
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-QSAUX2Q2.js";
5
+ } from "./chunk-YCEA47VH.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-AGIM7IMJ.js";
22
22
  import {
23
23
  fetchAndCacheMessages
24
- } from "./chunk-ZCKXJTCW.js";
24
+ } from "./chunk-CGQSAFXP.js";
25
25
  import {
26
26
  createSpaceKey
27
27
  } from "./chunk-UAD2WT54.js";
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-NBTY7YJF.js";
6
6
  import {
7
7
  resolveCliLocalRuntimeKeyCapability
8
- } from "./chunk-K7ZZPUNO.js";
8
+ } from "./chunk-WWSPE2GG.js";
9
9
  import {
10
10
  HIGH_RISK_MUTATION_TOOL_NAMES
11
- } from "./chunk-2Q3LOAFE.js";
11
+ } from "./chunk-6HVBI6TI.js";
12
12
  import {
13
13
  DEFAULT_NOLO_SERVER_URL
14
14
  } from "./chunk-OLZBQWZU.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-YJ6UWOO5.js";
4
+ } from "./chunk-DNQ5NOAR.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-ZCKXJTCW.js";
7
+ } from "./chunk-CGQSAFXP.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-OWYYDMGJ.js";
@@ -70,6 +70,85 @@ function parseResetsInMs(text) {
70
70
  var DEFAULT_QUOTA_BREAKER_MS = 6 * 3600 * 1e3;
71
71
  var DEFAULT_AGENT_NOT_FOUND_BREAKER_MS = 15 * 60 * 1e3;
72
72
 
73
+ // packages/ai/agent/quotaSnapshot.ts
74
+ function isQuotaWindowExpired(window, now) {
75
+ const resetAt = window?.resetAt;
76
+ return typeof resetAt === "number" && Number.isFinite(resetAt) && resetAt <= now;
77
+ }
78
+ function findTightestQuotaWindow(quota, now = Date.now()) {
79
+ if (!quota || !Array.isArray(quota.windows) || quota.windows.length === 0) {
80
+ return void 0;
81
+ }
82
+ let best;
83
+ let bestScore = -Infinity;
84
+ for (const w of quota.windows) {
85
+ let score = 0;
86
+ if (typeof w.utilization === "number" && w.utilization >= 0) {
87
+ score = 500 + Math.min(w.utilization, 1) * 500;
88
+ } else if (typeof w.remaining === "number" && typeof w.limit === "number" && w.limit > 0) {
89
+ const util = Math.max(0, 1 - w.remaining / w.limit);
90
+ score = 500 + util * 500;
91
+ } else if (typeof w.resetAt === "number" && w.resetAt > now) {
92
+ score = 200;
93
+ } else if (typeof w.remaining === "number") {
94
+ score = 100;
95
+ }
96
+ if (score > bestScore) {
97
+ bestScore = score;
98
+ best = w;
99
+ }
100
+ }
101
+ return best ?? quota.windows[0];
102
+ }
103
+ function formatQuotaSummary(quota, now = Date.now(), options) {
104
+ const compact = options?.compact === true;
105
+ const planText = formatPlanLabel(quota?.plan);
106
+ const planName = typeof quota?.plan?.name === "string" ? quota.plan.name.trim() : "";
107
+ const tightest = findTightestQuotaWindow(quota, now);
108
+ if (!tightest) return compact ? planName || void 0 : planText;
109
+ const parts = [];
110
+ if (typeof tightest.utilization === "number") {
111
+ const pct = Math.round(tightest.utilization * 100);
112
+ parts.push(`${pct}%\u5DF2\u7528`);
113
+ } else if (typeof tightest.remaining === "number") {
114
+ if (typeof tightest.limit === "number") {
115
+ parts.push(`${tightest.remaining}/${tightest.limit}${tightest.unit ? ` ${tightest.unit}` : ""}`);
116
+ } else {
117
+ parts.push(`\u4F59${tightest.remaining}${tightest.unit ? ` ${tightest.unit}` : ""}`);
118
+ }
119
+ }
120
+ if (compact) {
121
+ const head = parts.length > 0 ? parts[0] : void 0;
122
+ return [planName || void 0, head].filter(Boolean).join(" \xB7 ") || void 0;
123
+ }
124
+ if (tightest.scope && tightest.scope !== "user" && tightest.scope !== "project" && tightest.scope !== tightest.unit) {
125
+ parts.push(tightest.scope);
126
+ }
127
+ if (typeof tightest.resetAt === "number" && tightest.resetAt > now) {
128
+ const diffSec = Math.round((tightest.resetAt - now) / 1e3);
129
+ if (diffSec < 60) {
130
+ parts.push(`${diffSec}s\u540E\u91CD\u7F6E`);
131
+ } else if (diffSec < 3600) {
132
+ parts.push(`${Math.round(diffSec / 60)}m\u540E\u91CD\u7F6E`);
133
+ } else if (diffSec < 86400) {
134
+ const hours = (diffSec / 3600).toFixed(1).replace(/\.0$/, "");
135
+ parts.push(`${hours}h\u540E\u91CD\u7F6E`);
136
+ } else {
137
+ const days = (diffSec / 86400).toFixed(1).replace(/\.0$/, "");
138
+ parts.push(`${days}d\u540E\u91CD\u7F6E`);
139
+ }
140
+ }
141
+ const onlyScope = parts.length === 0 || parts.length === 1 && parts[0] === tightest.scope;
142
+ if (onlyScope) return planText;
143
+ return [planText, ...parts].filter(Boolean).join(" \xB7 ");
144
+ }
145
+ function formatPlanLabel(plan) {
146
+ const name = typeof plan?.name === "string" ? plan.name.trim() : "";
147
+ if (!name) return void 0;
148
+ const credits = typeof plan?.monthlyCreditsUsd === "number" && Number.isFinite(plan.monthlyCreditsUsd) && plan.monthlyCreditsUsd > 0 ? `\u6708\u5EA6\u989D\u5EA6 $${plan.monthlyCreditsUsd}` : void 0;
149
+ return [`${name} \u5957\u9910`, credits].filter(Boolean).join(" \xB7 ");
150
+ }
151
+
73
152
  // packages/ai/agent/agentAvailabilityShared.ts
74
153
  var DEFAULT_PROVIDER_RETRY_MS = 5 * 60 * 1e3;
75
154
  var THIN_RATE_LIMIT_COOLDOWN_MS = 60 * 1e3;
@@ -110,7 +189,8 @@ function shouldClearCooldownFromQuota(entry, quota, now, options) {
110
189
  );
111
190
  const subscriptionWindows = relevantWindows.filter(isSubscriptionPeriodWindow);
112
191
  if (subscriptionWindows.length === 0) return false;
113
- if (relevantWindows.some((window) => !isSubscriptionPeriodWindow(window) && isExhaustedWindow(window))) return false;
192
+ if (relevantWindows.some(isExhaustedWindow)) return false;
193
+ if (subscriptionWindows.some((window) => isQuotaWindowExpired(window, now))) return false;
114
194
  return subscriptionWindows.every((window) => {
115
195
  const hasUtilization = typeof window.utilization === "number";
116
196
  const hasRemaining = typeof window.remaining === "number";
@@ -194,6 +274,12 @@ function resolveAgentAvailability(agent, now = Date.now()) {
194
274
  reason: "stale_quota_snapshot"
195
275
  };
196
276
  }
277
+ if (!relevantWindows.some((window) => !isQuotaWindowExpired(window, now))) {
278
+ return {
279
+ status: "unverified",
280
+ reason: "quota_window_reset"
281
+ };
282
+ }
197
283
  return {
198
284
  status: "available",
199
285
  reason: "quota_ok"
@@ -573,6 +659,7 @@ function classifyFailureSubclass(input, now = Date.now()) {
573
659
  export {
574
660
  QUOTA_ERROR_PATTERNS,
575
661
  isQuotaExhaustedError,
662
+ formatQuotaSummary,
576
663
  DEFAULT_PROVIDER_RETRY_MS,
577
664
  shouldClearCooldownFromQuota,
578
665
  isAgentUnavailableNow,
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // packages/cli/agentCommandSupport.ts
6
6
  async function getDefaultCliDb() {
7
- const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-SDYFAEKA.js");
7
+ const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-VBIMCWUC.js");
8
8
  return getDefaultCliLocalRuntimeDb();
9
9
  }
10
10
  function createNullCliDb() {
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-4O22PGNQ.js";
16
16
  import {
17
17
  scheduleWindowsSelfUpdate
18
- } from "./chunk-7T5TLIY4.js";
18
+ } from "./chunk-LKDF3ATR.js";
19
19
  import {
20
20
  t
21
- } from "./chunk-PPCUXO3E.js";
21
+ } from "./chunk-3RQVYR4B.js";
22
22
 
23
23
  // packages/cli/updateCommands.ts
24
24
  import { existsSync, readFileSync, accessSync, constants } from "node:fs";
@@ -1,15 +1,16 @@
1
1
  // packages/ai/agent/cliProviders.ts
2
2
  var CLI_PROVIDER_VALUES = [
3
- "copilot",
4
- "gemini",
5
- "codex",
6
3
  "claude",
4
+ "codex",
7
5
  "agy",
8
- "qoder",
9
6
  "opencode",
7
+ "copilot",
8
+ "qoder",
10
9
  "grok",
11
- "kimi"
10
+ "kimi",
11
+ "gemini"
12
12
  ];
13
+ var CREATABLE_CLI_PROVIDERS = CLI_PROVIDER_VALUES.filter((value) => value !== "gemini");
13
14
  function isCliProvider(value) {
14
15
  return typeof value === "string" && CLI_PROVIDER_VALUES.includes(value);
15
16
  }
@@ -24,7 +25,25 @@ var CLI_PROVIDER_DISPLAY_LABELS = {
24
25
  grok: "Grok CLI\uFF08grok\uFF09",
25
26
  kimi: "Kimi Code CLI\uFF08kimi\uFF09"
26
27
  };
27
- var CLI_PROVIDER_OPTIONS = CLI_PROVIDER_VALUES.map((value) => ({
28
+ var CLI_PROVIDER_GROUPS = [
29
+ {
30
+ id: "coding",
31
+ label: "\u4EE3\u7801\u4E0E\u5DE5\u7A0B\u534F\u540C CLI",
32
+ items: ["copilot", "claude", "codex", "qoder", "opencode"].map((value) => ({
33
+ value,
34
+ label: CLI_PROVIDER_DISPLAY_LABELS[value]
35
+ }))
36
+ },
37
+ {
38
+ id: "multimodal",
39
+ label: "\u63A8\u7406\u4E0E\u901A\u7528\u591A\u6A21\u6001 CLI",
40
+ items: ["gemini", "grok", "kimi", "agy"].map((value) => ({
41
+ value,
42
+ label: CLI_PROVIDER_DISPLAY_LABELS[value]
43
+ }))
44
+ }
45
+ ];
46
+ var CLI_PROVIDER_OPTIONS = CREATABLE_CLI_PROVIDERS.map((value) => ({
28
47
  value,
29
48
  label: CLI_PROVIDER_DISPLAY_LABELS[value]
30
49
  }));
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  t
3
- } from "./chunk-PPCUXO3E.js";
3
+ } from "./chunk-3RQVYR4B.js";
4
4
 
5
5
  // packages/cli/windowsSelfUpdate.ts
6
6
  import { spawn } from "node:child_process";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-SEOM7GLZ.js";
3
+ } from "./chunk-COWSUNBH.js";
4
4
  import {
5
5
  format,
6
6
  prepareAndPersistMessage,
7
7
  uiAskChoiceFunc,
8
8
  uiAskChoiceFunctionSchema
9
- } from "./chunk-ZCKXJTCW.js";
9
+ } from "./chunk-CGQSAFXP.js";
10
10
  import {
11
11
  formatISO
12
12
  } from "./chunk-ZRAU6T47.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YGILMZ7N.js";
4
4
  import {
5
5
  getReadableCliDb
6
- } from "./chunk-7DQSP7JU.js";
6
+ } from "./chunk-J5JTMQIA.js";
7
7
  import {
8
8
  buildCreatedAgentRecord,
9
9
  buildUpdatedAgentRecord,
@@ -13,13 +13,13 @@ import {
13
13
  resolveAgentRecordFromHybridStore,
14
14
  sanitizeAgentRecordForCliOutput,
15
15
  writeAgentRecord
16
- } from "./chunk-2PW2KOII.js";
16
+ } from "./chunk-XDMGY5IU.js";
17
17
  import {
18
18
  clearCliLocalRuntimePreparedAgentCache
19
- } from "./chunk-3UCYYSKN.js";
19
+ } from "./chunk-35DNCETZ.js";
20
20
  import {
21
21
  readCredentialAvailability
22
- } from "./chunk-W45PCJHS.js";
22
+ } from "./chunk-R56VAYY4.js";
23
23
  import {
24
24
  resolveCliAgentKeyInput
25
25
  } from "./chunk-NBTY7YJF.js";
@@ -244,7 +244,7 @@ async function runAgentCreateCommand(args, deps = {}) {
244
244
  let verifyResult;
245
245
  if (parsed.verify) {
246
246
  try {
247
- const { verifyCustomProvider } = await import("./agentProviderCommands-SKW4L6NN.js");
247
+ const { verifyCustomProvider } = await import("./agentProviderCommands-MN3ABDME.js");
248
248
  const rec = built.nextRecord;
249
249
  verifyResult = await verifyCustomProvider({
250
250
  providerUrl: rec.customProviderUrl,