nolo-cli 0.84.0-alpha.1 → 0.84.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/README.md +2 -2
- package/{_executeModel-IULR47HG.js → _executeModel-BPUR2QYH.js} +51 -50
- package/{action-D22U6CTH.js → action-P4TNFGAD.js} +11 -11
- package/{addContentAction-XAPUTGL4.js → addContentAction-MB2HHMDZ.js} +9 -9
- package/{addDialogAgentAction-M7VLLBZM.js → addDialogAgentAction-S2NRBCWW.js} +9 -9
- package/{agentDeleteCommand-2S4WCDQC.js → agentDeleteCommand-MNAA6MIG.js} +32 -30
- package/{agentEmailCommands-V3ADGHX7.js → agentEmailCommands-SK34WJKU.js} +70 -66
- package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-EPK3S274.js → agentListCommands-I26MKI4T.js} +55 -36
- package/{agentMachineCommands-XMZWK7P3.js → agentMachineCommands-M6QDR6P3.js} +32 -30
- package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-X3UNW77C.js} +87 -0
- package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-O5MPVJ5E.js} +3 -3
- package/agentRecordCommands-HTHLO2MM.js +129 -0
- package/{agentRunCommand-VUWNWC7C.js → agentRunCommand-IAIRCMTH.js} +70 -65
- package/{agentRunControl-T44MESII.js → agentRunControl-AVJR4JW4.js} +2 -2
- package/{agentRuntimeLocal-YRONTDLM.js → agentRuntimeLocal-3WTYYIT2.js} +32 -26
- package/{agentSlice-2P7OJFES.js → agentSlice-TVP3HINW.js} +10 -10
- package/{appDeleteCommands-YS7UGMP3.js → appDeleteCommands-SB5TNLKY.js} +32 -30
- package/{appDeployCommands-XIE5Z4BE.js → appDeployCommands-2IPKZINV.js} +32 -30
- package/{appDeployStatusCommands-54UDVYET.js → appDeployStatusCommands-K63TFUID.js} +32 -30
- package/{appGetCommands-6XYLBCRN.js → appGetCommands-VU2SLNEH.js} +32 -30
- package/{appListCommands-VEGH7SF5.js → appListCommands-S3T4DJ36.js} +32 -30
- package/{authCommand-JIEOFHXW.js → authCommand-HGP2XTKC.js} +185 -28
- package/{authCommands-ILTBI6JV.js → authCommands-RGOGCPP6.js} +4 -5
- package/builtinSkillRegistry-Q2VVY3SC.js +33 -0
- package/{chatQueueReduxAdapter-GPYCH5Z2.js → chatQueueReduxAdapter-TWIYKVIZ.js} +25 -25
- package/{chromeCommands-VOIRNJBL.js → chromeCommands-FZYAU75D.js} +1 -1
- package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-62P2Q2YB.js} +31 -1
- package/{chunk-C3FZR5EC.js → chunk-2F7RJC6L.js} +1 -1
- package/{chunk-BOYUESO7.js → chunk-3AMA42ZI.js} +1 -1
- package/{chunk-RZOJRTKR.js → chunk-3BGIKIPF.js} +444 -920
- package/{chunk-HQUORJTM.js → chunk-3BMYXEUW.js} +1 -1
- package/{chunk-EBKMQULC.js → chunk-3IUWIAHP.js} +13 -15
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-4SZ37KLL.js → chunk-3VUWPRFW.js} +50 -30
- package/{chunk-WL2RKIBF.js → chunk-3YIAR5UI.js} +1 -1
- package/{chunk-DWUCB2A3.js → chunk-42V6BK2E.js} +1 -1
- package/{chunk-AX7RMXSH.js → chunk-4MK3I7Y4.js} +38 -4
- package/{chunk-PF6O3GR3.js → chunk-52Q2IW2X.js} +1340 -1273
- package/{chunk-Y3NZYLPG.js → chunk-5MEYHVIB.js} +1 -1
- package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
- package/chunk-5ZUL4CUO.js +10 -0
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-E6RGHPDR.js → chunk-6D6VBVEW.js} +4 -6
- package/{chunk-FZGV4FGK.js → chunk-6GFOD3TK.js} +260 -140
- package/{chunk-TMPLPCVX.js → chunk-6OZ36FXI.js} +2 -2
- package/{chunk-PZM3EENV.js → chunk-6Z7MY3V7.js} +1 -1
- package/{chunk-BYEJ7K2Z.js → chunk-7S4YWN7P.js} +1 -1
- package/{chunk-SREASRV5.js → chunk-ABQYVJBJ.js} +1 -1
- package/chunk-ACTMNVHM.js +93 -0
- package/{chunk-ZZCJUXUI.js → chunk-AHAHBQMU.js} +2 -2
- package/{chunk-BJCWNHVU.js → chunk-BFDFRLLQ.js} +2 -2
- package/chunk-BMQ2MJUK.js +153 -0
- package/chunk-BNGW5ASC.js +344 -0
- package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
- package/{chunk-73BR2IQT.js → chunk-CWQINZEA.js} +127 -7
- package/{chunk-HTMVBPOF.js → chunk-DD6XE56O.js} +19 -72
- package/{chunk-CADAR6QU.js → chunk-EYAQT56M.js} +4 -3
- package/{chunk-CJCJF5XB.js → chunk-FDTR4QJ6.js} +4 -2
- package/{chunk-D6XYLSOS.js → chunk-FKNWP6SG.js} +1 -1
- package/{chunk-3VPDELAP.js → chunk-FP76KI2Y.js} +1500 -84
- package/chunk-FV3JEYR3.js +870 -0
- package/{chunk-GCJ3IS5M.js → chunk-GIVFXPWK.js} +177 -6
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-LHDV2QUI.js → chunk-GNCCNNZD.js} +4 -2
- package/{chunk-XWNRAIUL.js → chunk-GP5LKBUZ.js} +6 -16
- package/{chunk-PZCTYKGU.js → chunk-GQBOR3G6.js} +2 -2
- package/{chunk-NFT2AOK5.js → chunk-H4AHY5BU.js} +13 -85
- package/{chunk-FNGAF7C4.js → chunk-HAFJ3NDE.js} +137 -12
- package/{chunk-ZVN6I33J.js → chunk-HCT7U36O.js} +9 -5
- package/{chunk-7QVPPOEC.js → chunk-HKNXJGEC.js} +43 -43
- package/{chunk-3JQ2NRYU.js → chunk-HVURBGF3.js} +4 -4
- package/{chunk-OZX2IPKM.js → chunk-HYJFRTLW.js} +2 -2
- package/{chunk-HH65VA5U.js → chunk-I3TQJXQ7.js} +109 -6
- package/{chunk-UDQWGU7F.js → chunk-J4MOO56S.js} +1 -1
- package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
- package/{chunk-6XIE5ZGI.js → chunk-JPGCXHNM.js} +1 -1
- package/{chunk-DUJWWUGV.js → chunk-K36IXSCQ.js} +1 -1
- package/{chunk-KRMWO2NN.js → chunk-KAUSRTO6.js} +3 -3
- package/{chunk-7FWPLK4M.js → chunk-LJ5VW2UJ.js} +1 -1
- package/{chunk-GHEJJGJI.js → chunk-LMREEBWT.js} +833 -109
- package/{chunk-RXX4GDIH.js → chunk-LS2ZANRJ.js} +1 -1
- package/chunk-LVIFM7VW.js +1625 -0
- package/{chunk-BJIRLHJR.js → chunk-M2EJHDJP.js} +4 -0
- package/{chunk-EVBFYPDC.js → chunk-MC4XLIJ7.js} +6 -2
- package/{chunk-KEZNSFGD.js → chunk-MZYBSTMH.js} +11 -173
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-MXUSPS2N.js → chunk-OIVSQH2O.js} +1510 -1592
- package/{chunk-E36HZARC.js → chunk-P5EVSOPA.js} +93 -17
- package/{chunk-SZLVDREM.js → chunk-PBA4UJBK.js} +3 -3
- package/{chunk-URWDSZRW.js → chunk-PMAIQX7A.js} +3 -3
- package/{chunk-AETZ7AD6.js → chunk-Q554LLSI.js} +1 -1
- package/{chunk-AJHEFRGJ.js → chunk-Q67DOFOO.js} +214 -5
- package/{chunk-UZ6XXCVR.js → chunk-QDSINZM3.js} +15 -2
- package/{chunk-NRALD3CC.js → chunk-QSHEEA5N.js} +54 -10
- package/chunk-QU7KDSZX.js +677 -0
- package/{chunk-T25L377S.js → chunk-RPJUFEGR.js} +10 -10
- package/{chunk-QCZX4FTW.js → chunk-SH43IESU.js} +173 -15
- package/{chunk-SPAQ4PVV.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-BKJO7LDP.js → chunk-U4OKDZFH.js} +6 -6
- package/{chunk-DM4FBSWG.js → chunk-UDVH2P4A.js} +7 -7
- package/{chunk-4EJ5QYB5.js → chunk-UEVXFHQB.js} +2 -2
- package/{chunk-JYYZCK2Z.js → chunk-V7E4PXQD.js} +1 -1
- package/{chunk-NHRQCXIQ.js → chunk-VMFTFOWF.js} +13 -3
- package/{chunk-YFADVSZE.js → chunk-VRTTFDBM.js} +7 -6
- package/{chunk-U7YP7ECK.js → chunk-WP5UXDA5.js} +84 -13
- package/{chunk-5J7W2VWW.js → chunk-WV42OMV7.js} +6 -265
- package/{chunk-3QPYFHAH.js → chunk-XD2MJFUG.js} +1 -1
- package/{chunk-IDGYOD2O.js → chunk-XP3VVAPG.js} +3174 -223
- package/{chunk-ETLZZQJE.js → chunk-Z2PV6O2T.js} +121 -26
- package/{chunk-BZNGCVAW.js → chunk-Z5625XML.js} +4 -4
- package/{contentThunks-THSCADSK.js → contentThunks-JYWI7G7I.js} +26 -26
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-REAWYVTY.js} +2 -2
- package/{createAgentAutomationAction-WGN3UQ5A.js → createAgentAutomationAction-Z4SUJ54Y.js} +26 -26
- package/{createDialogAction-3EN2NLH7.js → createDialogAction-RCHFLVJ2.js} +29 -29
- package/{createPageAction-4VK473QV.js → createPageAction-YK2253XQ.js} +28 -28
- package/{dbSlice-GKGGFNOB.js → dbSlice-A6C6H32X.js} +8 -8
- package/{deleteFile-LWSR674W.js → deleteFile-YG6QMJLU.js} +3 -3
- package/{dialogCommands-PS4NWYY7.js → dialogCommands-X4UOZQWX.js} +36 -32
- package/{dialogSlice-CLV7SVOZ.js → dialogSlice-IVTWLCE2.js} +31 -25
- package/{docCreateCommands-4KANZJR6.js → docCreateCommands-VD6TGHG4.js} +33 -31
- package/{docDeleteCommands-F2S2TRUF.js → docDeleteCommands-OT3R2G4W.js} +34 -32
- package/{docReadCommands-B2WDPZQE.js → docReadCommands-2G7BIXSH.js} +33 -31
- package/{docStore-TDLCHWPF.js → docStore-UENKCCDX.js} +9 -9
- package/{docUpdateCommands-E7TKHRIO.js → docUpdateCommands-45MVJKZA.js} +33 -31
- package/{fetchMessages-DRABNDPZ.js → fetchMessages-EIU7UFFK.js} +3 -4
- package/{getPricing-QVTUQQTM.js → getPricing-LUSEABA6.js} +4 -4
- package/{handleSendMessageAction-AHL3ZHE4.js → handleSendMessageAction-LM2J4HC3.js} +66 -74
- package/index.js +99 -86
- package/{localDialogRead-PUQKFI73.js → localDialogRead-BTFJ4V2I.js} +2 -2
- package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
- package/{machineCommands-OTABVXOA.js → machineCommands-6N6MQIE6.js} +69 -65
- package/{machineWsRunDispatch-V4EVQSMZ.js → machineWsRunDispatch-7MFKVQCR.js} +65 -61
- package/{memberThunks-KATHH3F4.js → memberThunks-P2ECUJ56.js} +9 -9
- package/{models-GS72DVJS.js → models-T3SG6MJ5.js} +2 -2
- package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/providerPresetApply-XI3WUPTI.js +214 -0
- package/providerRegistry-KEPWWGXD.js +31 -0
- package/{read-LC6HVYBN.js → read-COE3ZYR6.js} +5 -4
- package/{readDocTool-N3ERJHHF.js → readDocTool-5USN4A6V.js} +1 -1
- package/{readlineWorkspace-IIT3FQ6I.js → readlineWorkspace-JWBON5CX.js} +291 -135
- package/{removeDialogAgentAction-F5GPTALR.js → removeDialogAgentAction-W66BJ7CF.js} +12 -12
- package/{runAgentClientLoop-7TQM7IAR.js → runAgentClientLoop-TA4SSPHE.js} +49 -49
- package/{runtimeDoctorCommands-CROTMULY.js → runtimeDoctorCommands-X6WDBEQX.js} +2 -2
- package/{setDialogExtraReferencesAction-AY4ZCF3A.js → setDialogExtraReferencesAction-2ALKG3WA.js} +10 -10
- package/{setPrimaryDialogAgentAction-HPMG7V3R.js → setPrimaryDialogAgentAction-TQZB55F6.js} +12 -12
- package/{settingSlice-OEJA4NQO.js → settingSlice-P4ZW7K5X.js} +10 -10
- package/{spaceCommands-FSYH7AL4.js → spaceCommands-6NSAXB7D.js} +31 -29
- package/{streamAgentChatTurn-6EF6TVFK.js → streamAgentChatTurn-X5ENGUIS.js} +126 -65
- package/{switchDialogAgentAction-HMDZTZ4I.js → switchDialogAgentAction-3KI72HHS.js} +9 -9
- package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
- package/{toolApiClient-VGYUB4P5.js → toolApiClient-G3M73RTB.js} +3 -3
- package/{tools-R3QNWWTD.js → tools-XRQR7ZZR.js} +45 -45
- package/tuiSummaryLlmCaller-UFGFOIIW.js +128 -0
- package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
- package/{updateDialogTitleAction-F3EUOWOB.js → updateDialogTitleAction-ESUUD3GT.js} +46 -29
- package/agentRecordCommands-WFPWLWOF.js +0 -125
- package/chunk-FMODTASJ.js +0 -109
- package/chunk-I42VC5KR.js +0 -15
- package/chunk-NB5SIWC4.js +0 -611
- package/chunk-NG4UT4K4.js +0 -79
- package/codingSkills-7S6523WH.js +0 -48
- package/tuiSummaryLlmCaller-PWOXTCBF.js +0 -116
- package/{chunk-3RAG2NAD.js → chunk-UKWGR5SS.js} +3 -3
- package/{db-VQSAOWAO.js → db-WK5MDZVN.js} +1 -1
- package/{localRuntimeAuthority-R5UBODT3.js → localRuntimeAuthority-6IR6BBXE.js} +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./chunk-M3JEW6N6.js";
|
|
2
1
|
import {
|
|
3
2
|
defaultOpenBrowser,
|
|
4
3
|
saveTokenLogin
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6D6VBVEW.js";
|
|
6
5
|
import {
|
|
7
6
|
isScheduledDialog,
|
|
8
7
|
normalizeDialogRecord,
|
|
9
8
|
readDialogSnapshot,
|
|
10
9
|
sortDialogs
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HAFJ3NDE.js";
|
|
11
|
+
import "./chunk-M3JEW6N6.js";
|
|
12
12
|
import {
|
|
13
13
|
ANSI_ESCAPE_REGEX,
|
|
14
14
|
COLLAPSED_PASTE_PLACEHOLDER_RE,
|
|
@@ -72,21 +72,23 @@ import {
|
|
|
72
72
|
wrapTextToLines,
|
|
73
73
|
wrapTranscriptLine,
|
|
74
74
|
wrapTranscriptLineWithLayout
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FP76KI2Y.js";
|
|
76
76
|
import "./chunk-S7Z2HMCN.js";
|
|
77
|
+
import "./chunk-V7E4PXQD.js";
|
|
78
|
+
import "./chunk-ESHYE7WU.js";
|
|
77
79
|
import {
|
|
80
|
+
formatQuotaSummary,
|
|
78
81
|
listFavoriteAgentIdsAcrossServers,
|
|
79
82
|
listLocalCachedAgents,
|
|
80
83
|
listRemoteAgents,
|
|
81
84
|
listRemoteAgentsAcrossServers,
|
|
82
85
|
normalizeListedAgent
|
|
83
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-WP5UXDA5.js";
|
|
84
87
|
import "./chunk-ID4G2MAR.js";
|
|
85
88
|
import {
|
|
86
89
|
listUserRecordsFromServers,
|
|
87
90
|
readLiveDbRecordAfterTombstoneMerge
|
|
88
|
-
} from "./chunk-
|
|
89
|
-
import "./chunk-JYYZCK2Z.js";
|
|
91
|
+
} from "./chunk-3YIAR5UI.js";
|
|
90
92
|
import {
|
|
91
93
|
RUN_WAKE_CHANNEL_ENV,
|
|
92
94
|
createCliLocalRuntimeAdapter,
|
|
@@ -96,52 +98,51 @@ import {
|
|
|
96
98
|
readTimestamp,
|
|
97
99
|
setCliLocale,
|
|
98
100
|
t
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-QCZX4FTW.js";
|
|
101
|
+
} from "./chunk-LMREEBWT.js";
|
|
102
|
+
import "./chunk-Z5625XML.js";
|
|
102
103
|
import "./chunk-EADNWBAZ.js";
|
|
104
|
+
import "./chunk-SH43IESU.js";
|
|
103
105
|
import {
|
|
104
106
|
backfillRunRecordParentDialog,
|
|
105
107
|
checkStaleRun,
|
|
106
108
|
isRunRecordClaimed,
|
|
107
109
|
listRunRecords,
|
|
108
110
|
readRunRecord
|
|
109
|
-
} from "./chunk-
|
|
110
|
-
import "./chunk-
|
|
111
|
+
} from "./chunk-I3TQJXQ7.js";
|
|
112
|
+
import "./chunk-42V6BK2E.js";
|
|
111
113
|
import {
|
|
112
114
|
getReadableCliDb
|
|
113
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-LS2ZANRJ.js";
|
|
114
116
|
import {
|
|
115
117
|
deleteDbRecord,
|
|
116
118
|
queryUserRecords,
|
|
117
119
|
readDbRecord
|
|
118
|
-
} from "./chunk-
|
|
119
|
-
import "./chunk-
|
|
120
|
+
} from "./chunk-QSHEEA5N.js";
|
|
121
|
+
import "./chunk-3AMA42ZI.js";
|
|
120
122
|
import {
|
|
121
123
|
NOLO_DEFAULT_AGENT_KEY,
|
|
122
124
|
resolveCliAgentKeyInput
|
|
123
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-SV5IJK6K.js";
|
|
124
126
|
import {
|
|
125
127
|
createChatQueueRuntime,
|
|
126
128
|
createTurnRequest,
|
|
127
129
|
normalizeRunCompletionShape
|
|
128
130
|
} from "./chunk-YPREESF4.js";
|
|
129
131
|
import "./chunk-MP64VFGD.js";
|
|
130
|
-
import "./chunk-ESHYE7WU.js";
|
|
131
132
|
import "./chunk-JBTJAPUF.js";
|
|
132
133
|
import "./chunk-LTRXGFMS.js";
|
|
133
|
-
import "./chunk-
|
|
134
|
+
import "./chunk-XD2MJFUG.js";
|
|
134
135
|
import "./chunk-ATNTHIZI.js";
|
|
135
136
|
import "./chunk-JEXVIMYZ.js";
|
|
136
137
|
import {
|
|
137
138
|
prepareTools
|
|
138
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-KAUSRTO6.js";
|
|
139
140
|
import {
|
|
140
141
|
buildResponseGuidelines
|
|
141
142
|
} from "./chunk-EOARMOVD.js";
|
|
142
143
|
import "./chunk-HS7MLR74.js";
|
|
143
|
-
import "./chunk-
|
|
144
|
-
import "./chunk-
|
|
144
|
+
import "./chunk-3BGIKIPF.js";
|
|
145
|
+
import "./chunk-5UTFL4QJ.js";
|
|
145
146
|
import "./chunk-NF64D32W.js";
|
|
146
147
|
import "./chunk-3L2WKC3W.js";
|
|
147
148
|
import {
|
|
@@ -154,48 +155,51 @@ import {
|
|
|
154
155
|
resolveRunLabel,
|
|
155
156
|
runShowsLogTail,
|
|
156
157
|
shortRunId
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-
|
|
158
|
+
} from "./chunk-3VNWWVKB.js";
|
|
159
|
+
import "./chunk-CWQINZEA.js";
|
|
159
160
|
import "./chunk-KQHGZWSV.js";
|
|
160
|
-
import "./chunk-
|
|
161
|
-
import "./chunk-
|
|
162
|
-
import "./chunk-
|
|
163
|
-
import "./chunk-
|
|
161
|
+
import "./chunk-J4MOO56S.js";
|
|
162
|
+
import "./chunk-6Z7MY3V7.js";
|
|
163
|
+
import "./chunk-EYAQT56M.js";
|
|
164
|
+
import "./chunk-VIDPVFP3.js";
|
|
165
|
+
import "./chunk-HYJFRTLW.js";
|
|
166
|
+
import "./chunk-UEVXFHQB.js";
|
|
167
|
+
import "./chunk-BMQ2MJUK.js";
|
|
164
168
|
import "./chunk-N4G4PKQ6.js";
|
|
165
|
-
import "./chunk-
|
|
169
|
+
import "./chunk-6GFOD3TK.js";
|
|
166
170
|
import "./chunk-MEYIRKDN.js";
|
|
167
171
|
import "./chunk-63W5N6P3.js";
|
|
168
172
|
import "./chunk-VF4K2QE6.js";
|
|
169
|
-
import "./chunk-
|
|
170
|
-
import "./chunk-
|
|
171
|
-
import "./chunk-
|
|
173
|
+
import "./chunk-PMAIQX7A.js";
|
|
174
|
+
import "./chunk-MZYBSTMH.js";
|
|
175
|
+
import "./chunk-3IUWIAHP.js";
|
|
172
176
|
import "./chunk-ZJ7UHBJS.js";
|
|
173
177
|
import {
|
|
174
178
|
extractReferenceKeysFromMessage
|
|
175
|
-
} from "./chunk-
|
|
176
|
-
import "./chunk-
|
|
177
|
-
import "./chunk-
|
|
179
|
+
} from "./chunk-XP3VVAPG.js";
|
|
180
|
+
import "./chunk-MC4XLIJ7.js";
|
|
181
|
+
import "./chunk-3BMYXEUW.js";
|
|
178
182
|
import "./chunk-YYLHWIW6.js";
|
|
179
183
|
import "./chunk-AGGIDPCZ.js";
|
|
180
|
-
import "./chunk-
|
|
181
|
-
import "./chunk-
|
|
184
|
+
import "./chunk-UDVH2P4A.js";
|
|
185
|
+
import "./chunk-BFDFRLLQ.js";
|
|
182
186
|
import "./chunk-5RGU3J7P.js";
|
|
183
|
-
import "./chunk-
|
|
187
|
+
import "./chunk-6D2JFXLY.js";
|
|
184
188
|
import "./chunk-M76ECQRD.js";
|
|
185
189
|
import "./chunk-YDH3FDFQ.js";
|
|
186
190
|
import "./chunk-URMS4XY2.js";
|
|
187
191
|
import "./chunk-TRV2MIDW.js";
|
|
188
|
-
import "./chunk-
|
|
192
|
+
import "./chunk-2F7RJC6L.js";
|
|
189
193
|
import "./chunk-GLKOYSRU.js";
|
|
190
194
|
import {
|
|
191
195
|
buildSkillDiscoveryContextBlock,
|
|
192
196
|
buildSkillDiscoveryContextLayer
|
|
193
197
|
} from "./chunk-E4MARS3Q.js";
|
|
194
|
-
import "./chunk-
|
|
198
|
+
import "./chunk-LVIFM7VW.js";
|
|
195
199
|
import {
|
|
196
200
|
expandEnabledPacks
|
|
197
|
-
} from "./chunk-
|
|
198
|
-
import "./chunk-
|
|
201
|
+
} from "./chunk-GIVFXPWK.js";
|
|
202
|
+
import "./chunk-Q554LLSI.js";
|
|
199
203
|
import "./chunk-KHCLMKZZ.js";
|
|
200
204
|
import {
|
|
201
205
|
buildLocalWorkspaceOpenAiTools,
|
|
@@ -203,33 +207,36 @@ import {
|
|
|
203
207
|
formatToolOverflowMarker,
|
|
204
208
|
getProcessRegistry,
|
|
205
209
|
readCommandActionGatePayload
|
|
206
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-52Q2IW2X.js";
|
|
211
|
+
import "./chunk-H4AHY5BU.js";
|
|
212
|
+
import "./chunk-FV3JEYR3.js";
|
|
213
|
+
import "./chunk-GMZLP5DV.js";
|
|
207
214
|
import "./chunk-ZNFJWEN4.js";
|
|
208
|
-
import "./chunk-
|
|
209
|
-
import "./chunk-FMODTASJ.js";
|
|
210
|
-
import "./chunk-AX7RMXSH.js";
|
|
215
|
+
import "./chunk-4MK3I7Y4.js";
|
|
211
216
|
import "./chunk-CQ3WA2NE.js";
|
|
217
|
+
import "./chunk-5ZUL4CUO.js";
|
|
212
218
|
import "./chunk-N7J63Q6C.js";
|
|
213
219
|
import {
|
|
220
|
+
DELETE_SAFETY_RED_LINE,
|
|
214
221
|
buildIdentityBlock,
|
|
215
222
|
buildRuntimeGuidanceBlocks,
|
|
216
223
|
resolveToolGuidedSections
|
|
217
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-Z2PV6O2T.js";
|
|
218
225
|
import "./chunk-PUOC4YRO.js";
|
|
219
|
-
import "./chunk-
|
|
226
|
+
import "./chunk-HCT7U36O.js";
|
|
220
227
|
import {
|
|
221
228
|
isQuotaExhaustedError
|
|
222
|
-
} from "./chunk-
|
|
223
|
-
import "./chunk-
|
|
229
|
+
} from "./chunk-FDTR4QJ6.js";
|
|
230
|
+
import "./chunk-GNCCNNZD.js";
|
|
224
231
|
import {
|
|
225
232
|
resolvePlatformAuthToken
|
|
226
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-6OZ36FXI.js";
|
|
227
234
|
import "./chunk-2MBTWINN.js";
|
|
228
235
|
import {
|
|
229
236
|
DEFAULT_CONTEXT_WINDOW,
|
|
230
237
|
getModelContextWindow,
|
|
231
238
|
normalizeUsage
|
|
232
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-HKNXJGEC.js";
|
|
233
240
|
import {
|
|
234
241
|
buildCompactionMetricsFromPlan,
|
|
235
242
|
buildCompactionUserContent,
|
|
@@ -239,17 +246,17 @@ import {
|
|
|
239
246
|
formatMessagesForSummaryWithTruncation,
|
|
240
247
|
planCompression,
|
|
241
248
|
serializeMessageContent
|
|
242
|
-
} from "./chunk-
|
|
243
|
-
import "./chunk-PZCTYKGU.js";
|
|
249
|
+
} from "./chunk-P5EVSOPA.js";
|
|
244
250
|
import {
|
|
245
251
|
estimateTokenCount
|
|
246
252
|
} from "./chunk-PSCNXBYA.js";
|
|
253
|
+
import "./chunk-GQBOR3G6.js";
|
|
247
254
|
import "./chunk-BYXBJQAS.js";
|
|
248
|
-
import "./chunk-
|
|
255
|
+
import "./chunk-OIVSQH2O.js";
|
|
249
256
|
import {
|
|
250
257
|
compactWhitespace
|
|
251
258
|
} from "./chunk-DWLEOOGR.js";
|
|
252
|
-
import "./chunk-
|
|
259
|
+
import "./chunk-HVURBGF3.js";
|
|
253
260
|
import "./chunk-ONXOABJR.js";
|
|
254
261
|
import "./chunk-W7XHHYWM.js";
|
|
255
262
|
import {
|
|
@@ -267,11 +274,11 @@ import {
|
|
|
267
274
|
import {
|
|
268
275
|
canonicalizeToolNames
|
|
269
276
|
} from "./chunk-O6OSWFZQ.js";
|
|
270
|
-
import "./chunk-
|
|
277
|
+
import "./chunk-7S4YWN7P.js";
|
|
271
278
|
import {
|
|
272
279
|
checkForCliUpdate,
|
|
273
280
|
runSelfUpdateDetailed
|
|
274
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-JEDZAO7L.js";
|
|
275
282
|
import {
|
|
276
283
|
getAgentSelectionAuditPath,
|
|
277
284
|
getDefaultProfileConfigPath,
|
|
@@ -281,7 +288,7 @@ import {
|
|
|
281
288
|
saveProfileAgentSelection,
|
|
282
289
|
saveProfileLocale,
|
|
283
290
|
saveProfileTokens
|
|
284
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-BYMV6QZG.js";
|
|
285
292
|
import {
|
|
286
293
|
readPipeText,
|
|
287
294
|
spawnProcess
|
|
@@ -295,41 +302,41 @@ import {
|
|
|
295
302
|
import {
|
|
296
303
|
DEFAULT_NOLO_SERVER_URL
|
|
297
304
|
} from "./chunk-OLZBQWZU.js";
|
|
298
|
-
import "./chunk-
|
|
299
|
-
import "./chunk-
|
|
300
|
-
import "./chunk-
|
|
301
|
-
import "./chunk-
|
|
305
|
+
import "./chunk-ACTMNVHM.js";
|
|
306
|
+
import "./chunk-Q67DOFOO.js";
|
|
307
|
+
import "./chunk-PBA4UJBK.js";
|
|
308
|
+
import "./chunk-GP5LKBUZ.js";
|
|
302
309
|
import "./chunk-Y5GCAMGP.js";
|
|
303
|
-
import "./chunk-
|
|
310
|
+
import "./chunk-QDSINZM3.js";
|
|
304
311
|
import "./chunk-KX6YBIHG.js";
|
|
305
|
-
import "./chunk-
|
|
312
|
+
import "./chunk-AHAHBQMU.js";
|
|
306
313
|
import "./chunk-UAD2WT54.js";
|
|
307
|
-
import "./chunk-
|
|
308
|
-
import "./chunk-
|
|
314
|
+
import "./chunk-VRTTFDBM.js";
|
|
315
|
+
import "./chunk-VMFTFOWF.js";
|
|
309
316
|
import "./chunk-WWC7I6TA.js";
|
|
310
|
-
import "./chunk-
|
|
311
|
-
import "./chunk-SREASRV5.js";
|
|
317
|
+
import "./chunk-ABQYVJBJ.js";
|
|
312
318
|
import {
|
|
313
319
|
asTrimmedLowercaseString
|
|
314
320
|
} from "./chunk-QSJ3HFEF.js";
|
|
321
|
+
import "./chunk-WV42OMV7.js";
|
|
315
322
|
import {
|
|
316
323
|
BUILTIN_NOLO_AGENT_KEY,
|
|
317
324
|
BUILTIN_NOLO_AGENT_MODEL,
|
|
318
325
|
BUILTIN_NOLO_AGENT_NAME,
|
|
319
326
|
builtinAgentCatalogEntryById
|
|
320
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-BNGW5ASC.js";
|
|
321
328
|
import {
|
|
322
329
|
extractCustomId,
|
|
323
330
|
parsePublicAgentId
|
|
324
|
-
} from "./chunk-
|
|
325
|
-
import "./chunk-
|
|
331
|
+
} from "./chunk-M2EJHDJP.js";
|
|
332
|
+
import "./chunk-UKWGR5SS.js";
|
|
326
333
|
import "./chunk-QOKAKDPE.js";
|
|
327
334
|
import "./chunk-OW765XBU.js";
|
|
328
335
|
import "./chunk-SEJ5OS6F.js";
|
|
329
336
|
import "./chunk-GBRG75BQ.js";
|
|
337
|
+
import "./chunk-KUG52IAP.js";
|
|
330
338
|
import "./chunk-3EUW3WEO.js";
|
|
331
339
|
import "./chunk-U6VC4MU4.js";
|
|
332
|
-
import "./chunk-KUG52IAP.js";
|
|
333
340
|
import "./chunk-LCBAMY2M.js";
|
|
334
341
|
import "./chunk-4SN6J65J.js";
|
|
335
342
|
import {
|
|
@@ -3022,11 +3029,23 @@ function formatPanelDetail(snapshot) {
|
|
|
3022
3029
|
if (!lines || lines.length === 0) return "";
|
|
3023
3030
|
return lines[lines.length - 1]?.trim() ?? "";
|
|
3024
3031
|
}
|
|
3032
|
+
var AUTO_IDENTITY_PATTERNS = [
|
|
3033
|
+
/^agent-[0-9a-f]{8,}-[a-z0-9]/i,
|
|
3034
|
+
/^agent-pub-[a-z0-9]{10,}$/i,
|
|
3035
|
+
/^run-\d{4}-\d{2}-\d{2}T[\d-]+Z-[a-z0-9]+$/i
|
|
3036
|
+
];
|
|
3037
|
+
function isAutoGeneratedIdentity(raw) {
|
|
3038
|
+
return AUTO_IDENTITY_PATTERNS.some((pattern) => pattern.test(raw));
|
|
3039
|
+
}
|
|
3040
|
+
function displayAgentName(snapshot) {
|
|
3041
|
+
const raw = snapshot.agentName?.trim();
|
|
3042
|
+
if (!raw) return "Sub-agent";
|
|
3043
|
+
if (isAutoGeneratedIdentity(raw)) return "Sub-agent";
|
|
3044
|
+
return raw;
|
|
3045
|
+
}
|
|
3025
3046
|
function formatAgentRunPanelLines(snapshot, colorEnabled, now = Date.now()) {
|
|
3026
3047
|
const lines = [];
|
|
3027
|
-
const name = snapshot
|
|
3028
|
-
const short = shortRunId(snapshot.runId);
|
|
3029
|
-
const runId = short ? ` (${short})` : "";
|
|
3048
|
+
const name = displayAgentName(snapshot);
|
|
3030
3049
|
const status = snapshot.status || "running";
|
|
3031
3050
|
const statusSymbol = getAgentRunStatusIcon(status);
|
|
3032
3051
|
const statusColor = runStatusTone(status);
|
|
@@ -3039,19 +3058,18 @@ function formatAgentRunPanelLines(snapshot, colorEnabled, now = Date.now()) {
|
|
|
3039
3058
|
const creditsPart = typeof snapshot.credits === "number" && Number.isFinite(snapshot.credits) ? ` \xB7 ${formatCreditsChip(snapshot.credits)}` : "";
|
|
3040
3059
|
if (!colorEnabled) {
|
|
3041
3060
|
lines.push(
|
|
3042
|
-
`\u{1F916}
|
|
3061
|
+
`\u{1F916} ${name} \xB7 ${statusSymbol} ${status}${unassignedPart}${agePart}${progressPart}${creditsPart}${errPart}`
|
|
3043
3062
|
);
|
|
3044
3063
|
} else {
|
|
3045
3064
|
const botIcon = themeText("\u{1F916}", "accent", true);
|
|
3046
|
-
const
|
|
3047
|
-
const nameText = themeText(`${name}${runId}`, "chrome", true);
|
|
3065
|
+
const nameText = themeText(` ${name}`, "chrome", true);
|
|
3048
3066
|
const statusText = themeText(` \xB7 ${statusSymbol} ${status}`, statusColor, true);
|
|
3049
3067
|
const unassignedText = unassignedPart ? themeText(unassignedPart, "muted") : "";
|
|
3050
3068
|
const ageText = agePart ? themeText(agePart, "chrome") : "";
|
|
3051
3069
|
const progressText = progressPart ? themeText(progressPart, "chrome") : "";
|
|
3052
3070
|
const creditsText = creditsPart ? themeText(creditsPart, "muted") : "";
|
|
3053
3071
|
const errorText = errPart ? themeText(errPart, "danger") : "";
|
|
3054
|
-
lines.push(`${botIcon}${
|
|
3072
|
+
lines.push(`${botIcon}${nameText}${statusText}${unassignedText}${ageText}${progressText}${creditsText}${errorText}`);
|
|
3055
3073
|
}
|
|
3056
3074
|
const detail = formatPanelDetail(snapshot);
|
|
3057
3075
|
if (detail) {
|
|
@@ -3233,7 +3251,7 @@ function formatRunDockLines(snapshots, colorEnabled, now = Date.now(), maxRows =
|
|
|
3233
3251
|
return lines;
|
|
3234
3252
|
}
|
|
3235
3253
|
function formatRunDockRow(snapshot, colorEnabled, now) {
|
|
3236
|
-
const name = snapshot
|
|
3254
|
+
const name = displayAgentName(snapshot);
|
|
3237
3255
|
const short = shortRunId(snapshot.runId);
|
|
3238
3256
|
const icon = getAgentRunStatusIcon(snapshot.status);
|
|
3239
3257
|
const terminal = isAgentRunTerminalStatus(snapshot.status);
|
|
@@ -3854,7 +3872,8 @@ function listedAgentToCatalogEntry(agent) {
|
|
|
3854
3872
|
kind: "private",
|
|
3855
3873
|
updatedAt: toUpdatedAt(agent.updatedAt),
|
|
3856
3874
|
...agent.apiSource ? { apiSource: agent.apiSource } : {},
|
|
3857
|
-
...agent.cliProvider ? { cliProvider: agent.cliProvider } : {}
|
|
3875
|
+
...agent.cliProvider ? { cliProvider: agent.cliProvider } : {},
|
|
3876
|
+
...agent.quota ? { quota: agent.quota } : {}
|
|
3858
3877
|
};
|
|
3859
3878
|
}
|
|
3860
3879
|
function mergeCatalogEntries(currentKey, platformAgents, privateAgents, favoritedAtByKey = {}) {
|
|
@@ -3889,7 +3908,7 @@ function mergeCatalogEntries(currentKey, platformAgents, privateAgents, favorite
|
|
|
3889
3908
|
}
|
|
3890
3909
|
var agentCatalogCache = null;
|
|
3891
3910
|
var agentCatalogRefreshInFlight = null;
|
|
3892
|
-
var agentCatalogRawLoadInFlight =
|
|
3911
|
+
var agentCatalogRawLoadInFlight = /* @__PURE__ */ new Map();
|
|
3893
3912
|
var AGENT_CATALOG_FRESH_MS = 15e3;
|
|
3894
3913
|
var AGENT_CATALOG_FOREGROUND_DEADLINE_MS = 2500;
|
|
3895
3914
|
var AGENT_CATALOG_BACKGROUND_DEADLINE_MS = 8e3;
|
|
@@ -3911,6 +3930,9 @@ function filterHealthyServers(serverUrls) {
|
|
|
3911
3930
|
});
|
|
3912
3931
|
return healthy.length > 0 ? healthy : serverUrls;
|
|
3913
3932
|
}
|
|
3933
|
+
function keepPrimaryServer(serverUrls, primary) {
|
|
3934
|
+
return serverUrls.includes(primary) ? serverUrls : [primary, ...serverUrls];
|
|
3935
|
+
}
|
|
3914
3936
|
function recordServerFailures(failures) {
|
|
3915
3937
|
const now = serverHealthNow();
|
|
3916
3938
|
for (const failure of failures) {
|
|
@@ -3984,18 +4006,20 @@ async function loadAgentCatalog(args) {
|
|
|
3984
4006
|
return cached.entries;
|
|
3985
4007
|
}
|
|
3986
4008
|
let rawData;
|
|
3987
|
-
|
|
3988
|
-
|
|
4009
|
+
const deadlineKind = args.deadlineKind ?? "foreground";
|
|
4010
|
+
const inFlight = agentCatalogRawLoadInFlight.get(deadlineKind);
|
|
4011
|
+
if (inFlight) {
|
|
4012
|
+
rawData = await inFlight;
|
|
3989
4013
|
} else {
|
|
3990
|
-
const promise = fetchRawCatalogData(args, env);
|
|
3991
|
-
agentCatalogRawLoadInFlight
|
|
4014
|
+
const promise = fetchRawCatalogData({ ...args, deadlineKind }, env);
|
|
4015
|
+
agentCatalogRawLoadInFlight.set(deadlineKind, promise);
|
|
3992
4016
|
try {
|
|
3993
4017
|
rawData = await promise;
|
|
3994
|
-
}
|
|
3995
|
-
agentCatalogRawLoadInFlight
|
|
3996
|
-
|
|
4018
|
+
} finally {
|
|
4019
|
+
if (agentCatalogRawLoadInFlight.get(deadlineKind) === promise) {
|
|
4020
|
+
agentCatalogRawLoadInFlight.delete(deadlineKind);
|
|
4021
|
+
}
|
|
3997
4022
|
}
|
|
3998
|
-
agentCatalogRawLoadInFlight = null;
|
|
3999
4023
|
}
|
|
4000
4024
|
const entries = mergeCatalogEntries(
|
|
4001
4025
|
args.currentKey,
|
|
@@ -4030,7 +4054,7 @@ function prefetchAgentCatalog(args) {
|
|
|
4030
4054
|
void (async () => {
|
|
4031
4055
|
await prefillCatalogFromLocalDb({ env: args.env, getDb: args.getDb }).catch(() => {
|
|
4032
4056
|
});
|
|
4033
|
-
void loadAgentCatalog({ ...args, currentKey: "" }).catch(() => {
|
|
4057
|
+
void loadAgentCatalog({ ...args, currentKey: "", deadlineKind: "background" }).catch(() => {
|
|
4034
4058
|
});
|
|
4035
4059
|
})();
|
|
4036
4060
|
}
|
|
@@ -4045,7 +4069,7 @@ async function fetchRawCatalogData(args, env) {
|
|
|
4045
4069
|
}
|
|
4046
4070
|
const serverUrl = resolveServerUrl(env);
|
|
4047
4071
|
const allServerUrls = resolveServerCandidates([], env, serverUrl);
|
|
4048
|
-
const serverUrls = (args.deadlineKind ?? "foreground") === "foreground" ? filterHealthyServers(allServerUrls) : allServerUrls;
|
|
4072
|
+
const serverUrls = (args.deadlineKind ?? "foreground") === "foreground" ? keepPrimaryServer(filterHealthyServers(allServerUrls), serverUrl) : allServerUrls;
|
|
4049
4073
|
const fetchStartedAt = performance.now();
|
|
4050
4074
|
let listedAgents = [];
|
|
4051
4075
|
const favoritesPromise = listFavoriteAgentIdsAcrossServers({
|
|
@@ -4074,9 +4098,28 @@ async function fetchRawCatalogData(args, env) {
|
|
|
4074
4098
|
recordServerFailures(remoteResult.failures);
|
|
4075
4099
|
} catch {
|
|
4076
4100
|
try {
|
|
4077
|
-
const
|
|
4078
|
-
|
|
4079
|
-
|
|
4101
|
+
const localBudgetMs = Math.max(
|
|
4102
|
+
500,
|
|
4103
|
+
deadlineMs - (performance.now() - fetchStartedAt)
|
|
4104
|
+
);
|
|
4105
|
+
let localTimer;
|
|
4106
|
+
try {
|
|
4107
|
+
listedAgents = await Promise.race([
|
|
4108
|
+
(async () => {
|
|
4109
|
+
const db = args.getDb ? await args.getDb() : await getReadableCliDb({ write: () => {
|
|
4110
|
+
} });
|
|
4111
|
+
return listLocalCachedAgents({ db, userId });
|
|
4112
|
+
})(),
|
|
4113
|
+
new Promise((_, reject) => {
|
|
4114
|
+
localTimer = setTimeout(
|
|
4115
|
+
() => reject(new Error("local catalog deadline exceeded")),
|
|
4116
|
+
localBudgetMs
|
|
4117
|
+
);
|
|
4118
|
+
})
|
|
4119
|
+
]);
|
|
4120
|
+
} finally {
|
|
4121
|
+
if (localTimer) clearTimeout(localTimer);
|
|
4122
|
+
}
|
|
4080
4123
|
} catch {
|
|
4081
4124
|
try {
|
|
4082
4125
|
listedAgents = await listRemoteAgents({
|
|
@@ -4155,8 +4198,10 @@ function renderAgentCatalogList(entries, currentKey) {
|
|
|
4155
4198
|
const current = entry.key === currentKey ? " (current)" : "";
|
|
4156
4199
|
const favorite = entry.favoritedAt ? " \u2605" : "";
|
|
4157
4200
|
const detail = entry.description ? ` \u2014 ${entry.description}` : "";
|
|
4201
|
+
const quota = formatQuotaSummary(entry.quota);
|
|
4202
|
+
const trailing = quota ? ` [${quota}]` : detail;
|
|
4158
4203
|
lines.push(
|
|
4159
|
-
` ${String(index + 1).padStart(2)} ${entry.name.padEnd(18)} ${entry.model.padEnd(14)} ${formatAgentSourceLabel(entry)}${favorite}${
|
|
4204
|
+
` ${String(index + 1).padStart(2)} ${entry.name.padEnd(18)} ${entry.model.padEnd(14)} ${formatAgentSourceLabel(entry)}${favorite}${trailing}${current}`
|
|
4160
4205
|
);
|
|
4161
4206
|
});
|
|
4162
4207
|
lines.push("");
|
|
@@ -5705,6 +5750,7 @@ var SLASH_COMMANDS = [
|
|
|
5705
5750
|
"/context",
|
|
5706
5751
|
"/ctx",
|
|
5707
5752
|
"/credits",
|
|
5753
|
+
"/links",
|
|
5708
5754
|
"/cd",
|
|
5709
5755
|
"/runtime",
|
|
5710
5756
|
"/auto",
|
|
@@ -5806,6 +5852,68 @@ function stripImageTokens(input, hints) {
|
|
|
5806
5852
|
return compactWhitespace(out);
|
|
5807
5853
|
}
|
|
5808
5854
|
|
|
5855
|
+
// packages/cli/tui/conversationLinks.ts
|
|
5856
|
+
var URL_PATTERN = /https?:\/\/[^\s<>"'`]+/gi;
|
|
5857
|
+
function trimUrl(raw) {
|
|
5858
|
+
const CLOSERS = { ")": "(", "]": "[", "}": "{" };
|
|
5859
|
+
let out = raw.replace(/[.,;:!?]+$/, "");
|
|
5860
|
+
while (out) {
|
|
5861
|
+
const last = out[out.length - 1];
|
|
5862
|
+
const opener = CLOSERS[last];
|
|
5863
|
+
if (!opener) break;
|
|
5864
|
+
const openCount = out.split(opener).length - 1;
|
|
5865
|
+
const closeCount = out.split(last).length - 1;
|
|
5866
|
+
if (closeCount > openCount) {
|
|
5867
|
+
out = out.slice(0, -1);
|
|
5868
|
+
continue;
|
|
5869
|
+
}
|
|
5870
|
+
break;
|
|
5871
|
+
}
|
|
5872
|
+
return out;
|
|
5873
|
+
}
|
|
5874
|
+
function collectConversationTurns(history) {
|
|
5875
|
+
const turns = [...history.turns];
|
|
5876
|
+
if (history.currentRole != null && history.currentContent) {
|
|
5877
|
+
turns.push({
|
|
5878
|
+
role: history.currentRole ?? void 0,
|
|
5879
|
+
content: history.currentContent
|
|
5880
|
+
});
|
|
5881
|
+
}
|
|
5882
|
+
return turns;
|
|
5883
|
+
}
|
|
5884
|
+
function extractConversationLinks(turns, options = {}) {
|
|
5885
|
+
const limit = options.limit ?? 20;
|
|
5886
|
+
const seen = /* @__PURE__ */ new Map();
|
|
5887
|
+
let total = 0;
|
|
5888
|
+
for (const turn of turns) {
|
|
5889
|
+
const content = typeof turn?.content === "string" ? turn.content : "";
|
|
5890
|
+
if (!content) continue;
|
|
5891
|
+
if (turn?.role === "local") continue;
|
|
5892
|
+
const role = turn?.role === "user" ? "user" : "assistant";
|
|
5893
|
+
const pattern = new RegExp(URL_PATTERN.source, "gi");
|
|
5894
|
+
let match;
|
|
5895
|
+
while ((match = pattern.exec(content)) !== null) {
|
|
5896
|
+
const url = trimUrl(match[0]);
|
|
5897
|
+
if (!url || seen.has(url)) continue;
|
|
5898
|
+
if (seen.size < limit) {
|
|
5899
|
+
seen.set(url, { url, role, index: seen.size + 1 });
|
|
5900
|
+
}
|
|
5901
|
+
total += 1;
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
5904
|
+
return { links: [...seen.values()], total, hasMore: total > seen.size };
|
|
5905
|
+
}
|
|
5906
|
+
function renderConversationLinks(extracted, t2) {
|
|
5907
|
+
const { links, total } = extracted;
|
|
5908
|
+
if (links.length === 0) return t2("noConversationLinks");
|
|
5909
|
+
const lines = links.map((link) => {
|
|
5910
|
+
const who = link.role === "user" ? "you" : "assistant";
|
|
5911
|
+
return ` ${String(link.index).padStart(2)} [${who}] ${link.url}`;
|
|
5912
|
+
});
|
|
5913
|
+
const heading = t2("conversationLinksShowing", links.length, total);
|
|
5914
|
+
return [heading, ...lines, "", t2("conversationLinksCopyHint")].join("\n");
|
|
5915
|
+
}
|
|
5916
|
+
|
|
5809
5917
|
// packages/cli/tui/sessionDispatch.ts
|
|
5810
5918
|
import { statSync as statSync3 } from "node:fs";
|
|
5811
5919
|
import { homedir as homedir3 } from "node:os";
|
|
@@ -5813,11 +5921,14 @@ import { resolve as resolve3 } from "node:path";
|
|
|
5813
5921
|
|
|
5814
5922
|
// packages/cli/tui/agentPicker.ts
|
|
5815
5923
|
function toAgentPickerItems(entries) {
|
|
5816
|
-
return entries.map((entry) =>
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
}
|
|
5924
|
+
return entries.map((entry) => {
|
|
5925
|
+
const quota = formatQuotaSummary(entry.quota, Date.now(), { compact: true });
|
|
5926
|
+
return {
|
|
5927
|
+
label: entry.name,
|
|
5928
|
+
detail: `${entry.favoritedAt ? "\u2605 " : ""}${entry.model} ${formatAgentSourceLabel(entry)}${quota ? ` [${quota}]` : ""}`,
|
|
5929
|
+
entry
|
|
5930
|
+
};
|
|
5931
|
+
});
|
|
5821
5932
|
}
|
|
5822
5933
|
function formatAgentSwitchMessage(args) {
|
|
5823
5934
|
const dialog = args.dialogId ? `Dialog kept: ${args.dialogId}` : "Dialog kept: new";
|
|
@@ -5949,6 +6060,8 @@ function estimateDefaultCliContextTokens(opts = {}) {
|
|
|
5949
6060
|
const guidance = buildRuntimeGuidanceBlocks(toolNames);
|
|
5950
6061
|
const toolSections = resolveToolGuidedSections(toolNames);
|
|
5951
6062
|
const systemParts = [
|
|
6063
|
+
// 与实际装配线一致:删除安全红线是系统提示词的最顶层块。
|
|
6064
|
+
DELETE_SAFETY_RED_LINE,
|
|
5952
6065
|
prompt,
|
|
5953
6066
|
opts.userLanguage?.trim() ? buildUserResponseLanguageContext({ language: opts.userLanguage }) : "",
|
|
5954
6067
|
buildIdentityBlock({
|
|
@@ -6049,7 +6162,7 @@ function formatAttachedSkillLine(skillRef) {
|
|
|
6049
6162
|
const name = themeText(skillRef, "chrome", true);
|
|
6050
6163
|
return `${bullet} ${label} ${name}`;
|
|
6051
6164
|
}
|
|
6052
|
-
function handleTuiInput(input, state) {
|
|
6165
|
+
function handleTuiInput(input, state, historyTurns) {
|
|
6053
6166
|
const trimmed = input.trim();
|
|
6054
6167
|
if (!trimmed) {
|
|
6055
6168
|
return { nextState: state, output: "" };
|
|
@@ -6192,6 +6305,14 @@ ${t("cdUsage")}`
|
|
|
6192
6305
|
case "/context":
|
|
6193
6306
|
case "/ctx":
|
|
6194
6307
|
return { nextState: state, output: renderContextPanel(state) };
|
|
6308
|
+
case "/links": {
|
|
6309
|
+
const extracted = extractConversationLinks(historyTurns ?? []);
|
|
6310
|
+
return {
|
|
6311
|
+
nextState: state,
|
|
6312
|
+
output: `${renderConversationLinks(extracted, t)}
|
|
6313
|
+
`
|
|
6314
|
+
};
|
|
6315
|
+
}
|
|
6195
6316
|
case "/credits":
|
|
6196
6317
|
return { nextState: state, output: renderCreditsDebug(state) };
|
|
6197
6318
|
case "/runtime": {
|
|
@@ -6751,14 +6872,12 @@ function createTurnInjectionInbox() {
|
|
|
6751
6872
|
|
|
6752
6873
|
// packages/cli/tui/processTerminalNotice.ts
|
|
6753
6874
|
function formatProcessTerminalWakeMessage(notices) {
|
|
6754
|
-
const missingCapsule = notices.some((notice) => !notice.resultCapsule);
|
|
6755
6875
|
return [
|
|
6756
6876
|
`<background_task_completion count="${notices.length}">`,
|
|
6757
6877
|
...notices.flatMap((notice) => [
|
|
6758
|
-
|
|
6878
|
+
formatProcessTerminalWakeLine(notice),
|
|
6759
6879
|
...notice.resultCapsule ? formatProcessResultCapsuleLines(notice.resultCapsule) : []
|
|
6760
6880
|
]),
|
|
6761
|
-
...missingCapsule ? ["\u751F\u547D\u5468\u671F\u8BE6\u60C5\u53EF\u7528 taskLogs(taskId)"] : [],
|
|
6762
6881
|
`</background_task_completion>`
|
|
6763
6882
|
].join("\n");
|
|
6764
6883
|
}
|
|
@@ -6790,12 +6909,21 @@ function formatProcessResultCapsuleLines(capsule) {
|
|
|
6790
6909
|
] : []
|
|
6791
6910
|
];
|
|
6792
6911
|
}
|
|
6793
|
-
function
|
|
6912
|
+
function formatProcessTerminalWakeLine(notice) {
|
|
6794
6913
|
const informative = notice.label && notice.label.trim() !== "" && notice.label !== notice.command;
|
|
6795
6914
|
const label = informative ? ` (label: "${notice.label.replace(/(["\\])/g, "\\$1")}")` : "";
|
|
6796
6915
|
const exit = notice.exitCode !== void 0 ? ` exitCode=${notice.exitCode}` : "";
|
|
6797
6916
|
return `[Background task ${notice.taskId}${label} finished: status=${notice.status}${exit}]`;
|
|
6798
6917
|
}
|
|
6918
|
+
function formatProcessTerminalNoticeLine(notice) {
|
|
6919
|
+
const informative = notice.label && notice.label.trim() !== "" && notice.label !== notice.command;
|
|
6920
|
+
const label = informative ? notice.label.trim() : "background task";
|
|
6921
|
+
const ok = notice.status === "exited" && (notice.exitCode === void 0 || notice.exitCode === 0);
|
|
6922
|
+
if (ok) return `\u2713 ${label}`;
|
|
6923
|
+
if (notice.status === "stopped") return `\u25A0 ${label} \xB7 stopped`;
|
|
6924
|
+
const exit = notice.exitCode !== void 0 ? ` \xB7 exit ${notice.exitCode}` : "";
|
|
6925
|
+
return `\u2717 ${label}${exit}`;
|
|
6926
|
+
}
|
|
6799
6927
|
function buildProcessTerminalTurnMessage(notices) {
|
|
6800
6928
|
if (notices.length === 0) return "";
|
|
6801
6929
|
return formatProcessTerminalWakeMessage(notices);
|
|
@@ -6812,7 +6940,7 @@ function buildProcessTaskCompletedTurnEvent(notice) {
|
|
|
6812
6940
|
}
|
|
6813
6941
|
var PENDING_NOTICE_PREFIX = "process-notice-v1:";
|
|
6814
6942
|
function serializePendingProcessNotice(notice) {
|
|
6815
|
-
return notice.resultCapsule ? `${PENDING_NOTICE_PREFIX}${JSON.stringify(notice)}` :
|
|
6943
|
+
return notice.resultCapsule ? `${PENDING_NOTICE_PREFIX}${JSON.stringify(notice)}` : formatProcessTerminalWakeLine(notice);
|
|
6816
6944
|
}
|
|
6817
6945
|
function parsePendingProcessNoticeLine(line) {
|
|
6818
6946
|
if (line.startsWith(PENDING_NOTICE_PREFIX)) {
|
|
@@ -7793,8 +7921,19 @@ function resolveChatSendDecision(input) {
|
|
|
7793
7921
|
}
|
|
7794
7922
|
return { kind: "compact-dialog" };
|
|
7795
7923
|
}
|
|
7796
|
-
|
|
7797
|
-
|
|
7924
|
+
const hasContent = Boolean(trimmed) || input.imagePreviewCount > 0 || input.pendingFileCount > 0;
|
|
7925
|
+
const hasActiveTurn = input.hasActiveTurn ?? (input.isLoopRunning || input.isSendPending);
|
|
7926
|
+
if (!hasContent) {
|
|
7927
|
+
return { kind: "noop", reason: "empty-input" };
|
|
7928
|
+
}
|
|
7929
|
+
if (input.isSendPending && !input.isLoopRunning && !hasActiveTurn) {
|
|
7930
|
+
return { kind: "stale-send" };
|
|
7931
|
+
}
|
|
7932
|
+
if (input.isSendPending) {
|
|
7933
|
+
return { kind: "noop", reason: "already-sending" };
|
|
7934
|
+
}
|
|
7935
|
+
if (input.isSendBlocked) {
|
|
7936
|
+
return { kind: "noop", reason: "blocked" };
|
|
7798
7937
|
}
|
|
7799
7938
|
if (!input.canMultiImg && input.imagePreviewCount > 1) {
|
|
7800
7939
|
return { kind: "multi-image-blocked" };
|
|
@@ -7946,6 +8085,11 @@ function createChatQueueTuiBinding(runTurn) {
|
|
|
7946
8085
|
const clear = () => {
|
|
7947
8086
|
runtime.send({ type: "clear" });
|
|
7948
8087
|
};
|
|
8088
|
+
const recoverStaleRunning = () => {
|
|
8089
|
+
if (!runtime.getState().running) return false;
|
|
8090
|
+
runtime.send({ type: "turn-end", ok: true, aborted: false });
|
|
8091
|
+
return true;
|
|
8092
|
+
};
|
|
7949
8093
|
const getStatus = () => projectChatQueueStatus({ state: runtime.getState() });
|
|
7950
8094
|
const queueLength = () => runtime.getState().queue.length;
|
|
7951
8095
|
const dispose = () => {
|
|
@@ -7962,6 +8106,7 @@ function createChatQueueTuiBinding(runTurn) {
|
|
|
7962
8106
|
preemptForStop,
|
|
7963
8107
|
snapshotAndClearQueue,
|
|
7964
8108
|
clear,
|
|
8109
|
+
recoverStaleRunning,
|
|
7965
8110
|
getStatus,
|
|
7966
8111
|
queueLength,
|
|
7967
8112
|
dispose
|
|
@@ -10004,7 +10149,7 @@ async function runSubmittedSlashLine(line, host, actionGateHandler, confirmDestr
|
|
|
10004
10149
|
spawnRunner,
|
|
10005
10150
|
installAltScreenRestoreHandlers: installAltScreenRestoreHandlers2
|
|
10006
10151
|
} = host;
|
|
10007
|
-
const result = handleTuiInput(line, host.state);
|
|
10152
|
+
const result = handleTuiInput(line, host.state, collectConversationTurns(host.history));
|
|
10008
10153
|
const previousAgentKey = host.state.agentKey;
|
|
10009
10154
|
host.state = result.nextState;
|
|
10010
10155
|
const interactive = isInteractiveInput(input);
|
|
@@ -11399,8 +11544,36 @@ ${err.message}` : ""}`
|
|
|
11399
11544
|
paintFrame(buffer);
|
|
11400
11545
|
}, 60);
|
|
11401
11546
|
};
|
|
11547
|
+
const hasNonEmptySelection = () => selectionState.anchor !== null && selectionState.head !== null && !areSelectionPointsEqual(selectionState.anchor, selectionState.head);
|
|
11548
|
+
const copySelectionToClipboard = async (feedbackKey) => {
|
|
11549
|
+
const tty = output;
|
|
11550
|
+
const columns = tty.columns ?? 80;
|
|
11551
|
+
const contentWidth = Math.max(1, columns - 1);
|
|
11552
|
+
const textToCopy = extractSelectedText(
|
|
11553
|
+
history,
|
|
11554
|
+
selectionState.anchor,
|
|
11555
|
+
selectionState.head,
|
|
11556
|
+
contentWidth
|
|
11557
|
+
);
|
|
11558
|
+
clearSelection();
|
|
11559
|
+
if (textToCopy.length > 0) {
|
|
11560
|
+
try {
|
|
11561
|
+
await writeClipboard2(textToCopy);
|
|
11562
|
+
emitCommandOutput(t(feedbackKey));
|
|
11563
|
+
} catch (error) {
|
|
11564
|
+
emitCommandOutput(
|
|
11565
|
+
`[nolo] ${t("copyFailed")}: ${toErrorMessage(error)}`
|
|
11566
|
+
);
|
|
11567
|
+
}
|
|
11568
|
+
}
|
|
11569
|
+
paintFrame(buffer);
|
|
11570
|
+
};
|
|
11402
11571
|
const handleCtrlCKey = async (busyLock) => {
|
|
11403
11572
|
if (busyLock && activeTurnAbort) {
|
|
11573
|
+
if (hasNonEmptySelection()) {
|
|
11574
|
+
await copySelectionToClipboard("copiedSelectionBusy");
|
|
11575
|
+
return;
|
|
11576
|
+
}
|
|
11404
11577
|
const stopBinding = chatQueueBinding;
|
|
11405
11578
|
if (stopBinding && stopBinding.queueLength() > 0) {
|
|
11406
11579
|
stopBinding.preemptForStop();
|
|
@@ -11410,29 +11583,8 @@ ${err.message}` : ""}`
|
|
|
11410
11583
|
return;
|
|
11411
11584
|
}
|
|
11412
11585
|
const now = Date.now();
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
const tty = output;
|
|
11416
|
-
const columns = tty.columns ?? 80;
|
|
11417
|
-
const contentWidth = Math.max(1, columns - 1);
|
|
11418
|
-
const textToCopy = extractSelectedText(
|
|
11419
|
-
history,
|
|
11420
|
-
selectionState.anchor,
|
|
11421
|
-
selectionState.head,
|
|
11422
|
-
contentWidth
|
|
11423
|
-
);
|
|
11424
|
-
clearSelection();
|
|
11425
|
-
if (textToCopy.length > 0) {
|
|
11426
|
-
try {
|
|
11427
|
-
await writeClipboard2(textToCopy);
|
|
11428
|
-
emitCommandOutput(t("copiedSelection"));
|
|
11429
|
-
} catch (error) {
|
|
11430
|
-
emitCommandOutput(
|
|
11431
|
-
`[nolo] ${t("copyFailed")}: ${toErrorMessage(error)}`
|
|
11432
|
-
);
|
|
11433
|
-
}
|
|
11434
|
-
}
|
|
11435
|
-
paintFrame(buffer);
|
|
11586
|
+
if (hasNonEmptySelection()) {
|
|
11587
|
+
await copySelectionToClipboard("copiedSelection");
|
|
11436
11588
|
return;
|
|
11437
11589
|
}
|
|
11438
11590
|
if (selectionState.anchor) {
|
|
@@ -11462,7 +11614,7 @@ ${err.message}` : ""}`
|
|
|
11462
11614
|
cursorPos = 0;
|
|
11463
11615
|
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
11464
11616
|
const beforeAgentKey = state.agentKey;
|
|
11465
|
-
const res = handleTuiInput(submittedText, state);
|
|
11617
|
+
const res = handleTuiInput(submittedText, state, collectConversationTurns(history));
|
|
11466
11618
|
if (res.action?.type === "paste-clipboard") {
|
|
11467
11619
|
await readAndApplyClipboard("slash");
|
|
11468
11620
|
return;
|
|
@@ -11737,7 +11889,7 @@ ${merged}` : merged;
|
|
|
11737
11889
|
if (busyLock) {
|
|
11738
11890
|
const trimmedText = submittedText.trim();
|
|
11739
11891
|
const busySlashCommand = trimmedText.split(/\s+/)[0]?.toLowerCase();
|
|
11740
|
-
const isBusyLocalSlash = busySlashCommand === "/context" || busySlashCommand === "/ctx" || busySlashCommand === "/cd" || busySlashCommand === "/switch" || busySlashCommand === "/theme" || busySlashCommand === "/runtime" || busySlashCommand === "/tools" || busySlashCommand === "/thinking" || busySlashCommand === "/auto" || busySlashCommand === "/tasks" || busySlashCommand === "/jobs" || busySlashCommand === "/procs" || busySlashCommand === "/agents" || busySlashCommand === "/doc" || busySlashCommand === "/skill" || busySlashCommand === "/customize" || busySlashCommand === "/login" || busySlashCommand === "/profile" || busySlashCommand === "/paste" || busySlashCommand === "/version";
|
|
11892
|
+
const isBusyLocalSlash = busySlashCommand === "/context" || busySlashCommand === "/ctx" || busySlashCommand === "/cd" || busySlashCommand === "/switch" || busySlashCommand === "/theme" || busySlashCommand === "/runtime" || busySlashCommand === "/tools" || busySlashCommand === "/thinking" || busySlashCommand === "/auto" || busySlashCommand === "/tasks" || busySlashCommand === "/jobs" || busySlashCommand === "/procs" || busySlashCommand === "/agents" || busySlashCommand === "/doc" || busySlashCommand === "/skill" || busySlashCommand === "/customize" || busySlashCommand === "/login" || busySlashCommand === "/profile" || busySlashCommand === "/paste" || busySlashCommand === "/version" || busySlashCommand === "/links";
|
|
11741
11893
|
if (isBusyLocalSlash) {
|
|
11742
11894
|
await handleBusyLocalSlash(submittedText, busySlashCommand);
|
|
11743
11895
|
return;
|
|
@@ -11771,6 +11923,7 @@ ${merged}` : merged;
|
|
|
11771
11923
|
return;
|
|
11772
11924
|
}
|
|
11773
11925
|
}
|
|
11926
|
+
chatQueueBinding?.recoverStaleRunning();
|
|
11774
11927
|
busy = startsChatTurn;
|
|
11775
11928
|
bumpDraftEpoch();
|
|
11776
11929
|
buffer = "";
|
|
@@ -11874,6 +12027,9 @@ ${renderStatusLine(state)}
|
|
|
11874
12027
|
`);
|
|
11875
12028
|
}
|
|
11876
12029
|
sessionEnded = true;
|
|
12030
|
+
runRegistryPoller.dispose();
|
|
12031
|
+
runCompletionWatcher.dispose();
|
|
12032
|
+
activityIndicator.dispose();
|
|
11877
12033
|
rl.close();
|
|
11878
12034
|
}
|
|
11879
12035
|
} finally {
|