nolo-cli 0.148.0-alpha.1 → 0.149.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 (41) hide show
  1. package/{_executeModel-NFJAMAGJ.js → _executeModel-OW3H7ICR.js} +12 -12
  2. package/{agentEmailCommands-4KW33JII.js → agentEmailCommands-A6XBQZBN.js} +10 -10
  3. package/{agentMachineCommands-CMQR4RQ4.js → agentMachineCommands-DQPUIMAC.js} +1 -1
  4. package/{agentRecordCommands-4YBSYPIY.js → agentRecordCommands-VCA76W6B.js} +10 -10
  5. package/{agentRunCommand-5MU5X5OT.js → agentRunCommand-YNLDKVR7.js} +10 -10
  6. package/{agentSlice-OZ33K224.js → agentSlice-O4RUQUMT.js} +1 -1
  7. package/{chatQueueReduxAdapter-HVHA2HPM.js → chatQueueReduxAdapter-TJRMXMYA.js} +2 -2
  8. package/{chunk-QU5A4LYX.js → chunk-36KZDDO5.js} +1 -1
  9. package/{chunk-DCFPQW22.js → chunk-3DAVPNFT.js} +2 -2
  10. package/{chunk-42Z3EMC4.js → chunk-ACQD6YI2.js} +8 -8
  11. package/{chunk-BKWMNZ2X.js → chunk-ATLTFRYJ.js} +2 -2
  12. package/{chunk-DIXLJWCD.js → chunk-DXHL7G2L.js} +6 -6
  13. package/{chunk-T767MPHB.js → chunk-HTVYCXBP.js} +2 -2
  14. package/{chunk-2JMMBU6V.js → chunk-ID7LNBWR.js} +8 -8
  15. package/{chunk-YUWMM4US.js → chunk-MST6R3E4.js} +1 -1
  16. package/{chunk-PCVVZ2MH.js → chunk-OMRJYNCI.js} +2 -2
  17. package/{chunk-IAG4FHOJ.js → chunk-PZZTFEKK.js} +1 -1
  18. package/{chunk-HUFPWXFW.js → chunk-TB3MIBRC.js} +5 -5
  19. package/{chunk-T7F46O36.js → chunk-TXH4IWJL.js} +2 -2
  20. package/{chunk-LPVCRQMM.js → chunk-TZZ2WRBL.js} +3 -3
  21. package/{chunk-FWQEKRTD.js → chunk-UASIEDKM.js} +2 -2
  22. package/{chunk-WRMKCKZ3.js → chunk-XYJSY4KG.js} +5 -5
  23. package/{chunk-P4BX6FFU.js → chunk-YAQJJDC2.js} +2 -2
  24. package/{chunk-523WHFSL.js → chunk-ZUEK6A6C.js} +4 -4
  25. package/{commandRegistry-YOEQUA7T.js → commandRegistry-2KBOXZQC.js} +14 -14
  26. package/{contentThunks-AK2F3KNC.js → contentThunks-BDIQRZR6.js} +3 -3
  27. package/{createAgentAutomationAction-5EJL6ROU.js → createAgentAutomationAction-5UGTB26P.js} +3 -3
  28. package/{createDialogAction-F5WEWA47.js → createDialogAction-B7VGVEVU.js} +4 -4
  29. package/{createPageAction-75ELC64R.js → createPageAction-CDLDKPRM.js} +3 -3
  30. package/{dialogSlice-KSXPGJB2.js → dialogSlice-N3YB65G5.js} +2 -2
  31. package/{docStore-AROBVRCR.js → docStore-E3CEOV5Q.js} +1 -1
  32. package/{handleSendMessageAction-EGNWHAUB.js → handleSendMessageAction-DQAD5ERJ.js} +230 -80
  33. package/index.js +2 -2
  34. package/{machineCommands-ARZYKGGE.js → machineCommands-HAP75VSG.js} +10 -10
  35. package/{machineWsRunDispatch-I7F4L532.js → machineWsRunDispatch-L32G7C4P.js} +10 -10
  36. package/package.json +1 -1
  37. package/{readlineWorkspace-3XOFVARF.js → readlineWorkspace-7BC66QSX.js} +10 -10
  38. package/{runAgentClientLoop-UMF7VZYZ.js → runAgentClientLoop-6E6UC3CE.js} +10 -10
  39. package/{streamAgentChatTurn-GYGMYOSM.js → streamAgentChatTurn-3UXPYFNX.js} +12 -12
  40. package/{tools-DU4JXVAV.js → tools-MKYDMWA4.js} +7 -7
  41. package/{updateDialogTitleAction-4U5W4AMH.js → updateDialogTitleAction-UPFV7TDT.js} +3 -3
@@ -7,7 +7,7 @@ import {
7
7
  mergeAgentToolsWithRuntime,
8
8
  projectDesktopToolUiContent,
9
9
  resolveTurnToolContext
10
- } from "./chunk-HUFPWXFW.js";
10
+ } from "./chunk-TB3MIBRC.js";
11
11
  import "./chunk-O2OWEFII.js";
12
12
  import {
13
13
  CONTEXT_OVERFLOW_ACTIONS,
@@ -16,19 +16,19 @@ import {
16
16
  } from "./chunk-OCZKATRC.js";
17
17
  import {
18
18
  performServerProxyFetchWithRetry
19
- } from "./chunk-T767MPHB.js";
19
+ } from "./chunk-HTVYCXBP.js";
20
20
  import {
21
21
  createSSEParser,
22
22
  resolveAgentRequiredPackIds,
23
23
  waitForAbortableDelay
24
- } from "./chunk-BKWMNZ2X.js";
24
+ } from "./chunk-ATLTFRYJ.js";
25
25
  import "./chunk-NF64D32W.js";
26
26
  import "./chunk-3L2WKC3W.js";
27
- import "./chunk-T7F46O36.js";
27
+ import "./chunk-TXH4IWJL.js";
28
28
  import "./chunk-XPRWFQQK.js";
29
29
  import "./chunk-UQNS32WZ.js";
30
30
  import "./chunk-MEYIRKDN.js";
31
- import "./chunk-QU5A4LYX.js";
31
+ import "./chunk-36KZDDO5.js";
32
32
  import "./chunk-ZJ7UHBJS.js";
33
33
  import {
34
34
  initMsgs,
@@ -41,13 +41,13 @@ import {
41
41
  setMessages,
42
42
  setStreamingMessageId,
43
43
  updateToolMessage
44
- } from "./chunk-42Z3EMC4.js";
44
+ } from "./chunk-ACQD6YI2.js";
45
45
  import "./chunk-523DITKR.js";
46
46
  import "./chunk-YYLHWIW6.js";
47
47
  import "./chunk-6O4IK4V2.js";
48
48
  import {
49
49
  streamAgentChatTurn
50
- } from "./chunk-LPVCRQMM.js";
50
+ } from "./chunk-TZZ2WRBL.js";
51
51
  import "./chunk-Z4CSIXYP.js";
52
52
  import "./chunk-5RGU3J7P.js";
53
53
  import "./chunk-M76ECQRD.js";
@@ -219,10 +219,31 @@ function resolveEffectiveToolSurface(input) {
219
219
  }
220
220
 
221
221
  // packages/ai/agent/serverOwnedWebForegroundEligibility.ts
222
- var DURABLE_WEB_FOREGROUND_TOOL_NAMES = /* @__PURE__ */ new Set([
223
- "ask_user",
222
+ var DURABLE_WEB_FOREGROUND_INTERACTIVE_TOOL_NAMES = /* @__PURE__ */ new Set([
223
+ "ask_user"
224
+ ]);
225
+ var DURABLE_WEB_FOREGROUND_READ_ONLY_TOOL_NAMES = /* @__PURE__ */ new Set([
226
+ // Network read-only tools.
224
227
  "exa_search",
225
- "fetchWebpage"
228
+ "fetchWebpage",
229
+ // Dialog search backed by the server workspace executor.
230
+ "searchDialogMessages",
231
+ // Nolo workspace read/query tools.
232
+ "listDialogs",
233
+ "readDialog",
234
+ "queryDialogsBySubjectRef",
235
+ "listAgents",
236
+ "readAgent",
237
+ "listSpaces",
238
+ "readSpace",
239
+ "readDoc",
240
+ "readSkillDoc",
241
+ "listTables",
242
+ "queryTableRows"
243
+ ]);
244
+ var DURABLE_WEB_FOREGROUND_TOOL_NAMES = /* @__PURE__ */ new Set([
245
+ ...DURABLE_WEB_FOREGROUND_INTERACTIVE_TOOL_NAMES,
246
+ ...DURABLE_WEB_FOREGROUND_READ_ONLY_TOOL_NAMES
226
247
  ]);
227
248
  var AUDITED_WEB_FOREGROUND_HOST_BASELINE_TOOL_NAMES = /* @__PURE__ */ new Set([
228
249
  // TOOL_PACKS.CORE
@@ -251,18 +272,19 @@ var AUDITED_WEB_FOREGROUND_HOST_BASELINE_TOOL_NAMES = /* @__PURE__ */ new Set([
251
272
  "controlAgentRun",
252
273
  "listAgents"
253
274
  ]);
275
+ function isDurableRequestedToolName(name) {
276
+ return typeof name === "string" && DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(canonicalizeToolName(name));
277
+ }
254
278
  function hasSupportedDurableToolSurface(agent, suppliedSurface) {
255
279
  const surface = suppliedSurface ?? resolveEffectiveToolSurface({
256
280
  agent
257
281
  });
258
282
  if (surface.shellEnabled || surface.workspaceLease) return false;
259
- if (!surface.requestedNames.every(
260
- (name) => DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name)
261
- )) {
283
+ if (!surface.requestedNames.every(isDurableRequestedToolName)) {
262
284
  return false;
263
285
  }
264
286
  return surface.hostInjectedNames.every(
265
- (name) => AUDITED_WEB_FOREGROUND_HOST_BASELINE_TOOL_NAMES.has(name)
287
+ (name) => AUDITED_WEB_FOREGROUND_HOST_BASELINE_TOOL_NAMES.has(canonicalizeToolName(name))
266
288
  );
267
289
  }
268
290
  function shouldUseServerOwnedWebForegroundTurn(input) {
@@ -278,7 +300,7 @@ function shouldUseServerOwnedWebForegroundTurn(input) {
278
300
  ...input.turnToolContext.referencedToolNames,
279
301
  ...input.turnToolContext.mentionedToolNames
280
302
  ];
281
- if (lateBound.some((name) => !DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name))) {
303
+ if (lateBound.some((name) => !isDurableRequestedToolName(name))) {
282
304
  return false;
283
305
  }
284
306
  }
@@ -292,9 +314,7 @@ function shouldUseServerOwnedWebForegroundTurn(input) {
292
314
  const runtimeOptions = input.runtimeOptions;
293
315
  if (runtimeOptions?.extraTools?.length) {
294
316
  if (!input.effectiveToolSurface) return false;
295
- if (runtimeOptions.extraTools.some(
296
- (name) => typeof name === "string" && !DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name)
297
- )) {
317
+ if (runtimeOptions.extraTools.some((name) => !isDurableRequestedToolName(name))) {
298
318
  return false;
299
319
  }
300
320
  }
@@ -450,19 +470,55 @@ function createServerOwnedToolProjection(args) {
450
470
  }
451
471
 
452
472
  // packages/ai/agent/serverOwnedWebForegroundHandoff.ts
473
+ function normalizeComparableText(value) {
474
+ if (typeof value === "string") {
475
+ return value.replace(/\r\n/g, "\n").trimEnd();
476
+ }
477
+ if (!Array.isArray(value)) return "";
478
+ return value.flatMap((part) => {
479
+ if (!part || typeof part !== "object") return [];
480
+ const record = part;
481
+ if (record.type === "text" && typeof record.text === "string") {
482
+ return [record.text];
483
+ }
484
+ return [];
485
+ }).join("").replace(/\r\n/g, "\n").trimEnd();
486
+ }
453
487
  function assistantText(message) {
454
- return typeof message.content === "string" ? message.content : "";
488
+ return normalizeComparableText(message.content);
455
489
  }
456
- function findNewCanonicalAssistant(messages, initialMessageIds, transientId, expectedText) {
490
+ function assistantThinking(message) {
491
+ const value = typeof message.thinkContent === "string" ? message.thinkContent : typeof message.reasoning_content === "string" ? message.reasoning_content : "";
492
+ return normalizeComparableText(value);
493
+ }
494
+ function assistantAgentKey(message) {
495
+ const value = message.agentKey ?? message.cybotKey;
496
+ return typeof value === "string" ? value : "";
497
+ }
498
+ function findNewCanonicalAssistant(messages, initialMessageIds, transientId, expectedText, expectedThinking, expectedAgentKey) {
457
499
  const transient = messages.find((message) => message?.id === transientId);
458
- const completedText = expectedText || (transient ? assistantText(transient) : "");
459
- for (const message of messages) {
460
- if (!message?.id || message.id === transientId) continue;
461
- if (initialMessageIds.has(message.id)) continue;
462
- if (message.role !== "assistant") continue;
463
- if (message.isStreaming) continue;
464
- if (completedText && assistantText(message) !== completedText) continue;
465
- return message;
500
+ const completedText = normalizeComparableText(
501
+ expectedText !== void 0 ? expectedText : transient ? assistantText(transient) : ""
502
+ );
503
+ const completedThinking = normalizeComparableText(
504
+ expectedThinking !== void 0 ? expectedThinking : transient ? assistantThinking(transient) : ""
505
+ );
506
+ const candidates = messages.filter((message) => {
507
+ if (!message?.id || message.id === transientId) return false;
508
+ if (initialMessageIds.has(message.id)) return false;
509
+ if (message.role !== "assistant") return false;
510
+ if (message.isStreaming) return false;
511
+ if (completedText) return assistantText(message) === completedText;
512
+ if (completedThinking) return assistantThinking(message) === completedThinking;
513
+ return false;
514
+ });
515
+ if (candidates.length === 0) return null;
516
+ if (candidates.length === 1) return candidates[0] ?? null;
517
+ if (expectedAgentKey) {
518
+ const agentMatches = candidates.filter(
519
+ (message) => assistantAgentKey(message) === expectedAgentKey
520
+ );
521
+ if (agentMatches.length === 1) return agentMatches[0] ?? null;
466
522
  }
467
523
  return null;
468
524
  }
@@ -475,7 +531,9 @@ async function waitForNewCanonicalAssistant(args) {
475
531
  args.readMessages(),
476
532
  args.initialMessageIds,
477
533
  args.transientId,
478
- args.expectedText
534
+ args.expectedText,
535
+ args.expectedThinking,
536
+ args.expectedAgentKey
479
537
  );
480
538
  if (canonical) return canonical;
481
539
  if (Date.now() >= deadline) return null;
@@ -529,7 +587,47 @@ function resolveServerOwnedWebEffectiveToolSurface(args) {
529
587
  };
530
588
  }
531
589
 
590
+ // packages/ai/agent/serverOwnedAssistantStream.ts
591
+ var EMPTY_SERVER_OWNED_ASSISTANT_STREAM = {
592
+ text: "",
593
+ thinking: "",
594
+ segmentText: "",
595
+ segmentThinking: ""
596
+ };
597
+ function applyServerOwnedAssistantStreamPayload(state, payload) {
598
+ if (payload?.type === "thinking" && typeof payload.content === "string") {
599
+ return {
600
+ ...state,
601
+ thinking: state.thinking + payload.content,
602
+ segmentThinking: state.segmentThinking + payload.content
603
+ };
604
+ }
605
+ if (payload?.type === "text" && typeof payload.content === "string") {
606
+ return {
607
+ ...state,
608
+ text: state.text + payload.content,
609
+ segmentText: state.segmentText + payload.content
610
+ };
611
+ }
612
+ if (payload?.type === "assistant_tool_calls") {
613
+ if (!state.segmentText && !state.segmentThinking) return state;
614
+ return {
615
+ ...state,
616
+ segmentText: "",
617
+ segmentThinking: ""
618
+ };
619
+ }
620
+ return state;
621
+ }
622
+
532
623
  // packages/ai/agent/serverOwnedWebForegroundTurn.ts
624
+ function resolveServerOwnedWebAllowedToolNames(toolNames) {
625
+ return Array.from(
626
+ new Set(
627
+ toolNames.filter((name) => typeof name === "string").map((name) => canonicalizeToolName(name)).filter((name) => DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name))
628
+ )
629
+ );
630
+ }
533
631
  function detectServerOwnedCandidateSurface() {
534
632
  return typeof window !== "undefined" && typeof document !== "undefined" ? "web" : "non-web";
535
633
  }
@@ -571,19 +669,26 @@ async function canRunServerOwnedWebForegroundTurn(args, thunk) {
571
669
  state,
572
670
  turnToolContext
573
671
  });
672
+ const eligible = shouldUseServerOwnedWebForegroundTurn({
673
+ surface: detectServerOwnedCandidateSurface(),
674
+ agentConfig,
675
+ effectiveToolSurface,
676
+ turnToolContext,
677
+ userInput: args.userInput,
678
+ runtimeOptions: args.runtimeOptions,
679
+ currentServer,
680
+ token,
681
+ isDesktopApp: getIsDesktopApp()
682
+ });
683
+ if (!eligible) {
684
+ return { eligible: false, agentConfig };
685
+ }
574
686
  return {
575
- eligible: shouldUseServerOwnedWebForegroundTurn({
576
- surface: detectServerOwnedCandidateSurface(),
577
- agentConfig,
578
- effectiveToolSurface,
579
- turnToolContext,
580
- userInput: args.userInput,
581
- runtimeOptions: args.runtimeOptions,
582
- currentServer,
583
- token,
584
- isDesktopApp: getIsDesktopApp()
585
- }),
586
- agentConfig
687
+ eligible: true,
688
+ agentConfig: {
689
+ ...agentConfig,
690
+ tools: resolveServerOwnedWebAllowedToolNames(effectiveToolSurface.names)
691
+ }
587
692
  };
588
693
  } catch {
589
694
  return { eligible: false };
@@ -612,8 +717,9 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
612
717
  const { key: transientKey, messageId: transientId } = createDialogMessageKeyAndId(dialogId);
613
718
  const controller = new AbortController();
614
719
  const loopKey = `server-owned:${dialogId}:${transientId}`;
615
- let accumulated = "";
720
+ let assistantStream = EMPTY_SERVER_OWNED_ASSISTANT_STREAM;
616
721
  let sawDone = false;
722
+ let clientControllerReleased = false;
617
723
  const toolProjection = createServerOwnedToolProjection({
618
724
  dialogId,
619
725
  dispatch: thunk.dispatch,
@@ -625,18 +731,68 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
625
731
  supportedToolNames: DURABLE_WEB_FOREGROUND_TOOL_NAMES,
626
732
  keepReadOnlyUntilCanonical: ["ask_user"]
627
733
  });
734
+ const projectAssistant = () => {
735
+ thunk.dispatch(
736
+ messageStreaming({
737
+ id: transientId,
738
+ dialogId,
739
+ dbKey: transientKey,
740
+ role: "assistant",
741
+ content: assistantStream.text,
742
+ thinkContent: assistantStream.thinking,
743
+ cybotKey: args.agentKey,
744
+ agentKey: args.agentKey,
745
+ userId
746
+ })
747
+ );
748
+ };
749
+ const releaseClientController = () => {
750
+ if (clientControllerReleased) return;
751
+ clientControllerReleased = true;
752
+ thunk.dispatch(removeActiveController({ messageId: loopKey, dialogKey }));
753
+ };
754
+ const finishTransientImmediately = () => {
755
+ const transient = selectAllMsgs(thunk.getState(), dialogId).find((message) => message?.id === transientId);
756
+ if (transient) {
757
+ thunk.dispatch(
758
+ setMessages({
759
+ dialogId,
760
+ messages: [{
761
+ ...transient,
762
+ content: assistantStream.text,
763
+ thinkContent: assistantStream.thinking,
764
+ isStreaming: false
765
+ }]
766
+ })
767
+ );
768
+ }
769
+ setStreamingMessageId(dialogId, null);
770
+ };
771
+ const removeTransientWhenCanonicalArrives = () => {
772
+ void waitForNewCanonicalAssistant({
773
+ readMessages: () => selectAllMsgs(thunk.getState(), dialogId),
774
+ initialMessageIds,
775
+ transientId,
776
+ // The server persists a new assistant trace segment after every tool
777
+ // boundary. Fingerprint only the final segment here; the live transient
778
+ // intentionally keeps the concatenated presentation until canonical rows
779
+ // replace it.
780
+ expectedText: assistantStream.segmentText,
781
+ expectedThinking: assistantStream.segmentThinking,
782
+ expectedAgentKey: args.agentKey,
783
+ timeoutMs: 6e4,
784
+ pollMs: 100
785
+ }).then((canonical) => {
786
+ if (!canonical) return;
787
+ toolProjection.cleanup();
788
+ thunk.dispatch(removeTransientMessage({ id: transientId, dialogId }));
789
+ }).catch(() => {
790
+ });
791
+ };
628
792
  thunk.dispatch(addActiveController({ messageId: loopKey, controller, dialogKey }));
629
- thunk.dispatch(
630
- messageStreaming({
631
- id: transientId,
632
- dialogId,
633
- dbKey: transientKey,
634
- role: "assistant",
635
- content: "",
636
- cybotKey: args.agentKey,
637
- agentKey: args.agentKey,
638
- userId
639
- })
793
+ projectAssistant();
794
+ const allowedToolNames = resolveServerOwnedWebAllowedToolNames(
795
+ Array.isArray(args.agentConfig.tools) ? args.agentConfig.tools : []
640
796
  );
641
797
  const body = JSON.stringify({
642
798
  agentKey: args.agentKey,
@@ -656,6 +812,11 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
656
812
  "client-user-prepersisted",
657
813
  "durable-tool-cards"
658
814
  ],
815
+ // This is the exact post-filter surface produced during admission, not a
816
+ // global durable superset. Server-private defaults and machine tools are
817
+ // injected before this constraint, then intersected back to this turn's
818
+ // admitted names. Direct run() callers are sanitized again above.
819
+ allowedToolNames,
659
820
  ...args.dialogConfig.agentMode === "auto" ? { dialogAgentMode: "auto" } : { dialogAgentMode: "fixed" }
660
821
  },
661
822
  ...args.runtimeOptions ? { runtimeOptions: args.runtimeOptions } : {},
@@ -710,20 +871,13 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
710
871
  return { reject: payload.message || "Agent execution failed" };
711
872
  }
712
873
  toolProjection.handlePayload(payload);
713
- if (payload?.type === "text" && typeof payload.content === "string") {
714
- accumulated += payload.content;
715
- thunk.dispatch(
716
- messageStreaming({
717
- id: transientId,
718
- dialogId,
719
- dbKey: transientKey,
720
- role: "assistant",
721
- content: accumulated,
722
- cybotKey: args.agentKey,
723
- agentKey: args.agentKey,
724
- userId
725
- })
726
- );
874
+ const nextAssistantStream = applyServerOwnedAssistantStreamPayload(
875
+ assistantStream,
876
+ payload
877
+ );
878
+ if (nextAssistantStream !== assistantStream) {
879
+ assistantStream = nextAssistantStream;
880
+ projectAssistant();
727
881
  }
728
882
  }
729
883
  });
@@ -731,6 +885,7 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
731
885
  if (outcome.outcome === "rejected") throw new Error(outcome.message);
732
886
  if (!outcome.sawDone) return { serverOwned: true, detached: true };
733
887
  sawDone = true;
888
+ finishTransientImmediately();
734
889
  let canonicalVisible = false;
735
890
  try {
736
891
  await thunk.dispatch(initMsgs({ dialogId })).unwrap();
@@ -738,7 +893,11 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
738
893
  readMessages: () => selectAllMsgs(thunk.getState(), dialogId),
739
894
  initialMessageIds,
740
895
  transientId,
741
- expectedText: accumulated
896
+ expectedText: assistantStream.segmentText,
897
+ expectedThinking: assistantStream.segmentThinking,
898
+ expectedAgentKey: args.agentKey,
899
+ timeoutMs: 350,
900
+ pollMs: 25
742
901
  });
743
902
  } catch (error) {
744
903
  console.warn("[chat] server-owned canonical handoff refresh failed", {
@@ -751,24 +910,15 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
751
910
  thunk.dispatch(removeTransientMessage({ id: transientId, dialogId }));
752
911
  } else {
753
912
  toolProjection.cleanup();
754
- const transient = selectAllMsgs(thunk.getState(), dialogId).find((message) => message?.id === transientId);
755
- if (transient) {
756
- thunk.dispatch(
757
- setMessages({
758
- dialogId,
759
- messages: [{ ...transient, isStreaming: false }]
760
- })
761
- );
762
- }
763
- setStreamingMessageId(dialogId, null);
913
+ removeTransientWhenCanonicalArrives();
764
914
  console.warn(
765
- "[chat] server-owned canonical message not visible after done; keeping transient projection",
915
+ "[chat] server-owned canonical message not visible after done; keeping finished transient until canonical arrives",
766
916
  { dialogId, transientId }
767
917
  );
768
918
  }
769
919
  return { serverOwned: true };
770
920
  } finally {
771
- thunk.dispatch(removeActiveController({ messageId: loopKey, dialogKey }));
921
+ releaseClientController();
772
922
  if (!sawDone) {
773
923
  toolProjection.cleanup();
774
924
  thunk.dispatch(removeTransientMessage({ id: transientId, dialogId }));
package/index.js CHANGED
@@ -71,7 +71,7 @@ async function runScript(script, forwardedArgs, env) {
71
71
  return proc.exited;
72
72
  }
73
73
  async function launchTuiWorkspace(args2) {
74
- const { startTuiWorkspace } = await import("./readlineWorkspace-3XOFVARF.js");
74
+ const { startTuiWorkspace } = await import("./readlineWorkspace-7BC66QSX.js");
75
75
  const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-3YFNHCTW.js");
76
76
  return startTuiWorkspace({
77
77
  ...args2,
@@ -81,7 +81,7 @@ async function launchTuiWorkspace(args2) {
81
81
  });
82
82
  }
83
83
  async function main() {
84
- const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-YOEQUA7T.js");
84
+ const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-2KBOXZQC.js");
85
85
  const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-ZGOFORWV.js");
86
86
  const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-2Y7BALTO.js");
87
87
  const runtimeEnv = {
@@ -2,13 +2,13 @@ import {
2
2
  buildMachinePermissionPromptBlock,
3
3
  handleConnectorRunMessage,
4
4
  resolveMachineRunPermissionPolicy
5
- } from "./chunk-FWQEKRTD.js";
5
+ } from "./chunk-UASIEDKM.js";
6
6
  import {
7
7
  isConnectorWebSocketAuthError,
8
8
  isConnectorWebSocketRetryableError,
9
9
  resolveConnectorWebSocketTarget
10
10
  } from "./chunk-ALXHV7NK.js";
11
- import "./chunk-WRMKCKZ3.js";
11
+ import "./chunk-XYJSY4KG.js";
12
12
  import "./chunk-I4OPU5TK.js";
13
13
  import "./chunk-YUNJN43V.js";
14
14
  import "./chunk-62IL3KQV.js";
@@ -25,35 +25,35 @@ import "./chunk-4XEYAFLY.js";
25
25
  import "./chunk-JBTJAPUF.js";
26
26
  import "./chunk-O2OWEFII.js";
27
27
  import "./chunk-ATNTHIZI.js";
28
- import "./chunk-DCFPQW22.js";
28
+ import "./chunk-3DAVPNFT.js";
29
29
  import "./chunk-HS7MLR74.js";
30
- import "./chunk-2JMMBU6V.js";
30
+ import "./chunk-ID7LNBWR.js";
31
31
  import "./chunk-DY7ANLKG.js";
32
32
  import "./chunk-5UTFL4QJ.js";
33
33
  import "./chunk-KQHGZWSV.js";
34
- import "./chunk-BKWMNZ2X.js";
34
+ import "./chunk-ATLTFRYJ.js";
35
35
  import "./chunk-NF64D32W.js";
36
36
  import {
37
37
  CORE_DRAIN_REASON
38
38
  } from "./chunk-3L2WKC3W.js";
39
39
  import "./chunk-4JMDLJAD.js";
40
- import "./chunk-PCVVZ2MH.js";
40
+ import "./chunk-OMRJYNCI.js";
41
41
  import "./chunk-CPUFH46E.js";
42
42
  import "./chunk-YRRASA5Q.js";
43
43
  import "./chunk-63W5N6P3.js";
44
44
  import "./chunk-VF4K2QE6.js";
45
- import "./chunk-T7F46O36.js";
45
+ import "./chunk-TXH4IWJL.js";
46
46
  import "./chunk-6FGTMQCL.js";
47
47
  import "./chunk-XPRWFQQK.js";
48
48
  import "./chunk-UQNS32WZ.js";
49
49
  import "./chunk-MEYIRKDN.js";
50
- import "./chunk-QU5A4LYX.js";
50
+ import "./chunk-36KZDDO5.js";
51
51
  import "./chunk-ZJ7UHBJS.js";
52
- import "./chunk-42Z3EMC4.js";
52
+ import "./chunk-ACQD6YI2.js";
53
53
  import "./chunk-523DITKR.js";
54
54
  import "./chunk-YYLHWIW6.js";
55
55
  import "./chunk-6O4IK4V2.js";
56
- import "./chunk-LPVCRQMM.js";
56
+ import "./chunk-TZZ2WRBL.js";
57
57
  import "./chunk-Z4CSIXYP.js";
58
58
  import "./chunk-5RGU3J7P.js";
59
59
  import "./chunk-M76ECQRD.js";
@@ -11,8 +11,8 @@ import {
11
11
  runtimeWorkspacePermissionPolicy,
12
12
  scopePermissionPolicyToRuntimeWorkspace,
13
13
  summarizeAgentConfigForLogs
14
- } from "./chunk-FWQEKRTD.js";
15
- import "./chunk-WRMKCKZ3.js";
14
+ } from "./chunk-UASIEDKM.js";
15
+ import "./chunk-XYJSY4KG.js";
16
16
  import "./chunk-I4OPU5TK.js";
17
17
  import "./chunk-YUNJN43V.js";
18
18
  import "./chunk-62IL3KQV.js";
@@ -26,33 +26,33 @@ import "./chunk-4XEYAFLY.js";
26
26
  import "./chunk-JBTJAPUF.js";
27
27
  import "./chunk-O2OWEFII.js";
28
28
  import "./chunk-ATNTHIZI.js";
29
- import "./chunk-DCFPQW22.js";
29
+ import "./chunk-3DAVPNFT.js";
30
30
  import "./chunk-HS7MLR74.js";
31
- import "./chunk-2JMMBU6V.js";
31
+ import "./chunk-ID7LNBWR.js";
32
32
  import "./chunk-DY7ANLKG.js";
33
33
  import "./chunk-5UTFL4QJ.js";
34
34
  import "./chunk-KQHGZWSV.js";
35
- import "./chunk-BKWMNZ2X.js";
35
+ import "./chunk-ATLTFRYJ.js";
36
36
  import "./chunk-NF64D32W.js";
37
37
  import "./chunk-3L2WKC3W.js";
38
38
  import "./chunk-4JMDLJAD.js";
39
- import "./chunk-PCVVZ2MH.js";
39
+ import "./chunk-OMRJYNCI.js";
40
40
  import "./chunk-CPUFH46E.js";
41
41
  import "./chunk-YRRASA5Q.js";
42
42
  import "./chunk-63W5N6P3.js";
43
43
  import "./chunk-VF4K2QE6.js";
44
- import "./chunk-T7F46O36.js";
44
+ import "./chunk-TXH4IWJL.js";
45
45
  import "./chunk-6FGTMQCL.js";
46
46
  import "./chunk-XPRWFQQK.js";
47
47
  import "./chunk-UQNS32WZ.js";
48
48
  import "./chunk-MEYIRKDN.js";
49
- import "./chunk-QU5A4LYX.js";
49
+ import "./chunk-36KZDDO5.js";
50
50
  import "./chunk-ZJ7UHBJS.js";
51
- import "./chunk-42Z3EMC4.js";
51
+ import "./chunk-ACQD6YI2.js";
52
52
  import "./chunk-523DITKR.js";
53
53
  import "./chunk-YYLHWIW6.js";
54
54
  import "./chunk-6O4IK4V2.js";
55
- import "./chunk-LPVCRQMM.js";
55
+ import "./chunk-TZZ2WRBL.js";
56
56
  import "./chunk-Z4CSIXYP.js";
57
57
  import "./chunk-5RGU3J7P.js";
58
58
  import "./chunk-M76ECQRD.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.148.0-alpha.1",
3
+ "version": "0.149.0-alpha.1",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {
@@ -76,7 +76,7 @@ import {
76
76
  wrapTextToLines,
77
77
  wrapTranscriptLine,
78
78
  wrapTranscriptLineWithLayout
79
- } from "./chunk-523WHFSL.js";
79
+ } from "./chunk-ZUEK6A6C.js";
80
80
  import "./chunk-VJVNU77E.js";
81
81
  import "./chunk-BIDGLJQ3.js";
82
82
  import {
@@ -88,7 +88,7 @@ import {
88
88
  readTimestamp,
89
89
  setCliLocale,
90
90
  t
91
- } from "./chunk-WRMKCKZ3.js";
91
+ } from "./chunk-XYJSY4KG.js";
92
92
  import "./chunk-I4OPU5TK.js";
93
93
  import "./chunk-YUNJN43V.js";
94
94
  import "./chunk-62IL3KQV.js";
@@ -142,16 +142,16 @@ import "./chunk-ATNTHIZI.js";
142
142
  import "./chunk-JEXVIMYZ.js";
143
143
  import {
144
144
  prepareTools
145
- } from "./chunk-DCFPQW22.js";
145
+ } from "./chunk-3DAVPNFT.js";
146
146
  import {
147
147
  buildResponseGuidelines
148
148
  } from "./chunk-EOARMOVD.js";
149
149
  import "./chunk-HS7MLR74.js";
150
- import "./chunk-2JMMBU6V.js";
150
+ import "./chunk-ID7LNBWR.js";
151
151
  import "./chunk-DY7ANLKG.js";
152
152
  import "./chunk-5UTFL4QJ.js";
153
153
  import "./chunk-KQHGZWSV.js";
154
- import "./chunk-BKWMNZ2X.js";
154
+ import "./chunk-ATLTFRYJ.js";
155
155
  import "./chunk-NF64D32W.js";
156
156
  import "./chunk-3L2WKC3W.js";
157
157
  import {
@@ -164,12 +164,12 @@ import {
164
164
  resolveRunLabel,
165
165
  shortRunId
166
166
  } from "./chunk-4JMDLJAD.js";
167
- import "./chunk-PCVVZ2MH.js";
167
+ import "./chunk-OMRJYNCI.js";
168
168
  import "./chunk-CPUFH46E.js";
169
169
  import "./chunk-YRRASA5Q.js";
170
170
  import "./chunk-63W5N6P3.js";
171
171
  import "./chunk-VF4K2QE6.js";
172
- import "./chunk-T7F46O36.js";
172
+ import "./chunk-TXH4IWJL.js";
173
173
  import "./chunk-6FGTMQCL.js";
174
174
  import "./chunk-XPRWFQQK.js";
175
175
  import {
@@ -179,15 +179,15 @@ import {
179
179
  } from "./chunk-YPREESF4.js";
180
180
  import "./chunk-UQNS32WZ.js";
181
181
  import "./chunk-MEYIRKDN.js";
182
- import "./chunk-QU5A4LYX.js";
182
+ import "./chunk-36KZDDO5.js";
183
183
  import "./chunk-ZJ7UHBJS.js";
184
184
  import {
185
185
  extractReferenceKeysFromMessage
186
- } from "./chunk-42Z3EMC4.js";
186
+ } from "./chunk-ACQD6YI2.js";
187
187
  import "./chunk-523DITKR.js";
188
188
  import "./chunk-YYLHWIW6.js";
189
189
  import "./chunk-6O4IK4V2.js";
190
- import "./chunk-LPVCRQMM.js";
190
+ import "./chunk-TZZ2WRBL.js";
191
191
  import "./chunk-Z4CSIXYP.js";
192
192
  import "./chunk-5RGU3J7P.js";
193
193
  import "./chunk-M76ECQRD.js";