nolo-cli 0.147.0-alpha.1 → 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-MQFQCXIE.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-SV276XHA.js → agentEmailCommands-4KW33JII.js} +31 -30
- package/{agentListCommands-FRJZOOEG.js → agentListCommands-IW3GQVUP.js} +16 -15
- package/{agentMachineCommands-IB2WMF3X.js → agentMachineCommands-CMQR4RQ4.js} +14 -13
- package/{agentProviderCommands-TWB6E5WD.js → agentProviderCommands-YK2BIIXZ.js} +1 -1
- package/{agentRecordCommands-D5FUBTKU.js → agentRecordCommands-4YBSYPIY.js} +31 -30
- package/{agentRunCommand-TNW4RJ6W.js → agentRunCommand-5MU5X5OT.js} +31 -30
- package/{agentRuntimeLocal-QQCDFR7B.js → agentRuntimeLocal-AK2QVJHY.js} +12 -11
- package/{agentSlice-L6ILXYZ3.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-OUCL4GQF.js → chatQueueReduxAdapter-HVHA2HPM.js} +11 -11
- package/{chunk-GP4TSLAB.js → chunk-2JMMBU6V.js} +27 -257
- package/{chunk-T76D3OYX.js → chunk-3SV7RM24.js} +1 -1
- package/{chunk-C4YCNZFV.js → chunk-42Z3EMC4.js} +39 -27
- package/{chunk-O7WXJIUI.js → chunk-4H22P2JV.js} +11 -9
- package/{chunk-6RO37MST.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-QWYHDF4G.js → chunk-DCFPQW22.js} +2 -2
- package/{chunk-XA4RT4LC.js → chunk-DIXLJWCD.js} +14 -14
- package/{chunk-2EE5UD3N.js → chunk-DY7ANLKG.js} +1 -1
- package/{chunk-YAE5DQ5C.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-DSY37Y5Z.js → chunk-IAG4FHOJ.js} +1 -1
- package/{chunk-HLUYTEBY.js → chunk-K2CSUCHJ.js} +1 -1
- package/{chunk-NLBUI6IU.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-A7WFQXNK.js → chunk-P4BX6FFU.js} +4 -571
- package/{chunk-5ROO623H.js → chunk-PCVVZ2MH.js} +3 -3
- package/chunk-PQWU42UQ.js +132 -0
- package/{chunk-6HWONTC6.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-67QZSNVD.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-7V2HN64K.js → chunk-WRMKCKZ3.js} +16 -14
- package/{chunk-YU2THNST.js → chunk-XISEYOGH.js} +1 -1
- package/{chunk-WSGZ4I7M.js → chunk-YUWMM4US.js} +3 -3
- package/{chunk-D76D3RTR.js → chunk-Z4CSIXYP.js} +2 -2
- package/{commandRegistry-OIUSLAJG.js → commandRegistry-YOEQUA7T.js} +42 -42
- package/{contentThunks-5QTQNUD2.js → contentThunks-AK2F3KNC.js} +12 -12
- package/{createAgentAutomationAction-YQKECXJV.js → createAgentAutomationAction-5EJL6ROU.js} +12 -12
- package/{createDialogAction-3NGUXFB7.js → createDialogAction-F5WEWA47.js} +13 -13
- package/{createPageAction-6MIKNYUH.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-UGWF2KW6.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-MOM2DHF5.js → docStore-AROBVRCR.js} +5 -5
- package/{docUpdateCommands-UTBGZPSR.js → docUpdateCommands-WEMLSW6W.js} +14 -13
- package/{handleSendMessageAction-QD6DK7XX.js → handleSendMessageAction-EGNWHAUB.js} +229 -45
- package/index.js +3 -3
- package/{machineCommands-42EQE5E2.js → machineCommands-ARZYKGGE.js} +30 -29
- package/{machineWsRunDispatch-QTUFQTZ5.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-2QJL7CU4.js → readlineWorkspace-3XOFVARF.js} +34 -33
- package/{removeDialogAgentAction-R4RTGM2S.js → removeDialogAgentAction-OSYNZRX7.js} +6 -6
- package/{runAgentClientLoop-2EFDJHKS.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-IUFYM3LS.js → streamAgentChatTurn-GYGMYOSM.js} +71 -1268
- package/{switchDialogAgentAction-JC27CP72.js → switchDialogAgentAction-GMR7WN3P.js} +4 -4
- package/{tools-G7AM5SXM.js → tools-DU4JXVAV.js} +21 -21
- package/{tuiSummaryLlmCaller-RVW6CJSK.js → tuiSummaryLlmCaller-3YFNHCTW.js} +7 -7
- package/{updateDialogTitleAction-56P5NFOI.js → updateDialogTitleAction-4U5W4AMH.js} +12 -12
- package/chunk-BJ3KD73I.js +0 -155
- package/chunk-JK5XW3NO.js +0 -108
- package/chunk-YYKMFBK7.js +0 -306
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchAndCacheTableRows
|
|
3
|
+
} from "./chunk-QU5A4LYX.js";
|
|
4
|
+
import {
|
|
5
|
+
require_react
|
|
6
|
+
} from "./chunk-YDH3FDFQ.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveBuiltinCapability,
|
|
9
|
+
resolveBuiltinSkillEntry
|
|
10
|
+
} from "./chunk-B2XUQXQX.js";
|
|
11
|
+
import {
|
|
12
|
+
toErrorMessage
|
|
13
|
+
} from "./chunk-HNMXYYJR.js";
|
|
14
|
+
import {
|
|
15
|
+
asTrimmedNonEmptyStringArray
|
|
16
|
+
} from "./chunk-3AH7LNUB.js";
|
|
17
|
+
import {
|
|
18
|
+
createAsyncThunk
|
|
19
|
+
} from "./chunk-WIWM4FE3.js";
|
|
20
|
+
import {
|
|
21
|
+
selectIdentityUserId
|
|
22
|
+
} from "./chunk-SEJ5OS6F.js";
|
|
23
|
+
import {
|
|
24
|
+
asOptionalTrimmedString
|
|
25
|
+
} from "./chunk-G3SUCT4W.js";
|
|
26
|
+
import {
|
|
27
|
+
__toESM
|
|
28
|
+
} from "./chunk-4VNS5WPM.js";
|
|
29
|
+
|
|
30
|
+
// packages/core/abortableDelay.ts
|
|
31
|
+
function waitForAbortableDelay(ms, signal) {
|
|
32
|
+
const delayMs = Number.isFinite(ms) && ms >= 0 ? Math.round(ms) : 0;
|
|
33
|
+
if (signal?.aborted) {
|
|
34
|
+
return Promise.reject(new DOMException("Aborted", "AbortError"));
|
|
35
|
+
}
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
const onAbort = () => {
|
|
38
|
+
clearTimeout(timeoutId);
|
|
39
|
+
signal?.removeEventListener("abort", onAbort);
|
|
40
|
+
reject(new DOMException("Aborted", "AbortError"));
|
|
41
|
+
};
|
|
42
|
+
const timeoutId = setTimeout(() => {
|
|
43
|
+
signal?.removeEventListener("abort", onAbort);
|
|
44
|
+
resolve();
|
|
45
|
+
}, delayMs);
|
|
46
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// packages/ai/chat/parseMultilineSSE.ts
|
|
51
|
+
function createSSEParser() {
|
|
52
|
+
let buffer = "";
|
|
53
|
+
return function parseSSE(chunk) {
|
|
54
|
+
const results = [];
|
|
55
|
+
if (!chunk) return results;
|
|
56
|
+
buffer += chunk;
|
|
57
|
+
const events = buffer.split(/\r?\n\r?\n/);
|
|
58
|
+
buffer = events.pop() ?? "";
|
|
59
|
+
for (const ev of events) {
|
|
60
|
+
if (!ev.trim()) continue;
|
|
61
|
+
const lines = ev.split(/\r?\n/);
|
|
62
|
+
let accumulator = "";
|
|
63
|
+
for (const line of lines) {
|
|
64
|
+
const t = line.trim();
|
|
65
|
+
if (t === "data: [DONE]") {
|
|
66
|
+
if (accumulator.trim()) {
|
|
67
|
+
try {
|
|
68
|
+
results.push(JSON.parse(accumulator));
|
|
69
|
+
} catch (e) {
|
|
70
|
+
}
|
|
71
|
+
accumulator = "";
|
|
72
|
+
}
|
|
73
|
+
results.push("[DONE]");
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
let content = "";
|
|
77
|
+
let isDataLine = false;
|
|
78
|
+
if (t.startsWith("data:")) {
|
|
79
|
+
content = line.substring(line.indexOf("data:") + 5).trim();
|
|
80
|
+
isDataLine = true;
|
|
81
|
+
} else if (accumulator && t && !t.startsWith("event:") && !t.startsWith("id:") && !t.startsWith("retry:")) {
|
|
82
|
+
content = line;
|
|
83
|
+
} else {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (isDataLine && !accumulator) {
|
|
87
|
+
try {
|
|
88
|
+
const obj = JSON.parse(content);
|
|
89
|
+
results.push(obj);
|
|
90
|
+
continue;
|
|
91
|
+
} catch (e) {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
accumulator += content;
|
|
95
|
+
}
|
|
96
|
+
if (accumulator.trim()) {
|
|
97
|
+
try {
|
|
98
|
+
const obj = JSON.parse(accumulator);
|
|
99
|
+
results.push(obj);
|
|
100
|
+
} catch (e) {
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return results;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
var parseMultilineSSE = createSSEParser();
|
|
108
|
+
|
|
109
|
+
// packages/core/clipMultilineText.ts
|
|
110
|
+
function clipMultilineText(value, max) {
|
|
111
|
+
const trimmed = value.trim();
|
|
112
|
+
if (trimmed.length <= max) return trimmed;
|
|
113
|
+
return `${trimmed.slice(0, max)}
|
|
114
|
+
...[truncated ${trimmed.length - max} chars]`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// packages/render/table/utils/tableSerialization.ts
|
|
118
|
+
var fetchAndSerializeTable = async (tableMeta, db, options = {}) => {
|
|
119
|
+
const tenantId = tableMeta.tenantId;
|
|
120
|
+
const tableId = tableMeta.tableId;
|
|
121
|
+
const results = await fetchAndCacheTableRows({
|
|
122
|
+
db,
|
|
123
|
+
tenantId,
|
|
124
|
+
tableId,
|
|
125
|
+
token: options.token,
|
|
126
|
+
remoteServers: options.remoteServers ?? []
|
|
127
|
+
});
|
|
128
|
+
const columns = tableMeta.columns || [];
|
|
129
|
+
const headerRow = columns.map((c) => c.label || c.name);
|
|
130
|
+
const separatorRow = columns.map(() => "---");
|
|
131
|
+
let tableMd = "";
|
|
132
|
+
if (columns.length > 0) {
|
|
133
|
+
tableMd = `| ${headerRow.join(" | ")} |
|
|
134
|
+
| ${separatorRow.join(" | ")} |
|
|
135
|
+
`;
|
|
136
|
+
results.forEach((row) => {
|
|
137
|
+
const rowData = columns.map((col) => {
|
|
138
|
+
const val = row[col.name];
|
|
139
|
+
return val === void 0 || val === null ? "" : String(val).replace(/\|/g, "\\|");
|
|
140
|
+
});
|
|
141
|
+
tableMd += `| ${rowData.join(" | ")} |
|
|
142
|
+
`;
|
|
143
|
+
});
|
|
144
|
+
} else {
|
|
145
|
+
tableMd = "(No columns defined for this table)";
|
|
146
|
+
}
|
|
147
|
+
return { rows: results, markdown: tableMd };
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// packages/ai/tools/toolResultError.ts
|
|
151
|
+
var ToolResultError = class extends Error {
|
|
152
|
+
code;
|
|
153
|
+
rawData;
|
|
154
|
+
displayData;
|
|
155
|
+
retryable;
|
|
156
|
+
constructor(message, options) {
|
|
157
|
+
super(message);
|
|
158
|
+
this.name = "ToolResultError";
|
|
159
|
+
this.code = options?.code;
|
|
160
|
+
this.rawData = options?.rawData;
|
|
161
|
+
this.displayData = options?.displayData;
|
|
162
|
+
this.retryable = options?.retryable;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var getToolResultErrorData = (error) => {
|
|
166
|
+
if (!error || typeof error !== "object") return null;
|
|
167
|
+
const candidate = error;
|
|
168
|
+
return {
|
|
169
|
+
rawData: candidate.rawData,
|
|
170
|
+
displayData: candidate.displayData,
|
|
171
|
+
code: candidate.code,
|
|
172
|
+
retryable: candidate.retryable,
|
|
173
|
+
message: candidate.message
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// packages/ai/tools/agentSkillConfig.ts
|
|
178
|
+
var MODES = [
|
|
179
|
+
"required",
|
|
180
|
+
"recommended",
|
|
181
|
+
"disabled"
|
|
182
|
+
];
|
|
183
|
+
var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
|
|
184
|
+
"worktree-isolation",
|
|
185
|
+
"systematic-investigation",
|
|
186
|
+
"show-me"
|
|
187
|
+
];
|
|
188
|
+
var asMode = (value) => typeof value === "string" && MODES.includes(value) ? value : null;
|
|
189
|
+
var resolveAgentSkillConfig = (source) => {
|
|
190
|
+
const out = {};
|
|
191
|
+
const skills = source?.skills;
|
|
192
|
+
if (skills && typeof skills === "object" && !Array.isArray(skills)) {
|
|
193
|
+
for (const [rawSlug, rawMode] of Object.entries(skills)) {
|
|
194
|
+
const slug = typeof rawSlug === "string" ? rawSlug.trim() : "";
|
|
195
|
+
const mode = asMode(rawMode);
|
|
196
|
+
if (slug && mode) out[slug] = mode;
|
|
197
|
+
}
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
for (const slug of asTrimmedNonEmptyStringArray(source?.enabledPacks) ?? []) {
|
|
201
|
+
out[slug] = "required";
|
|
202
|
+
}
|
|
203
|
+
return out;
|
|
204
|
+
};
|
|
205
|
+
var resolveAgentRequiredPackIds = (source) => {
|
|
206
|
+
const config = resolveAgentSkillConfig(source);
|
|
207
|
+
return Object.keys(config).filter((slug) => config[slug] === "required");
|
|
208
|
+
};
|
|
209
|
+
var resolveAgentRecommendedSkillNames = (source, lookup) => {
|
|
210
|
+
const config = resolveAgentSkillConfig(source);
|
|
211
|
+
const resolve = lookup ?? defaultSkillTitleLookup;
|
|
212
|
+
const seen = /* @__PURE__ */ new Set();
|
|
213
|
+
const out = [];
|
|
214
|
+
const push = (slug) => {
|
|
215
|
+
const title = resolve(slug)?.title || slug;
|
|
216
|
+
if (seen.has(title)) return;
|
|
217
|
+
seen.add(title);
|
|
218
|
+
out.push(title);
|
|
219
|
+
};
|
|
220
|
+
for (const slug of Object.keys(config)) {
|
|
221
|
+
if (config[slug] !== "recommended") continue;
|
|
222
|
+
push(slug);
|
|
223
|
+
}
|
|
224
|
+
for (const slug of DEFAULT_RECOMMENDED_SKILL_SLUGS) {
|
|
225
|
+
if (Object.hasOwn(config, slug)) continue;
|
|
226
|
+
push(slug);
|
|
227
|
+
}
|
|
228
|
+
return out;
|
|
229
|
+
};
|
|
230
|
+
var defaultSkillTitleLookup = (slug) => {
|
|
231
|
+
const cap = resolveBuiltinCapability(slug);
|
|
232
|
+
if (cap) return { title: cap.title };
|
|
233
|
+
const skill = resolveBuiltinSkillEntry(slug);
|
|
234
|
+
return skill ? { title: skill.title } : null;
|
|
235
|
+
};
|
|
236
|
+
var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
|
|
237
|
+
|
|
238
|
+
// packages/ai/tools/toolRunStore.ts
|
|
239
|
+
var import_react = __toESM(require_react());
|
|
240
|
+
var createToolRunId = () => `toolrun_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
241
|
+
var runsById = /* @__PURE__ */ new Map();
|
|
242
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
243
|
+
var version = 0;
|
|
244
|
+
var notify = () => {
|
|
245
|
+
version += 1;
|
|
246
|
+
for (const listener of listeners) {
|
|
247
|
+
try {
|
|
248
|
+
listener();
|
|
249
|
+
} catch {
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
function toolRunStarted(payload) {
|
|
254
|
+
const {
|
|
255
|
+
id,
|
|
256
|
+
messageId,
|
|
257
|
+
toolName,
|
|
258
|
+
behavior,
|
|
259
|
+
inputSummary,
|
|
260
|
+
startedAt,
|
|
261
|
+
interaction,
|
|
262
|
+
input
|
|
263
|
+
} = payload;
|
|
264
|
+
runsById.set(id, {
|
|
265
|
+
id,
|
|
266
|
+
messageId,
|
|
267
|
+
toolName,
|
|
268
|
+
behavior,
|
|
269
|
+
inputSummary,
|
|
270
|
+
status: "running",
|
|
271
|
+
startedAt: startedAt ?? Date.now(),
|
|
272
|
+
interaction,
|
|
273
|
+
input,
|
|
274
|
+
error: void 0,
|
|
275
|
+
finishedAt: void 0,
|
|
276
|
+
outputSummary: void 0,
|
|
277
|
+
steps: void 0
|
|
278
|
+
});
|
|
279
|
+
notify();
|
|
280
|
+
}
|
|
281
|
+
function toolRunSetPending(payload) {
|
|
282
|
+
const { id } = payload;
|
|
283
|
+
const run = runsById.get(id);
|
|
284
|
+
if (run) {
|
|
285
|
+
run.status = "pending";
|
|
286
|
+
notify();
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
function toolRunSucceeded(payload) {
|
|
290
|
+
const { id, outputSummary, steps, finishedAt } = payload;
|
|
291
|
+
const run = runsById.get(id);
|
|
292
|
+
if (run) {
|
|
293
|
+
run.status = "succeeded";
|
|
294
|
+
run.outputSummary = outputSummary;
|
|
295
|
+
if (steps !== void 0) {
|
|
296
|
+
run.steps = steps;
|
|
297
|
+
}
|
|
298
|
+
run.finishedAt = finishedAt ?? Date.now();
|
|
299
|
+
notify();
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function toolRunUpdated(payload) {
|
|
303
|
+
const { id, outputSummary, steps } = payload;
|
|
304
|
+
const run = runsById.get(id);
|
|
305
|
+
if (run) {
|
|
306
|
+
if (outputSummary !== void 0) {
|
|
307
|
+
run.outputSummary = outputSummary;
|
|
308
|
+
}
|
|
309
|
+
if (steps !== void 0) {
|
|
310
|
+
run.steps = steps;
|
|
311
|
+
}
|
|
312
|
+
notify();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function toolRunFailed(payload) {
|
|
316
|
+
const { id, error, outputSummary, steps, finishedAt } = payload;
|
|
317
|
+
const run = runsById.get(id);
|
|
318
|
+
if (run) {
|
|
319
|
+
run.status = "failed";
|
|
320
|
+
run.error = error;
|
|
321
|
+
if (outputSummary !== void 0) {
|
|
322
|
+
run.outputSummary = outputSummary;
|
|
323
|
+
}
|
|
324
|
+
if (steps !== void 0) {
|
|
325
|
+
run.steps = steps;
|
|
326
|
+
}
|
|
327
|
+
run.finishedAt = finishedAt ?? Date.now();
|
|
328
|
+
notify();
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function getAllToolRuns() {
|
|
332
|
+
return Array.from(runsById.values()).sort((a, b) => a.startedAt - b.startedAt);
|
|
333
|
+
}
|
|
334
|
+
function getToolRunById(id) {
|
|
335
|
+
return runsById.get(id);
|
|
336
|
+
}
|
|
337
|
+
var executeToolRun = createAsyncThunk(
|
|
338
|
+
"toolRun/executeToolRun",
|
|
339
|
+
async ({ id, inputOverride }, thunkApi) => {
|
|
340
|
+
const run = getToolRunById(id);
|
|
341
|
+
if (!run) {
|
|
342
|
+
throw new Error(`ToolRun not found: ${id}`);
|
|
343
|
+
}
|
|
344
|
+
const executionInput = inputOverride ?? run.input;
|
|
345
|
+
if (!executionInput) {
|
|
346
|
+
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
347
|
+
}
|
|
348
|
+
const { findToolExecutor } = await import("./tools-DU4JXVAV.js");
|
|
349
|
+
const { executor } = findToolExecutor(run.toolName);
|
|
350
|
+
toolRunStarted({
|
|
351
|
+
id: run.id,
|
|
352
|
+
messageId: run.messageId,
|
|
353
|
+
toolName: run.toolName,
|
|
354
|
+
behavior: run.behavior,
|
|
355
|
+
inputSummary: run.inputSummary,
|
|
356
|
+
startedAt: Date.now(),
|
|
357
|
+
interaction: run.interaction,
|
|
358
|
+
input: executionInput
|
|
359
|
+
});
|
|
360
|
+
try {
|
|
361
|
+
const result = await executor(executionInput, thunkApi, {
|
|
362
|
+
parentMessageId: run.messageId
|
|
363
|
+
});
|
|
364
|
+
toolRunSucceeded({
|
|
365
|
+
id: run.id,
|
|
366
|
+
outputSummary: result?.displayData || ""
|
|
367
|
+
});
|
|
368
|
+
if (run.toolName === "deleteSpaces") {
|
|
369
|
+
const latestState = thunkApi.getState();
|
|
370
|
+
const userId = selectIdentityUserId(latestState);
|
|
371
|
+
if (userId) {
|
|
372
|
+
const { fetchUserSpaceMemberships } = await import("./memberThunks-5ZXPR63F.js");
|
|
373
|
+
await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return {
|
|
377
|
+
id: run.id,
|
|
378
|
+
rawData: result?.rawData,
|
|
379
|
+
displayData: result?.displayData
|
|
380
|
+
};
|
|
381
|
+
} catch (e) {
|
|
382
|
+
const msg = toErrorMessage(e);
|
|
383
|
+
const structured = getToolResultErrorData(e);
|
|
384
|
+
toolRunFailed({
|
|
385
|
+
id: run.id,
|
|
386
|
+
error: msg,
|
|
387
|
+
outputSummary: asOptionalTrimmedString(structured?.displayData)
|
|
388
|
+
});
|
|
389
|
+
throw e;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
export {
|
|
395
|
+
clipMultilineText,
|
|
396
|
+
fetchAndSerializeTable,
|
|
397
|
+
ToolResultError,
|
|
398
|
+
getToolResultErrorData,
|
|
399
|
+
resolveAgentRequiredPackIds,
|
|
400
|
+
resolveAgentRecommendedSkillNames,
|
|
401
|
+
isAgentSkillDisabled,
|
|
402
|
+
waitForAbortableDelay,
|
|
403
|
+
createSSEParser,
|
|
404
|
+
createToolRunId,
|
|
405
|
+
toolRunStarted,
|
|
406
|
+
toolRunSetPending,
|
|
407
|
+
toolRunSucceeded,
|
|
408
|
+
toolRunUpdated,
|
|
409
|
+
toolRunFailed,
|
|
410
|
+
getAllToolRuns
|
|
411
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer,
|
|
3
3
|
selectRemoteServers
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SONWNI3L.js";
|
|
5
5
|
import {
|
|
6
6
|
createUserKey,
|
|
7
7
|
extractAgentInfo,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
noloDeleteRequest,
|
|
16
16
|
noloWriteRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WIWM4FE3.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeTimeFields
|
|
20
20
|
} from "./chunk-QOKAKDPE.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DCFPQW22.js";
|
|
9
9
|
import {
|
|
10
10
|
parseApiError
|
|
11
11
|
} from "./chunk-OCZKATRC.js";
|
|
@@ -15,20 +15,20 @@ import {
|
|
|
15
15
|
parseToolCallArguments,
|
|
16
16
|
performFetchRequest,
|
|
17
17
|
sanitizeOutboundMessages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-P4BX6FFU.js";
|
|
19
19
|
import {
|
|
20
|
-
createToolRunId,
|
|
21
20
|
findToolExecutor,
|
|
21
|
+
toolDefinitionsByName
|
|
22
|
+
} from "./chunk-2JMMBU6V.js";
|
|
23
|
+
import {
|
|
24
|
+
createSSEParser,
|
|
25
|
+
createToolRunId,
|
|
22
26
|
getToolResultErrorData,
|
|
23
|
-
toolDefinitionsByName,
|
|
24
27
|
toolRunFailed,
|
|
25
28
|
toolRunSetPending,
|
|
26
29
|
toolRunStarted,
|
|
27
30
|
toolRunSucceeded
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
createSSEParser
|
|
31
|
-
} from "./chunk-BJ3KD73I.js";
|
|
31
|
+
} from "./chunk-BKWMNZ2X.js";
|
|
32
32
|
import {
|
|
33
33
|
getCurrentSpaceId
|
|
34
34
|
} from "./chunk-ZJ7UHBJS.js";
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
messageStreamEnd,
|
|
38
38
|
messageStreaming,
|
|
39
39
|
updateToolMessage
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-42Z3EMC4.js";
|
|
41
41
|
import {
|
|
42
42
|
streamAgentChatTurn
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-LPVCRQMM.js";
|
|
44
44
|
import {
|
|
45
45
|
addActiveController,
|
|
46
46
|
removeActiveController,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
EMPTY_ASSISTANT_REPAIR_PROMPT,
|
|
63
63
|
getModelInfo
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-AKG5W4LG.js";
|
|
65
65
|
import {
|
|
66
66
|
toErrorMessage
|
|
67
67
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -70,10 +70,10 @@ import {
|
|
|
70
70
|
} from "./chunk-3BXNTXYI.js";
|
|
71
71
|
import {
|
|
72
72
|
selectCurrentServer
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-SONWNI3L.js";
|
|
74
74
|
import {
|
|
75
75
|
write
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-HYZIYH2H.js";
|
|
77
77
|
import {
|
|
78
78
|
createDialogMessageKeyAndId,
|
|
79
79
|
dialogMessageKey,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
} from "./chunk-3AH7LNUB.js";
|
|
82
82
|
import {
|
|
83
83
|
createAsyncThunk
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-WIWM4FE3.js";
|
|
85
85
|
import {
|
|
86
86
|
isAbortError
|
|
87
87
|
} from "./chunk-QOKAKDPE.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WRMKCKZ3.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BKWMNZ2X.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4H22P2JV.js";
|
|
11
11
|
import {
|
|
12
12
|
applyToolSurfaceConstraints
|
|
13
13
|
} from "./chunk-RGNEEJ3Y.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XISEYOGH.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ALGORS6Y.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveCredentialGroup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DY7ANLKG.js";
|
|
11
11
|
import {
|
|
12
12
|
PUBLIC_AGENT_KEY_PREFIX,
|
|
13
13
|
isOwnedAgentKey,
|