nolo-cli 0.16.0 → 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.
- package/{_executeModel-AVCA2NAV.js → _executeModel-WPNX5DH4.js} +49 -43
- package/{action-F5JACQBG.js → action-LT7BRFLK.js} +10 -9
- package/{addContentAction-AQXEYRBE.js → addContentAction-PL3KKBDH.js} +9 -8
- package/{addDialogAgentAction-EJHHJZWW.js → addDialogAgentAction-FCMSKYAF.js} +8 -7
- package/{agentDeleteCommand-QW5PUMDQ.js → agentDeleteCommand-L3357EFL.js} +31 -28
- package/{agentEmailCommands-4ORVLGVQ.js → agentEmailCommands-N65AVLEI.js} +61 -55
- package/{agentListCommands-YWBYRTYC.js → agentListCommands-CH27FTI2.js} +30 -27
- package/{agentMachineCommands-JSQW4FOA.js → agentMachineCommands-PPK5HJZB.js} +29 -26
- package/{agentPullCommand-6HWUT3SW.js → agentPullCommand-ZZGU5KOY.js} +4 -4
- package/{agentRecordCommands-AASIWOBT.js → agentRecordCommands-HTVXD4TT.js} +56 -50
- package/{agentRunCommand-TB5BHXUH.js → agentRunCommand-MGLVJUA5.js} +62 -53
- package/{agentRunControl-6ADXVYMR.js → agentRunControl-P75VPTGS.js} +24 -1
- package/{agentRuntimeLocal-QNPNJRVH.js → agentRuntimeLocal-QUTBSY3I.js} +24 -21
- package/{agentSlice-RUNXC62Y.js → agentSlice-DOGRCMWK.js} +9 -8
- package/appDeleteCommands-FEEVXUBG.js +127 -0
- package/appDeployCommands-C4HCGC4B.js +166 -0
- package/appDeployStatusCommands-IR5ZUZBQ.js +147 -0
- package/appGetCommands-6RJGZ66Z.js +122 -0
- package/appListCommands-VMTF5YZF.js +125 -0
- package/{authCommand-YFTR3347.js → authCommand-WJZPOLSS.js} +16 -9
- package/{authCommands-YXGOXNBZ.js → authCommands-XTBV7OFZ.js} +6 -5
- package/{chunk-XPC5C7BK.js → chunk-3ND52WIL.js} +2 -2
- package/{chunk-SOTZ6RDN.js → chunk-3Q7WHGCB.js} +1 -1
- package/{chunk-M43KDE25.js → chunk-45BY7RLP.js} +2 -8
- package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
- package/{chunk-6N4KODMN.js → chunk-4T5F7YZQ.js} +1 -1
- package/chunk-7BUYEZ6U.js +671 -0
- package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
- package/{chunk-AVVZUXXC.js → chunk-AAODAAUQ.js} +34 -13
- package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
- package/{chunk-MTU75CZ2.js → chunk-B5TOXZAK.js} +1 -1
- package/{chunk-AUURUT6L.js → chunk-BT6K76S7.js} +238 -424
- package/chunk-CEFXYF66.js +107 -0
- package/{chunk-RLCXU7A5.js → chunk-D3HVJJIA.js} +1 -1
- package/{chunk-JTMNCCWF.js → chunk-DKZFOK24.js} +16 -87
- package/chunk-DL6EPNIK.js +50 -0
- package/{chunk-4L2OJPCU.js → chunk-EGPCU42M.js} +58 -8
- package/{chunk-IWLUTMYX.js → chunk-ELT65PZW.js} +2 -2
- package/chunk-FKXFCYVO.js +221 -0
- package/{chunk-4FX6NVDW.js → chunk-FPKLD4KB.js} +3 -136
- package/{chunk-PCTUYVUM.js → chunk-FVIPEIVX.js} +10 -3
- package/chunk-GFUIQ4RY.js +136 -0
- package/{chunk-66X4VSRC.js → chunk-HQPG2PIV.js} +41 -1
- package/{chunk-IGXREZW2.js → chunk-HV2A3B4W.js} +1 -1
- package/{chunk-LPEUV5RE.js → chunk-IOOMJJ4Z.js} +2 -2
- package/{setDialogExtraReferencesAction-LR6MSIXO.js → chunk-JLA4FXYC.js} +2 -17
- package/{chunk-3OIRVWXA.js → chunk-JP7REMYP.js} +10 -1
- package/chunk-KFEVY3ST.js +255 -0
- package/{chunk-P3RIAYGG.js → chunk-L2MLZQXU.js} +3 -3
- package/{chunk-55NSNCFM.js → chunk-L6NVTGI7.js} +1 -1
- package/{chunk-3WGLLTK4.js → chunk-LSFAWXKC.js} +100 -3
- package/{chunk-S2LXHNHG.js → chunk-MD3V54DA.js} +6 -6
- package/{chunk-6EVITP2G.js → chunk-MUCU6ATG.js} +2 -251
- package/{chunk-KFHN5NGJ.js → chunk-MVQ4TBSD.js} +1 -1
- package/{chunk-ZQBL7LIC.js → chunk-NEKFSXOP.js} +310 -211
- package/{chunk-NSCHQQPU.js → chunk-NVB267BZ.js} +397 -324
- package/{chunk-Z5JQNBNY.js → chunk-NYUXSXLY.js} +33 -14
- package/{chunk-FRV6A633.js → chunk-PZCBZO4J.js} +2 -2
- package/{chunk-GSINCD4P.js → chunk-QCJITMYO.js} +21 -11
- package/{chunk-OOSFSFMA.js → chunk-R5V5G73M.js} +2 -0
- package/{chunk-4IJYA27C.js → chunk-RG2U2MTJ.js} +1 -1
- package/{chunk-BEBNFWDU.js → chunk-RRGVDPH3.js} +3 -3
- package/{chunk-EABWT43X.js → chunk-RVOUXDFU.js} +5 -5
- package/{chunk-JTINRTBT.js → chunk-SKDNBYZK.js} +2 -2
- package/{chunk-3663CXZN.js → chunk-SNZV4QCE.js} +65 -22
- package/{chunk-KMQPSTMJ.js → chunk-TRT4I4UD.js} +2 -2
- package/{chunk-MYMMNKYL.js → chunk-TSIYZBTH.js} +156 -6
- package/{chunk-EHLHSX7R.js → chunk-UB4RYYNQ.js} +9 -2
- package/{chunk-YJKXGHJ6.js → chunk-UGUW3FHG.js} +4 -4
- package/{chunk-DPAB4FQ7.js → chunk-UZY4BEBR.js} +1579 -212
- package/chunk-V5R4NZP2.js +78 -0
- package/{chunk-MR6ISAGB.js → chunk-VDNQF5VI.js} +6 -6
- package/{chunk-33BJUVK4.js → chunk-VGMJ6PDJ.js} +5 -5
- package/{chunk-W4NVOSFF.js → chunk-WFHXMLHZ.js} +1 -1
- package/{chunk-H33743XH.js → chunk-WJRJDX2W.js} +1 -1
- package/chunk-X4Q4UZEY.js +26 -0
- package/{chunk-RPDGJO4D.js → chunk-XHG22OEX.js} +4 -4
- package/{chunk-DVRHHFEA.js → chunk-XMLRJUU5.js} +1 -1
- package/{chunk-3S2VOMIF.js → chunk-XRZJGPFI.js} +7 -7
- package/{chunk-7UKFVQ5W.js → chunk-YLRTBX4Y.js} +105 -36
- package/{chunk-DGEYDWEZ.js → chunk-YXTRNO5W.js} +3 -3
- package/{chunk-FY233ZFU.js → chunk-ZJZCMKOR.js} +107 -177
- package/{chunk-NVEWUJVX.js → chunk-ZVOZH2HW.js} +1 -1
- package/chunk-ZZ2MH7LE.js +84 -0
- package/{cliExecutor-K3F7DMRO.js → cliExecutor-DNE7TCC4.js} +2 -2
- package/codingSkills-36KN5NQT.js +48 -0
- package/{createAgentAutomationAction-FNHPSKKO.js → createAgentAutomationAction-PMOLEPGJ.js} +19 -18
- package/{createDialogAction-TZCVQ3NU.js → createDialogAction-DPRTYNAK.js} +21 -20
- package/{createPageAction-EIGZ3BKT.js → createPageAction-JGZK3WAM.js} +25 -24
- package/{dbSlice-7KQH6GOU.js → dbSlice-CGSRFJN3.js} +8 -7
- package/{deleteFile-WPWVZE4B.js → deleteFile-WDZ3VM7B.js} +3 -3
- package/{dialogCommands-FO77J5DQ.js → dialogCommands-XED6DKLV.js} +29 -26
- package/{dialogSlice-MM5U4KE2.js → dialogSlice-KO4NRNKC.js} +19 -18
- package/{docCreateCommands-I3BS3AZI.js → docCreateCommands-P6DYWHH3.js} +32 -27
- package/{docDeleteCommands-Q2OPV52P.js → docDeleteCommands-KUWXAMSN.js} +31 -26
- package/{docReadCommands-YOOFACYZ.js → docReadCommands-ECW55TKB.js} +30 -25
- package/{docStore-NGYQ2JTR.js → docStore-6KMERNUY.js} +20 -19
- package/{docUpdateCommands-2B32ITHN.js → docUpdateCommands-5J4BTJQN.js} +31 -26
- package/{fetchMessages-KTNM7QAR.js → fetchMessages-BMGVZVSE.js} +4 -3
- package/{getPricing-P4XRJRZB.js → getPricing-RYY6OBA4.js} +2 -2
- package/{handleSendMessageAction-JRZWWBKP.js → handleSendMessageAction-R3ZHTVU4.js} +20 -19
- package/index.js +95 -64
- package/{localDialogRead-2VRI24F4.js → localDialogRead-HQZPVIE3.js} +1 -1
- package/{localRuntimeDb-LGDF6FQP.js → localRuntimeDb-THJZGAOJ.js} +1 -1
- package/{machineCommands-WRWF2ICZ.js → machineCommands-JF2YL34J.js} +62 -56
- package/{machineWsRunDispatch-ZX7Q3TWZ.js → machineWsRunDispatch-ON4AEOJL.js} +54 -48
- package/{models-WQ5N4OJM.js → models-5K5G2CZI.js} +1 -1
- package/package.json +1 -1
- package/queryRunOverlay-O4LOMMPO.js +161 -0
- package/{read-CN3TNXIP.js → read-3FMPZPER.js} +3 -3
- package/{readDocTool-WF3675ED.js → readDocTool-VSYHKK3V.js} +1 -1
- package/{readlineWorkspace-ZTGRGW46.js → readlineWorkspace-SUCINTL7.js} +354 -185
- package/{removeDialogAgentAction-YDHBFEGI.js → removeDialogAgentAction-OAGA2G3U.js} +10 -9
- package/{runAgentClientLoop-JZCOP7LG.js → runAgentClientLoop-OBD2AVEL.js} +43 -37
- package/runOverlayPresentation-ZO4VCWEU.js +11 -0
- package/{runtimeDoctorCommands-THIHX2SY.js → runtimeDoctorCommands-E2OUORHK.js} +6 -6
- package/setDialogExtraReferencesAction-JZEXA5SL.js +27 -0
- package/{setPrimaryDialogAgentAction-IIVDCY5C.js → setPrimaryDialogAgentAction-4ZUQQKDG.js} +26 -17
- package/{settingSlice-O23YDK2O.js → settingSlice-7MNKHZ6R.js} +9 -8
- package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
- package/{spaceCommands-VV4GTPQK.js → spaceCommands-32NTNLHS.js} +30 -27
- package/{spaceSlice-DRWWZJP7.js → spaceSlice-P7VOXLY6.js} +19 -18
- package/{streamAgentChatTurn-Y6WGATQR.js → streamAgentChatTurn-UHEMNI3X.js} +97 -56
- package/{tableCommands-3P7MJ3PF.js → tableCommands-BEQAGE4I.js} +1 -1
- package/{tools-PUNBY3AH.js → tools-BMXIXHMB.js} +32 -27
- package/{tuiSummaryLlmCaller-F64WLSAF.js → tuiSummaryLlmCaller-VUNVBRX3.js} +5 -4
- package/types-ZSTJ7MPR.js +7 -0
- package/{updateDialogTitleAction-YSR4TCMB.js → updateDialogTitleAction-LJBDYZLH.js} +22 -21
- package/{chunk-O4BU24WZ.js → chunk-6Y7A3OQQ.js} +3 -3
- package/{chunk-XBS2WYJ2.js → chunk-RK5NYQEL.js} +0 -0
- package/{chunk-CMKUBIGW.js → chunk-X7W4TNB4.js} +3 -3
- package/{localRuntimeAuthority-TEGCOWX4.js → localRuntimeAuthority-4IXJCHZ7.js} +3 -3
|
@@ -3,7 +3,20 @@ import {
|
|
|
3
3
|
normalizeDialogRecord,
|
|
4
4
|
readDialogSnapshot,
|
|
5
5
|
sortDialogs
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L2MLZQXU.js";
|
|
7
|
+
import {
|
|
8
|
+
listFavoriteAgentIdsAcrossServers,
|
|
9
|
+
listLocalCachedAgents,
|
|
10
|
+
listRemoteAgents,
|
|
11
|
+
listRemoteAgentsAcrossServers
|
|
12
|
+
} from "./chunk-RRGVDPH3.js";
|
|
13
|
+
import "./chunk-ID4G2MAR.js";
|
|
14
|
+
import {
|
|
15
|
+
listUserRecordsFromServers
|
|
16
|
+
} from "./chunk-ZVOZH2HW.js";
|
|
17
|
+
import {
|
|
18
|
+
buildOverlayPresentation
|
|
19
|
+
} from "./chunk-V5R4NZP2.js";
|
|
7
20
|
import {
|
|
8
21
|
ANSI_ESCAPE_REGEX,
|
|
9
22
|
CLI_AUTO_TIER_AGENT_KEYS,
|
|
@@ -19,6 +32,7 @@ import {
|
|
|
19
32
|
clearCollapsedPasteStore,
|
|
20
33
|
countPhysicalLines,
|
|
21
34
|
createCollapsedPasteStore,
|
|
35
|
+
detectSystemBrightnessFromEnv,
|
|
22
36
|
dimCliText,
|
|
23
37
|
displayWidth,
|
|
24
38
|
expandRangeToCollapsedPasteChips,
|
|
@@ -30,8 +44,6 @@ import {
|
|
|
30
44
|
getActiveDensity,
|
|
31
45
|
getActiveThemeName,
|
|
32
46
|
isBalanceExhaustedError,
|
|
33
|
-
isQuotaExhaustedError,
|
|
34
|
-
normalizeThinkingDisplayMode,
|
|
35
47
|
normalizeToolDisplayMode,
|
|
36
48
|
padOrTruncateToWidth,
|
|
37
49
|
releaseCollapsedPaste,
|
|
@@ -58,119 +70,124 @@ import {
|
|
|
58
70
|
visibleWidth,
|
|
59
71
|
wrapTextToLines,
|
|
60
72
|
wrapTranscriptLine
|
|
61
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-BT6K76S7.js";
|
|
62
74
|
import "./chunk-DZ3XJVET.js";
|
|
63
|
-
import "./chunk-6HYVJV7B.js";
|
|
64
75
|
import {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
listRemoteAgents,
|
|
68
|
-
listRemoteAgentsAcrossServers
|
|
69
|
-
} from "./chunk-BEBNFWDU.js";
|
|
70
|
-
import "./chunk-ID4G2MAR.js";
|
|
76
|
+
getReadableCliDb
|
|
77
|
+
} from "./chunk-WFHXMLHZ.js";
|
|
71
78
|
import {
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
deleteDbRecord,
|
|
80
|
+
queryUserRecords,
|
|
81
|
+
readDbRecord
|
|
82
|
+
} from "./chunk-FVIPEIVX.js";
|
|
74
83
|
import {
|
|
75
84
|
createCliLocalRuntimeAdapter,
|
|
76
85
|
initCliLocale,
|
|
86
|
+
isQuotaExhaustedError,
|
|
77
87
|
parseCliLocale,
|
|
78
88
|
setCliLocale,
|
|
79
89
|
t
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import "./chunk-
|
|
82
|
-
import
|
|
83
|
-
getReadableCliDb
|
|
84
|
-
} from "./chunk-W4NVOSFF.js";
|
|
85
|
-
import {
|
|
86
|
-
deleteDbRecord,
|
|
87
|
-
queryUserRecords,
|
|
88
|
-
readDbRecord
|
|
89
|
-
} from "./chunk-PCTUYVUM.js";
|
|
90
|
-
import "./chunk-M43KDE25.js";
|
|
90
|
+
} from "./chunk-UZY4BEBR.js";
|
|
91
|
+
import "./chunk-UB4RYYNQ.js";
|
|
92
|
+
import "./chunk-45BY7RLP.js";
|
|
91
93
|
import {
|
|
92
94
|
resolveCliAgentKeyInput
|
|
93
95
|
} from "./chunk-VHBWHNVT.js";
|
|
94
96
|
import "./chunk-LTRXGFMS.js";
|
|
95
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-MVQ4TBSD.js";
|
|
98
|
+
import "./chunk-6HYVJV7B.js";
|
|
96
99
|
import "./chunk-JEXVIMYZ.js";
|
|
97
100
|
import {
|
|
98
101
|
prepareTools
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import "./chunk-
|
|
102
|
+
} from "./chunk-PZCBZO4J.js";
|
|
103
|
+
import "./chunk-L6NVTGI7.js";
|
|
101
104
|
import {
|
|
102
105
|
expandEnabledPacks
|
|
103
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-NEKFSXOP.js";
|
|
104
107
|
import "./chunk-RQSOAMPJ.js";
|
|
105
|
-
import "./chunk-
|
|
108
|
+
import "./chunk-JP7REMYP.js";
|
|
106
109
|
import "./chunk-KQHGZWSV.js";
|
|
107
|
-
import "./chunk-
|
|
108
|
-
import "./chunk-6N4KODMN.js";
|
|
110
|
+
import "./chunk-4T5F7YZQ.js";
|
|
109
111
|
import "./chunk-3LY4F7SV.js";
|
|
110
|
-
import "./chunk-VP4WJWKW.js";
|
|
111
|
-
import "./chunk-63W5N6P3.js";
|
|
112
112
|
import "./chunk-VF4K2QE6.js";
|
|
113
|
-
import "./chunk-
|
|
114
|
-
import
|
|
113
|
+
import "./chunk-VDNQF5VI.js";
|
|
114
|
+
import {
|
|
115
|
+
initialRunOverlayState,
|
|
116
|
+
reduceRunOverlay
|
|
117
|
+
} from "./chunk-DL6EPNIK.js";
|
|
115
118
|
import "./chunk-OWOHNGCN.js";
|
|
119
|
+
import "./chunk-JLA4FXYC.js";
|
|
120
|
+
import "./chunk-VP4WJWKW.js";
|
|
121
|
+
import "./chunk-63W5N6P3.js";
|
|
122
|
+
import "./chunk-WJRJDX2W.js";
|
|
123
|
+
import "./chunk-LM6IYQ3F.js";
|
|
124
|
+
import "./chunk-NYUXSXLY.js";
|
|
116
125
|
import {
|
|
117
126
|
extractReferenceKeysFromMessage
|
|
118
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-NVB267BZ.js";
|
|
119
128
|
import {
|
|
120
129
|
buildBuiltinSummaryContent
|
|
121
130
|
} from "./chunk-XOIF2TNF.js";
|
|
131
|
+
import "./chunk-B5TOXZAK.js";
|
|
122
132
|
import "./chunk-MRC4Q34M.js";
|
|
123
|
-
import "./chunk-
|
|
133
|
+
import "./chunk-MD3V54DA.js";
|
|
124
134
|
import "./chunk-CWMSB67P.js";
|
|
125
|
-
import "./chunk-
|
|
126
|
-
import "./chunk-RPDGJO4D.js";
|
|
127
|
-
import "./chunk-SOTZ6RDN.js";
|
|
135
|
+
import "./chunk-XHG22OEX.js";
|
|
128
136
|
import "./chunk-Z4NR32XR.js";
|
|
129
137
|
import "./chunk-M76ECQRD.js";
|
|
138
|
+
import "./chunk-3Q7WHGCB.js";
|
|
130
139
|
import {
|
|
131
140
|
buildSkillDiscoveryContextBlock
|
|
132
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-7OBMZCRD.js";
|
|
142
|
+
import "./chunk-7BUYEZ6U.js";
|
|
143
|
+
import "./chunk-VC6OZXO5.js";
|
|
133
144
|
import "./chunk-WZSRQNQG.js";
|
|
134
145
|
import {
|
|
135
146
|
buildLocalWorkspaceOpenAiTools,
|
|
136
147
|
buildLocalWorkspaceToolset,
|
|
137
148
|
getProcessRegistry
|
|
138
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-YLRTBX4Y.js";
|
|
139
150
|
import "./chunk-ZNFJWEN4.js";
|
|
140
|
-
import "./chunk-
|
|
151
|
+
import "./chunk-AAODAAUQ.js";
|
|
141
152
|
import "./chunk-OIQPORYI.js";
|
|
142
153
|
import {
|
|
143
154
|
readCommandActionGatePayload,
|
|
144
155
|
resolveAgentImageInputSupport
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-
|
|
156
|
+
} from "./chunk-QCJITMYO.js";
|
|
157
|
+
import "./chunk-LSFAWXKC.js";
|
|
147
158
|
import {
|
|
148
159
|
buildCurrentTimeBlock,
|
|
149
160
|
buildIdentityBlock,
|
|
150
161
|
buildRuntimeGuidanceBlocks
|
|
151
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-IOOMJJ4Z.js";
|
|
163
|
+
import "./chunk-KFEVY3ST.js";
|
|
152
164
|
import {
|
|
153
165
|
resolvePlatformAuthToken
|
|
154
|
-
} from "./chunk-
|
|
155
|
-
import
|
|
156
|
-
canonicalizeToolNames
|
|
157
|
-
} from "./chunk-JTMNCCWF.js";
|
|
166
|
+
} from "./chunk-MUCU6ATG.js";
|
|
167
|
+
import "./chunk-DKZFOK24.js";
|
|
158
168
|
import {
|
|
159
169
|
DEFAULT_CONTEXT_WINDOW,
|
|
160
170
|
estimateTokenCount,
|
|
161
171
|
getModelContextWindow,
|
|
162
172
|
planCompression,
|
|
163
173
|
serializeMessageContent
|
|
164
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-EGPCU42M.js";
|
|
165
175
|
import {
|
|
166
176
|
clipCompactText
|
|
167
177
|
} from "./chunk-5MMAK75Q.js";
|
|
168
|
-
import "./chunk-66X4VSRC.js";
|
|
169
178
|
import "./chunk-5CS33IBL.js";
|
|
170
179
|
import "./chunk-JZPBVBIY.js";
|
|
180
|
+
import "./chunk-HQPG2PIV.js";
|
|
171
181
|
import "./chunk-ZHXJ6M7T.js";
|
|
172
|
-
import
|
|
173
|
-
|
|
182
|
+
import {
|
|
183
|
+
toErrorMessage
|
|
184
|
+
} from "./chunk-HNMXYYJR.js";
|
|
185
|
+
import "./chunk-ELT65PZW.js";
|
|
186
|
+
import "./chunk-AL2V7U3E.js";
|
|
187
|
+
import "./chunk-4PWB7JRR.js";
|
|
188
|
+
import {
|
|
189
|
+
canonicalizeToolNames
|
|
190
|
+
} from "./chunk-ZZ2MH7LE.js";
|
|
174
191
|
import "./chunk-5MIDPSSK.js";
|
|
175
192
|
import {
|
|
176
193
|
extractCustomId
|
|
@@ -179,15 +196,19 @@ import "./chunk-3ASDTTEI.js";
|
|
|
179
196
|
import {
|
|
180
197
|
compactWhitespace
|
|
181
198
|
} from "./chunk-DWLEOOGR.js";
|
|
182
|
-
import "./chunk-MYMMNKYL.js";
|
|
183
|
-
import "./chunk-CMKUBIGW.js";
|
|
184
|
-
import "./chunk-JBTJAPUF.js";
|
|
185
|
-
import "./chunk-ATNTHIZI.js";
|
|
186
199
|
import {
|
|
187
|
-
|
|
188
|
-
} from "./chunk-
|
|
189
|
-
import
|
|
190
|
-
|
|
200
|
+
queryRunRecords
|
|
201
|
+
} from "./chunk-TSIYZBTH.js";
|
|
202
|
+
import {
|
|
203
|
+
formatRunAge,
|
|
204
|
+
getAgentRunStatusIcon,
|
|
205
|
+
isAgentRunTerminalStatus,
|
|
206
|
+
runShowsLogTail,
|
|
207
|
+
shortRunId
|
|
208
|
+
} from "./chunk-FKXFCYVO.js";
|
|
209
|
+
import "./chunk-X7W4TNB4.js";
|
|
210
|
+
import "./chunk-ATNTHIZI.js";
|
|
211
|
+
import "./chunk-JBTJAPUF.js";
|
|
191
212
|
import {
|
|
192
213
|
runSelfUpdate
|
|
193
214
|
} from "./chunk-K6EUAOW3.js";
|
|
@@ -208,24 +229,24 @@ import {
|
|
|
208
229
|
import {
|
|
209
230
|
DEFAULT_NOLO_SERVER_URL
|
|
210
231
|
} from "./chunk-OLZBQWZU.js";
|
|
211
|
-
import "./chunk-
|
|
232
|
+
import "./chunk-RK5NYQEL.js";
|
|
212
233
|
import "./chunk-O6W2O2DA.js";
|
|
213
|
-
import "./chunk-
|
|
214
|
-
import "./chunk-
|
|
234
|
+
import "./chunk-UGUW3FHG.js";
|
|
235
|
+
import "./chunk-RVOUXDFU.js";
|
|
215
236
|
import "./chunk-Y5GCAMGP.js";
|
|
216
237
|
import "./chunk-KX6YBIHG.js";
|
|
217
|
-
import "./chunk-
|
|
218
|
-
import "./chunk-
|
|
219
|
-
import "./chunk-O4BU24WZ.js";
|
|
220
|
-
import "./chunk-I42VC5KR.js";
|
|
238
|
+
import "./chunk-XRZJGPFI.js";
|
|
239
|
+
import "./chunk-6Y7A3OQQ.js";
|
|
221
240
|
import "./chunk-WWC7I6TA.js";
|
|
222
|
-
import "./chunk-
|
|
241
|
+
import "./chunk-SKDNBYZK.js";
|
|
242
|
+
import "./chunk-I42VC5KR.js";
|
|
223
243
|
import {
|
|
224
244
|
asTrimmedLowercaseString
|
|
225
245
|
} from "./chunk-QSJ3HFEF.js";
|
|
226
|
-
import "./chunk-
|
|
227
|
-
import "./chunk-
|
|
228
|
-
import "./chunk-
|
|
246
|
+
import "./chunk-X4Q4UZEY.js";
|
|
247
|
+
import "./chunk-3ND52WIL.js";
|
|
248
|
+
import "./chunk-XMLRJUU5.js";
|
|
249
|
+
import "./chunk-R5V5G73M.js";
|
|
229
250
|
import "./chunk-GBRG75BQ.js";
|
|
230
251
|
import "./chunk-3EUW3WEO.js";
|
|
231
252
|
import "./chunk-U6VC4MU4.js";
|
|
@@ -249,7 +270,7 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
249
270
|
import { join } from "node:path";
|
|
250
271
|
var DEFAULT_CLI_PACKS = ["code", "agent-orchestration", "skills"];
|
|
251
272
|
var DEFAULT_CLI_PLATFORM_TOOLS = [
|
|
252
|
-
"
|
|
273
|
+
"ask_user",
|
|
253
274
|
"exa_search",
|
|
254
275
|
"fetchWebpage"
|
|
255
276
|
];
|
|
@@ -757,7 +778,7 @@ function createRawKeyReader(input) {
|
|
|
757
778
|
let buffer = "";
|
|
758
779
|
const tryParseSequence = () => {
|
|
759
780
|
if (!buffer) return null;
|
|
760
|
-
if (isSubmit(buffer)
|
|
781
|
+
if (isSubmit(buffer)) {
|
|
761
782
|
const sequence2 = buffer;
|
|
762
783
|
buffer = "";
|
|
763
784
|
return sequence2;
|
|
@@ -780,6 +801,7 @@ function createRawKeyReader(input) {
|
|
|
780
801
|
return candidate;
|
|
781
802
|
}
|
|
782
803
|
}
|
|
804
|
+
if (buffer === "\x1B") return void 0;
|
|
783
805
|
if (buffer.length >= 8) {
|
|
784
806
|
buffer = "";
|
|
785
807
|
return null;
|
|
@@ -791,16 +813,38 @@ function createRawKeyReader(input) {
|
|
|
791
813
|
return sequence;
|
|
792
814
|
};
|
|
793
815
|
let waiter = null;
|
|
816
|
+
let escTimer = null;
|
|
794
817
|
const tryDeliver = () => {
|
|
795
818
|
if (!waiter || !buffer) return;
|
|
796
819
|
const parsed = tryParseSequence();
|
|
797
|
-
if (parsed === void 0)
|
|
820
|
+
if (parsed === void 0) {
|
|
821
|
+
if (buffer === "\x1B" && !escTimer) {
|
|
822
|
+
escTimer = setTimeout(() => {
|
|
823
|
+
escTimer = null;
|
|
824
|
+
if (waiter && buffer === "\x1B") {
|
|
825
|
+
const resolve3 = waiter;
|
|
826
|
+
waiter = null;
|
|
827
|
+
buffer = "";
|
|
828
|
+
resolve3("\x1B");
|
|
829
|
+
}
|
|
830
|
+
}, 30);
|
|
831
|
+
}
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
if (escTimer) {
|
|
835
|
+
clearTimeout(escTimer);
|
|
836
|
+
escTimer = null;
|
|
837
|
+
}
|
|
798
838
|
const resolve2 = waiter;
|
|
799
839
|
waiter = null;
|
|
800
840
|
resolve2(parsed);
|
|
801
841
|
};
|
|
802
842
|
const onData = (chunk) => {
|
|
803
843
|
buffer += typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8");
|
|
844
|
+
if (escTimer) {
|
|
845
|
+
clearTimeout(escTimer);
|
|
846
|
+
escTimer = null;
|
|
847
|
+
}
|
|
804
848
|
tryDeliver();
|
|
805
849
|
};
|
|
806
850
|
input.on("data", onData);
|
|
@@ -810,6 +854,10 @@ function createRawKeyReader(input) {
|
|
|
810
854
|
tryDeliver();
|
|
811
855
|
});
|
|
812
856
|
reader.dispose = () => {
|
|
857
|
+
if (escTimer) {
|
|
858
|
+
clearTimeout(escTimer);
|
|
859
|
+
escTimer = null;
|
|
860
|
+
}
|
|
813
861
|
waiter = null;
|
|
814
862
|
input.off("data", onData);
|
|
815
863
|
};
|
|
@@ -832,7 +880,6 @@ async function runSelectDialog(args) {
|
|
|
832
880
|
const output = args.output ?? process.stdout;
|
|
833
881
|
const input = args.input ?? process.stdin;
|
|
834
882
|
const readKey = args.readKey ?? createRawKeyReader(input);
|
|
835
|
-
output.write("\x1B[?1006h\x1B[?1000h");
|
|
836
883
|
const wasRaw = Boolean(input.isTTY && input.isRaw);
|
|
837
884
|
let renderedLineCount = 0;
|
|
838
885
|
const bottomAnchored = Boolean(args.bottomAnchored && args.bottomRow);
|
|
@@ -883,14 +930,15 @@ async function runSelectDialog(args) {
|
|
|
883
930
|
};
|
|
884
931
|
const resizeTarget = output;
|
|
885
932
|
const onOutputResize = () => paint();
|
|
886
|
-
if (input.isTTY && !wasRaw) {
|
|
887
|
-
input.setRawMode?.(true);
|
|
888
|
-
}
|
|
889
|
-
if (bottomAnchored && outputIsTty(output)) {
|
|
890
|
-
resizeTarget.on?.("resize", onOutputResize);
|
|
891
|
-
}
|
|
892
|
-
paint();
|
|
893
933
|
try {
|
|
934
|
+
output.write("\x1B[?1006h\x1B[?1000h");
|
|
935
|
+
if (input.isTTY && !wasRaw) {
|
|
936
|
+
input.setRawMode?.(true);
|
|
937
|
+
}
|
|
938
|
+
if (bottomAnchored && outputIsTty(output)) {
|
|
939
|
+
resizeTarget.on?.("resize", onOutputResize);
|
|
940
|
+
}
|
|
941
|
+
paint();
|
|
894
942
|
while (true) {
|
|
895
943
|
const sequence = await readKey();
|
|
896
944
|
if (sequence == null) {
|
|
@@ -898,6 +946,9 @@ async function runSelectDialog(args) {
|
|
|
898
946
|
}
|
|
899
947
|
const scrollAction = parseScrollAction(sequence);
|
|
900
948
|
if (scrollAction === "wheel-up" || scrollAction === "wheel-down") {
|
|
949
|
+
if (args.wheelPolicy === "ignore") {
|
|
950
|
+
continue;
|
|
951
|
+
}
|
|
901
952
|
selectedIndex = Math.min(
|
|
902
953
|
Math.max(
|
|
903
954
|
selectedIndex + (scrollAction === "wheel-up" ? -1 : 1),
|
|
@@ -1013,6 +1064,11 @@ async function runConfirmDialog(args) {
|
|
|
1013
1064
|
titleLines,
|
|
1014
1065
|
input,
|
|
1015
1066
|
output,
|
|
1067
|
+
// confirm is a non-list modal: a wheel scroll must do nothing at all — no
|
|
1068
|
+
// highlight move, no repaint, no cancel (spec). Without this it would
|
|
1069
|
+
// inherit runSelectDialog's default "move" and let the wheel flip
|
|
1070
|
+
// Allow/Deny, which is the opposite of the intended silent-swallow.
|
|
1071
|
+
wheelPolicy: "ignore",
|
|
1016
1072
|
...args.readKey ? { readKey: args.readKey } : {},
|
|
1017
1073
|
...args.bottomAnchored ? { bottomAnchored: args.bottomAnchored } : {},
|
|
1018
1074
|
...args.bottomRow ? { bottomRow: args.bottomRow } : {}
|
|
@@ -1366,7 +1422,6 @@ async function runAskChoiceDialog(args) {
|
|
|
1366
1422
|
const output = args.output ?? process.stdout;
|
|
1367
1423
|
const input = args.input ?? process.stdin;
|
|
1368
1424
|
const readKey = args.readKey ?? createRawKeyReader(input);
|
|
1369
|
-
output.write("\x1B[?1006h\x1B[?1000h");
|
|
1370
1425
|
const wasRaw = Boolean(input.isTTY && input.isRaw);
|
|
1371
1426
|
let renderedLineCount = 0;
|
|
1372
1427
|
const bottomAnchored = Boolean(args.bottomAnchored && args.bottomRow);
|
|
@@ -1443,14 +1498,15 @@ async function runAskChoiceDialog(args) {
|
|
|
1443
1498
|
};
|
|
1444
1499
|
const resizeTarget = output;
|
|
1445
1500
|
const onOutputResize = () => paint();
|
|
1446
|
-
if (input.isTTY && !wasRaw) {
|
|
1447
|
-
input.setRawMode?.(true);
|
|
1448
|
-
}
|
|
1449
|
-
if (bottomAnchored && outputIsTty(output)) {
|
|
1450
|
-
resizeTarget.on?.("resize", onOutputResize);
|
|
1451
|
-
}
|
|
1452
|
-
paint();
|
|
1453
1501
|
try {
|
|
1502
|
+
output.write("\x1B[?1006h\x1B[?1000h");
|
|
1503
|
+
if (input.isTTY && !wasRaw) {
|
|
1504
|
+
input.setRawMode?.(true);
|
|
1505
|
+
}
|
|
1506
|
+
if (bottomAnchored && outputIsTty(output)) {
|
|
1507
|
+
resizeTarget.on?.("resize", onOutputResize);
|
|
1508
|
+
}
|
|
1509
|
+
paint();
|
|
1454
1510
|
while (state.phase === "active") {
|
|
1455
1511
|
const sequence = await readKey();
|
|
1456
1512
|
if (sequence == null) {
|
|
@@ -1466,6 +1522,9 @@ async function runAskChoiceDialog(args) {
|
|
|
1466
1522
|
paint();
|
|
1467
1523
|
continue;
|
|
1468
1524
|
}
|
|
1525
|
+
if (SGR_MOUSE_REGEX.test(sequence)) {
|
|
1526
|
+
continue;
|
|
1527
|
+
}
|
|
1469
1528
|
let action = null;
|
|
1470
1529
|
const qs = state.questionStates[state.activeIndex];
|
|
1471
1530
|
const q = state.questions[state.activeIndex];
|
|
@@ -1718,7 +1777,7 @@ function createActivityIndicator(deps) {
|
|
|
1718
1777
|
}
|
|
1719
1778
|
}
|
|
1720
1779
|
if (agentRunSnapshot) {
|
|
1721
|
-
lines.push(...formatAgentRunPanelLines(agentRunSnapshot, colorEnabled));
|
|
1780
|
+
lines.push(...formatAgentRunPanelLines(agentRunSnapshot, colorEnabled, now()));
|
|
1722
1781
|
}
|
|
1723
1782
|
return lines.length > 0 ? lines : null;
|
|
1724
1783
|
};
|
|
@@ -1747,52 +1806,56 @@ function createActivityIndicator(deps) {
|
|
|
1747
1806
|
stop
|
|
1748
1807
|
};
|
|
1749
1808
|
}
|
|
1750
|
-
function
|
|
1809
|
+
function formatPanelProgress(snapshot) {
|
|
1810
|
+
const parts = [];
|
|
1811
|
+
if (typeof snapshot.toolCallCount === "number" && Number.isFinite(snapshot.toolCallCount)) {
|
|
1812
|
+
parts.push(`${snapshot.toolCallCount} tools`);
|
|
1813
|
+
}
|
|
1814
|
+
if (snapshot.lastToolNames && snapshot.lastToolNames.length > 0) {
|
|
1815
|
+
parts.push(snapshot.lastToolNames.join(", "));
|
|
1816
|
+
}
|
|
1817
|
+
return parts.length > 0 ? ` \xB7 ${parts.join(" \xB7 ")}` : "";
|
|
1818
|
+
}
|
|
1819
|
+
function formatPanelDetail(snapshot) {
|
|
1820
|
+
const note = snapshot.lastAssistantText?.trim();
|
|
1821
|
+
if (note) return note;
|
|
1822
|
+
if (!runShowsLogTail(snapshot.status)) return "";
|
|
1823
|
+
const lines = snapshot.logLines;
|
|
1824
|
+
if (!lines || lines.length === 0) return "";
|
|
1825
|
+
return lines[lines.length - 1]?.trim() ?? "";
|
|
1826
|
+
}
|
|
1827
|
+
function formatAgentRunPanelLines(snapshot, colorEnabled, now = Date.now()) {
|
|
1751
1828
|
const lines = [];
|
|
1752
1829
|
const name = snapshot.agentName || "sub-agent";
|
|
1753
|
-
const
|
|
1830
|
+
const short = shortRunId(snapshot.runId);
|
|
1831
|
+
const runId = short ? ` (${short})` : "";
|
|
1754
1832
|
const status = snapshot.status || "running";
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
if (status === "completed" || status === "finished" || status === "success") {
|
|
1758
|
-
statusSymbol = "\u2713";
|
|
1759
|
-
statusColor = "success";
|
|
1760
|
-
} else if (status === "killed" || status === "cancelled" || status === "failed" || status === "stopped") {
|
|
1761
|
-
statusSymbol = "\u{1F534}";
|
|
1762
|
-
statusColor = "danger";
|
|
1763
|
-
}
|
|
1764
|
-
const pollPart = snapshot.polls !== void 0 ? ` (polls: ${snapshot.polls})` : "";
|
|
1833
|
+
const statusSymbol = getAgentRunStatusIcon(status);
|
|
1834
|
+
const statusColor = !isAgentRunTerminalStatus(status) ? "warning" : status === "done" ? "success" : "danger";
|
|
1765
1835
|
const errPart = snapshot.errorMessage ? ` \xB7 ${snapshot.errorMessage}` : "";
|
|
1836
|
+
const progressPart = formatPanelProgress(snapshot);
|
|
1837
|
+
const age = formatRunAge(snapshot, now);
|
|
1838
|
+
const agePart = age ? ` \xB7 ${age}` : "";
|
|
1766
1839
|
if (!colorEnabled) {
|
|
1767
|
-
lines.push(
|
|
1840
|
+
lines.push(
|
|
1841
|
+
`\u{1F916} Sub-Agent: ${name}${runId} \xB7 ${statusSymbol} ${status}${agePart}${progressPart}${errPart}`
|
|
1842
|
+
);
|
|
1768
1843
|
} else {
|
|
1769
1844
|
const botIcon = themeText("\u{1F916}", "accent", true);
|
|
1770
1845
|
const labelText = themeText(" Sub-Agent: ", "muted", true);
|
|
1771
1846
|
const nameText = themeText(`${name}${runId}`, "chrome", true);
|
|
1772
1847
|
const statusText = themeText(` \xB7 ${statusSymbol} ${status}`, statusColor, true);
|
|
1773
|
-
const
|
|
1848
|
+
const ageText = agePart ? themeText(agePart, "chrome") : "";
|
|
1849
|
+
const progressText = progressPart ? themeText(progressPart, "chrome") : "";
|
|
1774
1850
|
const errorText = errPart ? themeText(errPart, "danger") : "";
|
|
1775
|
-
lines.push(`${botIcon}${labelText}${nameText}${statusText}${
|
|
1776
|
-
}
|
|
1777
|
-
let logLine;
|
|
1778
|
-
if (snapshot.logTail) {
|
|
1779
|
-
const trimmed = snapshot.logTail.trim();
|
|
1780
|
-
if (trimmed) {
|
|
1781
|
-
const parts = trimmed.split(/\r?\n/);
|
|
1782
|
-
logLine = parts[parts.length - 1];
|
|
1783
|
-
}
|
|
1784
|
-
} else if (snapshot.logLines && snapshot.logLines.length > 0) {
|
|
1785
|
-
logLine = snapshot.logLines[snapshot.logLines.length - 1];
|
|
1851
|
+
lines.push(`${botIcon}${labelText}${nameText}${statusText}${ageText}${progressText}${errorText}`);
|
|
1786
1852
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1853
|
+
const detail = formatPanelDetail(snapshot);
|
|
1854
|
+
if (detail) {
|
|
1789
1855
|
if (!colorEnabled) {
|
|
1790
|
-
lines.push(` \u2514
|
|
1856
|
+
lines.push(` \u2514 ${detail}`);
|
|
1791
1857
|
} else {
|
|
1792
|
-
|
|
1793
|
-
const logTag = themeText("Log: ", "muted");
|
|
1794
|
-
const logContent = themeText(cleanLog, "chrome");
|
|
1795
|
-
lines.push(`${branchChar}${logTag}${logContent}`);
|
|
1858
|
+
lines.push(`${themeText(" \u2514 ", "muted")}${themeText(detail, "chrome")}`);
|
|
1796
1859
|
}
|
|
1797
1860
|
}
|
|
1798
1861
|
return lines;
|
|
@@ -1931,6 +1994,7 @@ function mergeCatalogEntries(currentKey, platformAgents, privateAgents, favorite
|
|
|
1931
1994
|
}
|
|
1932
1995
|
var agentCatalogCache = null;
|
|
1933
1996
|
var agentCatalogRefreshInFlight = null;
|
|
1997
|
+
var agentCatalogRawLoadInFlight = null;
|
|
1934
1998
|
var AGENT_CATALOG_FRESH_MS = 15e3;
|
|
1935
1999
|
async function loadAgentCatalog(args) {
|
|
1936
2000
|
const env = args.env ?? process.env;
|
|
@@ -1944,13 +2008,38 @@ async function loadAgentCatalog(args) {
|
|
|
1944
2008
|
}
|
|
1945
2009
|
return cached.entries;
|
|
1946
2010
|
}
|
|
1947
|
-
|
|
2011
|
+
let rawData;
|
|
2012
|
+
if (agentCatalogRawLoadInFlight) {
|
|
2013
|
+
rawData = await agentCatalogRawLoadInFlight;
|
|
2014
|
+
} else {
|
|
2015
|
+
const promise = fetchRawCatalogData(args, env);
|
|
2016
|
+
agentCatalogRawLoadInFlight = promise;
|
|
2017
|
+
try {
|
|
2018
|
+
rawData = await promise;
|
|
2019
|
+
} catch (error) {
|
|
2020
|
+
agentCatalogRawLoadInFlight = null;
|
|
2021
|
+
throw error;
|
|
2022
|
+
}
|
|
2023
|
+
agentCatalogRawLoadInFlight = null;
|
|
2024
|
+
}
|
|
2025
|
+
const entries = mergeCatalogEntries(
|
|
2026
|
+
args.currentKey,
|
|
2027
|
+
resolveCatalogPlatformAgents(env),
|
|
2028
|
+
rawData.privateAgents,
|
|
2029
|
+
rawData.favoritedAtByKey
|
|
2030
|
+
);
|
|
1948
2031
|
agentCatalogCache = { cacheKey, at: Date.now(), entries };
|
|
1949
2032
|
return entries;
|
|
1950
2033
|
}
|
|
1951
2034
|
function refreshAgentCatalogInBackground(args, env, cacheKey) {
|
|
1952
2035
|
if (agentCatalogRefreshInFlight) return;
|
|
1953
|
-
agentCatalogRefreshInFlight =
|
|
2036
|
+
agentCatalogRefreshInFlight = fetchRawCatalogData(args, env).then((rawData) => {
|
|
2037
|
+
const entries = mergeCatalogEntries(
|
|
2038
|
+
args.currentKey,
|
|
2039
|
+
resolveCatalogPlatformAgents(env),
|
|
2040
|
+
rawData.privateAgents,
|
|
2041
|
+
rawData.favoritedAtByKey
|
|
2042
|
+
);
|
|
1954
2043
|
agentCatalogCache = { cacheKey, at: Date.now(), entries };
|
|
1955
2044
|
}).catch(() => {
|
|
1956
2045
|
}).finally(() => {
|
|
@@ -1961,17 +2050,13 @@ function prefetchAgentCatalog(args) {
|
|
|
1961
2050
|
void loadAgentCatalog({ ...args, currentKey: "" }).catch(() => {
|
|
1962
2051
|
});
|
|
1963
2052
|
}
|
|
1964
|
-
async function
|
|
2053
|
+
async function fetchRawCatalogData(args, env) {
|
|
1965
2054
|
const fetchImpl = args.fetchImpl ?? fetch;
|
|
1966
2055
|
const fallbackFetchImpl = args.fallbackFetchImpl;
|
|
1967
2056
|
const authToken = resolveAuthToken([], env);
|
|
1968
2057
|
const userId = authToken ? parseUserIdFromAuthToken(authToken) : null;
|
|
1969
2058
|
if (!authToken || !userId) {
|
|
1970
|
-
return
|
|
1971
|
-
args.currentKey,
|
|
1972
|
-
resolveCatalogPlatformAgents(env),
|
|
1973
|
-
[]
|
|
1974
|
-
);
|
|
2059
|
+
return { privateAgents: [], favoritedAtByKey: {} };
|
|
1975
2060
|
}
|
|
1976
2061
|
const serverUrl = resolveServerUrl(env);
|
|
1977
2062
|
const serverUrls = resolveServerCandidates([], env, serverUrl);
|
|
@@ -2009,12 +2094,7 @@ async function fetchAgentCatalog(args, env) {
|
|
|
2009
2094
|
}
|
|
2010
2095
|
}
|
|
2011
2096
|
const favoritedAtByKey = await favoritesPromise;
|
|
2012
|
-
return
|
|
2013
|
-
args.currentKey,
|
|
2014
|
-
resolveCatalogPlatformAgents(env),
|
|
2015
|
-
privateAgents,
|
|
2016
|
-
favoritedAtByKey
|
|
2017
|
-
);
|
|
2097
|
+
return { privateAgents, favoritedAtByKey };
|
|
2018
2098
|
}
|
|
2019
2099
|
function renderAgentCatalogList(entries, currentKey) {
|
|
2020
2100
|
const lines = ["Agents:"];
|
|
@@ -2076,12 +2156,23 @@ async function runAgentPicker(args) {
|
|
|
2076
2156
|
const output = args.output ?? process.stdout;
|
|
2077
2157
|
const input = args.input ?? process.stdin;
|
|
2078
2158
|
const interactive = args.interactive ?? ("isTTY" in input && Boolean(input.isTTY) && "isTTY" in output && Boolean(output.isTTY));
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2159
|
+
const isTty = outputIsTty(output);
|
|
2160
|
+
if (isTty) {
|
|
2161
|
+
output.write(t("agentPickerLoading"));
|
|
2162
|
+
}
|
|
2163
|
+
let entries;
|
|
2164
|
+
try {
|
|
2165
|
+
entries = await loadAgentCatalog({
|
|
2166
|
+
env: args.env,
|
|
2167
|
+
currentKey: args.currentKey,
|
|
2168
|
+
fetchImpl: args.fetchImpl,
|
|
2169
|
+
fallbackFetchImpl: args.fallbackFetchImpl
|
|
2170
|
+
});
|
|
2171
|
+
} finally {
|
|
2172
|
+
if (isTty) {
|
|
2173
|
+
output.write("\r\x1B[2K");
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2085
2176
|
if (!interactive) {
|
|
2086
2177
|
return {
|
|
2087
2178
|
kind: "list",
|
|
@@ -2709,7 +2800,6 @@ function renderContextPanel(state, colorEnabled = resolveCliColorEnabled()) {
|
|
|
2709
2800
|
t("contextFieldProfile"),
|
|
2710
2801
|
t("contextFieldRuntime"),
|
|
2711
2802
|
t("contextFieldTools"),
|
|
2712
|
-
t("contextFieldThinking"),
|
|
2713
2803
|
t("contextFieldServer")
|
|
2714
2804
|
];
|
|
2715
2805
|
let maxW = 0;
|
|
@@ -2740,8 +2830,7 @@ function renderContextPanel(state, colorEnabled = resolveCliColorEnabled()) {
|
|
|
2740
2830
|
field(labels[5], state.profileName),
|
|
2741
2831
|
field(labels[6], state.runtimeMode),
|
|
2742
2832
|
field(labels[7], state.toolDisplay),
|
|
2743
|
-
field(labels[8], state.
|
|
2744
|
-
field(labels[9], state.serverUrl),
|
|
2833
|
+
field(labels[8], state.serverUrl),
|
|
2745
2834
|
"",
|
|
2746
2835
|
themeText(t("contextNext"), "chrome", colorEnabled),
|
|
2747
2836
|
next("/agents ", ` ${t("contextNextAgents")}`),
|
|
@@ -3079,10 +3168,6 @@ function createInitialTuiState(env = process.env) {
|
|
|
3079
3168
|
runtimeMode,
|
|
3080
3169
|
modeLabel: asOptionalTrimmedString(env.NOLO_CLI_STATUS_MODE) ?? runtimeMode,
|
|
3081
3170
|
gitStatus: void 0,
|
|
3082
|
-
thinkingDisplay: normalizeThinkingDisplayMode(
|
|
3083
|
-
env.NOLO_CLI_THINKING ?? env.NOLO_THINKING,
|
|
3084
|
-
"hide"
|
|
3085
|
-
),
|
|
3086
3171
|
toolDisplay: normalizeToolDisplayMode(env.NOLO_CLI_TOOLS ?? env.NOLO_TOOLS, "compact"),
|
|
3087
3172
|
contextWindow: resolveAgentContextWindow({
|
|
3088
3173
|
agentKey,
|
|
@@ -3269,26 +3354,6 @@ function handleTuiInput(input, state) {
|
|
|
3269
3354
|
output: t("toolsSet", nextMode)
|
|
3270
3355
|
};
|
|
3271
3356
|
}
|
|
3272
|
-
case "/thinking": {
|
|
3273
|
-
if (!argText) {
|
|
3274
|
-
return {
|
|
3275
|
-
nextState: state,
|
|
3276
|
-
output: t("thinkingCurrent", state.thinkingDisplay)
|
|
3277
|
-
};
|
|
3278
|
-
}
|
|
3279
|
-
const normalizedArg = asTrimmedLowercaseString(argText);
|
|
3280
|
-
if (!["hide", "marker", "show", "on", "off"].includes(normalizedArg)) {
|
|
3281
|
-
return {
|
|
3282
|
-
nextState: state,
|
|
3283
|
-
output: t("thinkingUsage")
|
|
3284
|
-
};
|
|
3285
|
-
}
|
|
3286
|
-
const nextMode = normalizeThinkingDisplayMode(normalizedArg, state.thinkingDisplay);
|
|
3287
|
-
return {
|
|
3288
|
-
nextState: { ...state, thinkingDisplay: nextMode },
|
|
3289
|
-
output: t("thinkingSet", nextMode)
|
|
3290
|
-
};
|
|
3291
|
-
}
|
|
3292
3357
|
case "/tasks":
|
|
3293
3358
|
case "/jobs":
|
|
3294
3359
|
case "/procs": {
|
|
@@ -3599,6 +3664,7 @@ function handleTuiInput(input, state) {
|
|
|
3599
3664
|
}
|
|
3600
3665
|
|
|
3601
3666
|
// packages/cli/tui/detectBackground.ts
|
|
3667
|
+
import { execFileSync } from "node:child_process";
|
|
3602
3668
|
import { ReadStream } from "node:tty";
|
|
3603
3669
|
var OSC11_QUERY = "\x1B]11;?\x07";
|
|
3604
3670
|
var OSC11_REPLY_RE = /\x1b\]11;rgb:([0-9a-f]+)\/([0-9a-f]+)\/([0-9a-f]+)/i;
|
|
@@ -3627,7 +3693,7 @@ function parseOsc11Background(reply) {
|
|
|
3627
3693
|
function isTerminalDevice(stream) {
|
|
3628
3694
|
return stream instanceof ReadStream;
|
|
3629
3695
|
}
|
|
3630
|
-
async function
|
|
3696
|
+
async function probeTerminalBackground(args = {}) {
|
|
3631
3697
|
const stdin = args.stdin ?? process.stdin;
|
|
3632
3698
|
const stdout = args.stdout ?? process.stdout;
|
|
3633
3699
|
const timeoutMs = args.timeoutMs ?? 100;
|
|
@@ -3670,6 +3736,48 @@ async function detectTerminalBackground(args = {}) {
|
|
|
3670
3736
|
timer = setTimeout(() => finish(null), timeoutMs);
|
|
3671
3737
|
});
|
|
3672
3738
|
}
|
|
3739
|
+
async function detectTerminalBackground(args = {}) {
|
|
3740
|
+
const r = await probeTerminalBackground(args);
|
|
3741
|
+
if (r || !args.allowSystemFallback) return r;
|
|
3742
|
+
const brightness = detectSystemBrightness(process.env, { allowSubprocess: true });
|
|
3743
|
+
return brightness ? { brightness, hex: "" } : null;
|
|
3744
|
+
}
|
|
3745
|
+
function detectSystemBrightness(env = process.env, options = {}) {
|
|
3746
|
+
const envResult = detectSystemBrightnessFromEnv(env);
|
|
3747
|
+
if (envResult) return envResult;
|
|
3748
|
+
const allowSubprocess = options.allowSubprocess ?? false;
|
|
3749
|
+
if (!allowSubprocess) {
|
|
3750
|
+
return null;
|
|
3751
|
+
}
|
|
3752
|
+
if (process.platform === "darwin") {
|
|
3753
|
+
try {
|
|
3754
|
+
const out = execFileSync("defaults", ["read", "-g", "AppleInterfaceStyle"], {
|
|
3755
|
+
encoding: "utf8",
|
|
3756
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
3757
|
+
timeout: 200
|
|
3758
|
+
}).trim();
|
|
3759
|
+
if (out.toLowerCase() === "dark") return "dark";
|
|
3760
|
+
} catch {
|
|
3761
|
+
}
|
|
3762
|
+
} else if (process.platform === "linux") {
|
|
3763
|
+
try {
|
|
3764
|
+
const out = execFileSync(
|
|
3765
|
+
"gsettings",
|
|
3766
|
+
["get", "org.gnome.desktop.interface", "color-scheme"],
|
|
3767
|
+
{
|
|
3768
|
+
encoding: "utf8",
|
|
3769
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
3770
|
+
timeout: 200
|
|
3771
|
+
}
|
|
3772
|
+
).trim();
|
|
3773
|
+
const val = out.toLowerCase();
|
|
3774
|
+
if (/(?:^|[\s\-_:])dark(?:$|[\s\-_:])/i.test(val)) return "dark";
|
|
3775
|
+
if (/(?:^|[\s\-_:])light(?:$|[\s\-_:])/i.test(val)) return "light";
|
|
3776
|
+
} catch {
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
return null;
|
|
3780
|
+
}
|
|
3673
3781
|
|
|
3674
3782
|
// packages/core/chat/chatQueueMachine.ts
|
|
3675
3783
|
var initialChatQueueState = {
|
|
@@ -4765,6 +4873,47 @@ ${content}`;
|
|
|
4765
4873
|
return null;
|
|
4766
4874
|
}
|
|
4767
4875
|
var autoRouteByDialog = /* @__PURE__ */ new Map();
|
|
4876
|
+
function toOverlayStatus(status) {
|
|
4877
|
+
switch (status) {
|
|
4878
|
+
case "running":
|
|
4879
|
+
return "running";
|
|
4880
|
+
case "done":
|
|
4881
|
+
return "done";
|
|
4882
|
+
case "failed":
|
|
4883
|
+
case "timeout":
|
|
4884
|
+
case "killed":
|
|
4885
|
+
return "failed";
|
|
4886
|
+
case "orphaned":
|
|
4887
|
+
return "orphaned";
|
|
4888
|
+
default:
|
|
4889
|
+
return "running";
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4892
|
+
function buildTuiRunOverlay(parentDialogId) {
|
|
4893
|
+
if (!parentDialogId) return null;
|
|
4894
|
+
let runs;
|
|
4895
|
+
try {
|
|
4896
|
+
runs = queryRunRecords({ parentDialogId }, { env: process.env }).runs;
|
|
4897
|
+
} catch {
|
|
4898
|
+
return null;
|
|
4899
|
+
}
|
|
4900
|
+
if (runs.length === 0) return null;
|
|
4901
|
+
let overlay = initialRunOverlayState;
|
|
4902
|
+
for (const run of runs) {
|
|
4903
|
+
overlay = reduceRunOverlay(overlay, {
|
|
4904
|
+
type: "run-state-chg",
|
|
4905
|
+
runId: run.runId,
|
|
4906
|
+
info: {
|
|
4907
|
+
name: run.agentName ?? run.agentKey ?? run.runId,
|
|
4908
|
+
status: toOverlayStatus(run.status),
|
|
4909
|
+
batchId: run.batchId,
|
|
4910
|
+
parentDialogId: run.parentDialogId,
|
|
4911
|
+
...run.status === "failed" && run.note ? { errorMessage: run.note } : {}
|
|
4912
|
+
}
|
|
4913
|
+
});
|
|
4914
|
+
}
|
|
4915
|
+
return buildOverlayPresentation(overlay);
|
|
4916
|
+
}
|
|
4768
4917
|
async function runAgentChat(scriptDir, state, message, env, output, agentRunner = runAgentTurn, options = {}) {
|
|
4769
4918
|
let effectiveAgentKey = state.agentKey;
|
|
4770
4919
|
let effectiveAgentName = state.agentName;
|
|
@@ -4888,12 +5037,12 @@ async function runAgentChat(scriptDir, state, message, env, output, agentRunner
|
|
|
4888
5037
|
serverUrl: state.serverUrl,
|
|
4889
5038
|
message: effectiveMessage,
|
|
4890
5039
|
continueDialogId: state.dialogId,
|
|
5040
|
+
...state.agentKey === DEFAULT_TUI_AGENT_KEY && env.NOLO_AUTO_ROUTE !== "0" ? { dialogAgentMode: "auto" } : { dialogAgentMode: "fixed" },
|
|
4891
5041
|
runtimeMode: state.runtimeMode,
|
|
4892
5042
|
localRuntimeCwd: process.cwd(),
|
|
4893
5043
|
scriptDir,
|
|
4894
5044
|
env: {
|
|
4895
5045
|
...env,
|
|
4896
|
-
NOLO_CLI_THINKING: state.thinkingDisplay,
|
|
4897
5046
|
NOLO_CLI_TOOLS: state.toolDisplay
|
|
4898
5047
|
},
|
|
4899
5048
|
output,
|
|
@@ -4902,14 +5051,21 @@ async function runAgentChat(scriptDir, state, message, env, output, agentRunner
|
|
|
4902
5051
|
...options.confirmDestructiveAction ? { confirmDestructiveAction: options.confirmDestructiveAction } : {},
|
|
4903
5052
|
...options.requestUserChoice ? { requestUserChoice: options.requestUserChoice } : {},
|
|
4904
5053
|
...options.abortSignal ? { abortSignal: options.abortSignal } : {},
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
5054
|
+
// Always inject a local adapter factory so background run delegations from
|
|
5055
|
+
// inside a TUI turn are stamped with the current conversation. Previously
|
|
5056
|
+
// this factory only existed when pasted text was present, which meant a
|
|
5057
|
+
// plain (no-paste) turn had no injection point for parentDialogId and the
|
|
5058
|
+
// run-overlay could never see runs spawned this turn.
|
|
5059
|
+
...options.pastedTextStore?.items.size ? { pastedTextStore: options.pastedTextStore } : {},
|
|
5060
|
+
localRuntimeAdapterFactory: (factoryEnv, factoryOptions) => createCliLocalRuntimeAdapter({
|
|
5061
|
+
env: factoryEnv,
|
|
5062
|
+
cwd: factoryOptions?.cwd ?? state.cwd,
|
|
5063
|
+
...options.pastedTextStore ? { pastedTextStore: options.pastedTextStore } : {},
|
|
5064
|
+
// Stamp spawned background runs with the current TUI dialog so the
|
|
5065
|
+
// run-overlay can filter runs belonging to this conversation.
|
|
5066
|
+
...state.dialogId ? { parentDialogId: state.dialogId } : {},
|
|
5067
|
+
...options.activityReporter ? { activityReporter: options.activityReporter } : {}
|
|
5068
|
+
}),
|
|
4913
5069
|
...options.activityReporter ? { activityReporter: options.activityReporter } : {},
|
|
4914
5070
|
...skillAllowedTools !== void 0 ? { allowedToolNames: skillAllowedTools } : {},
|
|
4915
5071
|
...contextBlockScopes.length > 0 ? { contextBlockScopes } : {}
|
|
@@ -5151,7 +5307,8 @@ async function startTuiWorkspace(options) {
|
|
|
5151
5307
|
}
|
|
5152
5308
|
const detected = await detectTerminalBackground({
|
|
5153
5309
|
stdin: input,
|
|
5154
|
-
stdout: output
|
|
5310
|
+
stdout: output,
|
|
5311
|
+
allowSystemFallback: true
|
|
5155
5312
|
});
|
|
5156
5313
|
if (detected) {
|
|
5157
5314
|
setActiveBrightness(detected.brightness);
|
|
@@ -5317,7 +5474,8 @@ async function startTuiWorkspace(options) {
|
|
|
5317
5474
|
if (!isInteractiveInput(input)) return;
|
|
5318
5475
|
const detected2 = await detectTerminalBackground({
|
|
5319
5476
|
stdin: input,
|
|
5320
|
-
stdout: output
|
|
5477
|
+
stdout: output,
|
|
5478
|
+
allowSystemFallback: true
|
|
5321
5479
|
});
|
|
5322
5480
|
if (sessionEnded) return;
|
|
5323
5481
|
if (!detected2) {
|
|
@@ -5348,6 +5506,7 @@ async function startTuiWorkspace(options) {
|
|
|
5348
5506
|
forcedStop = false;
|
|
5349
5507
|
turnEpoch += 1;
|
|
5350
5508
|
const myEpoch = turnEpoch;
|
|
5509
|
+
const turnParentDialogId = state.dialogId;
|
|
5351
5510
|
history.followBottom = true;
|
|
5352
5511
|
startTurn(history, "user");
|
|
5353
5512
|
appendToCurrentTurn(history, message);
|
|
@@ -5463,6 +5622,14 @@ async function startTuiWorkspace(options) {
|
|
|
5463
5622
|
emitCommandOutput(t("dialogNotSavedHint"));
|
|
5464
5623
|
}
|
|
5465
5624
|
}
|
|
5625
|
+
if (!wasAborted) {
|
|
5626
|
+
const overlayText = buildTuiRunOverlay(turnParentDialogId);
|
|
5627
|
+
if (overlayText) {
|
|
5628
|
+
emitCommandOutput(`
|
|
5629
|
+
\u4F60\u7684 run \u8FDB\u5C55\uFF1A
|
|
5630
|
+
${overlayText}`);
|
|
5631
|
+
}
|
|
5632
|
+
}
|
|
5466
5633
|
return { ok: !wasAborted, aborted: wasAborted };
|
|
5467
5634
|
} finally {
|
|
5468
5635
|
activityIndicator.stop();
|
|
@@ -5613,7 +5780,8 @@ async function startTuiWorkspace(options) {
|
|
|
5613
5780
|
if (result.action?.type === "theme-refresh") {
|
|
5614
5781
|
const detected2 = await detectTerminalBackground({
|
|
5615
5782
|
stdin: input,
|
|
5616
|
-
stdout: output
|
|
5783
|
+
stdout: output,
|
|
5784
|
+
allowSystemFallback: true
|
|
5617
5785
|
});
|
|
5618
5786
|
if (detected2 && applyDetectedBackground(detected2)) {
|
|
5619
5787
|
emitCommandOutput(t("themeRefreshed", detected2.brightness));
|
|
@@ -6329,6 +6497,7 @@ export {
|
|
|
6329
6497
|
applyOutputChunkToCurrentTurn,
|
|
6330
6498
|
applyScrollAction,
|
|
6331
6499
|
applyTerminalOutputToText,
|
|
6500
|
+
buildTuiRunOverlay,
|
|
6332
6501
|
countPhysicalLines,
|
|
6333
6502
|
createFixedInput,
|
|
6334
6503
|
createHistoryOutputStream,
|