nolo-cli 0.33.0-alpha.25 → 0.33.0-alpha.26

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 (61) hide show
  1. package/{_executeModel-YRYC7I56.js → _executeModel-STWSBSKD.js} +12 -12
  2. package/{agentDeleteCommand-FLI7R64B.js → agentDeleteCommand-R2TIAA2Y.js} +5 -5
  3. package/{agentEmailCommands-U6KXYX33.js → agentEmailCommands-ZKIURERK.js} +14 -14
  4. package/{agentListCommands-GXCJ6M2I.js → agentListCommands-Y6QRNOTF.js} +9 -8
  5. package/{agentMachineCommands-QGIVFQOP.js → agentMachineCommands-NUO6EJVF.js} +5 -5
  6. package/{agentRecordCommands-6PR5EMXS.js → agentRecordCommands-BTZESWJQ.js} +14 -14
  7. package/{agentRunCommand-DINHUNYG.js → agentRunCommand-FSR2PMTC.js} +17 -16
  8. package/{agentRuntimeLocal-KI7SGGDI.js → agentRuntimeLocal-ZF6GOTZV.js} +2 -2
  9. package/{agentSlice-4VHI24NT.js → agentSlice-CAY6B6TM.js} +1 -1
  10. package/{appDeleteCommands-TSDAG4RK.js → appDeleteCommands-XT5GUKFB.js} +6 -6
  11. package/{appDeployCommands-XXBYWYJZ.js → appDeployCommands-YFEH5URD.js} +6 -6
  12. package/{appDeployStatusCommands-KXW5U4O3.js → appDeployStatusCommands-NGMP7E6D.js} +6 -6
  13. package/{appGetCommands-35QY6HM4.js → appGetCommands-QKI4YOWW.js} +6 -6
  14. package/{appListCommands-MGDFPS76.js → appListCommands-Z62P7T3L.js} +6 -6
  15. package/{chatQueueReduxAdapter-AW6KOUGI.js → chatQueueReduxAdapter-IZBGO5OC.js} +2 -2
  16. package/{chunk-5UKGLIN4.js → chunk-46NWKOV4.js} +2 -2
  17. package/{chunk-B754NVDZ.js → chunk-7UFAVUWF.js} +1 -1
  18. package/{chunk-BYJ2VKGP.js → chunk-AABBRVFT.js} +2 -2
  19. package/{chunk-JW3GC4BM.js → chunk-AFVQC5TV.js} +3 -3
  20. package/{chunk-V4DRJMRC.js → chunk-BAMXQS37.js} +87 -12
  21. package/{chunk-JQIXQ7NW.js → chunk-BHD66D3G.js} +15 -13
  22. package/{chunk-T2DYWQG3.js → chunk-BN6BH3XA.js} +9 -42
  23. package/{chunk-4ZPH5WGJ.js → chunk-DPSXNP23.js} +1 -1
  24. package/{chunk-NXY5MB7Y.js → chunk-EWEJQSYZ.js} +6 -6
  25. package/{chunk-BIGW743S.js → chunk-GRBVD5LC.js} +31 -16
  26. package/{chunk-SMU7YAO6.js → chunk-GT3IOCZL.js} +3 -3
  27. package/{chunk-TEFI7S3J.js → chunk-HBS537VN.js} +10 -42
  28. package/{chunk-TPSCHAUZ.js → chunk-JH5TECHI.js} +2 -2
  29. package/{chunk-GRAHWRXC.js → chunk-K7QWM5WO.js} +8 -8
  30. package/{chunk-MD6P2TXC.js → chunk-LX5OXR6X.js} +1 -1
  31. package/{chunk-ADLYMQB6.js → chunk-MBUNBGBE.js} +127 -0
  32. package/{chunk-5T3FEEF2.js → chunk-MYEHM7AY.js} +2 -2
  33. package/{chunk-FSMXTO3G.js → chunk-NMB23CNE.js} +1 -8
  34. package/{chunk-WHLQYPJZ.js → chunk-SGRM4ZAQ.js} +1 -1
  35. package/{chunk-Z3EYMFUQ.js → chunk-UQ7B6CXO.js} +2 -2
  36. package/{chunk-3CVNNFKF.js → chunk-WAWPO6YI.js} +1 -1
  37. package/{chunk-BY53PPQ2.js → chunk-Z22GYXSI.js} +1 -1
  38. package/{chunk-X2DAEZ3X.js → chunk-ZFGAPMSF.js} +1 -1
  39. package/{chunk-TZV6ELNR.js → chunk-ZXPS5ZYK.js} +1 -1
  40. package/{createAgentAutomationAction-YL2N663O.js → createAgentAutomationAction-E5AGSXV6.js} +3 -3
  41. package/{createDialogAction-Q2X5FY3R.js → createDialogAction-Y3BWEFP2.js} +4 -4
  42. package/{createPageAction-6UPVRXI3.js → createPageAction-M2B5JPE6.js} +3 -3
  43. package/{dialogCommands-MWSD4CJM.js → dialogCommands-U4WXEETW.js} +6 -6
  44. package/{dialogSlice-WARDZORM.js → dialogSlice-BTBQL3E6.js} +2 -2
  45. package/{docCreateCommands-PK57VNBI.js → docCreateCommands-SANZ56WK.js} +5 -5
  46. package/{docDeleteCommands-TKALRDZI.js → docDeleteCommands-OTED64QG.js} +6 -6
  47. package/{docReadCommands-VCKM3EFO.js → docReadCommands-SLA7XJW3.js} +5 -5
  48. package/{docStore-LGYJZBWV.js → docStore-VUO3IPY5.js} +4 -4
  49. package/{docUpdateCommands-A4AP3NQJ.js → docUpdateCommands-UIFJX6OU.js} +5 -5
  50. package/{handleSendMessageAction-MQMRHHSU.js → handleSendMessageAction-N6JSRGWP.js} +2 -2
  51. package/index.js +40 -40
  52. package/{machineCommands-5MSHOVGB.js → machineCommands-PN3Z372Q.js} +13 -13
  53. package/{machineWsRunDispatch-KZKGKKJB.js → machineWsRunDispatch-UDIIZLVX.js} +13 -13
  54. package/package.json +1 -1
  55. package/{readlineWorkspace-TTNIW6AD.js → readlineWorkspace-D3CGZ5JC.js} +19 -18
  56. package/{runAgentClientLoop-5I4TKXR2.js → runAgentClientLoop-YBX7WJSM.js} +10 -10
  57. package/{spaceCommands-AKM5WFQ2.js → spaceCommands-MMSD47KM.js} +5 -5
  58. package/{spaceSlice-GAP74242.js → spaceSlice-2COL6PNH.js} +3 -3
  59. package/{streamAgentChatTurn-OXTK4UGX.js → streamAgentChatTurn-MITMLAYJ.js} +11 -11
  60. package/{tools-ETBZCODF.js → tools-B3Z2MOPZ.js} +8 -8
  61. package/{updateDialogTitleAction-LNKCXTZA.js → updateDialogTitleAction-ZAOIDCVO.js} +3 -3
@@ -63,7 +63,7 @@ import {
63
63
  noloStringArg,
64
64
  parseNoloWorkspaceToolArguments,
65
65
  resolveNoloDialogInput
66
- } from "./chunk-ADLYMQB6.js";
66
+ } from "./chunk-MBUNBGBE.js";
67
67
  import {
68
68
  buildDialogFallbackTitleFromUserInput
69
69
  } from "./chunk-2MBTWINN.js";
@@ -96,44 +96,6 @@ import {
96
96
  asOptionalTrimmedString
97
97
  } from "./chunk-G3SUCT4W.js";
98
98
 
99
- // packages/agent-runtime/agentAvailability.ts
100
- var DEFAULT_PROVIDER_RETRY_MS = 5 * 60 * 1e3;
101
- function parseResetText(value) {
102
- const m = value.match(/(?:resets?\s+in|retry[- ]after)\s*(?:(\d+)\s*hr)?\s*(?:(\d+)\s*min)?\s*(?:(\d+)\s*sec)?/i);
103
- if (!m) return void 0;
104
- return (Number(m[1] ?? 0) * 3600 + Number(m[2] ?? 0) * 60 + Number(m[3] ?? 0)) * 1e3;
105
- }
106
- function resolveAgentNextAvailableAt(body, now = Date.now()) {
107
- const root = body && typeof body === "object" ? body : {};
108
- const error = root.error && typeof root.error === "object" ? root.error : root;
109
- const details = error.details && typeof error.details === "object" ? error.details : void 0;
110
- const retryRaw = error.retryAfter ?? error.retry_after ?? error["Retry-After"];
111
- if (typeof retryRaw === "number" && Number.isFinite(retryRaw)) {
112
- return retryRaw > 1e12 ? retryRaw : now + Math.max(0, retryRaw) * 1e3;
113
- }
114
- if (typeof retryRaw === "string") {
115
- const numeric = Number(retryRaw.trim());
116
- if (Number.isFinite(numeric)) return now + Math.max(0, numeric) * 1e3;
117
- const date = Date.parse(retryRaw);
118
- if (Number.isFinite(date) && date > now) return date;
119
- }
120
- const resetRaw = error.resets_at ?? error.resetsAt ?? details?.resets_at ?? details?.resetsAt;
121
- if (typeof resetRaw === "number" && Number.isFinite(resetRaw)) {
122
- const absolute = resetRaw > 1e12 ? resetRaw : resetRaw * 1e3;
123
- if (absolute > now) return absolute;
124
- }
125
- if (typeof resetRaw === "string") {
126
- const parsed = Date.parse(resetRaw);
127
- if (Number.isFinite(parsed) && parsed > now) return parsed;
128
- }
129
- const text = typeof body === "string" ? body : JSON.stringify(body ?? "");
130
- return now + (parseResetText(text) ?? DEFAULT_PROVIDER_RETRY_MS);
131
- }
132
- function isAgentCoolingDown(agent, now = Date.now()) {
133
- const at = agent && typeof agent === "object" ? agent.nextAvailableAt : void 0;
134
- return typeof at === "number" && Number.isFinite(at) && at > now;
135
- }
136
-
137
99
  // packages/agent-runtime/kimiUserAgent.ts
138
100
  var KIMI_CODE_CLI_VERSION = "0.29.2";
139
101
  var KIMI_CODE_USER_AGENT = `kimi-code-cli/${KIMI_CODE_CLI_VERSION} (nolo)`;
@@ -470,13 +432,21 @@ async function executeOpenAiCompatibleChatCompletion(args) {
470
432
  }
471
433
  }
472
434
  if (!res.ok) {
435
+ const raw2 = await res.text().catch(() => "");
436
+ let parsed = raw2;
437
+ try {
438
+ parsed = JSON.parse(raw2);
439
+ } catch {
440
+ }
441
+ await args.onHttpResult?.({ status: res.status, body: parsed });
473
442
  throw providerHttpFailure({
474
443
  label: "local provider",
475
444
  status: res.status,
476
- raw: await res.text().catch(() => ""),
445
+ raw: raw2,
477
446
  messages: args.messages
478
447
  });
479
448
  }
449
+ await args.onHttpResult?.({ status: res.status });
480
450
  const contentType = res.headers.get("content-type") ?? "";
481
451
  const isEventStream = contentType.includes("text/event-stream");
482
452
  if (isEventStream) {
@@ -3424,8 +3394,6 @@ Available skills: ${available.join(", ")}`;
3424
3394
  }
3425
3395
 
3426
3396
  export {
3427
- resolveAgentNextAvailableAt,
3428
- isAgentCoolingDown,
3429
3397
  parseSseDataLineJson,
3430
3398
  parseSseDataLineObject,
3431
3399
  codexStreamFailureStatus,
@@ -11,10 +11,10 @@ import {
11
11
  deleteDialog,
12
12
  resetMsgs,
13
13
  toast
14
- } from "./chunk-GRAHWRXC.js";
14
+ } from "./chunk-K7QWM5WO.js";
15
15
  import {
16
16
  deleteServerSyncedCredential
17
- } from "./chunk-JW3GC4BM.js";
17
+ } from "./chunk-AFVQC5TV.js";
18
18
  import {
19
19
  require_date_fns
20
20
  } from "./chunk-M76ECQRD.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-CWMSB67P.js";
14
14
  import {
15
15
  runLlm
16
- } from "./chunk-JW3GC4BM.js";
16
+ } from "./chunk-AFVQC5TV.js";
17
17
  import {
18
18
  cleanupCliSessionForDialog
19
19
  } from "./chunk-FH7VUJN5.js";
@@ -3520,7 +3520,7 @@ var messageSlice = createSliceWithThunks({
3520
3520
  runtimeOptions: args.runtimeOptions
3521
3521
  });
3522
3522
  if (agentKeyToUse) {
3523
- const { streamAgentChatTurn } = await import("./agentSlice-4VHI24NT.js");
3523
+ const { streamAgentChatTurn } = await import("./agentSlice-CAY6B6TM.js");
3524
3524
  await dispatch(
3525
3525
  streamAgentChatTurn({
3526
3526
  agentKey: agentKeyToUse,
@@ -4779,7 +4779,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4779
4779
  }
4780
4780
  if (isCurrentDialog) {
4781
4781
  await thunkApi.dispatch(resetMsgs());
4782
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-WARDZORM.js");
4782
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-BTBQL3E6.js");
4783
4783
  dispatch(clearPendingAttachments2());
4784
4784
  clearWorkflow();
4785
4785
  }
@@ -4788,15 +4788,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4788
4788
 
4789
4789
  // packages/chat/dialog/dialogSlice.ts
4790
4790
  var runCreateDialogAction = async (args, thunkApi) => {
4791
- const { createDialogAction } = await import("./createDialogAction-Q2X5FY3R.js");
4791
+ const { createDialogAction } = await import("./createDialogAction-Y3BWEFP2.js");
4792
4792
  return createDialogAction(args, thunkApi);
4793
4793
  };
4794
4794
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
4795
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-YL2N663O.js");
4795
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-E5AGSXV6.js");
4796
4796
  return createAgentAutomationAction(args, thunkApi);
4797
4797
  };
4798
4798
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
4799
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-LNKCXTZA.js");
4799
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-ZAOIDCVO.js");
4800
4800
  return updateDialogTitleAction(args, thunkApi);
4801
4801
  };
4802
4802
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -4820,7 +4820,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
4820
4820
  return setDialogExtraReferencesAction(args, thunkApi);
4821
4821
  };
4822
4822
  var runHandleSendMessageAction = async (args, thunkApi) => {
4823
- const { handleSendMessageAction } = await import("./handleSendMessageAction-MQMRHHSU.js");
4823
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-N6JSRGWP.js");
4824
4824
  return handleSendMessageAction(args, thunkApi);
4825
4825
  };
4826
4826
  function clearDialogState() {
@@ -4833,7 +4833,7 @@ var createPageAndAddReference = createAsyncThunk(
4833
4833
  async (payload, { dispatch, getState, rejectWithValue }) => {
4834
4834
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
4835
4835
  try {
4836
- const { createDocState } = await import("./docStore-LGYJZBWV.js");
4836
+ const { createDocState } = await import("./docStore-VUO3IPY5.js");
4837
4837
  const pageKey = await createDocState(
4838
4838
  { slateData, title },
4839
4839
  { dispatch, getState }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-JQIXQ7NW.js";
4
+ } from "./chunk-BHD66D3G.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -20,6 +20,128 @@ import {
20
20
  asOptionalTrimmedString
21
21
  } from "./chunk-G3SUCT4W.js";
22
22
 
23
+ // packages/ai/tools/agent/quotaCircuitBreaker.ts
24
+ var QUOTA_ERROR_PATTERNS = [
25
+ /429/,
26
+ /quota/i,
27
+ /rate\s*limit/i,
28
+ /too\s*many\s*requests/i,
29
+ /额度/,
30
+ /上限/,
31
+ /用尽/,
32
+ /CliProviderQuotaError/i
33
+ ];
34
+ function isCliProviderQuotaErrorShape(error) {
35
+ if (!error || typeof error !== "object") return false;
36
+ const e = error;
37
+ return e.name === "CliProviderQuotaError" || typeof e.message === "string" && e.message.startsWith("[QUOTA_LIMITED:");
38
+ }
39
+ function isQuotaExhaustedError(error) {
40
+ if (!error) return false;
41
+ if (isCliProviderQuotaErrorShape(error)) return true;
42
+ if (error instanceof Error) {
43
+ return QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(error.message));
44
+ }
45
+ if (typeof error === "string") {
46
+ return QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(error));
47
+ }
48
+ const maybeStatus = error.status;
49
+ if (typeof maybeStatus === "number" && maybeStatus === 429) return true;
50
+ const maybeStatusCode = error.statusCode;
51
+ if (typeof maybeStatusCode === "number" && maybeStatusCode === 429) return true;
52
+ return false;
53
+ }
54
+ function parseResetsInMs(text) {
55
+ if (!text) return void 0;
56
+ const unitMs = (n, unit) => {
57
+ if (/^d/.test(unit)) return n * 24 * 3600 * 1e3;
58
+ if (/^h/.test(unit)) return n * 3600 * 1e3;
59
+ if (/^m/.test(unit)) return n * 60 * 1e3;
60
+ if (/^s/.test(unit)) return n * 1e3;
61
+ return NaN;
62
+ };
63
+ const re = /(\d+)\s*(d(?:ay|ays)?|h(?:r|rs|our|ours)?|m(?:in|ins|inute|inutes)?|s(?:ec|ecs|econd|econds)?)/gi;
64
+ let totalMs = 0;
65
+ let matched = false;
66
+ let m;
67
+ while ((m = re.exec(text)) !== null) {
68
+ const ms = unitMs(Number(m[1]), m[2]);
69
+ if (!Number.isFinite(ms)) continue;
70
+ totalMs += ms;
71
+ matched = true;
72
+ }
73
+ return matched ? totalMs : void 0;
74
+ }
75
+ var DEFAULT_QUOTA_BREAKER_MS = 6 * 3600 * 1e3;
76
+ var DEFAULT_AGENT_NOT_FOUND_BREAKER_MS = 15 * 60 * 1e3;
77
+
78
+ // packages/ai/agent/agentAvailabilityShared.ts
79
+ var DEFAULT_PROVIDER_RETRY_MS = 5 * 60 * 1e3;
80
+ function isAgentUnavailableNow(agent, now = Date.now()) {
81
+ const at = agent?.nextAvailableAt;
82
+ return typeof at === "number" && Number.isFinite(at) && at > now;
83
+ }
84
+ function readRetryAfterTimestamp(body, now) {
85
+ if (!body || typeof body !== "object") return void 0;
86
+ const root = body;
87
+ const raw = root.retryAfter ?? root.retry_after ?? root["Retry-After"];
88
+ if (typeof raw === "number" && Number.isFinite(raw)) {
89
+ return raw > 1e12 ? raw : now + Math.max(0, raw) * 1e3;
90
+ }
91
+ if (typeof raw === "string") {
92
+ const seconds = Number(raw.trim());
93
+ if (Number.isFinite(seconds)) return now + Math.max(0, seconds) * 1e3;
94
+ const date = Date.parse(raw);
95
+ if (Number.isFinite(date)) return date;
96
+ }
97
+ return void 0;
98
+ }
99
+ function readResetTimestamp(body) {
100
+ if (!body || typeof body !== "object") return void 0;
101
+ const root = body;
102
+ const error = root.error && typeof root.error === "object" ? root.error : root;
103
+ const details = error.details && typeof error.details === "object" ? error.details : void 0;
104
+ const raw = error.resets_at ?? error.resetsAt ?? details?.resets_at ?? details?.resetsAt;
105
+ if (typeof raw === "number" && Number.isFinite(raw)) {
106
+ return raw > 1e12 ? raw : raw * 1e3;
107
+ }
108
+ if (typeof raw === "string") {
109
+ const parsed = Date.parse(raw);
110
+ if (Number.isFinite(parsed)) return parsed;
111
+ }
112
+ return void 0;
113
+ }
114
+ function parseResetAtText(value, now) {
115
+ const m = value.match(
116
+ /resets?\s+at\s+(\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?)?)/i
117
+ );
118
+ if (!m?.[1]) return void 0;
119
+ const parsed = Date.parse(m[1]);
120
+ return Number.isFinite(parsed) && parsed > now ? parsed : void 0;
121
+ }
122
+ function resolveNextAvailableAt(body, now, headers) {
123
+ const headerRetryAfter = headers && typeof headers.get === "function" ? headers.get("retry-after") : headers?.["retry-after"] ?? headers?.["Retry-After"];
124
+ const retryAfter = headerRetryAfter ? readRetryAfterTimestamp({ retryAfter: headerRetryAfter }, now) : readRetryAfterTimestamp(body, now);
125
+ if (retryAfter !== void 0 && retryAfter > now) return retryAfter;
126
+ const absolute = readResetTimestamp(body);
127
+ if (absolute !== void 0 && absolute > now) return absolute;
128
+ const text = typeof body === "string" ? body : JSON.stringify(body ?? "");
129
+ return parseResetAtText(text, now) ?? now + (parseResetsInMs(text) ?? DEFAULT_PROVIDER_RETRY_MS);
130
+ }
131
+ function resolveAvailabilityAction(status, body, now, headers) {
132
+ if (status >= 200 && status < 300) return { kind: "clear" };
133
+ if (status === 429) {
134
+ return { kind: "mark", nextAvailableAt: resolveNextAvailableAt(body, now, headers) };
135
+ }
136
+ if (status >= 500) {
137
+ return { kind: "mark", nextAvailableAt: now + DEFAULT_PROVIDER_RETRY_MS };
138
+ }
139
+ return { kind: "noop" };
140
+ }
141
+ function mergeAvailabilityDeadline(currentDeadline, nextAvailableAt) {
142
+ return typeof currentDeadline === "number" && Number.isFinite(currentDeadline) ? Math.max(currentDeadline, nextAvailableAt) : nextAvailableAt;
143
+ }
144
+
23
145
  // packages/agent-runtime/agentRecordKeys.ts
24
146
  function buildAgentRuntimeAgentLookupKeys(args) {
25
147
  if (/^agent(-pub)?-/.test(args.agentRef)) {
@@ -619,6 +741,11 @@ function buildNoloWorkspaceCommandArgs(call) {
619
741
  }
620
742
 
621
743
  export {
744
+ QUOTA_ERROR_PATTERNS,
745
+ isQuotaExhaustedError,
746
+ isAgentUnavailableNow,
747
+ resolveAvailabilityAction,
748
+ mergeAvailabilityDeadline,
622
749
  buildAgentRuntimeAgentLookupKeys,
623
750
  shouldFetchAgentRuntimeRecordRemotely,
624
751
  resolveRuntimeToolSurfaceForAgent,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-BIGW743S.js";
3
+ } from "./chunk-GRBVD5LC.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-UNHKVD2N.js";
@@ -12,7 +12,7 @@ import {
12
12
  resolveAgentRecordFromHybridStore,
13
13
  sanitizeAgentRecordForCliOutput,
14
14
  writeAgentRecord
15
- } from "./chunk-BY53PPQ2.js";
15
+ } from "./chunk-Z22GYXSI.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-EKLRRZIN.js";
@@ -178,14 +178,7 @@ function sortSafeAgentSummaries(agents) {
178
178
  });
179
179
  }
180
180
 
181
- // packages/ai/agent/agentAvailabilityShared.ts
182
- function isAgentUnavailableNow(agent, now = Date.now()) {
183
- const at = agent?.nextAvailableAt;
184
- return typeof at === "number" && Number.isFinite(at) && at > now;
185
- }
186
-
187
181
  export {
188
182
  toSafeAgentSummary,
189
- sortSafeAgentSummaries,
190
- isAgentUnavailableNow
183
+ sortSafeAgentSummaries
191
184
  };
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-4ZPH5WGJ.js";
10
+ } from "./chunk-DPSXNP23.js";
11
11
  import {
12
12
  isLevelLockError
13
13
  } from "./chunk-URMS4XY2.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-BIGW743S.js";
4
+ } from "./chunk-GRBVD5LC.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-V4DRJMRC.js";
7
+ } from "./chunk-BAMXQS37.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
10
  } from "./chunk-YZYQYYOU.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-BY53PPQ2.js";
4
+ } from "./chunk-Z22GYXSI.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
3
  shouldReadAgentKeyRemotely
4
- } from "./chunk-X2DAEZ3X.js";
4
+ } from "./chunk-ZFGAPMSF.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
7
7
  } from "./chunk-EKLRRZIN.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-ADLYMQB6.js";
4
+ } from "./chunk-MBUNBGBE.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-3CVNNFKF.js";
3
+ } from "./chunk-WAWPO6YI.js";
4
4
  import {
5
5
  resolveServerUrl
6
6
  } from "./chunk-A7GB5UGH.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-TPSCHAUZ.js";
3
+ } from "./chunk-JH5TECHI.js";
4
4
  import "./chunk-M3JEW6N6.js";
5
5
  import "./chunk-IDAU4UFS.js";
6
- import "./chunk-GRAHWRXC.js";
6
+ import "./chunk-K7QWM5WO.js";
7
7
  import "./chunk-RCFIB45Q.js";
8
8
  import "./chunk-EGRJC4ZN.js";
9
9
  import "./chunk-YYLHWIW6.js";
10
10
  import "./chunk-CWMSB67P.js";
11
- import "./chunk-JW3GC4BM.js";
11
+ import "./chunk-AFVQC5TV.js";
12
12
  import "./chunk-FH7VUJN5.js";
13
13
  import "./chunk-5RGU3J7P.js";
14
14
  import "./chunk-M76ECQRD.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createDialogAction,
3
3
  isLocalOwnerDialogAgents
4
- } from "./chunk-BYJ2VKGP.js";
5
- import "./chunk-TPSCHAUZ.js";
4
+ } from "./chunk-AABBRVFT.js";
5
+ import "./chunk-JH5TECHI.js";
6
6
  import "./chunk-M3JEW6N6.js";
7
7
  import "./chunk-IDAU4UFS.js";
8
- import "./chunk-GRAHWRXC.js";
8
+ import "./chunk-K7QWM5WO.js";
9
9
  import "./chunk-RCFIB45Q.js";
10
10
  import "./chunk-EGRJC4ZN.js";
11
11
  import "./chunk-YYLHWIW6.js";
12
12
  import "./chunk-CWMSB67P.js";
13
- import "./chunk-JW3GC4BM.js";
13
+ import "./chunk-AFVQC5TV.js";
14
14
  import "./chunk-FH7VUJN5.js";
15
15
  import "./chunk-5RGU3J7P.js";
16
16
  import "./chunk-M76ECQRD.js";
@@ -15,15 +15,15 @@ import {
15
15
  addContentToSpace,
16
16
  client_default,
17
17
  getCurrentSpaceId
18
- } from "./chunk-TPSCHAUZ.js";
18
+ } from "./chunk-JH5TECHI.js";
19
19
  import "./chunk-M3JEW6N6.js";
20
20
  import "./chunk-IDAU4UFS.js";
21
- import "./chunk-GRAHWRXC.js";
21
+ import "./chunk-K7QWM5WO.js";
22
22
  import "./chunk-RCFIB45Q.js";
23
23
  import "./chunk-EGRJC4ZN.js";
24
24
  import "./chunk-YYLHWIW6.js";
25
25
  import "./chunk-CWMSB67P.js";
26
- import "./chunk-JW3GC4BM.js";
26
+ import "./chunk-AFVQC5TV.js";
27
27
  import "./chunk-FH7VUJN5.js";
28
28
  import "./chunk-5RGU3J7P.js";
29
29
  import "./chunk-M76ECQRD.js";
@@ -8,16 +8,16 @@ import {
8
8
  runDialogReadCommand,
9
9
  runDialogStatusCommand,
10
10
  sortDialogs
11
- } from "./chunk-WHLQYPJZ.js";
11
+ } from "./chunk-SGRM4ZAQ.js";
12
12
  import "./chunk-ID4G2MAR.js";
13
- import "./chunk-4ZPH5WGJ.js";
14
- import "./chunk-BY53PPQ2.js";
15
- import "./chunk-X2DAEZ3X.js";
13
+ import "./chunk-DPSXNP23.js";
14
+ import "./chunk-Z22GYXSI.js";
15
+ import "./chunk-ZFGAPMSF.js";
16
16
  import "./chunk-EKLRRZIN.js";
17
17
  import "./chunk-KQHGZWSV.js";
18
18
  import "./chunk-URMS4XY2.js";
19
19
  import "./chunk-EGRJC4ZN.js";
20
- import "./chunk-TEFI7S3J.js";
20
+ import "./chunk-HBS537VN.js";
21
21
  import "./chunk-EF36FMUE.js";
22
22
  import "./chunk-ZNFJWEN4.js";
23
23
  import "./chunk-OIQPORYI.js";
@@ -27,7 +27,7 @@ import "./chunk-N7J63Q6C.js";
27
27
  import "./chunk-64M2WCLT.js";
28
28
  import "./chunk-NNWHHCVP.js";
29
29
  import "./chunk-OQVRTSZ5.js";
30
- import "./chunk-ADLYMQB6.js";
30
+ import "./chunk-MBUNBGBE.js";
31
31
  import "./chunk-2MBTWINN.js";
32
32
  import "./chunk-QPGAFZHN.js";
33
33
  import "./chunk-CP4QR2D2.js";
@@ -20,12 +20,12 @@ import {
20
20
  switchDialogAgent,
21
21
  updateDialogTitle,
22
22
  updateTokens
23
- } from "./chunk-GRAHWRXC.js";
23
+ } from "./chunk-K7QWM5WO.js";
24
24
  import "./chunk-RCFIB45Q.js";
25
25
  import "./chunk-EGRJC4ZN.js";
26
26
  import "./chunk-YYLHWIW6.js";
27
27
  import "./chunk-CWMSB67P.js";
28
- import "./chunk-JW3GC4BM.js";
28
+ import "./chunk-AFVQC5TV.js";
29
29
  import "./chunk-FH7VUJN5.js";
30
30
  import {
31
31
  getActiveDialogAgentId
@@ -21,12 +21,12 @@ import {
21
21
  resolveDocKind,
22
22
  resolveWriteTargets,
23
23
  writePageRecord
24
- } from "./chunk-3CVNNFKF.js";
25
- import "./chunk-BY53PPQ2.js";
26
- import "./chunk-X2DAEZ3X.js";
24
+ } from "./chunk-WAWPO6YI.js";
25
+ import "./chunk-Z22GYXSI.js";
26
+ import "./chunk-ZFGAPMSF.js";
27
27
  import "./chunk-EKLRRZIN.js";
28
28
  import "./chunk-VF4K2QE6.js";
29
- import "./chunk-TEFI7S3J.js";
29
+ import "./chunk-HBS537VN.js";
30
30
  import "./chunk-EF36FMUE.js";
31
31
  import "./chunk-ZNFJWEN4.js";
32
32
  import "./chunk-OIQPORYI.js";
@@ -36,7 +36,7 @@ import "./chunk-N7J63Q6C.js";
36
36
  import "./chunk-64M2WCLT.js";
37
37
  import "./chunk-NNWHHCVP.js";
38
38
  import "./chunk-OQVRTSZ5.js";
39
- import "./chunk-ADLYMQB6.js";
39
+ import "./chunk-MBUNBGBE.js";
40
40
  import "./chunk-2MBTWINN.js";
41
41
  import "./chunk-QPGAFZHN.js";
42
42
  import "./chunk-CP4QR2D2.js";
@@ -10,16 +10,16 @@ import {
10
10
  requireTokenUser,
11
11
  resolveDocKind,
12
12
  resolveWriteTargets
13
- } from "./chunk-3CVNNFKF.js";
13
+ } from "./chunk-WAWPO6YI.js";
14
14
  import {
15
15
  deleteDbRecordOnServers
16
- } from "./chunk-4ZPH5WGJ.js";
17
- import "./chunk-BY53PPQ2.js";
18
- import "./chunk-X2DAEZ3X.js";
16
+ } from "./chunk-DPSXNP23.js";
17
+ import "./chunk-Z22GYXSI.js";
18
+ import "./chunk-ZFGAPMSF.js";
19
19
  import "./chunk-EKLRRZIN.js";
20
20
  import "./chunk-KQHGZWSV.js";
21
21
  import "./chunk-VF4K2QE6.js";
22
- import "./chunk-TEFI7S3J.js";
22
+ import "./chunk-HBS537VN.js";
23
23
  import "./chunk-EF36FMUE.js";
24
24
  import "./chunk-ZNFJWEN4.js";
25
25
  import "./chunk-OIQPORYI.js";
@@ -29,7 +29,7 @@ import "./chunk-N7J63Q6C.js";
29
29
  import "./chunk-64M2WCLT.js";
30
30
  import "./chunk-NNWHHCVP.js";
31
31
  import "./chunk-OQVRTSZ5.js";
32
- import "./chunk-ADLYMQB6.js";
32
+ import "./chunk-MBUNBGBE.js";
33
33
  import "./chunk-2MBTWINN.js";
34
34
  import "./chunk-QPGAFZHN.js";
35
35
  import "./chunk-CP4QR2D2.js";
@@ -9,12 +9,12 @@ import {
9
9
  requireTokenUser,
10
10
  resolveDocKind,
11
11
  resolveWriteTargets
12
- } from "./chunk-3CVNNFKF.js";
13
- import "./chunk-BY53PPQ2.js";
14
- import "./chunk-X2DAEZ3X.js";
12
+ } from "./chunk-WAWPO6YI.js";
13
+ import "./chunk-Z22GYXSI.js";
14
+ import "./chunk-ZFGAPMSF.js";
15
15
  import "./chunk-EKLRRZIN.js";
16
16
  import "./chunk-VF4K2QE6.js";
17
- import "./chunk-TEFI7S3J.js";
17
+ import "./chunk-HBS537VN.js";
18
18
  import "./chunk-EF36FMUE.js";
19
19
  import "./chunk-ZNFJWEN4.js";
20
20
  import "./chunk-OIQPORYI.js";
@@ -24,7 +24,7 @@ import "./chunk-N7J63Q6C.js";
24
24
  import "./chunk-64M2WCLT.js";
25
25
  import "./chunk-NNWHHCVP.js";
26
26
  import "./chunk-OQVRTSZ5.js";
27
- import "./chunk-ADLYMQB6.js";
27
+ import "./chunk-MBUNBGBE.js";
28
28
  import "./chunk-2MBTWINN.js";
29
29
  import "./chunk-QPGAFZHN.js";
30
30
  import "./chunk-CP4QR2D2.js";
@@ -24,16 +24,16 @@ import {
24
24
  updateTitleDoc,
25
25
  useDocField,
26
26
  useDocState
27
- } from "./chunk-5UKGLIN4.js";
28
- import "./chunk-TPSCHAUZ.js";
27
+ } from "./chunk-46NWKOV4.js";
28
+ import "./chunk-JH5TECHI.js";
29
29
  import "./chunk-M3JEW6N6.js";
30
30
  import "./chunk-IDAU4UFS.js";
31
- import "./chunk-GRAHWRXC.js";
31
+ import "./chunk-K7QWM5WO.js";
32
32
  import "./chunk-RCFIB45Q.js";
33
33
  import "./chunk-EGRJC4ZN.js";
34
34
  import "./chunk-YYLHWIW6.js";
35
35
  import "./chunk-CWMSB67P.js";
36
- import "./chunk-JW3GC4BM.js";
36
+ import "./chunk-AFVQC5TV.js";
37
37
  import "./chunk-FH7VUJN5.js";
38
38
  import "./chunk-5RGU3J7P.js";
39
39
  import "./chunk-M76ECQRD.js";
@@ -20,12 +20,12 @@ import {
20
20
  resolveDocKind,
21
21
  resolveWriteTargets,
22
22
  writePageRecord
23
- } from "./chunk-3CVNNFKF.js";
24
- import "./chunk-BY53PPQ2.js";
25
- import "./chunk-X2DAEZ3X.js";
23
+ } from "./chunk-WAWPO6YI.js";
24
+ import "./chunk-Z22GYXSI.js";
25
+ import "./chunk-ZFGAPMSF.js";
26
26
  import "./chunk-EKLRRZIN.js";
27
27
  import "./chunk-VF4K2QE6.js";
28
- import "./chunk-TEFI7S3J.js";
28
+ import "./chunk-HBS537VN.js";
29
29
  import "./chunk-EF36FMUE.js";
30
30
  import "./chunk-ZNFJWEN4.js";
31
31
  import "./chunk-OIQPORYI.js";
@@ -35,7 +35,7 @@ import "./chunk-N7J63Q6C.js";
35
35
  import "./chunk-64M2WCLT.js";
36
36
  import "./chunk-NNWHHCVP.js";
37
37
  import "./chunk-OQVRTSZ5.js";
38
- import "./chunk-ADLYMQB6.js";
38
+ import "./chunk-MBUNBGBE.js";
39
39
  import "./chunk-2MBTWINN.js";
40
40
  import "./chunk-QPGAFZHN.js";
41
41
  import "./chunk-CP4QR2D2.js";