nolo-cli 0.16.0-alpha.9 → 0.17.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 (127) hide show
  1. package/{_executeModel-ABTND4KZ.js → _executeModel-WPNX5DH4.js} +46 -41
  2. package/{action-F5JACQBG.js → action-LT7BRFLK.js} +10 -9
  3. package/{addContentAction-AQXEYRBE.js → addContentAction-PL3KKBDH.js} +9 -8
  4. package/{addDialogAgentAction-EJHHJZWW.js → addDialogAgentAction-FCMSKYAF.js} +8 -7
  5. package/{agentDeleteCommand-ARMAV46L.js → agentDeleteCommand-L3357EFL.js} +28 -26
  6. package/{agentEmailCommands-BKPZP4UP.js → agentEmailCommands-N65AVLEI.js} +58 -53
  7. package/{agentListCommands-5J7RRXUO.js → agentListCommands-CH27FTI2.js} +27 -25
  8. package/{agentMachineCommands-VXWJXXPF.js → agentMachineCommands-PPK5HJZB.js} +26 -24
  9. package/{agentPullCommand-6HWUT3SW.js → agentPullCommand-ZZGU5KOY.js} +4 -4
  10. package/{agentRecordCommands-INDJINPN.js → agentRecordCommands-HTVXD4TT.js} +53 -48
  11. package/{agentRunCommand-KBN6HBY4.js → agentRunCommand-MGLVJUA5.js} +59 -51
  12. package/{agentRunControl-6ADXVYMR.js → agentRunControl-P75VPTGS.js} +24 -1
  13. package/{agentRuntimeLocal-AH2RYWGP.js → agentRuntimeLocal-QUTBSY3I.js} +22 -20
  14. package/{agentSlice-R4PELU57.js → agentSlice-DOGRCMWK.js} +9 -8
  15. package/{appDeleteCommands-FRWMPQNS.js → appDeleteCommands-FEEVXUBG.js} +25 -23
  16. package/{appDeployCommands-IRF3T35Z.js → appDeployCommands-C4HCGC4B.js} +25 -23
  17. package/{appDeployStatusCommands-ADFERYPU.js → appDeployStatusCommands-IR5ZUZBQ.js} +25 -23
  18. package/{appGetCommands-FTEOXWMS.js → appGetCommands-6RJGZ66Z.js} +25 -23
  19. package/{appListCommands-WBY7UWYD.js → appListCommands-VMTF5YZF.js} +25 -23
  20. package/{authCommand-QU5BXRBH.js → authCommand-WJZPOLSS.js} +13 -12
  21. package/{authCommands-YXGOXNBZ.js → authCommands-XTBV7OFZ.js} +6 -5
  22. package/{chunk-XPC5C7BK.js → chunk-3ND52WIL.js} +2 -2
  23. package/{chunk-SOTZ6RDN.js → chunk-3Q7WHGCB.js} +1 -1
  24. package/{chunk-WVDAUR2S.js → chunk-45BY7RLP.js} +2 -8
  25. package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
  26. package/{chunk-6N4KODMN.js → chunk-4T5F7YZQ.js} +1 -1
  27. package/chunk-7BUYEZ6U.js +671 -0
  28. package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
  29. package/{chunk-4N7QA72L.js → chunk-AAODAAUQ.js} +1 -1
  30. package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
  31. package/{chunk-MTU75CZ2.js → chunk-B5TOXZAK.js} +1 -1
  32. package/{chunk-VK2HVKAO.js → chunk-BT6K76S7.js} +192 -249
  33. package/{chunk-G63IH3ZK.js → chunk-CEFXYF66.js} +1 -1
  34. package/{chunk-RLCXU7A5.js → chunk-D3HVJJIA.js} +1 -1
  35. package/{chunk-B4KT7RN2.js → chunk-DKZFOK24.js} +18 -89
  36. package/chunk-DL6EPNIK.js +50 -0
  37. package/{chunk-OELQ67TN.js → chunk-EGPCU42M.js} +57 -7
  38. package/{chunk-IWLUTMYX.js → chunk-ELT65PZW.js} +2 -2
  39. package/chunk-FKXFCYVO.js +221 -0
  40. package/{chunk-5Y5KEB7V.js → chunk-FPKLD4KB.js} +4 -4
  41. package/{chunk-FMYTM25W.js → chunk-FVIPEIVX.js} +10 -3
  42. package/{chunk-66X4VSRC.js → chunk-HQPG2PIV.js} +41 -1
  43. package/{chunk-ZPPTWRPT.js → chunk-HV2A3B4W.js} +1 -1
  44. package/{chunk-ASZ2C44S.js → chunk-IOOMJJ4Z.js} +1 -1
  45. package/{setDialogExtraReferencesAction-LR6MSIXO.js → chunk-JLA4FXYC.js} +2 -17
  46. package/{chunk-IFPY2BIE.js → chunk-JP7REMYP.js} +18 -0
  47. package/{chunk-R6ALN5F5.js → chunk-L2MLZQXU.js} +3 -3
  48. package/{chunk-HSLJ7QER.js → chunk-L6NVTGI7.js} +1 -1
  49. package/{chunk-BHVBFI6B.js → chunk-MD3V54DA.js} +6 -6
  50. package/{chunk-ZVDRAEZL.js → chunk-MUCU6ATG.js} +1 -1
  51. package/{chunk-KFHN5NGJ.js → chunk-MVQ4TBSD.js} +1 -1
  52. package/{chunk-7HECYFOI.js → chunk-NEKFSXOP.js} +316 -212
  53. package/{chunk-LSHKV3S7.js → chunk-NVB267BZ.js} +397 -324
  54. package/{chunk-SGRDLYRZ.js → chunk-NYUXSXLY.js} +33 -14
  55. package/{chunk-PEDT43JF.js → chunk-PZCBZO4J.js} +2 -2
  56. package/{chunk-LZYEWFPK.js → chunk-QCJITMYO.js} +16 -10
  57. package/{chunk-OOSFSFMA.js → chunk-R5V5G73M.js} +2 -0
  58. package/{chunk-QLWU2KOT.js → chunk-RG2U2MTJ.js} +1 -1
  59. package/{chunk-2XA3QGOH.js → chunk-RRGVDPH3.js} +3 -3
  60. package/{chunk-EABWT43X.js → chunk-RVOUXDFU.js} +5 -5
  61. package/{chunk-JTINRTBT.js → chunk-SKDNBYZK.js} +2 -2
  62. package/{chunk-BG7AP3Q7.js → chunk-SNZV4QCE.js} +34 -18
  63. package/{chunk-KMQPSTMJ.js → chunk-TRT4I4UD.js} +2 -2
  64. package/{chunk-MYMMNKYL.js → chunk-TSIYZBTH.js} +156 -6
  65. package/{chunk-J3VQSU5W.js → chunk-UB4RYYNQ.js} +1 -1
  66. package/{chunk-YJKXGHJ6.js → chunk-UGUW3FHG.js} +4 -4
  67. package/{chunk-XECKIDGJ.js → chunk-UZY4BEBR.js} +938 -91
  68. package/chunk-V5R4NZP2.js +78 -0
  69. package/{chunk-GWESD7AS.js → chunk-VDNQF5VI.js} +6 -6
  70. package/{chunk-ZVC2PCZN.js → chunk-VGMJ6PDJ.js} +5 -5
  71. package/{chunk-W4NVOSFF.js → chunk-WFHXMLHZ.js} +1 -1
  72. package/{chunk-H33743XH.js → chunk-WJRJDX2W.js} +1 -1
  73. package/chunk-X4Q4UZEY.js +26 -0
  74. package/{chunk-RPDGJO4D.js → chunk-XHG22OEX.js} +4 -4
  75. package/{chunk-DVRHHFEA.js → chunk-XMLRJUU5.js} +1 -1
  76. package/{chunk-3S2VOMIF.js → chunk-XRZJGPFI.js} +7 -7
  77. package/{chunk-AFNJWHKL.js → chunk-YLRTBX4Y.js} +26 -14
  78. package/{chunk-4EME3YTO.js → chunk-YXTRNO5W.js} +3 -3
  79. package/{chunk-VAT72PDP.js → chunk-ZJZCMKOR.js} +103 -174
  80. package/{chunk-F6JSVFHX.js → chunk-ZVOZH2HW.js} +1 -1
  81. package/chunk-ZZ2MH7LE.js +84 -0
  82. package/{cliExecutor-K3F7DMRO.js → cliExecutor-DNE7TCC4.js} +2 -2
  83. package/codingSkills-36KN5NQT.js +48 -0
  84. package/{createAgentAutomationAction-3KKRAYGE.js → createAgentAutomationAction-PMOLEPGJ.js} +18 -17
  85. package/{createDialogAction-S7NMQ4TZ.js → createDialogAction-DPRTYNAK.js} +20 -19
  86. package/{createPageAction-2EFBT4LQ.js → createPageAction-JGZK3WAM.js} +24 -23
  87. package/{dbSlice-7KQH6GOU.js → dbSlice-CGSRFJN3.js} +8 -7
  88. package/{deleteFile-WPWVZE4B.js → deleteFile-WDZ3VM7B.js} +3 -3
  89. package/{dialogCommands-J7XFIQRD.js → dialogCommands-XED6DKLV.js} +26 -24
  90. package/{dialogSlice-LNRRBUIC.js → dialogSlice-KO4NRNKC.js} +18 -17
  91. package/{docCreateCommands-MKO5WB34.js → docCreateCommands-P6DYWHH3.js} +24 -22
  92. package/{docDeleteCommands-RCBHRKUE.js → docDeleteCommands-KUWXAMSN.js} +25 -23
  93. package/{docReadCommands-66527P4G.js → docReadCommands-ECW55TKB.js} +24 -22
  94. package/{docStore-67MYPX7P.js → docStore-6KMERNUY.js} +19 -18
  95. package/{docUpdateCommands-UT5HSLOJ.js → docUpdateCommands-5J4BTJQN.js} +24 -22
  96. package/{fetchMessages-KTNM7QAR.js → fetchMessages-BMGVZVSE.js} +4 -3
  97. package/{getPricing-P4XRJRZB.js → getPricing-RYY6OBA4.js} +2 -2
  98. package/{handleSendMessageAction-VZ7226PB.js → handleSendMessageAction-R3ZHTVU4.js} +19 -18
  99. package/index.js +68 -68
  100. package/{localDialogRead-2VRI24F4.js → localDialogRead-HQZPVIE3.js} +1 -1
  101. package/{localRuntimeDb-LGDF6FQP.js → localRuntimeDb-THJZGAOJ.js} +1 -1
  102. package/{machineCommands-ATA7OSBJ.js → machineCommands-JF2YL34J.js} +59 -54
  103. package/{machineWsRunDispatch-ZDCZ645H.js → machineWsRunDispatch-ON4AEOJL.js} +51 -46
  104. package/package.json +1 -1
  105. package/queryRunOverlay-O4LOMMPO.js +161 -0
  106. package/{read-CN3TNXIP.js → read-3FMPZPER.js} +3 -3
  107. package/{readDocTool-WF3675ED.js → readDocTool-VSYHKK3V.js} +1 -1
  108. package/{readlineWorkspace-UUNABTLB.js → readlineWorkspace-SUCINTL7.js} +302 -134
  109. package/{removeDialogAgentAction-YDHBFEGI.js → removeDialogAgentAction-OAGA2G3U.js} +10 -9
  110. package/{runAgentClientLoop-2A577WBM.js → runAgentClientLoop-OBD2AVEL.js} +41 -36
  111. package/runOverlayPresentation-ZO4VCWEU.js +11 -0
  112. package/{runtimeDoctorCommands-THIHX2SY.js → runtimeDoctorCommands-E2OUORHK.js} +6 -6
  113. package/setDialogExtraReferencesAction-JZEXA5SL.js +27 -0
  114. package/{setPrimaryDialogAgentAction-IIVDCY5C.js → setPrimaryDialogAgentAction-4ZUQQKDG.js} +26 -17
  115. package/{settingSlice-O23YDK2O.js → settingSlice-7MNKHZ6R.js} +9 -8
  116. package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
  117. package/{spaceCommands-UNZVR2OS.js → spaceCommands-32NTNLHS.js} +27 -25
  118. package/{spaceSlice-MC7FYPMZ.js → spaceSlice-P7VOXLY6.js} +18 -17
  119. package/{streamAgentChatTurn-IEKPNM33.js → streamAgentChatTurn-UHEMNI3X.js} +91 -48
  120. package/{tableCommands-3P7MJ3PF.js → tableCommands-BEQAGE4I.js} +1 -1
  121. package/{tools-E6FHKTCF.js → tools-BMXIXHMB.js} +31 -26
  122. package/{tuiSummaryLlmCaller-QHPDD4WP.js → tuiSummaryLlmCaller-VUNVBRX3.js} +3 -3
  123. package/types-ZSTJ7MPR.js +7 -0
  124. package/{updateDialogTitleAction-SQJEEW2K.js → updateDialogTitleAction-LJBDYZLH.js} +21 -20
  125. package/{chunk-O4BU24WZ.js → chunk-6Y7A3OQQ.js} +3 -3
  126. package/{chunk-CMKUBIGW.js → chunk-X7W4TNB4.js} +3 -3
  127. package/{localRuntimeAuthority-TEGCOWX4.js → localRuntimeAuthority-4IXJCHZ7.js} +3 -3
@@ -8,27 +8,24 @@ import {
8
8
  writeUsage
9
9
  } from "./chunk-DZ3XJVET.js";
10
10
  import {
11
- resolveMachineId
12
- } from "./chunk-6HYVJV7B.js";
11
+ getReadableCliDb
12
+ } from "./chunk-WFHXMLHZ.js";
13
+ import {
14
+ normalizeAgentHandle,
15
+ readDbRecord,
16
+ resolveAgentRecordFromHybridStore
17
+ } from "./chunk-FVIPEIVX.js";
13
18
  import {
14
19
  agentRunCardLabels,
15
20
  createCliCallAgentToolExecutor,
16
21
  createCliLocalRuntimeAdapter,
17
22
  getCliLocale,
18
23
  isBuiltinNoloAgentRef,
24
+ isQuotaExhaustedError,
25
+ parseAgentRunEvent,
19
26
  t,
20
27
  toolLabel
21
- } from "./chunk-XECKIDGJ.js";
22
- import {
23
- getReadableCliDb
24
- } from "./chunk-W4NVOSFF.js";
25
- import {
26
- readDbRecord,
27
- resolveAgentRecordFromHybridStore
28
- } from "./chunk-FMYTM25W.js";
29
- import {
30
- normalizeAgentHandle
31
- } from "./chunk-WVDAUR2S.js";
28
+ } from "./chunk-UZY4BEBR.js";
32
29
  import {
33
30
  NOLO_PROJECT_MANAGER_AGENT_KEY,
34
31
  isLocalCliAgentKey
@@ -38,41 +35,39 @@ import {
38
35
  buildModelLayerOverride
39
36
  } from "./chunk-LTRXGFMS.js";
40
37
  import {
41
- formatAgentListCard,
42
- formatListRunsCard,
43
- formatNotFoundRunCard,
44
- formatStartRunCard,
45
- formatStatusRunCard,
46
- formatStopRunCard,
47
- isAgentNameFallback,
48
- isAgentRunTerminalStatus,
49
- resolveRunLabel
50
- } from "./chunk-7HECYFOI.js";
38
+ resolveMachineId
39
+ } from "./chunk-6HYVJV7B.js";
40
+ import {
41
+ formatAgentListCard
42
+ } from "./chunk-NEKFSXOP.js";
51
43
  import {
52
44
  isGatewayHttpStatus
53
45
  } from "./chunk-RQSOAMPJ.js";
46
+ import {
47
+ getDefaultCliLocalRuntimeDb
48
+ } from "./chunk-WJRJDX2W.js";
54
49
  import {
55
50
  buildMemorySubjectsForAgent,
56
51
  chooseMemoryOwners,
57
52
  loadMemoryCandidatesFromDb,
58
53
  resolveAgentMemoryPolicy
59
- } from "./chunk-SGRDLYRZ.js";
60
- import {
61
- parseExternalSkillMarkdown,
62
- parseSkillDocProtocol
63
- } from "./chunk-VC6OZXO5.js";
54
+ } from "./chunk-NYUXSXLY.js";
64
55
  import {
65
56
  API_REPORTED_COST_MULTIPLIER,
66
57
  normalizeUsage,
67
58
  parseUiAskChoiceContent
68
- } from "./chunk-LSHKV3S7.js";
59
+ } from "./chunk-NVB267BZ.js";
69
60
  import {
70
61
  buildSkillDiscoveryContextBlock
71
- } from "./chunk-AS3ZQ3O2.js";
62
+ } from "./chunk-7OBMZCRD.js";
63
+ import {
64
+ parseExternalSkillMarkdown,
65
+ parseSkillDocProtocol
66
+ } from "./chunk-VC6OZXO5.js";
72
67
  import {
73
68
  buildPlatformChatCompletionRequest,
74
69
  parsePlatformChatCompletionData
75
- } from "./chunk-4N7QA72L.js";
70
+ } from "./chunk-AAODAAUQ.js";
76
71
  import {
77
72
  resolveAgentRuntimeConfigFromRecord
78
73
  } from "./chunk-OIQPORYI.js";
@@ -81,7 +76,7 @@ import {
81
76
  LOCAL_TURN_ABORTED_CODE,
82
77
  readActionGate,
83
78
  readCommandActionGatePayload
84
- } from "./chunk-LZYEWFPK.js";
79
+ } from "./chunk-QCJITMYO.js";
85
80
  import {
86
81
  createThinkParserState,
87
82
  flushThinkParser,
@@ -90,21 +85,24 @@ import {
90
85
  import {
91
86
  resolvePlatformAuthToken,
92
87
  resolvePlatformChatCompletionsEndpoint
93
- } from "./chunk-ZVDRAEZL.js";
88
+ } from "./chunk-MUCU6ATG.js";
94
89
  import {
95
90
  DEFAULT_CONTEXT_WINDOW,
96
91
  getModelContextWindow
97
- } from "./chunk-OELQ67TN.js";
92
+ } from "./chunk-EGPCU42M.js";
98
93
  import {
99
94
  clipCompactText
100
95
  } from "./chunk-5MMAK75Q.js";
101
96
  import {
102
97
  findModelConfig
103
- } from "./chunk-66X4VSRC.js";
98
+ } from "./chunk-HQPG2PIV.js";
99
+ import {
100
+ toErrorMessage
101
+ } from "./chunk-HNMXYYJR.js";
104
102
  import {
105
103
  buildMemoryOverlayLayer,
106
104
  buildMemoryUseGuidanceLayer
107
- } from "./chunk-QLUFR47U.js";
105
+ } from "./chunk-AL2V7U3E.js";
108
106
  import {
109
107
  compactWhitespace
110
108
  } from "./chunk-DWLEOOGR.js";
@@ -112,16 +110,20 @@ import {
112
110
  createRunActivityTracker,
113
111
  finalizeRunRecord,
114
112
  spawnLocalBackgroundRun
115
- } from "./chunk-MYMMNKYL.js";
116
- import {
117
- CliProviderQuotaError
118
- } from "./chunk-CMKUBIGW.js";
113
+ } from "./chunk-TSIYZBTH.js";
119
114
  import {
120
- toErrorMessage
121
- } from "./chunk-HNMXYYJR.js";
115
+ formatFinishedRunCard,
116
+ formatListRunsCard,
117
+ formatNotFoundRunCard,
118
+ formatStartRunCard,
119
+ formatStatusRunCard,
120
+ formatStopRunCard,
121
+ isAgentRunTerminalStatus,
122
+ runShowsLogTail
123
+ } from "./chunk-FKXFCYVO.js";
122
124
  import {
123
- getDefaultCliLocalRuntimeDb
124
- } from "./chunk-H33743XH.js";
125
+ CliProviderQuotaError
126
+ } from "./chunk-X7W4TNB4.js";
125
127
  import {
126
128
  readPipeText,
127
129
  spawnProcess
@@ -134,7 +136,7 @@ import {
134
136
  } from "./chunk-Y5GCAMGP.js";
135
137
  import {
136
138
  createMemoryKey
137
- } from "./chunk-O4BU24WZ.js";
139
+ } from "./chunk-6Y7A3OQQ.js";
138
140
  import {
139
141
  asTrimmedLowercaseString
140
142
  } from "./chunk-QSJ3HFEF.js";
@@ -142,7 +144,7 @@ import {
142
144
  BUILTIN_NOLO_AGENT_KEY,
143
145
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
144
146
  PUBLIC_KIMI_K26_IMAGE_AGENT_KEY
145
- } from "./chunk-XPC5C7BK.js";
147
+ } from "./chunk-3ND52WIL.js";
146
148
  import {
147
149
  asTrimmedString
148
150
  } from "./chunk-3EUW3WEO.js";
@@ -196,23 +198,18 @@ function buildQuickChatIntentSystemPrompt(tierAgents) {
196
198
  \u53EF\u9009 agent \u5217\u8868\uFF08agentKey \u4E0E\u63CF\u8FF0\uFF09\uFF1A
197
199
  ${agentList}
198
200
 
199
- \u5224\u65AD\u539F\u5219\uFF08\u9ED8\u8BA4\u504F\u5411\u901A\u7528\u6863\u4F4D\uFF1B\u4E13\u804C agent \u5728\u660E\u786E\u5339\u914D\u65F6\u4F7F\u7528\uFF1B**\u7F16\u7801/\u672C\u5730\u4ED3\u5E93\u4EFB\u52A1\u8D70\u901A\u7528\u6863 + needsWorkspace=true**\uFF09\uFF1A
201
+ \u5224\u65AD\u539F\u5219\uFF08\u9ED8\u8BA4\u504F\u5411\u901A\u7528\u6863\u4F4D\uFF1B\u4E13\u804C agent \u5728\u660E\u786E\u5339\u914D\u65F6\u4F7F\u7528\uFF1B**\u7F16\u7801/\u672C\u5730\u4ED3\u5E93\u4EFB\u52A1\u8D70\u901A\u7528\u6863 balanced/quality**\uFF09\uFF1A
200
202
  - \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C**\u9664\u975E\u7528\u6237\u660E\u786E\u8868\u8FBE\u8981\u5EFA\u5E94\u7528/\u5EFA Agent/\u63D0\u4EA4\u53CD\u9988/\u591A Agent \u7F16\u6392**\uFF0C\u5426\u5219\u9009\u901A\u7528\u6863\u4F4D\uFF08flash/balanced/quality\uFF09\uFF1A
201
203
  - \u7B80\u5355\u95EE\u5019\u3001\u95F2\u804A\u3001\u5FEB\u901F\u95EE\u7B54\u3001\u7FFB\u8BD1\u3001\u77ED\u6587 \u2192 \u9009 flash \u6863
202
204
  - \u9700\u8981\u63A8\u7406\u3001\u5206\u6790\u3001\u4E2D\u7B49\u957F\u5EA6\u5199\u4F5C\u3001\u666E\u901A\u4EE3\u7801\u89E3\u91CA/\u67B6\u6784\u95EE\u7B54 \u2192 \u9009 balanced \u6863
203
205
  - \u590D\u6742\u63A8\u7406\u3001\u957F\u6587\u3001\u67B6\u6784\u8BBE\u8BA1\u3001\u6DF1\u5EA6\u5206\u6790 \u2192 \u9009 quality \u6863
204
- - **\u660E\u786E\u7F16\u7801\u4EFB\u52A1\uFF08\u5B9E\u73B0\u529F\u80FD\u3001\u4FEE bug\u3001refactor\u3001\u5199/\u8865\u6D4B\u8BD5\u3001\u8DD1 build/tests/ci\uFF09\u6216\u67E5\u770B\u672C\u673A\u4ED3\u5E93/\u4EE3\u7801\u72B6\u6001\uFF08git/\u5206\u652F/commit/\u672C\u5730\u4E0E\u8FDC\u7A0B\u5DEE\u8DDD/\u672A\u63D0\u4EA4\u6539\u52A8\u7B49\uFF09** \u2192 \u9009 balanced \u6216 quality \u6863\uFF08\u6309\u590D\u6742\u5EA6\uFF1B**\u4E0D\u8981\u9009 flash**\uFF09\uFF0C\u4E14 needsWorkspace=true
206
+ - **\u660E\u786E\u7F16\u7801\u4EFB\u52A1\uFF08\u5B9E\u73B0\u529F\u80FD\u3001\u4FEE bug\u3001refactor\u3001\u5199/\u8865\u6D4B\u8BD5\u3001\u8DD1 build/tests/ci\uFF09\u6216\u67E5\u770B\u672C\u673A\u4ED3\u5E93/\u4EE3\u7801\u72B6\u6001\uFF08git/\u5206\u652F/commit/\u672C\u5730\u4E0E\u8FDC\u7A0B\u5DEE\u8DDD/\u672A\u63D0\u4EA4\u6539\u52A8\u7B49\uFF09** \u2192 \u9009 balanced \u6216 quality \u6863\uFF08\u6309\u590D\u6742\u5EA6\uFF1B**\u4E0D\u8981\u9009 flash**\uFF09
205
207
  - \u4E13\u804C agent \u8DEF\u7531\u89C4\u5219\uFF08\u6709\u660E\u786E\u5339\u914D\u65F6\u4F7F\u7528\uFF09\uFF1A
206
208
  - \u8981\u63D0\u4EA4/\u8BB0\u5F55 bug\u3001\u4F53\u9A8C\u95EE\u9898\u3001\u6570\u636E\u5F02\u5E38\u3001\u4EA7\u54C1\u5EFA\u8BAE\uFF0C\u6216\u53E3\u8BED\u5982\u300C\u60F3\u53CD\u9988\u4E00\u4E9B\u95EE\u9898\u300D\u300C\u53CD\u9988\u4E00\u4E0B\u300D\u2192 \u9009\u610F\u89C1\u53CD\u9988\u4E13\u804C agent
207
209
  - \u8981\u65B0\u5EFA\u6216\u5B9A\u5236 AI/Agent/\u667A\u80FD\u4F53\u52A9\u624B\uFF08\u542B\u914D\u7F6E\u5DE5\u5177\u3001\u77E5\u8BC6\u3001\u786E\u8BA4\u521B\u5EFA\uFF09\u2192 \u9009\u521B\u5EFA Agent \u4E13\u804C agent
208
210
  - \u8981\u505A/\u6539/\u53D1\u5E03\u7F51\u7AD9\u3001\u7F51\u9875\u3001\u5C0F\u5E94\u7528\u3001\u9884\u7EA6\u9875\u3001\u535A\u5BA2\u3001\u770B\u677F \u2192 \u9009\u5E94\u7528\u6784\u5EFA\u4E13\u804C agent
209
211
  - \u8981\u6D3E\u591A\u4E2A agent\u3001\u591A agent \u5E76\u884C\u3001\u62C6\u6210\u4EFB\u52A1\u540E\u53F0\u6267\u884C\u3001\u591A\u4E2A agent review\u3001\u8BA9\u4E0D\u540C agent \u8BA8\u8BBA/\u4F1A\u5546 \u2192 \u9009\u591A Agent \u7F16\u6392\u4E13\u804C agent\uFF08\u663E\u5F0F multi-agent \u4F18\u5148\uFF09
210
- - **\u62FF\u4E0D\u51C6\u65F6**\uFF1A\u7EAF\u95F2\u804A\u9009 flash\uFF1B**\u82E5\u6CBE\u8FB9\u672C\u5730\u4ED3\u5E93/\u5F53\u524D\u4EE3\u7801\u72B6\u6001\uFF0C\u9009 balanced/quality + needsWorkspace=true**\u3002
211
-
212
- \u540C\u65F6\u5224\u65AD\u672C\u8F6E\u662F\u5426\u9700\u8981\u6CE8\u5165\u300C\u5DE5\u4F5C\u533A\u53EA\u8BFB\u5DE5\u5177\u300D\uFF08listFiles/globFiles/searchFiles/readFile/execShell \u7B49\uFF09\uFF1A
213
- - needsWorkspace=true \u7684\u573A\u666F\uFF1A\u7528\u6237\u8981\u8BFB/\u6539/\u5206\u6790\u6587\u4EF6\u6216\u4EE3\u7801\u3001\u63D0\u5230\u4E86\u6587\u4EF6\u8DEF\u5F84/\u6269\u5C55\u540D\uFF08.md/.csv/.ts \u7B49\uFF09\u3001\u63D0\u5230\u5DE5\u4F5C\u533A/\u4EE3\u7801\u5E93/\u4ED3\u5E93/\u76EE\u5F55/git/\u5206\u652F\u3001\u8981\u770B\u5F53\u524D\u4EE3\u7801\u6216\u4ED3\u5E93\u72B6\u6001\u3001\u672C\u5730\u641C\u7D22/\u67E5\u770B\u4EE3\u7801\u3002
214
- - needsWorkspace=false \u7684\u573A\u666F\uFF1A\u901A\u7528\u77E5\u8BC6\u95EE\u7B54\uFF08\u5982\u300C\u5E7F\u4E1C\u7ECF\u6D4E\u6570\u636E\u300D\u300C\u5199\u4E00\u9996\u8BD7\u300D\uFF09\u3001\u7EAF\u95F2\u804A\u95EE\u5019\u3001\u7FFB\u8BD1\u3001\u4E0D\u6D89\u53CA\u672C\u5730\u6587\u4EF6/\u4ED3\u5E93\u3002
215
- - \u6F0F\u5224\uFF08\u7528\u6237\u8981\u6587\u4EF6\u800C\u6CA1\u5E26\u5DE5\u5177\uFF09\u6BD4\u8BEF\u5224\uFF08\u767D\u641C\u51E0\u8F6E\uFF09\u4EE3\u4EF7\u66F4\u9AD8\uFF0C\u5B81\u53EF\u504F\u5BBD\u5224 true\u3002
212
+ - **\u62FF\u4E0D\u51C6\u65F6**\uFF1A\u7EAF\u95F2\u804A\u9009 flash\uFF1B**\u82E5\u6CBE\u8FB9\u672C\u5730\u4ED3\u5E93/\u5F53\u524D\u4EE3\u7801\u72B6\u6001\uFF0C\u9009 balanced/quality**\u3002
216
213
 
217
214
  \u5728\u7ED9\u51FA agentKey \u4E4B\u524D\uFF0C\u5148\u5728\u5FC3\u91CC\u533A\u5206\u5019\u9009\u6863\u4F4D\u7684\u8FB9\u754C\u518D\u7ED9\u7F6E\u4FE1\u5EA6\uFF1Abalanced \u4E0E quality \u7684\u8FB9\u754C\u5728\u4E8E\u590D\u6742\u5EA6/\u7BC7\u5E45/\u662F\u5426\u9700\u8981\u6DF1\u5EA6\u5206\u6790\uFF0C\u62FF\u4E0D\u51C6\u5C31\u7ED9\u4F4E confidence\u3002
218
215
 
@@ -224,7 +221,7 @@ ${agentList}
224
221
  - \u666E\u901A\u95EE\u7B54/\u7EAF\u95F2\u804A/\u5EFA\u5E94\u7528 \u2192 skills \u4E3A []
225
222
 
226
223
  \u53EA\u8F93\u51FA JSON\uFF0C\u4E0D\u8981\u8F93\u51FA\u5176\u4ED6\u5185\u5BB9\uFF1A
227
- {"confidence": <0\u52301\u4E4B\u95F4\u7684\u5C0F\u6570\uFF0C\u8868\u793A\u4F60\u5BF9\u8FD9\u4E2A\u5206\u7C7B\u5224\u65AD\u7684\u628A\u63E1\u7A0B\u5EA6>, "agentKey": "<\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u7684 agentKey>", "needsWorkspace": <true \u6216 false>, "skills": <\u5B57\u7B26\u4E32\u6570\u7EC4\uFF0C\u5143\u7D20\u53EA\u80FD\u662F ${[...VALID_QUICK_CHAT_SKILLS].map((s) => `"${s}"`).join(" | ")}\uFF0C\u672A\u547D\u4E2D\u7ED9 []>}`;
224
+ {"confidence": <0\u52301\u4E4B\u95F4\u7684\u5C0F\u6570\uFF0C\u8868\u793A\u4F60\u5BF9\u8FD9\u4E2A\u5206\u7C7B\u5224\u65AD\u7684\u628A\u63E1\u7A0B\u5EA6>, "agentKey": "<\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u7684 agentKey>", "skills": <\u5B57\u7B26\u4E32\u6570\u7EC4\uFF0C\u5143\u7D20\u53EA\u80FD\u662F ${[...VALID_QUICK_CHAT_SKILLS].map((s) => `"${s}"`).join(" | ")}\uFF0C\u672A\u547D\u4E2D\u7ED9 []>}`;
228
225
  }
229
226
  function parseQuickChatIntentResult(content, tierAgents) {
230
227
  try {
@@ -233,8 +230,6 @@ function parseQuickChatIntentResult(content, tierAgents) {
233
230
  const key = parsed.agentKey;
234
231
  if (typeof key !== "string") return null;
235
232
  if (!tierAgents.some((t2) => t2.agentKey === key)) return null;
236
- const rawNeedsWorkspace = parsed.needsWorkspace;
237
- const needsWorkspace = rawNeedsWorkspace === true;
238
233
  const rawConfidence = parsed.confidence;
239
234
  const confidence = typeof rawConfidence === "number" && Number.isFinite(rawConfidence) && rawConfidence >= 0 && rawConfidence <= 1 ? rawConfidence : void 0;
240
235
  const rawSkills = parsed.skills;
@@ -245,7 +240,7 @@ function parseQuickChatIntentResult(content, tierAgents) {
245
240
  );
246
241
  if (filtered.length > 0) skills = filtered;
247
242
  }
248
- return { agentKey: key, needsWorkspace, confidence, skills };
243
+ return { agentKey: key, confidence, skills };
249
244
  } catch {
250
245
  return null;
251
246
  }
@@ -357,7 +352,6 @@ async function classifyCliAutoRoute(text, options) {
357
352
  tier,
358
353
  classified: true,
359
354
  confidence: parsed.confidence,
360
- needsWorkspace: parsed.needsWorkspace,
361
355
  skills: parsed.skills
362
356
  };
363
357
  } catch {
@@ -960,6 +954,17 @@ function supportsTruecolor(env = process.env) {
960
954
  const program = (env.TERM_PROGRAM ?? "").toLowerCase();
961
955
  return TRUECOLOR_TERM_PROGRAMS.has(program);
962
956
  }
957
+ function detectSystemBrightnessFromEnv(env = process.env) {
958
+ const appleStyle = (env.AppleInterfaceStyle ?? "").trim().toLowerCase();
959
+ if (appleStyle === "dark") return "dark";
960
+ const colorScheme = (env.COLOR_SCHEME ?? env.COLORSCHEME ?? env.SYSTEM_COLOR_SCHEME ?? "").trim().toLowerCase();
961
+ if (/(?:^|[\s\-_:])dark(?:$|[\s\-_:])/i.test(colorScheme)) return "dark";
962
+ if (/(?:^|[\s\-_:])light(?:$|[\s\-_:])/i.test(colorScheme)) return "light";
963
+ const gtkTheme = (env.GTK_THEME ?? env.QT_STYLE_OVERRIDE ?? "").trim().toLowerCase();
964
+ if (/(?:^|[\s\-_:])dark(?:$|[\s\-_:])/i.test(gtkTheme)) return "dark";
965
+ if (/(?:^|[\s\-_:])light(?:$|[\s\-_:])/i.test(gtkTheme)) return "light";
966
+ return null;
967
+ }
963
968
  function resolveTuiBrightness(env = process.env) {
964
969
  const explicit = (env.NOLO_TUI_THEME ?? "").trim().toLowerCase();
965
970
  if (explicit === "light") return "light";
@@ -972,6 +977,8 @@ function resolveTuiBrightness(env = process.env) {
972
977
  if (!Number.isNaN(bg) && bg >= 0 && bg <= 6) return "dark";
973
978
  if (!Number.isNaN(bg) && bg >= 7 && bg <= 15) return "light";
974
979
  }
980
+ const sys = detectSystemBrightnessFromEnv(env);
981
+ if (sys) return sys;
975
982
  return "dark";
976
983
  }
977
984
  function hexToSgr(hex) {
@@ -1002,7 +1009,8 @@ function setActiveTerminalBaseHex(hex) {
1002
1009
  }
1003
1010
  function applyDetectedBackground(detected) {
1004
1011
  const normalizedHex = detected.hex.replace(/^#/, "").toUpperCase();
1005
- const changed = detected.brightness !== activeBrightness || normalizedHex !== activeTerminalBaseHex;
1012
+ const hexChanged = normalizedHex !== "" && normalizedHex !== activeTerminalBaseHex;
1013
+ const changed = detected.brightness !== activeBrightness || hexChanged;
1006
1014
  setActiveBrightness(detected.brightness);
1007
1015
  setActiveTerminalBaseHex(detected.hex);
1008
1016
  return changed;
@@ -2130,18 +2138,8 @@ function isFailedToolResult(event) {
2130
2138
  function isNeedsActionToolResult(event) {
2131
2139
  return Boolean(event.metadata?.actionGate);
2132
2140
  }
2133
- function readRunLogLines(parsed) {
2134
- if (Array.isArray(parsed.logLines)) return parsed.logLines;
2135
- if (typeof parsed.logTail === "string" && parsed.logTail.trim()) {
2136
- return parsed.logTail.split("\n");
2137
- }
2138
- return void 0;
2139
- }
2140
- function readRunErrorMessage(parsed) {
2141
- return typeof parsed.errorMessage === "string" ? parsed.errorMessage : void 0;
2142
- }
2143
2141
  function parseUiAskChoiceForCli(event) {
2144
- if (event.toolName !== "ui_ask_choice" && !event.metadata?.uiAskChoice) {
2142
+ if (event.toolName !== "ask_user" && !event.metadata?.uiAskChoice) {
2145
2143
  return null;
2146
2144
  }
2147
2145
  const parsed = parseUiAskChoiceContent(event.content);
@@ -2242,70 +2240,84 @@ function formatToolTraceLine(text, colorEnabled, accent = "none") {
2242
2240
  return `${dimCliText(text, true)}
2243
2241
  `;
2244
2242
  }
2245
- function recoverOrchestrationDisplayFromContent(toolName, content) {
2243
+ function renderRunCard(snapshot, opts) {
2244
+ const labels = agentRunCardLabels();
2245
+ const timing = { startedAt: snapshot.startedAt, finishedAt: snapshot.finishedAt };
2246
+ const name = snapshot.agentName ?? "agent";
2247
+ if (isAgentRunTerminalStatus(snapshot.status)) {
2248
+ return formatFinishedRunCard(name, snapshot.status, {
2249
+ runId: snapshot.runId,
2250
+ toolCallCount: snapshot.toolCallCount,
2251
+ lastToolNames: snapshot.lastToolNames,
2252
+ lastAssistantText: snapshot.lastAssistantText,
2253
+ errorMessage: snapshot.errorMessage,
2254
+ logLines: snapshot.logLines,
2255
+ timing,
2256
+ ...opts?.includeLogTail !== void 0 ? { includeLogTail: opts.includeLogTail } : {},
2257
+ labels
2258
+ });
2259
+ }
2260
+ return formatStatusRunCard(name, snapshot.status, {
2261
+ runId: snapshot.runId,
2262
+ toolCallCount: snapshot.toolCallCount,
2263
+ lastToolNames: snapshot.lastToolNames,
2264
+ lastAssistantText: snapshot.lastAssistantText,
2265
+ errorMessage: snapshot.errorMessage,
2266
+ logLines: snapshot.logLines,
2267
+ timing,
2268
+ ...opts?.includeLogTail !== void 0 ? { includeLogTail: opts.includeLogTail } : {},
2269
+ labels
2270
+ });
2271
+ }
2272
+ function recoverOrchestrationCard(event, toolName) {
2273
+ const content = typeof event.content === "string" ? event.content : "";
2246
2274
  const trimmed = content.trim();
2247
- if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return content;
2275
+ if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return null;
2248
2276
  const labels = agentRunCardLabels();
2249
- try {
2250
- const parsed = JSON.parse(trimmed);
2251
- if (toolName === "listAgents") {
2277
+ if (toolName === "listAgents") {
2278
+ try {
2279
+ const parsed = JSON.parse(trimmed);
2252
2280
  const agents = Array.isArray(parsed.agents) ? parsed.agents : [];
2253
2281
  return formatAgentListCard(agents);
2282
+ } catch {
2283
+ return null;
2254
2284
  }
2255
- if (toolName === "startAgentRun") {
2256
- const name = resolveRunLabel(parsed);
2257
- const status = typeof parsed.status === "string" ? parsed.status : "running";
2258
- return formatStartRunCard(name, status, labels);
2259
- }
2260
- if (toolName === "controlAgentRun") {
2285
+ }
2286
+ if (toolName === "controlAgentRun") {
2287
+ try {
2288
+ const parsed = JSON.parse(trimmed);
2261
2289
  if (Array.isArray(parsed.runs)) {
2262
- const runs = parsed.runs;
2263
- return formatListRunsCard(runs, labels);
2264
- }
2265
- const status = typeof parsed.status === "string" ? parsed.status : void 0;
2266
- if (parsed.found === false || status === "not_found") {
2267
- return formatNotFoundRunCard(labels);
2268
- }
2269
- if (status === "killed" || status === "cancelled" || status === "cancelling") {
2270
- return formatStopRunCard(status, labels);
2290
+ return formatListRunsCard(
2291
+ parsed.runs,
2292
+ labels
2293
+ );
2271
2294
  }
2272
- return formatStatusRunCard(resolveRunLabel(parsed), status ?? "\u2014", {
2273
- errorMessage: readRunErrorMessage(parsed),
2274
- logLines: readRunLogLines(parsed),
2275
- labels
2276
- });
2295
+ } catch {
2296
+ return null;
2277
2297
  }
2278
- } catch {
2279
2298
  }
2280
- return content;
2299
+ const parsedEvent = parseAgentRunEvent(event);
2300
+ if (!parsedEvent) return null;
2301
+ const { kind, snapshot } = parsedEvent;
2302
+ if (kind === "start") {
2303
+ return formatStartRunCard(snapshot.agentName ?? "agent", snapshot.status, {
2304
+ task: snapshot.taskPreview,
2305
+ runId: snapshot.runId,
2306
+ labels
2307
+ });
2308
+ }
2309
+ if (kind === "gone") return formatNotFoundRunCard(labels);
2310
+ if (kind === "stop") return formatStopRunCard(snapshot.status, labels);
2311
+ return renderRunCard(snapshot);
2281
2312
  }
2282
2313
  function parseControlAgentRunStatusEvent(event) {
2283
- const raw = typeof event.content === "string" && event.content.trim() ? event.content.trim() : "";
2284
- if (!raw.startsWith("{")) return null;
2285
- try {
2286
- const parsed = JSON.parse(raw);
2287
- if (Array.isArray(parsed.runs)) return null;
2288
- const status = typeof parsed.status === "string" ? parsed.status : void 0;
2289
- if (parsed.found === false || status === "not_found") return null;
2290
- if (status === "killed" || status === "cancelled" || status === "cancelling") return null;
2291
- if (!status) return null;
2292
- const runId = typeof parsed.runId === "string" && parsed.runId.trim() ? parsed.runId.trim() : typeof event.metadata?.runId === "string" ? event.metadata.runId : "";
2293
- if (!runId) return null;
2294
- const agentName = resolveRunLabel(parsed);
2295
- const errorMessage = readRunErrorMessage(parsed);
2296
- const logLines = readRunLogLines(parsed);
2297
- const logKey = logLines && logLines.length > 0 ? logLines.join("\n") : "";
2298
- return { runId, status, agentName, errorMessage, logLines, logKey };
2299
- } catch {
2300
- return null;
2301
- }
2314
+ const parsed = parseAgentRunEvent(event);
2315
+ return parsed?.kind === "status" ? parsed.snapshot : null;
2302
2316
  }
2303
2317
  function formatOrchestrationCardBlock(event, toolName, colorEnabled) {
2304
2318
  const rawLabel = toolLabel(toolName);
2305
- let rawDataStr = typeof event.metadata?.displayData === "string" && event.metadata.displayData.trim() ? event.metadata.displayData : typeof event.content === "string" ? event.content : "";
2306
- if (typeof event.metadata?.displayData !== "string" && typeof event.content === "string" && event.content.trim()) {
2307
- rawDataStr = recoverOrchestrationDisplayFromContent(toolName, event.content);
2308
- }
2319
+ const bakedCard = typeof event.metadata?.displayData === "string" && event.metadata.displayData.trim() ? event.metadata.displayData : "";
2320
+ const rawDataStr = recoverOrchestrationCard(event, toolName) || bakedCard || (typeof event.content === "string" ? event.content : "");
2309
2321
  const failed = event.type === "tool-error" || isFailedToolResult(event) || Boolean(event.metadata?.failed) || /^Error:/i.test(rawDataStr.trim());
2310
2322
  if (failed) {
2311
2323
  const firstLine = rawDataStr.trim().split("\n")[0] || event.summary || event.message || t("toolFailed");
@@ -2341,16 +2353,22 @@ function formatOrchestrationCardBlock(event, toolName, colorEnabled) {
2341
2353
  }
2342
2354
  return out;
2343
2355
  }
2356
+ function mergeRunSnapshot(previous, next) {
2357
+ return {
2358
+ ...previous,
2359
+ ...next,
2360
+ errorMessage: next.errorMessage ?? previous.errorMessage,
2361
+ logLines: next.logLines ?? previous.logLines,
2362
+ logKey: next.logKey || previous.logKey,
2363
+ toolCallCount: next.toolCallCount ?? previous.toolCallCount,
2364
+ lastToolNames: next.lastToolNames ?? previous.lastToolNames,
2365
+ lastAssistantText: next.lastAssistantText ?? previous.lastAssistantText,
2366
+ startedAt: next.startedAt ?? previous.startedAt,
2367
+ finishedAt: next.finishedAt ?? previous.finishedAt
2368
+ };
2369
+ }
2344
2370
  function formatFoldedControlStatusCard(snapshot, colorEnabled) {
2345
- const labels = agentRunCardLabels();
2346
- const body = formatStatusRunCard(snapshot.agentName, snapshot.status, {
2347
- errorMessage: snapshot.errorMessage,
2348
- logLines: snapshot.logLines,
2349
- pollCount: snapshot.pollCount,
2350
- elapsedMs: snapshot.elapsedMs,
2351
- includeLogTail: snapshot.includeLogTail,
2352
- labels
2353
- });
2371
+ const body = renderRunCard(snapshot, { includeLogTail: snapshot.includeLogTail });
2354
2372
  return formatOrchestrationCardBlock(
2355
2373
  {
2356
2374
  type: "tool-result",
@@ -2358,8 +2376,7 @@ function formatFoldedControlStatusCard(snapshot, colorEnabled) {
2358
2376
  toolCallId: `fold-${snapshot.runId}`,
2359
2377
  toolName: "controlAgentRun",
2360
2378
  content: "",
2361
- metadata: { displayData: body },
2362
- elapsedMs: snapshot.elapsedMs
2379
+ metadata: { displayData: body }
2363
2380
  },
2364
2381
  "controlAgentRun",
2365
2382
  colorEnabled
@@ -2380,7 +2397,7 @@ function formatVerboseToolEvent(event, colorEnabled) {
2380
2397
  );
2381
2398
  }
2382
2399
  const elapsed = typeof event.elapsedMs === "number" ? ` ${event.elapsedMs}ms` : "";
2383
- if (event.type === "tool-result" && (event.toolName === "ui_ask_choice" || event.metadata?.uiAskChoice)) {
2400
+ if (event.type === "tool-result" && (event.toolName === "ask_user" || event.metadata?.uiAskChoice)) {
2384
2401
  const block = formatUiAskChoiceBlock(event, colorEnabled);
2385
2402
  if (block) return `${formatToolTraceLine(`[nolo:tool] #${round} <- ${event.toolName}${elapsed}`, colorEnabled)}${block}`;
2386
2403
  }
@@ -2593,7 +2610,7 @@ function formatCompactToolLine(event, pending, colorEnabled) {
2593
2610
  if (event.type === "tool-result" && (toolName === "listAgents" || toolName === "startAgentRun" || toolName === "controlAgentRun")) {
2594
2611
  return formatOrchestrationCardBlock(event, toolName, colorEnabled);
2595
2612
  }
2596
- if (event.type === "tool-result" && (event.toolName === "ui_ask_choice" || event.metadata?.uiAskChoice)) {
2613
+ if (event.type === "tool-result" && (event.toolName === "ask_user" || event.metadata?.uiAskChoice)) {
2597
2614
  const block = formatUiAskChoiceBlock(event, colorEnabled);
2598
2615
  if (block) return block;
2599
2616
  }
@@ -2640,26 +2657,14 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2640
2657
  const fold = statusFold;
2641
2658
  statusFold = null;
2642
2659
  const prevLog = lastEmittedLogByRunId.get(fold.runId);
2643
- const includeLogTail = Boolean(fold.logKey) && fold.logKey !== prevLog;
2644
- if (fold.logKey) {
2660
+ const changed = Boolean(fold.logKey) && fold.logKey !== prevLog;
2661
+ if (changed && runShowsLogTail(fold.status)) {
2645
2662
  lastEmittedLogByRunId.set(fold.runId, fold.logKey);
2646
2663
  }
2647
- return formatFoldedControlStatusCard(
2648
- {
2649
- runId: fold.runId,
2650
- status: fold.status,
2651
- agentName: fold.agentName,
2652
- errorMessage: fold.errorMessage,
2653
- logLines: fold.logLines,
2654
- pollCount: fold.pollCount,
2655
- elapsedMs: fold.elapsedMs,
2656
- includeLogTail
2657
- },
2658
- colorEnabled
2659
- );
2664
+ return formatFoldedControlStatusCard({ ...fold, includeLogTail: changed }, colorEnabled);
2660
2665
  };
2661
- const flushBuffers = () => {
2662
- let out = flushStatusFold();
2666
+ const flushToolBuffers = () => {
2667
+ let out = "";
2663
2668
  if (readBuffer.length > 0) {
2664
2669
  const items = readBuffer.map((evt) => {
2665
2670
  const call = pending.get(evt.toolCallId);
@@ -2715,6 +2720,12 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2715
2720
  }
2716
2721
  return out;
2717
2722
  };
2723
+ const flushBuffers = () => `${flushStatusFold()}${flushToolBuffers()}`;
2724
+ const bufferToolResult = (buffer, event) => {
2725
+ const flushed = flushStatusFold();
2726
+ buffer.push(event);
2727
+ return flushed;
2728
+ };
2718
2729
  const formatter = (event) => {
2719
2730
  if (mode === "hide") return "";
2720
2731
  if (mode === "verbose") return formatVerboseToolEvent(event, colorEnabled);
@@ -2729,28 +2740,13 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2729
2740
  if (event.type === "tool-result") {
2730
2741
  const snapshot = parseControlAgentRunStatusEvent(event);
2731
2742
  if (snapshot) {
2732
- let out = "";
2733
- if (statusFold && statusFold.runId !== snapshot.runId) {
2743
+ let out = flushToolBuffers();
2744
+ const open = statusFold;
2745
+ const sameRun = open?.runId === snapshot.runId;
2746
+ if (open && (!sameRun || open.status !== snapshot.status)) {
2734
2747
  out += flushStatusFold();
2735
2748
  }
2736
- if (!statusFold) {
2737
- statusFold = {
2738
- ...snapshot,
2739
- pollCount: 1,
2740
- elapsedMs: event.elapsedMs
2741
- };
2742
- } else {
2743
- statusFold = {
2744
- runId: snapshot.runId,
2745
- status: snapshot.status,
2746
- agentName: snapshot.agentName,
2747
- errorMessage: snapshot.errorMessage ?? statusFold.errorMessage,
2748
- logLines: snapshot.logLines ?? statusFold.logLines,
2749
- logKey: snapshot.logKey || statusFold.logKey,
2750
- pollCount: statusFold.pollCount + 1,
2751
- elapsedMs: event.elapsedMs
2752
- };
2753
- }
2749
+ statusFold = open && sameRun ? mergeRunSnapshot(open, snapshot) : snapshot;
2754
2750
  pending.delete(event.toolCallId);
2755
2751
  if (isAgentRunTerminalStatus(snapshot.status)) {
2756
2752
  out += flushBuffers();
@@ -2772,8 +2768,7 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2772
2768
  return "";
2773
2769
  }
2774
2770
  if (event.type === "tool-result") {
2775
- readBuffer.push(event);
2776
- return "";
2771
+ return bufferToolResult(readBuffer, event);
2777
2772
  }
2778
2773
  }
2779
2774
  if (isSearchToolName(event.toolName)) {
@@ -2785,8 +2780,7 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2785
2780
  return "";
2786
2781
  }
2787
2782
  if (event.type === "tool-result") {
2788
- searchBuffer.push(event);
2789
- return "";
2783
+ return bufferToolResult(searchBuffer, event);
2790
2784
  }
2791
2785
  }
2792
2786
  if (isRunToolName(event.toolName)) {
@@ -2804,8 +2798,7 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2804
2798
  return "";
2805
2799
  }
2806
2800
  if (event.type === "tool-result") {
2807
- runBuffer.push(event);
2808
- return "";
2801
+ return bufferToolResult(runBuffer, event);
2809
2802
  }
2810
2803
  }
2811
2804
  if (isFetchToolName(event.toolName)) {
@@ -2817,8 +2810,7 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2817
2810
  return "";
2818
2811
  }
2819
2812
  if (event.type === "tool-result") {
2820
- fetchBuffer.push(event);
2821
- return "";
2813
+ return bufferToolResult(fetchBuffer, event);
2822
2814
  }
2823
2815
  }
2824
2816
  if (isWebSearchToolName(event.toolName)) {
@@ -2830,8 +2822,7 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2830
2822
  return "";
2831
2823
  }
2832
2824
  if (event.type === "tool-result") {
2833
- webSearchBuffer.push(event);
2834
- return "";
2825
+ return bufferToolResult(webSearchBuffer, event);
2835
2826
  }
2836
2827
  }
2837
2828
  const flushed = flushBuffers();
@@ -2890,6 +2881,12 @@ function createSseToolEventAdapter(onEvent) {
2890
2881
  type: "tool-result",
2891
2882
  toolCallId,
2892
2883
  toolName,
2884
+ // The full payload, not just the clipped summary. Consumers that parse
2885
+ // structured results — the agent-run snapshot parser feeding the dock
2886
+ // panel, the orchestration card renderer, ask_user — all read
2887
+ // `content`; dropping it here made every one of them silently inert on
2888
+ // the HTTP/SSE path while working on the local path.
2889
+ ...rawContent ? { content: rawContent } : {},
2893
2890
  summary,
2894
2891
  metadata: payload.metadata,
2895
2892
  round
@@ -3091,10 +3088,10 @@ ${options.agentName} > `);
3091
3088
  spinner.show(activeLabel);
3092
3089
  options.activityReporter?.(activeLabel);
3093
3090
  }
3094
- if (event.type === "tool-result" && options.onAgentRunStatus && event.toolName === "startAgentRun") {
3095
- const snapshot = extractAgentRunStatusSnapshot(event);
3096
- if (snapshot) {
3097
- options.onAgentRunStatus(snapshot);
3091
+ if (options.onAgentRunStatus) {
3092
+ const parsed = parseAgentRunEvent(event);
3093
+ if (parsed) {
3094
+ options.onAgentRunStatus(parsed.kind === "gone" ? null : parsed.snapshot);
3098
3095
  }
3099
3096
  }
3100
3097
  };
@@ -3153,35 +3150,6 @@ ${options.agentName} > (no text response)
3153
3150
  }
3154
3151
  };
3155
3152
  }
3156
- function extractAgentRunStatusSnapshot(event) {
3157
- if (event.type !== "tool-result") return null;
3158
- const content = typeof event.content === "string" ? event.content.trim() : "";
3159
- if (!content.startsWith("{")) return null;
3160
- try {
3161
- const parsed = JSON.parse(content);
3162
- const runId = typeof parsed.runId === "string" ? parsed.runId : "";
3163
- const status = typeof parsed.status === "string" ? parsed.status : "running";
3164
- const label = resolveRunLabel({
3165
- agentName: parsed.agentName,
3166
- name: parsed.name,
3167
- agentKey: parsed.agentKey
3168
- });
3169
- const agentName = isAgentNameFallback(label) ? void 0 : label;
3170
- const logTail = typeof parsed.logTail === "string" ? parsed.logTail : void 0;
3171
- const logLines = Array.isArray(parsed.logLines) ? parsed.logLines : void 0;
3172
- const errorMessage = typeof parsed.errorMessage === "string" ? parsed.errorMessage : void 0;
3173
- return {
3174
- runId,
3175
- agentName,
3176
- status,
3177
- logTail,
3178
- logLines,
3179
- errorMessage
3180
- };
3181
- } catch {
3182
- return null;
3183
- }
3184
- }
3185
3153
 
3186
3154
  // packages/cli/client/agentRunStream.ts
3187
3155
  async function readStreamingAgentRun(options, res, existingSpinner) {
@@ -3564,7 +3532,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
3564
3532
  // packages/cli/client/agentRun.ts
3565
3533
  import { ulid } from "ulid";
3566
3534
  async function loadRunLocalAgentTurn() {
3567
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-AH2RYWGP.js");
3535
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QUTBSY3I.js");
3568
3536
  return runLocalAgentTurn;
3569
3537
  }
3570
3538
  async function resolveCurrentMachineId(options) {
@@ -3591,7 +3559,8 @@ function buildDefaultLocalRuntimeAdapter(options) {
3591
3559
  output: options.output,
3592
3560
  ...options.confirmDestructiveAction ? { confirmDestructiveAction: options.confirmDestructiveAction } : {},
3593
3561
  ...options.requestUserChoice ? { requestUserChoice: options.requestUserChoice } : {},
3594
- ...options.pastedTextStore?.items.size ? { pastedTextStore: options.pastedTextStore } : {}
3562
+ ...options.pastedTextStore?.items.size ? { pastedTextStore: options.pastedTextStore } : {},
3563
+ ...options.activityReporter ? { activityReporter: options.activityReporter } : {}
3595
3564
  });
3596
3565
  }
3597
3566
  function resolveLocalRuntimeAdapter(options) {
@@ -3830,6 +3799,7 @@ async function runHttpAgentTurn(options, authToken) {
3830
3799
  runtime: "bun",
3831
3800
  entrypoint: "nolo-cli",
3832
3801
  capabilities: ["text-io", "streaming", "slash-commands"],
3802
+ ...options.dialogAgentMode ? { dialogAgentMode: options.dialogAgentMode } : {},
3833
3803
  ...subjectRefs ? { subjectRefs } : {},
3834
3804
  ...allowedChildAgentKeys?.length ? { allowedChildAgentKeys } : {},
3835
3805
  ...blockedToolNames?.length ? { blockedToolNames } : {},
@@ -3841,6 +3811,7 @@ async function runHttpAgentTurn(options, authToken) {
3841
3811
  ...options.inheritedFromDialogKey ? { inheritedFromDialogKey: options.inheritedFromDialogKey } : {},
3842
3812
  ...options.parentDialogId ? { parentDialogId: options.parentDialogId } : {},
3843
3813
  ...options.background ? { background: true } : {},
3814
+ ...options.ephemeral ? { ephemeral: true } : {},
3844
3815
  ...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {},
3845
3816
  ...options.modelOverride ? { runtimeOptions: { quickChatModelOverride: options.modelOverride } } : {},
3846
3817
  ...serverContextBlockScopes ? { contextBlockScopes: serverContextBlockScopes } : {},
@@ -3990,8 +3961,9 @@ async function runLocalAgentTurnForCli(options, settings) {
3990
3961
  const blockedToolNames = options.blockedToolNames?.filter(
3991
3962
  (name) => name.trim()
3992
3963
  );
3993
- const runtimeContext = subjectRefs || allowedChildAgentKeys?.length || allowedToolNames?.length || blockedToolNames?.length || options.parentWakeOnTerminal ? {
3964
+ const runtimeContext = subjectRefs || allowedChildAgentKeys?.length || allowedToolNames?.length || blockedToolNames?.length || options.parentWakeOnTerminal || options.dialogAgentMode ? {
3994
3965
  ...subjectRefs ? { subjectRefs } : {},
3966
+ ...options.dialogAgentMode ? { dialogAgentMode: options.dialogAgentMode } : {},
3995
3967
  ...allowedChildAgentKeys?.length ? { allowedChildAgentKeys } : {},
3996
3968
  ...allowedToolNames?.length ? { allowedToolNames } : {},
3997
3969
  ...blockedToolNames?.length ? { blockedToolNames } : {},
@@ -4000,7 +3972,7 @@ async function runLocalAgentTurnForCli(options, settings) {
4000
3972
  } : void 0;
4001
3973
  const currentDialogId = options.continueDialogId ?? ulid();
4002
3974
  const runChildTurn = async (input) => {
4003
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-AH2RYWGP.js");
3975
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QUTBSY3I.js");
4004
3976
  return runLocalAgentTurn(input);
4005
3977
  };
4006
3978
  const createFreshChildBaseAdapter = () => {
@@ -4202,11 +4174,6 @@ async function runAgentTurn(options) {
4202
4174
  );
4203
4175
  return { exitCode: 1 };
4204
4176
  }
4205
- if (options.ephemeral) {
4206
- options.output.write(
4207
- "[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"
4208
- );
4209
- }
4210
4177
  return runHttpAgentTurn(options, authToken);
4211
4178
  }
4212
4179
 
@@ -4777,6 +4744,7 @@ var resolveMemoryRuntime = async (input) => {
4777
4744
  userId: input.userId,
4778
4745
  spaceId: input.spaceId,
4779
4746
  agentKey: input.agentKey,
4747
+ memorySubjectId: input.memorySubjectId,
4780
4748
  policy
4781
4749
  }),
4782
4750
  kinds: ["episodic", "semantic", "procedural"],
@@ -5281,31 +5249,6 @@ ${mdContent}`);
5281
5249
  }
5282
5250
  return result.exitCode;
5283
5251
  }
5284
- var QUOTA_ERROR_PATTERNS = [
5285
- /429/,
5286
- /quota/i,
5287
- /rate\s*limit/i,
5288
- /too\s*many\s*requests/i,
5289
- /额度/,
5290
- /上限/,
5291
- /用尽/,
5292
- /CliProviderQuotaError/i
5293
- ];
5294
- function isQuotaExhaustedError(error) {
5295
- if (!error) return false;
5296
- if (error instanceof CliProviderQuotaError) return true;
5297
- if (error instanceof Error) {
5298
- return QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(error.message));
5299
- }
5300
- if (typeof error === "string") {
5301
- return QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(error));
5302
- }
5303
- const maybeStatus = error.status;
5304
- if (typeof maybeStatus === "number" && maybeStatus === 429) return true;
5305
- const maybeStatusCode = error.statusCode;
5306
- if (typeof maybeStatusCode === "number" && maybeStatusCode === 429) return true;
5307
- return false;
5308
- }
5309
5252
  var BALANCE_ERROR_PATTERNS = [
5310
5253
  /UPSTREAM_402/i,
5311
5254
  /Insufficient Balance/i,
@@ -5348,6 +5291,7 @@ export {
5348
5291
  setActiveBrightness,
5349
5292
  getActiveDensity,
5350
5293
  setActiveDensity,
5294
+ detectSystemBrightnessFromEnv,
5351
5295
  resolveTuiBrightness,
5352
5296
  setActiveTerminalBaseHex,
5353
5297
  applyDetectedBackground,
@@ -5374,6 +5318,5 @@ export {
5374
5318
  normalizeCliImageInput,
5375
5319
  inspectLocalRunWorkspace,
5376
5320
  runAgentRunCommand,
5377
- isQuotaExhaustedError,
5378
5321
  isBalanceExhaustedError
5379
5322
  };