jinzd-ai-cli 0.4.188 → 0.4.190
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/dist/{agent-client-25TIQ6AP.js → agent-client-6GX6QQDU.js} +0 -1
- package/dist/{auth-OI4YRVRG.js → auth-FSTAKSYF.js} +2 -2
- package/dist/{batch-D6K2KHJK.js → batch-HF5RWUBL.js} +7 -15
- package/dist/{chat-index-JXTYDRCY.js → chat-index-FDSGKWQV.js} +2 -2
- package/dist/{chat-index-WDMVP7BN.js → chat-index-UBCWHBLR.js} +2 -2
- package/dist/{chunk-UK6E2563.js → chunk-4KMDKDAK.js} +1 -1
- package/dist/{chunk-J3XSJCO5.js → chunk-5CLH6XAW.js} +10 -8
- package/dist/chunk-6BUTA5VW.js +38 -0
- package/dist/{chunk-VRCBXH2W.js → chunk-A4GUGWEY.js} +1 -1
- package/dist/{chunk-YKVFZLSI.js → chunk-AEAYUKSY.js} +2 -2
- package/dist/{chunk-ZWVIDFGY.js → chunk-BXP6YZ2P.js} +4 -3
- package/dist/{chunk-OVWE4E46.js → chunk-CKH4KQ4E.js} +4 -3
- package/dist/{chunk-D6U75FHP.js → chunk-IEQAE3QG.js} +4 -3
- package/dist/chunk-IW3Q7AE5.js +40 -0
- package/dist/{chunk-VPTRE7IW.js → chunk-JATZIZJV.js} +2 -2
- package/dist/{chunk-GXB7YKF2.js → chunk-JVKAL5Q3.js} +5 -12
- package/dist/{chunk-DFQSQQEU.js → chunk-KHS7RSGR.js} +6 -5
- package/dist/{chunk-RIVZNS3K.js → chunk-MC34ISJU.js} +5 -4
- package/dist/{chunk-NRSAAMIF.js → chunk-NV6W7TZW.js} +1 -1
- package/dist/{chunk-VNNYHW6N.js → chunk-O6UFCEUZ.js} +1 -1
- package/dist/{chunk-DQ2OHJNF.js → chunk-RWM2GFRC.js} +5 -3
- package/dist/{chunk-SEFOKYYP.js → chunk-SQB66GP6.js} +1 -1
- package/dist/{chunk-HDSKW7Q3.js → chunk-T2NL5ZIA.js} +2 -2
- package/dist/{chunk-4UZE4ADL.js → chunk-TB4W4Y4T.js} +18 -52
- package/dist/{chunk-MUQZOUV5.js → chunk-UVW3WLSV.js} +1 -1
- package/dist/{chunk-KIGVJVX4.js → chunk-W7UKO3PS.js} +18 -50
- package/dist/{chunk-Q7SB3R25.js → chunk-X4J2DZB5.js} +1 -1
- package/dist/{chunk-A3I5WP5L.js → chunk-YUBD7T2R.js} +5 -4
- package/dist/{chunk-ODAAPNSL.js → chunk-ZN5IEPSS.js} +1 -1
- package/dist/{ci-42ZBP2SY.js → ci-X24WFUDF.js} +13 -7
- package/dist/{constants-NCWVAAI7.js → constants-4QBBHLU4.js} +1 -2
- package/dist/{doctor-cli-R3SWTL5Z.js → doctor-cli-EUOCY7VN.js} +5 -5
- package/dist/electron-server.js +52 -62
- package/dist/{file-checkpoint-UHSMHCRU.js → file-checkpoint-CGH6OJVI.js} +0 -1
- package/dist/{file-checkpoint-ZN7KE3TN.js → file-checkpoint-NKBHGC7L.js} +0 -1
- package/dist/{git-context-7KIP4X2V.js → git-context-EXOEHQSF.js} +0 -1
- package/dist/{hub-3ZGIM2FN.js → hub-YW3KLBZM.js} +3 -4
- package/dist/{hub-server-GSTG5MNE.js → hub-server-LJ2JSKZ2.js} +0 -1
- package/dist/index.js +36 -36
- package/dist/{indexer-S6UMGQKA.js → indexer-AKWMYNJI.js} +3 -3
- package/dist/indexer-BMYUUDLH.js +10 -0
- package/dist/{persist-A3R2IAYU.js → persist-L54DPLI7.js} +3 -3
- package/dist/{project-trust-EBGHD7LE.js → project-trust-MUG325AW.js} +4 -11
- package/dist/{project-trust-IFM7FXEV.js → project-trust-NKYHL3VZ.js} +4 -11
- package/dist/{run-tests-NS3SPH6S.js → run-tests-7ZUNEUEX.js} +2 -3
- package/dist/{run-tests-IJYP6BMT.js → run-tests-OTZE5CEN.js} +1 -2
- package/dist/{semantic-GJJWTI3A.js → semantic-FF6DDJI6.js} +4 -4
- package/dist/{semantic-FKOEXY75.js → semantic-PK7AUOJT.js} +4 -4
- package/dist/{server-TZRMRT3O.js → server-WMLZOLD5.js} +30 -30
- package/dist/{server-SVTSJ3PK.js → server-YMCGJOXV.js} +10 -10
- package/dist/{store-VMK543OQ.js → store-MWNHVGJT.js} +2 -2
- package/dist/{store-A3TZM6PS.js → store-VO37H6LS.js} +2 -2
- package/dist/{task-orchestrator-GMJ5PLVV.js → task-orchestrator-DEWKVJGQ.js} +14 -14
- package/dist/{usage-IYMFSHDX.js → usage-5LMWDGZ4.js} +4 -4
- package/dist/{vector-store-Z5OF4WWJ.js → vector-store-BBDXB5IQ.js} +2 -2
- package/dist/{vector-store-PLDSXF3V.js → vector-store-JBAE6PS4.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-3RG5ZIWI.js +0 -10
- package/dist/chunk-PDX44BCA.js +0 -11
- package/dist/indexer-ISSNIFQY.js +0 -10
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
resolveRoleProviders
|
|
12
12
|
} from "./chunk-Q3ZUDA6S.js";
|
|
13
13
|
import "./chunk-NZ4X6GUC.js";
|
|
14
|
-
import "./chunk-PDX44BCA.js";
|
|
15
14
|
|
|
16
15
|
// src/hub/index.ts
|
|
17
16
|
import { readFileSync, existsSync } from "fs";
|
|
@@ -140,7 +139,7 @@ ${content}`);
|
|
|
140
139
|
const state = await runDiscussion(config, providers, options.topic);
|
|
141
140
|
if (options.save !== false && state.messages.length > 0) {
|
|
142
141
|
try {
|
|
143
|
-
const { persistDiscussion } = await import("./persist-
|
|
142
|
+
const { persistDiscussion } = await import("./persist-L54DPLI7.js");
|
|
144
143
|
const { path } = await persistDiscussion(state, configManager, defaultProvider, defaultModel);
|
|
145
144
|
console.log(chalk.dim(`
|
|
146
145
|
\u{1F4BE} Saved to history \u2014 open it in the Web UI and hit \u{1F3AC} to replay.
|
|
@@ -155,7 +154,7 @@ ${content}`);
|
|
|
155
154
|
}
|
|
156
155
|
}
|
|
157
156
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
158
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
157
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-DEWKVJGQ.js");
|
|
159
158
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
160
159
|
let interrupted = false;
|
|
161
160
|
const onSigint = () => {
|
|
@@ -191,7 +190,7 @@ async function runTaskMode(config, providers, configManager, topic) {
|
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
async function runDistributedDiscussion(config, providers, topic, port) {
|
|
194
|
-
const { HubServer } = await import("./hub-server-
|
|
193
|
+
const { HubServer } = await import("./hub-server-LJ2JSKZ2.js");
|
|
195
194
|
const hub = new HubServer(config, providers, port);
|
|
196
195
|
let interrupted = false;
|
|
197
196
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
saveDevState,
|
|
16
16
|
sessionHasMeaningfulContent,
|
|
17
17
|
setupProxy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JATZIZJV.js";
|
|
19
19
|
import {
|
|
20
20
|
ToolExecutor,
|
|
21
21
|
ToolRegistry,
|
|
@@ -34,17 +34,17 @@ import {
|
|
|
34
34
|
spawnAgentContext,
|
|
35
35
|
theme,
|
|
36
36
|
undoStack
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-5CLH6XAW.js";
|
|
38
|
+
import "./chunk-T2NL5ZIA.js";
|
|
39
|
+
import "./chunk-BXP6YZ2P.js";
|
|
40
|
+
import "./chunk-NV6W7TZW.js";
|
|
41
41
|
import {
|
|
42
42
|
SessionManager,
|
|
43
43
|
getContentText
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MC34ISJU.js";
|
|
45
45
|
import {
|
|
46
46
|
CostTracker
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YUBD7T2R.js";
|
|
48
48
|
import {
|
|
49
49
|
computeCost,
|
|
50
50
|
formatCost,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getConfigDirUsage,
|
|
55
55
|
listRecentCrashes,
|
|
56
56
|
writeCrashLog
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-UVW3WLSV.js";
|
|
58
58
|
import {
|
|
59
59
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
60
60
|
ProviderRegistry,
|
|
@@ -78,11 +78,11 @@ import {
|
|
|
78
78
|
getTopFailingTools,
|
|
79
79
|
getTopUsedTools,
|
|
80
80
|
installFlushOnExit
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-KHS7RSGR.js";
|
|
82
82
|
import "./chunk-HIU2SH4V.js";
|
|
83
83
|
import {
|
|
84
84
|
ConfigManager
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-X4J2DZB5.js";
|
|
86
86
|
import {
|
|
87
87
|
AuthError,
|
|
88
88
|
ProviderError,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
SKILLS_DIR_NAME,
|
|
110
110
|
VERSION,
|
|
111
111
|
buildUserIdentityPrompt
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-4KMDKDAK.js";
|
|
113
113
|
import {
|
|
114
114
|
formatGitContextForPrompt,
|
|
115
115
|
getGitContext,
|
|
@@ -123,15 +123,15 @@ import {
|
|
|
123
123
|
clearChatIndex,
|
|
124
124
|
getChatIndexStatus,
|
|
125
125
|
searchChatMemory
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-TB4W4Y4T.js";
|
|
127
127
|
import "./chunk-KHYD3WXE.js";
|
|
128
128
|
import {
|
|
129
129
|
DEFAULT_PATTERNS,
|
|
130
130
|
scanString
|
|
131
131
|
} from "./chunk-SLSWPBK3.js";
|
|
132
|
-
import "./chunk-
|
|
133
|
-
import "./chunk-
|
|
134
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-O6UFCEUZ.js";
|
|
133
|
+
import "./chunk-CKH4KQ4E.js";
|
|
134
|
+
import "./chunk-IW3Q7AE5.js";
|
|
135
135
|
|
|
136
136
|
// src/index.ts
|
|
137
137
|
import { program } from "commander";
|
|
@@ -1823,9 +1823,9 @@ No tools match "${filter}".
|
|
|
1823
1823
|
if (args[0] === "trust-project") {
|
|
1824
1824
|
const { join: join5 } = await import("path");
|
|
1825
1825
|
const { existsSync: existsSync5 } = await import("fs");
|
|
1826
|
-
const { getGitRoot: getGitRoot2 } = await import("./git-context-
|
|
1827
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1828
|
-
const { approveProject, hashMcpFile } = await import("./project-trust-
|
|
1826
|
+
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1827
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-4QBBHLU4.js");
|
|
1828
|
+
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1829
1829
|
const cwd = process.cwd();
|
|
1830
1830
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
1831
1831
|
const mcpPath = join5(projectRoot, MCP_PROJECT_CONFIG_NAME2);
|
|
@@ -2758,9 +2758,9 @@ ${hint}` : "")
|
|
|
2758
2758
|
async execute(args, ctx) {
|
|
2759
2759
|
const sub = (args[0] ?? "status").toLowerCase();
|
|
2760
2760
|
const root = process.cwd();
|
|
2761
|
-
const { loadIndex, clearIndex } = await import("./store-
|
|
2762
|
-
const { indexProject } = await import("./indexer-
|
|
2763
|
-
const { loadVectorStore, clearVectorStore } = await import("./vector-store-
|
|
2761
|
+
const { loadIndex, clearIndex } = await import("./store-MWNHVGJT.js");
|
|
2762
|
+
const { indexProject } = await import("./indexer-AKWMYNJI.js");
|
|
2763
|
+
const { loadVectorStore, clearVectorStore } = await import("./vector-store-BBDXB5IQ.js");
|
|
2764
2764
|
if (sub === "status") {
|
|
2765
2765
|
const idx = loadIndex(root);
|
|
2766
2766
|
const vec = loadVectorStore(root);
|
|
@@ -2819,7 +2819,7 @@ ${hint}` : "")
|
|
|
2819
2819
|
}
|
|
2820
2820
|
console.log(theme.dim(` Building semantic index for ${idx.symbolCount} symbols\u2026`));
|
|
2821
2821
|
console.log(theme.dim(" (First run downloads ~117 MB embedding model to ~/.aicli/models/)"));
|
|
2822
|
-
const { rebuildSemanticIndex } = await import("./semantic-
|
|
2822
|
+
const { rebuildSemanticIndex } = await import("./semantic-PK7AUOJT.js");
|
|
2823
2823
|
try {
|
|
2824
2824
|
const stats = await rebuildSemanticIndex(root, {
|
|
2825
2825
|
onProgress: (done, total) => {
|
|
@@ -2885,7 +2885,7 @@ ${hint}` : "")
|
|
|
2885
2885
|
usage: "/test [command|filter]",
|
|
2886
2886
|
async execute(args, ctx) {
|
|
2887
2887
|
try {
|
|
2888
|
-
const { executeTests } = await import("./run-tests-
|
|
2888
|
+
const { executeTests } = await import("./run-tests-7ZUNEUEX.js");
|
|
2889
2889
|
const argStr = args.join(" ").trim();
|
|
2890
2890
|
let testArgs = {};
|
|
2891
2891
|
if (argStr) {
|
|
@@ -5459,8 +5459,8 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5459
5459
|
}
|
|
5460
5460
|
void (async () => {
|
|
5461
5461
|
try {
|
|
5462
|
-
const { indexProject } = await import("./indexer-
|
|
5463
|
-
const { loadIndex } = await import("./store-
|
|
5462
|
+
const { indexProject } = await import("./indexer-AKWMYNJI.js");
|
|
5463
|
+
const { loadIndex } = await import("./store-MWNHVGJT.js");
|
|
5464
5464
|
const root = process.cwd();
|
|
5465
5465
|
const existed = loadIndex(root);
|
|
5466
5466
|
const { stats } = await indexProject(root);
|
|
@@ -5480,7 +5480,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5480
5480
|
})();
|
|
5481
5481
|
void (async () => {
|
|
5482
5482
|
try {
|
|
5483
|
-
const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-
|
|
5483
|
+
const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-FDSGKWQV.js");
|
|
5484
5484
|
const initial = getChatIndexStatus2();
|
|
5485
5485
|
this.chatMemoryStatus = {
|
|
5486
5486
|
exists: initial.exists,
|
|
@@ -5514,7 +5514,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5514
5514
|
}
|
|
5515
5515
|
let projectMcpServers = {};
|
|
5516
5516
|
if (projectMcpResult) {
|
|
5517
|
-
const { checkTrust } = await import("./project-trust-
|
|
5517
|
+
const { checkTrust } = await import("./project-trust-NKYHL3VZ.js");
|
|
5518
5518
|
const verdict = checkTrust(this.config.getConfigDir(), projectMcpResult.filePath);
|
|
5519
5519
|
if (verdict.trusted) {
|
|
5520
5520
|
projectMcpServers = projectMcpResult.servers;
|
|
@@ -7256,11 +7256,11 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7256
7256
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7257
7257
|
process.exit(1);
|
|
7258
7258
|
}
|
|
7259
|
-
const { startWebServer } = await import("./server-
|
|
7259
|
+
const { startWebServer } = await import("./server-WMLZOLD5.js");
|
|
7260
7260
|
await startWebServer({ port, host: options.host });
|
|
7261
7261
|
});
|
|
7262
7262
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
|
|
7263
|
-
const { AuthManager } = await import("./auth-
|
|
7263
|
+
const { AuthManager } = await import("./auth-FSTAKSYF.js");
|
|
7264
7264
|
const config = new ConfigManager();
|
|
7265
7265
|
const auth = new AuthManager(config.getConfigDir());
|
|
7266
7266
|
if (!action || action === "list") {
|
|
@@ -7423,16 +7423,16 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7423
7423
|
console.log(footer + "\n");
|
|
7424
7424
|
});
|
|
7425
7425
|
program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
|
|
7426
|
-
const { runUsageCli } = await import("./usage-
|
|
7426
|
+
const { runUsageCli } = await import("./usage-5LMWDGZ4.js");
|
|
7427
7427
|
await runUsageCli(options);
|
|
7428
7428
|
});
|
|
7429
7429
|
program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
|
|
7430
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7430
|
+
const { runDoctorCli } = await import("./doctor-cli-EUOCY7VN.js");
|
|
7431
7431
|
await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
|
|
7432
7432
|
});
|
|
7433
7433
|
program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
|
|
7434
7434
|
try {
|
|
7435
|
-
const batch = await import("./batch-
|
|
7435
|
+
const batch = await import("./batch-HF5RWUBL.js");
|
|
7436
7436
|
switch (action) {
|
|
7437
7437
|
case "submit":
|
|
7438
7438
|
if (!arg) {
|
|
@@ -7475,7 +7475,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7475
7475
|
}
|
|
7476
7476
|
});
|
|
7477
7477
|
program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
|
|
7478
|
-
const { startMcpServer } = await import("./server-
|
|
7478
|
+
const { startMcpServer } = await import("./server-YMCGJOXV.js");
|
|
7479
7479
|
await startMcpServer({
|
|
7480
7480
|
allowDestructive: !!options.allowDestructive,
|
|
7481
7481
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7484,7 +7484,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
|
|
|
7484
7484
|
});
|
|
7485
7485
|
});
|
|
7486
7486
|
program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number; diff fetched via `gh pr diff <num>`", (v) => parseInt(v, 10)).option("--base <ref>", "Base ref for `git diff <ref>...HEAD` (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").action(async (options) => {
|
|
7487
|
-
const { runCi } = await import("./ci-
|
|
7487
|
+
const { runCi } = await import("./ci-X24WFUDF.js");
|
|
7488
7488
|
const result = await runCi({
|
|
7489
7489
|
pr: options.pr,
|
|
7490
7490
|
base: options.base,
|
|
@@ -7630,7 +7630,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7630
7630
|
}),
|
|
7631
7631
|
config.get("customProviders")
|
|
7632
7632
|
);
|
|
7633
|
-
const { startHub } = await import("./hub-
|
|
7633
|
+
const { startHub } = await import("./hub-YW3KLBZM.js");
|
|
7634
7634
|
await startHub(
|
|
7635
7635
|
{
|
|
7636
7636
|
topic: topic ?? "",
|
|
@@ -7665,7 +7665,7 @@ program.command("join").description("Join a running hub as a remote AI agent").o
|
|
|
7665
7665
|
}),
|
|
7666
7666
|
config.get("customProviders")
|
|
7667
7667
|
);
|
|
7668
|
-
const { joinHub } = await import("./agent-client-
|
|
7668
|
+
const { joinHub } = await import("./agent-client-6GX6QQDU.js");
|
|
7669
7669
|
await joinHub(
|
|
7670
7670
|
{
|
|
7671
7671
|
port: parseInt(options.port ?? "9527", 10),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
indexProject,
|
|
4
4
|
updateFile
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-O6UFCEUZ.js";
|
|
6
|
+
import "./chunk-CKH4KQ4E.js";
|
|
7
|
+
import "./chunk-IW3Q7AE5.js";
|
|
8
8
|
export {
|
|
9
9
|
indexProject,
|
|
10
10
|
updateFile
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
discussionToMessages,
|
|
4
4
|
persistDiscussion
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-A4GUGWEY.js";
|
|
6
|
+
import "./chunk-MC34ISJU.js";
|
|
7
7
|
import "./chunk-SLSWPBK3.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-IW3Q7AE5.js";
|
|
9
9
|
export {
|
|
10
10
|
discussionToMessages,
|
|
11
11
|
persistDiscussion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
atomicWriteFileSync
|
|
3
|
+
} from "./chunk-6BUTA5VW.js";
|
|
4
4
|
|
|
5
5
|
// src/mcp/project-trust.ts
|
|
6
|
-
import { existsSync, readFileSync,
|
|
6
|
+
import { existsSync, readFileSync, mkdirSync } from "fs";
|
|
7
7
|
import { createHash } from "crypto";
|
|
8
8
|
import { join, dirname } from "path";
|
|
9
9
|
var TRUST_FILE = "mcp-project-trust.json";
|
|
@@ -27,14 +27,7 @@ function loadStore(baseDir) {
|
|
|
27
27
|
function saveStore(baseDir, store) {
|
|
28
28
|
mkdirSync(dirname(join(baseDir, TRUST_FILE)), { recursive: true });
|
|
29
29
|
const file = join(baseDir, TRUST_FILE);
|
|
30
|
-
|
|
31
|
-
writeFileSync(tmp, JSON.stringify(store, null, 2), "utf-8");
|
|
32
|
-
try {
|
|
33
|
-
const { renameSync } = __require("fs");
|
|
34
|
-
renameSync(tmp, file);
|
|
35
|
-
} catch {
|
|
36
|
-
writeFileSync(file, JSON.stringify(store, null, 2), "utf-8");
|
|
37
|
-
}
|
|
30
|
+
atomicWriteFileSync(file, JSON.stringify(store, null, 2));
|
|
38
31
|
}
|
|
39
32
|
function checkTrust(baseDir, mcpPath) {
|
|
40
33
|
if (!existsSync(mcpPath)) return { trusted: true };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
atomicWriteFileSync
|
|
4
|
+
} from "./chunk-IW3Q7AE5.js";
|
|
5
5
|
|
|
6
6
|
// src/mcp/project-trust.ts
|
|
7
|
-
import { existsSync, readFileSync,
|
|
7
|
+
import { existsSync, readFileSync, mkdirSync } from "fs";
|
|
8
8
|
import { createHash } from "crypto";
|
|
9
9
|
import { join, dirname } from "path";
|
|
10
10
|
var TRUST_FILE = "mcp-project-trust.json";
|
|
@@ -28,14 +28,7 @@ function loadStore(baseDir) {
|
|
|
28
28
|
function saveStore(baseDir, store) {
|
|
29
29
|
mkdirSync(dirname(join(baseDir, TRUST_FILE)), { recursive: true });
|
|
30
30
|
const file = join(baseDir, TRUST_FILE);
|
|
31
|
-
|
|
32
|
-
writeFileSync(tmp, JSON.stringify(store, null, 2), "utf-8");
|
|
33
|
-
try {
|
|
34
|
-
const { renameSync } = __require("fs");
|
|
35
|
-
renameSync(tmp, file);
|
|
36
|
-
} catch {
|
|
37
|
-
writeFileSync(file, JSON.stringify(store, null, 2), "utf-8");
|
|
38
|
-
}
|
|
31
|
+
atomicWriteFileSync(file, JSON.stringify(store, null, 2));
|
|
39
32
|
}
|
|
40
33
|
function checkTrust(baseDir, mcpPath) {
|
|
41
34
|
if (!existsSync(mcpPath)) return { trusted: true };
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
pathTokens,
|
|
5
5
|
rebuildSemanticIndex,
|
|
6
6
|
semanticSearch
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-AEAYUKSY.js";
|
|
8
|
+
import "./chunk-RWM2GFRC.js";
|
|
9
|
+
import "./chunk-IEQAE3QG.js";
|
|
10
10
|
import "./chunk-JV5N65KN.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-6BUTA5VW.js";
|
|
12
12
|
export {
|
|
13
13
|
buildEmbeddingText,
|
|
14
14
|
hasSemanticIndex,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
pathTokens,
|
|
6
6
|
rebuildSemanticIndex,
|
|
7
7
|
semanticSearch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-T2NL5ZIA.js";
|
|
9
|
+
import "./chunk-BXP6YZ2P.js";
|
|
10
10
|
import "./chunk-KHYD3WXE.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-CKH4KQ4E.js";
|
|
12
|
+
import "./chunk-IW3Q7AE5.js";
|
|
13
13
|
export {
|
|
14
14
|
buildEmbeddingText,
|
|
15
15
|
hasSemanticIndex,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
import "./chunk-NZ4X6GUC.js";
|
|
8
8
|
import {
|
|
9
9
|
persistDiscussion
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A4GUGWEY.js";
|
|
11
11
|
import {
|
|
12
12
|
AuthManager,
|
|
13
13
|
TOKEN_EXPIRY_MS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JVKAL5Q3.js";
|
|
15
15
|
import {
|
|
16
16
|
McpManager,
|
|
17
17
|
SkillManager,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
loadDevState,
|
|
20
20
|
persistToolRound,
|
|
21
21
|
setupProxy
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JATZIZJV.js";
|
|
23
23
|
import {
|
|
24
24
|
ToolExecutor,
|
|
25
25
|
ToolRegistry,
|
|
@@ -37,14 +37,14 @@ import {
|
|
|
37
37
|
spawnAgentContext,
|
|
38
38
|
truncateOutput,
|
|
39
39
|
undoStack
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-5CLH6XAW.js";
|
|
41
|
+
import "./chunk-T2NL5ZIA.js";
|
|
42
|
+
import "./chunk-BXP6YZ2P.js";
|
|
43
|
+
import "./chunk-NV6W7TZW.js";
|
|
44
44
|
import {
|
|
45
45
|
SessionManager,
|
|
46
46
|
getContentText
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-MC34ISJU.js";
|
|
48
48
|
import {
|
|
49
49
|
computeCost,
|
|
50
50
|
formatCost
|
|
@@ -65,13 +65,13 @@ import {
|
|
|
65
65
|
} from "./chunk-IQ7JE43O.js";
|
|
66
66
|
import {
|
|
67
67
|
runTool
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-KHS7RSGR.js";
|
|
69
69
|
import {
|
|
70
70
|
getDangerLevel
|
|
71
71
|
} from "./chunk-HIU2SH4V.js";
|
|
72
72
|
import {
|
|
73
73
|
ConfigManager
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-X4J2DZB5.js";
|
|
75
75
|
import "./chunk-TZQHYZKT.js";
|
|
76
76
|
import {
|
|
77
77
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -91,19 +91,19 @@ import {
|
|
|
91
91
|
SKILLS_DIR_NAME,
|
|
92
92
|
VERSION,
|
|
93
93
|
buildUserIdentityPrompt
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-4KMDKDAK.js";
|
|
95
95
|
import {
|
|
96
96
|
formatGitContextForPrompt,
|
|
97
97
|
getGitContext,
|
|
98
98
|
getGitRoot
|
|
99
99
|
} from "./chunk-HOSJZMQS.js";
|
|
100
100
|
import "./chunk-4BKXL7SM.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-TB4W4Y4T.js";
|
|
102
102
|
import "./chunk-KHYD3WXE.js";
|
|
103
103
|
import "./chunk-SLSWPBK3.js";
|
|
104
|
-
import "./chunk-
|
|
105
|
-
import "./chunk-
|
|
106
|
-
import "./chunk-
|
|
104
|
+
import "./chunk-O6UFCEUZ.js";
|
|
105
|
+
import "./chunk-CKH4KQ4E.js";
|
|
106
|
+
import "./chunk-IW3Q7AE5.js";
|
|
107
107
|
|
|
108
108
|
// src/web/server.ts
|
|
109
109
|
import express from "express";
|
|
@@ -1345,9 +1345,9 @@ This fresh stream has NO tools. Produce ONLY the document body: start with a mar
|
|
|
1345
1345
|
this.send({
|
|
1346
1346
|
type: "tool_call_result",
|
|
1347
1347
|
callId: call.id,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1348
|
+
toolName: call.name,
|
|
1349
|
+
content: summary,
|
|
1350
|
+
isError: true
|
|
1351
1351
|
});
|
|
1352
1352
|
return { content: "", summary, isError: true };
|
|
1353
1353
|
}
|
|
@@ -2199,9 +2199,9 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2199
2199
|
case "index": {
|
|
2200
2200
|
const sub = (args[0] ?? "status").toLowerCase();
|
|
2201
2201
|
const root = process.cwd();
|
|
2202
|
-
const { loadIndex, clearIndex } = await import("./store-
|
|
2203
|
-
const { indexProject } = await import("./indexer-
|
|
2204
|
-
const { loadVectorStore, clearVectorStore } = await import("./vector-store-
|
|
2202
|
+
const { loadIndex, clearIndex } = await import("./store-MWNHVGJT.js");
|
|
2203
|
+
const { indexProject } = await import("./indexer-AKWMYNJI.js");
|
|
2204
|
+
const { loadVectorStore, clearVectorStore } = await import("./vector-store-BBDXB5IQ.js");
|
|
2205
2205
|
if (sub === "status") {
|
|
2206
2206
|
const idx = loadIndex(root);
|
|
2207
2207
|
const vec = loadVectorStore(root);
|
|
@@ -2250,7 +2250,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2250
2250
|
message: `Building semantic index for ${idx.symbolCount} symbols\u2026 (first run downloads ~117 MB model)`
|
|
2251
2251
|
});
|
|
2252
2252
|
try {
|
|
2253
|
-
const { rebuildSemanticIndex } = await import("./semantic-
|
|
2253
|
+
const { rebuildSemanticIndex } = await import("./semantic-PK7AUOJT.js");
|
|
2254
2254
|
const stats = await rebuildSemanticIndex(root);
|
|
2255
2255
|
const first = stats.modelFirstLoadMs ? ` (model load+first batch ${stats.modelFirstLoadMs}ms)` : "";
|
|
2256
2256
|
this.send({
|
|
@@ -2398,7 +2398,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2398
2398
|
if (rewindSub === "list" || !rewindSub) {
|
|
2399
2399
|
const lines = [`Conversation messages (${session.messages.length} total):
|
|
2400
2400
|
`];
|
|
2401
|
-
const cpIndices = (await import("./file-checkpoint-
|
|
2401
|
+
const cpIndices = (await import("./file-checkpoint-NKBHGC7L.js")).fileCheckpoints.getMessageIndices();
|
|
2402
2402
|
for (let i = 0; i < session.messages.length; i++) {
|
|
2403
2403
|
const m = session.messages[i];
|
|
2404
2404
|
const text = getContentText(m.content).replace(/\n/g, " ").slice(0, 60);
|
|
@@ -2414,7 +2414,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2414
2414
|
this.send({ type: "error", message: `Invalid message number: ${rewindSub}. Range: 1-${session.messages.length}` });
|
|
2415
2415
|
break;
|
|
2416
2416
|
}
|
|
2417
|
-
const { fileCheckpoints: fc } = await import("./file-checkpoint-
|
|
2417
|
+
const { fileCheckpoints: fc } = await import("./file-checkpoint-NKBHGC7L.js");
|
|
2418
2418
|
const rewindRemoved = session.messages.length - rewindN;
|
|
2419
2419
|
const rewindResult = fc.restoreToMessageIndex(rewindN);
|
|
2420
2420
|
session.messages = session.messages.slice(0, rewindN);
|
|
@@ -2437,7 +2437,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2437
2437
|
case "test": {
|
|
2438
2438
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2439
2439
|
try {
|
|
2440
|
-
const { executeTests } = await import("./run-tests-
|
|
2440
|
+
const { executeTests } = await import("./run-tests-7ZUNEUEX.js");
|
|
2441
2441
|
const argStr = args.join(" ").trim();
|
|
2442
2442
|
let testArgs = {};
|
|
2443
2443
|
if (argStr) {
|
|
@@ -2961,7 +2961,7 @@ Add .md files to create commands.` });
|
|
|
2961
2961
|
return;
|
|
2962
2962
|
}
|
|
2963
2963
|
try {
|
|
2964
|
-
const { searchChatMemory, loadChatIndex } = await import("./chat-index-
|
|
2964
|
+
const { searchChatMemory, loadChatIndex } = await import("./chat-index-FDSGKWQV.js");
|
|
2965
2965
|
const loaded = loadChatIndex();
|
|
2966
2966
|
if (!loaded || loaded.idx.chunks.length === 0) {
|
|
2967
2967
|
this.send({ type: "memory_hits", query: q, hits: [], indexMissing: true });
|
|
@@ -2997,7 +2997,7 @@ Add .md files to create commands.` });
|
|
|
2997
2997
|
}
|
|
2998
2998
|
async handleMemoryStatus() {
|
|
2999
2999
|
try {
|
|
3000
|
-
const { getChatIndexStatus } = await import("./chat-index-
|
|
3000
|
+
const { getChatIndexStatus } = await import("./chat-index-FDSGKWQV.js");
|
|
3001
3001
|
const s = getChatIndexStatus();
|
|
3002
3002
|
this.send({
|
|
3003
3003
|
type: "memory_status",
|
|
@@ -3022,7 +3022,7 @@ Add .md files to create commands.` });
|
|
|
3022
3022
|
type: "info",
|
|
3023
3023
|
message: full ? "\u{1F9E0} Rebuilding chat memory index (this may take a while on first run \u2014 ~117 MB embedder)." : "\u{1F9E0} Refreshing chat memory index (incremental)\u2026"
|
|
3024
3024
|
});
|
|
3025
|
-
const { buildChatIndex } = await import("./chat-index-
|
|
3025
|
+
const { buildChatIndex } = await import("./chat-index-FDSGKWQV.js");
|
|
3026
3026
|
const stats = await buildChatIndex({
|
|
3027
3027
|
full,
|
|
3028
3028
|
onProgress: (p) => {
|
|
@@ -3457,7 +3457,7 @@ async function startWebServer(options = {}) {
|
|
|
3457
3457
|
const projectMcpResolved = mcpEnabled ? resolveProjectMcpPath() : null;
|
|
3458
3458
|
let projectMcpServers = {};
|
|
3459
3459
|
if (projectMcpResolved) {
|
|
3460
|
-
const { checkTrust } = await import("./project-trust-
|
|
3460
|
+
const { checkTrust } = await import("./project-trust-NKYHL3VZ.js");
|
|
3461
3461
|
const verdict = checkTrust(config.getConfigDir(), projectMcpResolved);
|
|
3462
3462
|
if (verdict.trusted) {
|
|
3463
3463
|
projectMcpServers = loadProjectMcpConfig() ?? {};
|
|
@@ -3681,7 +3681,7 @@ async function startWebServer(options = {}) {
|
|
|
3681
3681
|
}
|
|
3682
3682
|
});
|
|
3683
3683
|
app.get("/api/sessions/:id/replay", requireAuth, (req, res) => {
|
|
3684
|
-
const id = req.params.id;
|
|
3684
|
+
const id = String(req.params.id);
|
|
3685
3685
|
if (!/^[a-f0-9-]{36}$/i.test(id)) {
|
|
3686
3686
|
res.status(400).json({ error: "Invalid session id" });
|
|
3687
3687
|
return;
|