nolo-cli 0.16.0-alpha.8 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/{_executeModel-BXOUO4QK.js → _executeModel-AVCA2NAV.js} +20 -21
  2. package/{agentDeleteCommand-X35VSSVM.js → agentDeleteCommand-QW5PUMDQ.js} +14 -15
  3. package/{agentEmailCommands-SBT6O7PR.js → agentEmailCommands-4ORVLGVQ.js} +25 -26
  4. package/{agentListCommands-LLQHUE4O.js → agentListCommands-YWBYRTYC.js} +16 -17
  5. package/{agentMachineCommands-XZCYBU3R.js → agentMachineCommands-JSQW4FOA.js} +14 -15
  6. package/{agentRecordCommands-RIYJOUA2.js → agentRecordCommands-AASIWOBT.js} +24 -25
  7. package/{agentRunCommand-A5XOHMND.js → agentRunCommand-TB5BHXUH.js} +24 -25
  8. package/{agentRuntimeLocal-N56G2ZJK.js → agentRuntimeLocal-QNPNJRVH.js} +12 -15
  9. package/{agentSlice-3FPEJY4O.js → agentSlice-RUNXC62Y.js} +1 -1
  10. package/{authCommand-P22WCVOP.js → authCommand-YFTR3347.js} +2 -8
  11. package/{chunk-KRGHIVPU.js → chunk-33BJUVK4.js} +2 -2
  12. package/{chunk-BIAWRSVQ.js → chunk-3663CXZN.js} +12 -39
  13. package/{chunk-OIX36K6R.js → chunk-3OIRVWXA.js} +10 -1
  14. package/{chunk-LSFAWXKC.js → chunk-3WGLLTK4.js} +3 -100
  15. package/{chunk-2B3BNWPC.js → chunk-4FX6NVDW.js} +134 -1
  16. package/{chunk-BOPYCNN3.js → chunk-4IJYA27C.js} +1 -1
  17. package/{chunk-4IF3B7WC.js → chunk-4L2OJPCU.js} +2 -2
  18. package/{chunk-CI2G2Z2L.js → chunk-55NSNCFM.js} +1 -1
  19. package/{chunk-5BP2BROQ.js → chunk-66X4VSRC.js} +4 -3
  20. package/{chunk-LJIJWXIT.js → chunk-6EVITP2G.js} +254 -13
  21. package/{chunk-C2BYYSAO.js → chunk-7UKFVQ5W.js} +27 -84
  22. package/{chunk-B2A62NRJ.js → chunk-AUURUT6L.js} +200 -65
  23. package/{chunk-KOW2R4MZ.js → chunk-AVVZUXXC.js} +13 -38
  24. package/{chunk-BS5STUTA.js → chunk-BEBNFWDU.js} +3 -3
  25. package/{chunk-YMMMHRM6.js → chunk-DGEYDWEZ.js} +3 -3
  26. package/{chunk-UVLYZNDL.js → chunk-DPAB4FQ7.js} +124 -629
  27. package/{chunk-J4VLNDI7.js → chunk-EHLHSX7R.js} +2 -9
  28. package/{chunk-LXT3EWFO.js → chunk-FRV6A633.js} +3 -3
  29. package/{chunk-5IMRNKUB.js → chunk-FY233ZFU.js} +18 -17
  30. package/{chunk-ZTRZ2O5B.js → chunk-GSINCD4P.js} +4 -4
  31. package/{chunk-6Z3S3UAU.js → chunk-IGXREZW2.js} +1 -1
  32. package/{chunk-B4KT7RN2.js → chunk-JTMNCCWF.js} +2 -2
  33. package/{chunk-ASZ2C44S.js → chunk-LPEUV5RE.js} +2 -2
  34. package/{chunk-QSWWWYGA.js → chunk-M43KDE25.js} +1 -1
  35. package/{chunk-E4STLOKO.js → chunk-MR6ISAGB.js} +2 -2
  36. package/{chunk-TPHRIFDJ.js → chunk-NSCHQQPU.js} +10 -10
  37. package/{chunk-AKYTMRBP.js → chunk-NVEWUJVX.js} +1 -1
  38. package/{chunk-ZRDWHLMQ.js → chunk-P3RIAYGG.js} +1 -1
  39. package/{chunk-FJHD7FHN.js → chunk-PCTUYVUM.js} +1 -1
  40. package/{chunk-YQMTILRW.js → chunk-RLCXU7A5.js} +1 -1
  41. package/{chunk-DRHXEIMY.js → chunk-S2LXHNHG.js} +3 -3
  42. package/{chunk-UALQTIWY.js → chunk-XBS2WYJ2.js} +1 -1
  43. package/{chunk-ND3KEKR5.js → chunk-Z5JQNBNY.js} +2 -2
  44. package/{chunk-HNLGEZZC.js → chunk-ZQBL7LIC.js} +24 -19
  45. package/{createAgentAutomationAction-P22E427A.js → createAgentAutomationAction-FNHPSKKO.js} +6 -6
  46. package/{createDialogAction-652TOTEI.js → createDialogAction-TZCVQ3NU.js} +7 -7
  47. package/{createPageAction-YOYLCN3U.js → createPageAction-EIGZ3BKT.js} +6 -6
  48. package/{dialogCommands-L4LMXQAI.js → dialogCommands-FO77J5DQ.js} +15 -16
  49. package/{dialogSlice-JDGM4LBU.js → dialogSlice-MM5U4KE2.js} +6 -6
  50. package/{docCreateCommands-C4HJCM47.js → docCreateCommands-I3BS3AZI.js} +17 -20
  51. package/{docDeleteCommands-Y6W6A3W6.js → docDeleteCommands-Q2OPV52P.js} +16 -19
  52. package/{docReadCommands-2WUIDAR6.js → docReadCommands-YOOFACYZ.js} +15 -18
  53. package/{docStore-WR2GOFTC.js → docStore-NGYQ2JTR.js} +7 -7
  54. package/{docUpdateCommands-XVL2CBKE.js → docUpdateCommands-2B32ITHN.js} +16 -19
  55. package/{getPricing-HXWUZAEN.js → getPricing-P4XRJRZB.js} +3 -3
  56. package/{handleSendMessageAction-VWLRU6MN.js → handleSendMessageAction-JRZWWBKP.js} +6 -6
  57. package/index.js +43 -74
  58. package/{machineCommands-2TWAI6PL.js → machineCommands-WRWF2ICZ.js} +23 -24
  59. package/{machineWsRunDispatch-YZV3WPSY.js → machineWsRunDispatch-ZX7Q3TWZ.js} +23 -24
  60. package/{models-DQUMNIGQ.js → models-WQ5N4OJM.js} +2 -2
  61. package/package.json +1 -1
  62. package/{readlineWorkspace-BWJFIKM5.js → readlineWorkspace-ZTGRGW46.js} +81 -78
  63. package/{runAgentClientLoop-S7STEKKR.js → runAgentClientLoop-JZCOP7LG.js} +16 -17
  64. package/{spaceCommands-PYFLKEAW.js → spaceCommands-VV4GTPQK.js} +14 -15
  65. package/{spaceSlice-VRX4URCY.js → spaceSlice-DRWWZJP7.js} +6 -6
  66. package/{streamAgentChatTurn-DVSLQIQE.js → streamAgentChatTurn-Y6WGATQR.js} +26 -27
  67. package/{tools-O2GBX7RP.js → tools-PUNBY3AH.js} +11 -11
  68. package/{tuiSummaryLlmCaller-ENLQTJUV.js → tuiSummaryLlmCaller-F64WLSAF.js} +5 -6
  69. package/{updateDialogTitleAction-SDAHAOAO.js → updateDialogTitleAction-YSR4TCMB.js} +6 -6
  70. package/appDeleteCommands-WHRYDQLZ.js +0 -125
  71. package/appDeployCommands-USRWBT6T.js +0 -164
  72. package/appDeployStatusCommands-R632IBVL.js +0 -145
  73. package/appGetCommands-PKGC2JWH.js +0 -120
  74. package/appListCommands-OMRAEOAL.js +0 -123
  75. package/chunk-EFNMO3YF.js +0 -107
  76. package/chunk-GFUIQ4RY.js +0 -136
  77. package/chunk-KFEVY3ST.js +0 -255
  78. /package/{chunk-LPWS7HMQ.js → chunk-O6W2O2DA.js} +0 -0
@@ -18,17 +18,17 @@ import {
18
18
  isBuiltinNoloAgentRef,
19
19
  t,
20
20
  toolLabel
21
- } from "./chunk-UVLYZNDL.js";
21
+ } from "./chunk-DPAB4FQ7.js";
22
22
  import {
23
23
  getReadableCliDb
24
24
  } from "./chunk-W4NVOSFF.js";
25
25
  import {
26
26
  readDbRecord,
27
27
  resolveAgentRecordFromHybridStore
28
- } from "./chunk-FJHD7FHN.js";
28
+ } from "./chunk-PCTUYVUM.js";
29
29
  import {
30
30
  normalizeAgentHandle
31
- } from "./chunk-QSWWWYGA.js";
31
+ } from "./chunk-M43KDE25.js";
32
32
  import {
33
33
  NOLO_PROJECT_MANAGER_AGENT_KEY,
34
34
  isLocalCliAgentKey
@@ -47,7 +47,7 @@ import {
47
47
  isAgentNameFallback,
48
48
  isAgentRunTerminalStatus,
49
49
  resolveRunLabel
50
- } from "./chunk-HNLGEZZC.js";
50
+ } from "./chunk-ZQBL7LIC.js";
51
51
  import {
52
52
  isGatewayHttpStatus
53
53
  } from "./chunk-RQSOAMPJ.js";
@@ -56,7 +56,7 @@ import {
56
56
  chooseMemoryOwners,
57
57
  loadMemoryCandidatesFromDb,
58
58
  resolveAgentMemoryPolicy
59
- } from "./chunk-ND3KEKR5.js";
59
+ } from "./chunk-Z5JQNBNY.js";
60
60
  import {
61
61
  parseExternalSkillMarkdown,
62
62
  parseSkillDocProtocol
@@ -65,14 +65,14 @@ import {
65
65
  API_REPORTED_COST_MULTIPLIER,
66
66
  normalizeUsage,
67
67
  parseUiAskChoiceContent
68
- } from "./chunk-TPHRIFDJ.js";
68
+ } from "./chunk-NSCHQQPU.js";
69
69
  import {
70
70
  buildSkillDiscoveryContextBlock
71
71
  } from "./chunk-AS3ZQ3O2.js";
72
72
  import {
73
73
  buildPlatformChatCompletionRequest,
74
74
  parsePlatformChatCompletionData
75
- } from "./chunk-KOW2R4MZ.js";
75
+ } from "./chunk-AVVZUXXC.js";
76
76
  import {
77
77
  resolveAgentRuntimeConfigFromRecord
78
78
  } from "./chunk-OIQPORYI.js";
@@ -81,26 +81,21 @@ import {
81
81
  LOCAL_TURN_ABORTED_CODE,
82
82
  readActionGate,
83
83
  readCommandActionGatePayload
84
- } from "./chunk-ZTRZ2O5B.js";
85
- import {
86
- createThinkParserState,
87
- flushThinkParser,
88
- processThinkChunk
89
- } from "./chunk-LSFAWXKC.js";
84
+ } from "./chunk-GSINCD4P.js";
90
85
  import {
91
86
  resolvePlatformAuthToken,
92
87
  resolvePlatformChatCompletionsEndpoint
93
- } from "./chunk-LJIJWXIT.js";
88
+ } from "./chunk-6EVITP2G.js";
94
89
  import {
95
90
  DEFAULT_CONTEXT_WINDOW,
96
91
  getModelContextWindow
97
- } from "./chunk-4IF3B7WC.js";
92
+ } from "./chunk-4L2OJPCU.js";
98
93
  import {
99
94
  clipCompactText
100
95
  } from "./chunk-5MMAK75Q.js";
101
96
  import {
102
97
  findModelConfig
103
- } from "./chunk-5BP2BROQ.js";
98
+ } from "./chunk-66X4VSRC.js";
104
99
  import {
105
100
  buildMemoryOverlayLayer,
106
101
  buildMemoryUseGuidanceLayer
@@ -1611,8 +1606,161 @@ function createRenderAwareStreamWriter(args) {
1611
1606
  }
1612
1607
  };
1613
1608
  }
1614
- function formatAssistantTextForCli(text) {
1615
- return text.replace(/\u003cthink\u003e[\s\S]*?\u003c\/think\u003e\s*/gi, "").replace(/\n{3,}/g, "\n\n").trim();
1609
+
1610
+ // packages/cli/client/thinkingOutput.ts
1611
+ var THINK_OPEN = /<think>/i;
1612
+ var THINK_CLOSE = /<\/think>/i;
1613
+ var COLLAPSED_MARKER = /^\s*▸ 思考已折叠\s*$/;
1614
+ function normalizeThinkingDisplayMode(raw, fallback = "hide") {
1615
+ const normalized = asTrimmedLowercaseString(raw);
1616
+ if (normalized === "hide" || normalized === "off" || normalized === "false" || normalized === "0") {
1617
+ return "hide";
1618
+ }
1619
+ if (normalized === "marker" || normalized === "collapsed" || normalized === "fold") {
1620
+ return "marker";
1621
+ }
1622
+ if (normalized === "show" || normalized === "on" || normalized === "true" || normalized === "1") {
1623
+ return "show";
1624
+ }
1625
+ return fallback;
1626
+ }
1627
+ function resolveThinkingDisplayMode(env = process.env) {
1628
+ return normalizeThinkingDisplayMode(env.NOLO_CLI_THINKING ?? env.NOLO_THINKING, "hide");
1629
+ }
1630
+ function collapseThinkingBlocks(text, mode = "hide") {
1631
+ if (mode === "show") return text;
1632
+ const replacement = mode === "marker" ? "\u25B8 \u601D\u8003\u5DF2\u6298\u53E0\n" : "";
1633
+ return text.replace(/<think>[\s\S]*?<\/think>\s*/gi, replacement).replace(/\n{3,}/g, "\n\n").trim();
1634
+ }
1635
+ function stripCollapsedThinkingMarkers(text) {
1636
+ return text.split("\n").filter((line) => !COLLAPSED_MARKER.test(line)).join("\n").replace(/\n{2,}/g, "\n").trim();
1637
+ }
1638
+ function formatAssistantTextForCli(text, mode = "hide") {
1639
+ const collapsed = collapseThinkingBlocks(text, mode);
1640
+ return mode === "hide" ? stripCollapsedThinkingMarkers(collapsed) : collapsed;
1641
+ }
1642
+ function createThinkingEventSink(arg1, arg2) {
1643
+ let mode = "hide";
1644
+ let write = () => {
1645
+ };
1646
+ if (typeof arg1 === "function") {
1647
+ write = arg1;
1648
+ if (typeof arg2 === "string") {
1649
+ mode = arg2;
1650
+ }
1651
+ } else {
1652
+ mode = arg1;
1653
+ if (typeof arg2 === "function") {
1654
+ write = arg2;
1655
+ }
1656
+ }
1657
+ if (mode === "hide") {
1658
+ return {
1659
+ push(_chunk) {
1660
+ }
1661
+ };
1662
+ }
1663
+ if (mode === "show") {
1664
+ return {
1665
+ push(chunk) {
1666
+ if (chunk) write(chunk);
1667
+ }
1668
+ };
1669
+ }
1670
+ let markerEmitted = false;
1671
+ return {
1672
+ push(chunk) {
1673
+ if (!chunk || markerEmitted) return;
1674
+ write("\n\u25B8 \u601D\u8003\u5DF2\u6298\u53E0\n");
1675
+ markerEmitted = true;
1676
+ }
1677
+ };
1678
+ }
1679
+ function createThinkingAwareStreamFilter(write, mode = "hide") {
1680
+ if (mode === "show") {
1681
+ return {
1682
+ push(chunk) {
1683
+ write(chunk);
1684
+ },
1685
+ flush() {
1686
+ }
1687
+ };
1688
+ }
1689
+ let pending = "";
1690
+ let insideThink = false;
1691
+ let markerEmitted = false;
1692
+ const emit = (chunk) => {
1693
+ if (chunk) write(chunk);
1694
+ };
1695
+ const emitMarker = () => {
1696
+ if (mode !== "marker" || markerEmitted) return;
1697
+ emit("\n\u25B8 \u601D\u8003\u5DF2\u6298\u53E0\n");
1698
+ markerEmitted = true;
1699
+ };
1700
+ const consume = (input) => {
1701
+ pending += input;
1702
+ while (pending.length > 0) {
1703
+ if (insideThink) {
1704
+ const closeMatch = pending.match(THINK_CLOSE);
1705
+ if (!closeMatch || closeMatch.index == null) {
1706
+ emitMarker();
1707
+ pending = "";
1708
+ return;
1709
+ }
1710
+ emitMarker();
1711
+ pending = pending.slice(closeMatch.index + closeMatch[0].length);
1712
+ insideThink = false;
1713
+ markerEmitted = false;
1714
+ continue;
1715
+ }
1716
+ const openMatch = pending.match(THINK_OPEN);
1717
+ if (!openMatch || openMatch.index == null) {
1718
+ const nextMarker = pending.indexOf("<");
1719
+ if (nextMarker === -1) {
1720
+ const cleaned = mode === "hide" ? pending.split("\n").filter((line) => !COLLAPSED_MARKER.test(line)).join("\n") : pending;
1721
+ emit(cleaned);
1722
+ pending = "";
1723
+ return;
1724
+ }
1725
+ if (nextMarker > 0) {
1726
+ const head = pending.slice(0, nextMarker);
1727
+ const cleaned = mode === "hide" ? head.split("\n").filter((line) => !COLLAPSED_MARKER.test(line)).join("\n") : head;
1728
+ emit(cleaned);
1729
+ pending = pending.slice(nextMarker);
1730
+ continue;
1731
+ }
1732
+ if (pending.length < 7) return;
1733
+ emit(pending[0]);
1734
+ pending = pending.slice(1);
1735
+ continue;
1736
+ }
1737
+ if (openMatch.index > 0) {
1738
+ const head = pending.slice(0, openMatch.index);
1739
+ const cleaned = mode === "hide" ? head.split("\n").filter((line) => !COLLAPSED_MARKER.test(line)).join("\n") : head;
1740
+ emit(cleaned);
1741
+ pending = pending.slice(openMatch.index);
1742
+ continue;
1743
+ }
1744
+ pending = pending.slice(openMatch[0].length);
1745
+ insideThink = true;
1746
+ markerEmitted = false;
1747
+ }
1748
+ };
1749
+ return {
1750
+ push(chunk) {
1751
+ consume(chunk);
1752
+ },
1753
+ flush() {
1754
+ if (insideThink) emitMarker();
1755
+ if (pending) {
1756
+ const cleaned = mode === "hide" ? pending.split("\n").filter((line) => !COLLAPSED_MARKER.test(line)).join("\n") : pending;
1757
+ emit(cleaned);
1758
+ }
1759
+ pending = "";
1760
+ insideThink = false;
1761
+ markerEmitted = false;
1762
+ }
1763
+ };
1616
1764
  }
1617
1765
 
1618
1766
  // packages/cli/client/formatReadPathTree.ts
@@ -2913,11 +3061,6 @@ function formatElapsed(totalSeconds) {
2913
3061
  const mins = minutes % 60;
2914
3062
  return `${hours}h ${mins}m`;
2915
3063
  }
2916
- function truncateThinkingHint(text, maxLen) {
2917
- const cleaned = text.replace(/\n/g, " ").trim();
2918
- if (cleaned.length <= maxLen) return cleaned;
2919
- return "\u2026" + cleaned.slice(cleaned.length - maxLen + 1);
2920
- }
2921
3064
  var Spinner = class {
2922
3065
  constructor(output, text, silent = false) {
2923
3066
  this.output = output;
@@ -2931,7 +3074,6 @@ var Spinner = class {
2931
3074
  frameIndex = 0;
2932
3075
  frames = ["\xB7", "~", "\u2248", "\u223F", "\u2248", "~"];
2933
3076
  isTTY;
2934
- thinkingHint = "";
2935
3077
  start() {
2936
3078
  if (this.silent) {
2937
3079
  this.startTime = Date.now();
@@ -2967,11 +3109,9 @@ ${this.text}
2967
3109
  this.output.write("\r\x1B[K");
2968
3110
  this.output.write("\x1B[?25h");
2969
3111
  }
2970
- this.thinkingHint = "";
2971
3112
  }
2972
3113
  show(text) {
2973
3114
  this.text = text;
2974
- this.thinkingHint = "";
2975
3115
  if (this.silent) {
2976
3116
  if (!this.startTime) {
2977
3117
  this.startTime = Date.now();
@@ -2987,30 +3127,20 @@ ${this.text}
2987
3127
  this.startTime = Date.now();
2988
3128
  this.output.write(`\r${this.renderLine(this.frames[0])}`);
2989
3129
  }
2990
- /**
2991
- * Update the thinking hint displayed on the spinner line. The hint is
2992
- * truncated to a reasonable length and shown as part of the spinner text.
2993
- * Only meaningful while the spinner is active (TTY mode).
2994
- */
2995
- setThinkingHint(text) {
2996
- this.thinkingHint = text;
2997
- if (this.silent || !this.isTTY || !this.timer) return;
2998
- this.output.write(`\r${this.renderLine(this.frames[this.frameIndex])}`);
2999
- }
3000
3130
  renderLine(frame) {
3001
3131
  const elapsedSeconds = Math.max(
3002
3132
  0,
3003
3133
  Math.floor((Date.now() - this.startTime) / 1e3)
3004
3134
  );
3005
- const thinkingPart = this.thinkingHint ? `: ${truncateThinkingHint(this.thinkingHint, 60)}` : "";
3006
- return `${themeColorSequence("accent")}${frame}\x1B[39m ${this.text}${thinkingPart} (${formatElapsed(elapsedSeconds)})`;
3135
+ return `${themeColorSequence("accent")}${frame}\x1B[39m ${this.text} (${formatElapsed(elapsedSeconds)})`;
3007
3136
  }
3008
3137
  };
3009
3138
 
3010
3139
  // packages/cli/client/agentRunOutput.ts
3011
- function formatAssistantResponseForCli(text) {
3140
+ function formatAssistantResponseForCli(text, options) {
3141
+ const thinkingMode = resolveThinkingDisplayMode(options.env);
3012
3142
  return formatAssistantDisplay(
3013
- formatAssistantTextForCli(text)
3143
+ formatAssistantTextForCli(text, thinkingMode)
3014
3144
  );
3015
3145
  }
3016
3146
  function resolveAgentEventMode(options) {
@@ -3043,19 +3173,12 @@ function createCliTurnOutput(params) {
3043
3173
  let streamedAssistantText = false;
3044
3174
  let everStreamedAnyText = false;
3045
3175
  let printedAssistantLabel = false;
3046
- let thinkState = createThinkParserState();
3176
+ const thinkingMode = resolveThinkingDisplayMode(options.env);
3047
3177
  const renderWriter = createRenderAwareStreamWriter({
3048
3178
  write: (chunk) => options.output.write(chunk)
3049
3179
  });
3050
3180
  const writeVisibleAssistantChunk = (chunk) => {
3051
3181
  if (!chunk) return;
3052
- const parsed = processThinkChunk(chunk, thinkState);
3053
- thinkState = parsed.state;
3054
- if (!parsed.content && !parsed.reasoning) return;
3055
- if (parsed.reasoning) {
3056
- spinner.setThinkingHint(parsed.reasoning);
3057
- }
3058
- if (!parsed.content) return;
3059
3182
  spinner.stop();
3060
3183
  options.activityReporter?.(null);
3061
3184
  if (!printedAssistantLabel) {
@@ -3065,8 +3188,17 @@ ${options.agentName} > `);
3065
3188
  }
3066
3189
  streamedAssistantText = true;
3067
3190
  everStreamedAnyText = true;
3068
- renderWriter.push(parsed.content);
3191
+ renderWriter.push(chunk);
3069
3192
  };
3193
+ const thinkingFilter = createThinkingAwareStreamFilter(
3194
+ writeVisibleAssistantChunk,
3195
+ thinkingMode
3196
+ );
3197
+ const thinkingSink = createThinkingEventSink((chunk) => {
3198
+ spinner.stop();
3199
+ options.activityReporter?.(null);
3200
+ options.output.write(chunk);
3201
+ }, thinkingMode);
3070
3202
  const handleToolEvent = (event) => {
3071
3203
  if (!traceLocalTools) return;
3072
3204
  const chunk = eventMode === "jsonl" ? formatToolJsonEvent(event) : formatToolEvent(event);
@@ -3075,6 +3207,7 @@ ${options.agentName} > `);
3075
3207
  return;
3076
3208
  }
3077
3209
  if (event.type === "tool-call") {
3210
+ thinkingFilter.flush();
3078
3211
  renderWriter.flush();
3079
3212
  }
3080
3213
  spinner.stop();
@@ -3100,14 +3233,21 @@ ${options.agentName} > `);
3100
3233
  };
3101
3234
  return {
3102
3235
  spinner,
3236
+ thinkingMode,
3103
3237
  toolDisplayMode,
3104
3238
  traceLocalTools,
3105
3239
  eventMode,
3106
3240
  pushText(chunk) {
3107
- writeVisibleAssistantChunk(chunk);
3241
+ if (eventMode !== "jsonl" && formatToolEvent.flush) {
3242
+ const pendingToolOutput = formatToolEvent.flush();
3243
+ if (pendingToolOutput) {
3244
+ options.output.write(pendingToolOutput);
3245
+ }
3246
+ }
3247
+ thinkingFilter.push(chunk);
3108
3248
  },
3109
3249
  pushThinking(chunk) {
3110
- spinner.setThinkingHint(chunk);
3250
+ thinkingSink.push(chunk);
3111
3251
  },
3112
3252
  handleToolEvent,
3113
3253
  showWorking(label) {
@@ -3118,22 +3258,19 @@ ${options.agentName} > `);
3118
3258
  finish(fallbackContent) {
3119
3259
  spinner.stop();
3120
3260
  options.activityReporter?.(null);
3121
- const flushedThink = flushThinkParser(thinkState);
3122
- thinkState = flushedThink.state;
3123
- if (flushedThink.content) {
3124
- writeVisibleAssistantChunk(flushedThink.content);
3125
- }
3126
3261
  const pendingToolOutput = formatToolEvent.flush ? formatToolEvent.flush() : "";
3127
3262
  if (pendingToolOutput) {
3128
3263
  options.output.write(pendingToolOutput);
3129
3264
  }
3130
3265
  if (streamedAssistantText) {
3266
+ thinkingFilter.flush();
3131
3267
  renderWriter.flush();
3132
3268
  options.output.write("\n");
3133
3269
  } else if (everStreamedAnyText) {
3270
+ thinkingFilter.flush();
3134
3271
  options.output.write("\n");
3135
3272
  } else {
3136
- const content = fallbackContent ? formatAssistantResponseForCli(fallbackContent.trim()) : "";
3273
+ const content = fallbackContent ? formatAssistantResponseForCli(fallbackContent.trim(), options) : "";
3137
3274
  if (content) {
3138
3275
  options.output.write(`
3139
3276
  ${options.agentName} > ${content}
@@ -3558,7 +3695,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
3558
3695
  // packages/cli/client/agentRun.ts
3559
3696
  import { ulid } from "ulid";
3560
3697
  async function loadRunLocalAgentTurn() {
3561
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-N56G2ZJK.js");
3698
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QNPNJRVH.js");
3562
3699
  return runLocalAgentTurn;
3563
3700
  }
3564
3701
  async function resolveCurrentMachineId(options) {
@@ -3835,6 +3972,7 @@ async function runHttpAgentTurn(options, authToken) {
3835
3972
  ...options.inheritedFromDialogKey ? { inheritedFromDialogKey: options.inheritedFromDialogKey } : {},
3836
3973
  ...options.parentDialogId ? { parentDialogId: options.parentDialogId } : {},
3837
3974
  ...options.background ? { background: true } : {},
3975
+ ...options.ephemeral ? { ephemeral: true } : {},
3838
3976
  ...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {},
3839
3977
  ...options.modelOverride ? { runtimeOptions: { quickChatModelOverride: options.modelOverride } } : {},
3840
3978
  ...serverContextBlockScopes ? { contextBlockScopes: serverContextBlockScopes } : {},
@@ -3925,7 +4063,8 @@ async function runHttpAgentTurn(options, authToken) {
3925
4063
  return dialogIdText ? { exitCode: 1, dialogId: dialogIdText } : { exitCode: 1 };
3926
4064
  }
3927
4065
  const content = formatAssistantResponseForCli(
3928
- String(data?.content ?? data?.message ?? "")
4066
+ String(data?.content ?? data?.message ?? ""),
4067
+ options
3929
4068
  );
3930
4069
  if (content) {
3931
4070
  options.output.write(`
@@ -3994,7 +4133,7 @@ async function runLocalAgentTurnForCli(options, settings) {
3994
4133
  } : void 0;
3995
4134
  const currentDialogId = options.continueDialogId ?? ulid();
3996
4135
  const runChildTurn = async (input) => {
3997
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-N56G2ZJK.js");
4136
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QNPNJRVH.js");
3998
4137
  return runLocalAgentTurn(input);
3999
4138
  };
4000
4139
  const createFreshChildBaseAdapter = () => {
@@ -4196,11 +4335,6 @@ async function runAgentTurn(options) {
4196
4335
  );
4197
4336
  return { exitCode: 1 };
4198
4337
  }
4199
- if (options.ephemeral) {
4200
- options.output.write(
4201
- "[nolo] --ephemeral/--memory-only is only effective with the local runtime (--local); the server stores dialogs on its own and cannot run memory-only.\n"
4202
- );
4203
- }
4204
4338
  return runHttpAgentTurn(options, authToken);
4205
4339
  }
4206
4340
 
@@ -5349,6 +5483,7 @@ export {
5349
5483
  themeColorSequence,
5350
5484
  themeText,
5351
5485
  formatAssistantDisplay,
5486
+ normalizeThinkingDisplayMode,
5352
5487
  normalizeToolDisplayMode,
5353
5488
  COLLAPSED_PASTE_PLACEHOLDER_RE,
5354
5489
  shouldCollapsePaste,
@@ -2,28 +2,24 @@ import {
2
2
  accumulateToolCallDelta,
3
3
  extractThinkContent,
4
4
  flushThinkParser,
5
- flushToolCallTextParserIntoCallback,
6
- processContentChunkWithToolCallStripping,
7
5
  processThinkChunk
8
- } from "./chunk-LSFAWXKC.js";
6
+ } from "./chunk-3WGLLTK4.js";
9
7
  import {
8
+ buildProviderExecutionPlan,
9
+ canUsePlatformChatProvider,
10
10
  convertMessagesToResponsesInput,
11
11
  extractTextFromResponseOutput,
12
12
  extractToolCallsFromResponseOutput,
13
- hasImageParts,
14
- shouldStripReasoningContentForOutbound,
15
- toOpenAiCompatibleMessages,
16
- toResponsesTools
17
- } from "./chunk-KFEVY3ST.js";
18
- import {
19
- buildProviderExecutionPlan,
20
- canUsePlatformChatProvider,
21
13
  hasDirectOpenAiCompatibleProvider,
14
+ hasImageParts,
22
15
  resolveAgentRuntimeLocation,
23
16
  resolvePlatformAuthToken,
24
17
  resolvePlatformServerUrl,
25
- resolveProviderTransportDecision
26
- } from "./chunk-LJIJWXIT.js";
18
+ resolveProviderTransportDecision,
19
+ shouldStripReasoningContentForOutbound,
20
+ toOpenAiCompatibleMessages,
21
+ toResponsesTools
22
+ } from "./chunk-6EVITP2G.js";
27
23
  import {
28
24
  clipCompactText
29
25
  } from "./chunk-5MMAK75Q.js";
@@ -108,16 +104,7 @@ function applyChatCompletionDelta(parsed, state) {
108
104
  }
109
105
  const textChunk = typeof delta.content === "string" ? delta.content : "";
110
106
  if (textChunk) {
111
- const { cleanedContent, state: newState } = processContentChunkWithToolCallStripping(
112
- textChunk,
113
- state.toolCallTextState,
114
- (name, arguments_) => accumulateToolCallDelta(state.accumulatedToolCalls, [
115
- { index: state.accumulatedToolCalls.slots.length, type: "function", function: { name, arguments: arguments_ } }
116
- ])
117
- );
118
- state.toolCallTextState = newState;
119
- if (!cleanedContent) return true;
120
- const parsedChunk = processThinkChunk(cleanedContent, state.thinkState);
107
+ const parsedChunk = processThinkChunk(textChunk, state.thinkState);
121
108
  state.thinkState = parsedChunk.state;
122
109
  if (parsedChunk.content) {
123
110
  state.content += parsedChunk.content;
@@ -131,19 +118,11 @@ function applyChatCompletionDelta(parsed, state) {
131
118
  return true;
132
119
  }
133
120
  function flushChatCompletionStream(state) {
134
- const { residualContent, state: tcState } = flushToolCallTextParserIntoCallback(
135
- state.toolCallTextState,
136
- (name, arguments_) => accumulateToolCallDelta(state.accumulatedToolCalls, [
137
- { index: state.accumulatedToolCalls.slots.length, type: "function", function: { name, arguments: arguments_ } }
138
- ])
139
- );
140
- state.toolCallTextState = tcState;
141
121
  const flushed = flushThinkParser(state.thinkState);
142
122
  state.thinkState = flushed.state;
143
- const combinedContent = residualContent + (flushed.content ?? "");
144
- if (combinedContent) {
145
- state.content += combinedContent;
146
- state.onTextDelta?.(combinedContent);
123
+ if (flushed.content) {
124
+ state.content += flushed.content;
125
+ state.onTextDelta?.(flushed.content);
147
126
  }
148
127
  if (flushed.reasoning) {
149
128
  state.reasoning += flushed.reasoning;
@@ -301,9 +280,6 @@ function buildPlatformChatCompletionRequest(args) {
301
280
  }
302
281
  };
303
282
  }
304
- function resolveLegacyDeepSeekProxyChatFallback(args) {
305
- return void 0;
306
- }
307
283
  function tryParseJson(raw) {
308
284
  try {
309
285
  return JSON.parse(raw);
@@ -416,7 +392,6 @@ export {
416
392
  readSseDataValues,
417
393
  resolvePlatformChatProviderConfig,
418
394
  buildPlatformChatCompletionRequest,
419
- resolveLegacyDeepSeekProxyChatFallback,
420
395
  parsePlatformChatCompletionData,
421
396
  parsePlatformChatCompletionResponse,
422
397
  canUsePlatformChatProvider2 as canUsePlatformChatProvider,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-AKYTMRBP.js";
4
+ } from "./chunk-NVEWUJVX.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-FJHD7FHN.js";
7
+ } from "./chunk-PCTUYVUM.js";
8
8
  import {
9
9
  toSafeAgentSummary
10
- } from "./chunk-OIX36K6R.js";
10
+ } from "./chunk-3OIRVWXA.js";
11
11
 
12
12
  // packages/cli/agentListHelpers.ts
13
13
  function parseAgentRecordId(privateKey, explicitId) {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-UVLYZNDL.js";
4
+ } from "./chunk-DPAB4FQ7.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-HNLGEZZC.js";
7
+ } from "./chunk-ZQBL7LIC.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-ZTRZ2O5B.js";
10
+ } from "./chunk-GSINCD4P.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
13
  } from "./chunk-5CS33IBL.js";