nolo-cli 0.31.0-alpha.6 → 0.31.0-alpha.8

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 (24) hide show
  1. package/{agentDeleteCommand-YG2E4GEO.js → agentDeleteCommand-D3MYZK6E.js} +1 -1
  2. package/{agentEmailCommands-PTC4K4LH.js → agentEmailCommands-4NZYNLYF.js} +4 -4
  3. package/{agentListCommands-Z2APZJVD.js → agentListCommands-SF3HEUTT.js} +1 -1
  4. package/{agentMachineCommands-LEMYL344.js → agentMachineCommands-5RFLYQ6Q.js} +2 -2
  5. package/{agentPullCommand-4V36XNGV.js → agentPullCommand-ARSIDNVC.js} +1 -1
  6. package/{agentRecordCommands-3CMUZWXT.js → agentRecordCommands-GCXQBTWG.js} +4 -4
  7. package/{agentRunCommand-CNRM5FZN.js → agentRunCommand-44S7TSQO.js} +4 -4
  8. package/{authCommand-3GQR43KB.js → authCommand-BBDHMSO6.js} +2 -2
  9. package/{authCommands-CXJ6PI2O.js → authCommands-4UDEKRE6.js} +2 -2
  10. package/{chunk-VU4WUYR3.js → chunk-4KFW6HK3.js} +3 -3
  11. package/{chunk-KJU5MAGU.js → chunk-53J7CH53.js} +1 -1
  12. package/{chunk-WFHXMLHZ.js → chunk-6YABCOFU.js} +1 -1
  13. package/{chunk-L2JSYKLP.js → chunk-BQ3MI344.js} +2 -2
  14. package/{chunk-5KXWNLL5.js → chunk-BTSNLYKW.js} +116 -41
  15. package/{chunk-WJRJDX2W.js → chunk-Q3CSL43H.js} +1 -1
  16. package/{chunk-XFGM5PJP.js → chunk-VMWR7VNI.js} +1 -1
  17. package/index.js +28 -28
  18. package/{localRuntimeAuthority-4IXJCHZ7.js → localRuntimeAuthority-NDUA2D7Y.js} +10 -1
  19. package/{localRuntimeDb-THJZGAOJ.js → localRuntimeDb-GKYRBWLQ.js} +1 -1
  20. package/{machineCommands-XT6TOLK5.js → machineCommands-VEODP2TD.js} +3 -3
  21. package/{machineWsRunDispatch-JKPHEU5X.js → machineWsRunDispatch-V67NWOCY.js} +3 -3
  22. package/package.json +1 -1
  23. package/{readlineWorkspace-I6KRAVI4.js → readlineWorkspace-JDZZXXNA.js} +4 -4
  24. package/{runtimeDoctorCommands-E2OUORHK.js → runtimeDoctorCommands-WI2YZUSJ.js} +2 -2
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-Q76I4SXI.js";
7
7
  import {
8
8
  getReadableCliDb
9
- } from "./chunk-WFHXMLHZ.js";
9
+ } from "./chunk-6YABCOFU.js";
10
10
  import {
11
11
  resolveAgentRecordFromHybridStore
12
12
  } from "./chunk-V42OE5HT.js";
@@ -8,17 +8,17 @@ import {
8
8
  } from "./chunk-AOS5IN2I.js";
9
9
  import {
10
10
  runAgentCreateCommand
11
- } from "./chunk-L2JSYKLP.js";
12
- import "./chunk-5KXWNLL5.js";
11
+ } from "./chunk-BQ3MI344.js";
12
+ import "./chunk-BTSNLYKW.js";
13
13
  import "./chunk-SFWZUTCI.js";
14
14
  import "./chunk-7KNERA53.js";
15
15
  import "./chunk-JDSUTNYY.js";
16
- import "./chunk-WJRJDX2W.js";
16
+ import "./chunk-Q3CSL43H.js";
17
17
  import "./chunk-LM6IYQ3F.js";
18
18
  import "./chunk-JBTJAPUF.js";
19
19
  import {
20
20
  getReadableCliDb
21
- } from "./chunk-WFHXMLHZ.js";
21
+ } from "./chunk-6YABCOFU.js";
22
22
  import {
23
23
  fetchWithTransportFallback,
24
24
  resolveAgentRecordFromHybridStore
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-Q76I4SXI.js";
18
18
  import {
19
19
  getReadableCliDb
20
- } from "./chunk-WFHXMLHZ.js";
20
+ } from "./chunk-6YABCOFU.js";
21
21
  import {
22
22
  queryUserRecords,
23
23
  readDbRecord
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-IXZX5CJK.js";
4
4
  import {
5
5
  getReadableCliDb
6
- } from "./chunk-WFHXMLHZ.js";
6
+ } from "./chunk-6YABCOFU.js";
7
7
  import {
8
8
  readAgentRecord,
9
9
  resolveAgentRecordFromHybridStore,
@@ -99,7 +99,7 @@ async function defaultExecuteCli(provider, prompt, options) {
99
99
  return executeCli(provider, prompt, options);
100
100
  }
101
101
  async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
102
- const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-JKPHEU5X.js");
102
+ const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-V67NWOCY.js");
103
103
  return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
104
104
  }
105
105
  async function detectLaunchableMachineInfo() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDefaultCliLocalRuntimeDb
3
- } from "./chunk-WJRJDX2W.js";
3
+ } from "./chunk-Q3CSL43H.js";
4
4
  import "./chunk-LM6IYQ3F.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
@@ -2,15 +2,15 @@ import {
2
2
  runAgentCreateCommand,
3
3
  runAgentReadCommand,
4
4
  runAgentUpdateCommand
5
- } from "./chunk-L2JSYKLP.js";
6
- import "./chunk-5KXWNLL5.js";
5
+ } from "./chunk-BQ3MI344.js";
6
+ import "./chunk-BTSNLYKW.js";
7
7
  import "./chunk-SFWZUTCI.js";
8
8
  import "./chunk-7KNERA53.js";
9
9
  import "./chunk-JDSUTNYY.js";
10
- import "./chunk-WJRJDX2W.js";
10
+ import "./chunk-Q3CSL43H.js";
11
11
  import "./chunk-LM6IYQ3F.js";
12
12
  import "./chunk-JBTJAPUF.js";
13
- import "./chunk-WFHXMLHZ.js";
13
+ import "./chunk-6YABCOFU.js";
14
14
  import "./chunk-V42OE5HT.js";
15
15
  import "./chunk-VVEH6XUE.js";
16
16
  import "./chunk-K6QEHQZ3.js";
@@ -7,19 +7,19 @@ import {
7
7
  prependSubjectDialogMarker,
8
8
  resolveWorkflowReference,
9
9
  runAgentRunCommand
10
- } from "./chunk-VU4WUYR3.js";
10
+ } from "./chunk-4KFW6HK3.js";
11
11
  import {
12
12
  parseAgentRunArgs
13
13
  } from "./chunk-AOS5IN2I.js";
14
14
  import "./chunk-6HYVJV7B.js";
15
- import "./chunk-5KXWNLL5.js";
15
+ import "./chunk-BTSNLYKW.js";
16
16
  import "./chunk-SFWZUTCI.js";
17
17
  import "./chunk-7KNERA53.js";
18
18
  import "./chunk-JDSUTNYY.js";
19
- import "./chunk-WJRJDX2W.js";
19
+ import "./chunk-Q3CSL43H.js";
20
20
  import "./chunk-LM6IYQ3F.js";
21
21
  import "./chunk-JBTJAPUF.js";
22
- import "./chunk-WFHXMLHZ.js";
22
+ import "./chunk-6YABCOFU.js";
23
23
  import "./chunk-V42OE5HT.js";
24
24
  import "./chunk-VVEH6XUE.js";
25
25
  import "./chunk-K6QEHQZ3.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defaultOpenBrowser
3
- } from "./chunk-XFGM5PJP.js";
3
+ } from "./chunk-VMWR7VNI.js";
4
4
  import {
5
5
  generateCloudflareEmailRoutingToken,
6
6
  parseFlagWithOptionalValue,
@@ -47,7 +47,7 @@ import {
47
47
  validateXAIEndpoint,
48
48
  xaiOAuthDiscovery
49
49
  } from "./chunk-SFWZUTCI.js";
50
- import "./chunk-WJRJDX2W.js";
50
+ import "./chunk-Q3CSL43H.js";
51
51
  import "./chunk-LM6IYQ3F.js";
52
52
  import "./chunk-JBTJAPUF.js";
53
53
  import "./chunk-YHGHADBQ.js";
@@ -6,9 +6,9 @@ import {
6
6
  runLoginCommand,
7
7
  runLogoutCommand,
8
8
  runWhoamiCommand
9
- } from "./chunk-XFGM5PJP.js";
9
+ } from "./chunk-VMWR7VNI.js";
10
10
  import "./chunk-6HYVJV7B.js";
11
- import "./chunk-WJRJDX2W.js";
11
+ import "./chunk-Q3CSL43H.js";
12
12
  import "./chunk-LM6IYQ3F.js";
13
13
  import "./chunk-JBTJAPUF.js";
14
14
  import "./chunk-GE6IWA5N.js";
@@ -19,7 +19,7 @@ import {
19
19
  parseAgentRunEvent,
20
20
  t,
21
21
  toolLabel
22
- } from "./chunk-5KXWNLL5.js";
22
+ } from "./chunk-BTSNLYKW.js";
23
23
  import {
24
24
  createRunActivityTracker,
25
25
  finalizeRunRecord,
@@ -30,10 +30,10 @@ import {
30
30
  } from "./chunk-JDSUTNYY.js";
31
31
  import {
32
32
  getDefaultCliLocalRuntimeDb
33
- } from "./chunk-WJRJDX2W.js";
33
+ } from "./chunk-Q3CSL43H.js";
34
34
  import {
35
35
  getReadableCliDb
36
- } from "./chunk-WFHXMLHZ.js";
36
+ } from "./chunk-6YABCOFU.js";
37
37
  import {
38
38
  normalizeAgentHandle,
39
39
  readDbRecord,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-5KXWNLL5.js";
4
+ } from "./chunk-BTSNLYKW.js";
5
5
  import {
6
6
  runLocalAgentTurn
7
7
  } from "./chunk-AYMOSAHE.js";
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // packages/cli/agentCommandSupport.ts
6
6
  async function getDefaultCliDb() {
7
- const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-THJZGAOJ.js");
7
+ const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-GKYRBWLQ.js");
8
8
  return getDefaultCliLocalRuntimeDb();
9
9
  }
10
10
  function createNullCliDb() {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-5KXWNLL5.js";
3
+ } from "./chunk-BTSNLYKW.js";
4
4
  import {
5
5
  getReadableCliDb
6
- } from "./chunk-WFHXMLHZ.js";
6
+ } from "./chunk-6YABCOFU.js";
7
7
  import {
8
8
  buildCreatedAgentRecord,
9
9
  buildUpdatedAgentRecord,
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-JDSUTNYY.js";
25
25
  import {
26
26
  getDefaultCliLocalRuntimeDb
27
- } from "./chunk-WJRJDX2W.js";
27
+ } from "./chunk-Q3CSL43H.js";
28
28
  import {
29
29
  buildLocalAgentLookupKeys
30
30
  } from "./chunk-VVEH6XUE.js";
@@ -10622,8 +10622,46 @@ function isRemoteAuthEndpoint(endpoint) {
10622
10622
  return false;
10623
10623
  }
10624
10624
 
10625
+ // packages/core/concurrencyLimiter.ts
10626
+ function createConcurrencyLimiter(maxConcurrent) {
10627
+ if (!Number.isInteger(maxConcurrent) || maxConcurrent < 1) {
10628
+ throw new RangeError("maxConcurrent must be a positive integer");
10629
+ }
10630
+ let active = 0;
10631
+ const pending = [];
10632
+ function drain() {
10633
+ while (active < maxConcurrent && pending.length > 0) {
10634
+ const entry = pending.shift();
10635
+ active += 1;
10636
+ Promise.resolve().then(() => entry.task()).then(
10637
+ (value) => entry.resolve(value),
10638
+ (error) => entry.reject(error)
10639
+ ).finally(() => {
10640
+ active -= 1;
10641
+ drain();
10642
+ });
10643
+ }
10644
+ }
10645
+ return {
10646
+ run(task) {
10647
+ return new Promise((resolve, reject) => {
10648
+ pending.push({ task, resolve, reject });
10649
+ drain();
10650
+ });
10651
+ },
10652
+ get activeCount() {
10653
+ return active;
10654
+ },
10655
+ get pendingCount() {
10656
+ return pending.length;
10657
+ }
10658
+ };
10659
+ }
10660
+
10625
10661
  // packages/cli/client/localRuntimeDialog.ts
10626
10662
  var import_date_fns = __toESM(require_date_fns(), 1);
10663
+ var titlePatchLimiter = createConcurrencyLimiter(2);
10664
+ var remoteSyncLimiter = createConcurrencyLimiter(3);
10627
10665
  async function resolveStore(deps) {
10628
10666
  if (deps.store) return deps.store;
10629
10667
  return createCliHybridRecordStore({
@@ -10756,15 +10794,21 @@ async function writeLocalTokenRecord(args) {
10756
10794
  return ops;
10757
10795
  }
10758
10796
  async function writeDialog(args) {
10797
+ const __perfEnabled = args.env?.NOLO_CLI_PERF === "1";
10798
+ const __perfT0 = __perfEnabled ? performance.now() : 0;
10759
10799
  let existingDialog = null;
10760
10800
  if (args.input.continueDialogId) {
10761
10801
  const dialogKey = `dialog-${args.userId}-${args.input.continueDialogId}`;
10762
- existingDialog = await args.store.read(dialogKey);
10802
+ existingDialog = await args.store.read(dialogKey, { remote: false });
10803
+ }
10804
+ if (__perfEnabled) {
10805
+ const ms = (performance.now() - __perfT0).toFixed(1);
10806
+ process.stderr.write(`[nolo-perf] writeDialog A:read-dialog: ${ms}ms
10807
+ `);
10763
10808
  }
10764
10809
  const nowMs = args.now();
10765
10810
  const existingTitle = typeof existingDialog?.title === "string" ? existingDialog.title.trim() : "";
10766
10811
  const existingTitleSource = existingDialog?.titleSource;
10767
- const titleTimeoutMs = args.titleTimeoutMs ?? 2500;
10768
10812
  let needsTitleUpdate = false;
10769
10813
  if (existingTitleSource === "manual") {
10770
10814
  needsTitleUpdate = false;
@@ -10786,30 +10830,20 @@ async function writeDialog(args) {
10786
10830
  const fallbackTitle = buildDialogFallbackTitleFromUserInput(rawLastUserText) || "Local agent run";
10787
10831
  titlePromise = args.titleGenerator({ messages: args.input.messages, fallbackTitle }).catch(() => null);
10788
10832
  }
10789
- let resolvedTitle = null;
10790
- if (titlePromise) {
10791
- let timeoutId;
10792
- const timeoutPromise = new Promise((resolve) => {
10793
- timeoutId = setTimeout(() => resolve(null), titleTimeoutMs);
10794
- });
10795
- try {
10796
- resolvedTitle = await Promise.race([titlePromise, timeoutPromise]);
10797
- } catch {
10798
- resolvedTitle = null;
10799
- } finally {
10800
- if (timeoutId) clearTimeout(timeoutId);
10801
- }
10802
- }
10803
10833
  const plan = buildLocalDialogWritePlan({
10804
10834
  input: args.input,
10805
10835
  userId: args.userId,
10806
10836
  now: nowMs,
10807
10837
  createId: args.createId,
10808
10838
  existingDialog,
10809
- cwd: args.cwd,
10810
- ...resolvedTitle ? { titleOverride: resolvedTitle } : {}
10839
+ cwd: args.cwd
10811
10840
  });
10812
10841
  await args.store.batch(plan.ops);
10842
+ if (__perfEnabled) {
10843
+ const ms = (performance.now() - __perfT0).toFixed(1);
10844
+ process.stderr.write(`[nolo-perf] writeDialog C:store-batch (cumulative): ${ms}ms
10845
+ `);
10846
+ }
10813
10847
  let tokenOps = [];
10814
10848
  try {
10815
10849
  tokenOps = await writeLocalTokenRecord({
@@ -10827,38 +10861,79 @@ async function writeDialog(args) {
10827
10861
  `
10828
10862
  );
10829
10863
  }
10864
+ if (__perfEnabled) {
10865
+ const ms = (performance.now() - __perfT0).toFixed(1);
10866
+ process.stderr.write(`[nolo-perf] writeDialog D:token-record (cumulative): ${ms}ms
10867
+ `);
10868
+ }
10830
10869
  const hasSubjectRefs = localTurnHasSubjectRefs(args.input);
10831
10870
  const isLocalUser = args.userId === "local";
10871
+ let remoteSyncPromise;
10832
10872
  if (!isLocalUser) {
10833
- try {
10834
- const syncResult = await syncLocalDialogEvidenceToRemote({
10835
- env: args.env,
10836
- fetchImpl: args.fetchImpl,
10837
- input: args.input,
10838
- ops: [...plan.ops, ...tokenOps],
10839
- output: args.output,
10840
- userId: args.userId
10841
- });
10842
- if (!syncResult.attempted) {
10843
- if (hasSubjectRefs) {
10873
+ if (hasSubjectRefs) {
10874
+ remoteSyncPromise = (async () => {
10875
+ const syncResult = await syncLocalDialogEvidenceToRemote({
10876
+ env: args.env,
10877
+ fetchImpl: args.fetchImpl,
10878
+ input: args.input,
10879
+ ops: [...plan.ops, ...tokenOps],
10880
+ output: args.output,
10881
+ userId: args.userId
10882
+ });
10883
+ if (!syncResult.attempted) {
10844
10884
  args.output?.write(
10845
10885
  "[nolo] Local dialog evidence is local-only; set NOLO_SERVER and AUTH_TOKEN to make subjectRefs remotely queryable.\n"
10846
10886
  );
10847
10887
  }
10848
- }
10849
- } catch (error) {
10850
- if (hasSubjectRefs) {
10851
- throw error;
10852
- }
10853
- args.output?.write(
10854
- `[nolo] Remote dialog evidence sync failed; local dialog only: ${toErrorMessage(
10855
- error
10856
- )}
10888
+ })();
10889
+ await remoteSyncPromise;
10890
+ } else {
10891
+ remoteSyncPromise = remoteSyncLimiter.run(
10892
+ () => syncLocalDialogEvidenceToRemote({
10893
+ env: args.env,
10894
+ fetchImpl: args.fetchImpl,
10895
+ input: args.input,
10896
+ ops: [...plan.ops, ...tokenOps],
10897
+ output: args.output,
10898
+ userId: args.userId
10899
+ })
10900
+ ).catch((error) => {
10901
+ args.output?.write(
10902
+ `[nolo] Remote dialog evidence sync failed; local dialog only: ${toErrorMessage(error)}
10857
10903
  `
10858
- );
10904
+ );
10905
+ });
10859
10906
  }
10860
10907
  }
10861
- return { dialogId: plan.dialogId, title: plan.title };
10908
+ let titlePatchPromise;
10909
+ if (titlePromise) {
10910
+ const dialogKey = `dialog-${args.userId}-${plan.dialogId}`;
10911
+ titlePatchPromise = titlePromise.then(async (resolvedTitle) => {
10912
+ if (!resolvedTitle) return;
10913
+ await titlePatchLimiter.run(async () => {
10914
+ try {
10915
+ const existing = await args.store.read(dialogKey);
10916
+ if (!existing || typeof existing !== "object") return;
10917
+ if (existing?.titleSource === "manual") return;
10918
+ const existingTitleUpdatedAtMs = parseTitleUpdatedAtMs(existing);
10919
+ if (existingTitleUpdatedAtMs > nowMs) return;
10920
+ await args.store.write(dialogKey, {
10921
+ ...existing,
10922
+ title: resolvedTitle,
10923
+ titleSource: "auto",
10924
+ titleUpdatedAt: new Date(nowMs).toISOString()
10925
+ });
10926
+ } catch {
10927
+ }
10928
+ });
10929
+ });
10930
+ }
10931
+ if (__perfEnabled) {
10932
+ const ms = (performance.now() - __perfT0).toFixed(1);
10933
+ process.stderr.write(`[nolo-perf] writeDialog total (blocking): ${ms}ms
10934
+ `);
10935
+ }
10936
+ return { dialogId: plan.dialogId, title: plan.title, titlePatchPromise, remoteSyncPromise };
10862
10937
  }
10863
10938
  function resolveCliDialogRecordKey(userId, dialogId) {
10864
10939
  if (dialogId.startsWith("dialog-") && !dialogId.includes("-msg-")) {
@@ -14,7 +14,7 @@ function buildCliLocalRuntimeDbEnv(env = process.env) {
14
14
  };
15
15
  }
16
16
  async function getDefaultCliLocalRuntimeDb(options = {}) {
17
- const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-4IXJCHZ7.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-NDUA2D7Y.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-6HYVJV7B.js";
4
4
  import {
5
5
  getDefaultCliLocalRuntimeDb
6
- } from "./chunk-WJRJDX2W.js";
6
+ } from "./chunk-Q3CSL43H.js";
7
7
  import {
8
8
  buildCliRuntimeEnv,
9
9
  clearProfileAuthToken,
package/index.js CHANGED
@@ -126,7 +126,7 @@ function createDaemonShortcutCommand(path, description, command2) {
126
126
  // packages/cli/agentInternalCommandEntries.ts
127
127
  function getAgentInternalCommandEntries() {
128
128
  const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args2, ctx) => {
129
- const { runAgentRunCommand } = await import("./agentRunCommand-CNRM5FZN.js");
129
+ const { runAgentRunCommand } = await import("./agentRunCommand-44S7TSQO.js");
130
130
  return runAgentRunCommand(args2, {
131
131
  env: ctx.env,
132
132
  scriptDir: ctx.scriptDir,
@@ -138,19 +138,19 @@ function getAgentInternalCommandEntries() {
138
138
  createAgentRunCommand(["run"], "Run a no-login local agent in this workspace"),
139
139
  createAgentRunCommand(["chat"], "Chat with an agent"),
140
140
  createEnvCommand(["agent", "list"], "List owned agents", async (args2, deps) => {
141
- const { runAgentListCommand } = await import("./agentListCommands-Z2APZJVD.js");
141
+ const { runAgentListCommand } = await import("./agentListCommands-SF3HEUTT.js");
142
142
  return runAgentListCommand(args2, deps);
143
143
  }),
144
144
  createEnvCommand(["agent", "create"], "Create a new agent", async (args2, deps) => {
145
- const { runAgentCreateCommand } = await import("./agentRecordCommands-3CMUZWXT.js");
145
+ const { runAgentCreateCommand } = await import("./agentRecordCommands-GCXQBTWG.js");
146
146
  return runAgentCreateCommand(args2, deps);
147
147
  }),
148
148
  createEnvCommand(["agent", "pull"], "Cache an agent for local runs", async (args2, deps) => {
149
- const { runAgentPullCommand } = await import("./agentPullCommand-4V36XNGV.js");
149
+ const { runAgentPullCommand } = await import("./agentPullCommand-ARSIDNVC.js");
150
150
  return runAgentPullCommand(args2, deps);
151
151
  }),
152
152
  createEnvCommand(["agent", "read"], "Read a single agent", async (args2, deps) => {
153
- const { runAgentReadCommand } = await import("./agentRecordCommands-3CMUZWXT.js");
153
+ const { runAgentReadCommand } = await import("./agentRecordCommands-GCXQBTWG.js");
154
154
  return runAgentReadCommand(args2, deps);
155
155
  }),
156
156
  createAgentRunCommand(["agent", "run"], "Run an agent"),
@@ -179,31 +179,31 @@ function getAgentInternalCommandEntries() {
179
179
  return runSetupOfflineMarxistsAgentCommand(args2, deps);
180
180
  }),
181
181
  createEnvCommand(["agent", "update"], "Update agent fields", async (args2, deps) => {
182
- const { runAgentUpdateCommand } = await import("./agentRecordCommands-3CMUZWXT.js");
182
+ const { runAgentUpdateCommand } = await import("./agentRecordCommands-GCXQBTWG.js");
183
183
  return runAgentUpdateCommand(args2, deps);
184
184
  }),
185
185
  createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args2, deps) => {
186
- const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-PTC4K4LH.js");
186
+ const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-4NZYNLYF.js");
187
187
  return runAgentEmailProvisionCommand(args2, deps);
188
188
  }),
189
189
  createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args2, deps) => {
190
- const { runAgentEmailBindCommand } = await import("./agentEmailCommands-PTC4K4LH.js");
190
+ const { runAgentEmailBindCommand } = await import("./agentEmailCommands-4NZYNLYF.js");
191
191
  return runAgentEmailBindCommand(args2, deps);
192
192
  }),
193
193
  createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args2, deps) => {
194
- const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-PTC4K4LH.js");
194
+ const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-4NZYNLYF.js");
195
195
  return runAgentEmailTransferCommand(args2, deps);
196
196
  }),
197
197
  createEnvCommand(
198
198
  ["agent", "email", "create-and-provision"],
199
199
  "Create an agent and provision its controlled inbox",
200
200
  async (args2, deps) => {
201
- const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-PTC4K4LH.js");
201
+ const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-4NZYNLYF.js");
202
202
  return runAgentEmailCreateAndProvisionCommand(args2, deps);
203
203
  }
204
204
  ),
205
205
  createEnvCommand(["agent", "delete"], "Hard-delete an agent's private and public records", async (args2, deps) => {
206
- const { runAgentDeleteCommand } = await import("./agentDeleteCommand-YG2E4GEO.js");
206
+ const { runAgentDeleteCommand } = await import("./agentDeleteCommand-D3MYZK6E.js");
207
207
  return runAgentDeleteCommand(args2, deps);
208
208
  }),
209
209
  createEnvCommand(["agent", "grant"], "Grant another user access to this agent's owner credentials", async (args2, deps) => {
@@ -219,15 +219,15 @@ function getAgentInternalCommandEntries() {
219
219
  return runAgentRevokeGrantCommand(args2, deps);
220
220
  }),
221
221
  createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args2, deps) => {
222
- const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-LEMYL344.js");
222
+ const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-5RFLYQ6Q.js");
223
223
  return runAgentBindCurrentCommand(args2, deps);
224
224
  }),
225
225
  createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args2, deps) => {
226
- const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-LEMYL344.js");
226
+ const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-5RFLYQ6Q.js");
227
227
  return runAgentSmokeCurrentCommand(args2, deps);
228
228
  }),
229
229
  createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args2, deps) => {
230
- const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-LEMYL344.js");
230
+ const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-5RFLYQ6Q.js");
231
231
  return runAgentRuntimeDoctorCommand(args2, deps);
232
232
  }),
233
233
  createAgentRunCommand(["agent", "chat"], "Chat with an agent")
@@ -372,55 +372,55 @@ function getSpaceInternalCommandEntries() {
372
372
  function getSystemInternalCommandEntries(renderHelpText2) {
373
373
  return [
374
374
  createArgsCommand(["auth", "cloudflare"], "Authorize Cloudflare OAuth", async (args2) => {
375
- const { runAuthCloudflareCommand } = await import("./authCommand-3GQR43KB.js");
375
+ const { runAuthCloudflareCommand } = await import("./authCommand-BBDHMSO6.js");
376
376
  return runAuthCloudflareCommand(args2);
377
377
  }),
378
378
  createArgsCommand(["auth", "chatgpt"], "Authorize ChatGPT / OpenAI Codex OAuth", async (args2) => {
379
- const { runAuthChatgptCommand } = await import("./authCommand-3GQR43KB.js");
379
+ const { runAuthChatgptCommand } = await import("./authCommand-BBDHMSO6.js");
380
380
  return runAuthChatgptCommand(args2);
381
381
  }),
382
382
  createArgsCommand(["auth", "xai"], "Authorize xAI Grok OAuth (SuperGrok subscription)", async (args2) => {
383
- const { runAuthXaiCommand } = await import("./authCommand-3GQR43KB.js");
383
+ const { runAuthXaiCommand } = await import("./authCommand-BBDHMSO6.js");
384
384
  return runAuthXaiCommand(args2);
385
385
  }),
386
386
  createArgsCommand(["auth", "antigravity"], "Authorize Google Antigravity OAuth", async (args2) => {
387
- const { runAuthAntigravityCommand } = await import("./authCommand-3GQR43KB.js");
387
+ const { runAuthAntigravityCommand } = await import("./authCommand-BBDHMSO6.js");
388
388
  return runAuthAntigravityCommand(args2);
389
389
  }),
390
390
  createArgsCommand(["auth", "claude"], "Authorize Claude Pro/Max OAuth", async (args2) => {
391
- const { runAuthClaudeCommand } = await import("./authCommand-3GQR43KB.js");
391
+ const { runAuthClaudeCommand } = await import("./authCommand-BBDHMSO6.js");
392
392
  return runAuthClaudeCommand(args2);
393
393
  }),
394
394
  createArgsCommand(["auth", "cursor"], "Authorize Cursor Pro OAuth", async (args2) => {
395
- const { runAuthCursorCommand } = await import("./authCommand-3GQR43KB.js");
395
+ const { runAuthCursorCommand } = await import("./authCommand-BBDHMSO6.js");
396
396
  return runAuthCursorCommand(args2);
397
397
  }),
398
398
  createArgsCommand(["login"], "Log in to Nolo", async (args2) => {
399
- const { runLoginCommand } = await import("./authCommands-CXJ6PI2O.js");
399
+ const { runLoginCommand } = await import("./authCommands-4UDEKRE6.js");
400
400
  return runLoginCommand(args2);
401
401
  }),
402
402
  createContextCommand(["logout"], "Log out of Nolo", async (args2, ctx) => {
403
- const { runLogoutCommand } = await import("./authCommands-CXJ6PI2O.js");
403
+ const { runLogoutCommand } = await import("./authCommands-4UDEKRE6.js");
404
404
  return runLogoutCommand({ args: args2, env: ctx.env });
405
405
  }),
406
406
  createContextCommand(["whoami"], "Show the current login state", async (args2, ctx) => {
407
- const { runWhoamiCommand } = await import("./authCommands-CXJ6PI2O.js");
407
+ const { runWhoamiCommand } = await import("./authCommands-4UDEKRE6.js");
408
408
  return runWhoamiCommand({ args: args2, env: ctx.env });
409
409
  }),
410
410
  createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args2, deps) => {
411
- const { runMachineConnectCommand } = await import("./machineCommands-XT6TOLK5.js");
411
+ const { runMachineConnectCommand } = await import("./machineCommands-VEODP2TD.js");
412
412
  return runMachineConnectCommand(args2, deps);
413
413
  }),
414
414
  createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args2, deps) => {
415
- const { runMachineConnectCommand } = await import("./machineCommands-XT6TOLK5.js");
415
+ const { runMachineConnectCommand } = await import("./machineCommands-VEODP2TD.js");
416
416
  return runMachineConnectCommand(args2, deps);
417
417
  }),
418
418
  createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args2, deps) => {
419
- const { runMachineStatusCommand } = await import("./machineCommands-XT6TOLK5.js");
419
+ const { runMachineStatusCommand } = await import("./machineCommands-VEODP2TD.js");
420
420
  return runMachineStatusCommand(args2, deps);
421
421
  }),
422
422
  createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args2, deps) => {
423
- const { runDoctorRuntimeCommand } = await import("./runtimeDoctorCommands-E2OUORHK.js");
423
+ const { runDoctorRuntimeCommand } = await import("./runtimeDoctorCommands-WI2YZUSJ.js");
424
424
  return runDoctorRuntimeCommand(args2, deps);
425
425
  }),
426
426
  createContextCommand(["doctor"], "Show CLI doctor information", async (_args, ctx) => {
@@ -796,7 +796,7 @@ async function runScript(script, forwardedArgs, env) {
796
796
  return proc.exited;
797
797
  }
798
798
  async function launchTuiWorkspace(args2) {
799
- const { startTuiWorkspace } = await import("./readlineWorkspace-I6KRAVI4.js");
799
+ const { startTuiWorkspace } = await import("./readlineWorkspace-JDZZXXNA.js");
800
800
  const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-SRZ4QQUP.js");
801
801
  return startTuiWorkspace({
802
802
  ...args2,
@@ -271,7 +271,8 @@ function resolveCliLocalRuntimeDbPath(options = {}) {
271
271
  var defaultCliAuthorityBrokerConnectDeps = {
272
272
  createClient: (options) => createCliAuthorityBrokerClient(options),
273
273
  startBroker: (options) => getOrCreateCliAuthorityBrokerServer(options),
274
- sleep
274
+ sleep,
275
+ useFastPath: true
275
276
  };
276
277
  async function connectCliAuthorityBroker(args) {
277
278
  const deps = {
@@ -295,6 +296,14 @@ async function connectCliAuthorityBroker(args) {
295
296
  }
296
297
  return false;
297
298
  }
299
+ if (deps.useFastPath) {
300
+ try {
301
+ await client2.open();
302
+ return client2;
303
+ } catch (error) {
304
+ if (!isCliAuthorityBrokerUnavailableError(error)) throw error;
305
+ }
306
+ }
298
307
  try {
299
308
  await deps.startBroker({
300
309
  endpoint: args.endpoint,
@@ -2,7 +2,7 @@ import {
2
2
  buildCliLocalRuntimeDbEnv,
3
3
  getDefaultCliLocalRuntimeDb,
4
4
  resolveCliLocalRuntimeDbPath
5
- } from "./chunk-WJRJDX2W.js";
5
+ } from "./chunk-Q3CSL43H.js";
6
6
  import "./chunk-LM6IYQ3F.js";
7
7
  import "./chunk-4VNS5WPM.js";
8
8
  export {
@@ -2,7 +2,7 @@ import {
2
2
  buildMachinePermissionPromptBlock,
3
3
  handleConnectorRunMessage,
4
4
  resolveMachineRunPermissionPolicy
5
- } from "./chunk-KJU5MAGU.js";
5
+ } from "./chunk-53J7CH53.js";
6
6
  import {
7
7
  isConnectorWebSocketAuthError,
8
8
  isConnectorWebSocketRetryableError,
@@ -11,11 +11,11 @@ import {
11
11
  import {
12
12
  detectMachineInfo
13
13
  } from "./chunk-6HYVJV7B.js";
14
- import "./chunk-5KXWNLL5.js";
14
+ import "./chunk-BTSNLYKW.js";
15
15
  import "./chunk-SFWZUTCI.js";
16
16
  import "./chunk-7KNERA53.js";
17
17
  import "./chunk-JDSUTNYY.js";
18
- import "./chunk-WJRJDX2W.js";
18
+ import "./chunk-Q3CSL43H.js";
19
19
  import "./chunk-LM6IYQ3F.js";
20
20
  import "./chunk-JBTJAPUF.js";
21
21
  import "./chunk-VVEH6XUE.js";
@@ -11,12 +11,12 @@ import {
11
11
  runtimeWorkspacePermissionPolicy,
12
12
  scopePermissionPolicyToRuntimeWorkspace,
13
13
  summarizeAgentConfigForLogs
14
- } from "./chunk-KJU5MAGU.js";
15
- import "./chunk-5KXWNLL5.js";
14
+ } from "./chunk-53J7CH53.js";
15
+ import "./chunk-BTSNLYKW.js";
16
16
  import "./chunk-SFWZUTCI.js";
17
17
  import "./chunk-7KNERA53.js";
18
18
  import "./chunk-JDSUTNYY.js";
19
- import "./chunk-WJRJDX2W.js";
19
+ import "./chunk-Q3CSL43H.js";
20
20
  import "./chunk-LM6IYQ3F.js";
21
21
  import "./chunk-JBTJAPUF.js";
22
22
  import "./chunk-VVEH6XUE.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.31.0-alpha.6",
3
+ "version": "0.31.0-alpha.8",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {
@@ -58,7 +58,7 @@ import {
58
58
  visibleWidth,
59
59
  wrapTextToLines,
60
60
  wrapTranscriptLine
61
- } from "./chunk-VU4WUYR3.js";
61
+ } from "./chunk-4KFW6HK3.js";
62
62
  import "./chunk-AOS5IN2I.js";
63
63
  import "./chunk-6HYVJV7B.js";
64
64
  import {
@@ -80,7 +80,7 @@ import {
80
80
  readTimestamp,
81
81
  setCliLocale,
82
82
  t
83
- } from "./chunk-5KXWNLL5.js";
83
+ } from "./chunk-BTSNLYKW.js";
84
84
  import "./chunk-SFWZUTCI.js";
85
85
  import {
86
86
  checkStaleRun,
@@ -88,12 +88,12 @@ import {
88
88
  readRunRecord
89
89
  } from "./chunk-7KNERA53.js";
90
90
  import "./chunk-JDSUTNYY.js";
91
- import "./chunk-WJRJDX2W.js";
91
+ import "./chunk-Q3CSL43H.js";
92
92
  import "./chunk-LM6IYQ3F.js";
93
93
  import "./chunk-JBTJAPUF.js";
94
94
  import {
95
95
  getReadableCliDb
96
- } from "./chunk-WFHXMLHZ.js";
96
+ } from "./chunk-6YABCOFU.js";
97
97
  import {
98
98
  deleteDbRecord,
99
99
  queryUserRecords,
@@ -115,7 +115,7 @@ function detectProviderLabel(env) {
115
115
  return "missing";
116
116
  }
117
117
  async function defaultLocalRuntimeProbe(env, deps = {}) {
118
- const { resolveCliLocalRuntimeDbPath } = await import("./localRuntimeDb-THJZGAOJ.js");
118
+ const { resolveCliLocalRuntimeDbPath } = await import("./localRuntimeDb-GKYRBWLQ.js");
119
119
  const dbPath = resolveCliLocalRuntimeDbPath({ env });
120
120
  const authorityDriver = resolveCliAuthorityStoreDriver({ env });
121
121
  const authorityEndpoint = resolveCliAuthorityBrokerEndpoint({ transport: "tcp", env });
@@ -123,7 +123,7 @@ async function defaultLocalRuntimeProbe(env, deps = {}) {
123
123
  const authorityHealthPath = resolveCliAuthorityBrokerHealthPath({ transport: "tcp", env });
124
124
  const agentKey = readLocalAgentKey(env);
125
125
  try {
126
- const db = deps.getDb ? await deps.getDb() : await import("./localRuntimeDb-THJZGAOJ.js").then(
126
+ const db = deps.getDb ? await deps.getDb() : await import("./localRuntimeDb-GKYRBWLQ.js").then(
127
127
  ({ getDefaultCliLocalRuntimeDb }) => getDefaultCliLocalRuntimeDb({ env })
128
128
  );
129
129
  const authorityHealth = await (deps.probeAuthorityHealth ?? probeCliAuthorityBrokerHealth)({