nolo-cli 0.137.0-alpha.3 → 0.138.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-FAUEUOEE.js → _executeModel-JWLH2Z7S.js} +12 -12
- package/{agentDeleteCommand-4E7DGI7Z.js → agentDeleteCommand-UZGJZS5J.js} +1 -1
- package/{agentEmailCommands-MNTMDVGD.js → agentEmailCommands-2SVG6LS3.js} +12 -12
- package/{agentListCommands-NCO7SZUI.js → agentListCommands-GADYFX2S.js} +20 -40
- package/{agentMachineCommands-YSMUWNHR.js → agentMachineCommands-JALXFO3Y.js} +2 -2
- package/{agentRecordCommands-YRBN4J7O.js → agentRecordCommands-INRNLAFR.js} +12 -12
- package/{agentRunCommand-KIWQECBR.js → agentRunCommand-TKHBLWSI.js} +12 -12
- package/{agentRuntimeLocal-2UMI5PL3.js → agentRuntimeLocal-F44W2XTL.js} +1 -1
- package/{agentSlice-OY737OPO.js → agentSlice-T53NW4SS.js} +1 -1
- package/{appDeleteCommands-4BGS74PW.js → appDeleteCommands-GEVEUPWJ.js} +1 -1
- package/{appDeployCommands-C6NSN4Y3.js → appDeployCommands-FMAHPMA2.js} +1 -1
- package/{appDeployStatusCommands-TND3XIFC.js → appDeployStatusCommands-7DRR4X7F.js} +1 -1
- package/{appGetCommands-P7GB3Z7U.js → appGetCommands-EOULTSHM.js} +1 -1
- package/{appListCommands-77O2W73I.js → appListCommands-ARJVCFDJ.js} +1 -1
- package/{chatQueueReduxAdapter-CEIN6JHL.js → chatQueueReduxAdapter-GSD7C24T.js} +2 -2
- package/{chunk-SRWKQ6L2.js → chunk-27YNIIBN.js} +2 -2
- package/{chunk-7IV566ED.js → chunk-2LFG5CGH.js} +1 -1
- package/{chunk-AKI7WDNU.js → chunk-3SPFKUP5.js} +1 -1
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-RCGP7CLM.js → chunk-DXXCZYEZ.js} +24 -11
- package/{chunk-EXTMSQ5W.js → chunk-FSEVS4U3.js} +8 -8
- package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
- package/{chunk-FKBKTMSP.js → chunk-J2RGIFX5.js} +2 -2
- package/{chunk-OWZ3OCOX.js → chunk-KQW2EHWB.js} +15 -18
- package/{chunk-A46O6NMX.js → chunk-MLXQO7X4.js} +2 -2
- package/{chunk-XUSEIVLY.js → chunk-PA2BRUNR.js} +3 -3
- package/{chunk-GR5TKGRV.js → chunk-Q6SLVXWU.js} +2 -11
- package/{chunk-PMA4GQIV.js → chunk-TNYKI3LI.js} +10 -10
- package/{chunk-WKKT2STS.js → chunk-TTMVLXU5.js} +3 -3
- package/{chunk-5C3I5OTA.js → chunk-VIOF5352.js} +5 -5
- package/{chunk-LKG4Y7E3.js → chunk-YSC3EI23.js} +28 -9
- package/{chunk-XSXDLETE.js → chunk-ZTQANKS2.js} +2 -2
- package/{chunk-OYFXTYWX.js → chunk-ZWJ6WQBO.js} +1 -1
- package/{commandRegistry-G3U3GKJ3.js → commandRegistry-DMS5KFOK.js} +41 -41
- package/{contentThunks-Y7KG57RZ.js → contentThunks-SDVFY3MX.js} +3 -3
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-A636CARP.js → createAgentAutomationAction-CD6QYRC2.js} +3 -3
- package/{createDialogAction-GMODUQQE.js → createDialogAction-MB6BOVJJ.js} +4 -4
- package/{createPageAction-QDCQYTX5.js → createPageAction-Y2A5MARX.js} +3 -3
- package/{dialogCommands-XQDWYC7D.js → dialogCommands-G7ZTYMIA.js} +1 -1
- package/{dialogSlice-ZDG37LPE.js → dialogSlice-5C3POHWD.js} +2 -2
- package/{docCreateCommands-3RQMKRNC.js → docCreateCommands-AEZC5UXB.js} +1 -1
- package/{docDeleteCommands-STAMAXMK.js → docDeleteCommands-DXXYWOXH.js} +1 -1
- package/{docReadCommands-DHKSEP6Z.js → docReadCommands-G6PL2543.js} +1 -1
- package/{docStore-KJ5U4Q5K.js → docStore-ZX7AIY5W.js} +1 -1
- package/{docUpdateCommands-W4DMDSB4.js → docUpdateCommands-TWKJOXYT.js} +1 -1
- package/{handleSendMessageAction-SUP54UPU.js → handleSendMessageAction-2AF42N6F.js} +2 -2
- package/index.js +2 -2
- package/{machineCommands-WWV2QUCS.js → machineCommands-ZY5BB4O3.js} +12 -12
- package/{machineWsRunDispatch-VTL2YRHD.js → machineWsRunDispatch-5XE37H4C.js} +12 -12
- package/package.json +1 -1
- package/{readlineWorkspace-IZDJM7B7.js → readlineWorkspace-HDAVBAL5.js} +13 -13
- package/{runAgentClientLoop-DBGSPPHG.js → runAgentClientLoop-TVA5UASR.js} +10 -10
- package/{spaceCommands-IKNIWIFL.js → spaceCommands-G2UBKO4F.js} +1 -1
- package/{streamAgentChatTurn-YHLBPG56.js → streamAgentChatTurn-B6H35UWR.js} +11 -11
- package/{tools-BL42UFY4.js → tools-EEAEICHM.js} +8 -8
- package/{updateDialogTitleAction-UME6NDUD.js → updateDialogTitleAction-UPPVYQ7R.js} +3 -3
|
@@ -28,13 +28,12 @@ import {
|
|
|
28
28
|
t,
|
|
29
29
|
toolLabel,
|
|
30
30
|
toolLabelVariants
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TNYKI3LI.js";
|
|
32
32
|
import {
|
|
33
33
|
clearCredentialAvailability,
|
|
34
34
|
readCredentialEntry,
|
|
35
|
-
recordCredentialProbe
|
|
36
|
-
|
|
37
|
-
} from "./chunk-42V6BK2E.js";
|
|
35
|
+
recordCredentialProbe
|
|
36
|
+
} from "./chunk-62IL3KQV.js";
|
|
38
37
|
import {
|
|
39
38
|
getReadableCliDb
|
|
40
39
|
} from "./chunk-CTUQJVQM.js";
|
|
@@ -76,7 +75,7 @@ import {
|
|
|
76
75
|
} from "./chunk-LTRXGFMS.js";
|
|
77
76
|
import {
|
|
78
77
|
formatAgentListCard
|
|
79
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-KQW2EHWB.js";
|
|
80
79
|
import {
|
|
81
80
|
isGatewayHttpStatus
|
|
82
81
|
} from "./chunk-NF64D32W.js";
|
|
@@ -97,11 +96,11 @@ import {
|
|
|
97
96
|
chooseMemoryOwners,
|
|
98
97
|
loadMemoryCandidatesFromDb,
|
|
99
98
|
resolveAgentMemoryPolicy
|
|
100
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-27YNIIBN.js";
|
|
101
100
|
import {
|
|
102
101
|
API_REPORTED_COST_MULTIPLIER,
|
|
103
102
|
parseUiAskChoiceContent
|
|
104
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-FSEVS4U3.js";
|
|
105
104
|
import {
|
|
106
105
|
isOAuthApiKeyRef
|
|
107
106
|
} from "./chunk-YYLHWIW6.js";
|
|
@@ -130,8 +129,9 @@ import {
|
|
|
130
129
|
isQuotaExhaustedError,
|
|
131
130
|
isQuotaLimited403Body,
|
|
132
131
|
mergeAvailabilityDeadline,
|
|
133
|
-
resolveCooldownGate
|
|
134
|
-
|
|
132
|
+
resolveCooldownGate,
|
|
133
|
+
resolveCredentialKeyWithFallback
|
|
134
|
+
} from "./chunk-H6A6X4EK.js";
|
|
135
135
|
import {
|
|
136
136
|
isAntigravityOAuthAgent
|
|
137
137
|
} from "./chunk-QVG3PWRZ.js";
|
|
@@ -10077,6 +10077,14 @@ function createCliTurnOutput(params) {
|
|
|
10077
10077
|
const eventMode = resolveAgentEventMode(options);
|
|
10078
10078
|
const assistantLabelManaged = options.output.assistantLabelManaged === true;
|
|
10079
10079
|
const showThinking = !assistantLabelManaged && options.showThinking !== false;
|
|
10080
|
+
const hidesRoutineTuiToolDetail = (event) => {
|
|
10081
|
+
if (!assistantLabelManaged || event.toolName !== "editFile") return false;
|
|
10082
|
+
if (event.type === "tool-error") return false;
|
|
10083
|
+
if (readActionGate(event.metadata?.actionGate)) return false;
|
|
10084
|
+
if (event.metadata?.timedOut || event.metadata?.failed || event.metadata?.error) return false;
|
|
10085
|
+
if (typeof event.metadata?.exitCode === "number" && event.metadata.exitCode !== 0) return false;
|
|
10086
|
+
return true;
|
|
10087
|
+
};
|
|
10080
10088
|
let streamedAssistantText = false;
|
|
10081
10089
|
let everStreamedAnyText = false;
|
|
10082
10090
|
let printedAssistantLabel = false;
|
|
@@ -10208,7 +10216,9 @@ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}`);
|
|
|
10208
10216
|
dropPendingTuiProgress();
|
|
10209
10217
|
}
|
|
10210
10218
|
renderWriter.flush();
|
|
10211
|
-
|
|
10219
|
+
if (!hidesRoutineTuiToolDetail(event)) {
|
|
10220
|
+
formatToolEvent(event);
|
|
10221
|
+
}
|
|
10212
10222
|
endThinkingPhase();
|
|
10213
10223
|
if (streamedAssistantText) {
|
|
10214
10224
|
options.output.write("\n");
|
|
@@ -10226,6 +10236,9 @@ ${options.agentName}${IDENTITY_LABEL_SEPARATOR}`);
|
|
|
10226
10236
|
}
|
|
10227
10237
|
spinner.stop();
|
|
10228
10238
|
options.activityReporter?.(null);
|
|
10239
|
+
if (hidesRoutineTuiToolDetail(event)) {
|
|
10240
|
+
return;
|
|
10241
|
+
}
|
|
10229
10242
|
if (isLiveAgentRunObservation(event, parsedRunEvent)) {
|
|
10230
10243
|
formatToolEvent.consume?.(event);
|
|
10231
10244
|
return;
|
|
@@ -10726,7 +10739,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
10726
10739
|
// packages/cli/client/agentRun.ts
|
|
10727
10740
|
import { ulid as ulid2 } from "ulid";
|
|
10728
10741
|
async function loadRunLocalAgentTurn() {
|
|
10729
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
10742
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-F44W2XTL.js");
|
|
10730
10743
|
return runLocalAgentTurn;
|
|
10731
10744
|
}
|
|
10732
10745
|
var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-6O4IK4V2.js";
|
|
12
12
|
import {
|
|
13
13
|
runLlm
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PA2BRUNR.js";
|
|
15
15
|
import {
|
|
16
16
|
cleanupCliSessionForDialog
|
|
17
17
|
} from "./chunk-D76D3RTR.js";
|
|
@@ -23930,7 +23930,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
23930
23930
|
runtimeOptions: args.runtimeOptions
|
|
23931
23931
|
});
|
|
23932
23932
|
if (agentKeyToUse) {
|
|
23933
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
23933
|
+
const { streamAgentChatTurn } = await import("./agentSlice-T53NW4SS.js");
|
|
23934
23934
|
await dispatch(
|
|
23935
23935
|
streamAgentChatTurn({
|
|
23936
23936
|
agentKey: agentKeyToUse,
|
|
@@ -25066,7 +25066,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
25066
25066
|
}
|
|
25067
25067
|
if (isCurrentDialog) {
|
|
25068
25068
|
await thunkApi.dispatch(resetMsgs());
|
|
25069
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
25069
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-5C3POHWD.js");
|
|
25070
25070
|
dispatch(clearPendingAttachments2());
|
|
25071
25071
|
}
|
|
25072
25072
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -25074,15 +25074,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
25074
25074
|
|
|
25075
25075
|
// packages/chat/dialog/dialogSlice.ts
|
|
25076
25076
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
25077
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
25077
|
+
const { createDialogAction } = await import("./createDialogAction-MB6BOVJJ.js");
|
|
25078
25078
|
return createDialogAction(args, thunkApi);
|
|
25079
25079
|
};
|
|
25080
25080
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
25081
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
25081
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-CD6QYRC2.js");
|
|
25082
25082
|
return createAgentAutomationAction(args, thunkApi);
|
|
25083
25083
|
};
|
|
25084
25084
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
25085
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
25085
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-UPPVYQ7R.js");
|
|
25086
25086
|
return updateDialogTitleAction(args, thunkApi);
|
|
25087
25087
|
};
|
|
25088
25088
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -25106,7 +25106,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
25106
25106
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
25107
25107
|
};
|
|
25108
25108
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
25109
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
25109
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-2AF42N6F.js");
|
|
25110
25110
|
return handleSendMessageAction(args, thunkApi);
|
|
25111
25111
|
};
|
|
25112
25112
|
function clearDialogState() {
|
|
@@ -25119,7 +25119,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
25119
25119
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
25120
25120
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
25121
25121
|
try {
|
|
25122
|
-
const { createDocState } = await import("./docStore-
|
|
25122
|
+
const { createDocState } = await import("./docStore-ZX7AIY5W.js");
|
|
25123
25123
|
const pageKey = await createDocState(
|
|
25124
25124
|
{ slateData, title },
|
|
25125
25125
|
{ dispatch, getState }
|
|
@@ -180,6 +180,36 @@ function resolveCooldownGate(input, now) {
|
|
|
180
180
|
}
|
|
181
181
|
return now - lastProbeAt >= PROBE_INTERVAL_MS ? "probe" : "blocked";
|
|
182
182
|
}
|
|
183
|
+
function resolveCredentialKey(agent) {
|
|
184
|
+
if (!agent || typeof agent !== "object") return void 0;
|
|
185
|
+
for (const field of ["apiKeyRef", "credentialRef"]) {
|
|
186
|
+
const value = agent[field];
|
|
187
|
+
if (typeof value === "string") {
|
|
188
|
+
const trimmed = value.trim();
|
|
189
|
+
if (trimmed) return trimmed;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return void 0;
|
|
193
|
+
}
|
|
194
|
+
function resolveCredentialKeyWithFallback(agent) {
|
|
195
|
+
const byRef = resolveCredentialKey(agent);
|
|
196
|
+
if (byRef) return byRef;
|
|
197
|
+
if (!agent || typeof agent !== "object") return void 0;
|
|
198
|
+
const endpoint = agent.customProviderUrl;
|
|
199
|
+
if (typeof endpoint === "string") {
|
|
200
|
+
const trimmed = endpoint.trim();
|
|
201
|
+
if (trimmed) {
|
|
202
|
+
try {
|
|
203
|
+
const origin = new URL(trimmed).origin;
|
|
204
|
+
if (origin && origin !== "null") return `custom-endpoint:${origin}`;
|
|
205
|
+
} catch {
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const key = agent.key;
|
|
210
|
+
if (typeof key === "string" && key.trim()) return `custom-agent:${key.trim()}`;
|
|
211
|
+
return void 0;
|
|
212
|
+
}
|
|
183
213
|
|
|
184
214
|
export {
|
|
185
215
|
QUOTA_ERROR_PATTERNS,
|
|
@@ -188,5 +218,6 @@ export {
|
|
|
188
218
|
isQuotaLimited403Body,
|
|
189
219
|
resolveAvailabilityAction,
|
|
190
220
|
mergeAvailabilityDeadline,
|
|
191
|
-
resolveCooldownGate
|
|
221
|
+
resolveCooldownGate,
|
|
222
|
+
resolveCredentialKeyWithFallback
|
|
192
223
|
};
|
|
@@ -2,10 +2,9 @@ import {
|
|
|
2
2
|
isGatewayHttpStatus
|
|
3
3
|
} from "./chunk-NF64D32W.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
resolveDiscoveryScope
|
|
7
|
-
|
|
8
|
-
} from "./chunk-LKG4Y7E3.js";
|
|
5
|
+
assembleAgentDiscoveryResult,
|
|
6
|
+
resolveDiscoveryScope
|
|
7
|
+
} from "./chunk-YSC3EI23.js";
|
|
9
8
|
import {
|
|
10
9
|
fetchWithTransientRetry
|
|
11
10
|
} from "./chunk-5UTFL4QJ.js";
|
|
@@ -36,7 +35,7 @@ import {
|
|
|
36
35
|
} from "./chunk-3VNWWVKB.js";
|
|
37
36
|
import {
|
|
38
37
|
createDialogAction
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-27YNIIBN.js";
|
|
40
39
|
import {
|
|
41
40
|
addMemberSpace,
|
|
42
41
|
fetchAuthoritativeRemoteSpace,
|
|
@@ -60,7 +59,7 @@ import {
|
|
|
60
59
|
} from "./chunk-VF4K2QE6.js";
|
|
61
60
|
import {
|
|
62
61
|
createDocState
|
|
63
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZTQANKS2.js";
|
|
64
63
|
import {
|
|
65
64
|
setDialogExtraReferencesAction
|
|
66
65
|
} from "./chunk-Z7IZQF56.js";
|
|
@@ -99,7 +98,7 @@ import {
|
|
|
99
98
|
updateContentCategory,
|
|
100
99
|
updateContentTitle,
|
|
101
100
|
writeStoredCollapsedCategories
|
|
102
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-ZWJ6WQBO.js";
|
|
103
102
|
import {
|
|
104
103
|
getCurrentSpaceId,
|
|
105
104
|
getCurrentSpaceIdRaw,
|
|
@@ -121,14 +120,14 @@ import {
|
|
|
121
120
|
selectMsgById,
|
|
122
121
|
uiAskChoiceFunc,
|
|
123
122
|
uiAskChoiceFunctionSchema
|
|
124
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-FSEVS4U3.js";
|
|
125
124
|
import {
|
|
126
125
|
createAgent,
|
|
127
126
|
deleteServerSyncedCredential,
|
|
128
127
|
runLlm,
|
|
129
128
|
streamAgentChatTurn,
|
|
130
129
|
updateAgent
|
|
131
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-PA2BRUNR.js";
|
|
132
131
|
import {
|
|
133
132
|
getActiveDialogKey,
|
|
134
133
|
selectCurrentDialogKey,
|
|
@@ -3976,7 +3975,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
3976
3975
|
const deletedDialogIds = [];
|
|
3977
3976
|
const deletedDialogKeys = [];
|
|
3978
3977
|
const failures = [];
|
|
3979
|
-
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-
|
|
3978
|
+
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-5C3POHWD.js");
|
|
3980
3979
|
for (const target of targets) {
|
|
3981
3980
|
try {
|
|
3982
3981
|
await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
|
|
@@ -4118,15 +4117,13 @@ async function listAgentsFunc(args, thunkApi) {
|
|
|
4118
4117
|
}
|
|
4119
4118
|
}
|
|
4120
4119
|
const userId = runtime?.currentUserId ?? void 0;
|
|
4121
|
-
const
|
|
4122
|
-
(
|
|
4120
|
+
const discovery = assembleAgentDiscoveryResult({
|
|
4121
|
+
records: [...Array.from(recordsMap.values()), ...publicRecords],
|
|
4122
|
+
summaryOptions: (record) => ({
|
|
4123
4123
|
favoritesMap,
|
|
4124
4124
|
userId,
|
|
4125
4125
|
publicRecordExists: publicRecords.includes(record) ? true : void 0
|
|
4126
|
-
})
|
|
4127
|
-
);
|
|
4128
|
-
const discovery = buildAgentDiscoveryResult({
|
|
4129
|
-
agents,
|
|
4126
|
+
}),
|
|
4130
4127
|
scope: args?.scope,
|
|
4131
4128
|
query: args?.query,
|
|
4132
4129
|
publicOnly: args?.publicOnly,
|
|
@@ -15096,7 +15093,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
15096
15093
|
if (!executionInput) {
|
|
15097
15094
|
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
15098
15095
|
}
|
|
15099
|
-
const { findToolExecutor: findToolExecutor2 } = await import("./tools-
|
|
15096
|
+
const { findToolExecutor: findToolExecutor2 } = await import("./tools-EEAEICHM.js");
|
|
15100
15097
|
const { executor } = findToolExecutor2(run.toolName);
|
|
15101
15098
|
toolRunStarted({
|
|
15102
15099
|
id: run.id,
|
|
@@ -17603,7 +17600,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
17603
17600
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
17604
17601
|
};
|
|
17605
17602
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
17606
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
17603
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-ZX7AIY5W.js");
|
|
17607
17604
|
if (getDocState().pageKey === id) {
|
|
17608
17605
|
applyExternalDocUpdate({
|
|
17609
17606
|
slateData: finalSlateData,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TNYKI3LI.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KQW2EHWB.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
10
|
} from "./chunk-IEEGKL6X.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-JWLH2Z7S.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-TVA5UASR.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-B6H35UWR.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -6,9 +6,8 @@ import {
|
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
7
|
} from "./chunk-PZVXRJOS.js";
|
|
8
8
|
import {
|
|
9
|
-
deriveCredentialGroup
|
|
10
|
-
|
|
11
|
-
} from "./chunk-LKG4Y7E3.js";
|
|
9
|
+
deriveCredentialGroup
|
|
10
|
+
} from "./chunk-YSC3EI23.js";
|
|
12
11
|
import {
|
|
13
12
|
PUBLIC_AGENT_KEY_PREFIX,
|
|
14
13
|
isOwnedAgentKey,
|
|
@@ -71,13 +70,6 @@ function normalizeListedAgent(record) {
|
|
|
71
70
|
...record?.quota && typeof record.quota === "object" && Array.isArray(record.quota.windows) ? { quota: record.quota } : {}
|
|
72
71
|
};
|
|
73
72
|
}
|
|
74
|
-
function toSafeListedAgentSummary(agent, options) {
|
|
75
|
-
const summary = toSafeAgentSummary(agent, options);
|
|
76
|
-
if (agent.publicRecordExists === false) {
|
|
77
|
-
delete summary.publicKey;
|
|
78
|
-
}
|
|
79
|
-
return summary;
|
|
80
|
-
}
|
|
81
73
|
function sortListedAgents(agents) {
|
|
82
74
|
agents.sort((a, b) => {
|
|
83
75
|
const ta = a.updatedAt == null ? 0 : new Date(a.updatedAt).getTime();
|
|
@@ -305,7 +297,6 @@ function formatQuotaSummary(quota, now = Date.now(), options) {
|
|
|
305
297
|
|
|
306
298
|
export {
|
|
307
299
|
normalizeListedAgent,
|
|
308
|
-
toSafeListedAgentSummary,
|
|
309
300
|
parseAgentListArgs,
|
|
310
301
|
listLocalCachedAgents,
|
|
311
302
|
listRemotePublicAgents,
|
|
@@ -15,9 +15,8 @@ import {
|
|
|
15
15
|
markCredentialUnavailable,
|
|
16
16
|
readCredentialAvailability,
|
|
17
17
|
readCredentialEntry,
|
|
18
|
-
recordCredentialProbe
|
|
19
|
-
|
|
20
|
-
} from "./chunk-42V6BK2E.js";
|
|
18
|
+
recordCredentialProbe
|
|
19
|
+
} from "./chunk-62IL3KQV.js";
|
|
21
20
|
import {
|
|
22
21
|
defaultLoopbackRequest
|
|
23
22
|
} from "./chunk-EADNWBAZ.js";
|
|
@@ -64,7 +63,7 @@ import {
|
|
|
64
63
|
import {
|
|
65
64
|
inlineImageUrlsForCustomProvider,
|
|
66
65
|
prepareTools
|
|
67
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-J2RGIFX5.js";
|
|
68
67
|
import {
|
|
69
68
|
getServerProviderSecret
|
|
70
69
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -83,11 +82,11 @@ import {
|
|
|
83
82
|
rememberMemoryFunctionSchema,
|
|
84
83
|
resolveAgentRequiredPackIds,
|
|
85
84
|
setTodoListFunc
|
|
86
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-KQW2EHWB.js";
|
|
87
86
|
import {
|
|
88
87
|
deriveCredentialGroup,
|
|
89
88
|
deriveCustomProviderCredentialGroup
|
|
90
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-YSC3EI23.js";
|
|
91
90
|
import {
|
|
92
91
|
fetchWithTransientRetry,
|
|
93
92
|
isTransientFetchError
|
|
@@ -110,14 +109,14 @@ import {
|
|
|
110
109
|
prepareTokenUsageData,
|
|
111
110
|
resolveBuiltinPlatformAgentConfig,
|
|
112
111
|
runKeyed
|
|
113
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-FSEVS4U3.js";
|
|
114
113
|
import {
|
|
115
114
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
116
115
|
BUILTIN_TITLE_LLM_CONFIG
|
|
117
116
|
} from "./chunk-MC4XLIJ7.js";
|
|
118
117
|
import {
|
|
119
118
|
fetchServerSyncedCredential
|
|
120
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-PA2BRUNR.js";
|
|
121
120
|
import {
|
|
122
121
|
require_date_fns
|
|
123
122
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -214,8 +213,9 @@ import {
|
|
|
214
213
|
import {
|
|
215
214
|
mergeAvailabilityDeadline,
|
|
216
215
|
resolveAvailabilityAction,
|
|
217
|
-
resolveCooldownGate
|
|
218
|
-
|
|
216
|
+
resolveCooldownGate,
|
|
217
|
+
resolveCredentialKeyWithFallback
|
|
218
|
+
} from "./chunk-H6A6X4EK.js";
|
|
219
219
|
import {
|
|
220
220
|
isAntigravityOAuthAgent
|
|
221
221
|
} from "./chunk-QVG3PWRZ.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
clipMultilineText,
|
|
9
9
|
fetchAndSerializeTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KQW2EHWB.js";
|
|
11
11
|
import {
|
|
12
12
|
isGatewayHttpStatus
|
|
13
13
|
} 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-FSEVS4U3.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-PA2BRUNR.js";
|
|
39
39
|
import {
|
|
40
40
|
buildSkillGuidancePromptBlock,
|
|
41
41
|
extractRuntimePageCapabilities,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J2RGIFX5.js";
|
|
9
9
|
import {
|
|
10
10
|
parseApiError
|
|
11
11
|
} from "./chunk-OCZKATRC.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
parseToolCallArguments,
|
|
16
16
|
performFetchRequest,
|
|
17
17
|
sanitizeOutboundMessages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TTMVLXU5.js";
|
|
19
19
|
import {
|
|
20
20
|
createSSEParser,
|
|
21
21
|
createToolRunId,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
toolRunSetPending,
|
|
27
27
|
toolRunStarted,
|
|
28
28
|
toolRunSucceeded
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KQW2EHWB.js";
|
|
30
30
|
import {
|
|
31
31
|
getCurrentSpaceId
|
|
32
32
|
} from "./chunk-ZJ7UHBJS.js";
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
messageStreamEnd,
|
|
36
36
|
messageStreaming,
|
|
37
37
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-FSEVS4U3.js";
|
|
39
39
|
import {
|
|
40
40
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PA2BRUNR.js";
|
|
42
42
|
import {
|
|
43
43
|
addActiveController,
|
|
44
44
|
removeActiveController,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-RGNEEJ3Y.js";
|
|
7
7
|
import {
|
|
8
8
|
isAgentUnavailableNow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H6A6X4EK.js";
|
|
10
10
|
import {
|
|
11
11
|
isAntigravityOAuthAgent
|
|
12
12
|
} from "./chunk-QVG3PWRZ.js";
|
|
@@ -340,6 +340,15 @@ function resolveFavoriteStatus(record, options) {
|
|
|
340
340
|
}
|
|
341
341
|
return { isFavorite: false, favoritedAt: null };
|
|
342
342
|
}
|
|
343
|
+
function isOwnedAgentRecord(record, userId) {
|
|
344
|
+
if (!userId) return false;
|
|
345
|
+
if (typeof record?.userId === "string" && record.userId === userId || typeof record?.ownerId === "string" && record.ownerId === userId) {
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
return [record?.dbKey, record?.privateKey].some(
|
|
349
|
+
(key) => isOwnedAgentKey(key, userId)
|
|
350
|
+
);
|
|
351
|
+
}
|
|
343
352
|
function toSafeAgentSummary(record, options) {
|
|
344
353
|
const rawId = parseAgentRecordId(
|
|
345
354
|
typeof record?.privateKey === "string" ? record.privateKey : record?.dbKey,
|
|
@@ -372,11 +381,10 @@ function toSafeAgentSummary(record, options) {
|
|
|
372
381
|
const rawQuota = record?.quota;
|
|
373
382
|
const quota = rawQuota && typeof rawQuota === "object" && Array.isArray(rawQuota.windows) && typeof rawQuota.observedAt === "number" && Number.isFinite(rawQuota.observedAt) ? rawQuota : void 0;
|
|
374
383
|
const currentUserId = options?.userId;
|
|
375
|
-
const isOwnedByRecord = Boolean(currentUserId) && (typeof record?.userId === "string" && record.userId === currentUserId || typeof record?.ownerId === "string" && record.ownerId === currentUserId);
|
|
376
384
|
const ownedKey = currentUserId ? [record?.dbKey, record?.privateKey].find(
|
|
377
385
|
(key) => isOwnedAgentKey(key, currentUserId)
|
|
378
386
|
) : void 0;
|
|
379
|
-
const isOwned =
|
|
387
|
+
const isOwned = isOwnedAgentRecord(record, currentUserId);
|
|
380
388
|
const isOAuth = isOAuthApiKeyRef(record?.apiKeyRef);
|
|
381
389
|
const billingSource = resolveBillingSource({
|
|
382
390
|
...record,
|
|
@@ -622,17 +630,28 @@ function buildAgentDiscoveryResult(options) {
|
|
|
622
630
|
agents: projectedAgents
|
|
623
631
|
};
|
|
624
632
|
}
|
|
633
|
+
function toDiscoverySafeAgentSummary(record, options) {
|
|
634
|
+
const mergedOptions = record?.publicRecordExists === true ? { ...options, publicRecordExists: true } : options;
|
|
635
|
+
return toSafeAgentSummary(record, mergedOptions);
|
|
636
|
+
}
|
|
637
|
+
function assembleAgentDiscoveryResult(options) {
|
|
638
|
+
const { records, summaryOptions, ...discoveryOptions } = options;
|
|
639
|
+
const agents = records.map(
|
|
640
|
+
(record) => toDiscoverySafeAgentSummary(
|
|
641
|
+
record,
|
|
642
|
+
typeof summaryOptions === "function" ? summaryOptions(record) : summaryOptions
|
|
643
|
+
)
|
|
644
|
+
);
|
|
645
|
+
return buildAgentDiscoveryResult({ ...discoveryOptions, agents });
|
|
646
|
+
}
|
|
625
647
|
|
|
626
648
|
export {
|
|
627
649
|
deriveCredentialGroup,
|
|
628
650
|
deriveCustomProviderCredentialGroup,
|
|
629
651
|
summarizeCredentialGroups,
|
|
630
|
-
toSafeAgentSummary,
|
|
631
|
-
sortSafeAgentSummaries,
|
|
632
|
-
omitNullishAgentSummaryFields,
|
|
633
|
-
toCompactAgentSummary,
|
|
634
|
-
toUnavailableAgentSummary,
|
|
635
652
|
resolveDiscoveryScope,
|
|
636
653
|
matchesAgentQuery,
|
|
637
|
-
buildAgentDiscoveryResult
|
|
654
|
+
buildAgentDiscoveryResult,
|
|
655
|
+
toDiscoverySafeAgentSummary,
|
|
656
|
+
assembleAgentDiscoveryResult
|
|
638
657
|
};
|
|
@@ -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-SDVFY3MX.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-Y2A5MARX.js");
|
|
369
369
|
return createPageAction(args, thunkApi);
|
|
370
370
|
}
|
|
371
371
|
function subscribe(listener) {
|