reasonix 0.46.0 → 0.47.0
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/README.md +64 -12
- package/README.zh-CN.md +54 -9
- package/dashboard/dist/app.js +293 -66
- package/dashboard/dist/app.js.map +1 -1
- package/dist/cli/{acp-LGBLHBKY.js → acp-QK3DMC53.js} +22 -22
- package/dist/cli/chat-VV5UWY4V.js +51 -0
- package/dist/cli/{chunk-AVFXO2EZ.js → chunk-24A7FHGJ.js} +148 -16
- package/dist/cli/chunk-24A7FHGJ.js.map +1 -0
- package/dist/cli/chunk-25T6CVUP.js +0 -0
- package/dist/cli/chunk-2UQP6H6T.js +0 -0
- package/dist/cli/chunk-5QCB62C4.js +0 -0
- package/dist/cli/{chunk-YY227BIQ.js → chunk-6J6BSUCR.js} +2 -2
- package/dist/cli/chunk-6OWJV3YW.js +0 -0
- package/dist/cli/{chunk-A3TSSDS2.js → chunk-BWYVFFKR.js} +2 -2
- package/dist/cli/{chunk-C53JQES5.js → chunk-BYYVYJDX.js} +3 -3
- package/dist/cli/{chunk-HNXDZGC6.js → chunk-CI2PF5QX.js} +2 -2
- package/dist/cli/{chunk-GTZTQNX5.js → chunk-COWPEX54.js} +19 -9
- package/dist/cli/chunk-COWPEX54.js.map +1 -0
- package/dist/cli/{chunk-QJDDIK3Z.js → chunk-E5WCLUIU.js} +2 -2
- package/dist/cli/{chunk-NVURFF27.js → chunk-EQATK2L2.js} +2 -2
- package/dist/cli/{chunk-HKWSPKMU.js → chunk-FDKOUJKZ.js} +8 -8
- package/dist/cli/chunk-FEZK652I.js +0 -0
- package/dist/cli/{chunk-TEUDEGX2.js → chunk-FY4S7TJZ.js} +19 -5
- package/dist/cli/chunk-FY4S7TJZ.js.map +1 -0
- package/dist/cli/{chunk-RDRC3XDT.js → chunk-GDKB2PPK.js} +2 -2
- package/dist/cli/{chunk-XSU4QVFW.js → chunk-HIYTRCSW.js} +27 -14
- package/dist/cli/chunk-HIYTRCSW.js.map +1 -0
- package/dist/cli/{chunk-WL6SNQ5T.js → chunk-ICAFSZHS.js} +307 -114
- package/dist/cli/chunk-ICAFSZHS.js.map +1 -0
- package/dist/cli/{chunk-KQU2TYIL.js → chunk-ICSYGIPN.js} +1916 -1098
- package/dist/cli/chunk-ICSYGIPN.js.map +1 -0
- package/dist/cli/chunk-J5XJHLWM.js +0 -0
- package/dist/cli/chunk-JMBMLOBP.js +0 -0
- package/dist/cli/{chunk-MJ6W5UN3.js → chunk-K6GUKSXH.js} +3 -2
- package/dist/cli/chunk-K6GUKSXH.js.map +1 -0
- package/dist/cli/{chunk-IJ7JA32V.js → chunk-KDRUEXII.js} +189 -26
- package/dist/cli/chunk-KDRUEXII.js.map +1 -0
- package/dist/cli/{chunk-4HCP2UQW.js → chunk-LBLR4CUZ.js} +2 -2
- package/dist/cli/{chunk-2425HK6U.js → chunk-LGEKVMMV.js} +7 -2
- package/dist/cli/{chunk-2425HK6U.js.map → chunk-LGEKVMMV.js.map} +1 -1
- package/dist/cli/{chunk-I4L2GTSE.js → chunk-OJVITDGB.js} +2 -2
- package/dist/cli/chunk-PLHAZOLZ.js +0 -0
- package/dist/cli/{chunk-W7YGWUWU.js → chunk-QVDWH2A2.js} +3 -3
- package/dist/cli/{chunk-R3CTO2HM.js → chunk-QVUFWDD2.js} +2 -2
- package/dist/cli/{chunk-HVUZWNSP.js → chunk-R6GQKKBW.js} +2 -2
- package/dist/cli/{chunk-5ACMUK4Q.js → chunk-RRXUIPWG.js} +20 -18
- package/dist/cli/chunk-RRXUIPWG.js.map +1 -0
- package/dist/cli/chunk-S4XVGLRW.js +0 -0
- package/dist/cli/chunk-SZ5XES2N.js +0 -0
- package/dist/cli/{chunk-CXVWUPA3.js → chunk-TKVXTQ3T.js} +26 -26
- package/dist/cli/chunk-TKVXTQ3T.js.map +1 -0
- package/dist/cli/chunk-TUK7OWJA.js +0 -0
- package/dist/cli/{chunk-JNAQYELD.js → chunk-UDVFBEXC.js} +3 -3
- package/dist/cli/{chunk-CBIQWMS6.js → chunk-VC2CQA5D.js} +9 -9
- package/dist/cli/{chunk-ZZYBBX5N.js → chunk-VJMBISEI.js} +23 -9
- package/dist/cli/chunk-VJMBISEI.js.map +1 -0
- package/dist/cli/{chunk-WK3UFQY3.js → chunk-VKYSZKH2.js} +2 -2
- package/dist/cli/{chunk-LIR2HBQH.js → chunk-VMUUFWFF.js} +2 -2
- package/dist/cli/{chunk-V26WPN3J.js → chunk-VNQGCA3Q.js} +28 -1
- package/dist/cli/chunk-VNQGCA3Q.js.map +1 -0
- package/dist/cli/{chunk-5I2C4JEO.js → chunk-WF7TPVZM.js} +6 -6
- package/dist/cli/{chunk-5I2C4JEO.js.map → chunk-WF7TPVZM.js.map} +1 -1
- package/dist/cli/chunk-X53B3JIX.js +0 -0
- package/dist/cli/chunk-XJXDHAES.js +0 -0
- package/dist/cli/chunk-XXC2BYTV.js +0 -0
- package/dist/cli/{chunk-4CTDEJUF.js → chunk-YDPLF7XR.js} +26 -14
- package/dist/cli/chunk-YDPLF7XR.js.map +1 -0
- package/dist/cli/chunk-ZZM6QJ4W.js +0 -0
- package/dist/cli/{code-DFHSASJ4.js → code-C24TUAE5.js} +39 -35
- package/dist/cli/code-C24TUAE5.js.map +1 -0
- package/dist/cli/{commands-OCU42XG4.js → commands-RR3GIYOK.js} +4 -4
- package/dist/cli/{commit-XCQIQCYG.js → commit-FSHPIINM.js} +3 -3
- package/dist/cli/{desktop-ZCUG7LMF.js → desktop-7NCHPEFB.js} +263 -36
- package/dist/cli/desktop-7NCHPEFB.js.map +1 -0
- package/dist/cli/devtools-HW3WDT3Q.js +0 -0
- package/dist/cli/{diff-66B2KWOJ.js → diff-RAAHHLHV.js} +8 -8
- package/dist/cli/{doctor-Y73CPPRZ.js → doctor-PKVQIXRT.js} +9 -9
- package/dist/cli/{events-NGZ2OJYH.js → events-VRYXOSKI.js} +3 -3
- package/dist/cli/index.js +84 -92
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-MPVGBBJF.js → mcp-CRJ26PP4.js} +2 -2
- package/dist/cli/{mcp-browse-4XOTC3FJ.js → mcp-browse-QPAOWZOP.js} +2 -2
- package/dist/cli/{mcp-inspect-CEMGKKAH.js → mcp-inspect-CVCLABRS.js} +4 -4
- package/dist/cli/{prompt-2D7ID24X.js → prompt-SKYXERSI.js} +4 -4
- package/dist/cli/{prune-sessions-OJEYYLHY.js → prune-sessions-SEWX7GP6.js} +2 -2
- package/dist/cli/{replay-AKYQNAQJ.js → replay-KPDW2ZMJ.js} +9 -9
- package/dist/cli/{run-5DPQFSP6.js → run-WIKDIXTG.js} +18 -19
- package/dist/cli/run-WIKDIXTG.js.map +1 -0
- package/dist/cli/{server-TQ2IHYQJ.js → server-P6V2G3P6.js} +82 -34
- package/dist/cli/server-P6V2G3P6.js.map +1 -0
- package/dist/cli/{sessions-KY54NG45.js → sessions-2NULRMSA.js} +29 -15
- package/dist/cli/sessions-2NULRMSA.js.map +1 -0
- package/dist/cli/{setup-XPIOZWS7.js → setup-Y5WDBQFL.js} +8 -8
- package/dist/cli/setup-Y5WDBQFL.js.map +1 -0
- package/dist/cli/{stats-X2VTWKNS.js → stats-T7BL2YOR.js} +6 -6
- package/dist/cli/update-6ITLPRDV.js +0 -0
- package/dist/cli/{version-7O6A5T7Q.js → version-3KWDNWLN.js} +15 -15
- package/dist/index.d.ts +54 -23
- package/dist/index.js +1613 -1152
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cli/.-3G6VX5S7.js +0 -327
- package/dist/cli/.-6YRPB2C7.js +0 -329
- package/dist/cli/.-EYSVINK3.js +0 -317
- package/dist/cli/chat-ECK5ZGMV.js +0 -51
- package/dist/cli/chunk-4CTDEJUF.js.map +0 -1
- package/dist/cli/chunk-5ACMUK4Q.js.map +0 -1
- package/dist/cli/chunk-AVFXO2EZ.js.map +0 -1
- package/dist/cli/chunk-CXVWUPA3.js.map +0 -1
- package/dist/cli/chunk-GTZTQNX5.js.map +0 -1
- package/dist/cli/chunk-IJ7JA32V.js.map +0 -1
- package/dist/cli/chunk-KQU2TYIL.js.map +0 -1
- package/dist/cli/chunk-MJ6W5UN3.js.map +0 -1
- package/dist/cli/chunk-TEUDEGX2.js.map +0 -1
- package/dist/cli/chunk-V26WPN3J.js.map +0 -1
- package/dist/cli/chunk-WL6SNQ5T.js.map +0 -1
- package/dist/cli/chunk-XSU4QVFW.js.map +0 -1
- package/dist/cli/chunk-ZZYBBX5N.js.map +0 -1
- package/dist/cli/code-DFHSASJ4.js.map +0 -1
- package/dist/cli/desktop-ZCUG7LMF.js.map +0 -1
- package/dist/cli/doctor-Y73CPPRZ.js.map +0 -1
- package/dist/cli/prompt-2D7ID24X.js.map +0 -1
- package/dist/cli/run-5DPQFSP6.js.map +0 -1
- package/dist/cli/server-TQ2IHYQJ.js.map +0 -1
- package/dist/cli/sessions-KY54NG45.js.map +0 -1
- package/dist/cli/setup-XPIOZWS7.js.map +0 -1
- package/dist/cli/stats-X2VTWKNS.js.map +0 -1
- /package/dist/cli/{acp-LGBLHBKY.js.map → acp-QK3DMC53.js.map} +0 -0
- /package/dist/cli/{.-3G6VX5S7.js.map → chat-VV5UWY4V.js.map} +0 -0
- /package/dist/cli/{chunk-YY227BIQ.js.map → chunk-6J6BSUCR.js.map} +0 -0
- /package/dist/cli/{chunk-A3TSSDS2.js.map → chunk-BWYVFFKR.js.map} +0 -0
- /package/dist/cli/{chunk-C53JQES5.js.map → chunk-BYYVYJDX.js.map} +0 -0
- /package/dist/cli/{chunk-HNXDZGC6.js.map → chunk-CI2PF5QX.js.map} +0 -0
- /package/dist/cli/{chunk-QJDDIK3Z.js.map → chunk-E5WCLUIU.js.map} +0 -0
- /package/dist/cli/{chunk-NVURFF27.js.map → chunk-EQATK2L2.js.map} +0 -0
- /package/dist/cli/{chunk-HKWSPKMU.js.map → chunk-FDKOUJKZ.js.map} +0 -0
- /package/dist/cli/{chunk-RDRC3XDT.js.map → chunk-GDKB2PPK.js.map} +0 -0
- /package/dist/cli/{chunk-4HCP2UQW.js.map → chunk-LBLR4CUZ.js.map} +0 -0
- /package/dist/cli/{chunk-I4L2GTSE.js.map → chunk-OJVITDGB.js.map} +0 -0
- /package/dist/cli/{chunk-W7YGWUWU.js.map → chunk-QVDWH2A2.js.map} +0 -0
- /package/dist/cli/{chunk-R3CTO2HM.js.map → chunk-QVUFWDD2.js.map} +0 -0
- /package/dist/cli/{chunk-HVUZWNSP.js.map → chunk-R6GQKKBW.js.map} +0 -0
- /package/dist/cli/{chunk-JNAQYELD.js.map → chunk-UDVFBEXC.js.map} +0 -0
- /package/dist/cli/{chunk-CBIQWMS6.js.map → chunk-VC2CQA5D.js.map} +0 -0
- /package/dist/cli/{chunk-WK3UFQY3.js.map → chunk-VKYSZKH2.js.map} +0 -0
- /package/dist/cli/{chunk-LIR2HBQH.js.map → chunk-VMUUFWFF.js.map} +0 -0
- /package/dist/cli/{commands-OCU42XG4.js.map → commands-RR3GIYOK.js.map} +0 -0
- /package/dist/cli/{commit-XCQIQCYG.js.map → commit-FSHPIINM.js.map} +0 -0
- /package/dist/cli/{diff-66B2KWOJ.js.map → diff-RAAHHLHV.js.map} +0 -0
- /package/dist/cli/{.-6YRPB2C7.js.map → doctor-PKVQIXRT.js.map} +0 -0
- /package/dist/cli/{events-NGZ2OJYH.js.map → events-VRYXOSKI.js.map} +0 -0
- /package/dist/cli/{mcp-MPVGBBJF.js.map → mcp-CRJ26PP4.js.map} +0 -0
- /package/dist/cli/{mcp-browse-4XOTC3FJ.js.map → mcp-browse-QPAOWZOP.js.map} +0 -0
- /package/dist/cli/{mcp-inspect-CEMGKKAH.js.map → mcp-inspect-CVCLABRS.js.map} +0 -0
- /package/dist/cli/{.-EYSVINK3.js.map → prompt-SKYXERSI.js.map} +0 -0
- /package/dist/cli/{prune-sessions-OJEYYLHY.js.map → prune-sessions-SEWX7GP6.js.map} +0 -0
- /package/dist/cli/{replay-AKYQNAQJ.js.map → replay-KPDW2ZMJ.js.map} +0 -0
- /package/dist/cli/{chat-ECK5ZGMV.js.map → stats-T7BL2YOR.js.map} +0 -0
- /package/dist/cli/{version-7O6A5T7Q.js.map → version-3KWDNWLN.js.map} +0 -0
|
@@ -2,65 +2,65 @@
|
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
|
|
3
3
|
import {
|
|
4
4
|
buildCodeToolset
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VC2CQA5D.js";
|
|
6
6
|
import {
|
|
7
7
|
Eventizer,
|
|
8
8
|
autoResolveVerdict
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CI2PF5QX.js";
|
|
10
10
|
import {
|
|
11
11
|
formatMcpLifecycleEvent,
|
|
12
12
|
formatMcpSlowToast
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LBLR4CUZ.js";
|
|
14
14
|
import {
|
|
15
15
|
buildTransportFromSpec,
|
|
16
16
|
preflightStdioSpec
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EQATK2L2.js";
|
|
18
18
|
import {
|
|
19
19
|
CacheFirstLoop,
|
|
20
20
|
ImmutablePrefix,
|
|
21
21
|
bridgeMcpTools
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-ICAFSZHS.js";
|
|
23
|
+
import "./chunk-VKYSZKH2.js";
|
|
24
24
|
import {
|
|
25
25
|
openTranscriptFile,
|
|
26
26
|
recordFromLoopEvent,
|
|
27
27
|
writeRecord
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BYYVYJDX.js";
|
|
29
29
|
import {
|
|
30
30
|
McpClient
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HIYTRCSW.js";
|
|
32
32
|
import {
|
|
33
33
|
codeSystemPrompt
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-UDVFBEXC.js";
|
|
35
35
|
import {
|
|
36
36
|
canonicalPresetName,
|
|
37
37
|
resolvePreset
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-LGEKVMMV.js";
|
|
39
39
|
import "./chunk-6OWJV3YW.js";
|
|
40
40
|
import {
|
|
41
41
|
DeepSeekClient
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-VNQGCA3Q.js";
|
|
43
43
|
import "./chunk-25T6CVUP.js";
|
|
44
44
|
import {
|
|
45
45
|
loadDotenv
|
|
46
46
|
} from "./chunk-2UQP6H6T.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-K6GUKSXH.js";
|
|
48
48
|
import {
|
|
49
49
|
pauseGate
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-GDKB2PPK.js";
|
|
51
|
+
import "./chunk-FY4S7TJZ.js";
|
|
52
52
|
import "./chunk-PLHAZOLZ.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-YDPLF7XR.js";
|
|
54
|
+
import "./chunk-BWYVFFKR.js";
|
|
55
55
|
import "./chunk-S4XVGLRW.js";
|
|
56
56
|
import {
|
|
57
57
|
timestampSuffix
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
58
|
+
} from "./chunk-RRXUIPWG.js";
|
|
59
|
+
import "./chunk-QVUFWDD2.js";
|
|
60
|
+
import "./chunk-VJMBISEI.js";
|
|
61
61
|
import {
|
|
62
62
|
t
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-KDRUEXII.js";
|
|
64
64
|
import {
|
|
65
65
|
loadApiKey,
|
|
66
66
|
loadBaseUrl,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
loadReasoningEffort,
|
|
70
70
|
normalizeMcpConfig,
|
|
71
71
|
readConfig
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-24A7FHGJ.js";
|
|
73
73
|
import {
|
|
74
74
|
VERSION
|
|
75
75
|
} from "./chunk-XXC2BYTV.js";
|
|
@@ -708,4 +708,4 @@ export {
|
|
|
708
708
|
acpCommand,
|
|
709
709
|
loadMcpServers
|
|
710
710
|
};
|
|
711
|
-
//# sourceMappingURL=acp-
|
|
711
|
+
//# sourceMappingURL=acp-QK3DMC53.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
|
|
3
|
+
import {
|
|
4
|
+
chatCommand
|
|
5
|
+
} from "./chunk-ICSYGIPN.js";
|
|
6
|
+
import "./chunk-TKVXTQ3T.js";
|
|
7
|
+
import "./chunk-JMBMLOBP.js";
|
|
8
|
+
import "./chunk-COWPEX54.js";
|
|
9
|
+
import "./chunk-CI2PF5QX.js";
|
|
10
|
+
import "./chunk-LBLR4CUZ.js";
|
|
11
|
+
import "./chunk-EQATK2L2.js";
|
|
12
|
+
import "./chunk-ZZM6QJ4W.js";
|
|
13
|
+
import "./chunk-ICAFSZHS.js";
|
|
14
|
+
import "./chunk-VKYSZKH2.js";
|
|
15
|
+
import "./chunk-BYYVYJDX.js";
|
|
16
|
+
import "./chunk-HIYTRCSW.js";
|
|
17
|
+
import "./chunk-UDVFBEXC.js";
|
|
18
|
+
import "./chunk-FEZK652I.js";
|
|
19
|
+
import "./chunk-6J6BSUCR.js";
|
|
20
|
+
import "./chunk-OJVITDGB.js";
|
|
21
|
+
import "./chunk-X53B3JIX.js";
|
|
22
|
+
import "./chunk-LGEKVMMV.js";
|
|
23
|
+
import "./chunk-FDKOUJKZ.js";
|
|
24
|
+
import "./chunk-5QCB62C4.js";
|
|
25
|
+
import "./chunk-6OWJV3YW.js";
|
|
26
|
+
import "./chunk-VNQGCA3Q.js";
|
|
27
|
+
import "./chunk-25T6CVUP.js";
|
|
28
|
+
import "./chunk-2UQP6H6T.js";
|
|
29
|
+
import "./chunk-QVDWH2A2.js";
|
|
30
|
+
import "./chunk-SZ5XES2N.js";
|
|
31
|
+
import "./chunk-WF7TPVZM.js";
|
|
32
|
+
import "./chunk-E5WCLUIU.js";
|
|
33
|
+
import "./chunk-XJXDHAES.js";
|
|
34
|
+
import "./chunk-GDKB2PPK.js";
|
|
35
|
+
import "./chunk-FY4S7TJZ.js";
|
|
36
|
+
import "./chunk-PLHAZOLZ.js";
|
|
37
|
+
import "./chunk-VMUUFWFF.js";
|
|
38
|
+
import "./chunk-YDPLF7XR.js";
|
|
39
|
+
import "./chunk-BWYVFFKR.js";
|
|
40
|
+
import "./chunk-S4XVGLRW.js";
|
|
41
|
+
import "./chunk-RRXUIPWG.js";
|
|
42
|
+
import "./chunk-QVUFWDD2.js";
|
|
43
|
+
import "./chunk-VJMBISEI.js";
|
|
44
|
+
import "./chunk-KDRUEXII.js";
|
|
45
|
+
import "./chunk-24A7FHGJ.js";
|
|
46
|
+
import "./chunk-XXC2BYTV.js";
|
|
47
|
+
import "./chunk-TUK7OWJA.js";
|
|
48
|
+
export {
|
|
49
|
+
chatCommand
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chat-VV5UWY4V.js.map
|
|
@@ -2290,6 +2290,69 @@ function compileFilters(cfg) {
|
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
2292
|
|
|
2293
|
+
// src/qq/access.ts
|
|
2294
|
+
function normalizeQQOpenId(value) {
|
|
2295
|
+
const trimmed = value?.trim();
|
|
2296
|
+
return trimmed ? trimmed : void 0;
|
|
2297
|
+
}
|
|
2298
|
+
function normalizeQQAllowlist(values) {
|
|
2299
|
+
const list = typeof values === "string" ? values.split(/[,\s]+/) : Array.isArray(values) ? values : [];
|
|
2300
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2301
|
+
const normalized = [];
|
|
2302
|
+
for (const raw of list) {
|
|
2303
|
+
const openid = normalizeQQOpenId(raw);
|
|
2304
|
+
if (!openid || seen.has(openid)) continue;
|
|
2305
|
+
seen.add(openid);
|
|
2306
|
+
normalized.push(openid);
|
|
2307
|
+
}
|
|
2308
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
2309
|
+
}
|
|
2310
|
+
function redactQQOpenId(openid) {
|
|
2311
|
+
const normalized = normalizeQQOpenId(openid);
|
|
2312
|
+
if (!normalized) return "none";
|
|
2313
|
+
if (normalized.length <= 10) return normalized;
|
|
2314
|
+
return `${normalized.slice(0, 6)}...${normalized.slice(-4)}`;
|
|
2315
|
+
}
|
|
2316
|
+
function decideQQAccess(config, openid) {
|
|
2317
|
+
const candidate = normalizeQQOpenId(openid);
|
|
2318
|
+
if (!candidate) return { accept: false, reason: "unauthorized" };
|
|
2319
|
+
const ownerOpenId = normalizeQQOpenId(config.ownerOpenId);
|
|
2320
|
+
const allowlist = normalizeQQAllowlist(config.allowlist) ?? [];
|
|
2321
|
+
const runtimeBoundOpenId = normalizeQQOpenId(config.runtimeBoundOpenId);
|
|
2322
|
+
if (ownerOpenId && candidate === ownerOpenId) {
|
|
2323
|
+
return { accept: true, mode: "owner", bindRuntime: false };
|
|
2324
|
+
}
|
|
2325
|
+
if (allowlist.includes(candidate)) {
|
|
2326
|
+
return { accept: true, mode: "allowlist", bindRuntime: false };
|
|
2327
|
+
}
|
|
2328
|
+
if (ownerOpenId || allowlist.length > 0) {
|
|
2329
|
+
return { accept: false, reason: "unauthorized" };
|
|
2330
|
+
}
|
|
2331
|
+
if (runtimeBoundOpenId) {
|
|
2332
|
+
if (candidate === runtimeBoundOpenId) {
|
|
2333
|
+
return { accept: true, mode: "runtime", bindRuntime: false };
|
|
2334
|
+
}
|
|
2335
|
+
return { accept: false, reason: "unauthorized" };
|
|
2336
|
+
}
|
|
2337
|
+
return { accept: true, mode: "open", bindRuntime: true };
|
|
2338
|
+
}
|
|
2339
|
+
function describeQQAccess(config) {
|
|
2340
|
+
const ownerOpenId = normalizeQQOpenId(config.ownerOpenId);
|
|
2341
|
+
const allowlist = normalizeQQAllowlist(config.allowlist) ?? [];
|
|
2342
|
+
const runtimeBoundOpenId = normalizeQQOpenId(config.runtimeBoundOpenId);
|
|
2343
|
+
if (ownerOpenId) {
|
|
2344
|
+
const suffix = allowlist.length > 0 ? `, allowlist ${allowlist.length}` : "";
|
|
2345
|
+
return `owner ${redactQQOpenId(ownerOpenId)}${suffix}`;
|
|
2346
|
+
}
|
|
2347
|
+
if (allowlist.length > 0) {
|
|
2348
|
+
return `allowlist ${allowlist.length}`;
|
|
2349
|
+
}
|
|
2350
|
+
if (runtimeBoundOpenId) {
|
|
2351
|
+
return `first-sender (runtime only, ${redactQQOpenId(runtimeBoundOpenId)})`;
|
|
2352
|
+
}
|
|
2353
|
+
return "open (unbound)";
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2293
2356
|
// src/config.ts
|
|
2294
2357
|
var BUILTIN_TYPE_DOCS = {
|
|
2295
2358
|
user: "role / skills / preferences",
|
|
@@ -2334,9 +2397,16 @@ function loadMetasoApiKey(path = defaultConfigPath()) {
|
|
|
2334
2397
|
if (cfg && typeof cfg === "string" && cfg.trim()) return cfg.trim();
|
|
2335
2398
|
return DEFAULT_METASO_API_KEY;
|
|
2336
2399
|
}
|
|
2400
|
+
function loadTavilyApiKey(path = defaultConfigPath()) {
|
|
2401
|
+
if (process.env.TAVILY_API_KEY) return process.env.TAVILY_API_KEY.trim();
|
|
2402
|
+
const cfg = readConfig(path).tavilyApiKey;
|
|
2403
|
+
if (cfg && typeof cfg === "string" && cfg.trim()) return cfg.trim();
|
|
2404
|
+
return void 0;
|
|
2405
|
+
}
|
|
2337
2406
|
var DEFAULT_OLLAMA_URL = "http://localhost:11434";
|
|
2338
2407
|
var DEFAULT_EMBED_MODEL = "nomic-embed-text";
|
|
2339
2408
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
2409
|
+
var DEFAULT_BATCH_SIZE = 10;
|
|
2340
2410
|
function defaultConfigPath() {
|
|
2341
2411
|
return join(homedir(), ".reasonix", "config.json");
|
|
2342
2412
|
}
|
|
@@ -2361,7 +2431,9 @@ function loadLanguage(path = defaultConfigPath()) {
|
|
|
2361
2431
|
return readConfig(path).lang;
|
|
2362
2432
|
}
|
|
2363
2433
|
function inferMcpTransport(cfg) {
|
|
2364
|
-
|
|
2434
|
+
const declared = cfg.transport ?? cfg.type;
|
|
2435
|
+
if (declared === "http") return "streamable-http";
|
|
2436
|
+
if (declared) return declared;
|
|
2365
2437
|
const url = cfg.url?.trim() ?? "";
|
|
2366
2438
|
if (/^streamable\+https?:\/\//i.test(url)) return "streamable-http";
|
|
2367
2439
|
if (/^https?:\/\//i.test(url)) return "sse";
|
|
@@ -2471,6 +2543,28 @@ function loadBaseUrl(path = defaultConfigPath()) {
|
|
|
2471
2543
|
if (process.env.DEEPSEEK_BASE_URL) return process.env.DEEPSEEK_BASE_URL;
|
|
2472
2544
|
return readConfig(path).baseUrl;
|
|
2473
2545
|
}
|
|
2546
|
+
function isNonNegativeNumber(value) {
|
|
2547
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
2548
|
+
}
|
|
2549
|
+
function loadPricingOverride(path = defaultConfigPath()) {
|
|
2550
|
+
const raw = readConfig(path).pricingOverride;
|
|
2551
|
+
if (!isPlainObject(raw)) return {};
|
|
2552
|
+
const result = {};
|
|
2553
|
+
for (const [model, value] of Object.entries(raw)) {
|
|
2554
|
+
if (!isPlainObject(value)) continue;
|
|
2555
|
+
const pricing = {};
|
|
2556
|
+
if (isNonNegativeNumber(value.inputCacheHit)) pricing.inputCacheHit = value.inputCacheHit;
|
|
2557
|
+
if (isNonNegativeNumber(value.inputCacheMiss)) pricing.inputCacheMiss = value.inputCacheMiss;
|
|
2558
|
+
if (isNonNegativeNumber(value.output)) pricing.output = value.output;
|
|
2559
|
+
if (Object.keys(pricing).length > 0) result[model] = pricing;
|
|
2560
|
+
}
|
|
2561
|
+
return result;
|
|
2562
|
+
}
|
|
2563
|
+
function loadRateLimit(path = defaultConfigPath()) {
|
|
2564
|
+
const rpm = readConfig(path).rateLimit?.rpm;
|
|
2565
|
+
if (typeof rpm !== "number" || !Number.isInteger(rpm) || rpm <= 0) return void 0;
|
|
2566
|
+
return { rpm };
|
|
2567
|
+
}
|
|
2474
2568
|
function saveBaseUrl(url, path = defaultConfigPath()) {
|
|
2475
2569
|
const cfg = readConfig(path);
|
|
2476
2570
|
const trimmed = url.trim();
|
|
@@ -2743,16 +2837,27 @@ function pushRecentWorkspace(dir, path = defaultConfigPath()) {
|
|
|
2743
2837
|
}
|
|
2744
2838
|
function loadDesktopOpenTabs(path = defaultConfigPath()) {
|
|
2745
2839
|
const v = readConfig(path).desktopOpenTabs;
|
|
2746
|
-
|
|
2840
|
+
if (!Array.isArray(v)) return [];
|
|
2841
|
+
const out = [];
|
|
2842
|
+
for (const entry of v) {
|
|
2843
|
+
if (typeof entry === "string") {
|
|
2844
|
+
if (entry) out.push({ dir: entry });
|
|
2845
|
+
} else if (entry && typeof entry === "object" && typeof entry.dir === "string" && entry.dir.length > 0) {
|
|
2846
|
+
const e = entry;
|
|
2847
|
+
out.push({ dir: e.dir, session: e.session, active: e.active });
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
return out;
|
|
2747
2851
|
}
|
|
2748
|
-
function saveDesktopOpenTabs(
|
|
2852
|
+
function saveDesktopOpenTabs(tabs, path = defaultConfigPath()) {
|
|
2749
2853
|
const cfg = readConfig(path);
|
|
2750
|
-
const cleaned =
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
}
|
|
2854
|
+
const cleaned = tabs.filter((t) => t && typeof t.dir === "string" && t.dir.length > 0).map((t) => {
|
|
2855
|
+
const e = { dir: t.dir };
|
|
2856
|
+
if (t.session) e.session = t.session;
|
|
2857
|
+
if (t.active) e.active = true;
|
|
2858
|
+
return e;
|
|
2859
|
+
});
|
|
2860
|
+
cfg.desktopOpenTabs = cleaned.length === 0 ? void 0 : cleaned;
|
|
2756
2861
|
writeConfig(cfg, path);
|
|
2757
2862
|
}
|
|
2758
2863
|
function loadPreset(path = defaultConfigPath()) {
|
|
@@ -2794,7 +2899,8 @@ function resolveSemanticEmbeddingConfig(path = defaultConfigPath()) {
|
|
|
2794
2899
|
apiKey,
|
|
2795
2900
|
model,
|
|
2796
2901
|
extraBody: normalizeExtraBody(user.openaiCompat?.extraBody),
|
|
2797
|
-
timeoutMs: DEFAULT_TIMEOUT_MS
|
|
2902
|
+
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
2903
|
+
batchSize: user.openaiCompat?.batchSize ?? DEFAULT_BATCH_SIZE
|
|
2798
2904
|
};
|
|
2799
2905
|
}
|
|
2800
2906
|
return {
|
|
@@ -2817,7 +2923,8 @@ function redactSemanticEmbeddingConfig(user) {
|
|
|
2817
2923
|
apiKey: normalized.openaiCompat?.apiKey ? redactKey(normalized.openaiCompat.apiKey) : "",
|
|
2818
2924
|
apiKeySet: Boolean(normalized.openaiCompat?.apiKey?.trim()),
|
|
2819
2925
|
model: normalized.openaiCompat?.model?.trim() ?? "",
|
|
2820
|
-
extraBody: normalizeExtraBody(normalized.openaiCompat?.extraBody)
|
|
2926
|
+
extraBody: normalizeExtraBody(normalized.openaiCompat?.extraBody),
|
|
2927
|
+
batchSize: normalized.openaiCompat?.batchSize ?? DEFAULT_BATCH_SIZE
|
|
2821
2928
|
}
|
|
2822
2929
|
};
|
|
2823
2930
|
}
|
|
@@ -2854,7 +2961,8 @@ function normalizeSemanticEmbeddingUserConfig(cfg) {
|
|
|
2854
2961
|
baseUrl: normalizeOptionalString(cfg?.openaiCompat?.baseUrl),
|
|
2855
2962
|
apiKey: normalizeOptionalString(cfg?.openaiCompat?.apiKey),
|
|
2856
2963
|
model: normalizeOptionalString(cfg?.openaiCompat?.model),
|
|
2857
|
-
extraBody: normalizeExtraBody(cfg?.openaiCompat?.extraBody)
|
|
2964
|
+
extraBody: normalizeExtraBody(cfg?.openaiCompat?.extraBody),
|
|
2965
|
+
batchSize: normalizePositiveInt(cfg?.openaiCompat?.batchSize)
|
|
2858
2966
|
}
|
|
2859
2967
|
};
|
|
2860
2968
|
}
|
|
@@ -2862,6 +2970,9 @@ function normalizeOptionalString(value) {
|
|
|
2862
2970
|
const trimmed = value?.trim();
|
|
2863
2971
|
return trimmed ? trimmed : void 0;
|
|
2864
2972
|
}
|
|
2973
|
+
function normalizePositiveInt(value) {
|
|
2974
|
+
return value !== void 0 && Number.isInteger(value) && value > 0 ? value : void 0;
|
|
2975
|
+
}
|
|
2865
2976
|
function normalizeExtraBody(value) {
|
|
2866
2977
|
if (value === void 0) return {};
|
|
2867
2978
|
if (!isPlainObject(value)) {
|
|
@@ -2883,26 +2994,39 @@ function isPlainObject(value) {
|
|
|
2883
2994
|
}
|
|
2884
2995
|
function loadQQConfig(path = defaultConfigPath()) {
|
|
2885
2996
|
const envSandbox = process.env.QQ_SANDBOX;
|
|
2997
|
+
const envAllowlist = normalizeQQAllowlist(process.env.QQ_ALLOWLIST);
|
|
2886
2998
|
const fromEnv = {
|
|
2887
2999
|
appId: process.env.QQ_APPID,
|
|
2888
3000
|
appSecret: process.env.QQ_SECRET,
|
|
2889
|
-
sandbox: envSandbox === "1" ? true : envSandbox === "0" ? false : void 0
|
|
3001
|
+
sandbox: envSandbox === "1" ? true : envSandbox === "0" ? false : void 0,
|
|
3002
|
+
ownerOpenId: normalizeQQOpenId(process.env.QQ_OWNER_OPENID),
|
|
3003
|
+
allowlist: envAllowlist
|
|
2890
3004
|
};
|
|
2891
3005
|
const fromCfg = readConfig(path).qq ?? {};
|
|
3006
|
+
const ownerOpenId = fromEnv.ownerOpenId ?? normalizeQQOpenId(fromCfg.ownerOpenId);
|
|
3007
|
+
const allowlist = normalizeQQAllowlist(fromEnv.allowlist ?? fromCfg.allowlist)?.filter(
|
|
3008
|
+
(openid) => openid !== ownerOpenId
|
|
3009
|
+
);
|
|
2892
3010
|
return {
|
|
2893
3011
|
appId: fromEnv.appId ?? fromCfg.appId,
|
|
2894
3012
|
appSecret: fromEnv.appSecret ?? fromCfg.appSecret,
|
|
2895
3013
|
sandbox: fromEnv.sandbox ?? fromCfg.sandbox ?? false,
|
|
2896
|
-
enabled: fromCfg.enabled === true
|
|
3014
|
+
enabled: fromCfg.enabled === true,
|
|
3015
|
+
ownerOpenId,
|
|
3016
|
+
allowlist
|
|
2897
3017
|
};
|
|
2898
3018
|
}
|
|
2899
3019
|
function saveQQConfig(cfg, path = defaultConfigPath()) {
|
|
2900
3020
|
const rootCfg = readConfig(path);
|
|
3021
|
+
const ownerOpenId = normalizeQQOpenId(cfg.ownerOpenId);
|
|
3022
|
+
const allowlist = normalizeQQAllowlist(cfg.allowlist)?.filter((openid) => openid !== ownerOpenId);
|
|
2901
3023
|
rootCfg.qq = {
|
|
2902
3024
|
appId: cfg.appId,
|
|
2903
3025
|
appSecret: cfg.appSecret,
|
|
2904
3026
|
sandbox: cfg.sandbox,
|
|
2905
|
-
enabled: cfg.enabled
|
|
3027
|
+
enabled: cfg.enabled,
|
|
3028
|
+
ownerOpenId,
|
|
3029
|
+
allowlist
|
|
2906
3030
|
};
|
|
2907
3031
|
writeConfig(rootCfg, path);
|
|
2908
3032
|
}
|
|
@@ -2932,9 +3056,15 @@ export {
|
|
|
2932
3056
|
overlayMatchedSpec,
|
|
2933
3057
|
specToRaw,
|
|
2934
3058
|
parseMcpSpec,
|
|
3059
|
+
normalizeQQOpenId,
|
|
3060
|
+
normalizeQQAllowlist,
|
|
3061
|
+
redactQQOpenId,
|
|
3062
|
+
decideQQAccess,
|
|
3063
|
+
describeQQAccess,
|
|
2935
3064
|
loadMemoryTypeRegistry,
|
|
2936
3065
|
memoryTypeDefaults,
|
|
2937
3066
|
loadMetasoApiKey,
|
|
3067
|
+
loadTavilyApiKey,
|
|
2938
3068
|
defaultConfigPath,
|
|
2939
3069
|
readConfig,
|
|
2940
3070
|
writeConfig,
|
|
@@ -2943,6 +3073,8 @@ export {
|
|
|
2943
3073
|
saveLanguage,
|
|
2944
3074
|
loadApiKey,
|
|
2945
3075
|
loadBaseUrl,
|
|
3076
|
+
loadPricingOverride,
|
|
3077
|
+
loadRateLimit,
|
|
2946
3078
|
saveBaseUrl,
|
|
2947
3079
|
normalizeSkillPathEntries,
|
|
2948
3080
|
normalizeSkillPaths,
|
|
@@ -2993,4 +3125,4 @@ export {
|
|
|
2993
3125
|
loadQQConfig,
|
|
2994
3126
|
saveQQConfig
|
|
2995
3127
|
};
|
|
2996
|
-
//# sourceMappingURL=chunk-
|
|
3128
|
+
//# sourceMappingURL=chunk-24A7FHGJ.js.map
|