nolo-cli 0.66.0-alpha.4 → 0.67.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-UYF2UEIG.js → _executeModel-C5K4UL5I.js} +13 -13
- package/{agentDeleteCommand-7SWSSU4X.js → agentDeleteCommand-7RESZDRC.js} +6 -6
- package/{agentEmailCommands-UAF3YDG6.js → agentEmailCommands-KES5FG2E.js} +15 -15
- package/{agentListCommands-473D3OB3.js → agentListCommands-VFBLREFU.js} +8 -8
- package/{agentMachineCommands-NWHVKMP7.js → agentMachineCommands-UJ77TKWZ.js} +6 -6
- package/{agentRecordCommands-G5ZQQNEC.js → agentRecordCommands-MZBPYUGL.js} +15 -15
- package/{agentRunCommand-ZTRT252J.js → agentRunCommand-R3RWG53B.js} +15 -15
- package/{agentRuntimeLocal-3JLUMWN7.js → agentRuntimeLocal-BD7R3OJL.js} +3 -3
- package/{agentSlice-RPMDYBLC.js → agentSlice-UP66DIC2.js} +1 -1
- package/{appDeleteCommands-SCJZAMUA.js → appDeleteCommands-X3UF4ZHF.js} +7 -7
- package/{appDeployCommands-RVBQZJUT.js → appDeployCommands-MFHLJIYZ.js} +7 -7
- package/{appDeployStatusCommands-BUPLMNTO.js → appDeployStatusCommands-BGXSUHY6.js} +7 -7
- package/{appGetCommands-NQ34IZRG.js → appGetCommands-KEA6FZTF.js} +7 -7
- package/{appListCommands-KZHI5DQM.js → appListCommands-CZGMZW3L.js} +7 -7
- package/{chatQueueReduxAdapter-2Z6DYXAG.js → chatQueueReduxAdapter-VVXE2NXW.js} +2 -2
- package/{chunk-J2WQUFGG.js → chunk-5DUAG5G7.js} +40 -24
- package/{chunk-FHAGENAS.js → chunk-AUKZOZFG.js} +1 -1
- package/{chunk-76JYRUX4.js → chunk-AVJQ4TDL.js} +14 -1
- package/{chunk-UZPQSVM6.js → chunk-B62OSA77.js} +1 -1
- package/{chunk-XOPPOOTE.js → chunk-BG7ZGBKH.js} +5 -4
- package/{chunk-6AAQCFLQ.js → chunk-CLZYOOI3.js} +8 -8
- package/{chunk-4SCMOQRM.js → chunk-FPT2E44F.js} +2 -2
- package/{chunk-G2MPS44L.js → chunk-HPRMNGAM.js} +1 -1
- package/{chunk-YDNDUOB5.js → chunk-IF6UQNAK.js} +1 -1
- package/{chunk-RNYLWVME.js → chunk-IOZR6BLM.js} +3 -3
- package/{chunk-37XDGCY7.js → chunk-JWO3RQSH.js} +1 -1
- package/{chunk-BWHZ4H2Q.js → chunk-MN2XJEWL.js} +7 -7
- package/{chunk-HUZUAHZ6.js → chunk-NFTTUZ3L.js} +2 -2
- package/{chunk-UMIARYFE.js → chunk-OHJWIXXW.js} +3 -3
- package/{chunk-P7OOB7QP.js → chunk-Q4OT2DC7.js} +1 -1
- package/{chunk-CTCW7U7N.js → chunk-Q6FF2MCK.js} +1 -1
- package/{chunk-XCNSZUQA.js → chunk-QPXRNDI3.js} +2 -2
- package/{chunk-ZSR7L46Q.js → chunk-RCNQCXPM.js} +43 -27
- package/{chunk-PEZJEQAO.js → chunk-T7PQFKJU.js} +105 -35
- package/{chunk-6B2AUXKR.js → chunk-TTTW4DIT.js} +5 -5
- package/{chunk-5P6YOSF3.js → chunk-UBWLW3KY.js} +4 -4
- package/{chunk-6X5B2VF5.js → chunk-UFTOGLCE.js} +1 -1
- package/{chunk-GVYMHBG3.js → chunk-UNAVSDC5.js} +1 -1
- package/{chunk-RRY4U37C.js → chunk-UZXOOSHF.js} +7 -7
- package/{chunk-RJ2SAFB5.js → chunk-V3ZKNK5D.js} +550 -1
- package/{contentThunks-GMRDVLFD.js → contentThunks-BHML6O7K.js} +3 -3
- package/{createAgentAutomationAction-CH6Q7JMD.js → createAgentAutomationAction-K5YJO4IA.js} +3 -3
- package/{createDialogAction-ARYHXJ2V.js → createDialogAction-SFMZLPS4.js} +4 -4
- package/{createPageAction-RAPK4J4H.js → createPageAction-UD7BSFQS.js} +3 -3
- package/{dialogCommands-JAAYSIOE.js → dialogCommands-2ABSL4ND.js} +7 -7
- package/{dialogSlice-CJNADK2R.js → dialogSlice-DEC5GV6X.js} +2 -2
- package/{docCreateCommands-U5OCW42O.js → docCreateCommands-2QZCW4HZ.js} +6 -6
- package/{docDeleteCommands-6RAGSIKC.js → docDeleteCommands-WKZKQAKM.js} +7 -7
- package/{docReadCommands-ID6VUNQD.js → docReadCommands-WMKJCR4Q.js} +6 -6
- package/{docStore-6ZFYOHQT.js → docStore-IBPCRTTX.js} +1 -1
- package/{docUpdateCommands-UIC4LWFG.js → docUpdateCommands-KPLM63NK.js} +6 -6
- package/{handleSendMessageAction-36NZDUHT.js → handleSendMessageAction-C7CZNGMB.js} +2 -2
- package/index.js +40 -40
- package/{machineCommands-25QIEYZQ.js → machineCommands-6BG3AHT5.js} +14 -14
- package/{machineWsRunDispatch-HWYVWOIE.js → machineWsRunDispatch-G2KJ6NQF.js} +14 -14
- package/package.json +1 -1
- package/{readlineWorkspace-22XWLYEH.js → readlineWorkspace-5LZ3EDIQ.js} +18 -18
- package/{runAgentClientLoop-NYNYXB5C.js → runAgentClientLoop-CICP3O2T.js} +11 -11
- package/{spaceCommands-VWJ2BUYK.js → spaceCommands-NQOIERT6.js} +6 -6
- package/{streamAgentChatTurn-EK4UVC2Y.js → streamAgentChatTurn-QUD4FY5I.js} +12 -12
- package/{tools-U4GOB2KS.js → tools-MAP6O2YZ.js} +8 -8
- package/{updateDialogTitleAction-EXREKMC5.js → updateDialogTitleAction-L6CCRVUK.js} +3 -3
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-YPREESF4.js";
|
|
5
5
|
import {
|
|
6
6
|
handleSendMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CLZYOOI3.js";
|
|
8
8
|
import "./chunk-EVBFYPDC.js";
|
|
9
9
|
import "./chunk-HQUORJTM.js";
|
|
10
10
|
import "./chunk-YYLHWIW6.js";
|
|
11
11
|
import "./chunk-AGGIDPCZ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-OHJWIXXW.js";
|
|
13
13
|
import "./chunk-76JAMDUT.js";
|
|
14
14
|
import "./chunk-5RGU3J7P.js";
|
|
15
15
|
import {
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
toCompactAgentSummary,
|
|
30
30
|
toSafeAgentSummary,
|
|
31
31
|
toUnavailableAgentSummary
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UFTOGLCE.js";
|
|
33
33
|
import {
|
|
34
34
|
getUserDataItemTimestamp,
|
|
35
35
|
mergeAndDedupUserData
|
|
@@ -81,14 +81,14 @@ import {
|
|
|
81
81
|
} from "./chunk-VF4K2QE6.js";
|
|
82
82
|
import {
|
|
83
83
|
createDocState
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-QPXRNDI3.js";
|
|
85
85
|
import {
|
|
86
86
|
BUILTIN_OBJECT_SKILL_IDS,
|
|
87
87
|
buildBuiltinObjectSkillConfig,
|
|
88
88
|
buildBuiltinObjectSkillDbKey,
|
|
89
89
|
buildBuiltinObjectSkillPageContent,
|
|
90
90
|
createDialogAction
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-FPT2E44F.js";
|
|
92
92
|
import {
|
|
93
93
|
DEFAULT_COLLAPSED_CATEGORIES,
|
|
94
94
|
addContentToSpace,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
updateContentCategory,
|
|
110
110
|
updateContentTitle,
|
|
111
111
|
writeStoredCollapsedCategories
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-IF6UQNAK.js";
|
|
113
113
|
import {
|
|
114
114
|
getCurrentSpaceId,
|
|
115
115
|
getCurrentSpaceIdRaw,
|
|
@@ -130,14 +130,14 @@ import {
|
|
|
130
130
|
selectMsgById,
|
|
131
131
|
uiAskChoiceFunc,
|
|
132
132
|
uiAskChoiceFunctionSchema
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-CLZYOOI3.js";
|
|
134
134
|
import {
|
|
135
135
|
createAgent,
|
|
136
136
|
deleteServerSyncedCredential,
|
|
137
137
|
runLlm,
|
|
138
138
|
streamAgentChatTurn,
|
|
139
139
|
updateAgent
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-OHJWIXXW.js";
|
|
141
141
|
import {
|
|
142
142
|
getActiveDialogKey,
|
|
143
143
|
selectCurrentDialogKey,
|
|
@@ -165,8 +165,10 @@ import {
|
|
|
165
165
|
resolvePageSkillMetadata
|
|
166
166
|
} from "./chunk-AETZ7AD6.js";
|
|
167
167
|
import {
|
|
168
|
+
DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
|
|
168
169
|
NOLO_WORKSPACE_TOOL_NAMES,
|
|
169
170
|
buildAgentRuntimeAgentLookupKeys,
|
|
171
|
+
buildDialogReadEnvelope,
|
|
170
172
|
buildNoloSubjectRefQueryTarget,
|
|
171
173
|
buildNoloTableQueryRequest,
|
|
172
174
|
clampNoloPositiveInteger,
|
|
@@ -178,7 +180,7 @@ import {
|
|
|
178
180
|
redactAgentRecordForWorkspaceTool,
|
|
179
181
|
resolveNoloDialogInput,
|
|
180
182
|
verifyNoloDialogSubjectRefQuery
|
|
181
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-V3ZKNK5D.js";
|
|
182
184
|
import {
|
|
183
185
|
isAgentUnavailableNow
|
|
184
186
|
} from "./chunk-CJCJF5XB.js";
|
|
@@ -15960,7 +15962,8 @@ var readDialogFunctionSchema = {
|
|
|
15960
15962
|
description: [
|
|
15961
15963
|
"Read one persisted Nolo dialog, including metadata and recent messages.",
|
|
15962
15964
|
"Prefer the full dialog dbKey (dialog-<userId>-<id>) or a dialog URL; a bare id only resolves for the currently logged-in user and cannot reliably read other users' or cross-server dialogs. Use listDialogs first when the target dialog is unclear.",
|
|
15963
|
-
"If a read fails, first confirm the dbKey via listDialogs; the returned meta includes runtime checkpoint/status info for agent-run dialogs; a local run's dialog lives in the local environment/local server and must be read there."
|
|
15965
|
+
"If a read fails, first confirm the dbKey via listDialogs; the returned meta includes runtime checkpoint/status info for agent-run dialogs; a local run's dialog lives in the local environment/local server and must be read there.",
|
|
15966
|
+
'The response is budgeted: reasoning_content, tool_calls arguments, tool result content and metadata are head-truncated with projection stats (truncated, messagesTotal/messagesReturned, estimatedOriginalChars/omittedChars). For review or verification, read mode="status" or the final verdict and take diffs from the worktree instead of pulling the full execution transcript.'
|
|
15964
15967
|
].join("\n"),
|
|
15965
15968
|
parameters: {
|
|
15966
15969
|
type: "object",
|
|
@@ -15969,7 +15972,7 @@ var readDialogFunctionSchema = {
|
|
|
15969
15972
|
type: "string",
|
|
15970
15973
|
description: "Dialog dbKey (dialog-<userId>-<id>), dialog URL, or bare id (current user only)."
|
|
15971
15974
|
},
|
|
15972
|
-
limit: { type: "integer", description: "Message limit. Default 120, max 1000." }
|
|
15975
|
+
limit: { type: "integer", description: "Message limit. Default 120, max 1000. The total serialized response is additionally capped (default 32000 chars) regardless of limit." }
|
|
15973
15976
|
},
|
|
15974
15977
|
required: ["dialog"]
|
|
15975
15978
|
}
|
|
@@ -16077,6 +16080,7 @@ async function readDialogFunc(args, thunkApi) {
|
|
|
16077
16080
|
const limit = clampNoloPositiveInteger(args?.limit, 120, 1e3);
|
|
16078
16081
|
const meta = await readBestRecord(thunkApi, resolved.dbKey, true);
|
|
16079
16082
|
let messages = [];
|
|
16083
|
+
let sourceProjection = void 0;
|
|
16080
16084
|
const serverBase = normalizeServerOrigin(runtime?.currentServer);
|
|
16081
16085
|
if (serverBase && runtime?.currentToken) {
|
|
16082
16086
|
const response = await fetchWithTransientRetry(fetch, `${serverBase}/rpc/getConvMsgs`, {
|
|
@@ -16085,28 +16089,40 @@ async function readDialogFunc(args, thunkApi) {
|
|
|
16085
16089
|
"Content-Type": "application/json",
|
|
16086
16090
|
...authHeaders2(runtime.currentToken)
|
|
16087
16091
|
},
|
|
16088
|
-
|
|
16092
|
+
// Agent-safe bounded 模式:数据源侧完成预算 projection,本进程不再
|
|
16093
|
+
// 对全量消息做 materialize + 整体 stringify。
|
|
16094
|
+
body: JSON.stringify({
|
|
16095
|
+
dialogId: resolved.dialogId,
|
|
16096
|
+
limit,
|
|
16097
|
+
maxChars: DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS
|
|
16098
|
+
})
|
|
16089
16099
|
}).catch(() => null);
|
|
16090
16100
|
if (response?.ok) {
|
|
16091
|
-
const payload = await response.json().catch(() =>
|
|
16092
|
-
|
|
16101
|
+
const payload = await response.json().catch(() => null);
|
|
16102
|
+
if (payload && typeof payload === "object" && Array.isArray(payload.messages)) {
|
|
16103
|
+
messages = payload.messages;
|
|
16104
|
+
sourceProjection = payload.projection ?? void 0;
|
|
16105
|
+
} else if (Array.isArray(payload)) {
|
|
16106
|
+
messages = [...payload].reverse();
|
|
16107
|
+
}
|
|
16093
16108
|
} else if (response) {
|
|
16094
16109
|
await throwIfDrainExhausted(response);
|
|
16095
16110
|
}
|
|
16096
16111
|
}
|
|
16112
|
+
const built = buildDialogReadEnvelope({
|
|
16113
|
+
meta,
|
|
16114
|
+
messages,
|
|
16115
|
+
...sourceProjection ? { stats: sourceProjection } : {},
|
|
16116
|
+
envelope: { success: true, dialogKey: resolved.dbKey, dialogId: resolved.dialogId },
|
|
16117
|
+
options: { maxResponseChars: DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS }
|
|
16118
|
+
});
|
|
16097
16119
|
return {
|
|
16098
|
-
rawData:
|
|
16099
|
-
success: true,
|
|
16100
|
-
dialogKey: resolved.dbKey,
|
|
16101
|
-
dialogId: resolved.dialogId,
|
|
16102
|
-
meta,
|
|
16103
|
-
messages
|
|
16104
|
-
},
|
|
16120
|
+
rawData: built.envelope,
|
|
16105
16121
|
displayData: jsonPreview({
|
|
16106
16122
|
dialogKey: resolved.dbKey,
|
|
16107
16123
|
title: meta?.title,
|
|
16108
|
-
messageCount: messages.length,
|
|
16109
|
-
messages
|
|
16124
|
+
messageCount: built.envelope.messages.length,
|
|
16125
|
+
messages: built.envelope.messages
|
|
16110
16126
|
})
|
|
16111
16127
|
};
|
|
16112
16128
|
}
|
|
@@ -16181,7 +16197,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
16181
16197
|
const deletedDialogIds = [];
|
|
16182
16198
|
const deletedDialogKeys = [];
|
|
16183
16199
|
const failures = [];
|
|
16184
|
-
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-
|
|
16200
|
+
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-DEC5GV6X.js");
|
|
16185
16201
|
for (const target of targets) {
|
|
16186
16202
|
try {
|
|
16187
16203
|
await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
|
|
@@ -26938,7 +26954,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
26938
26954
|
if (!executionInput) {
|
|
26939
26955
|
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
26940
26956
|
}
|
|
26941
|
-
const { findToolExecutor: findToolExecutor2 } = await import("./tools-
|
|
26957
|
+
const { findToolExecutor: findToolExecutor2 } = await import("./tools-MAP6O2YZ.js");
|
|
26942
26958
|
const { executor } = findToolExecutor2(run.toolName);
|
|
26943
26959
|
toolRunStarted({
|
|
26944
26960
|
id: run.id,
|
|
@@ -29445,7 +29461,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
29445
29461
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
29446
29462
|
};
|
|
29447
29463
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
29448
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
29464
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-IBPCRTTX.js");
|
|
29449
29465
|
if (getDocState().pageKey === id) {
|
|
29450
29466
|
applyExternalDocUpdate({
|
|
29451
29467
|
slateData: finalSlateData,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XTJTN3RW.js";
|
|
5
5
|
import {
|
|
6
6
|
AGENT_SELECTION_PRIORITY_INSTRUCTIONS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-V3ZKNK5D.js";
|
|
8
8
|
import {
|
|
9
9
|
getModelContextWindow
|
|
10
10
|
} from "./chunk-HQ3ZLBSI.js";
|
|
@@ -179,6 +179,13 @@ var MENU_USAGE_INSTRUCTIONS = `--- \u4EA4\u4E92\u8BF4\u660E ---
|
|
|
179
179
|
- \u9009\u9879\u53EA\u627F\u8F7D\u9002\u5EA6\u4FE1\u606F\uFF1Alabel \u4E3A\u77ED\u53E5\u3001detail \u81F3\u591A\u4E00\u53E5\u8BDD\u8865\u5145\uFF0CuserMessage \u5199\u6210\u5B8C\u6574\u7684\u4E0B\u4E00\u53E5\u8BDD\uFF1B\u4E0D\u5728\u9009\u9879\u5217\u8868\u91CC\u653E"\u5176\u4ED6/Other"\uFF08\u5BA2\u6237\u7AEF\u4F1A\u81EA\u52A8\u8FFD\u52A0\u81EA\u7531\u8F93\u5165\u9000\u8DEF\uFF09\uFF1B
|
|
180
180
|
- \u95EE\u9898\u5199\u5728 question \u5B57\u6BB5\uFF0C\u4E0D\u8981\u5728\u540C\u4E00\u8F6E assistant \u666E\u901A\u6587\u672C\u91CC\u91CD\u590D\u8FD9\u53E5\u8BDD\uFF08\u89E3\u91CA\u80CC\u666F\u2260\u91CD\u590D\u95EE\u9898\uFF09\u3002`;
|
|
181
181
|
|
|
182
|
+
// packages/agent-runtime/toolUseGuidance.ts
|
|
183
|
+
var TOOL_USE_GUIDANCE = `--- \u5DE5\u5177\u4F7F\u7528\u7EAA\u5F8B ---
|
|
184
|
+
- \u8C03\u7528\u5916\u90E8/\u7CFB\u7EDF\u63A5\u53E3\uFF08DBus \u65B9\u6CD5\u3001gsettings \u952E\u540D\u3001CLI \u5B50\u547D\u4EE4\u3001HTTP \u7AEF\u70B9\u3001\u5E93 API\u3001\u5173\u952E\u8DEF\u5F84\uFF09\u524D\uFF0C\u5148\u82B1\u4E00\u6B65\u9A8C\u8BC1\u5B58\u5728\u6027\u518D\u8C03\u7528\uFF1A\u5982\u5148 introspect / list-keys / --help / \u5217\u76EE\u5F55\u3002\u8BB0\u5FC6\u91CC\u7684\u63A5\u53E3\u540D\u53EA\u662F\u5047\u8BBE\uFF0C\u4E00\u6761\u9A8C\u8BC1\u547D\u4EE4\u80DC\u8FC7\u6574\u8F6E\u8FD4\u5DE5\u3002
|
|
185
|
+
- \u8F93\u51FA\u536B\u751F\uFF1A\u4E0D\u8981\u4E60\u60EF\u6027\u7528 2>&1 \u5408\u5E76\u9519\u8BEF\u6D41\uFF1B\u67E5\u8BE2\u7C7B\u547D\u4EE4\u4E3B\u52A8 2>/dev/null \u964D\u566A\uFF1B\u590D\u5408\u547D\u4EE4\u5BF9\u5173\u952E\u6B65\u9AA4\u5355\u72EC\u63A5\u9000\u51FA\u7801\uFF08echo rc=$?\uFF09\uFF1B\u6BCF\u6761\u547D\u4EE4\u5148\u626B\u8F93\u51FA\u4E2D\u7684\u9519\u8BEF\u5B57\u6837\uFF0C\u518D\u770B exitCode\uFF08exit 0 \u4E5F\u53EF\u80FD\u5E26\u9519\uFF09\u3002
|
|
186
|
+
- \u4E00\u6B21\u6027\u63A2\u9488/\u76D1\u63A7\u811A\u672C\u6309\u201C\u73AF\u5883\u4F1A\u53D8\u201D\u6765\u5199\uFF1A\u8BBE\u5907/\u8FDB\u7A0B\u53EF\u80FD\u4E2D\u9014\u6D88\u5931\uFF0C\u8BFB\u53D6\u5FAA\u73AF\u8981\u6709\u5F02\u5E38\u515C\u5E95\uFF0C\u907F\u514D\u672A\u6355\u83B7\u5F02\u5E38\u76F4\u63A5\u5D29\u6E83\u3002
|
|
187
|
+
- \u8C03\u7528\u5931\u8D25\u4E14\u539F\u56E0\u4E0D\u660E\u65F6\uFF0C\u5148\u68C0\u67E5\u526F\u4F5C\u7528\u4E0E\u72B6\u6001\u53D8\u5316\uFF0C\u518D\u51B3\u5B9A\u91CD\u8BD5\u6216\u56DE\u9000\u3002`;
|
|
188
|
+
|
|
182
189
|
// packages/ai/agent/toolGuidedSections.ts
|
|
183
190
|
var AGENT_ORCHESTRATION_RUN_INSTRUCTIONS = `--- \u591A Agent \u7F16\u6392\uFF08\u540E\u53F0 Run\uFF09 ---
|
|
184
191
|
\u7528 startAgentRun \u542F\u52A8\u5B50 Agent\uFF08wait:false \u5F02\u6B65 fork+exec \u8FD4\u56DE runId\uFF1Bwait:true \u540C\u6B65\u7B49\u7ED3\u679C\uFF09\uFF0C\u7528 controlAgentRun \u63A7\u5236/\u8BCA\u65AD\u3002\u4F55\u65F6\u6D3E\u53D1\u89C1\u300C\u591A Agent \u534F\u4F5C\u300D\u6BB5\uFF1B\u672C\u6BB5\u53EA\u8BB2\u6D3E\u53D1\u4E4B\u540E\u7684\u76EF\u68A2\u4E0E\u6392\u9519\u3002
|
|
@@ -289,6 +296,11 @@ var TOOL_GUIDED_SECTIONS = [
|
|
|
289
296
|
triggerAnyTool: true,
|
|
290
297
|
build: () => TOOL_ROUND_ECONOMY_INSTRUCTIONS
|
|
291
298
|
},
|
|
299
|
+
{
|
|
300
|
+
id: "toolUseGuidance",
|
|
301
|
+
triggerTools: ["execShell"],
|
|
302
|
+
build: () => TOOL_USE_GUIDANCE
|
|
303
|
+
},
|
|
292
304
|
{
|
|
293
305
|
id: "privilegeEscalation",
|
|
294
306
|
triggerTools: ["execShell"],
|
|
@@ -328,6 +340,7 @@ var TOOL_GUIDED_SECTIONS = [
|
|
|
328
340
|
];
|
|
329
341
|
var TOOL_GUIDED_SECTION_ORDER = [
|
|
330
342
|
"toolRoundEconomy",
|
|
343
|
+
"toolUseGuidance",
|
|
331
344
|
"privilegeEscalation",
|
|
332
345
|
"agentOrchestration",
|
|
333
346
|
"agentCollaboration",
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
clipMultilineText,
|
|
9
9
|
fetchAndSerializeTable,
|
|
10
10
|
resolveBuiltinSkillPage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5DUAG5G7.js";
|
|
12
12
|
import {
|
|
13
13
|
isGatewayHttpStatus
|
|
14
14
|
} from "./chunk-NF64D32W.js";
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
} from "./chunk-MEYIRKDN.js";
|
|
30
30
|
import {
|
|
31
31
|
fetchAndCacheMessages
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CLZYOOI3.js";
|
|
33
33
|
import {
|
|
34
34
|
shouldUseServerProxy
|
|
35
35
|
} from "./chunk-YYLHWIW6.js";
|
|
36
36
|
import {
|
|
37
37
|
fetchServerSyncedCredential
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OHJWIXXW.js";
|
|
39
39
|
import {
|
|
40
40
|
buildSkillGuidancePromptBlock,
|
|
41
41
|
extractRuntimePageCapabilities,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
compileContextLayers,
|
|
48
48
|
normalizeChatCompletionsBodyForProvider,
|
|
49
49
|
resolveToolGuidedSections
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-AVJQ4TDL.js";
|
|
51
51
|
import {
|
|
52
52
|
convertMessagesToResponsesInput,
|
|
53
53
|
getUsageRequestOptions,
|
|
@@ -637,6 +637,7 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
637
637
|
{ id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
|
|
638
638
|
{ id: "core-persona", owner: "agent", cacheScope: "session", content: corePersonaSection },
|
|
639
639
|
{ id: "tool-round-economy", owner: "platform", cacheScope: "session", content: toolSections.toolRoundEconomy },
|
|
640
|
+
{ id: "tool-use-guidance", owner: "platform", cacheScope: "session", content: toolSections.toolUseGuidance },
|
|
640
641
|
{ id: "privilege-escalation", owner: "platform", cacheScope: "session", content: toolSections.privilegeEscalation },
|
|
641
642
|
{ id: "agent-orchestration", owner: "platform", cacheScope: "session", content: toolSections.agentOrchestration },
|
|
642
643
|
{ id: "agent-collaboration", owner: "platform", cacheScope: "session", content: toolSections.agentCollaboration },
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-AGGIDPCZ.js";
|
|
14
14
|
import {
|
|
15
15
|
runLlm
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OHJWIXXW.js";
|
|
17
17
|
import {
|
|
18
18
|
cleanupCliSessionForDialog
|
|
19
19
|
} from "./chunk-76JAMDUT.js";
|
|
@@ -2887,7 +2887,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
2887
2887
|
runtimeOptions: args.runtimeOptions
|
|
2888
2888
|
});
|
|
2889
2889
|
if (agentKeyToUse) {
|
|
2890
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
2890
|
+
const { streamAgentChatTurn } = await import("./agentSlice-UP66DIC2.js");
|
|
2891
2891
|
await dispatch(
|
|
2892
2892
|
streamAgentChatTurn({
|
|
2893
2893
|
agentKey: agentKeyToUse,
|
|
@@ -4192,7 +4192,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
4192
4192
|
}
|
|
4193
4193
|
if (isCurrentDialog) {
|
|
4194
4194
|
await thunkApi.dispatch(resetMsgs());
|
|
4195
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
4195
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-DEC5GV6X.js");
|
|
4196
4196
|
dispatch(clearPendingAttachments2());
|
|
4197
4197
|
}
|
|
4198
4198
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -4200,15 +4200,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
4200
4200
|
|
|
4201
4201
|
// packages/chat/dialog/dialogSlice.ts
|
|
4202
4202
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
4203
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
4203
|
+
const { createDialogAction } = await import("./createDialogAction-SFMZLPS4.js");
|
|
4204
4204
|
return createDialogAction(args, thunkApi);
|
|
4205
4205
|
};
|
|
4206
4206
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
4207
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
4207
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-K5YJO4IA.js");
|
|
4208
4208
|
return createAgentAutomationAction(args, thunkApi);
|
|
4209
4209
|
};
|
|
4210
4210
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
4211
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
4211
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-L6CCRVUK.js");
|
|
4212
4212
|
return updateDialogTitleAction(args, thunkApi);
|
|
4213
4213
|
};
|
|
4214
4214
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -4232,7 +4232,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
4232
4232
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
4233
4233
|
};
|
|
4234
4234
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
4235
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
4235
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-C7CZNGMB.js");
|
|
4236
4236
|
return handleSendMessageAction(args, thunkApi);
|
|
4237
4237
|
};
|
|
4238
4238
|
function clearDialogState() {
|
|
@@ -4245,7 +4245,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
4245
4245
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
4246
4246
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
4247
4247
|
try {
|
|
4248
|
-
const { createDocState } = await import("./docStore-
|
|
4248
|
+
const { createDocState } = await import("./docStore-IBPCRTTX.js");
|
|
4249
4249
|
const pageKey = await createDocState(
|
|
4250
4250
|
{ slateData, title },
|
|
4251
4251
|
{ dispatch, getState }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IF6UQNAK.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareAndPersistMessage,
|
|
6
6
|
uiAskChoiceFunc,
|
|
7
7
|
uiAskChoiceFunctionSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CLZYOOI3.js";
|
|
9
9
|
import {
|
|
10
10
|
require_date_fns
|
|
11
11
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q4OT2DC7.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AUKZOZFG.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveCredentialGroup,
|
|
10
10
|
toSafeAgentSummary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UFTOGLCE.js";
|
|
12
12
|
import {
|
|
13
13
|
PUBLIC_AGENT_KEY_PREFIX,
|
|
14
14
|
isOwnedAgentKey,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-DWUCB2A3.js";
|
|
36
36
|
import {
|
|
37
37
|
buildLocalAgentLookupKeys
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Q6FF2MCK.js";
|
|
39
39
|
import {
|
|
40
40
|
LOCAL_CODEX_AGENT_ID,
|
|
41
41
|
LOCAL_CODEX_AGENT_KEY,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
import {
|
|
56
56
|
inlineImageUrlsForCustomProvider,
|
|
57
57
|
prepareTools
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-UNAVSDC5.js";
|
|
59
59
|
import {
|
|
60
60
|
getServerProviderSecret
|
|
61
61
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
rememberMemoryFunctionSchema,
|
|
73
73
|
resolveAgentRequiredPackIds,
|
|
74
74
|
setTodoListFunc
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-5DUAG5G7.js";
|
|
76
76
|
import {
|
|
77
77
|
fetchWithTransientRetry,
|
|
78
78
|
isTransientFetchError
|
|
@@ -96,13 +96,13 @@ import {
|
|
|
96
96
|
prepareTokenUsageData,
|
|
97
97
|
resolveBuiltinPlatformAgentConfig,
|
|
98
98
|
runKeyed
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-CLZYOOI3.js";
|
|
100
100
|
import {
|
|
101
101
|
BUILTIN_TITLE_LLM_CONFIG
|
|
102
102
|
} from "./chunk-EVBFYPDC.js";
|
|
103
103
|
import {
|
|
104
104
|
fetchServerSyncedCredential
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-OHJWIXXW.js";
|
|
106
106
|
import {
|
|
107
107
|
require_date_fns
|
|
108
108
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
resolveOpenAiCompatibleProviderConfig,
|
|
155
155
|
shouldUseGeminiNativeToolRoute,
|
|
156
156
|
summarizeToolArguments
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-RCNQCXPM.js";
|
|
158
158
|
import {
|
|
159
159
|
PlatformStreamInterruptedError,
|
|
160
160
|
buildPlatformChatCompletionRequest,
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
buildNoloWorkspaceOpenAiTools,
|
|
188
188
|
parseNoloWorkspaceToolArguments,
|
|
189
189
|
resolveRuntimeToolSurfaceForAgent
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-V3ZKNK5D.js";
|
|
191
191
|
import {
|
|
192
192
|
mergeAvailabilityDeadline,
|
|
193
193
|
resolveAvailabilityAction,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MN2XJEWL.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-RXX4GDIH.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveAgentRecordFromHybridStore,
|
|
13
13
|
sanitizeAgentRecordForCliOutput,
|
|
14
14
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AUKZOZFG.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
18
|
} from "./chunk-SPAQ4PVV.js";
|
|
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
|
|
|
304
304
|
const overrides = {};
|
|
305
305
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
306
306
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
307
|
-
const { _executeModel } = await import("./_executeModel-
|
|
307
|
+
const { _executeModel } = await import("./_executeModel-C5K4UL5I.js");
|
|
308
308
|
return _executeModel(
|
|
309
309
|
{
|
|
310
310
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
|
|
|
325
325
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
326
326
|
*/
|
|
327
327
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
328
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
328
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-CICP3O2T.js");
|
|
329
329
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
330
330
|
{
|
|
331
331
|
agentKey: args.agentKey,
|
|
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
|
|
|
341
341
|
* 聊天轮次流式 Agent 调用
|
|
342
342
|
*/
|
|
343
343
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
344
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
344
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-QUD4FY5I.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -326,7 +326,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
326
326
|
).unwrap();
|
|
327
327
|
if (dbSpaceId) {
|
|
328
328
|
try {
|
|
329
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
329
|
+
const { updateContentTitle } = await import("./contentThunks-BHML6O7K.js");
|
|
330
330
|
await dispatch(
|
|
331
331
|
updateContentTitle({
|
|
332
332
|
spaceId: dbSpaceId,
|
|
@@ -365,7 +365,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
async function createDocState(args, thunkApi) {
|
|
368
|
-
const { createPageAction } = await import("./createPageAction-
|
|
368
|
+
const { createPageAction } = await import("./createPageAction-UD7BSFQS.js");
|
|
369
369
|
return createPageAction(args, thunkApi);
|
|
370
370
|
}
|
|
371
371
|
function subscribe(listener) {
|