nolo-cli 0.147.0-alpha.2 → 0.148.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-3OCR5R5P.js → _executeModel-NFJAMAGJ.js} +29 -28
- package/{action-3ZOODRBC.js → action-GI44T4DR.js} +6 -6
- package/{addContentAction-IJHG2ZV7.js → addContentAction-B2DRF7P6.js} +5 -5
- package/{addDialogAgentAction-RLPSTAQ2.js → addDialogAgentAction-2P2FLTLD.js} +4 -4
- package/{agentDeleteCommand-6OGADD24.js → agentDeleteCommand-7IDWF6E3.js} +14 -13
- package/{agentEmailCommands-OAPYGNYC.js → agentEmailCommands-4KW33JII.js} +31 -30
- package/{agentListCommands-FRJZOOEG.js → agentListCommands-IW3GQVUP.js} +16 -15
- package/{agentMachineCommands-OWLOV5WO.js → agentMachineCommands-CMQR4RQ4.js} +14 -13
- package/{agentProviderCommands-TWB6E5WD.js → agentProviderCommands-YK2BIIXZ.js} +1 -1
- package/{agentRecordCommands-BW7HM6VH.js → agentRecordCommands-4YBSYPIY.js} +31 -30
- package/{agentRunCommand-O2F3NU2H.js → agentRunCommand-5MU5X5OT.js} +31 -30
- package/{agentRuntimeLocal-QQCDFR7B.js → agentRuntimeLocal-AK2QVJHY.js} +12 -11
- package/{agentSlice-ZOCKW66S.js → agentSlice-OZ33K224.js} +5 -5
- package/{appDeleteCommands-OGKQC2AM.js → appDeleteCommands-N3XEVVYC.js} +15 -14
- package/{appDeployCommands-Y2FV4JML.js → appDeployCommands-AWFIXYVW.js} +15 -14
- package/{appDeployStatusCommands-FNML5SUV.js → appDeployStatusCommands-CZRON2FO.js} +15 -14
- package/{appGetCommands-4FOY7W5E.js → appGetCommands-XQIUY4TD.js} +15 -14
- package/{appListCommands-E5SF6SIY.js → appListCommands-NNG4H36Y.js} +15 -14
- package/{chatQueueReduxAdapter-DFZ6QB4K.js → chatQueueReduxAdapter-HVHA2HPM.js} +11 -11
- package/{chunk-OXGHM2WW.js → chunk-2JMMBU6V.js} +27 -257
- package/{chunk-T76D3OYX.js → chunk-3SV7RM24.js} +1 -1
- package/{chunk-PZ3HKBET.js → chunk-42Z3EMC4.js} +19 -19
- package/{chunk-O7WXJIUI.js → chunk-4H22P2JV.js} +11 -9
- package/{chunk-BCJPO6SE.js → chunk-523WHFSL.js} +10 -10
- package/{chunk-M2YBIBBS.js → chunk-5TEEECZM.js} +1 -1
- package/{chunk-Z7IZQF56.js → chunk-6FGTMQCL.js} +1 -1
- package/{chunk-ETZWFV6M.js → chunk-7CHC4W22.js} +1 -1
- package/{chunk-ZSPC3ZTC.js → chunk-AKG5W4LG.js} +1 -1
- package/{chunk-CCOXTK3I.js → chunk-ALFH24P3.js} +26 -0
- package/{chunk-7NANRWL4.js → chunk-ALGORS6Y.js} +1 -1
- package/chunk-BKWMNZ2X.js +411 -0
- package/{chunk-HNRASX3X.js → chunk-CPUFH46E.js} +1 -1
- package/{chunk-GMVELWJG.js → chunk-CU3QB4HW.js} +2 -2
- package/{chunk-KRC6GI2Q.js → chunk-DCFPQW22.js} +2 -2
- package/{chunk-LQ6P2MFG.js → chunk-DIXLJWCD.js} +14 -14
- package/{chunk-2EE5UD3N.js → chunk-DY7ANLKG.js} +1 -1
- package/{chunk-36HTQWBD.js → chunk-FWQEKRTD.js} +3 -3
- package/{chunk-I44MDY73.js → chunk-GOH6RW6F.js} +3 -3
- package/chunk-HUFPWXFW.js +1716 -0
- package/{chunk-QALRKMHF.js → chunk-HYZIYH2H.js} +5 -5
- package/{chunk-EFZKILX6.js → chunk-IAESIMK7.js} +1 -1
- package/{chunk-JQ4LUB5I.js → chunk-IAG4FHOJ.js} +1 -1
- package/{chunk-HLUYTEBY.js → chunk-K2CSUCHJ.js} +1 -1
- package/{chunk-UC3Q7X3J.js → chunk-LPVCRQMM.js} +5 -5
- package/{chunk-QJLEMM2V.js → chunk-O2OWEFII.js} +1 -1
- package/{chunk-724HIKHT.js → chunk-OHOVNO7I.js} +4 -127
- package/{chunk-NU4DCNMR.js → chunk-P4BX6FFU.js} +4 -571
- package/{chunk-P4CRULYJ.js → chunk-PCVVZ2MH.js} +3 -3
- package/chunk-PQWU42UQ.js +132 -0
- package/{chunk-27VHPPII.js → chunk-QU5A4LYX.js} +6 -6
- package/{chunk-QIH323EV.js → chunk-QXGPFY6J.js} +1 -1
- package/{chunk-B7ANJQWZ.js → chunk-RSEEDUMS.js} +2 -2
- package/{chunk-ELYEQNUI.js → chunk-RYZINGPM.js} +3 -3
- package/{chunk-AATZZAZE.js → chunk-SLLGJZDT.js} +1 -1
- package/{chunk-3IYMTWYZ.js → chunk-SONWNI3L.js} +2 -2
- package/chunk-T767MPHB.js +681 -0
- package/{chunk-2B74TU77.js → chunk-T7F46O36.js} +3 -3
- package/{chunk-BJUDYFV5.js → chunk-UQNS32WZ.js} +1 -1
- package/{chunk-AUXHZ2M5.js → chunk-WIWM4FE3.js} +1 -1
- package/{chunk-BFLSOVHN.js → chunk-WRMKCKZ3.js} +16 -14
- package/{chunk-YU2THNST.js → chunk-XISEYOGH.js} +1 -1
- package/{chunk-JORF7I7F.js → chunk-YUWMM4US.js} +3 -3
- package/{chunk-D76D3RTR.js → chunk-Z4CSIXYP.js} +2 -2
- package/{commandRegistry-OPVCVVOQ.js → commandRegistry-YOEQUA7T.js} +42 -42
- package/{contentThunks-IWXWFN6P.js → contentThunks-AK2F3KNC.js} +12 -12
- package/{createAgentAutomationAction-ROWX5ZPK.js → createAgentAutomationAction-5EJL6ROU.js} +12 -12
- package/{createDialogAction-WLVAITHA.js → createDialogAction-F5WEWA47.js} +13 -13
- package/{createPageAction-DAJL6GES.js → createPageAction-75ELC64R.js} +12 -12
- package/{dbSlice-HFPIJT5P.js → dbSlice-DQ32LYTJ.js} +4 -4
- package/{deleteFile-UEAD5A5Z.js → deleteFile-NX6QHCWZ.js} +2 -2
- package/{dialogCommands-KSPH6QOU.js → dialogCommands-G7YBVAMC.js} +15 -14
- package/{dialogSlice-WW75BKLO.js → dialogSlice-KSXPGJB2.js} +11 -11
- package/{docCreateCommands-B64BLZVJ.js → docCreateCommands-ZSLGVBZT.js} +14 -13
- package/{docDeleteCommands-UX2GXKUT.js → docDeleteCommands-5N4GVZBG.js} +15 -14
- package/{docReadCommands-5A6GF3XL.js → docReadCommands-YJSAA7AV.js} +14 -13
- package/{docStore-2SADZYLX.js → docStore-AROBVRCR.js} +5 -5
- package/{docUpdateCommands-UTBGZPSR.js → docUpdateCommands-WEMLSW6W.js} +14 -13
- package/{handleSendMessageAction-2M57WHLO.js → handleSendMessageAction-EGNWHAUB.js} +229 -45
- package/index.js +3 -3
- package/{machineCommands-7JUTOZP2.js → machineCommands-ARZYKGGE.js} +30 -29
- package/{machineWsRunDispatch-6EETR3RV.js → machineWsRunDispatch-I7F4L532.js} +30 -29
- package/{memberThunks-SKFZ37VS.js → memberThunks-5ZXPR63F.js} +5 -5
- package/package.json +1 -1
- package/{providerPresetApply-XTEXOH7X.js → providerPresetApply-DD6NGWW6.js} +1 -1
- package/{providerRegistry-ADYDSLKR.js → providerRegistry-XDRLMYGJ.js} +1 -1
- package/{read-IEJLLUXY.js → read-EPTJRAEF.js} +2 -2
- package/{readDocTool-4SPYCP2Y.js → readDocTool-W4NDXNEX.js} +1 -1
- package/{readlineWorkspace-LBLAGNGM.js → readlineWorkspace-3XOFVARF.js} +34 -33
- package/{removeDialogAgentAction-R4RTGM2S.js → removeDialogAgentAction-OSYNZRX7.js} +6 -6
- package/{runAgentClientLoop-RPEULJFS.js → runAgentClientLoop-UMF7VZYZ.js} +30 -28
- package/{setDialogExtraReferencesAction-NU2VZ7JZ.js → setDialogExtraReferencesAction-M32UYNCG.js} +5 -5
- package/{setPrimaryDialogAgentAction-VUY2FRVL.js → setPrimaryDialogAgentAction-WZ7KI3YA.js} +6 -6
- package/{settingSlice-CNE75ISY.js → settingSlice-Q6EKL7EQ.js} +5 -5
- package/{spaceCommands-HZUAGZXH.js → spaceCommands-UJOVU4XI.js} +14 -13
- package/{streamAgentChatTurn-D5POCPVX.js → streamAgentChatTurn-GYGMYOSM.js} +71 -1268
- package/{switchDialogAgentAction-JC27CP72.js → switchDialogAgentAction-GMR7WN3P.js} +4 -4
- package/{tools-I6D2B2G6.js → tools-DU4JXVAV.js} +21 -21
- package/{tuiSummaryLlmCaller-RVW6CJSK.js → tuiSummaryLlmCaller-3YFNHCTW.js} +7 -7
- package/{updateDialogTitleAction-7YZ7FNAK.js → updateDialogTitleAction-4U5W4AMH.js} +12 -12
- package/chunk-BJ3KD73I.js +0 -155
- package/chunk-JK5XW3NO.js +0 -108
- package/chunk-YYKMFBK7.js +0 -306
|
@@ -4,8 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
buildForegroundTurnAdmissionFetchInit,
|
|
6
6
|
consumeAgentRunStream,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
mergeAgentToolsWithRuntime,
|
|
8
|
+
projectDesktopToolUiContent,
|
|
9
|
+
resolveTurnToolContext
|
|
10
|
+
} from "./chunk-HUFPWXFW.js";
|
|
11
|
+
import "./chunk-O2OWEFII.js";
|
|
9
12
|
import {
|
|
10
13
|
CONTEXT_OVERFLOW_ACTIONS,
|
|
11
14
|
CONTEXT_TOO_LARGE_ACTIONS,
|
|
@@ -13,14 +16,20 @@ import {
|
|
|
13
16
|
} from "./chunk-OCZKATRC.js";
|
|
14
17
|
import {
|
|
15
18
|
performServerProxyFetchWithRetry
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-T767MPHB.js";
|
|
17
20
|
import {
|
|
18
21
|
createSSEParser,
|
|
19
22
|
resolveAgentRequiredPackIds,
|
|
20
23
|
waitForAbortableDelay
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BKWMNZ2X.js";
|
|
22
25
|
import "./chunk-NF64D32W.js";
|
|
23
26
|
import "./chunk-3L2WKC3W.js";
|
|
27
|
+
import "./chunk-T7F46O36.js";
|
|
28
|
+
import "./chunk-XPRWFQQK.js";
|
|
29
|
+
import "./chunk-UQNS32WZ.js";
|
|
30
|
+
import "./chunk-MEYIRKDN.js";
|
|
31
|
+
import "./chunk-QU5A4LYX.js";
|
|
32
|
+
import "./chunk-ZJ7UHBJS.js";
|
|
24
33
|
import {
|
|
25
34
|
initMsgs,
|
|
26
35
|
messageStreamEnd,
|
|
@@ -32,14 +41,14 @@ import {
|
|
|
32
41
|
setMessages,
|
|
33
42
|
setStreamingMessageId,
|
|
34
43
|
updateToolMessage
|
|
35
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-42Z3EMC4.js";
|
|
36
45
|
import "./chunk-523DITKR.js";
|
|
37
46
|
import "./chunk-YYLHWIW6.js";
|
|
38
47
|
import "./chunk-6O4IK4V2.js";
|
|
39
48
|
import {
|
|
40
49
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-LPVCRQMM.js";
|
|
51
|
+
import "./chunk-Z4CSIXYP.js";
|
|
43
52
|
import "./chunk-5RGU3J7P.js";
|
|
44
53
|
import "./chunk-M76ECQRD.js";
|
|
45
54
|
import {
|
|
@@ -49,6 +58,8 @@ import {
|
|
|
49
58
|
} from "./chunk-B6SAMB33.js";
|
|
50
59
|
import "./chunk-YDH3FDFQ.js";
|
|
51
60
|
import "./chunk-MX574M24.js";
|
|
61
|
+
import "./chunk-4DPP773Q.js";
|
|
62
|
+
import "./chunk-VIDPVFP3.js";
|
|
52
63
|
import "./chunk-AGGIDPCZ.js";
|
|
53
64
|
import "./chunk-B2XUQXQX.js";
|
|
54
65
|
import {
|
|
@@ -56,8 +67,9 @@ import {
|
|
|
56
67
|
} from "./chunk-6TPOEJMQ.js";
|
|
57
68
|
import "./chunk-AUDNYVRC.js";
|
|
58
69
|
import "./chunk-KHCLMKZZ.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-PQWU42UQ.js";
|
|
71
|
+
import "./chunk-AKG5W4LG.js";
|
|
72
|
+
import "./chunk-RYZINGPM.js";
|
|
61
73
|
import "./chunk-PSCNXBYA.js";
|
|
62
74
|
import "./chunk-L36OWPP3.js";
|
|
63
75
|
import "./chunk-BYXBJQAS.js";
|
|
@@ -66,9 +78,11 @@ import "./chunk-7KVZ5LDQ.js";
|
|
|
66
78
|
import "./chunk-HNMXYYJR.js";
|
|
67
79
|
import "./chunk-3BXNTXYI.js";
|
|
68
80
|
import "./chunk-W7XHHYWM.js";
|
|
69
|
-
import "./chunk-
|
|
81
|
+
import "./chunk-RSEEDUMS.js";
|
|
70
82
|
import "./chunk-UAD2WT54.js";
|
|
71
83
|
import "./chunk-ZWQUWF6W.js";
|
|
84
|
+
import "./chunk-HDLLCBRF.js";
|
|
85
|
+
import "./chunk-4VJAC32I.js";
|
|
72
86
|
import {
|
|
73
87
|
canonicalizeToolName
|
|
74
88
|
} from "./chunk-XUWRURDF.js";
|
|
@@ -79,22 +93,22 @@ import {
|
|
|
79
93
|
} from "./chunk-Y3PMXGLH.js";
|
|
80
94
|
import {
|
|
81
95
|
selectCurrentServer
|
|
82
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-SONWNI3L.js";
|
|
83
97
|
import "./chunk-Y5GCAMGP.js";
|
|
84
98
|
import "./chunk-QDSINZM3.js";
|
|
85
99
|
import "./chunk-KX6YBIHG.js";
|
|
86
100
|
import {
|
|
87
101
|
readAndWait,
|
|
88
102
|
selectById
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import "./chunk-
|
|
103
|
+
} from "./chunk-HYZIYH2H.js";
|
|
104
|
+
import "./chunk-7CHC4W22.js";
|
|
91
105
|
import {
|
|
92
106
|
createDialogMessageKeyAndId
|
|
93
107
|
} from "./chunk-3AH7LNUB.js";
|
|
94
108
|
import "./chunk-WWC7I6TA.js";
|
|
95
109
|
import "./chunk-QSJ3HFEF.js";
|
|
96
|
-
import "./chunk-
|
|
97
|
-
import "./chunk-
|
|
110
|
+
import "./chunk-IAESIMK7.js";
|
|
111
|
+
import "./chunk-WIWM4FE3.js";
|
|
98
112
|
import {
|
|
99
113
|
getIsDesktopApp
|
|
100
114
|
} from "./chunk-QOKAKDPE.js";
|
|
@@ -117,13 +131,8 @@ import "./chunk-CF7PE763.js";
|
|
|
117
131
|
import "./chunk-G3SUCT4W.js";
|
|
118
132
|
import "./chunk-4VNS5WPM.js";
|
|
119
133
|
|
|
120
|
-
// packages/ai/
|
|
121
|
-
|
|
122
|
-
"ask_user",
|
|
123
|
-
"exa_search",
|
|
124
|
-
"fetchWebpage"
|
|
125
|
-
]);
|
|
126
|
-
function readToolName(value) {
|
|
134
|
+
// packages/ai/tools/effectiveToolSurface.ts
|
|
135
|
+
function readEffectiveToolName(value) {
|
|
127
136
|
if (typeof value === "string") {
|
|
128
137
|
const name2 = canonicalizeToolName(value.trim());
|
|
129
138
|
return name2 || null;
|
|
@@ -134,12 +143,28 @@ function readToolName(value) {
|
|
|
134
143
|
const name = canonicalizeToolName(candidate.trim());
|
|
135
144
|
return name || null;
|
|
136
145
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
146
|
+
function valuesOf(iterable) {
|
|
147
|
+
return iterable ? [...iterable] : [];
|
|
148
|
+
}
|
|
149
|
+
function resolveEffectiveToolSurface(input) {
|
|
150
|
+
const agent = input.agent ?? {};
|
|
151
|
+
const byName = /* @__PURE__ */ new Map();
|
|
152
|
+
const add = (values, source) => {
|
|
153
|
+
for (const value of values) {
|
|
154
|
+
const name = readEffectiveToolName(value);
|
|
155
|
+
if (!name) continue;
|
|
156
|
+
let sources = byName.get(name);
|
|
157
|
+
if (!sources) {
|
|
158
|
+
sources = /* @__PURE__ */ new Set();
|
|
159
|
+
byName.set(name, sources);
|
|
160
|
+
}
|
|
161
|
+
sources.add(source);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
add(Array.isArray(agent.tools) ? agent.tools : [], "explicit");
|
|
165
|
+
add(Array.isArray(agent.toolNames) ? agent.toolNames : [], "explicit");
|
|
141
166
|
const requiredPackIds = resolveAgentRequiredPackIds(agent);
|
|
142
|
-
|
|
167
|
+
add(expandEnabledPacks(requiredPackIds), "required-pack");
|
|
143
168
|
const policies = [
|
|
144
169
|
agent.runtimeToolPolicy,
|
|
145
170
|
agent.runtimeBinding?.runtimeToolPolicy,
|
|
@@ -147,38 +172,132 @@ function configuredToolNames(agent) {
|
|
|
147
172
|
];
|
|
148
173
|
for (const policy of policies) {
|
|
149
174
|
if (!policy || typeof policy !== "object") continue;
|
|
150
|
-
|
|
151
|
-
|
|
175
|
+
add(Array.isArray(policy.agentTools) ? policy.agentTools : [], "runtime-policy");
|
|
176
|
+
add(Array.isArray(policy.runtimeTools) ? policy.runtimeTools : [], "runtime-policy");
|
|
152
177
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
agent.
|
|
178
|
+
add(Array.isArray(agent.referencedTools) ? agent.referencedTools : [], "reference");
|
|
179
|
+
add(valuesOf(input.referencedToolNames), "reference");
|
|
180
|
+
add(valuesOf(input.mentionedToolNames), "mention");
|
|
181
|
+
add(valuesOf(input.hostInjectedToolNames), "host-injected");
|
|
182
|
+
add(valuesOf(input.runtimeExtraToolNames), "runtime-extra");
|
|
183
|
+
const disabled = new Set(
|
|
184
|
+
(Array.isArray(agent.disabledTools) ? agent.disabledTools : []).map(readEffectiveToolName).filter((name) => !!name)
|
|
185
|
+
);
|
|
186
|
+
for (const name of disabled) byName.delete(name);
|
|
187
|
+
const entries = [...byName.entries()].map(
|
|
188
|
+
([name, sources]) => ({ name, sources: [...sources] })
|
|
189
|
+
);
|
|
190
|
+
const requestedSources = /* @__PURE__ */ new Set([
|
|
191
|
+
"explicit",
|
|
192
|
+
"required-pack",
|
|
193
|
+
"runtime-policy",
|
|
194
|
+
"reference",
|
|
195
|
+
"mention",
|
|
196
|
+
"runtime-extra"
|
|
197
|
+
]);
|
|
198
|
+
const requestedNames = entries.filter((entry) => entry.sources.some((source) => requestedSources.has(source))).map((entry) => entry.name);
|
|
199
|
+
const hostInjectedNames = entries.filter((entry) => entry.sources.includes("host-injected")).map((entry) => entry.name);
|
|
200
|
+
const shellEnabled = policies.some(
|
|
201
|
+
(policy) => policy && typeof policy === "object" && policy.shell?.enabled === true
|
|
202
|
+
);
|
|
203
|
+
const workspaceModes = [
|
|
204
|
+
...new Set(
|
|
205
|
+
policies.map(
|
|
206
|
+
(policy) => policy && typeof policy === "object" && typeof policy.workspace?.mode === "string" ? policy.workspace.mode.trim() : ""
|
|
207
|
+
).filter(Boolean)
|
|
208
|
+
)
|
|
160
209
|
];
|
|
161
|
-
|
|
162
|
-
(
|
|
210
|
+
return {
|
|
211
|
+
names: entries.map((entry) => entry.name),
|
|
212
|
+
entries,
|
|
213
|
+
requestedNames,
|
|
214
|
+
hostInjectedNames,
|
|
215
|
+
shellEnabled,
|
|
216
|
+
workspaceModes,
|
|
217
|
+
workspaceLease: workspaceModes.includes("lease")
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// packages/ai/agent/serverOwnedWebForegroundEligibility.ts
|
|
222
|
+
var DURABLE_WEB_FOREGROUND_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
223
|
+
"ask_user",
|
|
224
|
+
"exa_search",
|
|
225
|
+
"fetchWebpage"
|
|
226
|
+
]);
|
|
227
|
+
var AUDITED_WEB_FOREGROUND_HOST_BASELINE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
228
|
+
// TOOL_PACKS.CORE
|
|
229
|
+
"read",
|
|
230
|
+
"readFile",
|
|
231
|
+
"createDoc",
|
|
232
|
+
"updateDoc",
|
|
233
|
+
"search_workspace",
|
|
234
|
+
"updateSelf",
|
|
235
|
+
"ask_user",
|
|
236
|
+
"createAgentAutomation",
|
|
237
|
+
"updateAgentAutomation",
|
|
238
|
+
"deleteAgentAutomation",
|
|
239
|
+
"notifyUser",
|
|
240
|
+
// ALWAYS_ON_PACK_IDS: long-term-memory + skills
|
|
241
|
+
"queryMemory",
|
|
242
|
+
"rememberMemory",
|
|
243
|
+
"deleteMemory",
|
|
244
|
+
"loadSkill",
|
|
245
|
+
"readSkillDoc",
|
|
246
|
+
// Default system capabilities
|
|
247
|
+
"exa_search",
|
|
248
|
+
"fetchWebpage",
|
|
249
|
+
"setTodoList",
|
|
250
|
+
"startAgentRun",
|
|
251
|
+
"controlAgentRun",
|
|
252
|
+
"listAgents"
|
|
253
|
+
]);
|
|
254
|
+
function hasSupportedDurableToolSurface(agent, suppliedSurface) {
|
|
255
|
+
const surface = suppliedSurface ?? resolveEffectiveToolSurface({
|
|
256
|
+
agent
|
|
257
|
+
});
|
|
258
|
+
if (surface.shellEnabled || surface.workspaceLease) return false;
|
|
259
|
+
if (!surface.requestedNames.every(
|
|
260
|
+
(name) => DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name)
|
|
163
261
|
)) {
|
|
164
262
|
return false;
|
|
165
263
|
}
|
|
166
|
-
|
|
167
|
-
|
|
264
|
+
return surface.hostInjectedNames.every(
|
|
265
|
+
(name) => AUDITED_WEB_FOREGROUND_HOST_BASELINE_TOOL_NAMES.has(name)
|
|
266
|
+
);
|
|
168
267
|
}
|
|
169
268
|
function shouldUseServerOwnedWebForegroundTurn(input) {
|
|
170
269
|
if (input.surface !== "web") return false;
|
|
171
270
|
if (input.isDesktopApp) return false;
|
|
172
271
|
if (!input.currentServer?.trim() || !input.token?.trim()) return false;
|
|
173
272
|
if (typeof input.userInput !== "string" || !input.userInput.trim()) return false;
|
|
273
|
+
if (input.turnToolContext) {
|
|
274
|
+
if (!input.turnToolContext.complete) return false;
|
|
275
|
+
if (input.turnToolContext.unresolvedReasons?.length) return false;
|
|
276
|
+
if (!input.effectiveToolSurface) {
|
|
277
|
+
const lateBound = [
|
|
278
|
+
...input.turnToolContext.referencedToolNames,
|
|
279
|
+
...input.turnToolContext.mentionedToolNames
|
|
280
|
+
];
|
|
281
|
+
if (lateBound.some((name) => !DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name))) {
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
174
286
|
const agent = input.agentConfig;
|
|
175
287
|
if (!agent) return false;
|
|
176
288
|
if (agent.useServerProxy === false) return false;
|
|
177
289
|
if (agent.apiSource === "cli") return false;
|
|
178
290
|
if (agent.runtimeBinding?.machineId) return false;
|
|
179
|
-
if (!hasSupportedDurableToolSurface(agent)) return false;
|
|
291
|
+
if (!hasSupportedDurableToolSurface(agent, input.effectiveToolSurface)) return false;
|
|
180
292
|
const runtimeOptions = input.runtimeOptions;
|
|
181
|
-
if (runtimeOptions?.extraTools?.length)
|
|
293
|
+
if (runtimeOptions?.extraTools?.length) {
|
|
294
|
+
if (!input.effectiveToolSurface) return false;
|
|
295
|
+
if (runtimeOptions.extraTools.some(
|
|
296
|
+
(name) => typeof name === "string" && !DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name)
|
|
297
|
+
)) {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
182
301
|
if (runtimeOptions?.editingTarget) return false;
|
|
183
302
|
if (runtimeOptions?.imageConfigOverride) return false;
|
|
184
303
|
if (runtimeOptions?.quickChatModelOverride) return false;
|
|
@@ -364,18 +483,66 @@ async function waitForNewCanonicalAssistant(args) {
|
|
|
364
483
|
}
|
|
365
484
|
}
|
|
366
485
|
|
|
486
|
+
// packages/ai/agent/serverOwnedWebEffectiveToolSurface.ts
|
|
487
|
+
function resolveServerOwnedWebEffectiveToolSurface(args) {
|
|
488
|
+
const referencedToolNames = args.turnToolContext?.referencedToolNames ?? [];
|
|
489
|
+
const mentionedToolNames = args.turnToolContext?.mentionedToolNames ?? [];
|
|
490
|
+
const requested = resolveEffectiveToolSurface({
|
|
491
|
+
agent: args.agentConfig,
|
|
492
|
+
referencedToolNames,
|
|
493
|
+
mentionedToolNames,
|
|
494
|
+
runtimeExtraToolNames: args.runtimeOptions?.extraTools ?? []
|
|
495
|
+
});
|
|
496
|
+
const mergedAgent = mergeAgentToolsWithRuntime(
|
|
497
|
+
args.agentConfig,
|
|
498
|
+
referencedToolNames,
|
|
499
|
+
mentionedToolNames,
|
|
500
|
+
args.runtimeOptions ?? void 0,
|
|
501
|
+
args.state
|
|
502
|
+
);
|
|
503
|
+
const rawNames = (Array.isArray(mergedAgent.tools) ? mergedAgent.tools : []).map(readEffectiveToolName).filter((name) => typeof name === "string" && !!name);
|
|
504
|
+
const finalNames = Array.from(new Set(rawNames));
|
|
505
|
+
const finalSet = new Set(finalNames);
|
|
506
|
+
const requestedSet = new Set(requested.requestedNames);
|
|
507
|
+
const requestedNames = requested.requestedNames.filter((name) => finalSet.has(name));
|
|
508
|
+
const hostInjectedNames = finalNames.filter((name) => !requestedSet.has(name));
|
|
509
|
+
const hostResolved = resolveEffectiveToolSurface({
|
|
510
|
+
agent: args.agentConfig,
|
|
511
|
+
referencedToolNames,
|
|
512
|
+
mentionedToolNames,
|
|
513
|
+
hostInjectedToolNames: hostInjectedNames,
|
|
514
|
+
runtimeExtraToolNames: args.runtimeOptions?.extraTools ?? []
|
|
515
|
+
});
|
|
516
|
+
const entryByName = new Map(hostResolved.entries.map((entry) => [entry.name, entry]));
|
|
517
|
+
const entries = finalNames.flatMap((name) => {
|
|
518
|
+
const entry = entryByName.get(name);
|
|
519
|
+
return entry ? [entry] : [];
|
|
520
|
+
});
|
|
521
|
+
return {
|
|
522
|
+
names: finalNames,
|
|
523
|
+
entries,
|
|
524
|
+
requestedNames,
|
|
525
|
+
hostInjectedNames,
|
|
526
|
+
shellEnabled: hostResolved.shellEnabled,
|
|
527
|
+
workspaceModes: hostResolved.workspaceModes,
|
|
528
|
+
workspaceLease: hostResolved.workspaceLease
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
|
|
367
532
|
// packages/ai/agent/serverOwnedWebForegroundTurn.ts
|
|
368
533
|
function detectServerOwnedCandidateSurface() {
|
|
369
534
|
return typeof window !== "undefined" && typeof document !== "undefined" ? "web" : "non-web";
|
|
370
535
|
}
|
|
371
536
|
async function canRunServerOwnedWebForegroundTurn(args, thunk) {
|
|
372
537
|
try {
|
|
538
|
+
let state;
|
|
373
539
|
let currentServer;
|
|
374
540
|
let token;
|
|
375
541
|
try {
|
|
376
|
-
|
|
542
|
+
state = thunk.getState();
|
|
377
543
|
currentServer = selectCurrentServer(state);
|
|
378
|
-
|
|
544
|
+
const rawToken = selectIdentityToken(state);
|
|
545
|
+
token = typeof rawToken === "string" ? rawToken : void 0;
|
|
379
546
|
} catch {
|
|
380
547
|
return { eligible: false };
|
|
381
548
|
}
|
|
@@ -383,16 +550,33 @@ async function canRunServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
383
550
|
let agentConfig = args.agentConfig ?? void 0;
|
|
384
551
|
if (!agentConfig) {
|
|
385
552
|
try {
|
|
386
|
-
const { readAndWait: readAndWait2 } = await import("./dbSlice-
|
|
553
|
+
const { readAndWait: readAndWait2 } = await import("./dbSlice-DQ32LYTJ.js");
|
|
387
554
|
agentConfig = await thunk.dispatch(readAndWait2(args.agentKey)).unwrap();
|
|
388
555
|
} catch {
|
|
389
556
|
return { eligible: false };
|
|
390
557
|
}
|
|
391
558
|
}
|
|
559
|
+
if (!agentConfig) return { eligible: false };
|
|
560
|
+
const turnToolContext = await resolveTurnToolContext({
|
|
561
|
+
agentConfig,
|
|
562
|
+
dialogConfig: args.dialogConfig,
|
|
563
|
+
userInput: args.userInput,
|
|
564
|
+
state,
|
|
565
|
+
dispatch: thunk.dispatch,
|
|
566
|
+
runtimeOptions: args.runtimeOptions
|
|
567
|
+
});
|
|
568
|
+
const effectiveToolSurface = resolveServerOwnedWebEffectiveToolSurface({
|
|
569
|
+
agentConfig,
|
|
570
|
+
runtimeOptions: args.runtimeOptions,
|
|
571
|
+
state,
|
|
572
|
+
turnToolContext
|
|
573
|
+
});
|
|
392
574
|
return {
|
|
393
575
|
eligible: shouldUseServerOwnedWebForegroundTurn({
|
|
394
576
|
surface: detectServerOwnedCandidateSurface(),
|
|
395
577
|
agentConfig,
|
|
578
|
+
effectiveToolSurface,
|
|
579
|
+
turnToolContext,
|
|
396
580
|
userInput: args.userInput,
|
|
397
581
|
runtimeOptions: args.runtimeOptions,
|
|
398
582
|
currentServer,
|
package/index.js
CHANGED
|
@@ -71,8 +71,8 @@ async function runScript(script, forwardedArgs, env) {
|
|
|
71
71
|
return proc.exited;
|
|
72
72
|
}
|
|
73
73
|
async function launchTuiWorkspace(args2) {
|
|
74
|
-
const { startTuiWorkspace } = await import("./readlineWorkspace-
|
|
75
|
-
const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-
|
|
74
|
+
const { startTuiWorkspace } = await import("./readlineWorkspace-3XOFVARF.js");
|
|
75
|
+
const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-3YFNHCTW.js");
|
|
76
76
|
return startTuiWorkspace({
|
|
77
77
|
...args2,
|
|
78
78
|
// Big dialogs produce ~300KB+ summary prompts that routinely take 25–30s+;
|
|
@@ -81,7 +81,7 @@ async function launchTuiWorkspace(args2) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
async function main() {
|
|
84
|
-
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-
|
|
84
|
+
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-YOEQUA7T.js");
|
|
85
85
|
const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-ZGOFORWV.js");
|
|
86
86
|
const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-2Y7BALTO.js");
|
|
87
87
|
const runtimeEnv = {
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
buildMachinePermissionPromptBlock,
|
|
3
3
|
handleConnectorRunMessage,
|
|
4
4
|
resolveMachineRunPermissionPolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FWQEKRTD.js";
|
|
6
6
|
import {
|
|
7
7
|
isConnectorWebSocketAuthError,
|
|
8
8
|
isConnectorWebSocketRetryableError,
|
|
9
9
|
resolveConnectorWebSocketTarget
|
|
10
10
|
} from "./chunk-ALXHV7NK.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-WRMKCKZ3.js";
|
|
12
12
|
import "./chunk-I4OPU5TK.js";
|
|
13
13
|
import "./chunk-YUNJN43V.js";
|
|
14
14
|
import "./chunk-62IL3KQV.js";
|
|
@@ -23,38 +23,38 @@ import "./chunk-ZOVKKMF6.js";
|
|
|
23
23
|
import "./chunk-GLKOYSRU.js";
|
|
24
24
|
import "./chunk-4XEYAFLY.js";
|
|
25
25
|
import "./chunk-JBTJAPUF.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-O2OWEFII.js";
|
|
27
27
|
import "./chunk-ATNTHIZI.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-DCFPQW22.js";
|
|
29
29
|
import "./chunk-HS7MLR74.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-2JMMBU6V.js";
|
|
31
|
+
import "./chunk-DY7ANLKG.js";
|
|
32
32
|
import "./chunk-5UTFL4QJ.js";
|
|
33
33
|
import "./chunk-KQHGZWSV.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-BKWMNZ2X.js";
|
|
35
35
|
import "./chunk-NF64D32W.js";
|
|
36
36
|
import {
|
|
37
37
|
CORE_DRAIN_REASON
|
|
38
38
|
} from "./chunk-3L2WKC3W.js";
|
|
39
39
|
import "./chunk-4JMDLJAD.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-PCVVZ2MH.js";
|
|
41
|
+
import "./chunk-CPUFH46E.js";
|
|
42
42
|
import "./chunk-YRRASA5Q.js";
|
|
43
43
|
import "./chunk-63W5N6P3.js";
|
|
44
44
|
import "./chunk-VF4K2QE6.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-T7F46O36.js";
|
|
46
|
+
import "./chunk-6FGTMQCL.js";
|
|
47
47
|
import "./chunk-XPRWFQQK.js";
|
|
48
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-UQNS32WZ.js";
|
|
49
49
|
import "./chunk-MEYIRKDN.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-QU5A4LYX.js";
|
|
51
51
|
import "./chunk-ZJ7UHBJS.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-42Z3EMC4.js";
|
|
53
53
|
import "./chunk-523DITKR.js";
|
|
54
54
|
import "./chunk-YYLHWIW6.js";
|
|
55
55
|
import "./chunk-6O4IK4V2.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-LPVCRQMM.js";
|
|
57
|
+
import "./chunk-Z4CSIXYP.js";
|
|
58
58
|
import "./chunk-5RGU3J7P.js";
|
|
59
59
|
import "./chunk-M76ECQRD.js";
|
|
60
60
|
import "./chunk-B6SAMB33.js";
|
|
@@ -63,7 +63,7 @@ import "./chunk-MX574M24.js";
|
|
|
63
63
|
import "./chunk-4DPP773Q.js";
|
|
64
64
|
import "./chunk-VIDPVFP3.js";
|
|
65
65
|
import "./chunk-AGGIDPCZ.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-CU3QB4HW.js";
|
|
67
67
|
import "./chunk-B2XUQXQX.js";
|
|
68
68
|
import "./chunk-6TPOEJMQ.js";
|
|
69
69
|
import "./chunk-AUDNYVRC.js";
|
|
@@ -71,24 +71,25 @@ import "./chunk-KHCLMKZZ.js";
|
|
|
71
71
|
import {
|
|
72
72
|
PATH_FIELD_ALIASES,
|
|
73
73
|
createLocalWorkspaceToolExecutors
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-4H22P2JV.js";
|
|
75
75
|
import "./chunk-P6GMCCAT.js";
|
|
76
76
|
import "./chunk-ZNFJWEN4.js";
|
|
77
|
-
import "./chunk-
|
|
77
|
+
import "./chunk-QXGPFY6J.js";
|
|
78
78
|
import "./chunk-GMZLP5DV.js";
|
|
79
|
-
import "./chunk-
|
|
79
|
+
import "./chunk-OHOVNO7I.js";
|
|
80
80
|
import "./chunk-5ZUL4CUO.js";
|
|
81
81
|
import "./chunk-CQ3WA2NE.js";
|
|
82
|
+
import "./chunk-PQWU42UQ.js";
|
|
82
83
|
import "./chunk-2MBTWINN.js";
|
|
83
84
|
import "./chunk-N7J63Q6C.js";
|
|
84
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-K2CSUCHJ.js";
|
|
85
86
|
import "./chunk-PUOC4YRO.js";
|
|
86
87
|
import "./chunk-RGNEEJ3Y.js";
|
|
87
88
|
import "./chunk-H6A6X4EK.js";
|
|
88
89
|
import "./chunk-S5XGT6GB.js";
|
|
89
90
|
import "./chunk-27ONFIEY.js";
|
|
90
|
-
import "./chunk-
|
|
91
|
-
import "./chunk-
|
|
91
|
+
import "./chunk-AKG5W4LG.js";
|
|
92
|
+
import "./chunk-RYZINGPM.js";
|
|
92
93
|
import "./chunk-PSCNXBYA.js";
|
|
93
94
|
import "./chunk-L36OWPP3.js";
|
|
94
95
|
import "./chunk-BYXBJQAS.js";
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
} from "./chunk-HNMXYYJR.js";
|
|
100
101
|
import "./chunk-3BXNTXYI.js";
|
|
101
102
|
import "./chunk-W7XHHYWM.js";
|
|
102
|
-
import "./chunk-
|
|
103
|
+
import "./chunk-RSEEDUMS.js";
|
|
103
104
|
import "./chunk-UAD2WT54.js";
|
|
104
105
|
import "./chunk-ZWQUWF6W.js";
|
|
105
106
|
import "./chunk-HDLLCBRF.js";
|
|
@@ -117,19 +118,19 @@ import "./chunk-TNIX77YM.js";
|
|
|
117
118
|
import "./chunk-Y6ROFCZO.js";
|
|
118
119
|
import "./chunk-CYSYR67N.js";
|
|
119
120
|
import "./chunk-Y3PMXGLH.js";
|
|
120
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-SONWNI3L.js";
|
|
121
122
|
import {
|
|
122
123
|
parsePositiveFiniteNumberOrFallback
|
|
123
124
|
} from "./chunk-Y5GCAMGP.js";
|
|
124
125
|
import "./chunk-QDSINZM3.js";
|
|
125
126
|
import "./chunk-KX6YBIHG.js";
|
|
126
|
-
import "./chunk-
|
|
127
|
-
import "./chunk-
|
|
127
|
+
import "./chunk-HYZIYH2H.js";
|
|
128
|
+
import "./chunk-7CHC4W22.js";
|
|
128
129
|
import "./chunk-3AH7LNUB.js";
|
|
129
130
|
import "./chunk-WWC7I6TA.js";
|
|
130
131
|
import "./chunk-QSJ3HFEF.js";
|
|
131
|
-
import "./chunk-
|
|
132
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-IAESIMK7.js";
|
|
133
|
+
import "./chunk-WIWM4FE3.js";
|
|
133
134
|
import "./chunk-QOKAKDPE.js";
|
|
134
135
|
import "./chunk-SEJ5OS6F.js";
|
|
135
136
|
import "./chunk-OW765XBU.js";
|