nolo-cli 0.8.0-alpha.24 → 0.8.0-alpha.26
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-2ZAPHFOX.js → _executeModel-HM7KOYQX.js} +48 -50
- package/{action-QM2ONPYZ.js → action-UAHWPMZB.js} +7 -8
- package/{addContentAction-UXY3GM53.js → addContentAction-PFIP76LT.js} +6 -8
- package/{addDialogAgentAction-MUBYOG65.js → addDialogAgentAction-LWDAIDEU.js} +8 -9
- package/{agentDeleteCommand-5TFSII4Z.js → agentDeleteCommand-M6KIV6ZZ.js} +35 -26
- package/{agentEmailCommands-XMXWGUMZ.js → agentEmailCommands-X24B32EE.js} +60 -61
- package/{agentListCommands-OWEFQEY4.js → agentListCommands-3TQWUC4W.js} +34 -26
- package/{agentMachineCommands-DGHYBBFC.js → agentMachineCommands-AHOFELNN.js} +37 -27
- package/{agentRecordCommands-I433EE5F.js → agentRecordCommands-GCX4YO5J.js} +53 -54
- package/{agentRunCommand-UQSX3IGW.js → agentRunCommand-6Z73OBXZ.js} +56 -59
- package/{agentRuntimeLocal-73SVOC5U.js → agentRuntimeLocal-6Q4CEFXY.js} +26 -13
- package/{agentSlice-JQCS4LR3.js → agentSlice-73367RQ3.js} +7 -8
- package/{authCommand-B6P2XYLN.js → authCommand-ELPMOABY.js} +13 -13
- package/{authCommands-4YKA4GTU.js → authCommands-PUQRVHHW.js} +5 -5
- package/{chunk-DS3VC4EA.js → chunk-2H4I6KR4.js} +5 -5
- package/{chunk-AFON4QUU.js → chunk-3QKO4EHV.js} +3 -3
- package/{chunk-LE6JAIXE.js → chunk-3WSPFJ7B.js} +6 -6
- package/{chunk-QWM7YWVT.js → chunk-4GBNEA5B.js} +1 -1
- package/{chunk-PXZAAB4L.js → chunk-4LG74DRG.js} +4 -4
- package/{chunk-IYMGQ3TN.js → chunk-66DXKPRS.js} +2 -2
- package/{chunk-L76QNLGU.js → chunk-6L2PIG7I.js} +1 -1
- package/{chunk-FZ2G3I4B.js → chunk-6PXKSN2M.js} +2 -2
- package/{chunk-GAKEBQD6.js → chunk-D6OQHXVG.js} +11 -7
- package/{chunk-GROGNZOA.js → chunk-DXLC3MIQ.js} +85 -2326
- package/{chunk-Q7S2ORXX.js → chunk-EUELM55L.js} +10 -10
- package/{chunk-BT57QC5K.js → chunk-GK7YFA5J.js} +14 -14
- package/chunk-GVQT3FIB.js +2286 -0
- package/{chunk-LRKEOCWY.js → chunk-HUHOMATY.js} +17 -17
- package/{chunk-6QFNUK2G.js → chunk-I2HCZWJU.js} +1 -1
- package/{chunk-WVS3GX3B.js → chunk-IB65MC33.js} +2 -2
- package/{chunk-C4DZRHFJ.js → chunk-IG2EZS3N.js} +64 -17
- package/{chunk-Z3NEXVYE.js → chunk-IKXL2HZ3.js} +38 -1
- package/{chunk-2CVZSC5L.js → chunk-IVAOVLM7.js} +1 -1
- package/{chunk-L3KWEH3V.js → chunk-KPFGD3YA.js} +43 -12
- package/{chunk-AVMKZHBC.js → chunk-L53FGHA4.js} +3 -2
- package/{chunk-WKQGZJVI.js → chunk-LFETMU66.js} +8 -8
- package/{chunk-AISLHYDB.js → chunk-LWYCA4ZT.js} +306 -42
- package/{chunk-SBVUZC2E.js → chunk-MMCDCZM4.js} +6 -6
- package/{chunk-YOCHZD7D.js → chunk-NCGFB7NN.js} +5 -3
- package/{chunk-C4FTUXVF.js → chunk-QLUFR47U.js} +11 -1
- package/{chunk-IPA2WQGY.js → chunk-QXZ4YDXW.js} +178 -75
- package/{chunk-RQPZX6KP.js → chunk-S37OTGU7.js} +2 -2
- package/{chunk-FVVST32H.js → chunk-SCBYSC74.js} +1 -1
- package/{chunk-WM7P5OWZ.js → chunk-TUIH56DJ.js} +87 -53
- package/{chunk-UBSKX3LP.js → chunk-UZZCXRHF.js} +6 -6
- package/{chunk-WTBWWBSF.js → chunk-VAHPL4CG.js} +63 -40
- package/{chunk-BQECZ3Q4.js → chunk-VDS3NXE5.js} +219 -46
- package/{chunk-G7KM6BBZ.js → chunk-VNGCTQ32.js} +1 -1
- package/{chunk-BKGNXJAM.js → chunk-WKWEV6K4.js} +1 -1
- package/{chunk-JTINRTBT.js → chunk-WPHL6ALY.js} +1 -1
- package/{chunk-KTHLAJEY.js → chunk-WZF7M6GX.js} +1 -1
- package/{chunk-LTH6AVG7.js → chunk-XDXO65DS.js} +3 -3
- package/{chunk-BFDWXLFF.js → chunk-XGMCGPEA.js} +64 -5
- package/{chunk-VBKJTOAW.js → chunk-XHQWJUW4.js} +2 -2
- package/{chunk-VUEXKW6U.js → chunk-XIZIRGXB.js} +15 -15
- package/{chunk-P2SPC3FT.js → chunk-XW6CFB3M.js} +27 -25
- package/{chunk-3KGTFX3T.js → chunk-ZR4VHQ5D.js} +13 -1
- package/{createAgentAutomationAction-GXZNLJZK.js → createAgentAutomationAction-MYQ7Z7VA.js} +22 -25
- package/{createDialogAction-KLW42ZGF.js → createDialogAction-PIV7Z7ZQ.js} +24 -27
- package/{createPageAction-IBJHE6MH.js → createPageAction-7ZAEDSUY.js} +24 -27
- package/{dbSlice-R5EJKZBW.js → dbSlice-V4H2JFNB.js} +5 -6
- package/{deleteFile-WPWVZE4B.js → deleteFile-M7UNIUOO.js} +3 -3
- package/{dialogCommands-7O5PUZRU.js → dialogCommands-UMT7AOOR.js} +30 -21
- package/{dialogSlice-GGV7PF53.js → dialogSlice-4PYFGN7J.js} +22 -25
- package/{docCreateCommands-7ZO2NQQF.js → docCreateCommands-MAZSFQQ5.js} +33 -24
- package/{docDeleteCommands-YKIXZYBR.js → docDeleteCommands-DOTLD7HA.js} +33 -25
- package/{docReadCommands-5UDONBUL.js → docReadCommands-PH255AKZ.js} +33 -24
- package/{docStore-VDWTATFH.js → docStore-P7PG4YDJ.js} +21 -24
- package/{docUpdateCommands-EPZIIQMY.js → docUpdateCommands-RLRID2K7.js} +33 -24
- package/fetchMessages-KTNM7QAR.js +1 -1
- package/getPricing-6TOZXPAU.js +1 -1
- package/{handleSendMessageAction-MMATC5V5.js → handleSendMessageAction-BHUXTQHK.js} +27 -30
- package/index.js +62 -62
- package/{localDialogRead-YSKFFRTT.js → localDialogRead-2VRI24F4.js} +1 -1
- package/{machineCommands-PTHPKSIZ.js → machineCommands-GD46ZUZC.js} +63 -62
- package/{machineWsRunDispatch-M5L2NVWJ.js → machineWsRunDispatch-5SF5RE7E.js} +52 -53
- package/{models-H524GH3U.js → models-LSCRJJ6P.js} +1 -2
- package/package.json +1 -1
- package/{read-5ZMY7FKP.js → read-2MIMRBZ2.js} +3 -3
- package/{readDocTool-2NXDK32S.js → readDocTool-QHVGQHUJ.js} +1 -1
- package/{readlineWorkspace-4NXMEOHP.js → readlineWorkspace-IKXTXTYB.js} +115 -100
- package/{removeDialogAgentAction-KOLQ2R5W.js → removeDialogAgentAction-7GO2PRVQ.js} +12 -13
- package/{runAgentClientLoop-FGUYNGSA.js → runAgentClientLoop-CRIQXO42.js} +45 -48
- package/{setDialogExtraReferencesAction-OMTEO7X6.js → setDialogExtraReferencesAction-ZIDAVJSZ.js} +8 -9
- package/{setPrimaryDialogAgentAction-DOCIS6V4.js → setPrimaryDialogAgentAction-LK35C2D7.js} +12 -13
- package/{settingSlice-UWZJYDOA.js → settingSlice-PRRC6IJ7.js} +6 -7
- package/{skillDiscovery-UGSQGX2U.js → skillDiscovery-ZYHSX7VD.js} +3 -3
- package/{spaceCommands-S3EB6TOS.js → spaceCommands-XE4PS24W.js} +35 -28
- package/{spaceSlice-RG2GSV7K.js → spaceSlice-NYR6BQDL.js} +20 -23
- package/{streamAgentChatTurn-X576C23M.js → streamAgentChatTurn-CYEFWT4D.js} +95 -88
- package/{toolApiClient-C7P7YSE4.js → toolApiClient-QI3YBNWB.js} +2 -2
- package/{tools-HURZ2N4O.js → tools-4YAV2HQH.js} +32 -35
- package/{tuiSummaryLlmCaller-DG2LBTBX.js → tuiSummaryLlmCaller-TXLF4MEI.js} +3 -3
- package/{updateDialogTitleAction-62LVIAUZ.js → updateDialogTitleAction-FEEBVBNP.js} +27 -29
- package/chunk-5MMAK75Q.js +0 -15
- package/chunk-AZPCASRE.js +0 -36
- package/chunk-IOQIOZNI.js +0 -42
- package/chunk-UAD2WT54.js +0 -64
- package/{agentPullCommand-N6UWRTVL.js → agentPullCommand-LHFBA5EI.js} +6 -6
- package/{chunk-JK7VW2FN.js → chunk-5MIDPSSK.js} +3 -3
- package/{chunk-VC6OZXO5.js → chunk-6WWHKODG.js} +4 -4
- package/{chunk-BT37DVDA.js → chunk-7VKWMOSI.js} +9 -9
- package/{chunk-3QAF2LTL.js → chunk-DZ3XJVET.js} +3 -3
- package/{chunk-5CS33IBL.js → chunk-PDL2AV3E.js} +3 -3
- package/{chunk-5MMZUWSG.js → chunk-TOILAPLH.js} +5 -5
- package/{chunk-3HPUUWOR.js → chunk-TSKWE74T.js} +3 -3
- package/{chunk-DVRHHFEA.js → chunk-TSUJOM6N.js} +3 -3
- package/{db-6QED3ZVO.js → db-HCJ5PRB5.js} +3 -3
- package/{memoryCommands-HG4WKTU7.js → memoryCommands-HGNEENIN.js} +3 -3
- package/{offlineMarxistsAgentCommand-BCPJITJL.js → offlineMarxistsAgentCommand-5OOWZLJI.js} +3 -3
- package/{runtimeDoctorCommands-UWR5UDSM.js → runtimeDoctorCommands-4YVMXBQP.js} +5 -5
- package/{tableCommands-M3DJUETS.js → tableCommands-LV2PPHNY.js} +6 -6
- package/{understanding-ZOESBLF3.js → understanding-3CUQQ6SV.js} +3 -3
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VDS3NXE5.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
readPipeText,
|
|
10
|
-
spawnProcess
|
|
11
|
-
} from "./chunk-IDZTNRP2.js";
|
|
7
|
+
} from "./chunk-QXZ4YDXW.js";
|
|
12
8
|
import {
|
|
13
9
|
runLocalAgentTurn
|
|
14
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LWYCA4ZT.js";
|
|
15
11
|
import {
|
|
16
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PDL2AV3E.js";
|
|
18
14
|
import {
|
|
19
|
-
|
|
20
|
-
} from "./chunk-
|
|
15
|
+
toErrorMessage
|
|
16
|
+
} from "./chunk-HNMXYYJR.js";
|
|
21
17
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
readPipeText,
|
|
19
|
+
spawnProcess
|
|
20
|
+
} from "./chunk-IDZTNRP2.js";
|
|
24
21
|
import {
|
|
25
22
|
parseUserIdFromAuthToken
|
|
26
23
|
} from "./chunk-AVMJVOQY.js";
|
|
@@ -28,17 +25,20 @@ import {
|
|
|
28
25
|
DEFAULT_NOLO_SERVER_URL
|
|
29
26
|
} from "./chunk-OLZBQWZU.js";
|
|
30
27
|
import {
|
|
31
|
-
|
|
32
|
-
} from "./chunk-
|
|
28
|
+
asRecordOrEmpty
|
|
29
|
+
} from "./chunk-KX6YBIHG.js";
|
|
30
|
+
import {
|
|
31
|
+
asTrimmedNonEmptyStringArray
|
|
32
|
+
} from "./chunk-I42VC5KR.js";
|
|
33
|
+
import {
|
|
34
|
+
isRecord
|
|
35
|
+
} from "./chunk-KUG52IAP.js";
|
|
33
36
|
import {
|
|
34
37
|
asTrimmedString
|
|
35
38
|
} from "./chunk-3EUW3WEO.js";
|
|
36
39
|
import {
|
|
37
40
|
asOptionalPositiveFiniteNumber
|
|
38
41
|
} from "./chunk-U6VC4MU4.js";
|
|
39
|
-
import {
|
|
40
|
-
isRecord
|
|
41
|
-
} from "./chunk-KUG52IAP.js";
|
|
42
42
|
import {
|
|
43
43
|
asOptionalTrimmedString
|
|
44
44
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
i18n_default,
|
|
3
3
|
toolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QXZ4YDXW.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalizeToolNames
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6PXKSN2M.js";
|
|
8
8
|
import {
|
|
9
9
|
asTrimmedLowercaseString
|
|
10
10
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
flushChatCompletionStream,
|
|
5
5
|
readSseFrames,
|
|
6
6
|
throwIfChatCompletionStreamFailed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZR4VHQ5D.js";
|
|
8
8
|
import {
|
|
9
9
|
parseToolArgumentsJson
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LWYCA4ZT.js";
|
|
11
11
|
import {
|
|
12
12
|
createThinkParserState,
|
|
13
13
|
extractThinkContent
|
|
@@ -16,12 +16,15 @@ import {
|
|
|
16
16
|
buildProviderAuthHeaders,
|
|
17
17
|
buildProviderExecutionPlan,
|
|
18
18
|
toOpenAiCompatibleMessages
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TSKWE74T.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalizeToolName,
|
|
22
22
|
createGlob,
|
|
23
23
|
resolveExecutableOnPath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6PXKSN2M.js";
|
|
25
|
+
import {
|
|
26
|
+
toErrorMessage
|
|
27
|
+
} from "./chunk-HNMXYYJR.js";
|
|
25
28
|
import {
|
|
26
29
|
asRecordOrEmpty
|
|
27
30
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -38,17 +41,14 @@ import {
|
|
|
38
41
|
asTrimmedLowercaseString
|
|
39
42
|
} from "./chunk-QSJ3HFEF.js";
|
|
40
43
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
isRecord
|
|
45
|
+
} from "./chunk-KUG52IAP.js";
|
|
43
46
|
import {
|
|
44
47
|
asTrimmedString
|
|
45
48
|
} from "./chunk-3EUW3WEO.js";
|
|
46
49
|
import {
|
|
47
50
|
asOptionalPositiveFiniteNumber
|
|
48
51
|
} from "./chunk-U6VC4MU4.js";
|
|
49
|
-
import {
|
|
50
|
-
isRecord
|
|
51
|
-
} from "./chunk-KUG52IAP.js";
|
|
52
52
|
import {
|
|
53
53
|
normalizeServerOrigin
|
|
54
54
|
} from "./chunk-CF7PE763.js";
|
|
@@ -393,7 +393,12 @@ function dialogMessageRecordToAgentRuntimeMessage(record) {
|
|
|
393
393
|
...typeof record.reasoning_content === "string" ? { reasoning_content: record.reasoning_content } : {},
|
|
394
394
|
...typeof record.toolCallId === "string" ? { tool_call_id: record.toolCallId } : {},
|
|
395
395
|
...Array.isArray(record.tool_calls) ? { tool_calls: record.tool_calls } : {},
|
|
396
|
-
...typeof record.toolName === "string" ? { toolName: record.toolName } : {}
|
|
396
|
+
...typeof record.toolName === "string" ? { toolName: record.toolName } : {},
|
|
397
|
+
...(() => {
|
|
398
|
+
const raw = record.createdAt;
|
|
399
|
+
const ms = typeof raw === "number" ? raw : typeof raw === "string" ? Date.parse(raw) : NaN;
|
|
400
|
+
return Number.isFinite(ms) ? { createdAt: ms } : {};
|
|
401
|
+
})()
|
|
397
402
|
};
|
|
398
403
|
}
|
|
399
404
|
|
|
@@ -1340,7 +1345,7 @@ function buildSearchWorkspaceParameters(variant) {
|
|
|
1340
1345
|
const path = buildWorkspacePathProperty();
|
|
1341
1346
|
const includeIgnored = {
|
|
1342
1347
|
type: "boolean",
|
|
1343
|
-
description: "When true, search files ignored by .gitignore such as .tmp. Defaults to false
|
|
1348
|
+
description: "When true, search files ignored by .gitignore such as .tmp. Defaults to false. Build artifacts (dist/, *.tsbuildinfo, *.min.js, etc.) are always excluded regardless of this flag. .git and node_modules remain excluded."
|
|
1344
1349
|
};
|
|
1345
1350
|
const exclude = {
|
|
1346
1351
|
type: "array",
|
|
@@ -1703,6 +1708,24 @@ var EXEC_SHELL_TIMEOUT_ENV = "NOLO_EXEC_SHELL_TIMEOUT_MS";
|
|
|
1703
1708
|
var EXEC_SHELL_DETACH_ENV = "NOLO_EXEC_SHELL_DETACH_MS";
|
|
1704
1709
|
var DEFAULT_EXEC_SHELL_DETACH_MS = 12e4;
|
|
1705
1710
|
var DEFAULT_LOCAL_API_ORIGIN = "http://127.0.0.1:38123";
|
|
1711
|
+
var ALWAYS_EXCLUDED_GLOBS = [
|
|
1712
|
+
"*.tsbuildinfo",
|
|
1713
|
+
"dist/**",
|
|
1714
|
+
"build/**",
|
|
1715
|
+
"out/**",
|
|
1716
|
+
"coverage/**",
|
|
1717
|
+
".next/**",
|
|
1718
|
+
".turbo/**",
|
|
1719
|
+
"public/assets/**",
|
|
1720
|
+
"*.min.js",
|
|
1721
|
+
"*.min.css",
|
|
1722
|
+
"*.map",
|
|
1723
|
+
"*.lock",
|
|
1724
|
+
"bun.lockb",
|
|
1725
|
+
"*.ldb"
|
|
1726
|
+
];
|
|
1727
|
+
var DEFAULT_SEARCH_MAX_RESULTS = 200;
|
|
1728
|
+
var SEARCH_OUTPUT_CHAR_LIMIT = 2e4;
|
|
1706
1729
|
function readTrimmedString(value) {
|
|
1707
1730
|
return asOptionalTrimmedString(value);
|
|
1708
1731
|
}
|
|
@@ -2070,8 +2093,8 @@ function requireWorkspaceGlobPattern(args) {
|
|
|
2070
2093
|
if (!pattern) throw new Error("globFiles requires a non-empty pattern.");
|
|
2071
2094
|
return pattern;
|
|
2072
2095
|
}
|
|
2073
|
-
function readWorkspaceMaxResults(args) {
|
|
2074
|
-
if (args.maxResults === void 0) return
|
|
2096
|
+
function readWorkspaceMaxResults(args, defaultValue) {
|
|
2097
|
+
if (args.maxResults === void 0) return defaultValue;
|
|
2075
2098
|
const value = Number(args.maxResults);
|
|
2076
2099
|
if (!Number.isInteger(value) || value < 1) {
|
|
2077
2100
|
throw new Error("maxResults must be a positive integer.");
|
|
@@ -2695,7 +2718,7 @@ async function searchFilesTool(args) {
|
|
|
2695
2718
|
const parsed = parseWorkspaceToolArguments(args.call.arguments);
|
|
2696
2719
|
const query = requireWorkspaceSearchQuery(parsed);
|
|
2697
2720
|
const exclude = readWorkspaceExcludeGlobs(parsed);
|
|
2698
|
-
const maxResults = readWorkspaceMaxResults(parsed);
|
|
2721
|
+
const maxResults = readWorkspaceMaxResults(parsed, DEFAULT_SEARCH_MAX_RESULTS);
|
|
2699
2722
|
const contextLines = readWorkspaceContextLines(parsed);
|
|
2700
2723
|
const literal = parsed.literal === true;
|
|
2701
2724
|
const caseSensitive = parsed.caseSensitive === false ? false : true;
|
|
@@ -2725,6 +2748,7 @@ async function searchFilesTool(args) {
|
|
|
2725
2748
|
"!node_modules",
|
|
2726
2749
|
"--glob",
|
|
2727
2750
|
"!.git",
|
|
2751
|
+
...ALWAYS_EXCLUDED_GLOBS.flatMap((g) => ["--glob", `!${g}`]),
|
|
2728
2752
|
...exclude.flatMap((excludePattern) => ["--glob", `!${excludePattern}`]),
|
|
2729
2753
|
"--",
|
|
2730
2754
|
query,
|
|
@@ -2740,6 +2764,16 @@ async function searchFilesTool(args) {
|
|
|
2740
2764
|
...contextLines !== void 0 ? ["-C", String(contextLines)] : [],
|
|
2741
2765
|
"--exclude-dir=node_modules",
|
|
2742
2766
|
"--exclude-dir=.git",
|
|
2767
|
+
// grep 的 --exclude-dir 只按目录 basename 匹配,无法表达 "public/assets" 这种
|
|
2768
|
+
// 多段路径:压成 basename 会连 src/assets 一起排掉(过度排除会让模型以为那里
|
|
2769
|
+
// 没有匹配,比不排除更危险)。所以这里只翻译无损的单段 glob,多段的统一交给
|
|
2770
|
+
// 下面的 dropAlwaysExcludedLines 按完整 glob 过滤——三条路径(rg / grep / JS
|
|
2771
|
+
// 兜底)因此共享同一套排除语义。
|
|
2772
|
+
...ALWAYS_EXCLUDED_GLOBS.flatMap((g) => {
|
|
2773
|
+
if (!g.endsWith("/**")) return ["--exclude", g];
|
|
2774
|
+
const dir = g.replace(/\/\*\*$/, "");
|
|
2775
|
+
return dir.includes("/") ? [] : [`--exclude-dir=${dir}`];
|
|
2776
|
+
}),
|
|
2743
2777
|
...exclude.flatMap((excludePattern) => ["--exclude", excludePattern]),
|
|
2744
2778
|
query,
|
|
2745
2779
|
relativeSearchPath
|
|
@@ -2777,13 +2811,14 @@ async function searchFilesTool(args) {
|
|
|
2777
2811
|
}
|
|
2778
2812
|
})();
|
|
2779
2813
|
let outputLines = result.stdout.split(/\r?\n/).map((line) => line.trimEnd().replace(/^\.\//, "")).filter(Boolean);
|
|
2814
|
+
outputLines = dropAlwaysExcludedLines(outputLines);
|
|
2780
2815
|
let limitedByMaxResults = "limitedByMaxResults" in result && result.limitedByMaxResults === true;
|
|
2781
2816
|
if (outputLines.length === 0 && result.exitCode === 0 && (includeIgnored || !await hasRootGitignore(args.workspaceRoot))) {
|
|
2782
2817
|
const fallback = await scanWorkspaceTextMatches({
|
|
2783
2818
|
workspaceRoot: args.workspaceRoot,
|
|
2784
2819
|
relativeSearchPath,
|
|
2785
2820
|
query,
|
|
2786
|
-
exclude,
|
|
2821
|
+
exclude: [...ALWAYS_EXCLUDED_GLOBS, ...exclude],
|
|
2787
2822
|
maxResults,
|
|
2788
2823
|
literal,
|
|
2789
2824
|
caseSensitive,
|
|
@@ -2802,8 +2837,11 @@ async function searchFilesTool(args) {
|
|
|
2802
2837
|
const match = line.match(/^(.*?):\d+:/);
|
|
2803
2838
|
return match?.[1] ? [match[1]] : [];
|
|
2804
2839
|
})));
|
|
2840
|
+
const rawContent = outputLines.join("\n");
|
|
2841
|
+
const content = truncateToolOutput(rawContent, SEARCH_OUTPUT_CHAR_LIMIT);
|
|
2842
|
+
const truncatedByByteLimit = content.length !== rawContent.length;
|
|
2805
2843
|
return {
|
|
2806
|
-
content
|
|
2844
|
+
content,
|
|
2807
2845
|
metadata: {
|
|
2808
2846
|
query,
|
|
2809
2847
|
path: requestedPath,
|
|
@@ -2816,8 +2854,9 @@ async function searchFilesTool(args) {
|
|
|
2816
2854
|
count: outputLines.length,
|
|
2817
2855
|
matchCount: matchLines.length,
|
|
2818
2856
|
matchedFiles,
|
|
2819
|
-
truncated: limitedByMaxResults,
|
|
2857
|
+
truncated: limitedByMaxResults || truncatedByByteLimit,
|
|
2820
2858
|
limitedByMaxResults,
|
|
2859
|
+
...truncatedByByteLimit ? { truncatedByByteLimit: true } : {},
|
|
2821
2860
|
...maxResults ? { maxResults } : {},
|
|
2822
2861
|
exitCode: result.exitCode,
|
|
2823
2862
|
...extractActivity(parsed) ? { activity: extractActivity(parsed) } : {}
|
|
@@ -2850,6 +2889,14 @@ async function filterRootGitignoredFiles(args) {
|
|
|
2850
2889
|
const globs = patterns.map((pattern) => createGlob(pattern));
|
|
2851
2890
|
return args.files.filter((file) => !globs.some((glob) => glob.match(file)));
|
|
2852
2891
|
}
|
|
2892
|
+
function dropAlwaysExcludedLines(lines) {
|
|
2893
|
+
const globs = ALWAYS_EXCLUDED_GLOBS.map((pattern) => createGlob(pattern));
|
|
2894
|
+
return lines.filter((line) => {
|
|
2895
|
+
const filePath = line.match(/^(.*?):\d+[:-]/)?.[1];
|
|
2896
|
+
if (!filePath) return true;
|
|
2897
|
+
return !globs.some((glob) => glob.match(filePath));
|
|
2898
|
+
});
|
|
2899
|
+
}
|
|
2853
2900
|
function scanWorkspaceGlobFiles(args) {
|
|
2854
2901
|
const pathPrefix = args.relativeSearchPath === "." ? "" : `${args.relativeSearchPath.replace(/\/+$/, "")}/`;
|
|
2855
2902
|
return Array.from(createGlob(args.pattern).scanSync({
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cloudflareModels,
|
|
3
|
+
deepSeekModels,
|
|
4
|
+
deepinfraModels,
|
|
5
|
+
fireworksModels,
|
|
6
|
+
gmiModels,
|
|
7
|
+
googleModels,
|
|
8
|
+
openAIModels,
|
|
9
|
+
openrouterModels,
|
|
10
|
+
platformHostedModels,
|
|
11
|
+
xaiModels,
|
|
12
|
+
zaiModels
|
|
13
|
+
} from "./chunk-524BDL33.js";
|
|
14
|
+
|
|
1
15
|
// packages/ai/llm/modelAbility.ts
|
|
2
16
|
var MODEL_ABILITY_TABLE = {
|
|
3
17
|
"claude-opus-5": { passAt1: 74, benchmarkScore: 61 },
|
|
@@ -28,6 +42,29 @@ function getModelAbility(modelName) {
|
|
|
28
42
|
return entry ? { ...entry } : void 0;
|
|
29
43
|
}
|
|
30
44
|
|
|
45
|
+
// packages/ai/llm/ollamaCloud.ts
|
|
46
|
+
var ollamaCloudModels = platformHostedModels;
|
|
47
|
+
|
|
48
|
+
// packages/ai/llm/models.ts
|
|
49
|
+
var withProvider = (provider) => (models) => models.map((model) => ({ ...model, provider }));
|
|
50
|
+
var ALL_MODELS = [
|
|
51
|
+
...withProvider("nolo")(ollamaCloudModels),
|
|
52
|
+
...withProvider("google")(googleModels),
|
|
53
|
+
...withProvider("openai")(openAIModels),
|
|
54
|
+
...withProvider("openrouter")(openrouterModels),
|
|
55
|
+
...withProvider("xai")(xaiModels),
|
|
56
|
+
...withProvider("deepseek")(deepSeekModels),
|
|
57
|
+
...withProvider("deepinfra")(deepinfraModels),
|
|
58
|
+
...withProvider("fireworks")(fireworksModels),
|
|
59
|
+
...withProvider("cloudflare")(cloudflareModels),
|
|
60
|
+
...withProvider("gmi")(gmiModels),
|
|
61
|
+
...withProvider("zai")(zaiModels)
|
|
62
|
+
].map((model) => {
|
|
63
|
+
const ability = getModelAbility(model.name);
|
|
64
|
+
return ability ? { ...model, ability } : model;
|
|
65
|
+
});
|
|
66
|
+
|
|
31
67
|
export {
|
|
32
|
-
getModelAbility
|
|
68
|
+
getModelAbility,
|
|
69
|
+
ALL_MODELS
|
|
33
70
|
};
|
|
@@ -199,7 +199,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
199
199
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
200
200
|
}
|
|
201
201
|
try {
|
|
202
|
-
const { readAction } = await import("./read-
|
|
202
|
+
const { readAction } = await import("./read-2MIMRBZ2.js");
|
|
203
203
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
204
204
|
if (!pageData) {
|
|
205
205
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveFileCategory
|
|
3
|
-
} from "./chunk-AZPCASRE.js";
|
|
4
|
-
import {
|
|
5
|
-
loadFileFromIndexedDb,
|
|
6
|
-
removeAction,
|
|
7
|
-
saveFileToIndexedDb
|
|
8
|
-
} from "./chunk-JTINRTBT.js";
|
|
9
1
|
import {
|
|
10
2
|
fileKey,
|
|
11
3
|
getFileIdFromKey,
|
|
12
4
|
ulid
|
|
13
5
|
} from "./chunk-O4BU24WZ.js";
|
|
6
|
+
import {
|
|
7
|
+
loadFileFromIndexedDb,
|
|
8
|
+
removeAction,
|
|
9
|
+
saveFileToIndexedDb
|
|
10
|
+
} from "./chunk-WPHL6ALY.js";
|
|
14
11
|
import {
|
|
15
12
|
readAction,
|
|
16
13
|
readRequestManager,
|
|
17
14
|
resolveAgentReadServers
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XHQWJUW4.js";
|
|
19
16
|
import {
|
|
20
17
|
asyncThunkCreator,
|
|
21
18
|
buildCreateSlice,
|
|
@@ -35,7 +32,7 @@ import {
|
|
|
35
32
|
shouldReplaceLocalWithRemoteRecord,
|
|
36
33
|
shouldReplicateLocalRecord,
|
|
37
34
|
uploadToCurrentServer
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TSUJOM6N.js";
|
|
39
36
|
import {
|
|
40
37
|
fetchFromClientDb,
|
|
41
38
|
fetchFromServer,
|
|
@@ -456,6 +453,39 @@ var upsertAction = async (upsertConfig, thunkApi) => {
|
|
|
456
453
|
}
|
|
457
454
|
};
|
|
458
455
|
|
|
456
|
+
// packages/app/utils/fileUtils.ts
|
|
457
|
+
var fileConstructor = typeof globalThis !== "undefined" && typeof globalThis.File === "function" ? globalThis.File : void 0;
|
|
458
|
+
var isImageMimeType = (value) => typeof value === "string" && value.toLowerCase().startsWith("image/");
|
|
459
|
+
var IMAGE_FILE_NAME_RE = /\.(avif|bmp|gif|heic|heif|ico|jpe?g|png|svg|tiff?|webp)$/i;
|
|
460
|
+
var VIDEO_FILE_NAME_RE = /\.(avi|m4v|mkv|mov|mp4|mpeg|mpg|webm)$/i;
|
|
461
|
+
var AUDIO_FILE_NAME_RE = /\.(aac|flac|m4a|mp3|ogg|wav|weba)$/i;
|
|
462
|
+
var DOCUMENT_FILE_NAME_RE = /\.(csv|doc|docx|md|odt|pdf|ppt|pptx|rtf|txt|xls|xlsx)$/i;
|
|
463
|
+
var isImageFileName = (value) => typeof value === "string" && IMAGE_FILE_NAME_RE.test(value.trim());
|
|
464
|
+
var isVideoMimeType = (value) => typeof value === "string" && value.toLowerCase().startsWith("video/");
|
|
465
|
+
var isAudioMimeType = (value) => typeof value === "string" && value.toLowerCase().startsWith("audio/");
|
|
466
|
+
var isPdfMimeType = (value) => typeof value === "string" && value.toLowerCase() === "application/pdf";
|
|
467
|
+
var isDocumentMimeType = (value) => {
|
|
468
|
+
if (typeof value !== "string") return false;
|
|
469
|
+
const normalized = value.toLowerCase();
|
|
470
|
+
return isPdfMimeType(normalized) || normalized === "text/plain" || normalized === "text/markdown" || normalized === "text/csv" || normalized === "application/msword" || normalized === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || normalized === "application/vnd.ms-powerpoint" || normalized === "application/vnd.openxmlformats-officedocument.presentationml.presentation" || normalized === "application/vnd.ms-excel" || normalized === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || normalized === "application/rtf" || normalized === "application/vnd.oasis.opendocument.text";
|
|
471
|
+
};
|
|
472
|
+
var resolveFileCategory = ({
|
|
473
|
+
mimeType,
|
|
474
|
+
fileName
|
|
475
|
+
}) => {
|
|
476
|
+
if (isImageMimeType(mimeType) || isImageFileName(fileName)) return "image";
|
|
477
|
+
if (isVideoMimeType(mimeType) || typeof fileName === "string" && VIDEO_FILE_NAME_RE.test(fileName.trim())) {
|
|
478
|
+
return "video";
|
|
479
|
+
}
|
|
480
|
+
if (isAudioMimeType(mimeType) || typeof fileName === "string" && AUDIO_FILE_NAME_RE.test(fileName.trim())) {
|
|
481
|
+
return "audio";
|
|
482
|
+
}
|
|
483
|
+
if (isDocumentMimeType(mimeType) || typeof fileName === "string" && DOCUMENT_FILE_NAME_RE.test(fileName.trim())) {
|
|
484
|
+
return "document";
|
|
485
|
+
}
|
|
486
|
+
return "other";
|
|
487
|
+
};
|
|
488
|
+
|
|
459
489
|
// packages/database/actions/upload.ts
|
|
460
490
|
var saveToClientDb2 = async (clientDb, dbKey, metadata) => {
|
|
461
491
|
if (!clientDb) {
|
|
@@ -674,7 +704,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
674
704
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
675
705
|
read: create.asyncThunk(
|
|
676
706
|
async (payload, thunkApi) => {
|
|
677
|
-
const { readAction: readAction2 } = await import("./read-
|
|
707
|
+
const { readAction: readAction2 } = await import("./read-2MIMRBZ2.js");
|
|
678
708
|
return readAction2(payload, thunkApi);
|
|
679
709
|
},
|
|
680
710
|
{
|
|
@@ -748,7 +778,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
748
778
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
749
779
|
share: create.asyncThunk(
|
|
750
780
|
async (config, thunkApi) => {
|
|
751
|
-
const { shareResourceAction } = await import("./action-
|
|
781
|
+
const { shareResourceAction } = await import("./action-UAHWPMZB.js");
|
|
752
782
|
return shareResourceAction(config, thunkApi);
|
|
753
783
|
}
|
|
754
784
|
),
|
|
@@ -784,6 +814,7 @@ var dbSlice_default = dbSlice.reducer;
|
|
|
784
814
|
export {
|
|
785
815
|
readAndWaitAction,
|
|
786
816
|
toTimestampMs,
|
|
817
|
+
resolveFileCategory,
|
|
787
818
|
uploadFileAction,
|
|
788
819
|
dbAdapter,
|
|
789
820
|
selectById,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CORE_DRAIN_REASON,
|
|
2
3
|
isGatewayHttpStatus,
|
|
3
4
|
parseRetryAfterHeaderMs
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-D6OQHXVG.js";
|
|
5
6
|
import {
|
|
6
7
|
asTrimmedLowercaseString
|
|
7
8
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -61,7 +62,7 @@ async function resolveConnectorWebSocketTarget(input) {
|
|
|
61
62
|
}
|
|
62
63
|
if (response && !response.ok) {
|
|
63
64
|
const json2 = await response.clone().json().catch(() => null);
|
|
64
|
-
const retryable = json2?.retryable === true || json2?.reason ===
|
|
65
|
+
const retryable = json2?.retryable === true || json2?.reason === CORE_DRAIN_REASON || isGatewayHttpStatus(response.status);
|
|
65
66
|
if (retryable) {
|
|
66
67
|
const reason = typeof json2?.reason === "string" ? json2.reason : "retryable";
|
|
67
68
|
const message = typeof json2?.error === "string" ? json2.error : `Connector websocket unavailable with HTTP ${response.status}`;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readDbRecord,
|
|
3
3
|
writeAgentRecord
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MMCDCZM4.js";
|
|
5
5
|
import {
|
|
6
6
|
buildSkillSummaryMarker
|
|
7
7
|
} from "./chunk-VF4K2QE6.js";
|
|
8
8
|
import {
|
|
9
9
|
buildSkillDocMarkdown
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
createSpaceKey
|
|
13
|
-
} from "./chunk-UAD2WT54.js";
|
|
14
|
-
import {
|
|
15
|
-
asTrimmedLowercaseString
|
|
16
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
10
|
+
} from "./chunk-6WWHKODG.js";
|
|
17
11
|
import {
|
|
18
12
|
parseUserIdFromAuthToken,
|
|
19
13
|
readOption,
|
|
20
14
|
resolveAuthToken,
|
|
21
15
|
resolveServerUrl
|
|
22
16
|
} from "./chunk-AVMJVOQY.js";
|
|
17
|
+
import {
|
|
18
|
+
createSpaceKey
|
|
19
|
+
} from "./chunk-XGMCGPEA.js";
|
|
20
|
+
import {
|
|
21
|
+
asTrimmedLowercaseString
|
|
22
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
23
23
|
import {
|
|
24
24
|
NOLO_CLUSTER_SERVERS
|
|
25
25
|
} from "./chunk-LCBAMY2M.js";
|