reasonix 0.45.1 → 0.46.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/README.md +3 -8
- package/README.zh-CN.md +3 -0
- package/dashboard/dist/app.js +76 -6
- package/dashboard/dist/app.js.map +1 -1
- package/dist/cli/{acp-LGBLHBKY.js → acp-LKJU5DZX.js} +19 -19
- package/dist/cli/chat-W7LAWEN6.js +51 -0
- package/dist/cli/{chunk-5I2C4JEO.js → chunk-2AASOSD5.js} +6 -6
- package/dist/cli/{chunk-5I2C4JEO.js.map → chunk-2AASOSD5.js.map} +1 -1
- package/dist/cli/{chunk-HVUZWNSP.js → chunk-3AAG2CUT.js} +2 -2
- package/dist/cli/{chunk-IJ7JA32V.js → chunk-6VANO7KB.js} +44 -8
- package/dist/cli/chunk-6VANO7KB.js.map +1 -0
- package/dist/cli/{chunk-LIR2HBQH.js → chunk-7LOJS3LV.js} +2 -2
- package/dist/cli/{chunk-AB2RED3C.js → chunk-7SGGXNB2.js} +16 -16
- package/dist/cli/{chunk-AB2RED3C.js.map → chunk-7SGGXNB2.js.map} +1 -1
- package/dist/cli/{chunk-CBIQWMS6.js → chunk-7YW6TPXK.js} +7 -7
- package/dist/cli/{chunk-A3TSSDS2.js → chunk-C72TNHDE.js} +2 -2
- package/dist/cli/{chunk-AVFXO2EZ.js → chunk-DGA5QYFM.js} +107 -4
- package/dist/cli/chunk-DGA5QYFM.js.map +1 -0
- package/dist/cli/{chunk-JNAQYELD.js → chunk-DHRVZJ2D.js} +2 -2
- package/dist/cli/{chunk-5ACMUK4Q.js → chunk-E7TAHQ4A.js} +2 -1
- package/dist/cli/{chunk-C53JQES5.js → chunk-EAOL43HB.js} +3 -3
- package/dist/cli/{chunk-QJDDIK3Z.js → chunk-IYQ325V7.js} +2 -2
- package/dist/cli/{chunk-4CTDEJUF.js → chunk-JLQDNLZF.js} +2 -2
- package/dist/cli/{chunk-RDRC3XDT.js → chunk-JVFEJAJX.js} +2 -2
- package/dist/cli/{chunk-GTZTQNX5.js → chunk-JVQT5IYP.js} +7 -7
- package/dist/cli/{chunk-IBJIK2DD.js → chunk-K3AIFMI6.js} +2 -2
- package/dist/cli/chunk-K3AIFMI6.js.map +1 -0
- package/dist/cli/{chunk-ZZYBBX5N.js → chunk-M4E5JK6S.js} +23 -9
- package/dist/cli/chunk-M4E5JK6S.js.map +1 -0
- package/dist/cli/{chunk-V26WPN3J.js → chunk-MIIZJD5O.js} +28 -1
- package/dist/cli/chunk-MIIZJD5O.js.map +1 -0
- package/dist/cli/{chunk-4HCP2UQW.js → chunk-NCBP5D6E.js} +2 -2
- package/dist/cli/{chunk-HKWSPKMU.js → chunk-R2ASNSEO.js} +8 -8
- package/dist/cli/{chunk-W7YGWUWU.js → chunk-SE7C5ZSI.js} +3 -3
- package/dist/cli/{chunk-OLLQ76U6.js → chunk-SPXN5JIT.js} +1536 -2500
- package/dist/cli/chunk-SPXN5JIT.js.map +1 -0
- package/dist/cli/{chunk-WK3UFQY3.js → chunk-TDSBASOF.js} +2 -2
- package/dist/cli/{chunk-XSU4QVFW.js → chunk-WQ6ZRDQM.js} +12 -3
- package/dist/cli/chunk-WQ6ZRDQM.js.map +1 -0
- package/dist/cli/{chunk-R3CTO2HM.js → chunk-WRONKNIH.js} +2 -2
- package/dist/cli/{chunk-MJ6W5UN3.js → chunk-XPAUNFOL.js} +2 -2
- package/dist/cli/{chunk-NVURFF27.js → chunk-YRLC2EDF.js} +2 -2
- package/dist/cli/{chunk-WL6SNQ5T.js → chunk-ZOQHVQON.js} +9 -93
- package/dist/cli/chunk-ZOQHVQON.js.map +1 -0
- package/dist/cli/{code-D7V2TQX2.js → code-2JIHL5M2.js} +30 -33
- package/dist/cli/code-2JIHL5M2.js.map +1 -0
- package/dist/cli/{commands-OCU42XG4.js → commands-OPT5AJNH.js} +4 -4
- package/dist/cli/{commit-XCQIQCYG.js → commit-KA37H6GM.js} +3 -3
- package/dist/cli/{desktop-ZCUG7LMF.js → desktop-5ONTRU3C.js} +20 -20
- package/dist/cli/{diff-66B2KWOJ.js → diff-SOIA7AKH.js} +8 -8
- package/dist/cli/{doctor-Y73CPPRZ.js → doctor-RCUP4XRV.js} +9 -9
- package/dist/cli/{events-NGZ2OJYH.js → events-6KHITNX4.js} +3 -3
- package/dist/cli/index.js +46 -102
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-MPVGBBJF.js → mcp-JP5OWD6R.js} +2 -2
- package/dist/cli/{mcp-browse-4XOTC3FJ.js → mcp-browse-ONCJJPJN.js} +2 -2
- package/dist/cli/{mcp-inspect-CEMGKKAH.js → mcp-inspect-TPLHW5JA.js} +4 -4
- package/dist/cli/{prompt-2D7ID24X.js → prompt-RJDNCQAP.js} +3 -3
- package/dist/cli/{prune-sessions-OJEYYLHY.js → prune-sessions-MKEATRVL.js} +2 -2
- package/dist/cli/{replay-HIQYWBEK.js → replay-4NILJG4U.js} +8 -8
- package/dist/cli/{run-5DPQFSP6.js → run-WFGXB4SB.js} +17 -18
- package/dist/cli/run-WFGXB4SB.js.map +1 -0
- package/dist/cli/{server-TQ2IHYQJ.js → server-5VFQP3PV.js} +13 -13
- package/dist/cli/{sessions-KY54NG45.js → sessions-5XDJDALO.js} +28 -14
- package/dist/cli/sessions-5XDJDALO.js.map +1 -0
- package/dist/cli/{setup-DDNOMMAB.js → setup-F6XSWLRA.js} +7 -7
- package/dist/cli/setup-F6XSWLRA.js.map +1 -0
- package/dist/cli/{stats-X2VTWKNS.js → stats-ALHBZICE.js} +6 -6
- package/dist/cli/{version-7O6A5T7Q.js → version-JVRAHBMM.js} +14 -14
- package/dist/index.d.ts +23 -13
- package/dist/index.js +1112 -1090
- package/dist/index.js.map +1 -1
- package/package.json +5 -16
- package/dist/cli/chat-I7UTQO5L.js +0 -51
- package/dist/cli/chunk-AVFXO2EZ.js.map +0 -1
- package/dist/cli/chunk-IBJIK2DD.js.map +0 -1
- package/dist/cli/chunk-IJ7JA32V.js.map +0 -1
- package/dist/cli/chunk-OLLQ76U6.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-D7V2TQX2.js.map +0 -1
- package/dist/cli/run-5DPQFSP6.js.map +0 -1
- package/dist/cli/sessions-KY54NG45.js.map +0 -1
- package/dist/cli/setup-DDNOMMAB.js.map +0 -1
- /package/dist/cli/{acp-LGBLHBKY.js.map → acp-LKJU5DZX.js.map} +0 -0
- /package/dist/cli/{chat-I7UTQO5L.js.map → chat-W7LAWEN6.js.map} +0 -0
- /package/dist/cli/{chunk-HVUZWNSP.js.map → chunk-3AAG2CUT.js.map} +0 -0
- /package/dist/cli/{chunk-LIR2HBQH.js.map → chunk-7LOJS3LV.js.map} +0 -0
- /package/dist/cli/{chunk-CBIQWMS6.js.map → chunk-7YW6TPXK.js.map} +0 -0
- /package/dist/cli/{chunk-A3TSSDS2.js.map → chunk-C72TNHDE.js.map} +0 -0
- /package/dist/cli/{chunk-JNAQYELD.js.map → chunk-DHRVZJ2D.js.map} +0 -0
- /package/dist/cli/{chunk-5ACMUK4Q.js.map → chunk-E7TAHQ4A.js.map} +0 -0
- /package/dist/cli/{chunk-C53JQES5.js.map → chunk-EAOL43HB.js.map} +0 -0
- /package/dist/cli/{chunk-QJDDIK3Z.js.map → chunk-IYQ325V7.js.map} +0 -0
- /package/dist/cli/{chunk-4CTDEJUF.js.map → chunk-JLQDNLZF.js.map} +0 -0
- /package/dist/cli/{chunk-RDRC3XDT.js.map → chunk-JVFEJAJX.js.map} +0 -0
- /package/dist/cli/{chunk-GTZTQNX5.js.map → chunk-JVQT5IYP.js.map} +0 -0
- /package/dist/cli/{chunk-4HCP2UQW.js.map → chunk-NCBP5D6E.js.map} +0 -0
- /package/dist/cli/{chunk-HKWSPKMU.js.map → chunk-R2ASNSEO.js.map} +0 -0
- /package/dist/cli/{chunk-W7YGWUWU.js.map → chunk-SE7C5ZSI.js.map} +0 -0
- /package/dist/cli/{chunk-WK3UFQY3.js.map → chunk-TDSBASOF.js.map} +0 -0
- /package/dist/cli/{chunk-R3CTO2HM.js.map → chunk-WRONKNIH.js.map} +0 -0
- /package/dist/cli/{chunk-MJ6W5UN3.js.map → chunk-XPAUNFOL.js.map} +0 -0
- /package/dist/cli/{chunk-NVURFF27.js.map → chunk-YRLC2EDF.js.map} +0 -0
- /package/dist/cli/{commands-OCU42XG4.js.map → commands-OPT5AJNH.js.map} +0 -0
- /package/dist/cli/{commit-XCQIQCYG.js.map → commit-KA37H6GM.js.map} +0 -0
- /package/dist/cli/{desktop-ZCUG7LMF.js.map → desktop-5ONTRU3C.js.map} +0 -0
- /package/dist/cli/{diff-66B2KWOJ.js.map → diff-SOIA7AKH.js.map} +0 -0
- /package/dist/cli/{doctor-Y73CPPRZ.js.map → doctor-RCUP4XRV.js.map} +0 -0
- /package/dist/cli/{events-NGZ2OJYH.js.map → events-6KHITNX4.js.map} +0 -0
- /package/dist/cli/{mcp-MPVGBBJF.js.map → mcp-JP5OWD6R.js.map} +0 -0
- /package/dist/cli/{mcp-browse-4XOTC3FJ.js.map → mcp-browse-ONCJJPJN.js.map} +0 -0
- /package/dist/cli/{mcp-inspect-CEMGKKAH.js.map → mcp-inspect-TPLHW5JA.js.map} +0 -0
- /package/dist/cli/{prompt-2D7ID24X.js.map → prompt-RJDNCQAP.js.map} +0 -0
- /package/dist/cli/{prune-sessions-OJEYYLHY.js.map → prune-sessions-MKEATRVL.js.map} +0 -0
- /package/dist/cli/{replay-HIQYWBEK.js.map → replay-4NILJG4U.js.map} +0 -0
- /package/dist/cli/{server-TQ2IHYQJ.js.map → server-5VFQP3PV.js.map} +0 -0
- /package/dist/cli/{stats-X2VTWKNS.js.map → stats-ALHBZICE.js.map} +0 -0
- /package/dist/cli/{version-7O6A5T7Q.js.map → version-JVRAHBMM.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
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
|
probeOllama
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JLQDNLZF.js";
|
|
6
6
|
|
|
7
7
|
// src/index/semantic/ollama-launcher.ts
|
|
8
8
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -98,4 +98,4 @@ export {
|
|
|
98
98
|
startOllamaDaemon,
|
|
99
99
|
pullOllamaModel
|
|
100
100
|
};
|
|
101
|
-
//# sourceMappingURL=chunk-
|
|
101
|
+
//# sourceMappingURL=chunk-7LOJS3LV.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TONE_ACTIVE,
|
|
14
14
|
resolveThemeName,
|
|
15
15
|
setActiveTheme
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DGA5QYFM.js";
|
|
17
17
|
import {
|
|
18
18
|
__toESM
|
|
19
19
|
} from "./chunk-TUK7OWJA.js";
|
|
@@ -119,17 +119,17 @@ function useColor() {
|
|
|
119
119
|
var GRADIENT = proxyThemeValue(() => gradientFromTheme(currentTheme()));
|
|
120
120
|
var COLOR = proxyThemeValue(() => colorFromTheme(currentTheme()));
|
|
121
121
|
var GLYPH = {
|
|
122
|
-
brand: "\
|
|
123
|
-
user: "\
|
|
124
|
-
assistant: "\
|
|
125
|
-
toolOk: "\
|
|
126
|
-
toolErr: "\
|
|
127
|
-
warn: "\
|
|
128
|
-
err: "\
|
|
129
|
-
arrow: "\
|
|
122
|
+
brand: "\u25CF",
|
|
123
|
+
user: "\u25CF",
|
|
124
|
+
assistant: "\u25CF",
|
|
125
|
+
toolOk: "\u2713",
|
|
126
|
+
toolErr: "\u2717",
|
|
127
|
+
warn: "\u26A0",
|
|
128
|
+
err: "\u2717",
|
|
129
|
+
arrow: "\u25B8",
|
|
130
130
|
bullet: "\xB7",
|
|
131
|
-
bar: "\
|
|
132
|
-
thinBar: "\
|
|
131
|
+
bar: "\u2502",
|
|
132
|
+
thinBar: "\u2502",
|
|
133
133
|
block: "\u2588",
|
|
134
134
|
shade1: "\u2591",
|
|
135
135
|
shade2: "\u2592",
|
|
@@ -139,11 +139,11 @@ var GLYPH = {
|
|
|
139
139
|
pending: "\u25CB",
|
|
140
140
|
fail: "\u2717",
|
|
141
141
|
running: "\u25CF",
|
|
142
|
-
branch: "\
|
|
143
|
-
branchEnd: "\
|
|
144
|
-
branchStub: "\
|
|
142
|
+
branch: "\u251C",
|
|
143
|
+
branchEnd: "\u2514",
|
|
144
|
+
branchStub: "\u2502",
|
|
145
145
|
rule: "\u2500",
|
|
146
|
-
spinFrames: ["\
|
|
146
|
+
spinFrames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827"]
|
|
147
147
|
};
|
|
148
148
|
var SURFACE2 = proxyThemeValue(() => surfaceFromTheme(currentTheme()));
|
|
149
149
|
var FG2 = proxyThemeValue(() => fgFromTheme(currentTheme()));
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
COLOR,
|
|
158
158
|
GLYPH
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-7SGGXNB2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/ui/theme/context.tsx","../../src/cli/ui/theme.ts"],"sourcesContent":["import React from \"react\";\nimport {\n DEFAULT_THEME_NAME,\n THEMES,\n type ThemeName,\n type ThemeTokens,\n resolveThemeName,\n setActiveTheme,\n} from \"./tokens.js\";\n\nconst ThemeContext = React.createContext<ThemeTokens>(THEMES[DEFAULT_THEME_NAME]);\n\nexport function ThemeProvider({\n children,\n name,\n}: {\n children: React.ReactNode;\n name?: string | null;\n}): React.ReactElement {\n const theme = THEMES[resolveThemeName(name)];\n const restoreActiveTheme = setActiveTheme(theme);\n\n React.useLayoutEffect(() => restoreActiveTheme, [restoreActiveTheme]);\n\n return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;\n}\n\nexport function useThemeTokens(): ThemeTokens {\n return React.useContext(ThemeContext);\n}\n\nexport function useTheme(): ThemeTokens {\n return useThemeTokens();\n}\n\nexport type { ThemeName, ThemeTokens };\n","import React from \"react\";\nimport { useThemeTokens } from \"./theme/context.js\";\nimport {\n CARD,\n FG as TOKEN_FG,\n SURFACE as TOKEN_SURFACE,\n TONE,\n TONE_ACTIVE,\n type ThemeTokens,\n} from \"./theme/tokens.js\";\n\nexport type UiColor = ReturnType<typeof colorFromTheme>;\nexport type UiGradient = ReturnType<typeof gradientFromTheme>;\nexport type UiSurface = ReturnType<typeof surfaceFromTheme>;\nexport type UiFg = ReturnType<typeof fgFromTheme>;\n\nexport function gradientFromTheme(theme: ThemeTokens): ReadonlyArray<string> {\n return [\n theme.tone.ok,\n theme.tone.brand,\n theme.tone.info,\n theme.toneActive.brand,\n theme.toneActive.violet,\n theme.tone.accent,\n theme.toneActive.accent,\n theme.tone.err,\n ];\n}\n\nexport function colorFromTheme(theme: ThemeTokens) {\n return {\n primary: theme.tone.brand,\n accent: theme.tone.accent,\n brand: theme.tone.ok,\n\n user: theme.tone.brand,\n assistant: theme.tone.ok,\n tool: theme.tone.warn,\n toolErr: theme.tone.err,\n info: theme.fg.sub,\n warn: theme.tone.warn,\n err: theme.tone.err,\n ok: theme.tone.ok,\n } as const;\n}\n\nexport function surfaceFromTheme(theme: ThemeTokens) {\n return {\n canvas: theme.surface.bg,\n shell: theme.surface.bgInput,\n card: theme.surface.bgElev,\n elev: theme.surface.bgElev,\n sel: theme.surface.bgInput,\n line: theme.fg.faint,\n lineSoft: theme.fg.meta,\n } as const;\n}\n\nexport function fgFromTheme(theme: ThemeTokens) {\n return {\n strong: theme.fg.strong,\n default: theme.fg.body,\n dim: theme.fg.sub,\n faint: theme.fg.meta,\n ghost: theme.fg.faint,\n } as const;\n}\n\nfunction proxyThemeValue<T extends object>(build: () => T): T {\n const target = build();\n return new Proxy(target, {\n get(_target, prop: string | symbol) {\n return build()[prop as keyof T];\n },\n getOwnPropertyDescriptor(_target, prop: string | symbol) {\n return Reflect.getOwnPropertyDescriptor(build(), prop);\n },\n has(_target, prop: string | symbol) {\n return prop in build();\n },\n ownKeys() {\n return Reflect.ownKeys(build());\n },\n });\n}\n\nfunction currentTheme(): ThemeTokens {\n return {\n fg: TOKEN_FG,\n tone: TONE,\n toneActive: TONE_ACTIVE,\n surface: TOKEN_SURFACE,\n card: CARD,\n };\n}\n\nexport function useGradient(): UiGradient {\n const theme = useThemeTokens();\n return React.useMemo(() => gradientFromTheme(theme), [theme]);\n}\n\nexport function useColor(): UiColor {\n const theme = useThemeTokens();\n return React.useMemo(() => colorFromTheme(theme), [theme]);\n}\n\nexport function useUiSurface(): UiSurface {\n const theme = useThemeTokens();\n return React.useMemo(() => surfaceFromTheme(theme), [theme]);\n}\n\nexport function useUiFg(): UiFg {\n const theme = useThemeTokens();\n return React.useMemo(() => fgFromTheme(theme), [theme]);\n}\n\nexport const GRADIENT = proxyThemeValue(() => gradientFromTheme(currentTheme()));\nexport const COLOR = proxyThemeValue(() => colorFromTheme(currentTheme()));\n\nexport const GLYPH = {\n brand: \"
|
|
1
|
+
{"version":3,"sources":["../../src/cli/ui/theme/context.tsx","../../src/cli/ui/theme.ts"],"sourcesContent":["import React from \"react\";\nimport {\n DEFAULT_THEME_NAME,\n THEMES,\n type ThemeName,\n type ThemeTokens,\n resolveThemeName,\n setActiveTheme,\n} from \"./tokens.js\";\n\nconst ThemeContext = React.createContext<ThemeTokens>(THEMES[DEFAULT_THEME_NAME]);\n\nexport function ThemeProvider({\n children,\n name,\n}: {\n children: React.ReactNode;\n name?: string | null;\n}): React.ReactElement {\n const theme = THEMES[resolveThemeName(name)];\n const restoreActiveTheme = setActiveTheme(theme);\n\n React.useLayoutEffect(() => restoreActiveTheme, [restoreActiveTheme]);\n\n return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;\n}\n\nexport function useThemeTokens(): ThemeTokens {\n return React.useContext(ThemeContext);\n}\n\nexport function useTheme(): ThemeTokens {\n return useThemeTokens();\n}\n\nexport type { ThemeName, ThemeTokens };\n","import React from \"react\";\nimport { useThemeTokens } from \"./theme/context.js\";\nimport {\n CARD,\n FG as TOKEN_FG,\n SURFACE as TOKEN_SURFACE,\n TONE,\n TONE_ACTIVE,\n type ThemeTokens,\n} from \"./theme/tokens.js\";\n\nexport type UiColor = ReturnType<typeof colorFromTheme>;\nexport type UiGradient = ReturnType<typeof gradientFromTheme>;\nexport type UiSurface = ReturnType<typeof surfaceFromTheme>;\nexport type UiFg = ReturnType<typeof fgFromTheme>;\n\nexport function gradientFromTheme(theme: ThemeTokens): ReadonlyArray<string> {\n return [\n theme.tone.ok,\n theme.tone.brand,\n theme.tone.info,\n theme.toneActive.brand,\n theme.toneActive.violet,\n theme.tone.accent,\n theme.toneActive.accent,\n theme.tone.err,\n ];\n}\n\nexport function colorFromTheme(theme: ThemeTokens) {\n return {\n primary: theme.tone.brand,\n accent: theme.tone.accent,\n brand: theme.tone.ok,\n\n user: theme.tone.brand,\n assistant: theme.tone.ok,\n tool: theme.tone.warn,\n toolErr: theme.tone.err,\n info: theme.fg.sub,\n warn: theme.tone.warn,\n err: theme.tone.err,\n ok: theme.tone.ok,\n } as const;\n}\n\nexport function surfaceFromTheme(theme: ThemeTokens) {\n return {\n canvas: theme.surface.bg,\n shell: theme.surface.bgInput,\n card: theme.surface.bgElev,\n elev: theme.surface.bgElev,\n sel: theme.surface.bgInput,\n line: theme.fg.faint,\n lineSoft: theme.fg.meta,\n } as const;\n}\n\nexport function fgFromTheme(theme: ThemeTokens) {\n return {\n strong: theme.fg.strong,\n default: theme.fg.body,\n dim: theme.fg.sub,\n faint: theme.fg.meta,\n ghost: theme.fg.faint,\n } as const;\n}\n\nfunction proxyThemeValue<T extends object>(build: () => T): T {\n const target = build();\n return new Proxy(target, {\n get(_target, prop: string | symbol) {\n return build()[prop as keyof T];\n },\n getOwnPropertyDescriptor(_target, prop: string | symbol) {\n return Reflect.getOwnPropertyDescriptor(build(), prop);\n },\n has(_target, prop: string | symbol) {\n return prop in build();\n },\n ownKeys() {\n return Reflect.ownKeys(build());\n },\n });\n}\n\nfunction currentTheme(): ThemeTokens {\n return {\n fg: TOKEN_FG,\n tone: TONE,\n toneActive: TONE_ACTIVE,\n surface: TOKEN_SURFACE,\n card: CARD,\n };\n}\n\nexport function useGradient(): UiGradient {\n const theme = useThemeTokens();\n return React.useMemo(() => gradientFromTheme(theme), [theme]);\n}\n\nexport function useColor(): UiColor {\n const theme = useThemeTokens();\n return React.useMemo(() => colorFromTheme(theme), [theme]);\n}\n\nexport function useUiSurface(): UiSurface {\n const theme = useThemeTokens();\n return React.useMemo(() => surfaceFromTheme(theme), [theme]);\n}\n\nexport function useUiFg(): UiFg {\n const theme = useThemeTokens();\n return React.useMemo(() => fgFromTheme(theme), [theme]);\n}\n\nexport const GRADIENT = proxyThemeValue(() => gradientFromTheme(currentTheme()));\nexport const COLOR = proxyThemeValue(() => colorFromTheme(currentTheme()));\n\nexport const GLYPH = {\n brand: \"●\",\n user: \"●\",\n assistant: \"●\",\n toolOk: \"✓\",\n toolErr: \"✗\",\n warn: \"⚠\",\n err: \"✗\",\n arrow: \"▸\",\n bullet: \"·\",\n bar: \"│\",\n thinBar: \"│\",\n block: \"█\",\n shade1: \"░\",\n shade2: \"▒\",\n shade3: \"▓\",\n\n done: \"✓\",\n cur: \"▸\",\n pending: \"○\",\n fail: \"✗\",\n running: \"●\",\n\n branch: \"├\",\n branchEnd: \"└\",\n branchStub: \"│\",\n rule: \"─\",\n\n spinFrames: [\"⠋\", \"⠙\", \"⠹\", \"⠸\", \"⠼\", \"⠴\", \"⠦\", \"⠧\"] as readonly string[],\n} as const;\n\nexport const SURFACE = proxyThemeValue(() => surfaceFromTheme(currentTheme()));\nexport const FG = proxyThemeValue(() => fgFromTheme(currentTheme()));\n\nexport function gradientCells(\n width: number,\n glyph: string = GLYPH.block,\n gradient: ReadonlyArray<string> = GRADIENT,\n): Array<{ ch: string; color: string }> {\n const cells: Array<{ ch: string; color: string }> = [];\n if (width <= 0) return cells;\n const last = gradient.length - 1;\n for (let i = 0; i < width; i++) {\n if (last <= 0) {\n cells.push({ ch: glyph, color: gradient[0] ?? COLOR.primary });\n continue;\n }\n const t = width === 1 ? 0 : (i * last) / (width - 1);\n const lo = Math.floor(t);\n const hi = Math.min(last, lo + 1);\n const color = t - lo < 0.5 ? gradient[lo]! : gradient[hi]!;\n cells.push({ ch: glyph, color });\n }\n return cells;\n}\n"],"mappings":"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","names":["React","import_react","React","SURFACE","FG"]}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-HNXDZGC6.js";
|
|
6
6
|
import {
|
|
7
7
|
preflightStdioSpec
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YRLC2EDF.js";
|
|
9
9
|
import {
|
|
10
10
|
ToolRegistry,
|
|
11
11
|
formatSubagentResult,
|
|
@@ -16,17 +16,17 @@ import {
|
|
|
16
16
|
registerTodoTool,
|
|
17
17
|
registerWebTools,
|
|
18
18
|
spawnSubagent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZOQHVQON.js";
|
|
20
20
|
import {
|
|
21
21
|
DeepSeekClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MIIZJD5O.js";
|
|
23
23
|
import {
|
|
24
24
|
bootstrapSemanticSearchInCodeMode
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XPAUNFOL.js";
|
|
26
26
|
import {
|
|
27
27
|
JobRegistry,
|
|
28
28
|
registerShellTools
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JVFEJAJX.js";
|
|
30
30
|
import {
|
|
31
31
|
SkillStore
|
|
32
32
|
} from "./chunk-TEUDEGX2.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
webSearchEndpoint,
|
|
46
46
|
webSearchEngine,
|
|
47
47
|
writeConfig
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-DGA5QYFM.js";
|
|
49
49
|
|
|
50
50
|
// src/tools/scaffold.ts
|
|
51
51
|
var VALID_SKILL_NAME = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/;
|
|
@@ -375,4 +375,4 @@ async function buildCodeToolset(opts) {
|
|
|
375
375
|
export {
|
|
376
376
|
buildCodeToolset
|
|
377
377
|
};
|
|
378
|
-
//# sourceMappingURL=chunk-
|
|
378
|
+
//# sourceMappingURL=chunk-7YW6TPXK.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
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
|
t
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6VANO7KB.js";
|
|
6
6
|
|
|
7
7
|
// src/hooks.ts
|
|
8
8
|
import { spawn } from "child_process";
|
|
@@ -206,4 +206,4 @@ export {
|
|
|
206
206
|
formatHookOutcomeMessage,
|
|
207
207
|
runHooks
|
|
208
208
|
};
|
|
209
|
-
//# sourceMappingURL=chunk-
|
|
209
|
+
//# sourceMappingURL=chunk-C72TNHDE.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",
|
|
@@ -2471,6 +2534,28 @@ function loadBaseUrl(path = defaultConfigPath()) {
|
|
|
2471
2534
|
if (process.env.DEEPSEEK_BASE_URL) return process.env.DEEPSEEK_BASE_URL;
|
|
2472
2535
|
return readConfig(path).baseUrl;
|
|
2473
2536
|
}
|
|
2537
|
+
function isNonNegativeNumber(value) {
|
|
2538
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
2539
|
+
}
|
|
2540
|
+
function loadPricingOverride(path = defaultConfigPath()) {
|
|
2541
|
+
const raw = readConfig(path).pricingOverride;
|
|
2542
|
+
if (!isPlainObject(raw)) return {};
|
|
2543
|
+
const result = {};
|
|
2544
|
+
for (const [model, value] of Object.entries(raw)) {
|
|
2545
|
+
if (!isPlainObject(value)) continue;
|
|
2546
|
+
const pricing = {};
|
|
2547
|
+
if (isNonNegativeNumber(value.inputCacheHit)) pricing.inputCacheHit = value.inputCacheHit;
|
|
2548
|
+
if (isNonNegativeNumber(value.inputCacheMiss)) pricing.inputCacheMiss = value.inputCacheMiss;
|
|
2549
|
+
if (isNonNegativeNumber(value.output)) pricing.output = value.output;
|
|
2550
|
+
if (Object.keys(pricing).length > 0) result[model] = pricing;
|
|
2551
|
+
}
|
|
2552
|
+
return result;
|
|
2553
|
+
}
|
|
2554
|
+
function loadRateLimit(path = defaultConfigPath()) {
|
|
2555
|
+
const rpm = readConfig(path).rateLimit?.rpm;
|
|
2556
|
+
if (typeof rpm !== "number" || !Number.isInteger(rpm) || rpm <= 0) return void 0;
|
|
2557
|
+
return { rpm };
|
|
2558
|
+
}
|
|
2474
2559
|
function saveBaseUrl(url, path = defaultConfigPath()) {
|
|
2475
2560
|
const cfg = readConfig(path);
|
|
2476
2561
|
const trimmed = url.trim();
|
|
@@ -2883,26 +2968,39 @@ function isPlainObject(value) {
|
|
|
2883
2968
|
}
|
|
2884
2969
|
function loadQQConfig(path = defaultConfigPath()) {
|
|
2885
2970
|
const envSandbox = process.env.QQ_SANDBOX;
|
|
2971
|
+
const envAllowlist = normalizeQQAllowlist(process.env.QQ_ALLOWLIST);
|
|
2886
2972
|
const fromEnv = {
|
|
2887
2973
|
appId: process.env.QQ_APPID,
|
|
2888
2974
|
appSecret: process.env.QQ_SECRET,
|
|
2889
|
-
sandbox: envSandbox === "1" ? true : envSandbox === "0" ? false : void 0
|
|
2975
|
+
sandbox: envSandbox === "1" ? true : envSandbox === "0" ? false : void 0,
|
|
2976
|
+
ownerOpenId: normalizeQQOpenId(process.env.QQ_OWNER_OPENID),
|
|
2977
|
+
allowlist: envAllowlist
|
|
2890
2978
|
};
|
|
2891
2979
|
const fromCfg = readConfig(path).qq ?? {};
|
|
2980
|
+
const ownerOpenId = fromEnv.ownerOpenId ?? normalizeQQOpenId(fromCfg.ownerOpenId);
|
|
2981
|
+
const allowlist = normalizeQQAllowlist(fromEnv.allowlist ?? fromCfg.allowlist)?.filter(
|
|
2982
|
+
(openid) => openid !== ownerOpenId
|
|
2983
|
+
);
|
|
2892
2984
|
return {
|
|
2893
2985
|
appId: fromEnv.appId ?? fromCfg.appId,
|
|
2894
2986
|
appSecret: fromEnv.appSecret ?? fromCfg.appSecret,
|
|
2895
2987
|
sandbox: fromEnv.sandbox ?? fromCfg.sandbox ?? false,
|
|
2896
|
-
enabled: fromCfg.enabled === true
|
|
2988
|
+
enabled: fromCfg.enabled === true,
|
|
2989
|
+
ownerOpenId,
|
|
2990
|
+
allowlist
|
|
2897
2991
|
};
|
|
2898
2992
|
}
|
|
2899
2993
|
function saveQQConfig(cfg, path = defaultConfigPath()) {
|
|
2900
2994
|
const rootCfg = readConfig(path);
|
|
2995
|
+
const ownerOpenId = normalizeQQOpenId(cfg.ownerOpenId);
|
|
2996
|
+
const allowlist = normalizeQQAllowlist(cfg.allowlist)?.filter((openid) => openid !== ownerOpenId);
|
|
2901
2997
|
rootCfg.qq = {
|
|
2902
2998
|
appId: cfg.appId,
|
|
2903
2999
|
appSecret: cfg.appSecret,
|
|
2904
3000
|
sandbox: cfg.sandbox,
|
|
2905
|
-
enabled: cfg.enabled
|
|
3001
|
+
enabled: cfg.enabled,
|
|
3002
|
+
ownerOpenId,
|
|
3003
|
+
allowlist
|
|
2906
3004
|
};
|
|
2907
3005
|
writeConfig(rootCfg, path);
|
|
2908
3006
|
}
|
|
@@ -2932,6 +3030,9 @@ export {
|
|
|
2932
3030
|
overlayMatchedSpec,
|
|
2933
3031
|
specToRaw,
|
|
2934
3032
|
parseMcpSpec,
|
|
3033
|
+
redactQQOpenId,
|
|
3034
|
+
decideQQAccess,
|
|
3035
|
+
describeQQAccess,
|
|
2935
3036
|
loadMemoryTypeRegistry,
|
|
2936
3037
|
memoryTypeDefaults,
|
|
2937
3038
|
loadMetasoApiKey,
|
|
@@ -2943,6 +3044,8 @@ export {
|
|
|
2943
3044
|
saveLanguage,
|
|
2944
3045
|
loadApiKey,
|
|
2945
3046
|
loadBaseUrl,
|
|
3047
|
+
loadPricingOverride,
|
|
3048
|
+
loadRateLimit,
|
|
2946
3049
|
saveBaseUrl,
|
|
2947
3050
|
normalizeSkillPathEntries,
|
|
2948
3051
|
normalizeSkillPaths,
|
|
@@ -2993,4 +3096,4 @@ export {
|
|
|
2993
3096
|
loadQQConfig,
|
|
2994
3097
|
saveQQConfig
|
|
2995
3098
|
};
|
|
2996
|
-
//# sourceMappingURL=chunk-
|
|
3099
|
+
//# sourceMappingURL=chunk-DGA5QYFM.js.map
|