nolo-cli 0.8.0-alpha.23 → 0.8.0-alpha.24
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-YXTTYRXS.js → _executeModel-2ZAPHFOX.js} +19 -17
- package/{agentDeleteCommand-4NO7Y6UI.js → agentDeleteCommand-5TFSII4Z.js} +11 -11
- package/{agentEmailCommands-NPP5TGZV.js → agentEmailCommands-XMXWGUMZ.js} +22 -20
- package/{agentListCommands-IP5BNB5W.js → agentListCommands-OWEFQEY4.js} +99 -15
- package/{agentMachineCommands-24NFTIKY.js → agentMachineCommands-DGHYBBFC.js} +11 -11
- package/{agentRecordCommands-7AWSR46F.js → agentRecordCommands-I433EE5F.js} +22 -20
- package/{agentRunCommand-P46WCJ6P.js → agentRunCommand-UQSX3IGW.js} +22 -20
- package/{agentRuntimeLocal-V5UV7S4R.js → agentRuntimeLocal-73SVOC5U.js} +8 -8
- package/{agentSlice-3CVAZZOP.js → agentSlice-JQCS4LR3.js} +1 -1
- package/{chunk-AWY2AFHN.js → chunk-3HPUUWOR.js} +50 -4
- package/{chunk-6UUD2WES.js → chunk-3KGTFX3T.js} +2 -13
- package/{chunk-RBCNBU2A.js → chunk-524BDL33.js} +1 -0
- package/chunk-6QFNUK2G.js +144 -0
- package/{chunk-RBB43B5W.js → chunk-AISLHYDB.js} +3 -3
- package/{chunk-BB2PII22.js → chunk-BKGNXJAM.js} +1 -1
- package/{chunk-P7GAHW32.js → chunk-BQECZ3Q4.js} +9 -9
- package/{chunk-A4MYG3TR.js → chunk-BT57QC5K.js} +2 -2
- package/{chunk-LBUTKV7S.js → chunk-C4DZRHFJ.js} +7 -7
- package/{chunk-Q2WC4KGQ.js → chunk-DS3VC4EA.js} +2 -2
- package/{chunk-ZJS64PZJ.js → chunk-FVVST32H.js} +1 -1
- package/{chunk-6OHYC4BY.js → chunk-FZ2G3I4B.js} +2 -1
- package/{chunk-6KRA6AWI.js → chunk-G7KM6BBZ.js} +1 -1
- package/{chunk-ZAUDEKML.js → chunk-GROGNZOA.js} +21 -12
- package/{chunk-RBCENBG7.js → chunk-IOQIOZNI.js} +8 -2
- package/{chunk-PTT6KSYQ.js → chunk-IPA2WQGY.js} +83 -30
- package/{chunk-DSNLHTP3.js → chunk-IYMGQ3TN.js} +9 -2
- package/{chunk-WESWWEVA.js → chunk-L76QNLGU.js} +1 -1
- package/{chunk-LJCH34R2.js → chunk-LE6JAIXE.js} +2 -2
- package/{chunk-5NYGMN4O.js → chunk-LRKEOCWY.js} +3 -3
- package/{chunk-KLOCUWKZ.js → chunk-OCDEWRE2.js} +1 -1
- package/{chunk-RYMUT5JO.js → chunk-P2SPC3FT.js} +12 -8
- package/{chunk-4VA3UQRF.js → chunk-Q7S2ORXX.js} +3 -3
- package/{chunk-D55DXHXL.js → chunk-QWM7YWVT.js} +1 -1
- package/{chunk-AOKWJZ5N.js → chunk-S3UTETIC.js} +3 -2
- package/{chunk-EUN3SYY7.js → chunk-SBVUZC2E.js} +1 -1
- package/{chunk-O7VS7JLJ.js → chunk-VUEXKW6U.js} +1 -1
- package/{chunk-MIQOUMSN.js → chunk-WKQGZJVI.js} +1 -1
- package/{chunk-LFFATN2M.js → chunk-WM7P5OWZ.js} +18 -12
- package/{chunk-LW6FJFCT.js → chunk-WTBWWBSF.js} +122 -28
- package/{chunk-HAC6GPRE.js → chunk-WVS3GX3B.js} +2 -2
- package/chunk-Z3NEXVYE.js +33 -0
- package/{createAgentAutomationAction-DYQOGAVE.js → createAgentAutomationAction-GXZNLJZK.js} +6 -5
- package/{createDialogAction-ETB3KQQE.js → createDialogAction-KLW42ZGF.js} +7 -6
- package/{createPageAction-UF2RHA63.js → createPageAction-IBJHE6MH.js} +6 -5
- package/{dialogCommands-LYYC7XHF.js → dialogCommands-7O5PUZRU.js} +12 -12
- package/{dialogSlice-IFBZ4IT2.js → dialogSlice-GGV7PF53.js} +6 -5
- package/{docCreateCommands-I66OI374.js → docCreateCommands-7ZO2NQQF.js} +11 -11
- package/{docDeleteCommands-OVRBCHMF.js → docDeleteCommands-YKIXZYBR.js} +12 -12
- package/{docReadCommands-YLWUMEH7.js → docReadCommands-5UDONBUL.js} +11 -11
- package/{docStore-65WO7U36.js → docStore-VDWTATFH.js} +7 -6
- package/{docUpdateCommands-NSICS4IN.js → docUpdateCommands-EPZIIQMY.js} +11 -11
- package/{getPricing-7PUT44ZS.js → getPricing-6TOZXPAU.js} +3 -3
- package/{handleSendMessageAction-T76HEDOP.js → handleSendMessageAction-MMATC5V5.js} +6 -5
- package/index.js +36 -36
- package/{machineCommands-4HQY6UVZ.js → machineCommands-PTHPKSIZ.js} +21 -19
- package/{machineWsRunDispatch-7YW2M4FS.js → machineWsRunDispatch-M5L2NVWJ.js} +21 -19
- package/{models-MFXNI3TF.js → models-H524GH3U.js} +3 -2
- package/package.json +1 -1
- package/{readlineWorkspace-FLQWOAUR.js → readlineWorkspace-4NXMEOHP.js} +106 -48
- package/{runAgentClientLoop-IUV2TR3X.js → runAgentClientLoop-FGUYNGSA.js} +16 -14
- package/{spaceCommands-BDDAT4VU.js → spaceCommands-S3EB6TOS.js} +11 -11
- package/{spaceSlice-HH633ZA4.js → spaceSlice-RG2GSV7K.js} +6 -5
- package/{streamAgentChatTurn-UBZOVFKV.js → streamAgentChatTurn-X576C23M.js} +131 -31
- package/{tools-OQZ34KCU.js → tools-HURZ2N4O.js} +11 -9
- package/{tuiSummaryLlmCaller-42AEL3LL.js → tuiSummaryLlmCaller-DG2LBTBX.js} +4 -4
- package/{updateDialogTitleAction-A3OOMSDO.js → updateDialogTitleAction-62LVIAUZ.js} +6 -5
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
deleteServerSyncedCredential,
|
|
17
17
|
runLlm
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Q7S2ORXX.js";
|
|
19
19
|
import {
|
|
20
20
|
cleanupCliSessionForDialog
|
|
21
21
|
} from "./chunk-LTH6AVG7.js";
|
|
@@ -64,12 +64,12 @@ import {
|
|
|
64
64
|
} from "./chunk-AZPCASRE.js";
|
|
65
65
|
import {
|
|
66
66
|
ALL_MODELS
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-IOQIOZNI.js";
|
|
68
68
|
import {
|
|
69
69
|
MODEL_LOOKUP_MAP,
|
|
70
70
|
findModelConfig,
|
|
71
71
|
getModelConfig
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-S3UTETIC.js";
|
|
73
73
|
import {
|
|
74
74
|
createFileCredentialBroker
|
|
75
75
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -12741,7 +12741,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
12741
12741
|
runtimeOptions: args.runtimeOptions
|
|
12742
12742
|
});
|
|
12743
12743
|
if (agentKeyToUse) {
|
|
12744
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
12744
|
+
const { streamAgentChatTurn } = await import("./agentSlice-JQCS4LR3.js");
|
|
12745
12745
|
await dispatch(
|
|
12746
12746
|
streamAgentChatTurn({
|
|
12747
12747
|
agentKey: agentKeyToUse,
|
|
@@ -15019,10 +15019,17 @@ var prepareTokenUsageData = ({
|
|
|
15019
15019
|
agentConfig,
|
|
15020
15020
|
userId,
|
|
15021
15021
|
username,
|
|
15022
|
+
agentId,
|
|
15022
15023
|
cybotId,
|
|
15023
15024
|
dialogId,
|
|
15024
15025
|
timestamp = Date.now()
|
|
15025
15026
|
}) => {
|
|
15027
|
+
const resolvedAgentId = typeof agentId === "string" && agentId.trim() || typeof cybotId === "string" && cybotId.trim() || "";
|
|
15028
|
+
if (!resolvedAgentId) {
|
|
15029
|
+
throw new Error(
|
|
15030
|
+
"prepareTokenUsageData requires a non-empty agentId or cybotId"
|
|
15031
|
+
);
|
|
15032
|
+
}
|
|
15026
15033
|
const usage = normalizeUsage(rawUsage);
|
|
15027
15034
|
const billingTarget = resolveBillingTarget({
|
|
15028
15035
|
usage,
|
|
@@ -15064,7 +15071,8 @@ var prepareTokenUsageData = ({
|
|
|
15064
15071
|
...usage,
|
|
15065
15072
|
userId,
|
|
15066
15073
|
username,
|
|
15067
|
-
|
|
15074
|
+
agentId: resolvedAgentId,
|
|
15075
|
+
cybotId: resolvedAgentId,
|
|
15068
15076
|
model: billedModel,
|
|
15069
15077
|
provider: recordProvider,
|
|
15070
15078
|
billing_service_tier: billedServiceTier,
|
|
@@ -15238,7 +15246,7 @@ var updateTokensAction = async ({ dialogId, dialogKey, usage: usageRaw, agentCon
|
|
|
15238
15246
|
agentConfig,
|
|
15239
15247
|
userId: ownerUserId,
|
|
15240
15248
|
username: currentUser?.username,
|
|
15241
|
-
|
|
15249
|
+
agentId: agentConfig.id,
|
|
15242
15250
|
dialogId,
|
|
15243
15251
|
timestamp
|
|
15244
15252
|
});
|
|
@@ -15437,7 +15445,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
15437
15445
|
}
|
|
15438
15446
|
if (isCurrentDialog) {
|
|
15439
15447
|
await thunkApi.dispatch(resetMsgs());
|
|
15440
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
15448
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-GGV7PF53.js");
|
|
15441
15449
|
dispatch(clearPendingAttachments2());
|
|
15442
15450
|
clearWorkflow();
|
|
15443
15451
|
}
|
|
@@ -15446,15 +15454,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
15446
15454
|
|
|
15447
15455
|
// packages/chat/dialog/dialogSlice.ts
|
|
15448
15456
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
15449
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
15457
|
+
const { createDialogAction } = await import("./createDialogAction-KLW42ZGF.js");
|
|
15450
15458
|
return createDialogAction(args, thunkApi);
|
|
15451
15459
|
};
|
|
15452
15460
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
15453
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
15461
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-GXZNLJZK.js");
|
|
15454
15462
|
return createAgentAutomationAction(args, thunkApi);
|
|
15455
15463
|
};
|
|
15456
15464
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
15457
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
15465
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-62LVIAUZ.js");
|
|
15458
15466
|
return updateDialogTitleAction(args, thunkApi);
|
|
15459
15467
|
};
|
|
15460
15468
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -15474,7 +15482,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
15474
15482
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
15475
15483
|
};
|
|
15476
15484
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
15477
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
15485
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-MMATC5V5.js");
|
|
15478
15486
|
return handleSendMessageAction(args, thunkApi);
|
|
15479
15487
|
};
|
|
15480
15488
|
function clearDialogState() {
|
|
@@ -15487,7 +15495,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
15487
15495
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
15488
15496
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
15489
15497
|
try {
|
|
15490
|
-
const { createDocState } = await import("./docStore-
|
|
15498
|
+
const { createDocState } = await import("./docStore-VDWTATFH.js");
|
|
15491
15499
|
const pageKey = await createDocState(
|
|
15492
15500
|
{ slateData, title },
|
|
15493
15501
|
{ dispatch, getState }
|
|
@@ -22365,6 +22373,7 @@ export {
|
|
|
22365
22373
|
selectViewMode,
|
|
22366
22374
|
spaceSlice_default,
|
|
22367
22375
|
selectCurrentUserBalance,
|
|
22376
|
+
API_REPORTED_COST_MULTIPLIER,
|
|
22368
22377
|
shouldUseServerProxy,
|
|
22369
22378
|
updateTokensAction,
|
|
22370
22379
|
clearDialogState,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getModelAbility
|
|
3
|
+
} from "./chunk-Z3NEXVYE.js";
|
|
1
4
|
import {
|
|
2
5
|
cloudflareModels,
|
|
3
6
|
deepSeekModels,
|
|
@@ -10,7 +13,7 @@ import {
|
|
|
10
13
|
platformHostedModels,
|
|
11
14
|
xaiModels,
|
|
12
15
|
zaiModels
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-524BDL33.js";
|
|
14
17
|
|
|
15
18
|
// packages/ai/llm/ollamaCloud.ts
|
|
16
19
|
var ollamaCloudModels = platformHostedModels;
|
|
@@ -29,7 +32,10 @@ var ALL_MODELS = [
|
|
|
29
32
|
...withProvider("cloudflare")(cloudflareModels),
|
|
30
33
|
...withProvider("gmi")(gmiModels),
|
|
31
34
|
...withProvider("zai")(zaiModels)
|
|
32
|
-
]
|
|
35
|
+
].map((model) => {
|
|
36
|
+
const ability = getModelAbility(model.name);
|
|
37
|
+
return ability ? { ...model, ability } : model;
|
|
38
|
+
});
|
|
33
39
|
|
|
34
40
|
export {
|
|
35
41
|
ALL_MODELS
|
|
@@ -3,6 +3,10 @@ import {
|
|
|
3
3
|
normalizeNonNegativeMs,
|
|
4
4
|
parseRetryAfterHeaderMs
|
|
5
5
|
} from "./chunk-GAKEBQD6.js";
|
|
6
|
+
import {
|
|
7
|
+
sortSafeAgentSummaries,
|
|
8
|
+
toSafeAgentSummary
|
|
9
|
+
} from "./chunk-6QFNUK2G.js";
|
|
6
10
|
import {
|
|
7
11
|
getUserDataItemTimestamp,
|
|
8
12
|
mergeAndDedupUserData
|
|
@@ -28,10 +32,10 @@ import {
|
|
|
28
32
|
} from "./chunk-VF4K2QE6.js";
|
|
29
33
|
import {
|
|
30
34
|
createDocState
|
|
31
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-LE6JAIXE.js";
|
|
32
36
|
import {
|
|
33
37
|
createDialogAction
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-BT57QC5K.js";
|
|
35
39
|
import {
|
|
36
40
|
buildSkillDocMarkdown,
|
|
37
41
|
normalizeSkillBudgetTier,
|
|
@@ -71,13 +75,13 @@ import {
|
|
|
71
75
|
updateContentCategory,
|
|
72
76
|
updateContentTitle,
|
|
73
77
|
updateStep
|
|
74
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-GROGNZOA.js";
|
|
75
79
|
import {
|
|
76
80
|
createAgent,
|
|
77
81
|
runLlm,
|
|
78
82
|
streamAgentChatTurn,
|
|
79
83
|
updateAgent
|
|
80
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-Q7S2ORXX.js";
|
|
81
85
|
import {
|
|
82
86
|
shareResourceAction
|
|
83
87
|
} from "./chunk-RQPZX6KP.js";
|
|
@@ -118,10 +122,10 @@ import {
|
|
|
118
122
|
redactAgentRecordForWorkspaceTool,
|
|
119
123
|
resolveNoloDialogInput,
|
|
120
124
|
verifyNoloDialogSubjectRefQuery
|
|
121
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-FZ2G3I4B.js";
|
|
122
126
|
import {
|
|
123
127
|
DEFAULT_MODEL
|
|
124
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-S3UTETIC.js";
|
|
125
129
|
import {
|
|
126
130
|
asRecordOrEmpty
|
|
127
131
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -11012,7 +11016,7 @@ var CAPABILITY_PACKS = [
|
|
|
11012
11016
|
{
|
|
11013
11017
|
id: "agent-orchestration",
|
|
11014
11018
|
label: "\u591A agent \u7F16\u6392",
|
|
11015
|
-
description: "\u5217\u51FA\u5019\u9009
|
|
11019
|
+
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",
|
|
11016
11020
|
tools: ["startAgentRun", "controlAgentRun", "listAgents"],
|
|
11017
11021
|
defaultEnabled: true,
|
|
11018
11022
|
icon: "\u{1F9E9}"
|
|
@@ -11083,7 +11087,7 @@ var HOSTED_EXEC_RUNTIME_TOOL_POLICY = {
|
|
|
11083
11087
|
workspace: { mode: "lease" }
|
|
11084
11088
|
};
|
|
11085
11089
|
var findModelConfig = async (modelName, provider) => {
|
|
11086
|
-
const { ALL_MODELS } = await import("./models-
|
|
11090
|
+
const { ALL_MODELS } = await import("./models-H524GH3U.js");
|
|
11087
11091
|
const name = toTrimmedString(modelName);
|
|
11088
11092
|
const prov = toTrimmedString(provider ?? "");
|
|
11089
11093
|
if (!name) return null;
|
|
@@ -11324,7 +11328,7 @@ var buildFormDataFromArgs = async (args) => {
|
|
|
11324
11328
|
const trimmedModel = toTrimmedString(model);
|
|
11325
11329
|
const trimmedProvider = toTrimmedString(provider);
|
|
11326
11330
|
const modelConfig = await findModelConfig(trimmedModel, trimmedProvider);
|
|
11327
|
-
const { getModelPricing } = await import("./getPricing-
|
|
11331
|
+
const { getModelPricing } = await import("./getPricing-6TOZXPAU.js");
|
|
11328
11332
|
const normalizedTools = tools ?? [];
|
|
11329
11333
|
const resolvedRuntimeToolPolicy = runtimeToolPolicy ?? (normalizedTools.includes("execShell") ? HOSTED_EXEC_RUNTIME_TOOL_POLICY : void 0);
|
|
11330
11334
|
const formData = {
|
|
@@ -13754,7 +13758,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
13754
13758
|
const deletedDialogIds = [];
|
|
13755
13759
|
const deletedDialogKeys = [];
|
|
13756
13760
|
const failures = [];
|
|
13757
|
-
const { deleteDialog } = await import("./dialogSlice-
|
|
13761
|
+
const { deleteDialog } = await import("./dialogSlice-GGV7PF53.js");
|
|
13758
13762
|
for (const target of targets) {
|
|
13759
13763
|
try {
|
|
13760
13764
|
await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
|
|
@@ -13779,9 +13783,44 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
13779
13783
|
displayData: deletedDialogIds.length > 0 ? `\u5DF2\u5220\u9664 ${deletedDialogIds.length} \u4E2A\u5BF9\u8BDD\uFF1A${deletedDialogIds.join(", ")}\u3002` : "\u6CA1\u6709\u5220\u9664\u4EFB\u4F55\u5BF9\u8BDD\u3002"
|
|
13780
13784
|
};
|
|
13781
13785
|
}
|
|
13786
|
+
async function fetchUserFavoriteAgentMap(thunkApi) {
|
|
13787
|
+
const runtime = getRuntime2(thunkApi);
|
|
13788
|
+
if (!runtime?.currentServer || !runtime?.currentToken) return {};
|
|
13789
|
+
try {
|
|
13790
|
+
const serverBase = normalizeServerOrigin(runtime.currentServer);
|
|
13791
|
+
if (!serverBase) return {};
|
|
13792
|
+
const response = await fetch(`${serverBase}/rpc/listFavorites`, {
|
|
13793
|
+
method: "POST",
|
|
13794
|
+
headers: {
|
|
13795
|
+
"Content-Type": "application/json",
|
|
13796
|
+
...authHeaders2(runtime.currentToken)
|
|
13797
|
+
},
|
|
13798
|
+
body: JSON.stringify({ targetType: "agent" })
|
|
13799
|
+
}).catch(() => null);
|
|
13800
|
+
if (!response || !response.ok) return {};
|
|
13801
|
+
const data = await response.json().catch(() => ({}));
|
|
13802
|
+
const favoritedAtByKey = {};
|
|
13803
|
+
const items = Array.isArray(data?.items) ? data.items : [];
|
|
13804
|
+
for (const item of items) {
|
|
13805
|
+
const id = typeof item?.id === "string" ? item.id : "";
|
|
13806
|
+
if (!id) continue;
|
|
13807
|
+
const at = Number(item?.favoritedAt) || 0;
|
|
13808
|
+
favoritedAtByKey[id] = Math.max(favoritedAtByKey[id] ?? 0, at || Date.now());
|
|
13809
|
+
}
|
|
13810
|
+
const ids = Array.isArray(data?.ids) ? data.ids : [];
|
|
13811
|
+
for (const id of ids) {
|
|
13812
|
+
if (typeof id === "string" && id && !(id in favoritedAtByKey)) {
|
|
13813
|
+
favoritedAtByKey[id] = 1;
|
|
13814
|
+
}
|
|
13815
|
+
}
|
|
13816
|
+
return favoritedAtByKey;
|
|
13817
|
+
} catch {
|
|
13818
|
+
return {};
|
|
13819
|
+
}
|
|
13820
|
+
}
|
|
13782
13821
|
var listAgentsFunctionSchema = {
|
|
13783
13822
|
name: "listAgents",
|
|
13784
|
-
description: "List the current user's Nolo agents.",
|
|
13823
|
+
description: "List the current user's Nolo agents as safe summaries. Use readAgent with the selected id/publicKey to resolve the runnable agentKey before delegation.",
|
|
13785
13824
|
parameters: {
|
|
13786
13825
|
type: "object",
|
|
13787
13826
|
properties: {
|
|
@@ -13792,20 +13831,34 @@ var listAgentsFunctionSchema = {
|
|
|
13792
13831
|
};
|
|
13793
13832
|
async function listAgentsFunc(args, thunkApi) {
|
|
13794
13833
|
const limit = clampNoloPositiveInteger(args?.limit, 100, 500);
|
|
13795
|
-
const
|
|
13796
|
-
const
|
|
13797
|
-
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13834
|
+
const userRecords = await queryBestRecords(thunkApi, "agent" /* AGENT */, limit);
|
|
13835
|
+
const favoritesMap = await fetchUserFavoriteAgentMap(thunkApi);
|
|
13836
|
+
const recordsMap = /* @__PURE__ */ new Map();
|
|
13837
|
+
for (const record of userRecords) {
|
|
13838
|
+
const key = record?.dbKey || record?.id || record?.publicKey;
|
|
13839
|
+
if (key) recordsMap.set(key, record);
|
|
13840
|
+
}
|
|
13841
|
+
for (const favKey of Object.keys(favoritesMap)) {
|
|
13842
|
+
const isAlreadyPresent = Array.from(recordsMap.values()).some(
|
|
13843
|
+
(record) => record?.dbKey === favKey || record?.id === favKey || record?.publicKey === favKey || `agent-pub-${record?.id}` === favKey
|
|
13844
|
+
);
|
|
13845
|
+
if (!isAlreadyPresent) {
|
|
13846
|
+
const favRecord = await readBestRecord(thunkApi, favKey).catch(() => null);
|
|
13847
|
+
if (favRecord) {
|
|
13848
|
+
const key = favRecord?.dbKey || favRecord?.id || favKey;
|
|
13849
|
+
recordsMap.set(key, favRecord);
|
|
13850
|
+
}
|
|
13851
|
+
}
|
|
13852
|
+
}
|
|
13853
|
+
const runtime = getRuntime2(thunkApi);
|
|
13854
|
+
const userId = runtime?.currentUserId ?? void 0;
|
|
13855
|
+
let agents = Array.from(recordsMap.values()).map(
|
|
13856
|
+
(record) => toSafeAgentSummary(record, { favoritesMap, userId })
|
|
13857
|
+
);
|
|
13858
|
+
if (args?.publicOnly === true) {
|
|
13859
|
+
agents = agents.filter((agent) => agent.isPublic);
|
|
13860
|
+
}
|
|
13861
|
+
agents = sortSafeAgentSummaries(agents);
|
|
13809
13862
|
return {
|
|
13810
13863
|
rawData: { success: true, total: agents.length, agents },
|
|
13811
13864
|
displayData: jsonPreview({ total: agents.length, agents })
|
|
@@ -21327,7 +21380,7 @@ var startAgentRunFunctionSchema = {
|
|
|
21327
21380
|
properties: {
|
|
21328
21381
|
agentKey: {
|
|
21329
21382
|
type: "string",
|
|
21330
|
-
description: "\u8981\u542F\u52A8\u7684 Agent \u7684\
|
|
21383
|
+
description: "\u8981\u542F\u52A8\u7684 Agent \u7684\u53EF\u8FD0\u884C dbKey\uFF08\u4F18\u5148\u4F7F\u7528 readAgent \u8FD4\u56DE\u7684 agentKey\uFF0C\u683C\u5F0F\u5982 agent-xxx\uFF09\u3002"
|
|
21331
21384
|
},
|
|
21332
21385
|
task: {
|
|
21333
21386
|
type: "string",
|
|
@@ -22702,7 +22755,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
22702
22755
|
if (!executionInput) {
|
|
22703
22756
|
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
22704
22757
|
}
|
|
22705
|
-
const { findToolExecutor: findToolExecutor2 } = await import("./tools-
|
|
22758
|
+
const { findToolExecutor: findToolExecutor2 } = await import("./tools-HURZ2N4O.js");
|
|
22706
22759
|
const { executor } = findToolExecutor2(run.toolName);
|
|
22707
22760
|
toolRunStarted({
|
|
22708
22761
|
id: run.id,
|
|
@@ -22726,7 +22779,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
22726
22779
|
const latestState = thunkApi.getState();
|
|
22727
22780
|
const userId = latestState.auth?.currentUser?.userId;
|
|
22728
22781
|
if (userId) {
|
|
22729
|
-
const { fetchUserSpaceMemberships } = await import("./spaceSlice-
|
|
22782
|
+
const { fetchUserSpaceMemberships } = await import("./spaceSlice-RG2GSV7K.js");
|
|
22730
22783
|
await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
|
|
22731
22784
|
}
|
|
22732
22785
|
}
|
|
@@ -25129,7 +25182,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
25129
25182
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
25130
25183
|
};
|
|
25131
25184
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
25132
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
25185
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-VDWTATFH.js");
|
|
25133
25186
|
if (getDocState().pageKey === id) {
|
|
25134
25187
|
applyExternalDocUpdate({
|
|
25135
25188
|
slateData: finalSlateData,
|
|
@@ -26556,7 +26609,7 @@ var baseToolDefinitions = [
|
|
|
26556
26609
|
executor: listAgentsFunc,
|
|
26557
26610
|
description: {
|
|
26558
26611
|
name: "listAgents",
|
|
26559
|
-
description: "List the current user's Nolo agents.",
|
|
26612
|
+
description: "List the current user's Nolo agents as safe summaries; use readAgent to resolve the runnable agentKey before delegation.",
|
|
26560
26613
|
category: "Nolo workspace"
|
|
26561
26614
|
},
|
|
26562
26615
|
behavior: "data",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BKGNXJAM.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SBVUZC2E.js";
|
|
8
8
|
|
|
9
9
|
// packages/cli/agentListHelpers.ts
|
|
10
10
|
function parseAgentRecordId(privateKey, explicitId) {
|
|
@@ -34,6 +34,11 @@ function normalizeListedAgent(record) {
|
|
|
34
34
|
publicKey: keys.publicKey,
|
|
35
35
|
name: typeof record?.name === "string" && record.name ? record.name : "(unnamed)",
|
|
36
36
|
model: typeof record?.model === "string" && record.model ? record.model : "-",
|
|
37
|
+
...typeof record?.handle === "string" && record.handle ? { handle: record.handle } : {},
|
|
38
|
+
...typeof record?.introduction === "string" && record.introduction ? { introduction: record.introduction } : typeof record?.description === "string" && record.description ? { introduction: record.description } : {},
|
|
39
|
+
...typeof record?.provider === "string" && record.provider ? { provider: record.provider } : {},
|
|
40
|
+
...typeof record?.inputPrice === "number" && Number.isFinite(record.inputPrice) ? { inputPrice: record.inputPrice } : {},
|
|
41
|
+
...typeof record?.outputPrice === "number" && Number.isFinite(record.outputPrice) ? { outputPrice: record.outputPrice } : {},
|
|
37
42
|
updatedAt: typeof record?.updatedAt === "string" || typeof record?.updatedAt === "number" ? record.updatedAt : typeof record?.createdAt === "string" || typeof record?.createdAt === "number" ? record.createdAt : typeof record?.created === "string" || typeof record?.created === "number" ? record.created : null,
|
|
38
43
|
isPublicFlag: !!record?.isPublic,
|
|
39
44
|
publicRecordExists: false,
|
|
@@ -57,6 +62,7 @@ function sortListedAgents(agents) {
|
|
|
57
62
|
function parseAgentListArgs(args) {
|
|
58
63
|
return {
|
|
59
64
|
wantJson: args.includes("--json"),
|
|
65
|
+
wantSafe: args.includes("--safe"),
|
|
60
66
|
publicOnly: args.includes("--public-only"),
|
|
61
67
|
idsOnly: args.includes("--ids-only")
|
|
62
68
|
};
|
|
@@ -182,6 +188,7 @@ async function decorateAgentsWithPublicStatusAcrossServers(args) {
|
|
|
182
188
|
}
|
|
183
189
|
|
|
184
190
|
export {
|
|
191
|
+
normalizeListedAgent,
|
|
185
192
|
parseAgentListArgs,
|
|
186
193
|
listLocalCachedAgents,
|
|
187
194
|
listRemoteAgents,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GROGNZOA.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.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-IBJHE6MH.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BQECZ3Q4.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IPA2WQGY.js";
|
|
8
8
|
import {
|
|
9
9
|
readPipeText,
|
|
10
10
|
spawnProcess
|
|
11
11
|
} from "./chunk-IDZTNRP2.js";
|
|
12
12
|
import {
|
|
13
13
|
runLocalAgentTurn
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AISLHYDB.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveLocalRuntimeEnvFromPolicy
|
|
17
17
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-JEXVIMYZ.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareTools
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WVS3GX3B.js";
|
|
7
7
|
import {
|
|
8
8
|
performFetchRequest
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WTBWWBSF.js";
|
|
10
10
|
import {
|
|
11
11
|
getPublicImageAgentMode
|
|
12
12
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toolRunSetPending,
|
|
21
21
|
toolRunStarted,
|
|
22
22
|
toolRunSucceeded
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IPA2WQGY.js";
|
|
24
24
|
import {
|
|
25
25
|
addToolMessage,
|
|
26
26
|
getModelInfo,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
messageStreaming,
|
|
29
29
|
selectCurrentSpaceId,
|
|
30
30
|
updateToolMessage
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GROGNZOA.js";
|
|
32
32
|
import {
|
|
33
33
|
streamAgentChatTurn
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Q7S2ORXX.js";
|
|
35
35
|
import {
|
|
36
36
|
selectCurrentServer
|
|
37
37
|
} from "./chunk-UBSKX3LP.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./chunk-L3KWEH3V.js";
|
|
41
41
|
import {
|
|
42
42
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-AISLHYDB.js";
|
|
44
44
|
import {
|
|
45
45
|
createThinkParserState,
|
|
46
46
|
flushThinkParser,
|
|
@@ -48,10 +48,10 @@ import {
|
|
|
48
48
|
} from "./chunk-OPZYGHUC.js";
|
|
49
49
|
import {
|
|
50
50
|
getApiEndpoint
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-S3UTETIC.js";
|
|
52
52
|
import {
|
|
53
53
|
isNoloHostedProvider
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-524BDL33.js";
|
|
55
55
|
import {
|
|
56
56
|
createDialogMessageKeyAndId,
|
|
57
57
|
dialogMessageKey,
|
|
@@ -182,6 +182,10 @@ var toOpenAIMessage = (rawMsg) => {
|
|
|
182
182
|
if (role === "assistant" && toolCalls) {
|
|
183
183
|
cleaned.tool_calls = toolCalls;
|
|
184
184
|
}
|
|
185
|
+
if (role === "assistant") {
|
|
186
|
+
const reasoningContent = typeof msg.reasoning_content === "string" ? msg.reasoning_content : typeof msg.thinkContent === "string" ? msg.thinkContent : "";
|
|
187
|
+
if (reasoningContent) cleaned.reasoning_content = reasoningContent;
|
|
188
|
+
}
|
|
185
189
|
if (role === "tool") {
|
|
186
190
|
const toolCallId = extractToolCallId(msg);
|
|
187
191
|
if (toolCallId) cleaned.tool_call_id = toolCallId;
|
|
@@ -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-2ZAPHFOX.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-FGUYNGSA.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-X576C23M.js");
|
|
341
341
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
342
342
|
}),
|
|
343
343
|
/**
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
platformHostedModels,
|
|
16
16
|
xaiModels,
|
|
17
17
|
zaiModels
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-524BDL33.js";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./chunk-4VNS5WPM.js";
|
|
@@ -4774,7 +4774,8 @@ var API_ENDPOINTS = {
|
|
|
4774
4774
|
default: "https://api.x.ai/v1/chat/completions"
|
|
4775
4775
|
},
|
|
4776
4776
|
deepseek: {
|
|
4777
|
-
default: "https://api.deepseek.com/chat/completions"
|
|
4777
|
+
default: "https://api.deepseek.com/chat/completions",
|
|
4778
|
+
responses: "https://api.deepseek.com/v1/responses"
|
|
4778
4779
|
},
|
|
4779
4780
|
deepinfra: {
|
|
4780
4781
|
default: "https://api.deepinfra.com/v1/openai/chat/completions"
|