nolo-cli 0.8.0-alpha.15 → 0.8.0-alpha.19
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/README.md +1 -1
- package/{_executeModel-KUP2WVMT.js → _executeModel-BOMQGOZC.js} +33 -30
- package/{action-ZJWE3Y5S.js → action-AEHDRQHP.js} +4 -4
- package/{addContentAction-TVDBNJM5.js → addContentAction-OL5YQ6LW.js} +3 -3
- package/{addDialogAgentAction-EKH774VT.js → addDialogAgentAction-XU5Y2E2X.js} +2 -2
- package/{agentDeleteCommand-GNVYHOGZ.js → agentDeleteCommand-5DD2IM3J.js} +12 -11
- package/{agentEmailCommands-VSPS3MZT.js → agentEmailCommands-SE7MBTAG.js} +35 -32
- package/{agentListCommands-FM4OWXYT.js → agentListCommands-I6KZYCIG.js} +13 -12
- package/{agentMachineCommands-7EK7IKEV.js → agentMachineCommands-SBYN6EXT.js} +13 -12
- package/{agentRecordCommands-GYLQ5OA6.js → agentRecordCommands-F74NBFOZ.js} +35 -32
- package/{agentRunCommand-KL2A7CGA.js → agentRunCommand-3DGDK4Y3.js} +41 -36
- package/{agentRuntimeLocal-XL5PLRJV.js → agentRuntimeLocal-ZYEIPTY4.js} +9 -8
- package/{agentSlice-OEHVCG26.js → agentSlice-XEH6Y334.js} +3 -3
- package/{authCommand-PXFX6JDT.js → authCommand-EB5JSOX5.js} +3 -3
- package/{authCommands-356AYWEK.js → authCommands-XPEHTKSM.js} +2 -2
- package/{chunk-M2GJTPUU.js → chunk-2BIV3FMX.js} +25 -236
- package/{chunk-MGOJ5R6J.js → chunk-2NNJ6S5U.js} +1 -1
- package/{chunk-KTVVPRJS.js → chunk-2T2C6CNY.js} +2 -2
- package/{chunk-E7LCFMW5.js → chunk-4NDK6NWB.js} +86 -113
- package/{chunk-HBY2MXIN.js → chunk-4P2MDGKS.js} +76 -211
- package/{chunk-MXLQWBVM.js → chunk-4QEWT7KD.js} +33 -3
- package/{chunk-DSNONPGW.js → chunk-5KLGBAAR.js} +1 -1
- package/{chunk-TSS3XJY4.js → chunk-64AAZRGY.js} +2 -2
- package/{chunk-BZMZUAFJ.js → chunk-6RSAUKSQ.js} +24 -13
- package/{chunk-TWPGVS2U.js → chunk-7DAJ4AI4.js} +2 -2
- package/{chunk-RLCFUU46.js → chunk-7KCUSYT2.js} +4 -10
- package/chunk-AFON4QUU.js +112 -0
- package/chunk-AGFH73SK.js +239 -0
- package/{chunk-572EKYLF.js → chunk-BBYVOSU2.js} +1 -1
- package/{chunk-2MALU52L.js → chunk-C3RUNRHT.js} +1 -1
- package/{chunk-SL35K7AH.js → chunk-C4FTUXVF.js} +2 -82
- package/{chunk-FY3KVW36.js → chunk-C77B4AFC.js} +2 -2
- package/{chunk-USZMK5UT.js → chunk-DCOA4QSN.js} +1 -1
- package/{chunk-BKPVTIEK.js → chunk-FVYY6MCS.js} +3 -3
- package/{chunk-3TZDXYSF.js → chunk-HNW7IJSK.js} +1 -1
- package/{chunk-AURGW6TR.js → chunk-IEKTE4JQ.js} +2 -2
- package/{chunk-BR2WP3DF.js → chunk-IWX4UW2E.js} +9 -9
- package/{chunk-AWCQ2SK4.js → chunk-IX4C5TCO.js} +3 -3
- package/{chunk-6GANEXVO.js → chunk-JRCUAPXX.js} +1 -1
- package/{chunk-XDVAYP26.js → chunk-JRKKFRAV.js} +1 -1
- package/{chunk-COMXDWNM.js → chunk-KPSWSDUF.js} +2 -2
- package/chunk-LTRXGFMS.js +83 -0
- package/{chunk-PCWC3JTN.js → chunk-MTU75CZ2.js} +1 -1
- package/{chunk-DGFWICQJ.js → chunk-N54XAP77.js} +1 -1
- package/{chunk-SACYB45H.js → chunk-O2ZNTTET.js} +5 -5
- package/{chunk-SH2CFQOH.js → chunk-O4BU24WZ.js} +2 -181
- package/{chunk-PA23IU5W.js → chunk-OFM4S5P3.js} +13 -13
- package/{chunk-ZJDUYY3D.js → chunk-OI54SUZ7.js} +6 -6
- package/{chunk-63SLEOLK.js → chunk-OZNNTJM7.js} +2 -2
- package/{chunk-DG7AAAR3.js → chunk-P3PKED2I.js} +62 -2
- package/{chunk-NGXGGF4K.js → chunk-PY4NLIAF.js} +1 -1
- package/{chunk-7IPLJUYC.js → chunk-RL776AGR.js} +1 -1
- package/{chunk-MTAJCUIC.js → chunk-RM7KF6OT.js} +41 -22
- package/{chunk-RJKDVL4L.js → chunk-SDJDLO5W.js} +2 -2
- package/{chunk-N5Z5DMDD.js → chunk-SHAFJ4TI.js} +3 -3
- package/{chunk-YYUCRDOK.js → chunk-SOTZ6RDN.js} +1 -1
- package/chunk-VC6OZXO5.js +298 -0
- package/{chunk-EXTIQUCI.js → chunk-VVX233PH.js} +1 -1
- package/{chunk-ZQ2UM4KG.js → chunk-WZSRQNQG.js} +1 -292
- package/{chunk-Q2YZULBH.js → chunk-XENYHRUE.js} +1 -1
- package/{chunk-VQ2AJRGD.js → chunk-YPRZSPF3.js} +1 -1
- package/{chunk-4P3XCCG2.js → chunk-YRG2GO6E.js} +210 -63
- package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
- package/{createAgentAutomationAction-KY7OQ4YJ.js → createAgentAutomationAction-MBUL3ALA.js} +12 -12
- package/{createDialogAction-CWPWISDF.js → createDialogAction-3JLD4VED.js} +16 -15
- package/{createPageAction-GDQVH2DC.js → createPageAction-Z2AOWGIW.js} +17 -16
- package/{dbSlice-PR44QPXY.js → dbSlice-LSKJDY2R.js} +2 -2
- package/{dialogCommands-DWSE4PMW.js → dialogCommands-4IX4XIZE.js} +14 -13
- package/{dialogSlice-2EX2IPKM.js → dialogSlice-NRQ5WIJO.js} +12 -12
- package/{docCreateCommands-UFJL5PUM.js → docCreateCommands-SIL3NPGT.js} +14 -12
- package/{docDeleteCommands-XHEIBAB2.js → docDeleteCommands-7IOMLUS4.js} +16 -14
- package/{docReadCommands-PEDIC2CW.js → docReadCommands-FNFXUA5L.js} +14 -12
- package/{docStore-BDZODEOU.js → docStore-DBFNPMHU.js} +13 -13
- package/{docUpdateCommands-WBRODQ7P.js → docUpdateCommands-X2HNDVUC.js} +14 -12
- package/{fetchMessages-U6ZHN56A.js → fetchMessages-KTNM7QAR.js} +2 -2
- package/{getPricing-PWPJ6MNV.js → getPricing-3E6UNPKL.js} +3 -3
- package/{handleSendMessageAction-3ZTXMDDU.js → handleSendMessageAction-G3WLT6I7.js} +12 -12
- package/index.js +45 -45
- package/{localDialogRead-Z5UTAJPU.js → localDialogRead-2VRI24F4.js} +1 -1
- package/{machineCommands-7PL6UCMC.js → machineCommands-GPEWO27H.js} +37 -34
- package/{machineWsRunDispatch-Q6XZLVQE.js → machineWsRunDispatch-2LSYCV4S.js} +34 -31
- package/{models-XLEOET3E.js → models-4OPOOLFS.js} +2 -2
- package/package.json +3 -2
- package/{readlineWorkspace-6S37COYT.js → readlineWorkspace-UL4LXWHX.js} +252 -78
- package/{removeDialogAgentAction-GJQJNDW6.js → removeDialogAgentAction-U3CP2M2H.js} +4 -4
- package/{runAgentClientLoop-Y2LTIWEU.js → runAgentClientLoop-KKV7BWWC.js} +27 -24
- package/{setDialogExtraReferencesAction-M7OQG54N.js → setDialogExtraReferencesAction-S7GUFLTN.js} +2 -2
- package/{setPrimaryDialogAgentAction-46UNFJDL.js → setPrimaryDialogAgentAction-5SF7G5OS.js} +4 -4
- package/{settingSlice-FVUUH4JA.js → settingSlice-EXYZ5EFP.js} +3 -3
- package/skillDiscovery-UGSQGX2U.js +16 -0
- package/{spaceCommands-ORSFAWEY.js → spaceCommands-E7VOF4LO.js} +16 -19
- package/{spaceSlice-ULWMVNFC.js → spaceSlice-KIDVQWOV.js} +16 -14
- package/{streamAgentChatTurn-J4YW33EM.js → streamAgentChatTurn-YQH6ZGE6.js} +41 -36
- package/{tools-753HRGSD.js → tools-5C7OGJEW.js} +21 -19
- package/{tuiSummaryLlmCaller-JSI4GL6W.js → tuiSummaryLlmCaller-RV3THLZF.js} +4 -4
- package/{understanding-GQKNDDWM.js → understanding-3CUQQ6SV.js} +3 -3
- package/{updateDialogTitleAction-PXLE3P4E.js → updateDialogTitleAction-JHAVYVIP.js} +12 -12
- package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RL776AGR.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MTU75CZ2.js";
|
|
15
15
|
import {
|
|
16
16
|
parseUserIdFromAuthToken,
|
|
17
17
|
readOption,
|
|
@@ -625,7 +625,7 @@ async function tryHttpDialogCandidates(args) {
|
|
|
625
625
|
throw Object.assign(new Error("All HTTP dialog reads failed"), { attempts });
|
|
626
626
|
}
|
|
627
627
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit) {
|
|
628
|
-
const { readDialogFromLocalDb: readLocalDialog } = await import("./localDialogRead-
|
|
628
|
+
const { readDialogFromLocalDb: readLocalDialog } = await import("./localDialogRead-2VRI24F4.js");
|
|
629
629
|
const result = await readLocalDialog({ dialogKey, dialogId, limit });
|
|
630
630
|
return {
|
|
631
631
|
...result,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RM7KF6OT.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-SDJDLO5W.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
18
|
} from "./chunk-VHBWHNVT.js";
|
|
@@ -277,19 +277,19 @@ var GPT_5_6_SOL_LONG_CONTEXT_PRICE = {
|
|
|
277
277
|
inputCacheHit: 1 * 8
|
|
278
278
|
};
|
|
279
279
|
var GPT_5_6_TERRA_STANDARD_PRICE = {
|
|
280
|
-
input: 2
|
|
281
|
-
output:
|
|
282
|
-
inputCacheHit: 0.
|
|
280
|
+
input: 2 * 8,
|
|
281
|
+
output: 12 * 8,
|
|
282
|
+
inputCacheHit: 0.2 * 8
|
|
283
283
|
};
|
|
284
284
|
var GPT_5_6_TERRA_LONG_CONTEXT_PRICE = {
|
|
285
|
-
input:
|
|
286
|
-
output:
|
|
287
|
-
inputCacheHit: 0.
|
|
285
|
+
input: 4 * 8,
|
|
286
|
+
output: 18 * 8,
|
|
287
|
+
inputCacheHit: 0.4 * 8
|
|
288
288
|
};
|
|
289
289
|
var GPT_5_6_LUNA_PRICE = {
|
|
290
|
-
input:
|
|
291
|
-
output:
|
|
292
|
-
inputCacheHit: 0.
|
|
290
|
+
input: 0.2 * 8,
|
|
291
|
+
output: 1.2 * 8,
|
|
292
|
+
inputCacheHit: 0.02 * 8
|
|
293
293
|
};
|
|
294
294
|
var openAIModels = [
|
|
295
295
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4P2MDGKS.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-KPSWSDUF.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-Z2AOWGIW.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
fileKey,
|
|
11
11
|
getFileIdFromKey,
|
|
12
12
|
ulid
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-O4BU24WZ.js";
|
|
14
14
|
import {
|
|
15
15
|
readAction,
|
|
16
16
|
readRequestManager,
|
|
@@ -748,7 +748,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
748
748
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
749
749
|
share: create.asyncThunk(
|
|
750
750
|
async (config, thunkApi) => {
|
|
751
|
-
const { shareResourceAction } = await import("./action-
|
|
751
|
+
const { shareResourceAction } = await import("./action-AEHDRQHP.js");
|
|
752
752
|
return shareResourceAction(config, thunkApi);
|
|
753
753
|
}
|
|
754
754
|
),
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// packages/agent-runtime/modelLayerOverride.ts
|
|
2
|
+
var MODEL_LAYER_KEYS = [
|
|
3
|
+
"provider",
|
|
4
|
+
"model",
|
|
5
|
+
"apiSource",
|
|
6
|
+
"cliProvider",
|
|
7
|
+
"useServerProxy",
|
|
8
|
+
"apiKey",
|
|
9
|
+
"apiKeyRef",
|
|
10
|
+
"apiKeyHeader",
|
|
11
|
+
"customProviderUrl",
|
|
12
|
+
"credentialRef",
|
|
13
|
+
"credentialSynced",
|
|
14
|
+
"temperature",
|
|
15
|
+
"top_p",
|
|
16
|
+
"frequency_penalty",
|
|
17
|
+
"presence_penalty",
|
|
18
|
+
"max_tokens",
|
|
19
|
+
"reasoning_effort",
|
|
20
|
+
"enableThinking",
|
|
21
|
+
"thinkingBudget"
|
|
22
|
+
];
|
|
23
|
+
function mergeReferences(base, extra) {
|
|
24
|
+
const safeBase = Array.isArray(base) ? base : [];
|
|
25
|
+
const safeExtra = Array.isArray(extra) ? extra : [];
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
const merged = [];
|
|
28
|
+
for (const item of [...safeBase, ...safeExtra]) {
|
|
29
|
+
const key = item?.dbKey;
|
|
30
|
+
if (key && seen.has(key)) continue;
|
|
31
|
+
if (key) seen.add(key);
|
|
32
|
+
if (item) merged.push(item);
|
|
33
|
+
}
|
|
34
|
+
return merged;
|
|
35
|
+
}
|
|
36
|
+
var asNonEmptyString = (value) => typeof value === "string" && value.trim().length > 0;
|
|
37
|
+
function buildModelLayerOverride(agent) {
|
|
38
|
+
if (!agent || !asNonEmptyString(agent.provider) || !asNonEmptyString(agent.model)) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const override = {
|
|
42
|
+
provider: agent.provider,
|
|
43
|
+
model: agent.model
|
|
44
|
+
};
|
|
45
|
+
for (const key of MODEL_LAYER_KEYS) {
|
|
46
|
+
if (key === "provider" || key === "model") continue;
|
|
47
|
+
const value = agent[key];
|
|
48
|
+
if (value !== void 0) {
|
|
49
|
+
override[key] = value;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(agent.references) && agent.references.length > 0) {
|
|
53
|
+
override.references = agent.references;
|
|
54
|
+
}
|
|
55
|
+
return override;
|
|
56
|
+
}
|
|
57
|
+
function applyModelLayerOverride(base, override) {
|
|
58
|
+
const next = { ...base };
|
|
59
|
+
for (const key of MODEL_LAYER_KEYS) {
|
|
60
|
+
delete next[key];
|
|
61
|
+
}
|
|
62
|
+
for (const key of MODEL_LAYER_KEYS) {
|
|
63
|
+
const value = override[key];
|
|
64
|
+
if (value !== void 0) {
|
|
65
|
+
next[key] = value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const merged = mergeReferences(
|
|
69
|
+
base.references,
|
|
70
|
+
override.references
|
|
71
|
+
);
|
|
72
|
+
if (merged.length > 0) {
|
|
73
|
+
next.references = merged;
|
|
74
|
+
} else {
|
|
75
|
+
delete next.references;
|
|
76
|
+
}
|
|
77
|
+
return next;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
buildModelLayerOverride,
|
|
82
|
+
applyModelLayerOverride
|
|
83
|
+
};
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
readSseFrames,
|
|
6
6
|
throwIfChatCompletionStreamFailed,
|
|
7
7
|
toOpenAiCompatibleMessages
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5KLGBAAR.js";
|
|
9
9
|
import {
|
|
10
10
|
parseToolArgumentsJson
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4QEWT7KD.js";
|
|
12
12
|
import {
|
|
13
13
|
createThinkParserState,
|
|
14
14
|
extractThinkContent
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
buildProviderAuthHeaders,
|
|
18
18
|
buildProviderExecutionPlan
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JRKKFRAV.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalizeToolName,
|
|
22
22
|
createGlob,
|
|
23
23
|
resolveExecutableOnPath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-P3PKED2I.js";
|
|
25
25
|
import {
|
|
26
26
|
toErrorMessage
|
|
27
27
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-KX6YBIHG.js";
|
|
31
31
|
import {
|
|
32
32
|
dialogMessageKey
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-O4BU24WZ.js";
|
|
34
34
|
import {
|
|
35
35
|
asTrimmedNonEmptyStringArray
|
|
36
36
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -12,187 +12,9 @@ import {
|
|
|
12
12
|
} from "./chunk-G3SUCT4W.js";
|
|
13
13
|
import {
|
|
14
14
|
__commonJS,
|
|
15
|
-
__require,
|
|
16
15
|
__toESM
|
|
17
16
|
} from "./chunk-4VNS5WPM.js";
|
|
18
17
|
|
|
19
|
-
// node_modules/ulid/dist/index.umd.js
|
|
20
|
-
var require_index_umd = __commonJS({
|
|
21
|
-
"node_modules/ulid/dist/index.umd.js"(exports, module) {
|
|
22
|
-
(function(global, factory) {
|
|
23
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.ULID = {});
|
|
24
|
-
})(exports, function(exports2) {
|
|
25
|
-
"use strict";
|
|
26
|
-
function createError(message) {
|
|
27
|
-
var err = new Error(message);
|
|
28
|
-
err.source = "ulid";
|
|
29
|
-
return err;
|
|
30
|
-
}
|
|
31
|
-
var ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
32
|
-
var ENCODING_LEN = ENCODING.length;
|
|
33
|
-
var TIME_MAX = Math.pow(2, 48) - 1;
|
|
34
|
-
var TIME_LEN = 10;
|
|
35
|
-
var RANDOM_LEN = 16;
|
|
36
|
-
function replaceCharAt(str, index, char) {
|
|
37
|
-
if (index > str.length - 1) {
|
|
38
|
-
return str;
|
|
39
|
-
}
|
|
40
|
-
return str.substr(0, index) + char + str.substr(index + 1);
|
|
41
|
-
}
|
|
42
|
-
function incrementBase32(str) {
|
|
43
|
-
var done = void 0;
|
|
44
|
-
var index = str.length;
|
|
45
|
-
var char = void 0;
|
|
46
|
-
var charIndex = void 0;
|
|
47
|
-
var maxCharIndex = ENCODING_LEN - 1;
|
|
48
|
-
while (!done && index-- >= 0) {
|
|
49
|
-
char = str[index];
|
|
50
|
-
charIndex = ENCODING.indexOf(char);
|
|
51
|
-
if (charIndex === -1) {
|
|
52
|
-
throw createError("incorrectly encoded string");
|
|
53
|
-
}
|
|
54
|
-
if (charIndex === maxCharIndex) {
|
|
55
|
-
str = replaceCharAt(str, index, ENCODING[0]);
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
done = replaceCharAt(str, index, ENCODING[charIndex + 1]);
|
|
59
|
-
}
|
|
60
|
-
if (typeof done === "string") {
|
|
61
|
-
return done;
|
|
62
|
-
}
|
|
63
|
-
throw createError("cannot increment this string");
|
|
64
|
-
}
|
|
65
|
-
function randomChar(prng2) {
|
|
66
|
-
var rand = Math.floor(prng2() * ENCODING_LEN);
|
|
67
|
-
if (rand === ENCODING_LEN) {
|
|
68
|
-
rand = ENCODING_LEN - 1;
|
|
69
|
-
}
|
|
70
|
-
return ENCODING.charAt(rand);
|
|
71
|
-
}
|
|
72
|
-
function encodeTime(now, len) {
|
|
73
|
-
if (isNaN(now)) {
|
|
74
|
-
throw new Error(now + " must be a number");
|
|
75
|
-
}
|
|
76
|
-
if (now > TIME_MAX) {
|
|
77
|
-
throw createError("cannot encode time greater than " + TIME_MAX);
|
|
78
|
-
}
|
|
79
|
-
if (now < 0) {
|
|
80
|
-
throw createError("time must be positive");
|
|
81
|
-
}
|
|
82
|
-
if (Number.isInteger(now) === false) {
|
|
83
|
-
throw createError("time must be an integer");
|
|
84
|
-
}
|
|
85
|
-
var mod = void 0;
|
|
86
|
-
var str = "";
|
|
87
|
-
for (; len > 0; len--) {
|
|
88
|
-
mod = now % ENCODING_LEN;
|
|
89
|
-
str = ENCODING.charAt(mod) + str;
|
|
90
|
-
now = (now - mod) / ENCODING_LEN;
|
|
91
|
-
}
|
|
92
|
-
return str;
|
|
93
|
-
}
|
|
94
|
-
function encodeRandom(len, prng2) {
|
|
95
|
-
var str = "";
|
|
96
|
-
for (; len > 0; len--) {
|
|
97
|
-
str = randomChar(prng2) + str;
|
|
98
|
-
}
|
|
99
|
-
return str;
|
|
100
|
-
}
|
|
101
|
-
function decodeTime(id) {
|
|
102
|
-
if (id.length !== TIME_LEN + RANDOM_LEN) {
|
|
103
|
-
throw createError("malformed ulid");
|
|
104
|
-
}
|
|
105
|
-
var time = id.substr(0, TIME_LEN).split("").reverse().reduce(function(carry, char, index) {
|
|
106
|
-
var encodingIndex = ENCODING.indexOf(char);
|
|
107
|
-
if (encodingIndex === -1) {
|
|
108
|
-
throw createError("invalid character found: " + char);
|
|
109
|
-
}
|
|
110
|
-
return carry += encodingIndex * Math.pow(ENCODING_LEN, index);
|
|
111
|
-
}, 0);
|
|
112
|
-
if (time > TIME_MAX) {
|
|
113
|
-
throw createError("malformed ulid, timestamp too large");
|
|
114
|
-
}
|
|
115
|
-
return time;
|
|
116
|
-
}
|
|
117
|
-
function detectPrng() {
|
|
118
|
-
var allowInsecure = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
119
|
-
var root = arguments[1];
|
|
120
|
-
if (!root) {
|
|
121
|
-
root = typeof window !== "undefined" ? window : null;
|
|
122
|
-
}
|
|
123
|
-
var browserCrypto = root && (root.crypto || root.msCrypto);
|
|
124
|
-
if (browserCrypto) {
|
|
125
|
-
return function() {
|
|
126
|
-
var buffer = new Uint8Array(1);
|
|
127
|
-
browserCrypto.getRandomValues(buffer);
|
|
128
|
-
return buffer[0] / 255;
|
|
129
|
-
};
|
|
130
|
-
} else {
|
|
131
|
-
try {
|
|
132
|
-
var nodeCrypto = __require("crypto");
|
|
133
|
-
return function() {
|
|
134
|
-
return nodeCrypto.randomBytes(1).readUInt8() / 255;
|
|
135
|
-
};
|
|
136
|
-
} catch (e) {
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (allowInsecure) {
|
|
140
|
-
try {
|
|
141
|
-
console.error("secure crypto unusable, falling back to insecure Math.random()!");
|
|
142
|
-
} catch (e) {
|
|
143
|
-
}
|
|
144
|
-
return function() {
|
|
145
|
-
return Math.random();
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
throw createError("secure crypto unusable, insecure Math.random not allowed");
|
|
149
|
-
}
|
|
150
|
-
function factory(currPrng) {
|
|
151
|
-
if (!currPrng) {
|
|
152
|
-
currPrng = detectPrng();
|
|
153
|
-
}
|
|
154
|
-
return function ulid3(seedTime) {
|
|
155
|
-
if (isNaN(seedTime)) {
|
|
156
|
-
seedTime = Date.now();
|
|
157
|
-
}
|
|
158
|
-
return encodeTime(seedTime, TIME_LEN) + encodeRandom(RANDOM_LEN, currPrng);
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
function monotonicFactory2(currPrng) {
|
|
162
|
-
if (!currPrng) {
|
|
163
|
-
currPrng = detectPrng();
|
|
164
|
-
}
|
|
165
|
-
var lastTime = 0;
|
|
166
|
-
var lastRandom = void 0;
|
|
167
|
-
return function ulid3(seedTime) {
|
|
168
|
-
if (isNaN(seedTime)) {
|
|
169
|
-
seedTime = Date.now();
|
|
170
|
-
}
|
|
171
|
-
if (seedTime <= lastTime) {
|
|
172
|
-
var incrementedRandom = lastRandom = incrementBase32(lastRandom);
|
|
173
|
-
return encodeTime(lastTime, TIME_LEN) + incrementedRandom;
|
|
174
|
-
}
|
|
175
|
-
lastTime = seedTime;
|
|
176
|
-
var newRandom = lastRandom = encodeRandom(RANDOM_LEN, currPrng);
|
|
177
|
-
return encodeTime(seedTime, TIME_LEN) + newRandom;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
var ulid2 = factory();
|
|
181
|
-
exports2.replaceCharAt = replaceCharAt;
|
|
182
|
-
exports2.incrementBase32 = incrementBase32;
|
|
183
|
-
exports2.randomChar = randomChar;
|
|
184
|
-
exports2.encodeTime = encodeTime;
|
|
185
|
-
exports2.encodeRandom = encodeRandom;
|
|
186
|
-
exports2.decodeTime = decodeTime;
|
|
187
|
-
exports2.detectPrng = detectPrng;
|
|
188
|
-
exports2.factory = factory;
|
|
189
|
-
exports2.monotonicFactory = monotonicFactory2;
|
|
190
|
-
exports2.ulid = ulid2;
|
|
191
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
|
|
196
18
|
// node_modules/rambda/dist/rambda.js
|
|
197
19
|
var require_rambda = __commonJS({
|
|
198
20
|
"node_modules/rambda/dist/rambda.js"(exports) {
|
|
@@ -2577,9 +2399,9 @@ function toTrimmedString(value) {
|
|
|
2577
2399
|
}
|
|
2578
2400
|
|
|
2579
2401
|
// packages/database/utils/ulid.ts
|
|
2580
|
-
|
|
2402
|
+
import { monotonicFactory } from "ulid";
|
|
2581
2403
|
var prng = () => Math.random();
|
|
2582
|
-
var ulid =
|
|
2404
|
+
var ulid = monotonicFactory(prng);
|
|
2583
2405
|
|
|
2584
2406
|
// packages/database/keys.ts
|
|
2585
2407
|
var import_rambda = __toESM(require_rambda(), 1);
|
|
@@ -3343,7 +3165,6 @@ var sanitizeShareData = (data) => {
|
|
|
3343
3165
|
};
|
|
3344
3166
|
|
|
3345
3167
|
export {
|
|
3346
|
-
require_index_umd,
|
|
3347
3168
|
ulid,
|
|
3348
3169
|
toTrimmedString,
|
|
3349
3170
|
toNonEmptyString,
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-JEXVIMYZ.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareTools
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C77B4AFC.js";
|
|
7
|
+
import {
|
|
8
|
+
performFetchRequest
|
|
9
|
+
} from "./chunk-2BIV3FMX.js";
|
|
7
10
|
import {
|
|
8
11
|
getPublicImageAgentMode
|
|
9
12
|
} from "./chunk-VIDPVFP3.js";
|
|
10
|
-
import {
|
|
11
|
-
performFetchRequest
|
|
12
|
-
} from "./chunk-M2GJTPUU.js";
|
|
13
13
|
import {
|
|
14
14
|
createSSEParser,
|
|
15
15
|
createToolRunId,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toolRunSetPending,
|
|
21
21
|
toolRunStarted,
|
|
22
22
|
toolRunSucceeded
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YRG2GO6E.js";
|
|
24
24
|
import {
|
|
25
25
|
addToolMessage,
|
|
26
26
|
getModelInfo,
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
messageStreaming,
|
|
29
29
|
selectCurrentSpaceId,
|
|
30
30
|
updateToolMessage
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4P2MDGKS.js";
|
|
32
32
|
import {
|
|
33
33
|
streamAgentChatTurn
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6RSAUKSQ.js";
|
|
35
35
|
import {
|
|
36
36
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-4QEWT7KD.js";
|
|
38
38
|
import {
|
|
39
39
|
createThinkParserState,
|
|
40
40
|
flushThinkParser,
|
|
@@ -42,10 +42,10 @@ import {
|
|
|
42
42
|
} from "./chunk-OPZYGHUC.js";
|
|
43
43
|
import {
|
|
44
44
|
getApiEndpoint
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BBYVOSU2.js";
|
|
46
46
|
import {
|
|
47
47
|
isNoloHostedProvider
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-IWX4UW2E.js";
|
|
49
49
|
import {
|
|
50
50
|
extractCustomId
|
|
51
51
|
} from "./chunk-DFFIZ25G.js";
|
|
@@ -59,15 +59,15 @@ import {
|
|
|
59
59
|
} from "./chunk-HNMXYYJR.js";
|
|
60
60
|
import {
|
|
61
61
|
selectCurrentServer
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-64AAZRGY.js";
|
|
63
63
|
import {
|
|
64
64
|
write
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KPSWSDUF.js";
|
|
66
66
|
import {
|
|
67
67
|
createDialogMessageKeyAndId,
|
|
68
68
|
dialogMessageKey,
|
|
69
69
|
toTrimmedString
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-O4BU24WZ.js";
|
|
71
71
|
import {
|
|
72
72
|
createAsyncThunk,
|
|
73
73
|
selectIdentityToken
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chooseMemoryOwners,
|
|
3
3
|
loadMemoryCandidatesFromDb
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XENYHRUE.js";
|
|
5
5
|
import {
|
|
6
6
|
addContentToSpace,
|
|
7
7
|
prepareAndPersistMessage,
|
|
8
8
|
uiAskChoiceFunc,
|
|
9
9
|
uiAskChoiceFunctionSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4P2MDGKS.js";
|
|
11
11
|
import {
|
|
12
12
|
require_date_fns
|
|
13
13
|
} from "./chunk-M76ECQRD.js";
|
|
14
14
|
import {
|
|
15
15
|
PLATFORM_HOSTED_GLM_52_MODEL,
|
|
16
16
|
PLATFORM_HOSTED_GLM_PRICE
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BBYVOSU2.js";
|
|
18
18
|
import {
|
|
19
19
|
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IWX4UW2E.js";
|
|
21
21
|
import {
|
|
22
22
|
extractCustomId
|
|
23
23
|
} from "./chunk-DFFIZ25G.js";
|
|
@@ -27,13 +27,13 @@ import {
|
|
|
27
27
|
removeCachedEntity,
|
|
28
28
|
upsertSSREntity,
|
|
29
29
|
write
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KPSWSDUF.js";
|
|
31
31
|
import {
|
|
32
32
|
createAgentKey,
|
|
33
33
|
createDialogKey,
|
|
34
34
|
createKey,
|
|
35
35
|
dialogMessageRange
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-O4BU24WZ.js";
|
|
37
37
|
import {
|
|
38
38
|
selectIdentityUserId
|
|
39
39
|
} from "./chunk-EYEEHCU4.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer,
|
|
3
3
|
selectRemoteServers
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-64AAZRGY.js";
|
|
5
5
|
import {
|
|
6
6
|
createUserKey,
|
|
7
7
|
extractAgentInfo,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
sanitizeShareData,
|
|
11
11
|
shareKey,
|
|
12
12
|
toNonEmptyString
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-O4BU24WZ.js";
|
|
14
14
|
import {
|
|
15
15
|
noloDeleteRequest,
|
|
16
16
|
noloWriteRequest,
|