jinzd-ai-cli 0.4.270 → 0.4.271

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.
Files changed (33) hide show
  1. package/dist/{batch-IMLMUXJL.js → batch-FPDT2USZ.js} +2 -2
  2. package/dist/{chunk-PLFXDRNX.js → chunk-2RN4T4XD.js} +1 -1
  3. package/dist/{chunk-YHLTSZVH.js → chunk-4UNRDXZV.js} +8 -8
  4. package/dist/{chunk-JJVVCWO4.js → chunk-5JFRM47R.js} +1 -1
  5. package/dist/{chunk-X3JPBJ6C.js → chunk-BFPF3JF2.js} +6 -6
  6. package/dist/{chunk-75SPJKDY.js → chunk-FT3WS5PG.js} +1 -1
  7. package/dist/{chunk-TG4PF7FZ.js → chunk-OSYK6D4G.js} +1 -1
  8. package/dist/{chunk-M3GDYEUH.js → chunk-PDRAOFGI.js} +4 -4
  9. package/dist/{chunk-HOT76ATM.js → chunk-PG7O7N7D.js} +8 -8
  10. package/dist/{chunk-F26YTEMB.js → chunk-PMRU2CAF.js} +4 -4
  11. package/dist/{chunk-UDUE4DAE.js → chunk-RLAUMACS.js} +1 -1
  12. package/dist/{chunk-FXCDD7JS.js → chunk-RNDHIERN.js} +3 -3
  13. package/dist/{chunk-DIJIYWQE.js → chunk-V26ZMB3D.js} +11 -11
  14. package/dist/{chunk-BOMB6XCF.js → chunk-VPXNLE7E.js} +1 -1
  15. package/dist/chunk-XNFIYS7G.js +82 -0
  16. package/dist/{ci-HQVXWJ53.js → ci-VPN5RWCO.js} +4 -4
  17. package/dist/{ci-format-762IL4OM.js → ci-format-GKXVCVME.js} +2 -2
  18. package/dist/config-command-E5DHADEV.js +11 -0
  19. package/dist/{constants-4TPE3JSV.js → constants-Y43DJFGV.js} +1 -1
  20. package/dist/{doctor-cli-3ES6NFVL.js → doctor-cli-RZGZB2TF.js} +4 -4
  21. package/dist/electron-server.js +91 -23
  22. package/dist/{hub-QXRWPBJP.js → hub-FJWP6SDG.js} +1 -1
  23. package/dist/index.js +81 -97
  24. package/dist/{persistent-memory-F4JPWYZJ.js → persistent-memory-IR47JCTF.js} +3 -3
  25. package/dist/{persistent-memory-URIJJJ3N.js → persistent-memory-KX2R67AT.js} +2 -2
  26. package/dist/{pr-HVVHZOJ2.js → pr-NTQ3N4B4.js} +5 -5
  27. package/dist/{run-tests-UZG6SVJ5.js → run-tests-25CNXJ4N.js} +2 -2
  28. package/dist/{run-tests-WM7TMO2N.js → run-tests-UTES6HCT.js} +2 -2
  29. package/dist/{server-E5OBXT33.js → server-IGCCSX4B.js} +10 -10
  30. package/dist/{server-HPRLFLOI.js → server-R56CVHCM.js} +49 -52
  31. package/dist/{task-orchestrator-HJUUL55Y.js → task-orchestrator-MFYEKR2I.js} +12 -12
  32. package/dist/{usage-L3DUPHD6.js → usage-FHX7PQQH.js} +2 -2
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  sessionHasMeaningfulContent,
26
26
  setupProxy,
27
27
  stripRoutingTags
28
- } from "./chunk-X3JPBJ6C.js";
28
+ } from "./chunk-BFPF3JF2.js";
29
29
  import {
30
30
  CostTracker,
31
31
  computeCost,
@@ -33,16 +33,6 @@ import {
33
33
  getPricing,
34
34
  setCostCurrency
35
35
  } from "./chunk-JT6UN5C6.js";
36
- import {
37
- buildReviewPrompt,
38
- buildSecurityReviewPrompt
39
- } from "./chunk-HLWUDRBO.js";
40
- import {
41
- NO_THINKING,
42
- applyThinkingFlag,
43
- chatParamsFrom,
44
- thinkingParamsFor
45
- } from "./chunk-6YZEZFX5.js";
46
36
  import {
47
37
  ToolExecutor,
48
38
  ToolRegistry,
@@ -64,7 +54,23 @@ import {
64
54
  setMaxOutputCap,
65
55
  spawnAgentContext,
66
56
  undoStack
67
- } from "./chunk-DIJIYWQE.js";
57
+ } from "./chunk-V26ZMB3D.js";
58
+ import {
59
+ buildReviewPrompt,
60
+ buildSecurityReviewPrompt
61
+ } from "./chunk-HLWUDRBO.js";
62
+ import {
63
+ NO_THINKING,
64
+ applyThinkingFlag,
65
+ chatParamsFrom,
66
+ thinkingParamsFor
67
+ } from "./chunk-6YZEZFX5.js";
68
+ import {
69
+ buildChatIndex,
70
+ clearChatIndex,
71
+ getChatIndexStatus,
72
+ searchChatMemory
73
+ } from "./chunk-6RPGQ5CG.js";
68
74
  import {
69
75
  addMemoryEntry,
70
76
  backupMemoryStore,
@@ -89,11 +95,12 @@ import {
89
95
  touchMemoryReferences,
90
96
  updateMemoryApproval,
91
97
  updateMemoryEntry
92
- } from "./chunk-YHLTSZVH.js";
98
+ } from "./chunk-4UNRDXZV.js";
93
99
  import "./chunk-GLSR2NR3.js";
94
100
  import "./chunk-UUSRWSSX.js";
95
101
  import "./chunk-CKH4KQ4E.js";
96
102
  import "./chunk-BXP6YZ2P.js";
103
+ import "./chunk-KHYD3WXE.js";
97
104
  import {
98
105
  initTheme,
99
106
  theme
@@ -102,19 +109,17 @@ import {
102
109
  SessionManager,
103
110
  getContentText
104
111
  } from "./chunk-OBULDJSU.js";
112
+ import "./chunk-NYNSYLFY.js";
113
+ import {
114
+ DEFAULT_PATTERNS,
115
+ scanString
116
+ } from "./chunk-B5TYJO7V.js";
105
117
  import {
106
118
  buildDoctorReport,
107
119
  formatDoctorReport,
108
120
  loadContextFiles,
109
121
  writeCrashLog
110
- } from "./chunk-HOT76ATM.js";
111
- import {
112
- ProviderRegistry,
113
- listBuiltInProviderMetadata
114
- } from "./chunk-AUEX6RNY.js";
115
- import {
116
- ConfigManager
117
- } from "./chunk-F26YTEMB.js";
122
+ } from "./chunk-PG7O7N7D.js";
118
123
  import {
119
124
  describePlugin,
120
125
  getActivePluginAssets,
@@ -131,7 +136,14 @@ import {
131
136
  trustHook,
132
137
  trustPlugin,
133
138
  untrustHook
134
- } from "./chunk-M3GDYEUH.js";
139
+ } from "./chunk-PDRAOFGI.js";
140
+ import {
141
+ ProviderRegistry,
142
+ listBuiltInProviderMetadata
143
+ } from "./chunk-AUEX6RNY.js";
144
+ import {
145
+ ConfigManager
146
+ } from "./chunk-PMRU2CAF.js";
135
147
  import {
136
148
  CONTENT_ONLY_STREAM_REMINDER,
137
149
  TEE_FINAL_USER_NUDGE,
@@ -162,10 +174,16 @@ import {
162
174
  getGitContext,
163
175
  getGitRoot
164
176
  } from "./chunk-HOSJZMQS.js";
177
+ import {
178
+ atomicWriteFileSync
179
+ } from "./chunk-IW3Q7AE5.js";
180
+ import {
181
+ applyConfigCommand
182
+ } from "./chunk-XNFIYS7G.js";
165
183
  import {
166
184
  fileCheckpoints
167
185
  } from "./chunk-4BKXL7SM.js";
168
- import "./chunk-TG4PF7FZ.js";
186
+ import "./chunk-OSYK6D4G.js";
169
187
  import {
170
188
  AGENTIC_BEHAVIOR_GUIDELINE,
171
189
  AUTHOR,
@@ -183,22 +201,7 @@ import {
183
201
  SKILLS_DIR_NAME,
184
202
  VERSION,
185
203
  buildUserIdentityPrompt
186
- } from "./chunk-75SPJKDY.js";
187
- import {
188
- buildChatIndex,
189
- clearChatIndex,
190
- getChatIndexStatus,
191
- searchChatMemory
192
- } from "./chunk-6RPGQ5CG.js";
193
- import "./chunk-KHYD3WXE.js";
194
- import "./chunk-NYNSYLFY.js";
195
- import {
196
- DEFAULT_PATTERNS,
197
- scanString
198
- } from "./chunk-B5TYJO7V.js";
199
- import {
200
- atomicWriteFileSync
201
- } from "./chunk-IW3Q7AE5.js";
204
+ } from "./chunk-FT3WS5PG.js";
202
205
 
203
206
  // src/index.ts
204
207
  import { program } from "commander";
@@ -1404,7 +1407,7 @@ No tools match "${filter}".
1404
1407
  const { join: join6 } = await import("path");
1405
1408
  const { existsSync: existsSync6 } = await import("fs");
1406
1409
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1407
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-4TPE3JSV.js");
1410
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-Y43DJFGV.js");
1408
1411
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1409
1412
  const cwd = process.cwd();
1410
1413
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -1615,57 +1618,24 @@ function createSecurityCommands() {
1615
1618
  description: "Configuration: wizard, get/set values, show all",
1616
1619
  usage: "/config [set <path> <value> | get <path> | show]",
1617
1620
  async execute(args, ctx) {
1618
- const sub = args[0]?.toLowerCase();
1619
- const config = ctx.config;
1620
- if (!sub) {
1621
+ const outcome = applyConfigCommand(args, ctx.config);
1622
+ if (outcome.action === "wizard") {
1621
1623
  await ctx.runSetupWizard();
1622
1624
  return;
1623
1625
  }
1624
- if (sub === "show") {
1625
- const masked = config.toJSON();
1626
- if (masked.apiKeys && typeof masked.apiKeys === "object") {
1627
- const keys = masked.apiKeys;
1628
- for (const key of Object.keys(keys)) {
1629
- const val = keys[key];
1630
- if (typeof val === "string" && val.length > 8) {
1631
- keys[key] = val.slice(0, 4) + "****" + val.slice(-4);
1632
- }
1633
- }
1634
- }
1635
- console.log(JSON.stringify(masked, null, 2));
1626
+ if (outcome.action === "show") {
1627
+ console.log(outcome.json);
1636
1628
  return;
1637
1629
  }
1638
- if (sub === "get") {
1639
- const path = args[1]?.trim();
1640
- if (!path) {
1641
- console.log(theme.warning("Usage: /config get <path> (e.g. ui.theme)"));
1642
- return;
1643
- }
1644
- const val = config.getByPath(path);
1645
- if (val === void 0) {
1646
- console.log(theme.dim(` ${path} = (undefined)`));
1647
- } else {
1648
- console.log(theme.dim(` ${path} = `) + chalk2.white(typeof val === "object" ? JSON.stringify(val) : String(val)));
1649
- }
1630
+ if (outcome.isError) {
1631
+ console.log(theme.warning(` ${outcome.summary}`));
1650
1632
  return;
1651
1633
  }
1652
- if (sub === "set") {
1653
- const path = args[1]?.trim();
1654
- const value = args.slice(2).join(" ").trim();
1655
- if (!path || value === "") {
1656
- console.log(theme.warning("Usage: /config set <path> <value> (e.g. ui.theme light)"));
1657
- return;
1658
- }
1659
- const FORBIDDEN_KEYS = ["__proto__", "constructor", "prototype"];
1660
- if (path.split(".").some((k) => FORBIDDEN_KEYS.includes(k))) {
1661
- console.log(theme.error(` \u2717 Forbidden path segment: ${path}`));
1662
- return;
1663
- }
1664
- config.setByPath(path, value);
1665
- console.log(theme.success(` \u2713 Set ${path} = ${value}`));
1634
+ if (outcome.changed) {
1635
+ console.log(theme.success(` \u2713 ${outcome.summary}`));
1666
1636
  return;
1667
1637
  }
1668
- console.log(theme.warning("Usage: /config [set <path> <value> | get <path> | show]"));
1638
+ console.log(theme.dim(` ${outcome.summary}`));
1669
1639
  }
1670
1640
  },
1671
1641
  {
@@ -2357,7 +2327,7 @@ function createReviewCommands() {
2357
2327
  usage: "/test [command|filter]",
2358
2328
  async execute(args, ctx) {
2359
2329
  try {
2360
- const { executeTests } = await import("./run-tests-WM7TMO2N.js");
2330
+ const { executeTests } = await import("./run-tests-UTES6HCT.js");
2361
2331
  const argStr = args.join(" ").trim();
2362
2332
  let testArgs = {};
2363
2333
  if (argStr) {
@@ -7521,12 +7491,26 @@ program.option("--provider <name>", `AI provider to use (${builtInProviderIds},
7521
7491
  await startRepl(options);
7522
7492
  }
7523
7493
  });
7524
- program.command("config").description("Configure API keys and preferences").action(async () => {
7494
+ program.command("config [action] [path] [value...]").description("Configure API keys and preferences: wizard (no args) | show | get <path> | set <path> <value>").action(async (action, path, valueParts) => {
7525
7495
  const config = new ConfigManager();
7526
- const { SetupWizard } = await import("./setup-wizard-S55ICNHH.js");
7527
- const wizard = new SetupWizard(config);
7528
- await wizard.runFull();
7529
- console.log("Configuration saved.");
7496
+ if (!action) {
7497
+ const { SetupWizard } = await import("./setup-wizard-S55ICNHH.js");
7498
+ const wizard = new SetupWizard(config);
7499
+ await wizard.runFull();
7500
+ console.log("Configuration saved.");
7501
+ return;
7502
+ }
7503
+ const { applyConfigCommand: applyConfigCommand2 } = await import("./config-command-E5DHADEV.js");
7504
+ const outcome = applyConfigCommand2([action, ...path ? [path] : [], ...valueParts ?? []], config);
7505
+ if (outcome.action === "show") {
7506
+ console.log(outcome.json);
7507
+ return;
7508
+ }
7509
+ if (outcome.isError) {
7510
+ console.error(outcome.summary);
7511
+ process.exit(1);
7512
+ }
7513
+ console.log(outcome.changed ? `\u2713 ${outcome.summary}` : outcome.summary);
7530
7514
  });
7531
7515
  program.command("providers").description("List all AI providers and their configuration status").action(async () => {
7532
7516
  const config = new ConfigManager();
@@ -7562,7 +7546,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7562
7546
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7563
7547
  process.exit(1);
7564
7548
  }
7565
- const { startWebServer } = await import("./server-HPRLFLOI.js");
7549
+ const { startWebServer } = await import("./server-R56CVHCM.js");
7566
7550
  await startWebServer({ port, host: options.host });
7567
7551
  });
7568
7552
  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) => {
@@ -7729,11 +7713,11 @@ program.command("sessions").description("List recent conversation sessions").opt
7729
7713
  console.log(footer + "\n");
7730
7714
  });
7731
7715
  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) => {
7732
- const { runUsageCli } = await import("./usage-L3DUPHD6.js");
7716
+ const { runUsageCli } = await import("./usage-FHX7PQQH.js");
7733
7717
  await runUsageCli(options);
7734
7718
  });
7735
7719
  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) => {
7736
- const { runDoctorCli } = await import("./doctor-cli-3ES6NFVL.js");
7720
+ const { runDoctorCli } = await import("./doctor-cli-RZGZB2TF.js");
7737
7721
  const argv = process.argv.slice(2);
7738
7722
  await runDoctorCli({
7739
7723
  json: !!options.json || argv.includes("--json"),
@@ -7742,7 +7726,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
7742
7726
  });
7743
7727
  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) => {
7744
7728
  try {
7745
- const batch = await import("./batch-IMLMUXJL.js");
7729
+ const batch = await import("./batch-FPDT2USZ.js");
7746
7730
  switch (action) {
7747
7731
  case "submit":
7748
7732
  if (!arg) {
@@ -7785,7 +7769,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7785
7769
  }
7786
7770
  });
7787
7771
  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) => {
7788
- const { startMcpServer } = await import("./server-E5OBXT33.js");
7772
+ const { startMcpServer } = await import("./server-IGCCSX4B.js");
7789
7773
  await startMcpServer({
7790
7774
  allowDestructive: !!options.allowDestructive,
7791
7775
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7798,7 +7782,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7798
7782
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
7799
7783
  process.exit(1);
7800
7784
  }
7801
- const { runPrCli } = await import("./pr-HVVHZOJ2.js");
7785
+ const { runPrCli } = await import("./pr-NTQ3N4B4.js");
7802
7786
  const result = await runPrCli({
7803
7787
  action,
7804
7788
  target,
@@ -7818,8 +7802,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7818
7802
  process.exit(result.exitCode);
7819
7803
  });
7820
7804
  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) => {
7821
- const { runCi } = await import("./ci-HQVXWJ53.js");
7822
- const { formatCiResult } = await import("./ci-format-762IL4OM.js");
7805
+ const { runCi } = await import("./ci-VPN5RWCO.js");
7806
+ const { formatCiResult } = await import("./ci-format-GKXVCVME.js");
7823
7807
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
7824
7808
  if (formats > 1) {
7825
7809
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -7977,7 +7961,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7977
7961
  config.get("customProviders"),
7978
7962
  config.getConfigDir()
7979
7963
  );
7980
- const { startHub } = await import("./hub-QXRWPBJP.js");
7964
+ const { startHub } = await import("./hub-FJWP6SDG.js");
7981
7965
  await startHub(
7982
7966
  {
7983
7967
  topic: topic ?? "",
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-YHLTSZVH.js";
32
- import "./chunk-HOSJZMQS.js";
33
- import "./chunk-75SPJKDY.js";
31
+ } from "./chunk-4UNRDXZV.js";
34
32
  import "./chunk-B5TYJO7V.js";
33
+ import "./chunk-HOSJZMQS.js";
35
34
  import "./chunk-IW3Q7AE5.js";
35
+ import "./chunk-FT3WS5PG.js";
36
36
  export {
37
37
  addMemoryEntry,
38
38
  backupMemoryStore,
@@ -27,9 +27,9 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-BOMB6XCF.js";
30
+ } from "./chunk-VPXNLE7E.js";
31
31
  import "./chunk-YVTASHS5.js";
32
- import "./chunk-JJVVCWO4.js";
32
+ import "./chunk-5JFRM47R.js";
33
33
  import "./chunk-6BUTA5VW.js";
34
34
  export {
35
35
  addMemoryEntry,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-FXCDD7JS.js";
6
- import "./chunk-PLFXDRNX.js";
5
+ } from "./chunk-RNDHIERN.js";
6
+ import "./chunk-2RN4T4XD.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -17,13 +17,13 @@ import {
17
17
  } from "./chunk-AUEX6RNY.js";
18
18
  import {
19
19
  ConfigManager
20
- } from "./chunk-F26YTEMB.js";
20
+ } from "./chunk-PMRU2CAF.js";
21
21
  import "./chunk-3OBY7WSS.js";
22
22
  import "./chunk-TU3L3PW7.js";
23
+ import "./chunk-IW3Q7AE5.js";
23
24
  import {
24
25
  VERSION
25
- } from "./chunk-75SPJKDY.js";
26
- import "./chunk-IW3Q7AE5.js";
26
+ } from "./chunk-FT3WS5PG.js";
27
27
 
28
28
  // src/cli/pr.ts
29
29
  import { execFileSync } from "child_process";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-UDUE4DAE.js";
5
- import "./chunk-JJVVCWO4.js";
4
+ } from "./chunk-RLAUMACS.js";
5
+ import "./chunk-5JFRM47R.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-TG4PF7FZ.js";
6
- import "./chunk-75SPJKDY.js";
5
+ } from "./chunk-OSYK6D4G.js";
6
+ import "./chunk-FT3WS5PG.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-DIJIYWQE.js";
5
- import "./chunk-YHLTSZVH.js";
4
+ } from "./chunk-V26ZMB3D.js";
5
+ import "./chunk-6RPGQ5CG.js";
6
+ import "./chunk-4UNRDXZV.js";
6
7
  import "./chunk-GLSR2NR3.js";
7
8
  import "./chunk-UUSRWSSX.js";
8
9
  import "./chunk-CKH4KQ4E.js";
9
10
  import "./chunk-BXP6YZ2P.js";
11
+ import "./chunk-KHYD3WXE.js";
10
12
  import "./chunk-5C76XDDF.js";
13
+ import "./chunk-NYNSYLFY.js";
14
+ import "./chunk-B5TYJO7V.js";
11
15
  import {
12
16
  runTool
13
- } from "./chunk-M3GDYEUH.js";
17
+ } from "./chunk-PDRAOFGI.js";
14
18
  import {
15
19
  getDangerLevel,
16
20
  schemaToJsonSchema
17
21
  } from "./chunk-3OBY7WSS.js";
18
22
  import "./chunk-TU3L3PW7.js";
19
23
  import "./chunk-HOSJZMQS.js";
24
+ import "./chunk-IW3Q7AE5.js";
20
25
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-TG4PF7FZ.js";
26
+ import "./chunk-OSYK6D4G.js";
22
27
  import {
23
28
  VERSION
24
- } from "./chunk-75SPJKDY.js";
25
- import "./chunk-6RPGQ5CG.js";
26
- import "./chunk-KHYD3WXE.js";
27
- import "./chunk-NYNSYLFY.js";
28
- import "./chunk-B5TYJO7V.js";
29
- import "./chunk-IW3Q7AE5.js";
29
+ } from "./chunk-FT3WS5PG.js";
30
30
 
31
31
  // src/mcp/server.ts
32
32
  import { createInterface } from "readline";
@@ -5,13 +5,13 @@ import {
5
5
  resolveRoleProviders
6
6
  } from "./chunk-23SJVOQD.js";
7
7
  import "./chunk-VOIOUJXI.js";
8
- import {
9
- persistDiscussion
10
- } from "./chunk-JQXXPTWL.js";
11
8
  import {
12
9
  AuthManager,
13
10
  TOKEN_EXPIRY_MS
14
11
  } from "./chunk-RYQBBEMM.js";
12
+ import {
13
+ persistDiscussion
14
+ } from "./chunk-JQXXPTWL.js";
15
15
  import {
16
16
  AUTO_COMPACT_INSTRUCTION,
17
17
  McpManager,
@@ -34,7 +34,7 @@ import {
34
34
  scanProject,
35
35
  setupProxy,
36
36
  stripRoutingTags
37
- } from "./chunk-X3JPBJ6C.js";
37
+ } from "./chunk-BFPF3JF2.js";
38
38
  import {
39
39
  CNY_PER_USD,
40
40
  CostTracker,
@@ -44,13 +44,6 @@ import {
44
44
  getPricing,
45
45
  setCostCurrency
46
46
  } from "./chunk-JT6UN5C6.js";
47
- import {
48
- buildReviewPrompt,
49
- buildSecurityReviewPrompt
50
- } from "./chunk-HLWUDRBO.js";
51
- import {
52
- thinkingParamsFor
53
- } from "./chunk-6YZEZFX5.js";
54
47
  import {
55
48
  ToolExecutor,
56
49
  ToolRegistry,
@@ -82,7 +75,15 @@ import {
82
75
  spawnAgentContext,
83
76
  truncateOutput,
84
77
  undoStack
85
- } from "./chunk-DIJIYWQE.js";
78
+ } from "./chunk-V26ZMB3D.js";
79
+ import {
80
+ buildReviewPrompt,
81
+ buildSecurityReviewPrompt
82
+ } from "./chunk-HLWUDRBO.js";
83
+ import {
84
+ thinkingParamsFor
85
+ } from "./chunk-6YZEZFX5.js";
86
+ import "./chunk-6RPGQ5CG.js";
86
87
  import {
87
88
  addMemoryEntry,
88
89
  clearMemoryEntries,
@@ -97,27 +98,26 @@ import {
97
98
  parseWritableScope,
98
99
  updateMemoryApproval,
99
100
  updateMemoryEntry
100
- } from "./chunk-YHLTSZVH.js";
101
+ } from "./chunk-4UNRDXZV.js";
101
102
  import "./chunk-GLSR2NR3.js";
102
103
  import "./chunk-UUSRWSSX.js";
103
104
  import "./chunk-CKH4KQ4E.js";
104
105
  import "./chunk-BXP6YZ2P.js";
106
+ import "./chunk-KHYD3WXE.js";
105
107
  import "./chunk-5C76XDDF.js";
106
108
  import {
107
109
  SessionManager,
108
110
  getContentText
109
111
  } from "./chunk-OBULDJSU.js";
112
+ import "./chunk-NYNSYLFY.js";
113
+ import {
114
+ scanString
115
+ } from "./chunk-B5TYJO7V.js";
110
116
  import {
111
117
  buildDoctorReport,
112
118
  formatDoctorReport,
113
119
  loadContextFiles
114
- } from "./chunk-HOT76ATM.js";
115
- import {
116
- ProviderRegistry
117
- } from "./chunk-AUEX6RNY.js";
118
- import {
119
- ConfigManager
120
- } from "./chunk-F26YTEMB.js";
120
+ } from "./chunk-PG7O7N7D.js";
121
121
  import {
122
122
  describePlugin,
123
123
  getActivePluginAssets,
@@ -132,7 +132,13 @@ import {
132
132
  runTool,
133
133
  setPluginEnabled,
134
134
  trustPlugin
135
- } from "./chunk-M3GDYEUH.js";
135
+ } from "./chunk-PDRAOFGI.js";
136
+ import {
137
+ ProviderRegistry
138
+ } from "./chunk-AUEX6RNY.js";
139
+ import {
140
+ ConfigManager
141
+ } from "./chunk-PMRU2CAF.js";
136
142
  import {
137
143
  CONTENT_ONLY_STREAM_REMINDER,
138
144
  TEE_FINAL_USER_NUDGE,
@@ -156,8 +162,15 @@ import {
156
162
  getGitContext,
157
163
  getGitRoot
158
164
  } from "./chunk-HOSJZMQS.js";
165
+ import {
166
+ atomicWriteFileSync
167
+ } from "./chunk-IW3Q7AE5.js";
168
+ import {
169
+ applyConfigCommand,
170
+ maskConfigSecrets
171
+ } from "./chunk-XNFIYS7G.js";
159
172
  import "./chunk-4BKXL7SM.js";
160
- import "./chunk-TG4PF7FZ.js";
173
+ import "./chunk-OSYK6D4G.js";
161
174
  import {
162
175
  AGENTIC_BEHAVIOR_GUIDELINE,
163
176
  AUTHOR,
@@ -173,16 +186,7 @@ import {
173
186
  SKILLS_DIR_NAME,
174
187
  VERSION,
175
188
  buildUserIdentityPrompt
176
- } from "./chunk-75SPJKDY.js";
177
- import "./chunk-6RPGQ5CG.js";
178
- import "./chunk-KHYD3WXE.js";
179
- import "./chunk-NYNSYLFY.js";
180
- import {
181
- scanString
182
- } from "./chunk-B5TYJO7V.js";
183
- import {
184
- atomicWriteFileSync
185
- } from "./chunk-IW3Q7AE5.js";
189
+ } from "./chunk-FT3WS5PG.js";
186
190
 
187
191
  // src/web/server.ts
188
192
  import express from "express";
@@ -853,7 +857,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
853
857
  Cost: ${formatCost(cost)}` : "";
854
858
  let memoryLine = "";
855
859
  try {
856
- const { countPendingMemories } = await import("./persistent-memory-F4JPWYZJ.js");
860
+ const { countPendingMemories } = await import("./persistent-memory-IR47JCTF.js");
857
861
  const pending = countPendingMemories(ctx.config.getConfigDir());
858
862
  if (pending > 0) memoryLine = `
859
863
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1666,7 +1670,7 @@ async function handleTest(args, ctx) {
1666
1670
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1667
1671
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1668
1672
  }
1669
- const runTests = ctx.runTests ?? (await import("./run-tests-WM7TMO2N.js")).executeTests;
1673
+ const runTests = ctx.runTests ?? (await import("./run-tests-UTES6HCT.js")).executeTests;
1670
1674
  const report = await runTests(testArgs);
1671
1675
  ctx.send({ type: "info", message: report });
1672
1676
  } catch (err) {
@@ -1924,7 +1928,7 @@ async function handleMemory(args, ctx) {
1924
1928
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
1925
1929
  } else if (sub === "export") {
1926
1930
  if (args[1] === "md") {
1927
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-F4JPWYZJ.js");
1931
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-IR47JCTF.js");
1928
1932
  ctx.send({
1929
1933
  type: "export_data",
1930
1934
  format: "md",
@@ -1978,26 +1982,19 @@ It will be included in AI context for subsequent messages.` });
1978
1982
 
1979
1983
  // src/web/commands/security-commands.ts
1980
1984
  async function handleConfig(args, ctx) {
1981
- const sub = args[0];
1982
- if (sub === "show" || !sub) {
1983
- ctx.send({ type: "info", message: `\u2699\uFE0F Configuration:
1985
+ const outcome = applyConfigCommand(args, ctx.config);
1986
+ if (outcome.action === "show" || outcome.action === "wizard") {
1987
+ const json = outcome.json ?? JSON.stringify(maskConfigSecrets(ctx.config.toJSON()), null, 2);
1988
+ ctx.send({ type: "info", message: `\u2699\uFE0F Configuration (secrets masked):
1984
1989
  \`\`\`json
1985
- ${ctx.config.toFormattedJSON()}
1990
+ ${json}
1986
1991
  \`\`\`` });
1987
- } else if (sub === "get" && args[1]) {
1988
- const val = ctx.config.getByPath(args[1]);
1989
- const display = typeof val === "object" ? JSON.stringify(val, null, 2) : String(val ?? "undefined");
1990
- ctx.send({ type: "info", message: `${args[1]} = ${display}` });
1991
- } else if (sub === "set" && args[1] && args[2] !== void 0) {
1992
- try {
1993
- ctx.config.setByPath(args[1], args.slice(2).join(" "));
1994
- ctx.send({ type: "info", message: `\u2713 ${args[1]} = ${args.slice(2).join(" ")}` });
1995
- } catch (err) {
1996
- ctx.send({ type: "error", message: `Config error: ${err.message}` });
1997
- }
1998
- } else {
1999
- ctx.send({ type: "info", message: "Usage: /config [show] | /config get <key> | /config set <key> <value>" });
1992
+ return;
2000
1993
  }
1994
+ ctx.send({
1995
+ type: outcome.isError ? "error" : "info",
1996
+ message: (outcome.changed ? "\u2713 " : "") + (outcome.summary ?? "")
1997
+ });
2001
1998
  }
2002
1999
  async function handleDoctor(_args, ctx) {
2003
2000
  const report = buildDoctorReport({