nolo-cli 0.38.0-alpha.3 → 0.47.0-alpha.2
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-SWONBJ7Z.js → _executeModel-5PG6CUWD.js} +41 -42
- package/{action-KMBZ3LCZ.js → action-FLLC2SIX.js} +7 -7
- package/{addContentAction-KQ44UT2U.js → addContentAction-SVSPUUK4.js} +6 -6
- package/{addDialogAgentAction-ILSDCMYL.js → addDialogAgentAction-W3JGU4F7.js} +5 -5
- package/{agentDeleteCommand-SMUJYI6N.js → agentDeleteCommand-SHSPQZHI.js} +25 -26
- package/{agentEmailCommands-YWCGZ4RO.js → agentEmailCommands-LQKO5GRW.js} +54 -55
- package/{agentListCommands-ULFV2XJQ.js → agentListCommands-5QTNEYMQ.js} +31 -29
- package/{agentMachineCommands-7YZ2TIYZ.js → agentMachineCommands-P5K454CN.js} +24 -25
- package/{agentPullCommand-TSWAJPS2.js → agentPullCommand-M552CYSI.js} +2 -2
- package/{agentRecordCommands-EVOSSHJR.js → agentRecordCommands-Z4QYCNP4.js} +50 -51
- package/{agentRunCommand-PO55WUIY.js → agentRunCommand-HV3Y34B5.js} +52 -53
- package/{agentRunControl-7MUPSYDQ.js → agentRunControl-LHXOP4IU.js} +43 -1
- package/{agentRuntimeLocal-Q6D3G6G7.js → agentRuntimeLocal-ZKXYFLXI.js} +20 -21
- package/{agentSlice-6TRUUOSX.js → agentSlice-NKFLP3RI.js} +6 -6
- package/{agentSuperviseCommands-MKWW3ICX.js → agentSuperviseCommands-IMRZ56RC.js} +2 -2
- package/{appDeleteCommands-JDBSRLTX.js → appDeleteCommands-XYGAZIJX.js} +24 -25
- package/{appDeployCommands-Q5H2NBKQ.js → appDeployCommands-7T5CABRB.js} +24 -25
- package/{appDeployStatusCommands-PSYBUIZT.js → appDeployStatusCommands-KTFQMRPZ.js} +24 -25
- package/{appGetCommands-IX64IUW6.js → appGetCommands-HOX2ULSV.js} +24 -25
- package/{appListCommands-BJZFX65H.js → appListCommands-3SLCEHND.js} +24 -25
- package/{authCommand-B2XRHNJH.js → authCommand-OY2E2VQK.js} +12 -12
- package/{authCommands-GWABTFMR.js → authCommands-SBQVTD6V.js} +5 -5
- package/{chatQueueReduxAdapter-N7Z5MUPU.js → chatQueueReduxAdapter-WMMBQK3Y.js} +20 -20
- package/chunk-25J3BB35.js +6041 -0
- package/{chunk-U6QQLXWI.js → chunk-2X5S4IBZ.js} +1 -1
- package/{chunk-MJWX4JQO.js → chunk-3EEK7T3D.js} +1 -1
- package/{chunk-UNHKVD2N.js → chunk-43CXXVJD.js} +1 -1
- package/{chunk-WRP5TTM6.js → chunk-4MXGXSYN.js} +83 -3
- package/{chunk-7N7XKGEQ.js → chunk-4ZNDBDWG.js} +6 -6
- package/{chunk-XVVNNJAA.js → chunk-5BPZLBFB.js} +20 -51
- package/{chunk-MWGCZ4CS.js → chunk-5PPFYHU2.js} +3 -3
- package/{chunk-W445DPVT.js → chunk-5QRCPERU.js} +1 -1
- package/{chunk-GKHV4UH5.js → chunk-5UOBIU5G.js} +31 -3
- package/{chunk-BMB563Y6.js → chunk-6BYAXNH5.js} +3 -3
- package/{chunk-SMPAUSX5.js → chunk-6FGXGFAH.js} +2 -2
- package/{chunk-46VPXYIV.js → chunk-6LYUN76O.js} +5 -5
- package/{chunk-FTM4KUOZ.js → chunk-7XTC3KRG.js} +1 -1
- package/{chunk-IMHO5LC6.js → chunk-7XZ5GXSN.js} +1 -1
- package/{chunk-E2OQ5N2F.js → chunk-AEXP2UZT.js} +341 -16
- package/{chunk-MZZZYUZS.js → chunk-AV2CELZZ.js} +37 -12
- package/{chunk-JI2TIPLP.js → chunk-AYXSUBVC.js} +1 -1
- package/{chunk-J6WH4PYZ.js → chunk-CIF4X6ZM.js} +1 -1
- package/{chunk-GZRMWK5R.js → chunk-DQLYEGP7.js} +2 -2
- package/{chunk-GUYMR3JL.js → chunk-E2QH2AYX.js} +69 -3
- package/{chunk-B6H5XCT2.js → chunk-EMEUU5IY.js} +3 -3
- package/{chunk-X6EN3KJX.js → chunk-ENYDQKOB.js} +319 -71
- package/{chunk-RCFIB45Q.js → chunk-EVBFYPDC.js} +2 -2
- package/{chunk-PV734VZX.js → chunk-EXLOROHG.js} +1 -1
- package/{chunk-WRN7L5CS.js → chunk-FA4SY4F5.js} +1 -1
- package/{chunk-4WVNHL3V.js → chunk-FAWK6DBF.js} +157 -51
- package/{chunk-IFS5CUEH.js → chunk-FJHLA6SX.js} +1 -1
- package/{chunk-T2BZICLK.js → chunk-G46DB6KG.js} +49 -6
- package/{chunk-FGLKRJDI.js → chunk-GK74OOFT.js} +2 -2
- package/{chunk-LM6IYQ3F.js → chunk-GLKOYSRU.js} +8 -1
- package/{chunk-JIADXJYU.js → chunk-H2G6JXTR.js} +1 -1
- package/{chunk-IKGHZMK2.js → chunk-H2JQB6B6.js} +12 -12
- package/{chunk-MGIHZ5CJ.js → chunk-HAPCUPEO.js} +2 -2
- package/{chunk-LD6Y6RJY.js → chunk-HGDOIDQ4.js} +2 -2
- package/{chunk-NZLQ7B5P.js → chunk-HOM6NILS.js} +3 -3
- package/{chunk-IZNJDUJ4.js → chunk-I4JISVWK.js} +1 -1
- package/{chunk-N4XRDM26.js → chunk-IA3A5373.js} +2 -2
- package/{chunk-Y5MMUI3L.js → chunk-IWUPQUWA.js} +2 -2
- package/{chunk-L7SMDIL6.js → chunk-JEGPB5H2.js} +3 -3
- package/{chunk-GEPHJJW4.js → chunk-L7NG2M6H.js} +1 -1
- package/{chunk-XQES6LXQ.js → chunk-LFLWZX76.js} +2 -2
- package/{chunk-IIOHYLIG.js → chunk-LGUQHYAL.js} +1 -1
- package/{chunk-4AWH4LQA.js → chunk-LYGNQHUW.js} +3 -1
- package/{db-3H3JECGY.js → chunk-M5PVFLD4.js} +11 -158
- package/{chunk-WN5AJG5I.js → chunk-MKZRKDQM.js} +1 -1
- package/{chunk-VOXNBPLB.js → chunk-MUIJYGYW.js} +649 -41
- package/{chunk-CYAC5WXX.js → chunk-MWT2BBCH.js} +213 -45
- package/{chunk-V5GA74HI.js → chunk-MZXZJVVD.js} +20 -39
- package/{chunk-ZBB3MZR3.js → chunk-OLNC7AWK.js} +7 -4
- package/{chunk-J5NMOM35.js → chunk-OYNDYVSE.js} +1 -1
- package/{chunk-C6ELZQ7H.js → chunk-OZVGA4SY.js} +1 -1
- package/{chunk-K4KIFRIN.js → chunk-Q24S4NDF.js} +1 -1
- package/{chunk-NRROOY22.js → chunk-Q6DMA2OM.js} +271 -130
- package/{chunk-2WKUUY2E.js → chunk-SVEUG45B.js} +5 -3
- package/{chunk-IZCHPD7T.js → chunk-TNPCQNGQ.js} +11 -6
- package/{chunk-4DMPISV6.js → chunk-URBGEE42.js} +2 -2
- package/{chunk-2KO5QQFV.js → chunk-V2IPBG5U.js} +1 -1
- package/{chunk-B6YYACBT.js → chunk-WPFNAEIW.js} +1 -1
- package/{chunk-23KKIMD5.js → chunk-WVGEBWA6.js} +4 -4
- package/{chunk-KU6CDTZ5.js → chunk-XMI3APSU.js} +61 -49
- package/{chunk-64KIQZA2.js → chunk-XO3G35OV.js} +1 -1
- package/{chunk-UWGWUOVN.js → chunk-YNOGNUBC.js} +108 -47
- package/{chunk-XT73C4VH.js → chunk-Z5NW3O7V.js} +1 -1
- package/{codingSkills-H6N5EKSX.js → codingSkills-BYQI6EPT.js} +2 -2
- package/{createAgentAutomationAction-U57ZMPMS.js → createAgentAutomationAction-ENDNA3Q4.js} +21 -21
- package/{createDialogAction-MAJLBNK4.js → createDialogAction-2KNX6S2D.js} +23 -23
- package/{createPageAction-4EX7HU6G.js → createPageAction-SNBCYPK6.js} +21 -21
- package/db-VQSAOWAO.js +162 -0
- package/{dbSlice-PIQGICNM.js → dbSlice-XWUM4QOF.js} +5 -5
- package/deleteFile-NPZ64DFN.js +1 -1
- package/{dialogCommands-4MHZXEIS.js → dialogCommands-6E5P35DG.js} +28 -26
- package/{dialogSlice-AL3UJLOJ.js → dialogSlice-RTPOD6EW.js} +20 -20
- package/{docCreateCommands-GDYFEK67.js → docCreateCommands-JWY25UFB.js} +23 -24
- package/{docDeleteCommands-WIE5CXED.js → docDeleteCommands-BPJOCSX4.js} +24 -25
- package/{docReadCommands-LTOOPJVC.js → docReadCommands-BSEZCYTQ.js} +23 -24
- package/{docStore-35B5VAFF.js → docStore-TYHVLU7G.js} +22 -22
- package/{docUpdateCommands-TZGAGXSG.js → docUpdateCommands-S2IE2VV4.js} +23 -24
- package/{fetchMessages-CUEFN4GQ.js → fetchMessages-KZQVBXKY.js} +3 -3
- package/{getPricing-P3E2WRIH.js → getPricing-X3HXP6VQ.js} +3 -3
- package/{handleSendMessageAction-PXX2R5JS.js → handleSendMessageAction-QYXDQXGH.js} +21 -21
- package/index.js +69 -69
- package/levelLazyShim-GZBKODGI.js +7 -0
- package/{localDialogRead-P7CHFMIC.js → localDialogRead-NQ33HBSI.js} +2 -2
- package/{localRuntimeAuthority-S77B5QVB.js → localRuntimeAuthority-KQDAE64E.js} +4 -4
- package/{localRuntimeDb-N3H3HQ7G.js → localRuntimeDb-PF7CFKDL.js} +2 -2
- package/{machineCommands-VCPPY23X.js → machineCommands-QCE4KLGR.js} +48 -49
- package/{machineWsRunDispatch-A4C727GL.js → machineWsRunDispatch-FBRMGU5D.js} +48 -49
- package/{models-L7S2EKPM.js → models-7LWATQFH.js} +2 -2
- package/package.json +1 -1
- package/{read-6C2XD3YZ.js → read-DQQ75VI3.js} +2 -2
- package/{readDocTool-Y7AB365O.js → readDocTool-HCQQFAZD.js} +1 -1
- package/{readlineWorkspace-BIBIM6DG.js → readlineWorkspace-2TACWKMN.js} +164 -78
- package/{removeDialogAgentAction-KG5WMJRZ.js → removeDialogAgentAction-DNONRKST.js} +7 -7
- package/{runAgentClientLoop-RKDXMIZW.js → runAgentClientLoop-GBLDVBT5.js} +39 -39
- package/{runtimeDoctorCommands-HT4O2PXL.js → runtimeDoctorCommands-JKTTN723.js} +4 -4
- package/serverStoreFactory-YMXDF4NI.js +20 -0
- package/{setDialogExtraReferencesAction-O2NLXMSM.js → setDialogExtraReferencesAction-ERHUPT3F.js} +6 -6
- package/{setPrimaryDialogAgentAction-FYYUY7PB.js → setPrimaryDialogAgentAction-6C2HYNEC.js} +7 -7
- package/{settingSlice-GPLI6E3M.js → settingSlice-YVRJFKQX.js} +6 -6
- package/{spaceCommands-4FMO3SNP.js → spaceCommands-XOLPJMRK.js} +23 -24
- package/{spaceSlice-2W4GJ2OE.js → spaceSlice-OQPAGQDP.js} +21 -21
- package/{streamAgentChatTurn-FS52LDQP.js → streamAgentChatTurn-SN5XJJ7U.js} +91 -49
- package/{switchDialogAgentAction-GH5P6Q3Z.js → switchDialogAgentAction-HP57XYFP.js} +5 -5
- package/{tools-3J5CKEE7.js → tools-Y65Y3CI4.js} +32 -32
- package/{tuiSummaryLlmCaller-SHRB4RWM.js → tuiSummaryLlmCaller-NBTWT57U.js} +25 -14
- package/{updateDialogTitleAction-5MGPA3OO.js → updateDialogTitleAction-OAOP7CCE.js} +24 -23
- package/chunk-4APLX2RT.js +0 -1514
- package/chunk-P66M7LSQ.js +0 -58
- package/{chunk-6WD3OOJS.js → chunk-UV6VISQJ.js} +0 -0
- package/{tableCommands-PQUJ55AS.js → tableCommands-P2TXJ3CF.js} +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/cli/agentCommandSupport.ts
|
|
6
6
|
async function getDefaultCliDb() {
|
|
7
|
-
const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-
|
|
7
|
+
const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-PF7CFKDL.js");
|
|
8
8
|
return getDefaultCliLocalRuntimeDb();
|
|
9
9
|
}
|
|
10
10
|
function createNullCliDb() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MODEL_LOOKUP_MAP
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OZVGA4SY.js";
|
|
4
4
|
import {
|
|
5
5
|
ALL_MODELS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7XTC3KRG.js";
|
|
7
7
|
import {
|
|
8
8
|
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z5NW3O7V.js";
|
|
10
10
|
|
|
11
11
|
// packages/ai/llm/getModelContextWindow.ts
|
|
12
12
|
var DEFAULT_CONTEXT_WINDOW = 256e3;
|
|
@@ -115,6 +115,76 @@ var getModelInfo = (modelName) => {
|
|
|
115
115
|
return map.get(modelName) || map.get(modelName.toLowerCase()) || null;
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
+
// packages/agent-runtime/emptyAssistantRepair.ts
|
|
119
|
+
var EMPTY_ASSISTANT_REPAIR_PROMPT = "\u8BF7\u7ED9\u51FA\u660E\u786E\u7684\u6587\u5B57\u56DE\u7B54\u6216\u6267\u884C\u4E0B\u4E00\u6B65\uFF1A\u5982\u679C\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u8BF7\u76F4\u63A5\u603B\u7ED3\u7ED3\u679C\uFF1B\u5982\u679C\u9700\u8981\u8C03\u7528\u5DE5\u5177\uFF0C\u8BF7\u76F4\u63A5\u8F93\u51FA tool_calls\u3002\u8BF7\u5207\u52FF\u8FD4\u56DE\u7A7A\u5185\u5BB9\u3002";
|
|
120
|
+
var EMPTY_ASSISTANT_FALLBACK_MESSAGE = "\u6A21\u578B\u8FDE\u7EED\u8FD4\u56DE\u7A7A\u6D88\u606F\uFF0C\u5F53\u524D\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\uFF0C\u6216\u7ED9\u51FA\u66F4\u5177\u4F53\u7684\u4FEE\u6539\u8303\u56F4\u3002";
|
|
121
|
+
var LENGTH_TRUNCATED_FALLBACK_MESSAGE = "\u8F93\u51FA\u8FBE\u5230\u957F\u5EA6\u4E0A\u9650\u88AB\u622A\u65AD\uFF0C\u5EFA\u8BAE\u7F29\u77ED\u4EFB\u52A1\u6216\u63D0\u9AD8\u8F93\u51FA\u4E0A\u9650\u3002";
|
|
122
|
+
var STREAM_TRUNCATED_FALLBACK_MESSAGE = "\u4E0A\u6E38\u54CD\u5E94\u6D41\u5728\u6536\u5C3E\u524D\u88AB\u4E2D\u65AD\uFF08\u672A\u6536\u5230\u7ED3\u675F\u6807\u8BB0\uFF09\uFF0C\u672C\u8F6E\u8F93\u51FA\u4E0D\u5B8C\u6574\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\u3002";
|
|
123
|
+
var REPETITION_LOOP_FALLBACK_MESSAGE = "\u68C0\u6D4B\u5230\u6A21\u578B\u9677\u5165\u91CD\u590D\u8F93\u51FA\u6B7B\u5FAA\u73AF\uFF0C\u5DF2\u81EA\u52A8\u7194\u65AD\u7EC8\u6B62\u5F53\u524D\u4EFB\u52A1\u3002";
|
|
124
|
+
var STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE = "\u68C0\u6D4B\u5230\u8FDE\u7EED\u591A\u6B21\u76F8\u540C\u5DE5\u5177\u8C03\u7528\u4E14\u65E0\u5B9E\u8D28\u8FDB\u5C55\uFF0C\u5DF2\u81EA\u52A8\u7194\u65AD\u7EC8\u6B62\u5F53\u524D\u4EFB\u52A1\u3002";
|
|
125
|
+
var MAX_REASONING_ONLY_REPAIRS = 2;
|
|
126
|
+
function resolveEmptyAssistantOutcome(args) {
|
|
127
|
+
if (args.hasVisibleOutput && !args.hasToolCalls && !args.finishReason && !args.streamComplete) {
|
|
128
|
+
return { kind: "ok_with_warning", reason: "stream_truncated" };
|
|
129
|
+
}
|
|
130
|
+
if (args.hasToolCalls || args.hasVisibleOutput) return { kind: "ok" };
|
|
131
|
+
if (args.finishReason === "length") return { kind: "fallback", reason: "length_truncated" };
|
|
132
|
+
if (!args.finishReason && !args.streamComplete) {
|
|
133
|
+
if (!args.repairUsed) return { kind: "repair" };
|
|
134
|
+
return { kind: "fallback", reason: "stream_truncated" };
|
|
135
|
+
}
|
|
136
|
+
if (args.hasReasoning && (args.reasoningRepairCount ?? 0) < MAX_REASONING_ONLY_REPAIRS) {
|
|
137
|
+
return { kind: "repair" };
|
|
138
|
+
}
|
|
139
|
+
if (!args.repairUsed) return { kind: "repair" };
|
|
140
|
+
return { kind: "fallback", reason: "empty_completion" };
|
|
141
|
+
}
|
|
142
|
+
function resolveEmptyAssistantFallbackMessage(reason) {
|
|
143
|
+
if (reason === "length_truncated") return LENGTH_TRUNCATED_FALLBACK_MESSAGE;
|
|
144
|
+
if (reason === "stream_truncated") return STREAM_TRUNCATED_FALLBACK_MESSAGE;
|
|
145
|
+
if (reason === "repetition_loop") return REPETITION_LOOP_FALLBACK_MESSAGE;
|
|
146
|
+
if (reason === "stagnant_tool_calls") return STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE;
|
|
147
|
+
return EMPTY_ASSISTANT_FALLBACK_MESSAGE;
|
|
148
|
+
}
|
|
149
|
+
function hasAssistantVisibleOutput(content) {
|
|
150
|
+
if (typeof content === "string") return content.trim().length > 0;
|
|
151
|
+
if (!Array.isArray(content)) return false;
|
|
152
|
+
return content.some((part) => {
|
|
153
|
+
if (part?.type === "text" && String(part.text ?? "").trim()) return true;
|
|
154
|
+
if (part?.type === "image_url") {
|
|
155
|
+
const url = part?.image_url?.url;
|
|
156
|
+
return typeof url === "string" && url.trim().length > 0;
|
|
157
|
+
}
|
|
158
|
+
return false;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
var LENGTH_TRUNCATED_REASONING_MARKER = "[length_truncated_reasoning_tail]";
|
|
162
|
+
var STREAM_TRUNCATED_REASONING_MARKER = "[stream_truncated_reasoning_tail]";
|
|
163
|
+
var MAX_TRUNCATED_REASONING_CHARS = 2e3;
|
|
164
|
+
function formatReasoningTailWithMarker(reasoning_content, marker, maxChars) {
|
|
165
|
+
if (typeof reasoning_content !== "string") return null;
|
|
166
|
+
const trimmed = reasoning_content.trim();
|
|
167
|
+
if (trimmed.length === 0) return null;
|
|
168
|
+
const tail = trimmed.length > maxChars ? trimmed.slice(-maxChars) : trimmed;
|
|
169
|
+
return `[nolo] ${marker}
|
|
170
|
+
${tail}`;
|
|
171
|
+
}
|
|
172
|
+
function formatLengthTruncatedReasoningTail(reasoning_content, maxChars = MAX_TRUNCATED_REASONING_CHARS) {
|
|
173
|
+
return formatReasoningTailWithMarker(reasoning_content, LENGTH_TRUNCATED_REASONING_MARKER, maxChars);
|
|
174
|
+
}
|
|
175
|
+
function formatStreamTruncatedReasoningTail(reasoning_content, maxChars = MAX_TRUNCATED_REASONING_CHARS) {
|
|
176
|
+
return formatReasoningTailWithMarker(reasoning_content, STREAM_TRUNCATED_REASONING_MARKER, maxChars);
|
|
177
|
+
}
|
|
178
|
+
function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
|
|
179
|
+
if (reason === "length_truncated") {
|
|
180
|
+
return formatLengthTruncatedReasoningTail(reasoning_content);
|
|
181
|
+
}
|
|
182
|
+
if (reason === "stream_truncated") {
|
|
183
|
+
return formatStreamTruncatedReasoningTail(reasoning_content);
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
|
|
118
188
|
// packages/agent-runtime/autoExecutionProfiles.ts
|
|
119
189
|
var createProfile = (input) => ({
|
|
120
190
|
id: input.id,
|
|
@@ -156,6 +226,16 @@ export {
|
|
|
156
226
|
DEFAULT_CONTEXT_WINDOW,
|
|
157
227
|
getModelContextWindow,
|
|
158
228
|
getModelInfo,
|
|
229
|
+
EMPTY_ASSISTANT_REPAIR_PROMPT,
|
|
230
|
+
EMPTY_ASSISTANT_FALLBACK_MESSAGE,
|
|
231
|
+
LENGTH_TRUNCATED_FALLBACK_MESSAGE,
|
|
232
|
+
STREAM_TRUNCATED_FALLBACK_MESSAGE,
|
|
233
|
+
REPETITION_LOOP_FALLBACK_MESSAGE,
|
|
234
|
+
STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE,
|
|
235
|
+
resolveEmptyAssistantOutcome,
|
|
236
|
+
resolveEmptyAssistantFallbackMessage,
|
|
237
|
+
hasAssistantVisibleOutput,
|
|
238
|
+
resolveTruncatedReasoningTailLog,
|
|
159
239
|
DEFAULT_AUTO_EXECUTION_PROFILE,
|
|
160
240
|
resolveAutoExecutionProfile
|
|
161
241
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H2JQB6B6.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareAndPersistMessage,
|
|
6
6
|
uiAskChoiceFunc,
|
|
7
7
|
uiAskChoiceFunctionSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FAWK6DBF.js";
|
|
9
9
|
import {
|
|
10
10
|
require_date_fns
|
|
11
11
|
} from "./chunk-M76ECQRD.js";
|
|
12
12
|
import {
|
|
13
13
|
TOOL_PACKS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LGUQHYAL.js";
|
|
15
15
|
import {
|
|
16
16
|
buildSkillDocMarkdown
|
|
17
17
|
} from "./chunk-AETZ7AD6.js";
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
20
20
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
|
|
21
21
|
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ENYDQKOB.js";
|
|
23
23
|
import {
|
|
24
24
|
read,
|
|
25
25
|
readAndWait,
|
|
26
26
|
removeCachedEntity,
|
|
27
27
|
upsertSSREntity,
|
|
28
28
|
write
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WVGEBWA6.js";
|
|
30
30
|
import {
|
|
31
31
|
createAgentKey,
|
|
32
32
|
createDialogKey,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
dialogMessageRange,
|
|
36
36
|
memoryOwnerRange,
|
|
37
37
|
memorySubjectKindRange
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SVEUG45B.js";
|
|
39
39
|
import {
|
|
40
40
|
extractCustomId
|
|
41
41
|
} from "./chunk-BJIRLHJR.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityOAuthAgent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EXLOROHG.js";
|
|
8
8
|
import {
|
|
9
9
|
clipMultilineText,
|
|
10
10
|
fetchAndSerializeTable,
|
|
11
11
|
resolveBuiltinSkillPage,
|
|
12
12
|
waitForAbortableDelay
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YNOGNUBC.js";
|
|
14
14
|
import {
|
|
15
15
|
createDrainExhaustedResponse,
|
|
16
16
|
isCoreDrainingBody,
|
|
@@ -20,56 +20,55 @@ import {
|
|
|
20
20
|
} from "./chunk-RQSOAMPJ.js";
|
|
21
21
|
import {
|
|
22
22
|
slateToSimplifiedMarkdown
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FJHLA6SX.js";
|
|
24
24
|
import {
|
|
25
25
|
extractCategorizedMentions
|
|
26
26
|
} from "./chunk-MEYIRKDN.js";
|
|
27
27
|
import {
|
|
28
28
|
fetchAndCacheMessages
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-FAWK6DBF.js";
|
|
30
30
|
import {
|
|
31
31
|
shouldUseServerProxy
|
|
32
32
|
} from "./chunk-YYLHWIW6.js";
|
|
33
33
|
import {
|
|
34
34
|
fetchServerSyncedCredential
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-6LYUN76O.js";
|
|
36
36
|
import {
|
|
37
37
|
buildSkillGuidancePromptBlock,
|
|
38
38
|
extractRuntimePageCapabilities,
|
|
39
39
|
resolveSkillGraphFromRoots
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-V2IPBG5U.js";
|
|
41
41
|
import {
|
|
42
42
|
buildCurrentTimeBlock,
|
|
43
43
|
buildIdentityBlock,
|
|
44
44
|
buildRuntimeGuidanceBlocks,
|
|
45
|
-
|
|
46
|
-
resolveToolGuidedSections
|
|
47
|
-
|
|
48
|
-
} from "./chunk-T2BZICLK.js";
|
|
45
|
+
normalizeChatCompletionsBodyForProvider,
|
|
46
|
+
resolveToolGuidedSections
|
|
47
|
+
} from "./chunk-G46DB6KG.js";
|
|
49
48
|
import {
|
|
50
49
|
convertMessagesToResponsesInput,
|
|
51
50
|
getUsageRequestOptions,
|
|
52
51
|
preserveAgentStateFields
|
|
53
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-6BYAXNH5.js";
|
|
54
53
|
import {
|
|
55
54
|
buildProviderAuthHeaders
|
|
56
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-5UOBIU5G.js";
|
|
57
56
|
import {
|
|
58
57
|
estimateTokenCount
|
|
59
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-GK74OOFT.js";
|
|
60
59
|
import {
|
|
61
60
|
isOpenAiResponsesModel,
|
|
62
61
|
resolvePlatformChatCompletionsEndpoint,
|
|
63
62
|
resolvePlatformResponsesEndpoint
|
|
64
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-MZXZJVVD.js";
|
|
64
|
+
import {
|
|
65
|
+
createFileCredentialBroker
|
|
66
|
+
} from "./chunk-NQ4N4IGO.js";
|
|
65
67
|
import {
|
|
66
68
|
clampReasoningEffort,
|
|
67
69
|
getModelConfig,
|
|
68
70
|
isModelSupportReasoningEffort
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import {
|
|
71
|
-
createFileCredentialBroker
|
|
72
|
-
} from "./chunk-NQ4N4IGO.js";
|
|
71
|
+
} from "./chunk-OZVGA4SY.js";
|
|
73
72
|
import {
|
|
74
73
|
toErrorMessage
|
|
75
74
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -85,13 +84,13 @@ import {
|
|
|
85
84
|
isDeepInfraKimiModel,
|
|
86
85
|
isFireworksKimiModel,
|
|
87
86
|
resolveFireworksKimiModel
|
|
88
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-ENYDQKOB.js";
|
|
89
88
|
import {
|
|
90
89
|
createSpaceKey
|
|
91
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-3EEK7T3D.js";
|
|
92
91
|
import {
|
|
93
92
|
read
|
|
94
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-WVGEBWA6.js";
|
|
95
94
|
import {
|
|
96
95
|
asTrimmedLowercaseString
|
|
97
96
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -739,36 +738,6 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
739
738
|
]);
|
|
740
739
|
};
|
|
741
740
|
|
|
742
|
-
// packages/integrations/openai/providerBodyCompatibility.ts
|
|
743
|
-
var MOONSHOT_KIMI_K3_MODEL = "kimi-k3";
|
|
744
|
-
var isMoonshotKimiK3 = (provider, model) => asTrimmedLowercaseString(provider) === "moonshot" && asTrimmedLowercaseString(model) === MOONSHOT_KIMI_K3_MODEL;
|
|
745
|
-
var normalizeChatCompletionsBodyForProvider = ({
|
|
746
|
-
body,
|
|
747
|
-
provider,
|
|
748
|
-
model
|
|
749
|
-
}) => {
|
|
750
|
-
const nextBody = { ...body, model };
|
|
751
|
-
const normalizedProvider = asTrimmedLowercaseString(provider);
|
|
752
|
-
if (normalizedProvider === "fireworks" && isFireworksKimiModel(model)) {
|
|
753
|
-
delete nextBody.reasoning;
|
|
754
|
-
delete nextBody.reasoning_effort;
|
|
755
|
-
}
|
|
756
|
-
if (isMoonshotKimiK3(provider, model)) {
|
|
757
|
-
delete nextBody.temperature;
|
|
758
|
-
delete nextBody.top_p;
|
|
759
|
-
delete nextBody.frequency_penalty;
|
|
760
|
-
delete nextBody.presence_penalty;
|
|
761
|
-
if (typeof nextBody.max_tokens === "number") {
|
|
762
|
-
nextBody.max_completion_tokens = nextBody.max_tokens;
|
|
763
|
-
delete nextBody.max_tokens;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if (Array.isArray(nextBody.messages) && requiresBareImageUrl({ provider, model })) {
|
|
767
|
-
nextBody.messages = toBareImageUrlMessages(nextBody.messages);
|
|
768
|
-
}
|
|
769
|
-
return nextBody;
|
|
770
|
-
};
|
|
771
|
-
|
|
772
741
|
// packages/integrations/openai/generateOpenAIRequestBody.ts
|
|
773
742
|
var isClaudeModel = (model) => !!model && (model.includes("claude") || model.includes("anthropic"));
|
|
774
743
|
var applyClaudeCache = (stableContent, dynamicContent) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H2JQB6B6.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-WVGEBWA6.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-SNBCYPK6.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOpenAiResponsesModel,
|
|
3
3
|
resolvePlatformChatCompletionsEndpoint,
|
|
4
|
+
resolvePlatformHostedCredentialProvider,
|
|
4
5
|
resolvePlatformResponsesEndpoint
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MZXZJVVD.js";
|
|
7
|
+
import {
|
|
8
|
+
CLIENT_VERSION_TOO_OLD_CODE,
|
|
9
|
+
buildClientVersionGateErrorDetail,
|
|
10
|
+
evaluatePlatformHostedClientVersionGate
|
|
11
|
+
} from "./chunk-ENYDQKOB.js";
|
|
6
12
|
import {
|
|
7
13
|
asTrimmedLowercaseString
|
|
8
14
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -89,6 +95,9 @@ function resolveOpenAiCompatibleApiKey(env) {
|
|
|
89
95
|
function resolvePlatformServerUrl(env) {
|
|
90
96
|
return trimTrailingSlash(env.NOLO_SERVER || env.BASE_URL || "https://nolo.chat");
|
|
91
97
|
}
|
|
98
|
+
function resolveClientVersion(env) {
|
|
99
|
+
return asOptionalTrimmedString(env.NOLO_CLI_VERSION);
|
|
100
|
+
}
|
|
92
101
|
function resolvePlatformAuthToken(env) {
|
|
93
102
|
return env.AUTH_TOKEN || env.AUTH || env.NOLO_MACHINE_API_KEY || env.BENCHMARK_AUTH_TOKEN || "";
|
|
94
103
|
}
|
|
@@ -270,6 +279,21 @@ async function buildProviderExecutionPlan(args) {
|
|
|
270
279
|
};
|
|
271
280
|
}
|
|
272
281
|
const provider = agentConfig.provider || agentConfig.apiSource || "openai";
|
|
282
|
+
const localClientVersion = resolveClientVersion(env);
|
|
283
|
+
const clientVersionGate = evaluatePlatformHostedClientVersionGate({
|
|
284
|
+
provider,
|
|
285
|
+
model,
|
|
286
|
+
clientVersion: localClientVersion,
|
|
287
|
+
isCustomApi: agentConfig.apiSource === "custom" || Boolean(agentConfig.customProviderUrl?.trim()),
|
|
288
|
+
hasExplicitCredential: Boolean(agentConfig.apiKey?.trim()) || Boolean(agentConfig.apiKeyRef?.trim())
|
|
289
|
+
});
|
|
290
|
+
if (clientVersionGate.blocked) {
|
|
291
|
+
const gateError = new Error(clientVersionGate.message);
|
|
292
|
+
gateError.code = CLIENT_VERSION_TOO_OLD_CODE;
|
|
293
|
+
gateError.detail = buildClientVersionGateErrorDetail(clientVersionGate);
|
|
294
|
+
throw gateError;
|
|
295
|
+
}
|
|
296
|
+
const platformUsageProvider = resolvePlatformHostedCredentialProvider(provider, model);
|
|
273
297
|
const endpoint = transportDecision.transport === "proxy" ? resolvePlatformProviderEndpoint(agentConfig) : resolveChatCompletionsEndpoint(resolveOpenAiCompatibleBaseUrl(env));
|
|
274
298
|
if (transportDecision.transport === "proxy") {
|
|
275
299
|
return {
|
|
@@ -282,7 +306,9 @@ async function buildProviderExecutionPlan(args) {
|
|
|
282
306
|
serverUrl: resolvePlatformServerUrl(env),
|
|
283
307
|
authToken: resolvePlatformAuthToken(env),
|
|
284
308
|
agentKey: agentConfig.key,
|
|
285
|
-
...
|
|
309
|
+
...localClientVersion ? { clientVersion: localClientVersion } : {},
|
|
310
|
+
...agentConfig.apiSource ? { apiSource: agentConfig.apiSource } : {},
|
|
311
|
+
...platformUsageProvider ? { usageProvider: platformUsageProvider } : {}
|
|
286
312
|
// Platform agents use the server-managed provider credential. Never
|
|
287
313
|
// forward a raw credential from a stale/local agent record through the
|
|
288
314
|
// platform proxy; credentials are resolved by the platform server.
|
|
@@ -321,7 +347,8 @@ async function buildProviderExecutionPlan(args) {
|
|
|
321
347
|
provider: agentConfig.provider || "openai-compatible",
|
|
322
348
|
endpoint,
|
|
323
349
|
requestOptions,
|
|
324
|
-
apiKey
|
|
350
|
+
apiKey,
|
|
351
|
+
...platformUsageProvider ? { usageProvider: platformUsageProvider } : {}
|
|
325
352
|
};
|
|
326
353
|
}
|
|
327
354
|
|
|
@@ -329,6 +356,7 @@ export {
|
|
|
329
356
|
pickAgentRuntimeInferenceOptions,
|
|
330
357
|
trimTrailingSlash,
|
|
331
358
|
resolvePlatformServerUrl,
|
|
359
|
+
resolveClientVersion,
|
|
332
360
|
resolvePlatformAuthToken,
|
|
333
361
|
canUsePlatformChatProvider,
|
|
334
362
|
hasDirectOpenAiCompatibleProvider,
|
|
@@ -33,9 +33,9 @@ var STREAM_USAGE_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
33
33
|
"deepseek",
|
|
34
34
|
"ollama",
|
|
35
35
|
"ollama-cloud",
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
36
|
+
// endpoint; the hosted branch passes "upstream-k3" as the usage provider so these
|
|
37
|
+
// streams request the terminal usage chunk (same capability decision as
|
|
38
|
+
// deepinfra/vultr).
|
|
39
39
|
"upstream-k3",
|
|
40
40
|
// RunInfra hosted fallback channel: OpenAI-compatible chat.completions
|
|
41
41
|
// endpoint, supports stream_options.include_usage (measured to return
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ESHYE7WU.js";
|
|
4
4
|
import {
|
|
5
5
|
getDefaultCliLocalRuntimeDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IA3A5373.js";
|
|
7
7
|
import {
|
|
8
8
|
buildCliRuntimeEnv,
|
|
9
9
|
clearProfileAuthToken,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
createMemoryOwnerIndexKey,
|
|
24
24
|
createMemorySubjectKindIndexKey,
|
|
25
25
|
memoryOwnerRange
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SVEUG45B.js";
|
|
27
27
|
import {
|
|
28
28
|
asTrimmedNonEmptyStringArray
|
|
29
29
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
patch,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WVGEBWA6.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgentKey,
|
|
17
17
|
toTrimmedString
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SVEUG45B.js";
|
|
19
19
|
import {
|
|
20
20
|
asyncThunkCreator,
|
|
21
21
|
buildCreateSlice,
|
|
@@ -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-5PG6CUWD.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-GBLDVBT5.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-SN5XJJ7U.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|