nolo-cli 0.164.0-alpha.4 → 0.165.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 (85) hide show
  1. package/{_executeModel-M5PGAD3Z.js → _executeModel-CNWZMBTW.js} +21 -21
  2. package/{accountResolver-55EDKEIK.js → accountResolver-JS7QDNNL.js} +1 -1
  3. package/{agentDeleteCommand-E3FXV4KL.js → agentDeleteCommand-XSMZJNQ6.js} +27 -27
  4. package/{agentEmailCommands-7TEXFJMP.js → agentEmailCommands-TCLCOLOI.js} +28 -28
  5. package/{agentListCommands-GOCGOQUB.js → agentListCommands-4I4FZVVV.js} +44 -21
  6. package/{agentMachineCommands-HCMAADXH.js → agentMachineCommands-CAU6REHD.js} +14 -14
  7. package/{agentRecordCommands-S4XDFB4H.js → agentRecordCommands-NDSOSZES.js} +27 -27
  8. package/{agentRunCommand-SENMZRW7.js → agentRunCommand-E7OCABMM.js} +28 -28
  9. package/{agentRuntimeLocal-J6I63NZC.js → agentRuntimeLocal-BCZRYS5T.js} +11 -11
  10. package/{agentSlice-JOVX3KY3.js → agentSlice-2WTAYXEB.js} +1 -1
  11. package/{appDeleteCommands-KKLAK2UR.js → appDeleteCommands-CTBLT5TG.js} +16 -16
  12. package/{appDeployCommands-PXWK4FAX.js → appDeployCommands-IORMXV5D.js} +16 -16
  13. package/{appDeployStatusCommands-3NGWDZTX.js → appDeployStatusCommands-PWMDFYJ6.js} +16 -16
  14. package/{appGetCommands-APWYPEO3.js → appGetCommands-VG3LGNBO.js} +16 -16
  15. package/{appListCommands-OP7IRALO.js → appListCommands-GLIOZCTD.js} +16 -16
  16. package/{authCommand-3Z52KJID.js → authCommand-OVBMDPIF.js} +1 -1
  17. package/{chunk-ZU4J4GRW.js → chunk-3FDRNFCZ.js} +3 -3
  18. package/{chunk-5E5VB7PS.js → chunk-5N23SKBR.js} +10 -9
  19. package/{chunk-U34KT53V.js → chunk-6BNW7WC4.js} +1 -1
  20. package/{chunk-MLEANT7D.js → chunk-6HAE54KH.js} +2 -2
  21. package/{chunk-L2JMH4I5.js → chunk-6LYCXISC.js} +6 -3
  22. package/{chunk-QXZH5UDF.js → chunk-7NKZA46B.js} +2 -2
  23. package/{chunk-EFGBXVOC.js → chunk-ANI67WCB.js} +2 -2
  24. package/{chunk-QA2C5NKI.js → chunk-ASSNAASW.js} +1 -1
  25. package/{chunk-DE3RG4GV.js → chunk-BAAJVNIW.js} +2 -2
  26. package/{chunk-ZMVXHANW.js → chunk-BYGWUVRX.js} +1 -1
  27. package/{chunk-TMVVCQCX.js → chunk-D2RSMFM5.js} +3 -3
  28. package/{chunk-4L4K6YR7.js → chunk-DI7ZFGDQ.js} +1 -1
  29. package/{chunk-YVPQATSC.js → chunk-GPLUFN2E.js} +7 -1
  30. package/{chunk-Y2UYLA5L.js → chunk-H7GI62DA.js} +5 -5
  31. package/{chunk-F3SOW2EU.js → chunk-HEC32F3G.js} +1 -1
  32. package/{chunk-W7FGZRLK.js → chunk-I72LPLCP.js} +1 -1
  33. package/{chunk-VQOQH3DR.js → chunk-IQ37RGA5.js} +5 -5
  34. package/{chunk-LCKCG5TK.js → chunk-JGQTUD55.js} +85 -33
  35. package/chunk-JLR5NWP2.js +548 -0
  36. package/{chunk-ZZDVBZOP.js → chunk-K3NJW7LY.js} +6 -4
  37. package/{chunk-CNWKLQRL.js → chunk-KSTEXKL6.js} +70 -36
  38. package/{chunk-5IKRTRRR.js → chunk-MCGCC5BA.js} +1 -1
  39. package/{chunk-IPQ3W3CZ.js → chunk-NERECMOR.js} +10 -10
  40. package/{chunk-YTWGTCVW.js → chunk-NPTROADE.js} +14 -14
  41. package/{chunk-JGXBS3CI.js → chunk-PV3HYKQX.js} +8 -8
  42. package/{chunk-ZKBZLQTG.js → chunk-QG7BPUGN.js} +3 -3
  43. package/{chunk-3N5VQFR7.js → chunk-QKZV2CVE.js} +2 -2
  44. package/{chunk-6MXDOUMH.js → chunk-R4BMKAR5.js} +70 -8
  45. package/{chunk-RBMYJSZF.js → chunk-RVHXF55T.js} +2 -2
  46. package/{chunk-TT644UJD.js → chunk-SAZSXMTR.js} +1 -1
  47. package/{chunk-3M52COK5.js → chunk-SLAZGVZN.js} +71 -3
  48. package/{chunk-2AB2HA4M.js → chunk-TDX2L4W2.js} +8 -2
  49. package/{chunk-DJ2BOPJY.js → chunk-TQGP2LAX.js} +1 -1
  50. package/{chunk-OC72ZET2.js → chunk-U7LNNRZJ.js} +10 -10
  51. package/{chunk-647HBTHJ.js → chunk-VPHDNJWW.js} +2 -2
  52. package/{chunk-F3FISQL2.js → chunk-WYU4H7EV.js} +140 -29
  53. package/{chunk-N665S3Z2.js → chunk-XI677N45.js} +2 -2
  54. package/{chunk-WYJTNSVL.js → chunk-XKVWXU6D.js} +35 -4
  55. package/{chunk-ULQAD7ZY.js → chunk-YKTAUOS7.js} +1 -1
  56. package/{chunk-BL4HFN6L.js → chunk-YL26TH2V.js} +1 -1
  57. package/{chunk-4JCAW7TO.js → chunk-Z2LMCNOD.js} +2 -2
  58. package/{commandRegistry-YRHEZ67B.js → commandRegistry-BJDH4622.js} +49 -49
  59. package/{contentThunks-7JLGMPNX.js → contentThunks-BV5O7L2Y.js} +5 -5
  60. package/{cooldownCommands-JFKTYS2D.js → cooldownCommands-NS63RGBO.js} +2 -2
  61. package/{createAgentAutomationAction-WSQ3VZ3X.js → createAgentAutomationAction-TBWN2KX2.js} +5 -5
  62. package/{createDialogAction-4SHMWQYD.js → createDialogAction-WPVWZ3VX.js} +6 -6
  63. package/{createPageAction-GHYKDASE.js → createPageAction-ZFEXCZLK.js} +6 -6
  64. package/{dialogCommands-3W6AIUXT.js → dialogCommands-M4H4OOEW.js} +15 -15
  65. package/{dialogSlice-YXRGO7UV.js → dialogSlice-KGVUUVND.js} +4 -4
  66. package/{docCreateCommands-KQHQNLRX.js → docCreateCommands-7A2RHGYU.js} +14 -14
  67. package/{docDeleteCommands-O3DWFX2W.js → docDeleteCommands-SWNITY6F.js} +15 -15
  68. package/{docReadCommands-2U2BUONC.js → docReadCommands-J3PXXPPB.js} +14 -14
  69. package/{docStore-2U6GZMDG.js → docStore-YS6GP4CJ.js} +1 -1
  70. package/{docUpdateCommands-MF3C52XI.js → docUpdateCommands-2PFIC67Z.js} +14 -14
  71. package/{handleSendMessageAction-SK6Q2N7Z.js → handleSendMessageAction-NCHW43LP.js} +24 -11
  72. package/index.js +4 -4
  73. package/{localRuntimeAdapter-GNVO5DGA.js → localRuntimeAdapter-4EQNCW4N.js} +27 -25
  74. package/{machineCommands-LDK57YET.js → machineCommands-AFXYNIRI.js} +26 -26
  75. package/{machineWsRunDispatch-PFYI3ZDF.js → machineWsRunDispatch-2VR24KZ2.js} +26 -26
  76. package/package.json +1 -1
  77. package/{readlineWorkspace-NLHSBWBK.js → readlineWorkspace-5J2JEAGZ.js} +31 -31
  78. package/{runAgentClientLoop-FR7N5TID.js → runAgentClientLoop-ISO62FYI.js} +19 -19
  79. package/{spaceCommands-NDPGHDMD.js → spaceCommands-3GWTIOI2.js} +14 -14
  80. package/{streamAgentChatTurn-YHZNWDWS.js → streamAgentChatTurn-MPMB3V3Q.js} +23 -23
  81. package/{tools-AEPUZOZ2.js → tools-G6OMRLGU.js} +13 -13
  82. package/{tuiSummaryLlmCaller-FESHBDTT.js → tuiSummaryLlmCaller-FQOEF4IE.js} +3 -3
  83. package/{updateDialogTitleAction-QERIYNOM.js → updateDialogTitleAction-WDG2WGZJ.js} +5 -5
  84. package/{workloadLifecycle-6O6PMISX.js → workloadLifecycle-MZ2V5L43.js} +1 -1
  85. package/chunk-3MZAGMYY.js +0 -239
@@ -7255,16 +7255,50 @@ var empty = [];
7255
7255
  var CONTINUE = true;
7256
7256
  var EXIT = false;
7257
7257
  var SKIP = "skip";
7258
- function visitParents(tree, test, visitor, reverse) {
7258
+ function visitParents(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, reverse) {
7259
+ if (!tree || typeof tree !== "object") {
7260
+ throw new Error("Unexpected value `" + tree + "` for `tree`, expected node");
7261
+ }
7262
+ let preorder = true;
7259
7263
  let check;
7260
- if (typeof test === "function" && typeof visitor !== "function") {
7261
- reverse = visitor;
7262
- visitor = test;
7264
+ let visitors;
7265
+ let enter;
7266
+ let exit3;
7267
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
7268
+ check = /** @type {Test} */
7269
+ testOrEnterOrVisitors;
7270
+ visitors = enterOrVisitorsOrReverse;
7271
+ if (reverse) preorder = false;
7272
+ } else {
7273
+ visitors = /** @type {Visitors | Visitor} */
7274
+ testOrEnterOrVisitors;
7275
+ if (enterOrVisitorsOrReverse) preorder = false;
7276
+ }
7277
+ if (typeof visitors === "function") {
7278
+ enter = visitors;
7279
+ } else if (visitors && typeof visitors === "object") {
7280
+ if (visitors.enter === null || visitors.enter === void 0) {
7281
+ } else if (typeof visitors.enter === "function") {
7282
+ enter = visitors.enter;
7283
+ } else {
7284
+ throw new Error(
7285
+ "Unexpected value `" + visitors.enter + "` for `visitors.enter`, expected optional visitor"
7286
+ );
7287
+ }
7288
+ if (typeof visitors.exit === "function") {
7289
+ exit3 = visitors.exit;
7290
+ } else {
7291
+ throw new Error(
7292
+ "Unexpected value `" + visitors.exit + "` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)"
7293
+ );
7294
+ }
7263
7295
  } else {
7264
- check = test;
7296
+ throw new Error(
7297
+ "Unexpected value `" + visitors + "` for `enter` or `visitors`, expected visitor or object with visitors"
7298
+ );
7265
7299
  }
7266
7300
  const is2 = convert(check);
7267
- const step = reverse ? -1 : 1;
7301
+ const step = preorder ? 1 : -1;
7268
7302
  factory(tree, void 0, [])();
7269
7303
  function factory(node2, index2, parents) {
7270
7304
  const value = (
@@ -7285,12 +7319,10 @@ function visitParents(tree, test, visitor, reverse) {
7285
7319
  }
7286
7320
  return visit;
7287
7321
  function visit() {
7322
+ const matches = !check || is2(node2, index2, parents[parents.length - 1] || void 0);
7288
7323
  let result = empty;
7289
- let subresult;
7290
- let offset;
7291
- let grandparents;
7292
- if (!test || is2(node2, index2, parents[parents.length - 1] || void 0)) {
7293
- result = toResult(visitor(node2, parents));
7324
+ if (enter && matches) {
7325
+ result = toResult(enter(node2, parents, index2));
7294
7326
  if (result[0] === EXIT) {
7295
7327
  return result;
7296
7328
  }
@@ -7301,11 +7333,11 @@ function visitParents(tree, test, visitor, reverse) {
7301
7333
  node2
7302
7334
  );
7303
7335
  if (nodeAsParent.children && result[0] !== SKIP) {
7304
- offset = (reverse ? nodeAsParent.children.length : -1) + step;
7305
- grandparents = parents.concat(nodeAsParent);
7336
+ let offset = (preorder ? -1 : nodeAsParent.children.length) + step;
7337
+ const grandparents = [...parents, nodeAsParent];
7306
7338
  while (offset > -1 && offset < nodeAsParent.children.length) {
7307
7339
  const child = nodeAsParent.children[offset];
7308
- subresult = factory(child, offset, grandparents)();
7340
+ const subresult = factory(child, offset, grandparents)();
7309
7341
  if (subresult[0] === EXIT) {
7310
7342
  return subresult;
7311
7343
  }
@@ -7313,6 +7345,17 @@ function visitParents(tree, test, visitor, reverse) {
7313
7345
  }
7314
7346
  }
7315
7347
  }
7348
+ if (exit3 && matches) {
7349
+ const exitResult = toResult(exit3(node2, parents, index2));
7350
+ if (exitResult[0] === SKIP) {
7351
+ throw new Error(
7352
+ "Unexpected value `" + exitResult[0] + "` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing"
7353
+ );
7354
+ }
7355
+ if (exitResult[0] === EXIT || typeof exitResult[1] === "number") {
7356
+ return exitResult;
7357
+ }
7358
+ }
7316
7359
  return result;
7317
7360
  }
7318
7361
  }
@@ -7334,34 +7377,19 @@ function findAndReplace(tree, list2, options) {
7334
7377
  const pairs = toPairs(list2);
7335
7378
  let pairIndex = -1;
7336
7379
  while (++pairIndex < pairs.length) {
7337
- visitParents(tree, "text", visitor);
7380
+ visitParents(tree, visitor);
7338
7381
  }
7339
- function visitor(node2, parents) {
7340
- let index2 = -1;
7341
- let grandparent;
7342
- while (++index2 < parents.length) {
7343
- const parent = parents[index2];
7344
- const siblings = grandparent ? grandparent.children : void 0;
7345
- if (ignored(
7346
- parent,
7347
- siblings ? siblings.indexOf(parent) : void 0,
7348
- grandparent
7349
- )) {
7350
- return;
7351
- }
7352
- grandparent = parent;
7353
- }
7354
- if (grandparent) {
7355
- return handler(node2, parents);
7382
+ function visitor(node2, parents, index2) {
7383
+ if (node2.type === "text" && typeof index2 === "number") {
7384
+ return handler(node2, parents, index2);
7356
7385
  }
7386
+ if (ignored(node2, index2, parents[parents.length - 1])) return SKIP;
7357
7387
  }
7358
- function handler(node2, parents) {
7388
+ function handler(node2, parents, index2) {
7359
7389
  const parent = parents[parents.length - 1];
7360
7390
  const find = pairs[pairIndex][0];
7361
7391
  const replace2 = pairs[pairIndex][1];
7362
7392
  let start = 0;
7363
- const siblings = parent.children;
7364
- const index2 = siblings.indexOf(node2);
7365
7393
  let change = false;
7366
7394
  let nodes = [];
7367
7395
  find.lastIndex = 0;
@@ -7420,7 +7448,13 @@ function toPairs(tupleOrList) {
7420
7448
  throw new TypeError("Expected find and replace tuple or list of tuples");
7421
7449
  }
7422
7450
  const result = [];
7423
- const list2 = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];
7451
+ const list2 = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? (
7452
+ /** @type {FindAndReplaceList} */
7453
+ tupleOrList
7454
+ ) : [
7455
+ /** @type {FindAndReplaceTuple} */
7456
+ tupleOrList
7457
+ ];
7424
7458
  let index2 = -1;
7425
7459
  while (++index2 < list2.length) {
7426
7460
  const tuple = list2[index2];
@@ -3,7 +3,7 @@ import {
3
3
  classifyAgentApiKeyRef,
4
4
  formatUnsupportedAgentApiKeyRefMessage,
5
5
  shouldReadAgentKeyRemotely
6
- } from "./chunk-BL4HFN6L.js";
6
+ } from "./chunk-YL26TH2V.js";
7
7
  import {
8
8
  resolveCliAgentKeyInput
9
9
  } from "./chunk-NBTY7YJF.js";
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-DE3RG4GV.js";
8
+ } from "./chunk-BAAJVNIW.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-Y2UYLA5L.js";
17
+ } from "./chunk-H7GI62DA.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-YTWGTCVW.js";
21
+ } from "./chunk-NPTROADE.js";
22
22
  import {
23
23
  classifyApiError,
24
24
  classifyGenerationError,
25
25
  extractErrorDiagnostics
26
- } from "./chunk-647HBTHJ.js";
26
+ } from "./chunk-VPHDNJWW.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-RBMYJSZF.js";
35
+ } from "./chunk-RVHXF55T.js";
36
36
  import {
37
37
  getPublicImageAgentMode
38
38
  } from "./chunk-VIDPVFP3.js";
@@ -42,10 +42,10 @@ import {
42
42
  messageStreaming,
43
43
  toolResultNeedsUserConfirmation,
44
44
  updateToolMessage
45
- } from "./chunk-OC72ZET2.js";
45
+ } from "./chunk-U7LNNRZJ.js";
46
46
  import {
47
47
  streamAgentChatTurn
48
- } from "./chunk-ZKBZLQTG.js";
48
+ } from "./chunk-QG7BPUGN.js";
49
49
  import {
50
50
  getCurrentSpaceId
51
51
  } from "./chunk-ZJ7UHBJS.js";
@@ -85,13 +85,13 @@ import {
85
85
  } from "./chunk-56GBUMO5.js";
86
86
  import {
87
87
  normalizeChatCompletionsBodyForProvider
88
- } from "./chunk-4L4K6YR7.js";
88
+ } from "./chunk-DI7ZFGDQ.js";
89
89
  import {
90
90
  EMPTY_ASSISTANT_REPAIR_PROMPT
91
- } from "./chunk-F3SOW2EU.js";
91
+ } from "./chunk-HEC32F3G.js";
92
92
  import {
93
93
  getModelInfo
94
- } from "./chunk-QA2C5NKI.js";
94
+ } from "./chunk-ASSNAASW.js";
95
95
  import {
96
96
  isAbortError
97
97
  } from "./chunk-7DPNBQSV.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  assembleAgentDiscoveryResult,
3
3
  resolveDiscoveryScope
4
- } from "./chunk-WYJTNSVL.js";
4
+ } from "./chunk-XKVWXU6D.js";
5
5
  import {
6
6
  fetchWithTransientRetry
7
7
  } from "./chunk-KFHREHUQ.js";
@@ -20,7 +20,7 @@ import {
20
20
  toolRunUpdated,
21
21
  uiCardFallback,
22
22
  waitForAbortableDelay
23
- } from "./chunk-RBMYJSZF.js";
23
+ } from "./chunk-RVHXF55T.js";
24
24
  import {
25
25
  isGatewayHttpStatus
26
26
  } from "./chunk-NF64D32W.js";
@@ -52,7 +52,7 @@ import {
52
52
  } from "./chunk-3L5MSPWX.js";
53
53
  import {
54
54
  markdownToSlate
55
- } from "./chunk-CNWKLQRL.js";
55
+ } from "./chunk-KSTEXKL6.js";
56
56
  import {
57
57
  extractMentionsFromSlate
58
58
  } from "./chunk-AGIM7IMJ.js";
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-VF4K2QE6.js";
65
65
  import {
66
66
  createDocState
67
- } from "./chunk-3N5VQFR7.js";
67
+ } from "./chunk-QKZV2CVE.js";
68
68
  import {
69
69
  addMemberSpace,
70
70
  fetchAuthoritativeRemoteSpace,
@@ -79,7 +79,7 @@ import {
79
79
  } from "./chunk-BAWAKW7X.js";
80
80
  import {
81
81
  createDialogAction
82
- } from "./chunk-EFGBXVOC.js";
82
+ } from "./chunk-ANI67WCB.js";
83
83
  import {
84
84
  setDialogExtraReferencesAction
85
85
  } from "./chunk-IF7V3CBU.js";
@@ -102,7 +102,7 @@ import {
102
102
  updateContentCategory,
103
103
  updateContentTitle,
104
104
  writeStoredCollapsedCategories
105
- } from "./chunk-ZMVXHANW.js";
105
+ } from "./chunk-BYGWUVRX.js";
106
106
  import {
107
107
  buildDatabaseFileContentUrl,
108
108
  deleteDialog,
@@ -115,7 +115,7 @@ import {
115
115
  selectMsgById,
116
116
  uiAskChoiceFunc,
117
117
  uiAskChoiceFunctionSchema
118
- } from "./chunk-OC72ZET2.js";
118
+ } from "./chunk-U7LNNRZJ.js";
119
119
  import {
120
120
  buildMediaToolConfirmation,
121
121
  normalizeMediaConfirmExecutionRevision
@@ -126,7 +126,7 @@ import {
126
126
  runLlm,
127
127
  streamAgentChatTurn,
128
128
  updateAgent
129
- } from "./chunk-ZKBZLQTG.js";
129
+ } from "./chunk-QG7BPUGN.js";
130
130
  import {
131
131
  getCurrentSpaceId,
132
132
  getCurrentSpaceIdRaw,
@@ -212,8 +212,8 @@ import {
212
212
  resolvePageSkillMetadata
213
213
  } from "./chunk-AETZ7AD6.js";
214
214
  import {
215
+ CLI_NOLO_WORKSPACE_TOOL_NAMES,
215
216
  DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
216
- NOLO_WORKSPACE_TOOL_NAMES,
217
217
  buildAgentRuntimeAgentLookupKeys,
218
218
  buildDialogReadEnvelope,
219
219
  buildNoloSubjectRefQueryTarget,
@@ -229,7 +229,7 @@ import {
229
229
  resolveNoloDialogInput,
230
230
  resolveReadOnlyToolConstraints,
231
231
  verifyNoloDialogSubjectRefQuery
232
- } from "./chunk-3M52COK5.js";
232
+ } from "./chunk-SLAZGVZN.js";
233
233
  import {
234
234
  clipCompactText
235
235
  } from "./chunk-5MMAK75Q.js";
@@ -3882,7 +3882,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3882
3882
  const deletedDialogIds = [];
3883
3883
  const deletedDialogKeys = [];
3884
3884
  const failures = [];
3885
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-YXRGO7UV.js");
3885
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-KGVUUVND.js");
3886
3886
  for (const target of targets) {
3887
3887
  try {
3888
3888
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -4239,8 +4239,8 @@ async function cliDoctorFunc(_args, thunkApi) {
4239
4239
  userId: runtime?.currentUserId ?? null,
4240
4240
  diagnosticScope: "nolo_workspace_subset",
4241
4241
  message: "workspaceTools is a subset for Nolo workspace inspection, not necessarily the complete current run tool surface.",
4242
- noloWorkspaceToolSubset: [...NOLO_WORKSPACE_TOOL_NAMES],
4243
- workspaceTools: [...NOLO_WORKSPACE_TOOL_NAMES],
4242
+ noloWorkspaceToolSubset: [...CLI_NOLO_WORKSPACE_TOOL_NAMES],
4243
+ workspaceTools: [...CLI_NOLO_WORKSPACE_TOOL_NAMES],
4244
4244
  workspaceToolsAreSubset: true
4245
4245
  };
4246
4246
  return { rawData: result, displayData: jsonPreview(result) };
@@ -18563,7 +18563,7 @@ async function updateDocFunc(args, thunkApi) {
18563
18563
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
18564
18564
  };
18565
18565
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
18566
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-2U6GZMDG.js");
18566
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-YS6GP4CJ.js");
18567
18567
  if (getDocState().pageKey === id) {
18568
18568
  applyExternalDocUpdate({
18569
18569
  slateData: finalSlateData,
@@ -7,7 +7,7 @@ import {
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-647HBTHJ.js";
10
+ } from "./chunk-VPHDNJWW.js";
11
11
  import {
12
12
  UI_CARD_ENVELOPE_MAX_BYTES,
13
13
  getAllToolRuns,
@@ -20,7 +20,7 @@ import {
20
20
  selectSpaceContextLevel,
21
21
  selectUserTonePreset,
22
22
  uiCardFallback
23
- } from "./chunk-RBMYJSZF.js";
23
+ } from "./chunk-RVHXF55T.js";
24
24
  import {
25
25
  resolveToolBaseUrl
26
26
  } from "./chunk-MYOH447Z.js";
@@ -32,15 +32,15 @@ import {
32
32
  } from "./chunk-ZPKUJROL.js";
33
33
  import {
34
34
  getDocState
35
- } from "./chunk-3N5VQFR7.js";
35
+ } from "./chunk-QKZV2CVE.js";
36
36
  import {
37
37
  getTableState
38
- } from "./chunk-ZMVXHANW.js";
38
+ } from "./chunk-BYGWUVRX.js";
39
39
  import {
40
40
  PERSONALIZATION_DIALOG_CATEGORY,
41
41
  buildPersonalizationDialogPolicyContext,
42
42
  selectAllMsgs
43
- } from "./chunk-OC72ZET2.js";
43
+ } from "./chunk-U7LNNRZJ.js";
44
44
  import {
45
45
  getCurrentSpaceIdRaw,
46
46
  getViewMode
@@ -69,18 +69,18 @@ import {
69
69
  } from "./chunk-YCRROBDY.js";
70
70
  import {
71
71
  projectToolMessageContent
72
- } from "./chunk-U34KT53V.js";
72
+ } from "./chunk-6BNW7WC4.js";
73
73
  import {
74
74
  attachmentKind,
75
75
  normalizeAttachmentPart
76
76
  } from "./chunk-WJZOQR2J.js";
77
77
  import {
78
78
  extractReferenceKeysFromMessage
79
- } from "./chunk-F3SOW2EU.js";
79
+ } from "./chunk-HEC32F3G.js";
80
80
  import {
81
81
  getModelContextWindow,
82
82
  planContextUsage
83
- } from "./chunk-QA2C5NKI.js";
83
+ } from "./chunk-ASSNAASW.js";
84
84
  import {
85
85
  asRecordOrEmpty
86
86
  } from "./chunk-KX6YBIHG.js";
@@ -308,7 +308,7 @@ var slice = createSliceWithThunks({
308
308
  const overrides = {};
309
309
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
310
310
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
311
- const { _executeModel } = await import("./_executeModel-M5PGAD3Z.js");
311
+ const { _executeModel } = await import("./_executeModel-CNWZMBTW.js");
312
312
  return _executeModel(
313
313
  {
314
314
  isStreaming: args.isStreaming ?? false,
@@ -329,7 +329,7 @@ var slice = createSliceWithThunks({
329
329
  * - 循环直到无工具调用或触发其他运行时停止条件
330
330
  */
331
331
  runAgent: create.asyncThunk(async (args, thunkApi) => {
332
- const { runAgentClientLoop } = await import("./runAgentClientLoop-FR7N5TID.js");
332
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-ISO62FYI.js");
333
333
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
334
334
  {
335
335
  agentKey: args.agentKey,
@@ -345,7 +345,7 @@ var slice = createSliceWithThunks({
345
345
  * 聊天轮次流式 Agent 调用
346
346
  */
347
347
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
348
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-YHZNWDWS.js");
348
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-MPMB3V3Q.js");
349
349
  return streamAgentChatTurnHandler(args, thunkApi);
350
350
  }),
351
351
  /**
@@ -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-7JLGMPNX.js");
336
+ const { updateContentTitle } = await import("./contentThunks-BV5O7L2Y.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-GHYKDASE.js");
375
+ const { createPageAction } = await import("./createPageAction-ZFEXCZLK.js");
376
376
  return createPageAction(args, thunkApi);
377
377
  }
378
378
  function subscribe(listener) {
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  mergeAvailabilityDeadline,
3
+ resolveCredentialCandidateKeys,
3
4
  resolveCredentialKeyWithFallback
4
- } from "./chunk-3MZAGMYY.js";
5
+ } from "./chunk-JLR5NWP2.js";
5
6
 
6
7
  // packages/agent-runtime/credentialAvailability.ts
7
8
  import { homedir } from "node:os";
@@ -66,10 +67,56 @@ async function readCredentialAvailability(env = process.env, now = Date.now()) {
66
67
  Object.entries(entries).map(([key, entry]) => [key, entry.nextAvailableAt])
67
68
  );
68
69
  }
69
- async function readCredentialEntry(credentialKey, env = process.env, now = Date.now()) {
70
+ async function readEffectiveCredentialEntry(credentialKey, env = process.env, now = Date.now()) {
70
71
  if (!credentialKey) return void 0;
72
+ const candidates = resolveCredentialCandidateKeys(credentialKey);
73
+ if (candidates.length === 0) return void 0;
71
74
  const entries = await readCredentialEntries(env, now);
72
- return entries[credentialKey];
75
+ let effectiveEntry;
76
+ const activeCandidates = [];
77
+ for (const key of candidates) {
78
+ const entry = entries[key];
79
+ if (!entry || entry.nextAvailableAt <= now) continue;
80
+ activeCandidates.push({ key, markedAt: entry.markedAt });
81
+ if (!effectiveEntry) {
82
+ effectiveEntry = { ...entry, matchedKey: key };
83
+ } else {
84
+ const mergedDeadline = mergeAvailabilityDeadline(
85
+ effectiveEntry.nextAvailableAt,
86
+ entry.nextAvailableAt
87
+ );
88
+ const mergedProbe = effectiveEntry.lastProbeAt !== void 0 || entry.lastProbeAt !== void 0 ? Math.max(effectiveEntry.lastProbeAt ?? 0, entry.lastProbeAt ?? 0) : void 0;
89
+ const mergedMarkedAt = effectiveEntry.markedAt !== void 0 || entry.markedAt !== void 0 ? Math.max(effectiveEntry.markedAt ?? 0, entry.markedAt ?? 0) : void 0;
90
+ effectiveEntry = {
91
+ nextAvailableAt: mergedDeadline ?? entry.nextAvailableAt,
92
+ ...mergedMarkedAt !== void 0 ? { markedAt: mergedMarkedAt } : {},
93
+ ...mergedProbe !== void 0 ? { lastProbeAt: mergedProbe } : {},
94
+ matchedKey: effectiveEntry.matchedKey
95
+ };
96
+ }
97
+ }
98
+ if (effectiveEntry) {
99
+ effectiveEntry.candidates = activeCandidates;
100
+ }
101
+ return effectiveEntry;
102
+ }
103
+ function resolveEffectiveCredentialCooldown(credentialKey, credentialAvailability, now = 0) {
104
+ if (!credentialKey) return void 0;
105
+ const candidates = resolveCredentialCandidateKeys(credentialKey);
106
+ let effective;
107
+ for (const key of candidates) {
108
+ const at = credentialAvailability[key];
109
+ if (typeof at === "number" && Number.isFinite(at) && (now === 0 || at > now)) {
110
+ effective = mergeAvailabilityDeadline(effective, at);
111
+ }
112
+ }
113
+ return effective;
114
+ }
115
+ async function readCredentialEntry(credentialKey, env = process.env, now = Date.now()) {
116
+ const effective = await readEffectiveCredentialEntry(credentialKey, env, now);
117
+ if (!effective) return void 0;
118
+ const { matchedKey, candidates, ...entry } = effective;
119
+ return entry;
73
120
  }
74
121
  async function writeCredentialAvailability(live, env = process.env) {
75
122
  const path = resolveCredentialAvailabilityPath(env);
@@ -106,16 +153,30 @@ async function clearCredentialAvailabilityIfMarkedAt(credentialKey, expectedMark
106
153
  async function clearCredentialAvailability(credentialKey, env = process.env, now = Date.now()) {
107
154
  if (!credentialKey) return;
108
155
  const live = await readCredentialEntries(env, now);
109
- if (!(credentialKey in live)) return;
110
- delete live[credentialKey];
156
+ const candidates = resolveCredentialCandidateKeys(credentialKey);
157
+ let changed = false;
158
+ for (const key of candidates) {
159
+ if (key in live) {
160
+ delete live[key];
161
+ changed = true;
162
+ }
163
+ }
164
+ if (!changed) return;
111
165
  await writeCredentialAvailability(live, env);
112
166
  }
113
167
  async function recordCredentialProbe(credentialKey, env = process.env, now = Date.now()) {
114
168
  if (!credentialKey) return;
115
169
  const live = await readCredentialEntries(env, now);
116
- const existing = live[credentialKey];
170
+ let targetKey = credentialKey;
171
+ if (!(targetKey in live)) {
172
+ const candidates = resolveCredentialCandidateKeys(credentialKey);
173
+ const found = candidates.find((k) => k in live);
174
+ if (!found) return;
175
+ targetKey = found;
176
+ }
177
+ const existing = live[targetKey];
117
178
  if (!existing) return;
118
- live[credentialKey] = { ...existing, lastProbeAt: now };
179
+ live[targetKey] = { ...existing, lastProbeAt: now };
119
180
  await writeCredentialAvailability(live, env);
120
181
  }
121
182
  function applyCredentialAvailability(agents, credentialAvailability) {
@@ -123,7 +184,7 @@ function applyCredentialAvailability(agents, credentialAvailability) {
123
184
  return agents.map((agent) => {
124
185
  const key = resolveCredentialKeyWithFallback(agent);
125
186
  if (!key) return agent;
126
- const at = credentialAvailability[key];
187
+ const at = resolveEffectiveCredentialCooldown(key, credentialAvailability);
127
188
  if (typeof at !== "number") return agent;
128
189
  const merged = mergeAvailabilityDeadline(
129
190
  agent.nextAvailableAt,
@@ -138,6 +199,7 @@ function applyCredentialAvailability(agents, credentialAvailability) {
138
199
 
139
200
  export {
140
201
  readCredentialAvailability,
202
+ readEffectiveCredentialEntry,
141
203
  readCredentialEntry,
142
204
  markCredentialUnavailable,
143
205
  clearCredentialAvailabilityIfMarkedAt,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-VYNMQ6HW.js";
9
9
  import {
10
10
  fetchAndCacheTableRows
11
- } from "./chunk-ZMVXHANW.js";
11
+ } from "./chunk-BYGWUVRX.js";
12
12
  import {
13
13
  require_react
14
14
  } from "./chunk-YDH3FDFQ.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-AEPUZOZ2.js");
524
+ const { findToolExecutor } = await import("./tools-G6OMRLGU.js");
525
525
  const { executor } = findToolExecutor(run.toolName);
526
526
  toolRunStarted({
527
527
  id: run.id,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shouldUseServerProxy
3
- } from "./chunk-F3SOW2EU.js";
3
+ } from "./chunk-HEC32F3G.js";
4
4
  import {
5
5
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
6
  isAntigravityCloudCodeBaseUrl,