jinzd-ai-cli 0.4.233 → 0.4.234
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/{batch-WWNPYQ6G.js → batch-T3FRX4B6.js} +2 -2
- package/dist/{chat-index-O56HDGFI.js → chat-index-7HXBWQFH.js} +2 -2
- package/dist/{chat-index-WSI7ULRQ.js → chat-index-WYXYD7YP.js} +1 -1
- package/dist/{chunk-4KM53GLG.js → chunk-2QQKS56X.js} +1 -1
- package/dist/{chunk-ACTO5C6K.js → chunk-3KTSJ2EL.js} +1 -1
- package/dist/{chunk-NXYXFRPA.js → chunk-5DTEEWYC.js} +3 -3
- package/dist/{chunk-NVUCDUXE.js → chunk-5MYPIQ3Y.js} +11 -5
- package/dist/{chunk-7KS3RGZ7.js → chunk-5VPRZMZB.js} +2 -2
- package/dist/{chunk-FQSAK75P.js → chunk-6MJMHHRK.js} +3 -3
- package/dist/{chunk-M4FW2NPU.js → chunk-AFT6VFMI.js} +1 -1
- package/dist/{chunk-HX67JAK6.js → chunk-E5RLXMSU.js} +5 -5
- package/dist/{chunk-4OAV7QMB.js → chunk-ETJ5X6V7.js} +1 -1
- package/dist/{chunk-EZGZOK6E.js → chunk-II6RZRTF.js} +1 -1
- package/dist/{chunk-ZWU7FWHO.js → chunk-JMP3LJC2.js} +38 -91
- package/dist/chunk-KCEO2XJ4.js +420 -0
- package/dist/{chunk-5PKNKJYP.js → chunk-L5PNAQ6O.js} +1 -1
- package/dist/{chunk-TJK7AU65.js → chunk-TAXIG7HH.js} +1 -1
- package/dist/{chunk-LF3OUJHK.js → chunk-UO3XWZFE.js} +302 -4
- package/dist/{ci-V5V3JSJC.js → ci-GJ53GPLA.js} +4 -4
- package/dist/{ci-format-XS7LKBO5.js → ci-format-AXE4QCI6.js} +2 -2
- package/dist/{constants-UROQJXLY.js → constants-DC4EXFSB.js} +1 -1
- package/dist/{doctor-cli-BY3FIV2B.js → doctor-cli-HKREND6Q.js} +4 -4
- package/dist/electron-server.js +43 -96
- package/dist/{hub-L2QCRI5M.js → hub-LTTKRGZC.js} +2 -2
- package/dist/index.js +22 -22
- package/dist/{persist-I3JI27OK.js → persist-AMH5SQ4W.js} +3 -3
- package/dist/{pr-IJRUPR5C.js → pr-4VODJVRV.js} +4 -4
- package/dist/{run-tests-FLCVJ6TK.js → run-tests-G5BNTMWQ.js} +2 -2
- package/dist/{run-tests-NNXBS4EL.js → run-tests-QR2PYR2P.js} +1 -1
- package/dist/{server-W2X3C6GJ.js → server-64WZVZZN.js} +15 -15
- package/dist/{server-E6LZB72O.js → server-EO6VQHKL.js} +6 -6
- package/dist/{task-orchestrator-W55VKYTC.js → task-orchestrator-4INCZMLT.js} +6 -6
- package/dist/{usage-MZCDTJWB.js → usage-T3HFMNNV.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-B5TYJO7V.js +0 -123
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
scanProject,
|
|
15
15
|
sessionHasMeaningfulContent,
|
|
16
16
|
setupProxy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5VPRZMZB.js";
|
|
18
18
|
import {
|
|
19
19
|
buildReviewPrompt,
|
|
20
20
|
buildSecurityReviewPrompt
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
theme,
|
|
53
53
|
undoStack,
|
|
54
54
|
updateMemoryApproval
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-E5RLXMSU.js";
|
|
56
56
|
import "./chunk-K3CF65QH.js";
|
|
57
57
|
import "./chunk-UUSRWSSX.js";
|
|
58
58
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -60,7 +60,7 @@ import "./chunk-BXP6YZ2P.js";
|
|
|
60
60
|
import {
|
|
61
61
|
SessionManager,
|
|
62
62
|
getContentText
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-JMP3LJC2.js";
|
|
64
64
|
import {
|
|
65
65
|
CostTracker
|
|
66
66
|
} from "./chunk-YVMACMXW.js";
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
formatDoctorReport,
|
|
75
75
|
loadContextFiles,
|
|
76
76
|
writeCrashLog
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-5DTEEWYC.js";
|
|
78
78
|
import {
|
|
79
79
|
ProviderRegistry
|
|
80
80
|
} from "./chunk-QYQI7ZWK.js";
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
trustHook,
|
|
95
95
|
trustPlugin,
|
|
96
96
|
untrustHook
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-II6RZRTF.js";
|
|
98
98
|
import {
|
|
99
99
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
100
100
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
} from "./chunk-O3XSFPYH.js";
|
|
117
117
|
import {
|
|
118
118
|
ConfigManager
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-L5PNAQ6O.js";
|
|
120
120
|
import {
|
|
121
121
|
AuthError,
|
|
122
122
|
ProviderError,
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
import {
|
|
131
131
|
fileCheckpoints
|
|
132
132
|
} from "./chunk-4BKXL7SM.js";
|
|
133
|
-
import "./chunk-
|
|
133
|
+
import "./chunk-AFT6VFMI.js";
|
|
134
134
|
import {
|
|
135
135
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
136
136
|
AUTHOR,
|
|
@@ -149,18 +149,18 @@ import {
|
|
|
149
149
|
SKILLS_DIR_NAME,
|
|
150
150
|
VERSION,
|
|
151
151
|
buildUserIdentityPrompt
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-3KTSJ2EL.js";
|
|
153
153
|
import {
|
|
154
154
|
buildChatIndex,
|
|
155
155
|
clearChatIndex,
|
|
156
156
|
getChatIndexStatus,
|
|
157
157
|
searchChatMemory
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-5MYPIQ3Y.js";
|
|
159
159
|
import "./chunk-KHYD3WXE.js";
|
|
160
160
|
import {
|
|
161
161
|
DEFAULT_PATTERNS,
|
|
162
162
|
scanString
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-KCEO2XJ4.js";
|
|
164
164
|
import {
|
|
165
165
|
atomicWriteFileSync
|
|
166
166
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -1821,7 +1821,7 @@ No tools match "${filter}".
|
|
|
1821
1821
|
const { join: join7 } = await import("path");
|
|
1822
1822
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1823
1823
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1824
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1824
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-DC4EXFSB.js");
|
|
1825
1825
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1826
1826
|
const cwd = process.cwd();
|
|
1827
1827
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2800,7 +2800,7 @@ function createReviewCommands() {
|
|
|
2800
2800
|
usage: "/test [command|filter]",
|
|
2801
2801
|
async execute(args, ctx) {
|
|
2802
2802
|
try {
|
|
2803
|
-
const { executeTests } = await import("./run-tests-
|
|
2803
|
+
const { executeTests } = await import("./run-tests-G5BNTMWQ.js");
|
|
2804
2804
|
const argStr = args.join(" ").trim();
|
|
2805
2805
|
let testArgs = {};
|
|
2806
2806
|
if (argStr) {
|
|
@@ -5954,7 +5954,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5954
5954
|
})();
|
|
5955
5955
|
void (async () => {
|
|
5956
5956
|
try {
|
|
5957
|
-
const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-
|
|
5957
|
+
const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-7HXBWQFH.js");
|
|
5958
5958
|
const initial = getChatIndexStatus2();
|
|
5959
5959
|
this.chatMemoryStatus = {
|
|
5960
5960
|
exists: initial.exists,
|
|
@@ -7745,7 +7745,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7745
7745
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7746
7746
|
process.exit(1);
|
|
7747
7747
|
}
|
|
7748
|
-
const { startWebServer } = await import("./server-
|
|
7748
|
+
const { startWebServer } = await import("./server-64WZVZZN.js");
|
|
7749
7749
|
await startWebServer({ port, host: options.host });
|
|
7750
7750
|
});
|
|
7751
7751
|
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) => {
|
|
@@ -7912,11 +7912,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7912
7912
|
console.log(footer + "\n");
|
|
7913
7913
|
});
|
|
7914
7914
|
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) => {
|
|
7915
|
-
const { runUsageCli } = await import("./usage-
|
|
7915
|
+
const { runUsageCli } = await import("./usage-T3HFMNNV.js");
|
|
7916
7916
|
await runUsageCli(options);
|
|
7917
7917
|
});
|
|
7918
7918
|
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) => {
|
|
7919
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7919
|
+
const { runDoctorCli } = await import("./doctor-cli-HKREND6Q.js");
|
|
7920
7920
|
const argv = process.argv.slice(2);
|
|
7921
7921
|
await runDoctorCli({
|
|
7922
7922
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -7925,7 +7925,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
7925
7925
|
});
|
|
7926
7926
|
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) => {
|
|
7927
7927
|
try {
|
|
7928
|
-
const batch = await import("./batch-
|
|
7928
|
+
const batch = await import("./batch-T3FRX4B6.js");
|
|
7929
7929
|
switch (action) {
|
|
7930
7930
|
case "submit":
|
|
7931
7931
|
if (!arg) {
|
|
@@ -7968,7 +7968,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7968
7968
|
}
|
|
7969
7969
|
});
|
|
7970
7970
|
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) => {
|
|
7971
|
-
const { startMcpServer } = await import("./server-
|
|
7971
|
+
const { startMcpServer } = await import("./server-EO6VQHKL.js");
|
|
7972
7972
|
await startMcpServer({
|
|
7973
7973
|
allowDestructive: !!options.allowDestructive,
|
|
7974
7974
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7981,7 +7981,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7981
7981
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
7982
7982
|
process.exit(1);
|
|
7983
7983
|
}
|
|
7984
|
-
const { runPrCli } = await import("./pr-
|
|
7984
|
+
const { runPrCli } = await import("./pr-4VODJVRV.js");
|
|
7985
7985
|
const result = await runPrCli({
|
|
7986
7986
|
action,
|
|
7987
7987
|
target,
|
|
@@ -8001,8 +8001,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8001
8001
|
process.exit(result.exitCode);
|
|
8002
8002
|
});
|
|
8003
8003
|
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 or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).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)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
|
|
8004
|
-
const { runCi } = await import("./ci-
|
|
8005
|
-
const { formatCiResult } = await import("./ci-format-
|
|
8004
|
+
const { runCi } = await import("./ci-GJ53GPLA.js");
|
|
8005
|
+
const { formatCiResult } = await import("./ci-format-AXE4QCI6.js");
|
|
8006
8006
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
8007
8007
|
if (formats > 1) {
|
|
8008
8008
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8160,7 +8160,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8160
8160
|
config.get("customProviders"),
|
|
8161
8161
|
config.getConfigDir()
|
|
8162
8162
|
);
|
|
8163
|
-
const { startHub } = await import("./hub-
|
|
8163
|
+
const { startHub } = await import("./hub-LTTKRGZC.js");
|
|
8164
8164
|
await startHub(
|
|
8165
8165
|
{
|
|
8166
8166
|
topic: topic ?? "",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
discussionToMessages,
|
|
4
4
|
persistDiscussion
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2QQKS56X.js";
|
|
6
|
+
import "./chunk-JMP3LJC2.js";
|
|
7
|
+
import "./chunk-KCEO2XJ4.js";
|
|
8
8
|
import "./chunk-IW3Q7AE5.js";
|
|
9
9
|
export {
|
|
10
10
|
discussionToMessages,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-6MJMHHRK.js";
|
|
6
|
+
import "./chunk-TAXIG7HH.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
import "./chunk-O3XSFPYH.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigManager
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L5PNAQ6O.js";
|
|
19
19
|
import "./chunk-5ULLIOVC.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-3KTSJ2EL.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/pr.ts
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import "./chunk-3ARPAVNV.js";
|
|
8
8
|
import {
|
|
9
9
|
persistDiscussion
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2QQKS56X.js";
|
|
11
11
|
import {
|
|
12
12
|
AuthManager,
|
|
13
13
|
TOKEN_EXPIRY_MS
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
scanDirTree,
|
|
24
24
|
scanProject,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5VPRZMZB.js";
|
|
27
27
|
import {
|
|
28
28
|
buildReviewPrompt,
|
|
29
29
|
buildSecurityReviewPrompt
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
truncateOutput,
|
|
68
68
|
undoStack,
|
|
69
69
|
updateMemoryApproval
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-E5RLXMSU.js";
|
|
71
71
|
import "./chunk-K3CF65QH.js";
|
|
72
72
|
import "./chunk-UUSRWSSX.js";
|
|
73
73
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -75,7 +75,7 @@ import "./chunk-BXP6YZ2P.js";
|
|
|
75
75
|
import {
|
|
76
76
|
SessionManager,
|
|
77
77
|
getContentText
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-JMP3LJC2.js";
|
|
79
79
|
import {
|
|
80
80
|
computeCost,
|
|
81
81
|
formatCost
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
buildDoctorReport,
|
|
85
85
|
formatDoctorReport,
|
|
86
86
|
loadContextFiles
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-5DTEEWYC.js";
|
|
88
88
|
import {
|
|
89
89
|
ProviderRegistry
|
|
90
90
|
} from "./chunk-QYQI7ZWK.js";
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
runTool,
|
|
103
103
|
setPluginEnabled,
|
|
104
104
|
trustPlugin
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-II6RZRTF.js";
|
|
106
106
|
import {
|
|
107
107
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
108
108
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
} from "./chunk-O3XSFPYH.js";
|
|
122
122
|
import {
|
|
123
123
|
ConfigManager
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-L5PNAQ6O.js";
|
|
125
125
|
import "./chunk-5ULLIOVC.js";
|
|
126
126
|
import {
|
|
127
127
|
formatGitContextForPrompt,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
getGitRoot
|
|
130
130
|
} from "./chunk-HOSJZMQS.js";
|
|
131
131
|
import "./chunk-4BKXL7SM.js";
|
|
132
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-AFT6VFMI.js";
|
|
133
133
|
import {
|
|
134
134
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
135
135
|
AUTHOR,
|
|
@@ -146,12 +146,12 @@ import {
|
|
|
146
146
|
SKILLS_DIR_NAME,
|
|
147
147
|
VERSION,
|
|
148
148
|
buildUserIdentityPrompt
|
|
149
|
-
} from "./chunk-
|
|
150
|
-
import "./chunk-
|
|
149
|
+
} from "./chunk-3KTSJ2EL.js";
|
|
150
|
+
import "./chunk-5MYPIQ3Y.js";
|
|
151
151
|
import "./chunk-KHYD3WXE.js";
|
|
152
152
|
import {
|
|
153
153
|
scanString
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-KCEO2XJ4.js";
|
|
155
155
|
import {
|
|
156
156
|
atomicWriteFileSync
|
|
157
157
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -1593,7 +1593,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
1593
1593
|
async function handleTest(args, ctx) {
|
|
1594
1594
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1595
1595
|
try {
|
|
1596
|
-
const { executeTests } = await import("./run-tests-
|
|
1596
|
+
const { executeTests } = await import("./run-tests-G5BNTMWQ.js");
|
|
1597
1597
|
const argStr = args.join(" ").trim();
|
|
1598
1598
|
let testArgs = {};
|
|
1599
1599
|
if (argStr) {
|
|
@@ -3456,7 +3456,7 @@ ${entry.content}`;
|
|
|
3456
3456
|
return;
|
|
3457
3457
|
}
|
|
3458
3458
|
try {
|
|
3459
|
-
const { searchChatMemory, loadChatIndex } = await import("./chat-index-
|
|
3459
|
+
const { searchChatMemory, loadChatIndex } = await import("./chat-index-7HXBWQFH.js");
|
|
3460
3460
|
const loaded = loadChatIndex();
|
|
3461
3461
|
if (!loaded || loaded.idx.chunks.length === 0) {
|
|
3462
3462
|
this.send({ type: "memory_hits", query: q, hits: [], indexMissing: true });
|
|
@@ -3492,7 +3492,7 @@ ${entry.content}`;
|
|
|
3492
3492
|
}
|
|
3493
3493
|
async handleMemoryStatus() {
|
|
3494
3494
|
try {
|
|
3495
|
-
const { getChatIndexStatus } = await import("./chat-index-
|
|
3495
|
+
const { getChatIndexStatus } = await import("./chat-index-7HXBWQFH.js");
|
|
3496
3496
|
const s = getChatIndexStatus();
|
|
3497
3497
|
this.send({
|
|
3498
3498
|
type: "memory_status",
|
|
@@ -3517,7 +3517,7 @@ ${entry.content}`;
|
|
|
3517
3517
|
type: "info",
|
|
3518
3518
|
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"
|
|
3519
3519
|
});
|
|
3520
|
-
const { buildChatIndex } = await import("./chat-index-
|
|
3520
|
+
const { buildChatIndex } = await import("./chat-index-7HXBWQFH.js");
|
|
3521
3521
|
const stats = await buildChatIndex({
|
|
3522
3522
|
full,
|
|
3523
3523
|
onProgress: (p) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E5RLXMSU.js";
|
|
5
5
|
import "./chunk-K3CF65QH.js";
|
|
6
6
|
import "./chunk-UUSRWSSX.js";
|
|
7
7
|
import "./chunk-CKH4KQ4E.js";
|
|
8
8
|
import "./chunk-BXP6YZ2P.js";
|
|
9
9
|
import {
|
|
10
10
|
runTool
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-II6RZRTF.js";
|
|
12
12
|
import {
|
|
13
13
|
getDangerLevel,
|
|
14
14
|
schemaToJsonSchema
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
import "./chunk-5ULLIOVC.js";
|
|
17
17
|
import "./chunk-HOSJZMQS.js";
|
|
18
18
|
import "./chunk-4BKXL7SM.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-AFT6VFMI.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-3KTSJ2EL.js";
|
|
23
|
+
import "./chunk-5MYPIQ3Y.js";
|
|
24
24
|
import "./chunk-KHYD3WXE.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-KCEO2XJ4.js";
|
|
26
26
|
import "./chunk-IW3Q7AE5.js";
|
|
27
27
|
|
|
28
28
|
// src/mcp/server.ts
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E5RLXMSU.js";
|
|
7
7
|
import "./chunk-K3CF65QH.js";
|
|
8
8
|
import "./chunk-UUSRWSSX.js";
|
|
9
9
|
import "./chunk-CKH4KQ4E.js";
|
|
10
10
|
import "./chunk-BXP6YZ2P.js";
|
|
11
11
|
import {
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-II6RZRTF.js";
|
|
14
14
|
import {
|
|
15
15
|
getDangerLevel,
|
|
16
16
|
runLeanAgentLoop
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
import "./chunk-5ULLIOVC.js";
|
|
19
19
|
import "./chunk-HOSJZMQS.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-AFT6VFMI.js";
|
|
22
22
|
import {
|
|
23
23
|
SUBAGENT_ALLOWED_TOOLS
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-3KTSJ2EL.js";
|
|
25
|
+
import "./chunk-5MYPIQ3Y.js";
|
|
26
26
|
import "./chunk-KHYD3WXE.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-KCEO2XJ4.js";
|
|
28
28
|
import {
|
|
29
29
|
atomicWriteFileSync
|
|
30
30
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-E44DTERW.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L5PNAQ6O.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-3KTSJ2EL.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|
package/package.json
CHANGED
package/dist/chunk-B5TYJO7V.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/security/redactor.ts
|
|
4
|
-
var DEFAULT_PATTERNS = [
|
|
5
|
-
// password: xxx / password = xxx / password="xxx"
|
|
6
|
-
// Covers YAML / JSON / shell-ish / env-file forms.
|
|
7
|
-
{ kind: "password", regex: /\b(password|passwd|pwd)\s*[:=]\s*["']?([^\s"',;{}]{4,200})["']?/gi },
|
|
8
|
-
// PGPASSWORD=xxx (explicit bash env-var form, separate rule because no quotes usually)
|
|
9
|
-
{ kind: "pgpassword-env", regex: /\b(PGPASSWORD)=([^\s"']{4,200})/g },
|
|
10
|
-
// JDBC/PG/MySQL/Mongo connection strings with inline credentials
|
|
11
|
-
// postgresql://user:pass@host/db → redact pass
|
|
12
|
-
{ kind: "db-uri-password", regex: /(\b(?:postgres(?:ql)?|mysql|mongodb(?:\+srv)?|redis|amqp|mssql):\/\/[^:\s]+:)([^@\s]+)(@)/gi },
|
|
13
|
-
// Anthropic API keys
|
|
14
|
-
{ kind: "anthropic-key", regex: /(sk-ant-[a-zA-Z0-9_-]{90,})/g },
|
|
15
|
-
// L6 (v0.4.108): Zhipu / GLM API keys — `<24+ hex/base64-ish>.<32+>`
|
|
16
|
-
// Two segments separated by a dot, each safely identifiable by length
|
|
17
|
-
// and char class. Conservative on the lower bound so we don't eat
|
|
18
|
-
// version strings like `1.0.0` or filenames.
|
|
19
|
-
{ kind: "zhipu-key", regex: /\b([a-zA-Z0-9]{24,}\.[a-zA-Z0-9]{32,})\b/g },
|
|
20
|
-
// OpenAI / generic sk- keys — requires length ≥32 to avoid eating short identifiers
|
|
21
|
-
{ kind: "openai-key", regex: /(sk-(?:proj-)?[a-zA-Z0-9_-]{32,})/g },
|
|
22
|
-
// GitHub personal access tokens
|
|
23
|
-
{ kind: "github-pat", regex: /\b(ghp_[a-zA-Z0-9]{36})\b/g },
|
|
24
|
-
{ kind: "github-oauth", regex: /\b(gho_[a-zA-Z0-9]{36})\b/g },
|
|
25
|
-
{ kind: "github-install", regex: /\b(ghs_[a-zA-Z0-9]{36})\b/g },
|
|
26
|
-
// Slack tokens
|
|
27
|
-
{ kind: "slack-bot", regex: /\b(xoxb-\d+-\d+-[a-zA-Z0-9]+)\b/g },
|
|
28
|
-
{ kind: "slack-user", regex: /\b(xoxp-\d+-\d+-\d+-[a-zA-Z0-9]+)\b/g },
|
|
29
|
-
// AWS access key IDs (AKIA...) and secret access keys are context-dependent;
|
|
30
|
-
// we only catch the ID because secret key alone is indistinguishable from random base64.
|
|
31
|
-
{ kind: "aws-access-key-id", regex: /\b(AKIA[0-9A-Z]{16})\b/g },
|
|
32
|
-
// Google API keys
|
|
33
|
-
{ kind: "google-api-key", regex: /\b(AIza[0-9A-Za-z_-]{35})\b/g },
|
|
34
|
-
// Generic "api_key": "..." / "apiKey": "..." / api-key=xxx
|
|
35
|
-
{ kind: "api-key", regex: /\b(api[_-]?key)\s*[:=]\s*["']?([a-zA-Z0-9_\-.]{16,200})["']?/gi },
|
|
36
|
-
// Generic token: xxx (only when value looks token-shaped; avoids eating human prose)
|
|
37
|
-
{ kind: "token", regex: /\b(token|access[_-]?token|bearer[_-]?token)\s*[:=]\s*["']?([a-zA-Z0-9_\-.]{20,300})["']?/gi },
|
|
38
|
-
// Bearer <token> in Authorization headers
|
|
39
|
-
{ kind: "bearer", regex: /\b(Authorization:\s*Bearer\s+)([a-zA-Z0-9_\-.=]{20,500})/g },
|
|
40
|
-
// Private key PEM blocks — catch the header+footer together
|
|
41
|
-
// P2-PERF-02: PEM bodies use strict Base64 + =\n — narrowed char class avoids backtracking
|
|
42
|
-
{ kind: "private-key", regex: /-----BEGIN [A-Z ]*PRIVATE KEY-----[ \t\n\r]*[A-Za-z0-9+/=\n\r-]*[ \t\n\r]*-----END [A-Z ]*PRIVATE KEY-----/g }
|
|
43
|
-
];
|
|
44
|
-
var MAX_CUSTOM = 32;
|
|
45
|
-
var MAX_PATTERN_LEN = 500;
|
|
46
|
-
var SUSPICIOUS_REDOS = /\([^)]*[+*][^)]*\)\s*[+*{]/;
|
|
47
|
-
var MAX_REDACT_INPUT = 512e3;
|
|
48
|
-
function render(placeholder, kind) {
|
|
49
|
-
return placeholder.replace("{kind}", kind);
|
|
50
|
-
}
|
|
51
|
-
function redactString(input, options) {
|
|
52
|
-
if (!options.enabled || !input) return { redacted: input, hits: [] };
|
|
53
|
-
if (input.length > MAX_REDACT_INPUT) return { redacted: input, hits: [] };
|
|
54
|
-
const placeholder = options.placeholder ?? "[REDACTED:{kind}]";
|
|
55
|
-
const customSrcs = (options.customRegexes ?? []).slice(0, MAX_CUSTOM);
|
|
56
|
-
const patterns = [
|
|
57
|
-
...options.patterns ?? DEFAULT_PATTERNS,
|
|
58
|
-
...customSrcs.flatMap((src, i) => {
|
|
59
|
-
if (typeof src !== "string" || src.length === 0 || src.length > MAX_PATTERN_LEN) return [];
|
|
60
|
-
try {
|
|
61
|
-
const flags = src.match(/^\/.*\/([gimsuy]*)$/)?.[1] ?? "";
|
|
62
|
-
const body = src.replace(/^\/(.*)\/[gimsuy]*$/, "$1");
|
|
63
|
-
if (SUSPICIOUS_REDOS.test(body)) return [];
|
|
64
|
-
const regex = new RegExp(body, flags.includes("g") ? flags : flags + "g");
|
|
65
|
-
return [{ kind: `custom-${i}`, regex }];
|
|
66
|
-
} catch {
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
];
|
|
71
|
-
let redacted = input;
|
|
72
|
-
const hits = [];
|
|
73
|
-
for (const { kind, regex } of patterns) {
|
|
74
|
-
const rx = new RegExp(regex.source, regex.flags);
|
|
75
|
-
const captureCount = new RegExp(rx.source + "|").exec("").length - 1;
|
|
76
|
-
redacted = redacted.replace(rx, (...args) => {
|
|
77
|
-
const match = args[0];
|
|
78
|
-
const g1 = captureCount >= 1 ? args[1] : void 0;
|
|
79
|
-
const g2 = captureCount >= 2 ? args[2] : void 0;
|
|
80
|
-
const offset = args[1 + captureCount];
|
|
81
|
-
if (captureCount >= 2 && typeof g2 === "string") {
|
|
82
|
-
hits.push({ kind, start: offset + (g1?.length ?? 0), length: g2.length, secret: g2 });
|
|
83
|
-
return `${g1}${render(placeholder, kind)}`;
|
|
84
|
-
}
|
|
85
|
-
hits.push({ kind, start: offset, length: match.length, secret: g1 ?? match });
|
|
86
|
-
return render(placeholder, kind);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
return { redacted, hits };
|
|
90
|
-
}
|
|
91
|
-
function redactJson(value, options) {
|
|
92
|
-
if (!options.enabled) return { value, hits: [] };
|
|
93
|
-
const allHits = [];
|
|
94
|
-
function walk(v) {
|
|
95
|
-
if (typeof v === "string") {
|
|
96
|
-
const r = redactString(v, options);
|
|
97
|
-
allHits.push(...r.hits);
|
|
98
|
-
return r.redacted;
|
|
99
|
-
}
|
|
100
|
-
if (Array.isArray(v)) return v.map(walk);
|
|
101
|
-
if (v && typeof v === "object") {
|
|
102
|
-
const out = {};
|
|
103
|
-
for (const [k, vv] of Object.entries(v)) {
|
|
104
|
-
out[k] = walk(vv);
|
|
105
|
-
}
|
|
106
|
-
return out;
|
|
107
|
-
}
|
|
108
|
-
return v;
|
|
109
|
-
}
|
|
110
|
-
const redacted = walk(value);
|
|
111
|
-
return { value: redacted, hits: allHits };
|
|
112
|
-
}
|
|
113
|
-
function scanString(input, options) {
|
|
114
|
-
const { hits } = redactString(input, { ...options, enabled: true });
|
|
115
|
-
return hits;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export {
|
|
119
|
-
DEFAULT_PATTERNS,
|
|
120
|
-
redactString,
|
|
121
|
-
redactJson,
|
|
122
|
-
scanString
|
|
123
|
-
};
|