nolo-cli 0.191.0-alpha.3 → 0.192.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-WQ2D4ZRH.js → _executeModel-WK6CUVMZ.js} +13 -13
- package/{agentDeleteCommand-TTCVC74A.js → agentDeleteCommand-HMUV4NE2.js} +10 -10
- package/{agentEmailCommands-PTG35KER.js → agentEmailCommands-VSBQCIHU.js} +12 -12
- package/{agentMachineCommands-ATOZK3R5.js → agentMachineCommands-PIQRVNAW.js} +1 -1
- package/{agentRecordCommands-KGRPIJN5.js → agentRecordCommands-BMIDWMSW.js} +11 -11
- package/{agentRunCommand-75VVJTNU.js → agentRunCommand-XHLYMDJX.js} +12 -12
- package/{agentSlice-UJPIKKKP.js → agentSlice-E4XMEDAU.js} +1 -1
- package/{chunk-YE6A72XL.js → chunk-2ALHMLGN.js} +8 -8
- package/{chunk-FEDJHD5X.js → chunk-2MXO7WEQ.js} +2 -2
- package/{chunk-XPL63OIC.js → chunk-3COP73FD.js} +5 -5
- package/{chunk-KGP7UTNN.js → chunk-4DAVDNJ4.js} +7 -7
- package/{chunk-LHOR5MC2.js → chunk-7ZPG46N2.js} +61 -38
- package/{chunk-2KBNF477.js → chunk-C3Q3M6QE.js} +5 -5
- package/{chunk-DS5DAOIY.js → chunk-D5N336PI.js} +2 -2
- package/{chunk-U5ZHUOLT.js → chunk-E4ALT457.js} +1 -1
- package/{chunk-LCSAJ5TJ.js → chunk-I42TYROM.js} +2 -2
- package/{chunk-3NPXGNSK.js → chunk-IDCGBHBA.js} +3 -3
- package/{chunk-53PBXLID.js → chunk-JGJVDP2W.js} +16 -16
- package/{chunk-CTPFBJAF.js → chunk-PLZLQAK4.js} +3 -3
- package/{chunk-EHB4CKUI.js → chunk-PS4KXSB5.js} +2 -2
- package/{chunk-5EFNSNAV.js → chunk-UP2ZOYPJ.js} +1 -1
- package/{chunk-2XUOREKD.js → chunk-VF66Z54U.js} +1 -1
- package/{chunk-VE3FEZIT.js → chunk-VFYQS6S6.js} +2 -2
- package/{chunk-UZHYRBUB.js → chunk-VXET6RYQ.js} +6 -6
- package/{chunk-R5LJWMZE.js → chunk-X7VS4DAR.js} +2 -2
- package/{chunk-2E5M3JVS.js → chunk-YD6LNR6F.js} +2 -2
- package/{commandRegistry-4JHVRMW7.js → commandRegistry-7LDUKQKP.js} +15 -15
- package/{contentThunks-HQBAAXNW.js → contentThunks-633B7WCB.js} +3 -3
- package/{createAgentAutomationAction-KELPOVMP.js → createAgentAutomationAction-C7GJFICL.js} +3 -3
- package/{createDialogAction-Z3SASMTM.js → createDialogAction-2CTMLGDE.js} +4 -4
- package/{createPageAction-PNHOIG44.js → createPageAction-UTSTA7I6.js} +3 -3
- package/{dialogSlice-QHV6I3OQ.js → dialogSlice-GF4JL76Q.js} +2 -2
- package/{docStore-LVMUSECS.js → docStore-6H675PMW.js} +1 -1
- package/{handleSendMessageAction-7TONIXHY.js → handleSendMessageAction-4HYNIYIX.js} +7 -7
- package/index.js +3 -3
- package/{localRuntimeAdapter-HRAB7P5E.js → localRuntimeAdapter-TOYXXB6W.js} +10 -10
- package/{machineCommands-OTXFRTDA.js → machineCommands-RJ267TOF.js} +11 -11
- package/{machineWsRunDispatch-KWVWOHHG.js → machineWsRunDispatch-OJY4LRR7.js} +11 -11
- package/{memberThunks-ZAE52VIP.js → memberThunks-QWAAGQBS.js} +153 -50
- package/package.json +1 -1
- package/{readlineWorkspace-CEX5TXGM.js → readlineWorkspace-6VWEDF7O.js} +12 -12
- package/{runAgentClientLoop-DCV4BD2W.js → runAgentClientLoop-KPP5KDG6.js} +11 -11
- package/{streamAgentChatTurn-NKFKMFQ2.js → streamAgentChatTurn-LJ5JNAX6.js} +13 -13
- package/{tools-626VXEY7.js → tools-UPN3SRFG.js} +8 -8
- package/{updateDialogTitleAction-RNNQAMXG.js → updateDialogTitleAction-3WEMMFCF.js} +3 -3
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-VF4K2QE6.js";
|
|
18
18
|
import {
|
|
19
19
|
addMemberSpace,
|
|
20
|
+
applyFetchSpaceFulfilled,
|
|
20
21
|
fetchAuthoritativeRemoteSpace,
|
|
21
22
|
getAllMemberSpaces,
|
|
22
23
|
removeMemberSpace,
|
|
@@ -24,9 +25,8 @@ import {
|
|
|
24
25
|
setMembershipLoaded,
|
|
25
26
|
setMembershipLoading,
|
|
26
27
|
setMembershipRejected,
|
|
27
|
-
setSpaceInitialized,
|
|
28
28
|
updateMemberSpaceName
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JGJVDP2W.js";
|
|
30
30
|
import {
|
|
31
31
|
ToolResultError,
|
|
32
32
|
clipMultilineText,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
toolRunUpdated,
|
|
39
39
|
uiCardFallback,
|
|
40
40
|
waitForAbortableDelay
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-IDCGBHBA.js";
|
|
42
42
|
import {
|
|
43
43
|
isGatewayHttpStatus
|
|
44
44
|
} from "./chunk-NF64D32W.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from "./chunk-VYNMQ6HW.js";
|
|
56
56
|
import {
|
|
57
57
|
createDocState
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-D5N336PI.js";
|
|
59
59
|
import {
|
|
60
60
|
ToolApiError,
|
|
61
61
|
buildToolRequestHeaders,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
} from "./chunk-63W5N6P3.js";
|
|
83
83
|
import {
|
|
84
84
|
createDialogAction
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-YD6LNR6F.js";
|
|
86
86
|
import {
|
|
87
87
|
DEFAULT_COLLAPSED_CATEGORIES,
|
|
88
88
|
addContentToSpace,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
updateContentCategory,
|
|
100
100
|
updateContentTitle,
|
|
101
101
|
writeStoredCollapsedCategories
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-UP2ZOYPJ.js";
|
|
103
103
|
import {
|
|
104
104
|
getCurrentSpaceId,
|
|
105
105
|
getCurrentSpaceIdRaw,
|
|
@@ -122,14 +122,14 @@ import {
|
|
|
122
122
|
selectMsgById,
|
|
123
123
|
uiAskChoiceFunc,
|
|
124
124
|
uiAskChoiceFunctionSchema
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-2ALHMLGN.js";
|
|
126
126
|
import {
|
|
127
127
|
createAgent,
|
|
128
128
|
deleteServerSyncedCredential,
|
|
129
129
|
runLlm,
|
|
130
130
|
streamAgentChatTurn,
|
|
131
131
|
updateAgent
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-PLZLQAK4.js";
|
|
133
133
|
import {
|
|
134
134
|
buildMediaToolConfirmation,
|
|
135
135
|
normalizeMediaConfirmExecutionRevision
|
|
@@ -3884,7 +3884,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
3884
3884
|
const deletedDialogIds = [];
|
|
3885
3885
|
const deletedDialogKeys = [];
|
|
3886
3886
|
const failures = [];
|
|
3887
|
-
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-
|
|
3887
|
+
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-GF4JL76Q.js");
|
|
3888
3888
|
for (const target of targets) {
|
|
3889
3889
|
try {
|
|
3890
3890
|
await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
|
|
@@ -4983,6 +4983,24 @@ var deleteSpaceAction = async (input, thunkAPI) => {
|
|
|
4983
4983
|
return { spaceId, strategy };
|
|
4984
4984
|
};
|
|
4985
4985
|
|
|
4986
|
+
// packages/create/space/withTimeout.ts
|
|
4987
|
+
var SPACE_LOCAL_READ_TIMEOUT_MS = 1500;
|
|
4988
|
+
var withTimeout = async (promise, ms = SPACE_LOCAL_READ_TIMEOUT_MS) => {
|
|
4989
|
+
let timer;
|
|
4990
|
+
try {
|
|
4991
|
+
return await Promise.race([
|
|
4992
|
+
promise,
|
|
4993
|
+
new Promise((resolve) => {
|
|
4994
|
+
timer = setTimeout(() => resolve(null), ms);
|
|
4995
|
+
})
|
|
4996
|
+
]);
|
|
4997
|
+
} catch {
|
|
4998
|
+
return null;
|
|
4999
|
+
} finally {
|
|
5000
|
+
if (timer) clearTimeout(timer);
|
|
5001
|
+
}
|
|
5002
|
+
};
|
|
5003
|
+
|
|
4986
5004
|
// packages/create/space/fetchSpaceAction.ts
|
|
4987
5005
|
var fetchSpaceAction = async (input, thunkAPI) => {
|
|
4988
5006
|
const rawSpaceId = typeof input === "string" ? input : input?.spaceId;
|
|
@@ -4996,14 +5014,8 @@ var fetchSpaceAction = async (input, thunkAPI) => {
|
|
|
4996
5014
|
const readSpace = async (dbKey) => {
|
|
4997
5015
|
try {
|
|
4998
5016
|
const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-QAUXABCC.js");
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
}
|
|
5002
|
-
return await dispatch(
|
|
5003
|
-
read2({
|
|
5004
|
-
dbKey
|
|
5005
|
-
})
|
|
5006
|
-
).unwrap();
|
|
5017
|
+
const readPromise = fresh ? dispatch(readAndWait2(dbKey)).unwrap() : dispatch(read2({ dbKey })).unwrap();
|
|
5018
|
+
return await withTimeout(readPromise);
|
|
5007
5019
|
} catch {
|
|
5008
5020
|
return null;
|
|
5009
5021
|
}
|
|
@@ -5160,16 +5172,6 @@ var fetchSpaceSidebarStateAction = async (spaceId, thunkAPI) => {
|
|
|
5160
5172
|
};
|
|
5161
5173
|
};
|
|
5162
5174
|
|
|
5163
|
-
// packages/create/space/applyFetchSpaceFulfilled.ts
|
|
5164
|
-
function applyFetchSpaceFulfilled(payload) {
|
|
5165
|
-
const { spaceId, spaceData } = payload;
|
|
5166
|
-
const currentSpaceId = getCurrentSpaceIdRaw();
|
|
5167
|
-
if (!currentSpaceId || currentSpaceId === spaceId) {
|
|
5168
|
-
setCurrentSpaceBoth(spaceId, spaceData);
|
|
5169
|
-
setSpaceInitialized();
|
|
5170
|
-
}
|
|
5171
|
-
}
|
|
5172
|
-
|
|
5173
5175
|
// packages/create/space/changeSpaceAction.ts
|
|
5174
5176
|
var getSpaceUpdatedAt2 = (space) => {
|
|
5175
5177
|
if (!space) return 0;
|
|
@@ -5183,16 +5185,20 @@ var changeSpaceAction = async (spaceId, thunkAPI) => {
|
|
|
5183
5185
|
).catch(() => ({ collapsedCategories: {} }));
|
|
5184
5186
|
let spaceData = null;
|
|
5185
5187
|
let usedLocal = false;
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5188
|
+
const { userId: actorId } = selectSpaceRemoteAuth(thunkAPI.getState());
|
|
5189
|
+
const useLocalFirst = isDeviceLocalOwnerId(actorId ?? "");
|
|
5190
|
+
if (useLocalFirst) {
|
|
5191
|
+
try {
|
|
5192
|
+
const local = await fetchSpaceAction(
|
|
5193
|
+
{ spaceId: normalizedSpaceId, fresh: false },
|
|
5194
|
+
thunkAPI
|
|
5195
|
+
);
|
|
5196
|
+
if (local?.spaceData) {
|
|
5197
|
+
spaceData = local.spaceData;
|
|
5198
|
+
usedLocal = true;
|
|
5199
|
+
}
|
|
5200
|
+
} catch {
|
|
5194
5201
|
}
|
|
5195
|
-
} catch {
|
|
5196
5202
|
}
|
|
5197
5203
|
if (!spaceData) {
|
|
5198
5204
|
const fresh = await fetchSpaceAction(
|
|
@@ -5246,6 +5252,7 @@ var fetchSpaceSidebarState = createAsyncThunk(
|
|
|
5246
5252
|
}
|
|
5247
5253
|
}
|
|
5248
5254
|
);
|
|
5255
|
+
var SPACE_SWITCH_TIMEOUT_MS = 1e4;
|
|
5249
5256
|
var changeSpace = createAsyncThunk(
|
|
5250
5257
|
"space/changeSpace",
|
|
5251
5258
|
async (arg, thunkAPI) => {
|
|
@@ -5254,8 +5261,22 @@ var changeSpace = createAsyncThunk(
|
|
|
5254
5261
|
setMembershipLoading();
|
|
5255
5262
|
setCurrentSpace(null);
|
|
5256
5263
|
}
|
|
5264
|
+
const actionPromise = changeSpaceAction(arg, thunkAPI);
|
|
5265
|
+
actionPromise.catch(() => {
|
|
5266
|
+
});
|
|
5267
|
+
let timeoutTimer;
|
|
5257
5268
|
try {
|
|
5258
|
-
const payload = await
|
|
5269
|
+
const payload = await Promise.race([
|
|
5270
|
+
actionPromise,
|
|
5271
|
+
new Promise((_, reject) => {
|
|
5272
|
+
timeoutTimer = setTimeout(
|
|
5273
|
+
() => reject(
|
|
5274
|
+
new Error("\u5207\u6362\u7A7A\u95F4\u8D85\u65F6\uFF1A\u672C\u5730\u5B58\u50A8\u6216\u670D\u52A1\u7AEF\u672A\u5728\u65F6\u9650\u5185\u8FD4\u56DE")
|
|
5275
|
+
),
|
|
5276
|
+
SPACE_SWITCH_TIMEOUT_MS
|
|
5277
|
+
);
|
|
5278
|
+
})
|
|
5279
|
+
]);
|
|
5259
5280
|
setCurrentSpaceBoth(payload.spaceId, payload.spaceData);
|
|
5260
5281
|
setMembershipLoaded();
|
|
5261
5282
|
setCollapsedCategories(
|
|
@@ -5268,6 +5289,8 @@ var changeSpace = createAsyncThunk(
|
|
|
5268
5289
|
setCurrentSpaceBoth(null, null);
|
|
5269
5290
|
setCollapsedCategories({}, null);
|
|
5270
5291
|
throw error;
|
|
5292
|
+
} finally {
|
|
5293
|
+
if (timeoutTimer) clearTimeout(timeoutTimer);
|
|
5271
5294
|
}
|
|
5272
5295
|
}
|
|
5273
5296
|
);
|
|
@@ -18571,7 +18594,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
18571
18594
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
18572
18595
|
};
|
|
18573
18596
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
18574
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
18597
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-6H675PMW.js");
|
|
18575
18598
|
if (getDocState().pageKey === id) {
|
|
18576
18599
|
applyExternalDocUpdate({
|
|
18577
18600
|
slateData: finalSlateData,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2MXO7WEQ.js";
|
|
11
11
|
import {
|
|
12
12
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
13
13
|
getAllToolRuns,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
selectSpaceContextLevel,
|
|
21
21
|
selectUserTonePreset,
|
|
22
22
|
uiCardFallback
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IDCGBHBA.js";
|
|
24
24
|
import {
|
|
25
25
|
getDocState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-D5N336PI.js";
|
|
27
27
|
import {
|
|
28
28
|
resolveToolBaseUrl
|
|
29
29
|
} from "./chunk-MYOH447Z.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-ZBCBFOWC.js";
|
|
36
36
|
import {
|
|
37
37
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-UP2ZOYPJ.js";
|
|
39
39
|
import {
|
|
40
40
|
getCurrentSpaceIdRaw,
|
|
41
41
|
getViewMode
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
45
45
|
buildPersonalizationDialogPolicyContext,
|
|
46
46
|
selectAllMsgs
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-2ALHMLGN.js";
|
|
48
48
|
import {
|
|
49
49
|
selectPendingFiles
|
|
50
50
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -333,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
333
333
|
).unwrap();
|
|
334
334
|
if (dbSpaceId) {
|
|
335
335
|
try {
|
|
336
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
336
|
+
const { updateContentTitle } = await import("./contentThunks-633B7WCB.js");
|
|
337
337
|
await dispatch(
|
|
338
338
|
updateContentTitle({
|
|
339
339
|
spaceId: dbSpaceId,
|
|
@@ -372,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
async function createDocState(args, thunkApi) {
|
|
375
|
-
const { createPageAction } = await import("./createPageAction-
|
|
375
|
+
const { createPageAction } = await import("./createPageAction-UTSTA7I6.js");
|
|
376
376
|
return createPageAction(args, thunkApi);
|
|
377
377
|
}
|
|
378
378
|
function subscribe(listener) {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-VYNMQ6HW.js";
|
|
9
9
|
import {
|
|
10
10
|
fetchAndCacheTableRows
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UP2ZOYPJ.js";
|
|
12
12
|
import {
|
|
13
13
|
require_react
|
|
14
14
|
} from "./chunk-YDH3FDFQ.js";
|
|
@@ -521,7 +521,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
521
521
|
if (!executionInput) {
|
|
522
522
|
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
523
523
|
}
|
|
524
|
-
const { findToolExecutor } = await import("./tools-
|
|
524
|
+
const { findToolExecutor } = await import("./tools-UPN3SRFG.js");
|
|
525
525
|
const { executor } = findToolExecutor(run.toolName);
|
|
526
526
|
toolRunStarted({
|
|
527
527
|
id: run.id,
|
|
@@ -545,7 +545,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
545
545
|
const latestState = thunkApi.getState();
|
|
546
546
|
const userId = selectIdentityUserId(latestState);
|
|
547
547
|
if (userId) {
|
|
548
|
-
const { fetchUserSpaceMemberships } = await import("./memberThunks-
|
|
548
|
+
const { fetchUserSpaceMemberships } = await import("./memberThunks-QWAAGQBS.js");
|
|
549
549
|
await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCurrentSpaceIdRaw,
|
|
3
|
+
setCurrentSpaceBoth
|
|
4
|
+
} from "./chunk-5XBUWM6I.js";
|
|
1
5
|
import {
|
|
2
6
|
createSpaceKey,
|
|
3
7
|
normalizeSpaceId
|
|
@@ -59,9 +63,6 @@ function dedupeMemberSpacesById(memberSpaces) {
|
|
|
59
63
|
});
|
|
60
64
|
return Array.from(membershipMap.values());
|
|
61
65
|
}
|
|
62
|
-
function getMemberSpaces() {
|
|
63
|
-
return state.memberSpaces;
|
|
64
|
-
}
|
|
65
66
|
function getAllMemberSpaces() {
|
|
66
67
|
const memberSpaces = dedupeMemberSpacesById(state.memberSpaces || []);
|
|
67
68
|
return [...memberSpaces].sort((a, b) => {
|
|
@@ -93,15 +94,6 @@ function setMembershipRejected(errorMessage, isRemoteUnavailable) {
|
|
|
93
94
|
};
|
|
94
95
|
notify();
|
|
95
96
|
}
|
|
96
|
-
function hydrateMemberSpacesFromLocal(spaces) {
|
|
97
|
-
if (state.memberSpaces !== null || spaces.length === 0) return;
|
|
98
|
-
state = {
|
|
99
|
-
...state,
|
|
100
|
-
memberSpaces: dedupeMemberSpacesById(spaces),
|
|
101
|
-
loading: false
|
|
102
|
-
};
|
|
103
|
-
notify();
|
|
104
|
-
}
|
|
105
97
|
function appendRecoveredMemberships(recovered) {
|
|
106
98
|
if (!recovered || recovered.length === 0) return;
|
|
107
99
|
if (state.memberSpaces === null) {
|
|
@@ -279,6 +271,16 @@ var fetchAuthoritativeRemoteSpace = async ({
|
|
|
279
271
|
return null;
|
|
280
272
|
};
|
|
281
273
|
|
|
274
|
+
// packages/create/space/applyFetchSpaceFulfilled.ts
|
|
275
|
+
function applyFetchSpaceFulfilled(payload) {
|
|
276
|
+
const { spaceId, spaceData } = payload;
|
|
277
|
+
const currentSpaceId = getCurrentSpaceIdRaw();
|
|
278
|
+
if (!currentSpaceId || currentSpaceId === spaceId) {
|
|
279
|
+
setCurrentSpaceBoth(spaceId, spaceData);
|
|
280
|
+
setSpaceInitialized();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
282
284
|
export {
|
|
283
285
|
selectSpaceRemoteAuth,
|
|
284
286
|
spaceListsUser,
|
|
@@ -286,16 +288,14 @@ export {
|
|
|
286
288
|
fetchRemoteUserSpaceMemberships,
|
|
287
289
|
fetchRemoteSpace,
|
|
288
290
|
fetchAuthoritativeRemoteSpace,
|
|
289
|
-
getMemberSpaces,
|
|
290
291
|
getAllMemberSpaces,
|
|
291
292
|
setMemberSpaces,
|
|
292
293
|
setMembershipLoading,
|
|
293
294
|
setMembershipRejected,
|
|
294
|
-
hydrateMemberSpacesFromLocal,
|
|
295
295
|
appendRecoveredMemberships,
|
|
296
|
-
setSpaceInitialized,
|
|
297
296
|
setMembershipLoaded,
|
|
298
297
|
addMemberSpace,
|
|
299
298
|
removeMemberSpace,
|
|
300
|
-
updateMemberSpaceName
|
|
299
|
+
updateMemberSpaceName,
|
|
300
|
+
applyFetchSpaceFulfilled
|
|
301
301
|
};
|
|
@@ -347,7 +347,7 @@ var slice = createSliceWithThunks({
|
|
|
347
347
|
const overrides = {};
|
|
348
348
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
349
349
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
350
|
-
const { _executeModel } = await import("./_executeModel-
|
|
350
|
+
const { _executeModel } = await import("./_executeModel-WK6CUVMZ.js");
|
|
351
351
|
return _executeModel(
|
|
352
352
|
{
|
|
353
353
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -368,7 +368,7 @@ var slice = createSliceWithThunks({
|
|
|
368
368
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
369
369
|
*/
|
|
370
370
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
371
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
371
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-KPP5KDG6.js");
|
|
372
372
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
373
373
|
{
|
|
374
374
|
agentKey: args.agentKey,
|
|
@@ -384,7 +384,7 @@ var slice = createSliceWithThunks({
|
|
|
384
384
|
* 聊天轮次流式 Agent 调用
|
|
385
385
|
*/
|
|
386
386
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
387
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
387
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-LJ5JNAX6.js");
|
|
388
388
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
389
389
|
}),
|
|
390
390
|
/**
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2MXO7WEQ.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PLZLQAK4.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillGuidancePromptBlock
|
|
12
12
|
} from "./chunk-5HAPEKNH.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3COP73FD.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IDCGBHBA.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
10
|
} from "./chunk-ADTJJVDJ.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveRawAgentInput,
|
|
10
10
|
resolveServerUrl,
|
|
11
11
|
writeUsage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-E4ALT457.js";
|
|
13
13
|
import {
|
|
14
14
|
parsePositiveFiniteNumberOrFallback
|
|
15
15
|
} from "./chunk-Y5GCAMGP.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
resolveFileWriteGateEnabled,
|
|
39
39
|
resolveLocalUserId,
|
|
40
40
|
validateInstaboxWorkspaceSelection
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3COP73FD.js";
|
|
42
42
|
import {
|
|
43
43
|
clearCredentialAvailability,
|
|
44
44
|
readEffectiveCredentialEntry,
|
|
@@ -72,14 +72,14 @@ import {
|
|
|
72
72
|
} from "./chunk-BMQ2MJUK.js";
|
|
73
73
|
import {
|
|
74
74
|
resolveCliLocalRuntimeKeyCapability
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-7ZPG46N2.js";
|
|
76
76
|
import {
|
|
77
77
|
isTransientFetchError
|
|
78
78
|
} from "./chunk-KFHREHUQ.js";
|
|
79
79
|
import {
|
|
80
80
|
parseUiCard,
|
|
81
81
|
uiCardFallback
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-IDCGBHBA.js";
|
|
83
83
|
import {
|
|
84
84
|
isGatewayHttpStatus
|
|
85
85
|
} from "./chunk-NF64D32W.js";
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
chooseMemoryOwners,
|
|
89
89
|
loadMemoryCandidatesFromDb,
|
|
90
90
|
resolveAgentMemoryPolicy
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-YD6LNR6F.js";
|
|
92
92
|
import {
|
|
93
93
|
API_REPORTED_COST_MULTIPLIER,
|
|
94
94
|
estimateMessagesTokens,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
resolveAgentContextWindow,
|
|
97
97
|
resolveOccupancy,
|
|
98
98
|
resolveOccupancyWindow
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-2ALHMLGN.js";
|
|
100
100
|
import {
|
|
101
101
|
isCliAuthorityBrokerProtocolError,
|
|
102
102
|
isCliAuthorityBrokerTimeoutError,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2MXO7WEQ.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2ALHMLGN.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
10
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UP2ZOYPJ.js";
|
|
4
4
|
import {
|
|
5
5
|
format,
|
|
6
6
|
prepareAndPersistMessage,
|
|
7
7
|
uiAskChoiceFunc,
|
|
8
8
|
uiAskChoiceFunctionSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2ALHMLGN.js";
|
|
10
10
|
import {
|
|
11
11
|
formatISO
|
|
12
12
|
} from "./chunk-ZRAU6T47.js";
|
|
@@ -111,7 +111,7 @@ function createDaemonShortcutCommand(path, description, command) {
|
|
|
111
111
|
// packages/cli/agentInternalCommandEntries.ts
|
|
112
112
|
function getAgentInternalCommandEntries() {
|
|
113
113
|
const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args, ctx) => {
|
|
114
|
-
const { runAgentRunCommand } = await import("./agentRunCommand-
|
|
114
|
+
const { runAgentRunCommand } = await import("./agentRunCommand-XHLYMDJX.js");
|
|
115
115
|
return runAgentRunCommand(args, {
|
|
116
116
|
env: ctx.env,
|
|
117
117
|
scriptDir: ctx.scriptDir,
|
|
@@ -127,7 +127,7 @@ function getAgentInternalCommandEntries() {
|
|
|
127
127
|
return runAgentListCommand(args, deps);
|
|
128
128
|
}),
|
|
129
129
|
createEnvCommand(["agent", "create"], "Create a new agent", async (args, deps) => {
|
|
130
|
-
const { runAgentCreateCommand } = await import("./agentRecordCommands-
|
|
130
|
+
const { runAgentCreateCommand } = await import("./agentRecordCommands-BMIDWMSW.js");
|
|
131
131
|
return runAgentCreateCommand(args, deps);
|
|
132
132
|
}),
|
|
133
133
|
createEnvCommand(["agent", "models"], "List models: --preset <id> (server discovery, exit 1 on static fallback) or --url <base> --api-key <key> (OpenAI-compatible /models)", async (args, deps) => {
|
|
@@ -143,7 +143,7 @@ function getAgentInternalCommandEntries() {
|
|
|
143
143
|
return runAgentPullCommand(args, deps);
|
|
144
144
|
}),
|
|
145
145
|
createEnvCommand(["agent", "read"], "Read a single agent", async (args, deps) => {
|
|
146
|
-
const { runAgentReadCommand } = await import("./agentRecordCommands-
|
|
146
|
+
const { runAgentReadCommand } = await import("./agentRecordCommands-BMIDWMSW.js");
|
|
147
147
|
return runAgentReadCommand(args, deps);
|
|
148
148
|
}),
|
|
149
149
|
createAgentRunCommand(["agent", "run"], "Run an agent"),
|
|
@@ -172,31 +172,31 @@ function getAgentInternalCommandEntries() {
|
|
|
172
172
|
return runSetupOfflineMarxistsAgentCommand(args, deps);
|
|
173
173
|
}),
|
|
174
174
|
createEnvCommand(["agent", "update"], "Update agent fields", async (args, deps) => {
|
|
175
|
-
const { runAgentUpdateCommand } = await import("./agentRecordCommands-
|
|
175
|
+
const { runAgentUpdateCommand } = await import("./agentRecordCommands-BMIDWMSW.js");
|
|
176
176
|
return runAgentUpdateCommand(args, deps);
|
|
177
177
|
}),
|
|
178
178
|
createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args, deps) => {
|
|
179
|
-
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-
|
|
179
|
+
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-VSBQCIHU.js");
|
|
180
180
|
return runAgentEmailProvisionCommand(args, deps);
|
|
181
181
|
}),
|
|
182
182
|
createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args, deps) => {
|
|
183
|
-
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-
|
|
183
|
+
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-VSBQCIHU.js");
|
|
184
184
|
return runAgentEmailBindCommand(args, deps);
|
|
185
185
|
}),
|
|
186
186
|
createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args, deps) => {
|
|
187
|
-
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-
|
|
187
|
+
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-VSBQCIHU.js");
|
|
188
188
|
return runAgentEmailTransferCommand(args, deps);
|
|
189
189
|
}),
|
|
190
190
|
createEnvCommand(
|
|
191
191
|
["agent", "email", "create-and-provision"],
|
|
192
192
|
"Create an agent and provision its controlled inbox",
|
|
193
193
|
async (args, deps) => {
|
|
194
|
-
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-
|
|
194
|
+
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-VSBQCIHU.js");
|
|
195
195
|
return runAgentEmailCreateAndProvisionCommand(args, deps);
|
|
196
196
|
}
|
|
197
197
|
),
|
|
198
198
|
createEnvCommand(["agent", "delete"], "Hard-delete an agent's private and public records", async (args, deps) => {
|
|
199
|
-
const { runAgentDeleteCommand } = await import("./agentDeleteCommand-
|
|
199
|
+
const { runAgentDeleteCommand } = await import("./agentDeleteCommand-HMUV4NE2.js");
|
|
200
200
|
return runAgentDeleteCommand(args, deps);
|
|
201
201
|
}),
|
|
202
202
|
createEnvCommand(["agent", "grant"], "Grant another user access to this agent's owner credentials", async (args, deps) => {
|
|
@@ -216,15 +216,15 @@ function getAgentInternalCommandEntries() {
|
|
|
216
216
|
return runAgentRevokeGrantCommand(args, deps);
|
|
217
217
|
}),
|
|
218
218
|
createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args, deps) => {
|
|
219
|
-
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-
|
|
219
|
+
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-PIQRVNAW.js");
|
|
220
220
|
return runAgentBindCurrentCommand(args, deps);
|
|
221
221
|
}),
|
|
222
222
|
createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args, deps) => {
|
|
223
|
-
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-
|
|
223
|
+
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-PIQRVNAW.js");
|
|
224
224
|
return runAgentSmokeCurrentCommand(args, deps);
|
|
225
225
|
}),
|
|
226
226
|
createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args, deps) => {
|
|
227
|
-
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-
|
|
227
|
+
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-PIQRVNAW.js");
|
|
228
228
|
return runAgentRuntimeDoctorCommand(args, deps);
|
|
229
229
|
}),
|
|
230
230
|
createAgentRunCommand(["agent", "chat"], "Chat with an agent")
|
|
@@ -547,15 +547,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
547
547
|
return runWhoamiCommand({ args, env: ctx.env });
|
|
548
548
|
}),
|
|
549
549
|
createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args, deps) => {
|
|
550
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
550
|
+
const { runMachineConnectCommand } = await import("./machineCommands-RJ267TOF.js");
|
|
551
551
|
return runMachineConnectCommand(args, deps);
|
|
552
552
|
}),
|
|
553
553
|
createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args, deps) => {
|
|
554
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
554
|
+
const { runMachineConnectCommand } = await import("./machineCommands-RJ267TOF.js");
|
|
555
555
|
return runMachineConnectCommand(args, deps);
|
|
556
556
|
}),
|
|
557
557
|
createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args, deps) => {
|
|
558
|
-
const { runMachineStatusCommand } = await import("./machineCommands-
|
|
558
|
+
const { runMachineStatusCommand } = await import("./machineCommands-RJ267TOF.js");
|
|
559
559
|
return runMachineStatusCommand(args, deps);
|
|
560
560
|
}),
|
|
561
561
|
createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args, deps) => {
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
updateContentPinned,
|
|
9
9
|
updateContentTitle,
|
|
10
10
|
uploadAndAddFileToSpace
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UP2ZOYPJ.js";
|
|
12
12
|
import "./chunk-5XBUWM6I.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-2ALHMLGN.js";
|
|
14
14
|
import "./chunk-TZXPT53C.js";
|
|
15
15
|
import "./chunk-LEC5ALIN.js";
|
|
16
16
|
import "./chunk-523DITKR.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-PLZLQAK4.js";
|
|
18
18
|
import "./chunk-BYXBJQAS.js";
|
|
19
19
|
import "./chunk-QYPE3TS3.js";
|
|
20
20
|
import "./chunk-A5BLRE3G.js";
|