nolo-cli 0.157.0-alpha.1 → 0.158.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-5WS2PA62.js → _executeModel-6BMU3URY.js} +35 -35
- package/{accountResolver-7RYB4D2P.js → accountResolver-55EDKEIK.js} +1 -1
- package/{action-ZJYUBXFC.js → action-GPPJC5TI.js} +4 -4
- package/{addContentAction-TVHB4526.js → addContentAction-BI6RDRTQ.js} +7 -7
- package/{addDialogAgentAction-FDPBU6K6.js → addDialogAgentAction-4RJYUSIK.js} +6 -6
- package/{agentDeleteCommand-Q6M4F3U6.js → agentDeleteCommand-Q2XWGBC2.js} +42 -42
- package/{agentEmailCommands-FNH6FEHS.js → agentEmailCommands-XFBE2A3F.js} +44 -44
- package/{agentListCommands-JUNMFS6E.js → agentListCommands-OROMT4P3.js} +12 -12
- package/{agentMachineCommands-VNLDEKNT.js → agentMachineCommands-ULK5YKKJ.js} +11 -10
- package/{agentProviderCommands-X2HQE6HY.js → agentProviderCommands-MKG2OOEY.js} +2 -2
- package/{agentRecordCommands-47XXRVPI.js → agentRecordCommands-3VHBLS6P.js} +42 -42
- package/{agentRunCommand-QEXFJUXQ.js → agentRunCommand-LCIMEAQY.js} +44 -43
- package/{agentRuntimeLocal-O5GDAFTN.js → agentRuntimeLocal-NPJS2QDP.js} +5 -5
- package/{agentSlice-E3XS5FTQ.js → agentSlice-VRAPG6CH.js} +7 -7
- package/{appDeleteCommands-C2J5RQ3I.js → appDeleteCommands-AZ3KS4HK.js} +10 -10
- package/{appDeployCommands-3YRK7PSU.js → appDeployCommands-BTV22ICJ.js} +10 -10
- package/{appDeployStatusCommands-FPAX7MOK.js → appDeployStatusCommands-JSW3HPIW.js} +10 -10
- package/{appGetCommands-XAC2V766.js → appGetCommands-5KTTFIMV.js} +10 -10
- package/{appListCommands-ZJL2W5O7.js → appListCommands-3BJPAE2U.js} +10 -10
- package/{authCommand-J3XILHWW.js → authCommand-NIV3DKPF.js} +7 -287
- package/{authCommands-77CHYBGF.js → authCommands-AMNIAKEG.js} +2 -2
- package/{builtinSkillRegistry-A6VSPJEJ.js → builtinSkillRegistry-H3AY27TR.js} +1 -1
- package/{chromeCommands-OBBNJCLS.js → chromeCommands-IY4NVSXZ.js} +17 -10
- package/{chunk-SW4S4XYB.js → chunk-2AB2HA4M.js} +84 -34
- package/{chunk-VSOWPETY.js → chunk-2BKUVRC5.js} +7 -7
- package/{chunk-Z6KQDSZW.js → chunk-2SGAI64X.js} +2 -2
- package/{chunk-KOB75UNU.js → chunk-2SOS7OSQ.js} +18 -2
- package/{chunk-C5VPAHIU.js → chunk-32ZKZET7.js} +1 -1
- package/{chunk-XPWGOTBQ.js → chunk-3L2WKC3W.js} +1 -8
- package/{chunk-PEO24UB5.js → chunk-3TBHZPNG.js} +33 -6
- package/{chunk-YBNHPX4S.js → chunk-4RJJDA57.js} +1 -1
- package/{chunk-X5SUT4CN.js → chunk-4UOEOHY3.js} +6 -6
- package/{chunk-UUPR3TD7.js → chunk-7RF4O6AT.js} +1 -3
- package/{chunk-FPWT3RH2.js → chunk-AJ4V34SG.js} +10 -10
- package/{chunk-2GGXHQIW.js → chunk-BLVSFYQ3.js} +4 -2
- package/{chunk-SKPPKHD3.js → chunk-BYQOCH75.js} +2 -2
- package/{chunk-UTIMX333.js → chunk-C3OK72G3.js} +1 -1
- package/{chunk-ZWG3C7VI.js → chunk-C6FY7HWI.js} +35 -0
- package/{chunk-RUNKPFM5.js → chunk-CDWHHLK5.js} +12 -8
- package/{chunk-ROPSATAB.js → chunk-CON6SI7N.js} +1 -1
- package/{chunk-4Z245KOA.js → chunk-DC3SZCRR.js} +6 -2
- package/{chunk-OH2M7WEU.js → chunk-EQGFFDNA.js} +3 -3
- package/{chunk-ANJTRG52.js → chunk-G2WP7VPD.js} +0 -37
- package/{chunk-7A4LJCDR.js → chunk-G476FQ7Q.js} +4 -4
- package/{chunk-DW7MGLMG.js → chunk-GAVUTXM5.js} +21 -17
- package/{chunk-PSJWPSKS.js → chunk-HB4XPBC7.js} +0 -32
- package/{chunk-6MJNEXUU.js → chunk-HGDKT2D6.js} +4 -0
- package/{chunk-EM3YOZJ4.js → chunk-ICRRXBRN.js} +3 -3
- package/{chunk-7KYVUFDG.js → chunk-IE5PXKVU.js} +1 -263
- package/{chunk-T6CBQ6BN.js → chunk-INFHX73M.js} +1 -1
- package/{chunk-CE7PIHQD.js → chunk-IRTOYSA2.js} +3 -3
- package/{chunk-WZ6OU4NX.js → chunk-J2ATF74A.js} +2 -2
- package/{chunk-TJ2VPCBE.js → chunk-JPJGMOIM.js} +2 -2
- package/{chunk-I2ZMGXXF.js → chunk-KFHREHUQ.js} +1 -1
- package/{chunk-7GC3EKUG.js → chunk-KKKHAF3P.js} +2 -2
- package/{chunk-KX6LPG7W.js → chunk-KLA62VVE.js} +1 -1
- package/{chunk-TYND6RDQ.js → chunk-LV4LV2B4.js} +72 -1
- package/{chunk-TZTWMGE3.js → chunk-M2P3OGXZ.js} +3 -3
- package/{chunk-CBHGZRCE.js → chunk-MYOH447Z.js} +1 -1
- package/{chunk-6MPAEODB.js → chunk-NDZOXXIM.js} +17 -3
- package/{chunk-MVJVF4ED.js → chunk-NKPAHRMA.js} +7 -6
- package/{chunk-ZD2BLOY6.js → chunk-O4ZERG3M.js} +3 -3
- package/{chunk-36OMEXXR.js → chunk-OON4OBWI.js} +1 -1
- package/{chunk-SEJ5OS6F.js → chunk-PXYBUFDB.js} +4 -0
- package/{chunk-G47IPDOK.js → chunk-QPY264HO.js} +1 -1
- package/{chunk-TNIX77YM.js → chunk-R5GO3YZP.js} +34 -1
- package/{chunk-EJU23ST5.js → chunk-S72LMV7T.js} +670 -627
- package/{chunk-D4OWHT5Y.js → chunk-SPKLALBU.js} +2 -2
- package/{chunk-FDT27L7S.js → chunk-UCLSOLX4.js} +7 -5
- package/{chunk-B2EGWZJG.js → chunk-UFYBYB26.js} +1 -1
- package/{chunk-3XZKV7QQ.js → chunk-US6MKPE7.js} +1 -1
- package/{chunk-VAZHH6FO.js → chunk-VDEVDGEM.js} +18 -12
- package/{chunk-HXHSTRGH.js → chunk-VYNMQ6HW.js} +0 -27
- package/{chunk-7BSQK2UC.js → chunk-WRCZXJ4N.js} +2 -2
- package/{chunk-H4KACZMG.js → chunk-WTFRBJT5.js} +261 -126
- package/{chunk-QDA4Y5O6.js → chunk-WXFZ4P6O.js} +18 -14
- package/chunk-Y5GCAMGP.js +9 -0
- package/{chunk-SCJD2PNK.js → chunk-YPG7TUQD.js} +3 -3
- package/{chunk-XFKZ3MCV.js → chunk-YTXQ2U2X.js} +221 -65
- package/{chunk-ZEHTARJA.js → chunk-ZBXIKCZ4.js} +38 -92
- package/{chunk-HKT6QXP3.js → chunk-ZEY4NJRE.js} +2 -2
- package/{chunk-HP6O6LTV.js → chunk-ZVQHBIWV.js} +6 -6
- package/{commandRegistry-OUBQIF62.js → commandRegistry-D6JTVYKG.js} +73 -81
- package/{contentThunks-B3FRQGP7.js → contentThunks-DYQO4CTI.js} +14 -13
- package/{createAgentAutomationAction-T2YFJ6MY.js → createAgentAutomationAction-LW26KIBP.js} +14 -13
- package/{createDialogAction-2NFGFBXW.js → createDialogAction-VLLBRD52.js} +15 -14
- package/{createPageAction-LDAVZDN7.js → createPageAction-PDACOLI6.js} +14 -13
- package/{dbSlice-5QGKMQLO.js → dbSlice-DC2J53RC.js} +6 -6
- package/{deleteFile-EW6QNRRT.js → deleteFile-KYWEMNFX.js} +4 -4
- package/{dialogCommands-ZLBEAQHE.js → dialogCommands-F3Y4KCPZ.js} +12 -11
- package/{dialogSlice-64S3J6CP.js → dialogSlice-ERMZYMS6.js} +13 -12
- package/{docCreateCommands-XOG5BBFQ.js → docCreateCommands-YMWZLW64.js} +8 -8
- package/{docDeleteCommands-NCW3BBRX.js → docDeleteCommands-6KJ3ESK4.js} +9 -9
- package/{docReadCommands-OT7X44Y3.js → docReadCommands-YQGFVLWI.js} +8 -8
- package/{docStore-NIP7OO4I.js → docStore-HXKI6W5D.js} +7 -7
- package/{docUpdateCommands-JW7OWW2J.js → docUpdateCommands-QLSGXUEX.js} +8 -8
- package/{handleSendMessageAction-TOKA7ED7.js → handleSendMessageAction-2XCOZPXY.js} +25 -24
- package/index.js +6 -6
- package/{localRuntimeAdapter-EQM6LFYC.js → localRuntimeAdapter-VOFUPXNF.js} +42 -40
- package/{machineCommands-WJ7FZ67T.js → machineCommands-IN5O7CIO.js} +46 -44
- package/{machineWsRunDispatch-BQT4DEA2.js → machineWsRunDispatch-TH3GMSR3.js} +41 -41
- package/{memberThunks-KRV5YXOB.js → memberThunks-2DWKLE6W.js} +7 -7
- package/package.json +1 -1
- package/{profileConfig-ZGOFORWV.js → profileConfig-KN3N2BLF.js} +7 -1
- package/{providerPresetApply-CRZFMQD5.js → providerPresetApply-GSJI4JBJ.js} +1 -1
- package/{providerRegistry-7IS43D3X.js → providerRegistry-TSSTPGWF.js} +1 -1
- package/{read-5KAZHHDM.js → read-L7QEJETH.js} +4 -4
- package/{readDocTool-5QO34OSX.js → readDocTool-QELXV2GW.js} +1 -1
- package/{readlineWorkspace-JHJSU5DS.js → readlineWorkspace-EIEQUTEZ.js} +317 -104
- package/{removeDialogAgentAction-6X63HMI3.js → removeDialogAgentAction-376XSUP2.js} +8 -8
- package/{runAgentClientLoop-5QIGEALK.js → runAgentClientLoop-3KHKKBZI.js} +39 -34
- package/{secretCommands-ZXZRLR3R.js → secretCommands-DNY56NSU.js} +11 -1
- package/{setDialogExtraReferencesAction-4MAYKKYW.js → setDialogExtraReferencesAction-QBDSH63D.js} +7 -7
- package/{setPrimaryDialogAgentAction-EGBAMREH.js → setPrimaryDialogAgentAction-537QFGW3.js} +8 -8
- package/settingThunks-4Z43ZSAT.js +923 -0
- package/{spaceCommands-ZWDPTURU.js → spaceCommands-T5Z4U7HP.js} +8 -8
- package/{streamAgentChatTurn-456DWXNY.js → streamAgentChatTurn-DMXXSEVX.js} +39 -39
- package/{switchDialogAgentAction-YBKTD6DO.js → switchDialogAgentAction-CSO6AKRL.js} +6 -6
- package/{tableCommands-U3QDY4L6.js → tableCommands-LBH3QPPO.js} +1 -1
- package/{toolApiClient-7WSJJJBV.js → toolApiClient-HGNO53TC.js} +2 -2
- package/{tools-IWNXKK4Y.js → tools-RMT7NAMC.js} +29 -28
- package/{updateCommands-NQXAGFM7.js → updateCommands-LXZLG44Y.js} +2 -2
- package/{updateDialogTitleAction-SX53FZWO.js → updateDialogTitleAction-Z4WNUH6Y.js} +14 -13
- package/{workloadLifecycle-36DXRZKU.js → workloadLifecycle-6O6PMISX.js} +2 -2
- package/chunk-W4S6OTSC.js +0 -35
- package/settingThunks-FTDRZNSJ.js +0 -1371
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BYQOCH75.js";
|
|
9
9
|
import {
|
|
10
10
|
CONFIRMATION_INPUT_KEYS,
|
|
11
11
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
performFetchRequest,
|
|
15
15
|
sanitizeOutboundMessages,
|
|
16
16
|
stripModelToolArgs
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GAVUTXM5.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YTXQ2U2X.js";
|
|
22
22
|
import {
|
|
23
23
|
classifyApiError,
|
|
24
24
|
classifyGenerationError,
|
|
25
25
|
extractErrorDiagnostics
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2BKUVRC5.js";
|
|
27
27
|
import {
|
|
28
28
|
createSSEParser,
|
|
29
29
|
createToolRunId,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
toolRunSetPending,
|
|
33
33
|
toolRunStarted,
|
|
34
34
|
toolRunSucceeded
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-CDWHHLK5.js";
|
|
36
36
|
import {
|
|
37
37
|
getPublicImageAgentMode
|
|
38
38
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -42,10 +42,10 @@ import {
|
|
|
42
42
|
messageStreaming,
|
|
43
43
|
toolResultNeedsUserConfirmation,
|
|
44
44
|
updateToolMessage
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-WTFRBJT5.js";
|
|
46
46
|
import {
|
|
47
47
|
streamAgentChatTurn
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-4UOEOHY3.js";
|
|
49
49
|
import {
|
|
50
50
|
getCurrentSpaceId
|
|
51
51
|
} from "./chunk-ZJ7UHBJS.js";
|
|
@@ -56,16 +56,16 @@ import {
|
|
|
56
56
|
} from "./chunk-OWYYDMGJ.js";
|
|
57
57
|
import {
|
|
58
58
|
selectCurrentServer
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-32ZKZET7.js";
|
|
60
60
|
import {
|
|
61
61
|
write
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZVQHBIWV.js";
|
|
63
63
|
import {
|
|
64
64
|
createAsyncThunk
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WRCZXJ4N.js";
|
|
66
66
|
import {
|
|
67
67
|
selectIdentityToken
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-PXYBUFDB.js";
|
|
69
69
|
import {
|
|
70
70
|
classifyOutboundErrorCategory,
|
|
71
71
|
createOutboundDiagnosticCall,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
} from "./chunk-6TF64IF2.js";
|
|
89
89
|
import {
|
|
90
90
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-C6FY7HWI.js";
|
|
92
92
|
import {
|
|
93
93
|
getModelInfo
|
|
94
94
|
} from "./chunk-2MTE2PEH.js";
|
|
@@ -573,7 +573,10 @@ var processToolData = createAsyncThunk(
|
|
|
573
573
|
const toolResult = await found.executor(executionToolArgs, thunkApi, {
|
|
574
574
|
parentMessageId,
|
|
575
575
|
toolRunId,
|
|
576
|
-
agentKey
|
|
576
|
+
agentKey,
|
|
577
|
+
// 定档信号:这里是前台对话流式路径,来源恒为 chat;对话 id 用于数历史搜索。
|
|
578
|
+
...args.dialogId ? { dialogId: args.dialogId } : {},
|
|
579
|
+
origin: "chat"
|
|
577
580
|
});
|
|
578
581
|
const rawData = toolResult?.rawData ?? toolResult;
|
|
579
582
|
const llmContext = asOptionalTrimmedString(toolResult?.llmContext);
|
|
@@ -750,7 +753,8 @@ var handleToolCalls = createAsyncThunk(
|
|
|
750
753
|
toolCall: { ...toolCall, id: toolCallId },
|
|
751
754
|
parentMessageId: messageId,
|
|
752
755
|
toolRunId,
|
|
753
|
-
agentKey: agentConfig.dbKey
|
|
756
|
+
agentKey: agentConfig.dbKey,
|
|
757
|
+
dialogId
|
|
754
758
|
})
|
|
755
759
|
).unwrap();
|
|
756
760
|
const toolName = result.toolName;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// packages/core/positiveFiniteNumberOrFallback.ts
|
|
2
|
+
function parsePositiveFiniteNumberOrFallback(value, fallback) {
|
|
3
|
+
const parsed = Number(value);
|
|
4
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
parsePositiveFiniteNumberOrFallback
|
|
9
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer,
|
|
3
3
|
selectRemoteServers
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-32ZKZET7.js";
|
|
5
5
|
import {
|
|
6
6
|
noloDeleteRequest,
|
|
7
7
|
noloWriteRequest
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WRCZXJ4N.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeTimeFields
|
|
11
11
|
} from "./chunk-6Q7UTJKR.js";
|
|
12
12
|
import {
|
|
13
13
|
selectIdentityUser,
|
|
14
14
|
selectIdentityUserId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PXYBUFDB.js";
|
|
16
16
|
import {
|
|
17
17
|
createUserKey,
|
|
18
18
|
extractAgentInfo,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assembleAgentDiscoveryResult,
|
|
3
3
|
resolveDiscoveryScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KLA62VVE.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchWithTransientRetry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KFHREHUQ.js";
|
|
8
8
|
import {
|
|
9
9
|
getUserDataItemTimestamp,
|
|
10
10
|
mergeAndDedupUserData
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toolRunUpdated,
|
|
21
21
|
uiCardFallback,
|
|
22
22
|
waitForAbortableDelay
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CDWHHLK5.js";
|
|
24
24
|
import {
|
|
25
25
|
isGatewayHttpStatus
|
|
26
26
|
} from "./chunk-NF64D32W.js";
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
isDrainExhaustedResponse,
|
|
31
31
|
normalizeNonNegativeMs,
|
|
32
32
|
parseRetryAfterHeaderMs
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3L2WKC3W.js";
|
|
34
34
|
import {
|
|
35
35
|
AGENT_UPDATE_FIELD_NAMES,
|
|
36
36
|
normalizeAgentUpdateFieldList
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-VYNMQ6HW.js";
|
|
38
38
|
import {
|
|
39
39
|
ToolApiError,
|
|
40
40
|
buildToolRequestHeaders,
|
|
@@ -42,14 +42,14 @@ import {
|
|
|
42
42
|
getRequestConfig,
|
|
43
43
|
getToolBaseUrl,
|
|
44
44
|
getToolRequestContext
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MYOH447Z.js";
|
|
46
46
|
import {
|
|
47
47
|
readDocFunc,
|
|
48
48
|
readDocFunctionSchema,
|
|
49
49
|
readPageFunc,
|
|
50
50
|
readPageFunctionSchema,
|
|
51
51
|
resolvePageReadMarkdown
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-US6MKPE7.js";
|
|
53
53
|
import {
|
|
54
54
|
markdownToSlate
|
|
55
55
|
} from "./chunk-5MM7NNO6.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "./chunk-VF4K2QE6.js";
|
|
65
65
|
import {
|
|
66
66
|
createDocState
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-EQGFFDNA.js";
|
|
68
68
|
import {
|
|
69
69
|
addMemberSpace,
|
|
70
70
|
fetchAuthoritativeRemoteSpace,
|
|
@@ -76,16 +76,16 @@ import {
|
|
|
76
76
|
setMembershipRejected,
|
|
77
77
|
setSpaceInitialized,
|
|
78
78
|
updateMemberSpaceName
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-J2ATF74A.js";
|
|
80
80
|
import {
|
|
81
81
|
createDialogAction
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-G476FQ7Q.js";
|
|
83
83
|
import {
|
|
84
84
|
setDialogExtraReferencesAction
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-CON6SI7N.js";
|
|
86
86
|
import {
|
|
87
87
|
shareResourceAction
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-YPG7TUQD.js";
|
|
89
89
|
import {
|
|
90
90
|
DEFAULT_COLLAPSED_CATEGORIES,
|
|
91
91
|
addContentToSpace,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
updateContentCategory,
|
|
103
103
|
updateContentTitle,
|
|
104
104
|
writeStoredCollapsedCategories
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-VDEVDGEM.js";
|
|
106
106
|
import {
|
|
107
107
|
buildDatabaseFileContentUrl,
|
|
108
108
|
deleteDialog,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
selectMsgById,
|
|
116
116
|
uiAskChoiceFunc,
|
|
117
117
|
uiAskChoiceFunctionSchema
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-WTFRBJT5.js";
|
|
119
119
|
import {
|
|
120
120
|
buildMediaToolConfirmation,
|
|
121
121
|
normalizeMediaConfirmExecutionRevision
|
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
runLlm,
|
|
127
127
|
streamAgentChatTurn,
|
|
128
128
|
updateAgent
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-4UOEOHY3.js";
|
|
130
130
|
import {
|
|
131
131
|
getCurrentSpaceId,
|
|
132
132
|
getCurrentSpaceIdRaw,
|
|
@@ -148,12 +148,12 @@ import {
|
|
|
148
148
|
import {
|
|
149
149
|
selectCurrentServer,
|
|
150
150
|
selectSyncServers
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-32ZKZET7.js";
|
|
152
152
|
import {
|
|
153
153
|
UNCATEGORIZED_ID,
|
|
154
154
|
addContentAction,
|
|
155
155
|
checkSpaceMembership
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-M2P3OGXZ.js";
|
|
157
157
|
import {
|
|
158
158
|
createSpaceKey,
|
|
159
159
|
normalizeSpaceId
|
|
@@ -169,10 +169,10 @@ import {
|
|
|
169
169
|
selectEntities,
|
|
170
170
|
toTimestampMs,
|
|
171
171
|
write
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-ZVQHBIWV.js";
|
|
173
173
|
import {
|
|
174
174
|
readAction
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-NDZOXXIM.js";
|
|
176
176
|
import {
|
|
177
177
|
DEVICE_LOCAL_OWNER_ID,
|
|
178
178
|
getRuntimeServerContext,
|
|
@@ -182,16 +182,16 @@ import {
|
|
|
182
182
|
resolveEffectiveSpaceActorId,
|
|
183
183
|
resolveRecordOwnerUserId,
|
|
184
184
|
selectRuntimeSnapshot
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-2SGAI64X.js";
|
|
186
186
|
import {
|
|
187
187
|
createAsyncThunk,
|
|
188
188
|
noloWriteRequest
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-WRCZXJ4N.js";
|
|
190
190
|
import {
|
|
191
191
|
selectIdentityToken,
|
|
192
192
|
selectIdentityUserBalance,
|
|
193
193
|
selectIdentityUserId
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-PXYBUFDB.js";
|
|
195
195
|
import {
|
|
196
196
|
buildTombstoneRecord,
|
|
197
197
|
isTombstoneRecord
|
|
@@ -199,7 +199,7 @@ import {
|
|
|
199
199
|
import {
|
|
200
200
|
listBuiltinSkills,
|
|
201
201
|
resolveBuiltinSkillByName
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-DC3SZCRR.js";
|
|
203
203
|
import {
|
|
204
204
|
CAPABILITY_PACKS
|
|
205
205
|
} from "./chunk-JZX2XLKC.js";
|
|
@@ -3881,7 +3881,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
3881
3881
|
const deletedDialogIds = [];
|
|
3882
3882
|
const deletedDialogKeys = [];
|
|
3883
3883
|
const failures = [];
|
|
3884
|
-
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-
|
|
3884
|
+
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-ERMZYMS6.js");
|
|
3885
3885
|
for (const target of targets) {
|
|
3886
3886
|
try {
|
|
3887
3887
|
await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
|
|
@@ -4197,7 +4197,7 @@ var readSkillDocFunctionSchema = {
|
|
|
4197
4197
|
}
|
|
4198
4198
|
};
|
|
4199
4199
|
async function readSkillDocFunc(args, thunkApi) {
|
|
4200
|
-
const { buildReadDocResult } = await import("./readDocTool-
|
|
4200
|
+
const { buildReadDocResult } = await import("./readDocTool-QELXV2GW.js");
|
|
4201
4201
|
const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
|
|
4202
4202
|
if (typeof id !== "string" || !id.trim()) {
|
|
4203
4203
|
throw new Error("readSkillDoc requires id or doc.");
|
|
@@ -4467,6 +4467,7 @@ var createInitialState = () => ({
|
|
|
4467
4467
|
favoritedAtById: {},
|
|
4468
4468
|
initialized: false,
|
|
4469
4469
|
loading: false,
|
|
4470
|
+
snapshotComplete: false,
|
|
4470
4471
|
error: null
|
|
4471
4472
|
});
|
|
4472
4473
|
var state = createInitialState();
|
|
@@ -4986,7 +4987,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
|
|
|
4986
4987
|
const spaceKey = createSpaceKey.space(spaceId);
|
|
4987
4988
|
const readSpace = async (dbKey) => {
|
|
4988
4989
|
try {
|
|
4989
|
-
const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-
|
|
4990
|
+
const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-DC2J53RC.js");
|
|
4990
4991
|
if (fresh) {
|
|
4991
4992
|
return await dispatch(readAndWait2(dbKey)).unwrap();
|
|
4992
4993
|
}
|
|
@@ -9297,7 +9298,7 @@ ${preview}`
|
|
|
9297
9298
|
// packages/ai/tools/exaSearchTool.ts
|
|
9298
9299
|
var exaSearchSchema = {
|
|
9299
9300
|
name: "exa_search",
|
|
9300
|
-
description: "\u4F7F\u7528 Exa
|
|
9301
|
+
description: "\u4F7F\u7528 Exa \u667A\u80FD\u641C\u7D22\u5F15\u64CE\u67E5\u627E\u4FE1\u606F\u3002\u53EF\u9009\u5730\u6309\u68C0\u7D22\u610F\u56FE\u3001\u5185\u5BB9\u7C7B\u76EE\u3001\u65F6\u95F4\u8303\u56F4\u4E0E\u57DF\u540D\u505A\u6536\u7A84\u3002",
|
|
9301
9302
|
parameters: {
|
|
9302
9303
|
type: "object",
|
|
9303
9304
|
properties: {
|
|
@@ -9307,49 +9308,160 @@ var exaSearchSchema = {
|
|
|
9307
9308
|
},
|
|
9308
9309
|
numResults: {
|
|
9309
9310
|
type: "number",
|
|
9310
|
-
description: "\u8FD4\u56DE\u7684\u7ED3\u679C\u6570\u91CF\
|
|
9311
|
-
default: 5
|
|
9311
|
+
description: "\u8FD4\u56DE\u7684\u7ED3\u679C\u6570\u91CF\uFF1B\u4E0D\u586B\u5219\u6309\u670D\u52A1\u7AEF\u5B9A\u6863\u53D6\u503C\u3002"
|
|
9312
9312
|
},
|
|
9313
|
-
|
|
9314
|
-
type: "
|
|
9315
|
-
|
|
9316
|
-
|
|
9313
|
+
intent: {
|
|
9314
|
+
type: "string",
|
|
9315
|
+
enum: ["quick", "research", "exhaustive"],
|
|
9316
|
+
description: "\u68C0\u7D22\u610F\u56FE\u6863\u4F4D\uFF1Aquick\uFF1D\u5FEB\u901F\u626B\u4E00\u773C\uFF08\u9ED8\u8BA4\u6863\uFF0C\u591F\u7528\u5373\u53EF\uFF09\uFF1Bresearch\uFF1D\u6DF1\u5165\u8C03\u7814\uFF0C\u9700\u8981\u66F4\u5B8C\u6574\u7684\u7ED3\u679C\u4E0E\u66F4\u957F\u7684\u6458\u8981\uFF1Bexhaustive\uFF1D\u7A77\u5C3D\u5F0F\u68C0\u7D22\uFF0C\u7ED3\u679C\u6700\u591A\u3001\u5F00\u9500\u4E5F\u6700\u5927\u3002\u7EDD\u5927\u591A\u6570\u60C5\u51B5\u8BF7\u7701\u7565\u672C\u9879\u2014\u2014\u7701\u7565\u5373\u7531\u670D\u52A1\u7AEF\u6309\u573A\u666F\u81EA\u52A8\u5B9A\u6863\uFF0C\u4E0D\u8981\u4E3A\u4E86\u586B\u5B83\u800C\u731C\u6D4B\u3002"
|
|
9317
9317
|
},
|
|
9318
|
-
|
|
9318
|
+
category: {
|
|
9319
9319
|
type: "string",
|
|
9320
|
-
|
|
9321
|
-
description: "\u641C\u7D22\u7C7B\u578B\uFF1A'neural' (\u8BED\u4E49\u641C\u7D22\uFF0C\u9ED8\u8BA4) \u6216 'keyword' (\u7CBE\u786E\u5339\u914D)\u3002",
|
|
9322
|
-
default: "neural"
|
|
9320
|
+
description: "\u5185\u5BB9\u7C7B\u76EE\u7B5B\u9009\u3002\u5E38\u89C1\u53D6\u503C\uFF1Apublication\uFF08\u8BBA\u6587/\u51FA\u7248\u7269\uFF09\u3001company\uFF08\u516C\u53F8\u4FE1\u606F\uFF09\u3001people\uFF08\u4EBA\u7269\uFF09\u3001news\uFF08\u65B0\u95FB\u8D44\u8BAF\uFF09\u3002\u4E0D\u786E\u5B9A\u7C7B\u76EE\u5C31\u522B\u586B\uFF0C\u7559\u7A7A\u5373\u53EF\u3002"
|
|
9323
9321
|
},
|
|
9324
|
-
|
|
9325
|
-
type: "
|
|
9326
|
-
|
|
9327
|
-
|
|
9322
|
+
timeRange: {
|
|
9323
|
+
type: "string",
|
|
9324
|
+
enum: ["day", "week", "month", "year"],
|
|
9325
|
+
description: "\u53EA\u4FDD\u7559\u8BE5\u65F6\u95F4\u8303\u56F4\u5185\u53D1\u5E03\u7684\u7ED3\u679C\uFF08day\uFF1D24 \u5C0F\u65F6\u5185\uFF0Cweek\uFF1D\u4E00\u5468\u5185\uFF0Cmonth\uFF1D\u4E00\u6708\u5185\uFF0Cyear\uFF1D\u4E00\u5E74\u5185\uFF09\u3002\u4E0D\u586B\u5219\u4E0D\u9650\u65F6\u95F4\u3002"
|
|
9326
|
+
},
|
|
9327
|
+
includeDomains: {
|
|
9328
|
+
type: "array",
|
|
9329
|
+
items: { type: "string" },
|
|
9330
|
+
description: '\u53EA\u4FDD\u7559\u8FD9\u4E9B\u57DF\u540D\u4E0B\u7684\u7ED3\u679C\uFF08\u4F8B\u5982 ["arxiv.org"]\uFF09\u3002\u4E0D\u586B\u5219\u4E0D\u9650\u3002'
|
|
9331
|
+
},
|
|
9332
|
+
excludeDomains: {
|
|
9333
|
+
type: "array",
|
|
9334
|
+
items: { type: "string" },
|
|
9335
|
+
description: '\u6392\u9664\u8FD9\u4E9B\u57DF\u540D\u4E0B\u7684\u7ED3\u679C\uFF08\u4F8B\u5982 ["pinterest.com"]\uFF09\u3002\u4E0D\u586B\u5219\u4E0D\u6392\u9664\u3002'
|
|
9328
9336
|
}
|
|
9329
9337
|
},
|
|
9330
9338
|
required: ["query"]
|
|
9331
9339
|
}
|
|
9332
9340
|
};
|
|
9333
|
-
var
|
|
9334
|
-
|
|
9335
|
-
|
|
9341
|
+
var EXA_SEARCH_TOOL_NAME = "exa_search";
|
|
9342
|
+
var NON_COMPLETED_TOOL_STATUS = /* @__PURE__ */ new Set(["running", "pending"]);
|
|
9343
|
+
var collectDialogMessages = (state2, dialogId) => {
|
|
9344
|
+
if (!dialogId) return [];
|
|
9345
|
+
const slice = state2?.message ?? state2?.messages;
|
|
9346
|
+
const dialogState = slice?.[dialogId];
|
|
9347
|
+
const msgs = dialogState?.msgs ?? dialogState;
|
|
9348
|
+
if (!msgs || typeof msgs !== "object") return [];
|
|
9349
|
+
const entities = msgs.entities ?? {};
|
|
9350
|
+
const ids = Array.isArray(msgs.ids) ? msgs.ids : Object.keys(entities);
|
|
9351
|
+
const out = [];
|
|
9352
|
+
for (const id of ids) {
|
|
9353
|
+
const m = entities[id];
|
|
9354
|
+
if (m && typeof m === "object") out.push(m);
|
|
9355
|
+
}
|
|
9356
|
+
return out;
|
|
9357
|
+
};
|
|
9358
|
+
var isExaSearchRow = (m) => {
|
|
9359
|
+
if (!m || typeof m !== "object") return false;
|
|
9360
|
+
const payload = m.toolPayload;
|
|
9361
|
+
const name = m.toolName ?? payload?.toolName;
|
|
9362
|
+
const status = payload?.status;
|
|
9363
|
+
if (typeof status === "string" && NON_COMPLETED_TOOL_STATUS.has(status)) {
|
|
9364
|
+
return false;
|
|
9365
|
+
}
|
|
9366
|
+
return name === EXA_SEARCH_TOOL_NAME;
|
|
9367
|
+
};
|
|
9368
|
+
var readResultCount = (m) => {
|
|
9369
|
+
const candidates = [
|
|
9370
|
+
m?.content,
|
|
9371
|
+
m?.toolPayload?.rawData,
|
|
9372
|
+
m?.toolPayload?.output,
|
|
9373
|
+
m?.toolPayload?.result
|
|
9374
|
+
];
|
|
9375
|
+
for (const candidate of candidates) {
|
|
9376
|
+
let value = candidate;
|
|
9377
|
+
if (typeof value === "string") {
|
|
9378
|
+
try {
|
|
9379
|
+
value = JSON.parse(value);
|
|
9380
|
+
} catch {
|
|
9381
|
+
continue;
|
|
9382
|
+
}
|
|
9383
|
+
}
|
|
9384
|
+
if (!value || typeof value !== "object") continue;
|
|
9385
|
+
const inner = value.rawData ?? value;
|
|
9386
|
+
const results = inner?.results;
|
|
9387
|
+
if (Array.isArray(results)) return results.length;
|
|
9388
|
+
}
|
|
9389
|
+
return void 0;
|
|
9390
|
+
};
|
|
9391
|
+
var resolvePlanSignals = (thunkApi, context2) => {
|
|
9392
|
+
let priorSearches = context2?.priorSearches;
|
|
9393
|
+
let lastResultCount = context2?.lastResultCount;
|
|
9394
|
+
if (priorSearches === void 0) {
|
|
9395
|
+
let rows = [];
|
|
9396
|
+
try {
|
|
9397
|
+
rows = collectDialogMessages(
|
|
9398
|
+
thunkApi?.getState?.(),
|
|
9399
|
+
context2?.dialogId
|
|
9400
|
+
);
|
|
9401
|
+
} catch {
|
|
9402
|
+
rows = [];
|
|
9403
|
+
}
|
|
9404
|
+
if (rows.length > 0) {
|
|
9405
|
+
const history = rows.filter(
|
|
9406
|
+
(m) => isExaSearchRow(m) && (!context2?.parentMessageId || m.parentMessageId !== context2.parentMessageId)
|
|
9407
|
+
);
|
|
9408
|
+
priorSearches = history.length;
|
|
9409
|
+
const last = history[history.length - 1];
|
|
9410
|
+
if (last) lastResultCount = readResultCount(last);
|
|
9411
|
+
}
|
|
9412
|
+
}
|
|
9413
|
+
return {
|
|
9414
|
+
...typeof priorSearches === "number" && Number.isFinite(priorSearches) ? { priorSearches: Math.max(0, Math.trunc(priorSearches)) } : {},
|
|
9415
|
+
...typeof lastResultCount === "number" && Number.isFinite(lastResultCount) ? { lastResultCount: Math.max(0, Math.trunc(lastResultCount)) } : {},
|
|
9416
|
+
...context2?.origin ? { origin: context2.origin } : {}
|
|
9417
|
+
};
|
|
9418
|
+
};
|
|
9419
|
+
var exaSearchFunc = async (input, thunkApi, context2) => {
|
|
9420
|
+
const {
|
|
9336
9421
|
query,
|
|
9337
9422
|
numResults,
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9423
|
+
intent,
|
|
9424
|
+
category,
|
|
9425
|
+
timeRange,
|
|
9426
|
+
includeDomains,
|
|
9427
|
+
excludeDomains,
|
|
9428
|
+
includeContent
|
|
9429
|
+
} = input;
|
|
9430
|
+
const body = { query };
|
|
9431
|
+
if (numResults !== void 0) body.numResults = numResults;
|
|
9432
|
+
if (typeof intent === "string" && intent) body.intent = intent;
|
|
9433
|
+
if (typeof category === "string" && category) body.category = category;
|
|
9434
|
+
if (typeof timeRange === "string" && timeRange) body.timeRange = timeRange;
|
|
9435
|
+
if (Array.isArray(includeDomains) && includeDomains.length > 0) {
|
|
9436
|
+
body.includeDomains = includeDomains;
|
|
9437
|
+
}
|
|
9438
|
+
if (Array.isArray(excludeDomains) && excludeDomains.length > 0) {
|
|
9439
|
+
body.excludeDomains = excludeDomains;
|
|
9440
|
+
}
|
|
9441
|
+
if (typeof includeContent === "boolean") body.includeContent = includeContent;
|
|
9442
|
+
const signals = resolvePlanSignals(thunkApi, context2);
|
|
9443
|
+
if (signals.priorSearches !== void 0) body.priorSearches = signals.priorSearches;
|
|
9444
|
+
if (signals.lastResultCount !== void 0) body.lastResultCount = signals.lastResultCount;
|
|
9445
|
+
if (signals.origin) body.origin = signals.origin;
|
|
9446
|
+
const data = await callToolApi(thunkApi, "/api/exa-search", body, { withAuth: true });
|
|
9447
|
+
const results = (data.results || []).map((item) => {
|
|
9448
|
+
const raw = item.text ?? (Array.isArray(item.highlights) ? item.highlights.join("\n") : void 0);
|
|
9449
|
+
return {
|
|
9450
|
+
title: item.title,
|
|
9451
|
+
url: item.url,
|
|
9452
|
+
publishedDate: item.publishedDate,
|
|
9453
|
+
author: item.author,
|
|
9454
|
+
content: typeof raw === "string" ? raw.slice(0, 2500) : void 0
|
|
9455
|
+
};
|
|
9456
|
+
});
|
|
9457
|
+
const warnings = Array.isArray(data.warnings) ? data.warnings : void 0;
|
|
9349
9458
|
return {
|
|
9350
9459
|
summary: `Found ${results.length} results for "${query}"`,
|
|
9351
9460
|
results,
|
|
9352
|
-
queryUsed: data.autopromptString || query
|
|
9461
|
+
queryUsed: data.queryUsed || data.autopromptString || query,
|
|
9462
|
+
...warnings && warnings.length > 0 ? { warnings } : {},
|
|
9463
|
+
// plan.ruleId 让调用方能判断服务端这次命中的定档规则是否合预期。
|
|
9464
|
+
...data.plan && typeof data.plan === "object" ? { plan: data.plan } : {}
|
|
9353
9465
|
};
|
|
9354
9466
|
};
|
|
9355
9467
|
|
|
@@ -10744,7 +10856,7 @@ var cloudflareCrawlStatusFunctionSchema = {
|
|
|
10744
10856
|
async function cloudflareCrawlStatusFunc(args, thunkApi) {
|
|
10745
10857
|
const { jobId, limit, status, cursor } = args;
|
|
10746
10858
|
if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
|
|
10747
|
-
const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-
|
|
10859
|
+
const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-HGNO53TC.js");
|
|
10748
10860
|
const { baseUrl, token } = getToolRequestContext2(thunkApi);
|
|
10749
10861
|
const params = new URLSearchParams();
|
|
10750
10862
|
if (limit !== void 0) params.set("limit", String(limit));
|
|
@@ -11522,7 +11634,7 @@ var selectUserIdFromState = (state2) => {
|
|
|
11522
11634
|
var selectCurrentServerFromState = (state2) => typeof state2?.settings?.currentServer === "string" ? state2.settings.currentServer : null;
|
|
11523
11635
|
async function addImageContentToSpace(input) {
|
|
11524
11636
|
const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
|
|
11525
|
-
const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-
|
|
11637
|
+
const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-BI6RDRTQ.js")).addContentAction;
|
|
11526
11638
|
await addContentAction2(
|
|
11527
11639
|
{
|
|
11528
11640
|
spaceId: input.spaceId,
|
|
@@ -13773,10 +13885,19 @@ function resolveCliLocalSpawnDispatch(input) {
|
|
|
13773
13885
|
...input,
|
|
13774
13886
|
host: "cli-local"
|
|
13775
13887
|
});
|
|
13888
|
+
const plan = resolvePlanForRequestedKey(requested, input.allowHostWrites, input.readOnly);
|
|
13889
|
+
assertExplicitCwdHonoredByDispatchTarget({
|
|
13890
|
+
cwd: input.cwd,
|
|
13891
|
+
target: plan.target,
|
|
13892
|
+
...plan.runtimeKey !== void 0 ? { runtimeKey: plan.runtimeKey } : {}
|
|
13893
|
+
});
|
|
13894
|
+
return plan;
|
|
13895
|
+
}
|
|
13896
|
+
function resolvePlanForRequestedKey(requested, allowHostWrites, readOnly) {
|
|
13776
13897
|
if (requested) {
|
|
13777
13898
|
const capability = resolveCliLocalRuntimeKeyCapability(requested);
|
|
13778
13899
|
const target = capability.target ?? (isDockerRuntimeKey(requested) ? "docker-sandbox" : "host");
|
|
13779
|
-
if (target === "host" &&
|
|
13900
|
+
if (target === "host" && allowHostWrites !== true) {
|
|
13780
13901
|
throw new Error(HOST_WRITES_CONFIRMATION_REQUIRED_MESSAGE);
|
|
13781
13902
|
}
|
|
13782
13903
|
return {
|
|
@@ -13785,7 +13906,7 @@ function resolveCliLocalSpawnDispatch(input) {
|
|
|
13785
13906
|
reason: target === "host" ? "requested-host-writes" : "requested"
|
|
13786
13907
|
};
|
|
13787
13908
|
}
|
|
13788
|
-
if (
|
|
13909
|
+
if (readOnly === true) {
|
|
13789
13910
|
return { target: "host", reason: "read-only-host" };
|
|
13790
13911
|
}
|
|
13791
13912
|
return {
|
|
@@ -13794,6 +13915,36 @@ function resolveCliLocalSpawnDispatch(input) {
|
|
|
13794
13915
|
reason: "default-docker-sandbox"
|
|
13795
13916
|
};
|
|
13796
13917
|
}
|
|
13918
|
+
function normalizeExplicitHostCwd(rawCwd) {
|
|
13919
|
+
if (typeof rawCwd !== "string") return void 0;
|
|
13920
|
+
const trimmed2 = rawCwd.trim();
|
|
13921
|
+
if (!trimmed2 || !isAbsoluteRunCwd(trimmed2)) return void 0;
|
|
13922
|
+
return trimmed2;
|
|
13923
|
+
}
|
|
13924
|
+
var SANDBOX_DOES_NOT_HONOR_CWD_REASON = `\u6C99\u76D2\u540E\u7AEF\u4E0D\u5151\u73B0\u5BBF\u4E3B cwd\uFF1A\u6C99\u76D2\u91CC\u7684\u4ED3\u5E93\u6302\u5728\u6C99\u76D2\u5185\u81EA\u5DF1\u7684\u8DEF\u5F84\uFF08\u5982 /home/bun/app\uFF09\uFF0C\u4F20\u8FDB\u53BB\u7684 cwd \u4F1A\u88AB\u9759\u9ED8\u66FF\u6362\uFF1B\u5B50 run \u6539\u7684\u6587\u4EF6\u968F\u6C99\u76D2\u505C\u6B62\u4E00\u8D77\u6D88\u5931\uFF0C\u800C\u8C03\u7528\u65B9\u62FF\u5230\u7684\u662F\u300C\u6210\u529F\u300D\uFF082026-10-23 \u4E8B\u6545\uFF09\u3002`;
|
|
13925
|
+
function describeDispatchTarget(target, runtimeKey) {
|
|
13926
|
+
if (target === "docker-sandbox") {
|
|
13927
|
+
return `\u672C\u673A docker \u6C99\u76D2\uFF08runtimeKey="${runtimeKey ?? "docker"}"\uFF09`;
|
|
13928
|
+
}
|
|
13929
|
+
if (target === "instabox") return `Instabox \u6C99\u76D2\uFF08runtimeKey="instabox"\uFF09`;
|
|
13930
|
+
return "\u5BBF\u4E3B\u6267\u884C";
|
|
13931
|
+
}
|
|
13932
|
+
function buildExplicitCwdSandboxConflictMessage(input) {
|
|
13933
|
+
const landing = describeDispatchTarget(input.target, input.runtimeKey);
|
|
13934
|
+
return `startAgentRun \u663E\u5F0F\u4F20\u4E86 cwd="${input.cwd}"\uFF0C\u4F46\u672C\u6B21\u51B3\u7B56\u7684\u843D\u70B9\u662F${landing}\uFF1A` + SANDBOX_DOES_NOT_HONOR_CWD_REASON + `\u5DF2\u62D2\u7EDD\u6D3E\u53D1\uFF0C\u672A\u542F\u52A8\u4EFB\u4F55 run\uFF08\u4E0D\u9759\u9ED8\u66FF\u6362\u8DEF\u5F84\u3001\u4E5F\u4E0D\u9759\u9ED8\u964D\u7EA7\u5230\u5BBF\u4E3B\uFF09\u3002\u8981\u8BA9\u5B83\u771F\u7684\u5728 ${input.cwd} \u4E0A\u52A8\u624B\uFF1A\u6539\u7528 runtimeKey: "local" + allowHostWrites: true\uFF08\u5BBF\u4E3B\u6267\u884C\uFF0Ccwd \u4F1A\u88AB\u5982\u5B9E\u5151\u73B0\uFF09\uFF1B\u6216\u53BB\u6389 cwd\uFF0C\u8BA9\u5B50 run \u5728\u6C99\u76D2\u81EA\u5DF1\u7684\u4ED3\u5E93\u91CC\u5DE5\u4F5C\u3002`;
|
|
13935
|
+
}
|
|
13936
|
+
function assertExplicitCwdHonoredByDispatchTarget(input) {
|
|
13937
|
+
const explicitCwd = normalizeExplicitHostCwd(input.cwd);
|
|
13938
|
+
if (!explicitCwd) return;
|
|
13939
|
+
if (input.target === "host") return;
|
|
13940
|
+
throw new Error(
|
|
13941
|
+
buildExplicitCwdSandboxConflictMessage({
|
|
13942
|
+
cwd: explicitCwd,
|
|
13943
|
+
target: input.target,
|
|
13944
|
+
...input.runtimeKey !== void 0 ? { runtimeKey: input.runtimeKey } : {}
|
|
13945
|
+
})
|
|
13946
|
+
);
|
|
13947
|
+
}
|
|
13797
13948
|
function assertCliLocalSpawnArgvInvariant(argv, context2 = "cli-local spawn argv") {
|
|
13798
13949
|
const indexes = [];
|
|
13799
13950
|
for (let i = 0; i < argv.length; i += 1) {
|
|
@@ -17758,6 +17909,8 @@ function toAppSummary(record, fallbackServerOrigin) {
|
|
|
17758
17909
|
}
|
|
17759
17910
|
|
|
17760
17911
|
// packages/app/utils/myContentItems.ts
|
|
17912
|
+
var dialogSummaryStatus = (value) => value === null || typeof value === "string" && ["pending", "running", "done", "completed", "failed", "cancelled"].includes(value) ? value : void 0;
|
|
17913
|
+
var dialogSummaryUnreadAt = (value) => value === null || typeof value === "number" && Number.isFinite(value) && value > 0 ? value : void 0;
|
|
17761
17914
|
var MY_CONTENT_USER_DATA_TYPES = [
|
|
17762
17915
|
"app" /* APP */,
|
|
17763
17916
|
"page" /* DOC */,
|
|
@@ -17837,9 +17990,12 @@ function buildMyContentItemsFromUserData(records, currentServer, spaceNameById,
|
|
|
17837
17990
|
fileSize: typeof record.fileSize === "number" ? record.fileSize : void 0,
|
|
17838
17991
|
originalName: typeof record.originalName === "string" && record.originalName.trim().length > 0 ? record.originalName : void 0,
|
|
17839
17992
|
contentKey,
|
|
17993
|
+
...record.type === "dialog" ? { status: dialogSummaryStatus(record.status), unreadAt: dialogSummaryUnreadAt(record.unreadAt) } : {},
|
|
17840
17994
|
pinned: Boolean(record.pinned),
|
|
17841
17995
|
createdAt: record.createdAt ?? record.created ?? 0,
|
|
17842
17996
|
updatedAt: timestamp,
|
|
17997
|
+
...record.deletedAt !== void 0 ? { deletedAt: record.deletedAt } : {},
|
|
17998
|
+
...record.restoredAt !== void 0 ? { restoredAt: record.restoredAt } : {},
|
|
17843
17999
|
spaceId,
|
|
17844
18000
|
spaceName,
|
|
17845
18001
|
serverOrigin: typeof record.serverOrigin === "string" && record.serverOrigin.trim().length > 0 ? record.serverOrigin : void 0,
|
|
@@ -18079,7 +18235,7 @@ var getMessageSortValue = (message) => {
|
|
|
18079
18235
|
const id = normalizeDialogSearchText(message.id);
|
|
18080
18236
|
return id ? id : normalizeDialogSearchText(message.dbKey);
|
|
18081
18237
|
};
|
|
18082
|
-
async function
|
|
18238
|
+
async function collectDialogMessages2(db, dialogId) {
|
|
18083
18239
|
if (!db?.iterator) return [];
|
|
18084
18240
|
const { start, end } = dialogMessageRange(dialogId);
|
|
18085
18241
|
let iterator = db.iterator({
|
|
@@ -18128,7 +18284,7 @@ async function fetchDialogMessagesFromServer(args) {
|
|
|
18128
18284
|
}));
|
|
18129
18285
|
}
|
|
18130
18286
|
async function collectBestAvailableDialogMessages(db, dialogId, thunkApi, scanLimit, dialogKey) {
|
|
18131
|
-
const localMessages = await
|
|
18287
|
+
const localMessages = await collectDialogMessages2(db, dialogId);
|
|
18132
18288
|
const state2 = thunkApi?.getState?.();
|
|
18133
18289
|
const runtime = state2 ? selectRuntimeSnapshot(state2) : null;
|
|
18134
18290
|
const serverBases = Array.from(new Set([
|
|
@@ -18307,7 +18463,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
18307
18463
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
18308
18464
|
};
|
|
18309
18465
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
18310
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
18466
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-HXKI6W5D.js");
|
|
18311
18467
|
if (getDocState().pageKey === id) {
|
|
18312
18468
|
applyExternalDocUpdate({
|
|
18313
18469
|
slateData: finalSlateData,
|
|
@@ -18332,7 +18488,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
18332
18488
|
// packages/ai/tools/updateUserPreferenceProfileTool.ts
|
|
18333
18489
|
async function dispatchSetSettings(thunkApi, changes) {
|
|
18334
18490
|
const injectedSetSettings = thunkApi?.extra?.setSettings;
|
|
18335
|
-
const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-
|
|
18491
|
+
const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-4Z43ZSAT.js")).setSettings;
|
|
18336
18492
|
await thunkApi.dispatch(setSettings(changes)).unwrap();
|
|
18337
18493
|
}
|
|
18338
18494
|
var updateUserPreferenceProfileFunctionSchema = {
|
|
@@ -20155,7 +20311,7 @@ var baseToolDefinitions = [
|
|
|
20155
20311
|
executor: exaSearchFunc,
|
|
20156
20312
|
description: {
|
|
20157
20313
|
name: "exa_search",
|
|
20158
|
-
description: "\u4F7F\u7528 Exa \
|
|
20314
|
+
description: "\u4F7F\u7528 Exa \u667A\u80FD\u641C\u7D22\u5F15\u64CE\u83B7\u53D6\u9AD8\u8D28\u91CF\u3001\u7ED3\u6784\u5316\u7684\u7F51\u7EDC\u4FE1\u606F\uFF1B\u53EF\u6309\u68C0\u7D22\u610F\u56FE\u3001\u5185\u5BB9\u7C7B\u76EE\u3001\u65F6\u95F4\u8303\u56F4\u4E0E\u57DF\u540D\u6536\u7A84\uFF0C\u9ED8\u8BA4\u7531\u670D\u52A1\u7AEF\u6309\u573A\u666F\u81EA\u52A8\u5B9A\u6863\u3002",
|
|
20159
20315
|
category: "\u7F51\u7EDC\u4E0E\u667A\u80FD"
|
|
20160
20316
|
},
|
|
20161
20317
|
behavior: "data"
|