reasonix 0.51.0 → 0.52.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/dashboard/dist/app.css +1 -1
- package/dashboard/dist/app.js +3 -3
- package/dashboard/dist/app.js.map +1 -1
- package/dist/cli/{acp-XEUHGG7X.js → acp-NEUYWGUU.js} +26 -26
- package/dist/cli/chat-QA6IVFJD.js +49 -0
- package/dist/cli/{chunk-HGK57NBN.js → chunk-2W4F3RIZ.js} +2 -2
- package/dist/cli/{chunk-UO6E7FN3.js → chunk-3OXD5CBM.js} +32756 -31192
- package/dist/cli/chunk-3OXD5CBM.js.map +1 -0
- package/dist/cli/{chunk-UMZ6KHTS.js → chunk-5YLEKX2V.js} +2 -2
- package/dist/cli/{chunk-BA5R6BAE.js → chunk-6QBUXA73.js} +2 -2
- package/dist/cli/chunk-77JIQ7SL.js +40 -0
- package/dist/cli/chunk-77JIQ7SL.js.map +1 -0
- package/dist/cli/{chunk-6XWXIVQ3.js → chunk-AMSK3ZLB.js} +2 -2
- package/dist/cli/chunk-AMSK3ZLB.js.map +1 -0
- package/dist/cli/{chunk-A5PBEIJ7.js → chunk-AOYUW3HR.js} +37 -4
- package/dist/cli/chunk-AOYUW3HR.js.map +1 -0
- package/dist/cli/{chunk-3YRTIWFX.js → chunk-ARBGTNHM.js} +2 -2
- package/dist/cli/{chunk-3BTK5BHI.js → chunk-B4MOGWHW.js} +2 -2
- package/dist/cli/{chunk-5AIDYVH2.js → chunk-CFJY64UA.js} +2 -2
- package/dist/cli/{chunk-SBHF5NWD.js → chunk-CGVW5W7N.js} +14 -14
- package/dist/cli/{chunk-SBHF5NWD.js.map → chunk-CGVW5W7N.js.map} +1 -1
- package/dist/cli/{chunk-DVD67FXQ.js → chunk-CLHMV6OL.js} +568 -66
- package/dist/cli/chunk-CLHMV6OL.js.map +1 -0
- package/dist/cli/{chunk-2WUEAI2I.js → chunk-CPCUMMSR.js} +3 -3
- package/dist/cli/{chunk-JHWQDJZA.js → chunk-CTRM32BP.js} +2 -2
- package/dist/cli/{chunk-544J4PXD.js → chunk-D6WRFR6V.js} +5 -5
- package/dist/cli/{chunk-N4SEBLU4.js → chunk-DLTE4GBY.js} +3 -3
- package/dist/cli/{chunk-NRROJXXT.js → chunk-FY5UERSG.js} +9 -9
- package/dist/cli/{chunk-C2MRSJTV.js → chunk-GFJJEW3Z.js} +18 -10
- package/dist/cli/chunk-GFJJEW3Z.js.map +1 -0
- package/dist/cli/{chunk-R6KIHEF3.js → chunk-GNRKXRRE.js} +743 -660
- package/dist/cli/chunk-GNRKXRRE.js.map +1 -0
- package/dist/cli/{chunk-SXSAWOB7.js → chunk-HI6THNAZ.js} +19 -17
- package/dist/cli/chunk-HI6THNAZ.js.map +1 -0
- package/dist/cli/{chunk-K4YQFULP.js → chunk-HNZ4727T.js} +15 -15
- package/dist/cli/chunk-I3NE5S63.js +54 -0
- package/dist/cli/{chunk-EAMXOWUW.js.map → chunk-I3NE5S63.js.map} +1 -1
- package/dist/cli/{chunk-FEZK652I.js → chunk-MVLPXZAA.js} +834 -10
- package/dist/cli/chunk-MVLPXZAA.js.map +1 -0
- package/dist/cli/{chunk-36BM7INR.js → chunk-MW64SQUE.js} +2 -2
- package/dist/cli/{chunk-Z3MKG7MQ.js → chunk-OMNRXZNA.js} +2 -2
- package/dist/cli/{chunk-7YPMTE3U.js → chunk-RCC73DWQ.js} +5 -9
- package/dist/cli/chunk-RCC73DWQ.js.map +1 -0
- package/dist/cli/{chunk-2HVTBFCI.js → chunk-RHQOGG43.js} +5 -3
- package/dist/cli/chunk-RHQOGG43.js.map +1 -0
- package/dist/cli/{chunk-EWVFGYT6.js → chunk-VVPV5HU6.js} +2 -2
- package/dist/cli/{chunk-7YB26OQO.js → chunk-WPY7AFS6.js} +2 -2
- package/dist/cli/{chunk-BM6BBFAV.js → chunk-XBYHNZ5Z.js} +2 -2
- package/dist/cli/{chunk-WPOKBW5E.js → chunk-XNMXVL6C.js} +2 -2
- package/dist/cli/{chunk-SVD4UPRQ.js → chunk-XUZHBQSM.js} +2 -2
- package/dist/cli/{chunk-Q46B3Z7H.js → chunk-YMYX6QTC.js} +8 -5
- package/dist/cli/{chunk-Q46B3Z7H.js.map → chunk-YMYX6QTC.js.map} +1 -1
- package/dist/cli/{chunk-K3QJ3GKI.js → chunk-Z663GVUB.js} +3 -3
- package/dist/cli/{code-BMXLBC7D.js → code-WN6D4VZO.js} +35 -36
- package/dist/cli/{code-BMXLBC7D.js.map → code-WN6D4VZO.js.map} +1 -1
- package/dist/cli/{commands-E4RZXMF6.js → commands-DHETOY7O.js} +4 -4
- package/dist/cli/{commit-KSRQ64IL.js → commit-BBUYAKZV.js} +3 -3
- package/dist/cli/{config-QNDONOTU.js → config-KV7VV5LG.js} +4 -2
- package/dist/cli/{desktop-H3ZHIMDA.js → desktop-LJVXWXNF.js} +557 -70
- package/dist/cli/desktop-LJVXWXNF.js.map +1 -0
- package/dist/cli/diff-2JHMQAHI.js +165 -0
- package/dist/cli/{diff-I4PYI43W.js.map → diff-2JHMQAHI.js.map} +1 -1
- package/dist/cli/{doctor-Y2E4MY2F.js → doctor-GI5LOEZL.js} +11 -11
- package/dist/cli/{events-47HOT7ZA.js → events-LBKMLFM4.js} +5 -5
- package/dist/cli/index.js +40 -39
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-76DK63ZB.js → mcp-DKEJK5ND.js} +3 -3
- package/dist/cli/{mcp-browse-SDNUGO74.js → mcp-browse-V7KWDY32.js} +15 -15
- package/dist/cli/{mcp-browse-SDNUGO74.js.map → mcp-browse-V7KWDY32.js.map} +1 -1
- package/dist/cli/{mcp-inspect-BL5DEO5M.js → mcp-inspect-MTABNHVM.js} +5 -5
- package/dist/cli/{prompt-JLATI3P7.js → prompt-ATI7DKHF.js} +5 -5
- package/dist/cli/{prune-sessions-WHZDFUKD.js → prune-sessions-YQQSZTZS.js} +4 -4
- package/dist/cli/{replay-MHXS7C7Z.js → replay-ZJQ4I4CJ.js} +30 -30
- package/dist/cli/{replay-MHXS7C7Z.js.map → replay-ZJQ4I4CJ.js.map} +1 -1
- package/dist/cli/{run-SXNCPRJE.js → run-HFPRNWJY.js} +22 -22
- package/dist/cli/{server-GEHOE6CO.js → server-UHKO2VVM.js} +23 -23
- package/dist/cli/{sessions-EPBFYISL.js → sessions-IQEWWUH3.js} +16 -16
- package/dist/cli/setup-5BYKCL62.js +502 -0
- package/dist/cli/setup-5BYKCL62.js.map +1 -0
- package/dist/cli/{stats-4WB4XHBP.js → stats-OFCGOQMZ.js} +6 -6
- package/dist/cli/{version-4SP3DLLH.js → version-EODUFAAI.js} +16 -16
- package/dist/index.d.ts +12 -1
- package/dist/index.js +613 -78
- package/dist/index.js.map +1 -1
- package/package.json +21 -3
- package/dist/cli/chat-NJ2Q5KHG.js +0 -50
- package/dist/cli/chunk-2HVTBFCI.js.map +0 -1
- package/dist/cli/chunk-5BBC6YMV.js +0 -832
- package/dist/cli/chunk-5BBC6YMV.js.map +0 -1
- package/dist/cli/chunk-6XWXIVQ3.js.map +0 -1
- package/dist/cli/chunk-7YPMTE3U.js.map +0 -1
- package/dist/cli/chunk-A5PBEIJ7.js.map +0 -1
- package/dist/cli/chunk-C2MRSJTV.js.map +0 -1
- package/dist/cli/chunk-DVD67FXQ.js.map +0 -1
- package/dist/cli/chunk-EAMXOWUW.js +0 -54
- package/dist/cli/chunk-FEZK652I.js.map +0 -1
- package/dist/cli/chunk-R6KIHEF3.js.map +0 -1
- package/dist/cli/chunk-SXSAWOB7.js.map +0 -1
- package/dist/cli/chunk-UO6E7FN3.js.map +0 -1
- package/dist/cli/chunk-UPW544V3.js +0 -96
- package/dist/cli/chunk-UPW544V3.js.map +0 -1
- package/dist/cli/desktop-H3ZHIMDA.js.map +0 -1
- package/dist/cli/devtools-HW3WDT3Q.js +0 -91
- package/dist/cli/devtools-HW3WDT3Q.js.map +0 -1
- package/dist/cli/diff-I4PYI43W.js +0 -165
- package/dist/cli/setup-IW2XR5XI.js +0 -593
- package/dist/cli/setup-IW2XR5XI.js.map +0 -1
- /package/dist/cli/{acp-XEUHGG7X.js.map → acp-NEUYWGUU.js.map} +0 -0
- /package/dist/cli/{chat-NJ2Q5KHG.js.map → chat-QA6IVFJD.js.map} +0 -0
- /package/dist/cli/{chunk-HGK57NBN.js.map → chunk-2W4F3RIZ.js.map} +0 -0
- /package/dist/cli/{chunk-UMZ6KHTS.js.map → chunk-5YLEKX2V.js.map} +0 -0
- /package/dist/cli/{chunk-BA5R6BAE.js.map → chunk-6QBUXA73.js.map} +0 -0
- /package/dist/cli/{chunk-3YRTIWFX.js.map → chunk-ARBGTNHM.js.map} +0 -0
- /package/dist/cli/{chunk-3BTK5BHI.js.map → chunk-B4MOGWHW.js.map} +0 -0
- /package/dist/cli/{chunk-5AIDYVH2.js.map → chunk-CFJY64UA.js.map} +0 -0
- /package/dist/cli/{chunk-2WUEAI2I.js.map → chunk-CPCUMMSR.js.map} +0 -0
- /package/dist/cli/{chunk-JHWQDJZA.js.map → chunk-CTRM32BP.js.map} +0 -0
- /package/dist/cli/{chunk-544J4PXD.js.map → chunk-D6WRFR6V.js.map} +0 -0
- /package/dist/cli/{chunk-N4SEBLU4.js.map → chunk-DLTE4GBY.js.map} +0 -0
- /package/dist/cli/{chunk-NRROJXXT.js.map → chunk-FY5UERSG.js.map} +0 -0
- /package/dist/cli/{chunk-K4YQFULP.js.map → chunk-HNZ4727T.js.map} +0 -0
- /package/dist/cli/{chunk-36BM7INR.js.map → chunk-MW64SQUE.js.map} +0 -0
- /package/dist/cli/{chunk-Z3MKG7MQ.js.map → chunk-OMNRXZNA.js.map} +0 -0
- /package/dist/cli/{chunk-EWVFGYT6.js.map → chunk-VVPV5HU6.js.map} +0 -0
- /package/dist/cli/{chunk-7YB26OQO.js.map → chunk-WPY7AFS6.js.map} +0 -0
- /package/dist/cli/{chunk-BM6BBFAV.js.map → chunk-XBYHNZ5Z.js.map} +0 -0
- /package/dist/cli/{chunk-WPOKBW5E.js.map → chunk-XNMXVL6C.js.map} +0 -0
- /package/dist/cli/{chunk-SVD4UPRQ.js.map → chunk-XUZHBQSM.js.map} +0 -0
- /package/dist/cli/{chunk-K3QJ3GKI.js.map → chunk-Z663GVUB.js.map} +0 -0
- /package/dist/cli/{commands-E4RZXMF6.js.map → commands-DHETOY7O.js.map} +0 -0
- /package/dist/cli/{commit-KSRQ64IL.js.map → commit-BBUYAKZV.js.map} +0 -0
- /package/dist/cli/{config-QNDONOTU.js.map → config-KV7VV5LG.js.map} +0 -0
- /package/dist/cli/{doctor-Y2E4MY2F.js.map → doctor-GI5LOEZL.js.map} +0 -0
- /package/dist/cli/{events-47HOT7ZA.js.map → events-LBKMLFM4.js.map} +0 -0
- /package/dist/cli/{mcp-76DK63ZB.js.map → mcp-DKEJK5ND.js.map} +0 -0
- /package/dist/cli/{mcp-inspect-BL5DEO5M.js.map → mcp-inspect-MTABNHVM.js.map} +0 -0
- /package/dist/cli/{prompt-JLATI3P7.js.map → prompt-ATI7DKHF.js.map} +0 -0
- /package/dist/cli/{prune-sessions-WHZDFUKD.js.map → prune-sessions-YQQSZTZS.js.map} +0 -0
- /package/dist/cli/{run-SXNCPRJE.js.map → run-HFPRNWJY.js.map} +0 -0
- /package/dist/cli/{server-GEHOE6CO.js.map → server-UHKO2VVM.js.map} +0 -0
- /package/dist/cli/{sessions-EPBFYISL.js.map → sessions-IQEWWUH3.js.map} +0 -0
- /package/dist/cli/{stats-4WB4XHBP.js.map → stats-OFCGOQMZ.js.map} +0 -0
- /package/dist/cli/{version-4SP3DLLH.js.map → version-EODUFAAI.js.map} +0 -0
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
defaultUsageLogPath,
|
|
8
8
|
formatLogSize,
|
|
9
9
|
readUsageLog
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ARBGTNHM.js";
|
|
11
11
|
import {
|
|
12
12
|
t
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CLHMV6OL.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/commands/stats.ts
|
|
16
16
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -150,4 +150,4 @@ export {
|
|
|
150
150
|
statsCommand,
|
|
151
151
|
renderDashboard
|
|
152
152
|
};
|
|
153
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-Z663GVUB.js.map
|
|
@@ -2,61 +2,60 @@
|
|
|
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
|
chatCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GNRKXRRE.js";
|
|
6
|
+
import "./chunk-77JIQ7SL.js";
|
|
7
7
|
import "./chunk-JMBMLOBP.js";
|
|
8
|
-
import "./chunk-K3QJ3GKI.js";
|
|
9
8
|
import "./chunk-SZ5XES2N.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-B4MOGWHW.js";
|
|
10
|
+
import "./chunk-XNMXVL6C.js";
|
|
12
11
|
import "./chunk-XJXDHAES.js";
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-MVLPXZAA.js";
|
|
14
13
|
import {
|
|
15
14
|
buildCodeToolset
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-FY5UERSG.js";
|
|
16
|
+
import "./chunk-OMNRXZNA.js";
|
|
17
|
+
import "./chunk-XBYHNZ5Z.js";
|
|
18
|
+
import "./chunk-CFJY64UA.js";
|
|
19
|
+
import "./chunk-XUZHBQSM.js";
|
|
21
20
|
import {
|
|
22
21
|
markPhase
|
|
23
22
|
} from "./chunk-ZZM6QJ4W.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-BA5R6BAE.js";
|
|
31
|
-
import "./chunk-HGK57NBN.js";
|
|
23
|
+
import "./chunk-HNZ4727T.js";
|
|
24
|
+
import "./chunk-MW64SQUE.js";
|
|
25
|
+
import "./chunk-D6WRFR6V.js";
|
|
26
|
+
import "./chunk-RCC73DWQ.js";
|
|
27
|
+
import "./chunk-5YLEKX2V.js";
|
|
28
|
+
import "./chunk-2W4F3RIZ.js";
|
|
32
29
|
import {
|
|
33
30
|
detectForeignAgentPlatform
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-UO6E7FN3.js";
|
|
31
|
+
} from "./chunk-DLTE4GBY.js";
|
|
32
|
+
import "./chunk-CGVW5W7N.js";
|
|
33
|
+
import "./chunk-RHQOGG43.js";
|
|
34
|
+
import "./chunk-3OXD5CBM.js";
|
|
39
35
|
import "./chunk-PLHAZOLZ.js";
|
|
40
36
|
import "./chunk-L3VPEESB.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-HI6THNAZ.js";
|
|
38
|
+
import "./chunk-VVPV5HU6.js";
|
|
39
|
+
import "./chunk-WPY7AFS6.js";
|
|
40
|
+
import "./chunk-YMYX6QTC.js";
|
|
45
41
|
import "./chunk-BOWSNGQC.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-25T6CVUP.js";
|
|
48
|
-
import "./chunk-2WUEAI2I.js";
|
|
42
|
+
import "./chunk-CPCUMMSR.js";
|
|
49
43
|
import "./chunk-6UNHNVJR.js";
|
|
50
44
|
import {
|
|
51
45
|
sanitizeName
|
|
52
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-AMSK3ZLB.js";
|
|
53
47
|
import "./chunk-XXC2BYTV.js";
|
|
48
|
+
import "./chunk-GFJJEW3Z.js";
|
|
49
|
+
import "./chunk-25T6CVUP.js";
|
|
54
50
|
import {
|
|
55
51
|
loadDotenv
|
|
56
52
|
} from "./chunk-2UQP6H6T.js";
|
|
53
|
+
import "./chunk-Z663GVUB.js";
|
|
54
|
+
import "./chunk-ARBGTNHM.js";
|
|
55
|
+
import "./chunk-6QBUXA73.js";
|
|
57
56
|
import {
|
|
58
57
|
t
|
|
59
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-CLHMV6OL.js";
|
|
60
59
|
import {
|
|
61
60
|
DEFAULT_MODEL,
|
|
62
61
|
bridgeEndpointEnv,
|
|
@@ -64,7 +63,7 @@ import {
|
|
|
64
63
|
normalizeMcpConfig,
|
|
65
64
|
readConfig,
|
|
66
65
|
specToRaw
|
|
67
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-AOYUW3HR.js";
|
|
68
67
|
import "./chunk-TUK7OWJA.js";
|
|
69
68
|
|
|
70
69
|
// src/cli/commands/code.tsx
|
|
@@ -75,7 +74,7 @@ async function codeCommand(opts = {}) {
|
|
|
75
74
|
const resolvedModel = opts.model?.trim() || loadModel() || DEFAULT_MODEL;
|
|
76
75
|
loadDotenv();
|
|
77
76
|
bridgeEndpointEnv();
|
|
78
|
-
const { codeSystemPrompt } = await import("./prompt-
|
|
77
|
+
const { codeSystemPrompt } = await import("./prompt-ATI7DKHF.js");
|
|
79
78
|
const rootDir = resolve(opts.dir ?? process.cwd());
|
|
80
79
|
const session = opts.noSession ? void 0 : `code-${sanitizeName(basename(rootDir))}`;
|
|
81
80
|
markPhase("semantic_bootstrap_start");
|
|
@@ -159,4 +158,4 @@ async function codeCommand(opts = {}) {
|
|
|
159
158
|
export {
|
|
160
159
|
codeCommand
|
|
161
160
|
};
|
|
162
|
-
//# sourceMappingURL=code-
|
|
161
|
+
//# sourceMappingURL=code-WN6D4VZO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/code.tsx"],"sourcesContent":["/** `reasonix code [dir]` — native filesystem tools + code system prompt, wraps `chat`. */\n\nimport { readFileSync } from \"node:fs\";\nimport { basename, resolve } from \"node:path\";\nimport { buildCodeToolset } from \"../../code/setup.js\";\nimport {\n DEFAULT_MODEL,\n bridgeEndpointEnv,\n loadModel,\n normalizeMcpConfig,\n readConfig,\n} from \"../../config.js\";\nimport { loadDotenv } from \"../../env.js\";\nimport { t } from \"../../i18n/index.js\";\nimport { specToRaw } from \"../../mcp/spec.js\";\nimport { detectForeignAgentPlatform } from \"../../memory/project.js\";\nimport { sanitizeName } from \"../../memory/session.js\";\nimport { markPhase } from \"../startup-profile.js\";\nimport { chatCommand } from \"./chat.js\";\n\nexport interface CodeOptions {\n /** Directory to root the filesystem tools at. Defaults to process.cwd(). */\n dir?: string;\n /** Override the default `smart` model. */\n model?: string;\n /** Disable session persistence. */\n noSession?: boolean;\n /** Transcript file for replay/diff. */\n transcript?: string;\n /** Skip the session picker — always resume prior messages. */\n forceResume?: boolean;\n /** Skip the session picker — always wipe prior messages and start fresh. */\n forceNew?: boolean;\n /**\n * Soft USD spend cap. Off by default. Same semantics as `chat`:\n * warns at 80%, refuses next turn at 100%. Mid-session adjustable\n * via `/budget <usd>` slash command.\n */\n budgetUsd?: number;\n /** Suppress the auto-launched embedded web dashboard. */\n noDashboard?: boolean;\n /** When true and the dashboard is enabled, open its URL in the system default browser as soon as the server is ready. */\n openDashboard?: boolean;\n /** Pin the dashboard to a fixed port. `undefined` keeps ephemeral assignment. */\n dashboardPort?: number;\n /** Dashboard bind address (#968). `undefined` keeps the default 127.0.0.1. */\n dashboardHost?: string;\n /** Stable dashboard URL token (#968). `undefined` mints a fresh per-boot token. */\n dashboardToken?: string;\n /** Inline string appended to the code system prompt after the generated base prompt. */\n systemAppend?: string;\n /** Path to a UTF-8 text file whose contents are appended to the code system prompt. */\n systemAppendFile?: string;\n /** Disable SGR mouse tracking so the terminal keeps native selection and right-click behavior. */\n noMouse?: boolean;\n}\n\nexport async function codeCommand(opts: CodeOptions = {}): Promise<void> {\n markPhase(\"code_command_enter\");\n const resolvedModel = opts.model?.trim() || loadModel() || DEFAULT_MODEL;\n // Bridge .env + ~/.reasonix/config.json into process.env so buildCodeToolset's\n // eager DeepSeekClient constructions (subagent client; semantic embedder) can\n // pick up a key the user already configured via `reasonix setup`. chatCommand\n // does the same dance — code.tsx wraps chatCommand but must also seed env\n // before buildCodeToolset runs, which is BEFORE chatCommand.\n loadDotenv();\n bridgeEndpointEnv();\n const { codeSystemPrompt } = await import(\"../../code/prompt.js\");\n const rootDir = resolve(opts.dir ?? process.cwd());\n // Per-directory session so switching projects doesn't mix histories.\n // `code-<sanitized-basename>` fits the session name rules without\n // truncating most project names.\n const session = opts.noSession ? undefined : `code-${sanitizeName(basename(rootDir))}`;\n\n markPhase(\"semantic_bootstrap_start\");\n const { tools, jobs, registerRooted, reBootstrapSemantic, semantic } = await buildCodeToolset({\n rootDir,\n });\n markPhase(\n semantic.enabled ? \"semantic_bootstrap_done_enabled\" : \"semantic_bootstrap_done_skipped\",\n );\n\n process.stderr.write(\n `${t(\"startup.codeRooted\", {\n rootDir,\n session: session ?? t(\"startup.ephemeral\"),\n tools: tools.size,\n semantic: semantic.enabled ? t(\"startup.semanticOn\") : \"\",\n })}\\n`,\n );\n\n const foreign = detectForeignAgentPlatform(rootDir);\n if (foreign) {\n process.stderr.write(t(\"code.workspaceConflict\", { platforms: foreign.join(\", \") }));\n }\n\n // Belt-and-suspenders cleanup: even though spawn(detached:false)\n // should tie child processes to the parent's lifetime, Windows cmd.exe\n // wrappers occasionally leak. We DON'T install SIGINT/SIGTERM\n // handlers here — that overrode Node's default \"exit on Ctrl+C\" with\n // a silent no-op, which made Ctrl+C feel broken in the TUI. App.tsx\n // owns the SIGINT path now (it shows the quit-armed banner and calls\n // exit() on confirmation); this 'exit' hook just guarantees the job\n // registry is drained on the way out, regardless of which exit path\n // fired.\n process.once(\"exit\", () => {\n void jobs.shutdown();\n });\n\n let systemAppendFileContents: string | undefined;\n if (opts.systemAppend !== undefined && opts.systemAppend.trim().length === 0) {\n process.stderr.write(t(\"code.systemAppendEmpty\"));\n }\n if (opts.systemAppendFile) {\n const filePath = resolve(opts.systemAppendFile);\n try {\n systemAppendFileContents = readFileSync(filePath, \"utf8\");\n } catch (err) {\n const e = err as NodeJS.ErrnoException;\n const errorDetails = e.code ? `[${e.code}] ${e.message}` : e.message;\n process.stderr.write(t(\"code.systemAppendFileReadError\", { filePath, errorDetails }));\n process.exit(1);\n }\n }\n\n // The rebuilder is re-invoked on `/new` and `/cwd`. `currentRoot` is the live\n // pointer; `/cwd` updates it via `onRootChange` so the rebuild picks up the\n // new workspace's REASONIX.md / memory without restarting the loop.\n let currentRoot = rootDir;\n let semanticEnabled = semantic.enabled;\n const codeRebuildSystem = () =>\n codeSystemPrompt(currentRoot, {\n hasSemanticSearch: semanticEnabled,\n systemAppend: opts.systemAppend,\n systemAppendFile: systemAppendFileContents,\n modelId: resolvedModel,\n });\n await chatCommand({\n model: resolvedModel,\n budgetUsd: opts.budgetUsd,\n system: codeRebuildSystem(),\n rebuildSystem: codeRebuildSystem,\n transcript: opts.transcript,\n session,\n seedTools: tools,\n codeMode: {\n rootDir,\n jobs,\n reregisterTools: registerRooted,\n reBootstrapSemantic: async (root: string) => {\n const r = await reBootstrapSemantic(root);\n semanticEnabled = r.enabled;\n return r;\n },\n onRootChange: (newRoot: string) => {\n currentRoot = newRoot;\n },\n },\n mcp: normalizeMcpConfig(readConfig()).map(specToRaw),\n forceResume: opts.forceResume,\n forceNew: opts.forceNew,\n noDashboard: opts.noDashboard,\n openDashboard: opts.openDashboard,\n dashboardPort: opts.dashboardPort,\n dashboardHost: opts.dashboardHost,\n dashboardToken: opts.dashboardToken,\n noMouse: opts.noMouse,\n });\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/code.tsx"],"sourcesContent":["/** `reasonix code [dir]` — native filesystem tools + code system prompt, wraps `chat`. */\n\nimport { readFileSync } from \"node:fs\";\nimport { basename, resolve } from \"node:path\";\nimport { buildCodeToolset } from \"../../code/setup.js\";\nimport {\n DEFAULT_MODEL,\n bridgeEndpointEnv,\n loadModel,\n normalizeMcpConfig,\n readConfig,\n} from \"../../config.js\";\nimport { loadDotenv } from \"../../env.js\";\nimport { t } from \"../../i18n/index.js\";\nimport { specToRaw } from \"../../mcp/spec.js\";\nimport { detectForeignAgentPlatform } from \"../../memory/project.js\";\nimport { sanitizeName } from \"../../memory/session.js\";\nimport { markPhase } from \"../startup-profile.js\";\nimport { chatCommand } from \"./chat.js\";\n\nexport interface CodeOptions {\n /** Directory to root the filesystem tools at. Defaults to process.cwd(). */\n dir?: string;\n /** Override the default `smart` model. */\n model?: string;\n /** Disable session persistence. */\n noSession?: boolean;\n /** Transcript file for replay/diff. */\n transcript?: string;\n /** Skip the session picker — always resume prior messages. */\n forceResume?: boolean;\n /** Skip the session picker — always wipe prior messages and start fresh. */\n forceNew?: boolean;\n /**\n * Soft USD spend cap. Off by default. Same semantics as `chat`:\n * warns at 80%, refuses next turn at 100%. Mid-session adjustable\n * via `/budget <usd>` slash command.\n */\n budgetUsd?: number;\n /** Suppress the auto-launched embedded web dashboard. */\n noDashboard?: boolean;\n /** When true and the dashboard is enabled, open its URL in the system default browser as soon as the server is ready. */\n openDashboard?: boolean;\n /** Pin the dashboard to a fixed port. `undefined` keeps ephemeral assignment. */\n dashboardPort?: number;\n /** Dashboard bind address (#968). `undefined` keeps the default 127.0.0.1. */\n dashboardHost?: string;\n /** Stable dashboard URL token (#968). `undefined` mints a fresh per-boot token. */\n dashboardToken?: string;\n /** Inline string appended to the code system prompt after the generated base prompt. */\n systemAppend?: string;\n /** Path to a UTF-8 text file whose contents are appended to the code system prompt. */\n systemAppendFile?: string;\n /** Disable SGR mouse tracking so the terminal keeps native selection and right-click behavior. */\n noMouse?: boolean;\n}\n\nexport async function codeCommand(opts: CodeOptions = {}): Promise<void> {\n markPhase(\"code_command_enter\");\n const resolvedModel = opts.model?.trim() || loadModel() || DEFAULT_MODEL;\n // Bridge .env + ~/.reasonix/config.json into process.env so buildCodeToolset's\n // eager DeepSeekClient constructions (subagent client; semantic embedder) can\n // pick up a key the user already configured via `reasonix setup`. chatCommand\n // does the same dance — code.tsx wraps chatCommand but must also seed env\n // before buildCodeToolset runs, which is BEFORE chatCommand.\n loadDotenv();\n bridgeEndpointEnv();\n const { codeSystemPrompt } = await import(\"../../code/prompt.js\");\n const rootDir = resolve(opts.dir ?? process.cwd());\n // Per-directory session so switching projects doesn't mix histories.\n // `code-<sanitized-basename>` fits the session name rules without\n // truncating most project names.\n const session = opts.noSession ? undefined : `code-${sanitizeName(basename(rootDir))}`;\n\n markPhase(\"semantic_bootstrap_start\");\n const { tools, jobs, registerRooted, reBootstrapSemantic, semantic } = await buildCodeToolset({\n rootDir,\n });\n markPhase(\n semantic.enabled ? \"semantic_bootstrap_done_enabled\" : \"semantic_bootstrap_done_skipped\",\n );\n\n process.stderr.write(\n `${t(\"startup.codeRooted\", {\n rootDir,\n session: session ?? t(\"startup.ephemeral\"),\n tools: tools.size,\n semantic: semantic.enabled ? t(\"startup.semanticOn\") : \"\",\n })}\\n`,\n );\n\n const foreign = detectForeignAgentPlatform(rootDir);\n if (foreign) {\n process.stderr.write(t(\"code.workspaceConflict\", { platforms: foreign.join(\", \") }));\n }\n\n // Belt-and-suspenders cleanup: even though spawn(detached:false)\n // should tie child processes to the parent's lifetime, Windows cmd.exe\n // wrappers occasionally leak. We DON'T install SIGINT/SIGTERM\n // handlers here — that overrode Node's default \"exit on Ctrl+C\" with\n // a silent no-op, which made Ctrl+C feel broken in the TUI. App.tsx\n // owns the SIGINT path now (it shows the quit-armed banner and calls\n // exit() on confirmation); this 'exit' hook just guarantees the job\n // registry is drained on the way out, regardless of which exit path\n // fired.\n process.once(\"exit\", () => {\n void jobs.shutdown();\n });\n\n let systemAppendFileContents: string | undefined;\n if (opts.systemAppend !== undefined && opts.systemAppend.trim().length === 0) {\n process.stderr.write(t(\"code.systemAppendEmpty\"));\n }\n if (opts.systemAppendFile) {\n const filePath = resolve(opts.systemAppendFile);\n try {\n systemAppendFileContents = readFileSync(filePath, \"utf8\");\n } catch (err) {\n const e = err as NodeJS.ErrnoException;\n const errorDetails = e.code ? `[${e.code}] ${e.message}` : e.message;\n process.stderr.write(t(\"code.systemAppendFileReadError\", { filePath, errorDetails }));\n process.exit(1);\n }\n }\n\n // The rebuilder is re-invoked on `/new` and `/cwd`. `currentRoot` is the live\n // pointer; `/cwd` updates it via `onRootChange` so the rebuild picks up the\n // new workspace's REASONIX.md / memory without restarting the loop.\n let currentRoot = rootDir;\n let semanticEnabled = semantic.enabled;\n const codeRebuildSystem = () =>\n codeSystemPrompt(currentRoot, {\n hasSemanticSearch: semanticEnabled,\n systemAppend: opts.systemAppend,\n systemAppendFile: systemAppendFileContents,\n modelId: resolvedModel,\n });\n await chatCommand({\n model: resolvedModel,\n budgetUsd: opts.budgetUsd,\n system: codeRebuildSystem(),\n rebuildSystem: codeRebuildSystem,\n transcript: opts.transcript,\n session,\n seedTools: tools,\n codeMode: {\n rootDir,\n jobs,\n reregisterTools: registerRooted,\n reBootstrapSemantic: async (root: string) => {\n const r = await reBootstrapSemantic(root);\n semanticEnabled = r.enabled;\n return r;\n },\n onRootChange: (newRoot: string) => {\n currentRoot = newRoot;\n },\n },\n mcp: normalizeMcpConfig(readConfig()).map(specToRaw),\n forceResume: opts.forceResume,\n forceNew: opts.forceNew,\n noDashboard: opts.noDashboard,\n openDashboard: opts.openDashboard,\n dashboardPort: opts.dashboardPort,\n dashboardHost: opts.dashboardHost,\n dashboardToken: opts.dashboardToken,\n noMouse: opts.noMouse,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,oBAAoB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"./chunk-VVPV5HU6.js";
|
|
8
8
|
import {
|
|
9
9
|
buildIndex
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WPY7AFS6.js";
|
|
11
11
|
import "./chunk-6UNHNVJR.js";
|
|
12
12
|
import {
|
|
13
13
|
loadIndexConfig,
|
|
14
14
|
resolveSemanticEmbeddingConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AOYUW3HR.js";
|
|
16
16
|
import "./chunk-TUK7OWJA.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/index.ts
|
|
@@ -353,4 +353,4 @@ function makeTtyWriter() {
|
|
|
353
353
|
export {
|
|
354
354
|
indexCommand
|
|
355
355
|
};
|
|
356
|
-
//# sourceMappingURL=commands-
|
|
356
|
+
//# sourceMappingURL=commands-DHETOY7O.js.map
|
|
@@ -2,14 +2,14 @@
|
|
|
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
|
DeepSeekClient
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GFJJEW3Z.js";
|
|
6
6
|
import "./chunk-25T6CVUP.js";
|
|
7
7
|
import {
|
|
8
8
|
loadDotenv
|
|
9
9
|
} from "./chunk-2UQP6H6T.js";
|
|
10
10
|
import {
|
|
11
11
|
loadEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AOYUW3HR.js";
|
|
13
13
|
import "./chunk-TUK7OWJA.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/commands/commit.ts
|
|
@@ -288,4 +288,4 @@ async function commitCommand(opts = {}) {
|
|
|
288
288
|
export {
|
|
289
289
|
commitCommand
|
|
290
290
|
};
|
|
291
|
-
//# sourceMappingURL=commit-
|
|
291
|
+
//# sourceMappingURL=commit-BBUYAKZV.js.map
|
|
@@ -69,6 +69,7 @@ import {
|
|
|
69
69
|
removeProjectPathAllowed,
|
|
70
70
|
removeProjectShellAllowed,
|
|
71
71
|
removeSkillPath,
|
|
72
|
+
resolveBaseUrlEnv,
|
|
72
73
|
resolveSemanticEmbeddingConfig,
|
|
73
74
|
resolveSkillPath,
|
|
74
75
|
resolveSkillPaths,
|
|
@@ -95,7 +96,7 @@ import {
|
|
|
95
96
|
webSearchEndpoint,
|
|
96
97
|
webSearchEngine,
|
|
97
98
|
writeConfig
|
|
98
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-AOYUW3HR.js";
|
|
99
100
|
import "./chunk-TUK7OWJA.js";
|
|
100
101
|
export {
|
|
101
102
|
DEFAULT_MODEL,
|
|
@@ -166,6 +167,7 @@ export {
|
|
|
166
167
|
removeProjectPathAllowed,
|
|
167
168
|
removeProjectShellAllowed,
|
|
168
169
|
removeSkillPath,
|
|
170
|
+
resolveBaseUrlEnv,
|
|
169
171
|
resolveSemanticEmbeddingConfig,
|
|
170
172
|
resolveSkillPath,
|
|
171
173
|
resolveSkillPaths,
|
|
@@ -193,4 +195,4 @@ export {
|
|
|
193
195
|
webSearchEngine,
|
|
194
196
|
writeConfig
|
|
195
197
|
};
|
|
196
|
-
//# sourceMappingURL=config-
|
|
198
|
+
//# sourceMappingURL=config-KV7VV5LG.js.map
|