nolo-cli 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-TURRLTZ2.js → _executeModel-QAUS6B7J.js} +24 -24
- package/{action-N3KXFO5V.js → action-GUOZYYGN.js} +4 -4
- package/{addContentAction-4Z762DMR.js → addContentAction-QDGHGUBH.js} +3 -3
- package/{addDialogAgentAction-FALLEKPR.js → addDialogAgentAction-Z4YCYZIV.js} +2 -2
- package/{agentDeleteCommand-AZDVM4HQ.js → agentDeleteCommand-QDO62EZA.js} +20 -20
- package/{agentEmailCommands-M4AHOEZ3.js → agentEmailCommands-UZ5BKX3P.js} +38 -38
- package/{agentGrantCommands-B4MB23VQ.js → agentGrantCommands-JNDE4RWR.js} +2 -2
- package/{agentListCommands-OJLOXSKL.js → agentListCommands-ZC33UDWT.js} +22 -22
- package/{agentMachineCommands-NPMM4Z53.js → agentMachineCommands-RZGZEZRL.js} +20 -20
- package/{agentPullCommand-KRBRIFIY.js → agentPullCommand-6HWUT3SW.js} +2 -2
- package/{agentRecordCommands-RVUH7XLZ.js → agentRecordCommands-DGDXE2VH.js} +33 -33
- package/{agentRunCommand-F6W2WKKZ.js → agentRunCommand-SRZWFOPH.js} +35 -35
- package/{agentRunControl-IX4F5W2C.js → agentRunControl-6ADXVYMR.js} +2 -2
- package/{agentRuntimeLocal-DSUBT77I.js → agentRuntimeLocal-4YCF6IRF.js} +11 -11
- package/{agentSlice-PCEL26Z7.js → agentSlice-IVE735EV.js} +3 -3
- package/appDeleteCommands-7I26L64I.js +124 -0
- package/appDeployCommands-TZLZNTJN.js +163 -0
- package/appDeployStatusCommands-OPPTLHRW.js +144 -0
- package/appGetCommands-N2S4HYKY.js +119 -0
- package/appListCommands-OBTPPKUM.js +122 -0
- package/{authCommand-66ME4KZX.js → authCommand-YFTR3347.js} +5 -5
- package/{authCommands-GH5T6RYV.js → authCommands-YXGOXNBZ.js} +3 -3
- package/{chunk-3B2LFO6R.js → browser-image-compression-MFDTD7K6.js} +4 -518
- package/{chunk-4UUJFFMK.js → chunk-472E5RMQ.js} +1 -1
- package/chunk-4QQFLN5C.js +552 -0
- package/{chunk-33K5FKRL.js → chunk-5VMYGIIL.js} +110 -39
- package/{chunk-LNSRTNH7.js → chunk-6565R2TI.js} +20 -16
- package/{chunk-VQFY3VXW.js → chunk-6MHDWKOT.js} +3 -2
- package/{chunk-5NBHQD4D.js → chunk-A7GB5UGH.js} +1 -1
- package/{chunk-NZFWHBW5.js → chunk-AWDOJBHW.js} +487 -441
- package/{chunk-MYE5X27Y.js → chunk-BFRVXJJJ.js} +43 -16
- package/{chunk-PYAJ6ZSK.js → chunk-G2MKOQCB.js} +1 -1
- package/chunk-GFUIQ4RY.js +136 -0
- package/{chunk-KTFJUPDW.js → chunk-HRQCKQA5.js} +31 -31
- package/{chunk-TQCONXQ3.js → chunk-IOQ7IBPU.js} +1 -1
- package/{chunk-OIMX7MM4.js → chunk-ISYE6GZB.js} +1 -1
- package/{chunk-RZALKBP4.js → chunk-IZ2QRVEU.js} +2 -2
- package/{chunk-XIDYAII4.js → chunk-JBKVPAYK.js} +7 -140
- package/{chunk-V6VXDXGY.js → chunk-JS33TCQ3.js} +2 -2
- package/{chunk-5R73BS7Y.js → chunk-K53477EY.js} +5 -5
- package/{chunk-7JJCGV7N.js → chunk-K6EUAOW3.js} +1 -1
- package/{chunk-OHEKYYJF.js → chunk-KMQPSTMJ.js} +6 -6
- package/{chunk-3WGLLTK4.js → chunk-LSFAWXKC.js} +100 -3
- package/{chunk-4ON5AV72.js → chunk-MYMMNKYL.js} +1 -1
- package/{chunk-BHK5ZAW7.js → chunk-N5424GSW.js} +1 -1
- package/chunk-NTC6I2FN.js +107 -0
- package/{chunk-7LAIOHOL.js → chunk-O53CP2QR.js} +3 -3
- package/{chunk-TLNEQI2R.js → chunk-OKSYPTDZ.js} +9 -9
- package/{chunk-IMZ7AFIJ.js → chunk-OQMPU2ML.js} +4 -4
- package/{chunk-IYGQF62W.js → chunk-P4MJQWWF.js} +3 -3
- package/{chunk-UW3WOIWJ.js → chunk-RKM3K52F.js} +1 -1
- package/{chunk-A5V7UEZJ.js → chunk-SFXYKGK2.js} +3 -3
- package/{chunk-S5UACFUP.js → chunk-TTGAVETO.js} +10 -2
- package/{chunk-BOJVWKNA.js → chunk-U7LEGLEB.js} +1 -1
- package/{chunk-E6KIDMTW.js → chunk-UXKQQ2MR.js} +9 -9
- package/{chunk-R5AOLZZV.js → chunk-VE6XMVKG.js} +203 -45
- package/{chunk-NJVPXLRY.js → chunk-VPTJB4HM.js} +1 -1
- package/{chunk-PB2DHBEQ.js → chunk-WA6KZL5V.js} +25 -6
- package/{chunk-T3X232L6.js → chunk-WNLPAOIT.js} +1 -1
- package/{chunk-NFPO7274.js → chunk-WRN5EQT7.js} +1 -1
- package/{chunk-4F4FJPFM.js → chunk-XGQZFBO5.js} +90 -209
- package/{chunk-3FCSMQAC.js → chunk-XVP3C2KY.js} +1 -1
- package/{chunk-TYRTLSGX.js → chunk-YNHQIXX5.js} +833 -5746
- package/{chunk-7TN6V43T.js → chunk-Z24FGIU2.js} +2 -2
- package/{cliEnvHelpers-VYC2OPTB.js → cliEnvHelpers-ZXNMX7VV.js} +1 -1
- package/{createAgentAutomationAction-VLNDOHSP.js → createAgentAutomationAction-TS6NNZ4X.js} +9 -9
- package/{createDialogAction-6WYTS62Z.js → createDialogAction-5HVQ33EX.js} +10 -10
- package/{createPageAction-YKHOC3LW.js → createPageAction-4F3ZGQJD.js} +9 -9
- package/{dbSlice-7Q23HSWH.js → dbSlice-OP6UPXKA.js} +2 -2
- package/{dialogCommands-BQDGLVMO.js → dialogCommands-3GEPXHFB.js} +16 -16
- package/{dialogSlice-2A2JOFZW.js → dialogSlice-FAWUQDJW.js} +9 -9
- package/{docCreateCommands-K2MPMXYF.js → docCreateCommands-ZE3S6BCP.js} +22 -20
- package/{docDeleteCommands-NBAARB77.js → docDeleteCommands-TW6PGTRT.js} +21 -19
- package/{docReadCommands-S3MO5RPS.js → docReadCommands-LDXL3B6J.js} +20 -18
- package/{docStore-JJP5PUR7.js → docStore-2UHVWLTV.js} +10 -10
- package/{docUpdateCommands-EHEI7FCE.js → docUpdateCommands-GYD6XI5O.js} +21 -19
- package/{handleSendMessageAction-UAXTF73I.js → handleSendMessageAction-LJPUYNOH.js} +15 -11
- package/index.js +109 -78
- package/{machineCommands-BQ46IS5M.js → machineCommands-OKNDYS3M.js} +36 -36
- package/{machineWsRunDispatch-R33NXNNI.js → machineWsRunDispatch-ZX5AJ6FJ.js} +32 -32
- package/{memoryCommands-AFMES3LN.js → memoryCommands-EBMICQR6.js} +1 -1
- package/package.json +1 -1
- package/{read-SIWMJRHC.js → read-HXHAZBKH.js} +1 -1
- package/{readDocTool-TCYJY4PP.js → readDocTool-VPBDTO4G.js} +1 -1
- package/{readlineWorkspace-KBG4DKLX.js → readlineWorkspace-MB3ANKHM.js} +123 -103
- package/{removeDialogAgentAction-WKHZT6VJ.js → removeDialogAgentAction-HUFVN35S.js} +4 -4
- package/{runAgentClientLoop-MUV5YIRK.js → runAgentClientLoop-A75BUU6D.js} +19 -19
- package/{runtimeDoctorCommands-QNF3J3UV.js → runtimeDoctorCommands-THIHX2SY.js} +1 -1
- package/{setDialogExtraReferencesAction-GCI5QU6E.js → setDialogExtraReferencesAction-2VLGWQKG.js} +2 -2
- package/{setPrimaryDialogAgentAction-NRO57AS6.js → setPrimaryDialogAgentAction-VB4UV2CC.js} +4 -4
- package/{settingSlice-FTWZ5ZHT.js → settingSlice-7JYPQNAC.js} +3 -3
- package/{spaceCommands-4R63UST3.js → spaceCommands-O3KJNCON.js} +21 -21
- package/{spaceSlice-VTC3QXP3.js → spaceSlice-444MFUP6.js} +11 -9
- package/{streamAgentChatTurn-43N7BNV2.js → streamAgentChatTurn-DJAE7USZ.js} +42 -39
- package/{tableCommands-E4SQWDOX.js → tableCommands-3P7MJ3PF.js} +4 -4
- package/{tools-PX6PEJLE.js → tools-YB6LXSVN.js} +14 -14
- package/{tuiSummaryLlmCaller-2D65LKWM.js → tuiSummaryLlmCaller-QQL3JA5I.js} +3 -3
- package/{updateCommands-XZDOOYFH.js → updateCommands-XTW55TOT.js} +2 -2
- package/{updateDialogTitleAction-NPQZWAKG.js → updateDialogTitleAction-6HGFBM64.js} +9 -9
- package/{chunk-3QAF2LTL.js → chunk-DZ3XJVET.js} +3 -3
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
// packages/agent-runtime/
|
|
2
|
-
var OPEN_TAG = "<think>";
|
|
3
|
-
var CLOSE_TAG = "</think>";
|
|
1
|
+
// packages/agent-runtime/tagPrefixMatch.ts
|
|
4
2
|
function longestTagPrefixLength(buffer, tag) {
|
|
5
3
|
const max = Math.min(buffer.length, tag.length - 1);
|
|
6
4
|
for (let len = max; len > 0; len--) {
|
|
@@ -10,6 +8,10 @@ function longestTagPrefixLength(buffer, tag) {
|
|
|
10
8
|
}
|
|
11
9
|
return 0;
|
|
12
10
|
}
|
|
11
|
+
|
|
12
|
+
// packages/agent-runtime/thinkTagParser.ts
|
|
13
|
+
var OPEN_TAG = "<think>";
|
|
14
|
+
var CLOSE_TAG = "</think>";
|
|
13
15
|
function extractThinkContent(content) {
|
|
14
16
|
const regex = new RegExp(`${OPEN_TAG}([\\s\\S]*?)${CLOSE_TAG}`, "g");
|
|
15
17
|
const matches = [...content.matchAll(regex)];
|
|
@@ -81,6 +83,98 @@ function flushThinkParser(state) {
|
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
|
|
86
|
+
// packages/agent-runtime/toolCallTextParser.ts
|
|
87
|
+
var OPEN_TAG2 = "<tool_call>";
|
|
88
|
+
var CLOSE_TAG2 = "</tool_call>";
|
|
89
|
+
function createToolCallTextParserState() {
|
|
90
|
+
return { mode: "content", buffer: "" };
|
|
91
|
+
}
|
|
92
|
+
function processToolCallTextChunk(chunk, state) {
|
|
93
|
+
let visible = "";
|
|
94
|
+
let toolCallTexts = [];
|
|
95
|
+
let { mode, buffer } = state;
|
|
96
|
+
buffer += chunk;
|
|
97
|
+
while (true) {
|
|
98
|
+
if (mode === "content") {
|
|
99
|
+
const idx = buffer.indexOf(OPEN_TAG2);
|
|
100
|
+
if (idx === -1) {
|
|
101
|
+
const keep = longestTagPrefixLength(buffer, OPEN_TAG2);
|
|
102
|
+
visible += buffer.slice(0, buffer.length - keep);
|
|
103
|
+
buffer = buffer.slice(buffer.length - keep);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
visible += buffer.slice(0, idx);
|
|
107
|
+
buffer = buffer.slice(idx + OPEN_TAG2.length);
|
|
108
|
+
mode = "toolcall";
|
|
109
|
+
} else {
|
|
110
|
+
const idx = buffer.indexOf(CLOSE_TAG2);
|
|
111
|
+
if (idx === -1) {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
toolCallTexts.push(buffer.slice(0, idx));
|
|
115
|
+
buffer = buffer.slice(idx + CLOSE_TAG2.length);
|
|
116
|
+
mode = "content";
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
content: visible,
|
|
121
|
+
toolCallTexts,
|
|
122
|
+
state: { mode, buffer }
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function flushToolCallTextParser(state) {
|
|
126
|
+
const { mode, buffer } = state;
|
|
127
|
+
if (mode === "toolcall") {
|
|
128
|
+
const keep = longestTagPrefixLength(buffer, CLOSE_TAG2);
|
|
129
|
+
const text = buffer.slice(0, buffer.length - keep);
|
|
130
|
+
return {
|
|
131
|
+
content: "",
|
|
132
|
+
toolCallTexts: text ? [text] : [],
|
|
133
|
+
state: { mode: "content", buffer: "" }
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
content: buffer,
|
|
138
|
+
toolCallTexts: [],
|
|
139
|
+
state: { mode: "content", buffer: "" }
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function tryParseToolCallText(text) {
|
|
143
|
+
const trimmed = text.trim();
|
|
144
|
+
if (!trimmed) return null;
|
|
145
|
+
try {
|
|
146
|
+
const parsed = JSON.parse(trimmed);
|
|
147
|
+
if (typeof parsed === "object" && parsed !== null && typeof parsed.name === "string") {
|
|
148
|
+
return {
|
|
149
|
+
name: parsed.name,
|
|
150
|
+
arguments: typeof parsed.arguments === "string" ? parsed.arguments : JSON.stringify(parsed.arguments ?? {})
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
} catch {
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
function processContentChunkWithToolCallStripping(chunk, state, onToolCall) {
|
|
158
|
+
const stripped = processToolCallTextChunk(chunk, state);
|
|
159
|
+
for (const text of stripped.toolCallTexts) {
|
|
160
|
+
const parsedTc = tryParseToolCallText(text);
|
|
161
|
+
if (parsedTc) {
|
|
162
|
+
onToolCall(parsedTc.name, parsedTc.arguments);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return { cleanedContent: stripped.content, state: stripped.state };
|
|
166
|
+
}
|
|
167
|
+
function flushToolCallTextParserIntoCallback(state, onToolCall) {
|
|
168
|
+
const flushed = flushToolCallTextParser(state);
|
|
169
|
+
for (const text of flushed.toolCallTexts) {
|
|
170
|
+
const parsedTc = tryParseToolCallText(text);
|
|
171
|
+
if (parsedTc) {
|
|
172
|
+
onToolCall(parsedTc.name, parsedTc.arguments);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return { residualContent: flushed.content, state: flushed.state };
|
|
176
|
+
}
|
|
177
|
+
|
|
84
178
|
// packages/agent-runtime/toolCallAccumulator.ts
|
|
85
179
|
function createToolCallAccumulator() {
|
|
86
180
|
return { slots: [] };
|
|
@@ -141,6 +235,9 @@ export {
|
|
|
141
235
|
createThinkParserState,
|
|
142
236
|
processThinkChunk,
|
|
143
237
|
flushThinkParser,
|
|
238
|
+
createToolCallTextParserState,
|
|
239
|
+
processContentChunkWithToolCallStripping,
|
|
240
|
+
flushToolCallTextParserIntoCallback,
|
|
144
241
|
createToolCallAccumulator,
|
|
145
242
|
accumulateToolCallDelta,
|
|
146
243
|
finalizeAccumulatedToolCalls
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
requireTokenUser
|
|
3
|
+
} from "./chunk-JBKVPAYK.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveServerUrl
|
|
6
|
+
} from "./chunk-A7GB5UGH.js";
|
|
7
|
+
|
|
8
|
+
// packages/cli/cliApiClient.ts
|
|
9
|
+
var CliApiError = class extends Error {
|
|
10
|
+
code;
|
|
11
|
+
status;
|
|
12
|
+
constructor(message, code, status) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.code = code;
|
|
15
|
+
this.status = status;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
async function cliApiRequest(args) {
|
|
19
|
+
const method = args.method ?? "POST";
|
|
20
|
+
let url = `${args.serverUrl.replace(/\/$/, "")}${args.path}`;
|
|
21
|
+
if (args.query) {
|
|
22
|
+
const params = new URLSearchParams(args.query);
|
|
23
|
+
url += `?${params.toString()}`;
|
|
24
|
+
}
|
|
25
|
+
const headers = {
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
Authorization: `Bearer ${args.authToken}`
|
|
28
|
+
};
|
|
29
|
+
const init = { method, headers };
|
|
30
|
+
if (args.body !== void 0 && args.body !== null && method !== "GET") {
|
|
31
|
+
init.body = JSON.stringify(args.body);
|
|
32
|
+
}
|
|
33
|
+
let response;
|
|
34
|
+
try {
|
|
35
|
+
response = await fetch(url, init);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
throw new CliApiError(`\u8BF7\u6C42\u5931\u8D25: ${error.message}`, "NETWORK_ERROR", 0);
|
|
38
|
+
}
|
|
39
|
+
let data;
|
|
40
|
+
try {
|
|
41
|
+
data = await response.json();
|
|
42
|
+
} catch {
|
|
43
|
+
throw new CliApiError(
|
|
44
|
+
`\u670D\u52A1\u7AEF\u8FD4\u56DE\u975E JSON \u54CD\u5E94 (HTTP ${response.status})`,
|
|
45
|
+
"INVALID_RESPONSE",
|
|
46
|
+
response.status
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if (!response.ok || data.success !== true) {
|
|
50
|
+
const errorObj = data.error ?? {};
|
|
51
|
+
const message = errorObj.message || data.message || `\u8BF7\u6C42\u5931\u8D25 (HTTP ${response.status})`;
|
|
52
|
+
const code = errorObj.code || `HTTP_${response.status}`;
|
|
53
|
+
throw new CliApiError(message, code, response.status);
|
|
54
|
+
}
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
function printCliError(error) {
|
|
58
|
+
if (error instanceof CliApiError) {
|
|
59
|
+
process.stderr.write(`\u9519\u8BEF [${error.code}]: ${error.message}
|
|
60
|
+
`);
|
|
61
|
+
} else if (error instanceof Error) {
|
|
62
|
+
process.stderr.write(`\u9519\u8BEF: ${error.message}
|
|
63
|
+
`);
|
|
64
|
+
} else {
|
|
65
|
+
process.stderr.write(`\u9519\u8BEF: ${String(error)}
|
|
66
|
+
`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function resolveCliContext(args, env) {
|
|
70
|
+
const serverUrl = resolveServerUrl(args, env);
|
|
71
|
+
const { authToken, userId } = requireTokenUser(args, env, false);
|
|
72
|
+
return { serverUrl, authToken, userId };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// packages/cli/cliOutputHelpers.ts
|
|
76
|
+
function pickDefined(obj) {
|
|
77
|
+
const result = {};
|
|
78
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
79
|
+
if (value !== void 0 && value !== null) result[key] = value;
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
function formatFields(fields, indent = "") {
|
|
84
|
+
const maxKeyLen = fields.reduce((max, [k]) => Math.max(max, k.length), 0);
|
|
85
|
+
const lines = fields.map(([key, value]) => {
|
|
86
|
+
const display = value === void 0 || value === null ? "-" : String(value);
|
|
87
|
+
return `${indent}${key.padEnd(maxKeyLen)}: ${display}`;
|
|
88
|
+
});
|
|
89
|
+
return lines.join("\n");
|
|
90
|
+
}
|
|
91
|
+
function outputResult(data, shouldOutputJson, formatter, output = process.stdout) {
|
|
92
|
+
if (shouldOutputJson) {
|
|
93
|
+
output.write(`${JSON.stringify(data, null, 2)}
|
|
94
|
+
`);
|
|
95
|
+
} else {
|
|
96
|
+
formatter();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
cliApiRequest,
|
|
102
|
+
printCliError,
|
|
103
|
+
resolveCliContext,
|
|
104
|
+
pickDefined,
|
|
105
|
+
formatFields,
|
|
106
|
+
outputResult
|
|
107
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YNHQIXX5.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
patch,
|
|
15
15
|
readAndWait
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SFXYKGK2.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-4F3ZGQJD.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-472E5RMQ.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
@@ -15,6 +15,14 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
toErrorMessage
|
|
17
17
|
} from "./chunk-HNMXYYJR.js";
|
|
18
|
+
import {
|
|
19
|
+
parseUserIdFromAuthToken,
|
|
20
|
+
readOption,
|
|
21
|
+
resolveAuthToken,
|
|
22
|
+
resolveDeleteServerCandidates,
|
|
23
|
+
resolveServerCandidates,
|
|
24
|
+
resolveServerUrl
|
|
25
|
+
} from "./chunk-A7GB5UGH.js";
|
|
18
26
|
import {
|
|
19
27
|
parsePositiveFiniteNumberOrFallback
|
|
20
28
|
} from "./chunk-Y5GCAMGP.js";
|
|
@@ -31,14 +39,6 @@ import {
|
|
|
31
39
|
import {
|
|
32
40
|
isRecord
|
|
33
41
|
} from "./chunk-KUG52IAP.js";
|
|
34
|
-
import {
|
|
35
|
-
parseUserIdFromAuthToken,
|
|
36
|
-
readOption,
|
|
37
|
-
resolveAuthToken,
|
|
38
|
-
resolveDeleteServerCandidates,
|
|
39
|
-
resolveServerCandidates,
|
|
40
|
-
resolveServerUrl
|
|
41
|
-
} from "./chunk-5NBHQD4D.js";
|
|
42
42
|
import {
|
|
43
43
|
asOptionalTrimmedString
|
|
44
44
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
patch,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SFXYKGK2.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgentKey,
|
|
17
17
|
toTrimmedString
|
|
@@ -300,7 +300,7 @@ var slice = createSliceWithThunks({
|
|
|
300
300
|
const overrides = {};
|
|
301
301
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
302
302
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
303
|
-
const { _executeModel } = await import("./_executeModel-
|
|
303
|
+
const { _executeModel } = await import("./_executeModel-QAUS6B7J.js");
|
|
304
304
|
return _executeModel(
|
|
305
305
|
{
|
|
306
306
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -321,7 +321,7 @@ var slice = createSliceWithThunks({
|
|
|
321
321
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
322
322
|
*/
|
|
323
323
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
324
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
324
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-A75BUU6D.js");
|
|
325
325
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
326
326
|
{
|
|
327
327
|
agentKey: args.agentKey,
|
|
@@ -337,7 +337,7 @@ var slice = createSliceWithThunks({
|
|
|
337
337
|
* 聊天轮次流式 Agent 调用
|
|
338
338
|
*/
|
|
339
339
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
340
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
340
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-DJAE7USZ.js");
|
|
341
341
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
342
342
|
}),
|
|
343
343
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AWDOJBHW.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-W4NVOSFF.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveAgentRecordFromHybridStore,
|
|
13
13
|
sanitizeAgentRecordForCliOutput,
|
|
14
14
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-K53477EY.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
18
|
} from "./chunk-VHBWHNVT.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
parseUserIdFromAuthToken,
|
|
24
24
|
resolveAuthToken
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-A7GB5UGH.js";
|
|
26
26
|
|
|
27
27
|
// packages/cli/agentRecordCommands.ts
|
|
28
28
|
async function runAgentReadCommand(args, deps = {}) {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
readAction,
|
|
13
13
|
readRequestManager,
|
|
14
14
|
resolveAgentReadServers
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VPTJB4HM.js";
|
|
16
16
|
import {
|
|
17
17
|
asyncThunkCreator,
|
|
18
18
|
buildCreateSlice,
|
|
@@ -704,7 +704,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
704
704
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
705
705
|
read: create.asyncThunk(
|
|
706
706
|
async (payload, thunkApi) => {
|
|
707
|
-
const { readAction: readAction2 } = await import("./read-
|
|
707
|
+
const { readAction: readAction2 } = await import("./read-HXHAZBKH.js");
|
|
708
708
|
return readAction2(payload, thunkApi);
|
|
709
709
|
},
|
|
710
710
|
{
|
|
@@ -778,7 +778,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
778
778
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
779
779
|
share: create.asyncThunk(
|
|
780
780
|
async (config, thunkApi) => {
|
|
781
|
-
const { shareResourceAction } = await import("./action-
|
|
781
|
+
const { shareResourceAction } = await import("./action-GUOZYYGN.js");
|
|
782
782
|
return shareResourceAction(config, thunkApi);
|
|
783
783
|
}
|
|
784
784
|
),
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
toTimestampMs,
|
|
11
11
|
upsert,
|
|
12
12
|
write
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SFXYKGK2.js";
|
|
14
14
|
import {
|
|
15
15
|
createUserKey,
|
|
16
16
|
createUserPreferenceKey,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-QSJ3HFEF.js";
|
|
22
22
|
import {
|
|
23
23
|
BUILTIN_NOLO_AGENT_KEY
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VPTJB4HM.js";
|
|
25
25
|
import {
|
|
26
26
|
asyncThunkCreator,
|
|
27
27
|
buildCreateSlice,
|
|
@@ -74,6 +74,14 @@ var SYSTEM_AGENT_CAPABILITIES = [
|
|
|
74
74
|
tools: ["exa_search", "fetchWebpage"],
|
|
75
75
|
defaultEnabled: true,
|
|
76
76
|
icon: "\u{1F310}"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "agent-orchestration",
|
|
80
|
+
label: "\u591A agent \u7F16\u6392",
|
|
81
|
+
description: "\u5148\u6309\u6536\u85CF\u3001\u7B80\u4ECB\u3001\u80FD\u529B\u548C\u6210\u672C\u5217\u51FA\u5B89\u5168 agent \u6458\u8981\uFF0C\u6309\u9700\u8BFB\u53D6\u5019\u9009\u914D\u7F6E\u89E3\u6790\u53EF\u8FD0\u884C key\uFF0C\u518D\u540E\u53F0\u542F\u52A8\u5176\u4ED6 agent \u6267\u884C\u5B50\u4EFB\u52A1\uFF0C\u5E76\u89C2\u5BDF\u3001\u67E5\u8BE2\u3001\u505C\u6B62\u8FD0\u884C\u4E2D\u7684 agent run\u2014\u2014\u9002\u5408\u5E76\u884C\u6D3E\u53D1\u3001\u957F\u4EFB\u52A1\u8DDF\u8E2A\u3001\u4E2D\u9014\u53EB\u505C\u7B49\u7F16\u6392\u573A\u666F\u3002",
|
|
82
|
+
tools: ["startAgentRun", "controlAgentRun", "listAgents"],
|
|
83
|
+
defaultEnabled: true,
|
|
84
|
+
icon: "\u{1F9E9}"
|
|
77
85
|
}
|
|
78
86
|
];
|
|
79
87
|
var SYSTEM_AGENT_CAPABILITY_IDS = SYSTEM_AGENT_CAPABILITIES.map(
|
|
@@ -199,7 +199,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
199
199
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
200
200
|
}
|
|
201
201
|
try {
|
|
202
|
-
const { readAction } = await import("./read-
|
|
202
|
+
const { readAction } = await import("./read-HXHAZBKH.js");
|
|
203
203
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
204
204
|
if (!pageData) {
|
|
205
205
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AWDOJBHW.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VE6XMVKG.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6MHDWKOT.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
13
13
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -18,6 +18,12 @@ import {
|
|
|
18
18
|
readPipeText,
|
|
19
19
|
spawnProcess
|
|
20
20
|
} from "./chunk-IDZTNRP2.js";
|
|
21
|
+
import {
|
|
22
|
+
parseUserIdFromAuthToken
|
|
23
|
+
} from "./chunk-A7GB5UGH.js";
|
|
24
|
+
import {
|
|
25
|
+
DEFAULT_NOLO_SERVER_URL
|
|
26
|
+
} from "./chunk-OLZBQWZU.js";
|
|
21
27
|
import {
|
|
22
28
|
asRecordOrEmpty
|
|
23
29
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -33,12 +39,6 @@ import {
|
|
|
33
39
|
import {
|
|
34
40
|
isRecord
|
|
35
41
|
} from "./chunk-KUG52IAP.js";
|
|
36
|
-
import {
|
|
37
|
-
parseUserIdFromAuthToken
|
|
38
|
-
} from "./chunk-5NBHQD4D.js";
|
|
39
|
-
import {
|
|
40
|
-
DEFAULT_NOLO_SERVER_URL
|
|
41
|
-
} from "./chunk-OLZBQWZU.js";
|
|
42
42
|
import {
|
|
43
43
|
asOptionalTrimmedString
|
|
44
44
|
} from "./chunk-G3SUCT4W.js";
|