jinzd-ai-cli 0.4.229 → 0.4.230

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 (32) hide show
  1. package/dist/{batch-XZHTNJXJ.js → batch-T74D2CCK.js} +3 -3
  2. package/dist/{chunk-DEHVRQWW.js → chunk-4KM53GLG.js} +1 -1
  3. package/dist/{chunk-EEQHP4GK.js → chunk-62R7CACG.js} +101 -302
  4. package/dist/{chunk-B3POS7LB.js → chunk-6GSDDDEO.js} +1 -1
  5. package/dist/{chunk-QCGKCNBX.js → chunk-7I4GGVIS.js} +1 -1
  6. package/dist/{chunk-FEVOW3NQ.js → chunk-DKPHVQUA.js} +1 -1
  7. package/dist/{chunk-DMF6UHO6.js → chunk-F2DUNYGY.js} +3 -23
  8. package/dist/{chunk-TEXAIWUJ.js → chunk-ITEGK3IN.js} +1 -1
  9. package/dist/{chunk-PQLRX7US.js → chunk-LMKCS5XH.js} +4 -4
  10. package/dist/{chunk-AEXWMIRE.js → chunk-S6SFZP3G.js} +1 -1
  11. package/dist/{chunk-QFOJ4GXC.js → chunk-SARJYCDV.js} +4 -4
  12. package/dist/{chunk-SJ36SUG7.js → chunk-SKUNYJDW.js} +2 -2
  13. package/dist/{chunk-AXIMNQSY.js → chunk-T3A74XGG.js} +1 -1
  14. package/dist/{chunk-QYQCCIBT.js → chunk-ZWU7FWHO.js} +22 -3
  15. package/dist/{ci-ZCVDKFXY.js → ci-ADQTAYOZ.js} +5 -5
  16. package/dist/{ci-format-CKXDFTN3.js → ci-format-KZSTHIEW.js} +2 -2
  17. package/dist/{constants-J2MSGNFA.js → constants-JTHN5JSQ.js} +1 -1
  18. package/dist/{doctor-cli-3VNTECP2.js → doctor-cli-XTIL3RTQ.js} +5 -5
  19. package/dist/electron-server.js +146 -355
  20. package/dist/{hub-LIH5JEI7.js → hub-BHHNMBCY.js} +2 -2
  21. package/dist/index.js +36 -49
  22. package/dist/{persist-XUXIPYUU.js → persist-I3JI27OK.js} +2 -2
  23. package/dist/{pr-HY2QCVUY.js → pr-NUHU64NS.js} +5 -5
  24. package/dist/{run-tests-WBGQI5V7.js → run-tests-HZMY436A.js} +2 -2
  25. package/dist/{run-tests-QVXDTJ3O.js → run-tests-M45ZJPR6.js} +1 -1
  26. package/dist/{server-5RXWIX4I.js → server-Q7MNZB4X.js} +4 -4
  27. package/dist/{server-LYTXYK6Y.js → server-RCAFE2LO.js} +32 -39
  28. package/dist/{task-orchestrator-FA4KOVD2.js → task-orchestrator-IVSLED6U.js} +4 -4
  29. package/dist/{usage-EHV6YVGH.js → usage-KNMT35C2.js} +2 -2
  30. package/dist/web/client/app.js +13 -5
  31. package/dist/web/client/index.html +14 -6
  32. package/package.json +1 -1
@@ -139,7 +139,7 @@ ${content}`);
139
139
  const state = await runDiscussion(config, providers, options.topic);
140
140
  if (options.save !== false && state.messages.length > 0) {
141
141
  try {
142
- const { persistDiscussion } = await import("./persist-XUXIPYUU.js");
142
+ const { persistDiscussion } = await import("./persist-I3JI27OK.js");
143
143
  const { path } = await persistDiscussion(state, configManager, defaultProvider, defaultModel);
144
144
  console.log(chalk.dim(`
145
145
  \u{1F4BE} Saved to history \u2014 open it in the Web UI and hit \u{1F3AC} to replay.
@@ -154,7 +154,7 @@ ${content}`);
154
154
  }
155
155
  }
156
156
  async function runTaskMode(config, providers, configManager, topic) {
157
- const { TaskOrchestrator } = await import("./task-orchestrator-FA4KOVD2.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-IVSLED6U.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  scanProject,
15
15
  sessionHasMeaningfulContent,
16
16
  setupProxy
17
- } from "./chunk-SJ36SUG7.js";
17
+ } from "./chunk-SKUNYJDW.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-DMF6UHO6.js";
55
+ } from "./chunk-F2DUNYGY.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-QYQCCIBT.js";
63
+ } from "./chunk-ZWU7FWHO.js";
64
64
  import {
65
65
  CostTracker
66
66
  } from "./chunk-YVMACMXW.js";
@@ -74,10 +74,10 @@ import {
74
74
  formatDoctorReport,
75
75
  loadContextFiles,
76
76
  writeCrashLog
77
- } from "./chunk-QFOJ4GXC.js";
77
+ } from "./chunk-SARJYCDV.js";
78
78
  import {
79
79
  ProviderRegistry
80
- } from "./chunk-EEQHP4GK.js";
80
+ } from "./chunk-62R7CACG.js";
81
81
  import {
82
82
  describePlugin,
83
83
  getActivePluginAssets,
@@ -94,7 +94,7 @@ import {
94
94
  trustHook,
95
95
  trustPlugin,
96
96
  untrustHook
97
- } from "./chunk-TEXAIWUJ.js";
97
+ } from "./chunk-ITEGK3IN.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-ODYTXQ26.js";
117
117
  import {
118
118
  ConfigManager
119
- } from "./chunk-FEVOW3NQ.js";
119
+ } from "./chunk-DKPHVQUA.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-AEXWMIRE.js";
133
+ import "./chunk-S6SFZP3G.js";
134
134
  import {
135
135
  AGENTIC_BEHAVIOR_GUIDELINE,
136
136
  AUTHOR,
@@ -149,7 +149,7 @@ import {
149
149
  SKILLS_DIR_NAME,
150
150
  VERSION,
151
151
  buildUserIdentityPrompt
152
- } from "./chunk-B3POS7LB.js";
152
+ } from "./chunk-6GSDDDEO.js";
153
153
  import {
154
154
  buildChatIndex,
155
155
  clearChatIndex,
@@ -1048,8 +1048,7 @@ function createMiscCommands() {
1048
1048
  title: "Tools, context & memory",
1049
1049
  rows: [
1050
1050
  ["/tools", "List all AI tools available"],
1051
- ["/plugins", "Show plugin directory and loaded plugins"],
1052
- ["/plugin [list|install|enable|disable|inspect|trust]", "Manage package plugins"],
1051
+ ["/plugin [list|install|enable|disable|inspect|trust]", "Manage plugins (package + legacy JS)"],
1053
1052
  ["/mcp [reconnect [serverId]|trust-project]", "Show MCP server connections and tools"],
1054
1053
  ["/skill [name|off|list]", "Manage agent skills (reusable prompt packs)"],
1055
1054
  ["/context", "Show or reload hierarchical context layers"],
@@ -1717,32 +1716,9 @@ No tools match "${filter}".
1717
1716
  `));
1718
1717
  }
1719
1718
  },
1720
- {
1721
- name: "plugins",
1722
- description: "Show plugin directory and list loaded plugins",
1723
- usage: "/plugins",
1724
- execute(_args, ctx) {
1725
- const pluginsDir = ctx.config.getPluginsDir();
1726
- const pluginTools = ctx.tools.listPluginTools();
1727
- console.log();
1728
- console.log(` Plugin directory : ${pluginsDir}`);
1729
- console.log();
1730
- if (pluginTools.length === 0) {
1731
- console.log(theme.dim(" No plugins loaded."));
1732
- console.log(theme.dim(" To add a plugin, place a .js file in the directory above."));
1733
- console.log(theme.dim(" Format: export const tool = { definition: {...}, execute: async (args) => {...} }"));
1734
- } else {
1735
- console.log(` Loaded plugins (${pluginTools.length}):`);
1736
- for (const t of pluginTools) {
1737
- console.log(` ${theme.accent(t.definition.name.padEnd(22))}${theme.dim(t.definition.description)}`);
1738
- }
1739
- }
1740
- console.log();
1741
- }
1742
- },
1743
1719
  {
1744
1720
  name: "plugin",
1745
- description: "Manage package plugins (.aicli-plugin/plugin.json)",
1721
+ description: "Manage plugins (.aicli-plugin/ + legacy JS tools)",
1746
1722
  usage: "/plugin [list|install <path>|enable <name>|disable <name>|inspect <name>|trust <name>]",
1747
1723
  async execute(args, ctx) {
1748
1724
  const sub = args[0] ?? "list";
@@ -1750,12 +1726,14 @@ No tools match "${filter}".
1750
1726
  try {
1751
1727
  if (sub === "list") {
1752
1728
  const plugins = listInstalledPlugins(configDir);
1753
- console.log(theme.heading("\n\u{1F50C} Package Plugins\n"));
1754
- console.log(theme.dim(` Dir: ${pluginRoot(configDir)}`));
1729
+ const pluginTools = ctx.tools.listPluginTools();
1730
+ console.log(theme.heading("\n\u{1F50C} Plugins\n"));
1755
1731
  if (plugins.length === 0) {
1756
1732
  console.log(theme.dim(" No package plugins installed."));
1733
+ console.log(theme.dim(` Dir: ${pluginRoot(configDir)}`));
1757
1734
  console.log(theme.dim(" Use: /plugin install <path-to-plugin-dir>"));
1758
1735
  } else {
1736
+ console.log(theme.dim(` Package dir: ${pluginRoot(configDir)}`));
1759
1737
  for (const p of plugins) {
1760
1738
  const status = `${p.enabled ? theme.success("enabled") : theme.dim("disabled")} / ${p.trusted ? theme.success("trusted") : theme.warning("untrusted")}`;
1761
1739
  console.log(` ${theme.accent(p.name.padEnd(22))} ${p.manifest.version.padEnd(10)} ${status}`);
@@ -1763,6 +1741,15 @@ No tools match "${filter}".
1763
1741
  if (!p.valid && p.error) console.log(theme.warning(` invalid: ${p.error}`));
1764
1742
  }
1765
1743
  }
1744
+ if (pluginTools.length > 0) {
1745
+ console.log();
1746
+ const legacyDir = ctx.config.getPluginsDir();
1747
+ console.log(theme.dim(` Legacy JS dir: ${legacyDir}`));
1748
+ console.log(` Legacy JS tools (${pluginTools.length}):`);
1749
+ for (const t of pluginTools) {
1750
+ console.log(` ${theme.accent(t.definition.name.padEnd(22))}${theme.dim(t.definition.description)}`);
1751
+ }
1752
+ }
1766
1753
  console.log();
1767
1754
  return;
1768
1755
  }
@@ -1834,7 +1821,7 @@ No tools match "${filter}".
1834
1821
  const { join: join7 } = await import("path");
1835
1822
  const { existsSync: existsSync6 } = await import("fs");
1836
1823
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1837
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-J2MSGNFA.js");
1824
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-JTHN5JSQ.js");
1838
1825
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1839
1826
  const cwd = process.cwd();
1840
1827
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2813,7 +2800,7 @@ function createReviewCommands() {
2813
2800
  usage: "/test [command|filter]",
2814
2801
  async execute(args, ctx) {
2815
2802
  try {
2816
- const { executeTests } = await import("./run-tests-WBGQI5V7.js");
2803
+ const { executeTests } = await import("./run-tests-HZMY436A.js");
2817
2804
  const argStr = args.join(" ").trim();
2818
2805
  let testArgs = {};
2819
2806
  if (argStr) {
@@ -7758,7 +7745,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7758
7745
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7759
7746
  process.exit(1);
7760
7747
  }
7761
- const { startWebServer } = await import("./server-LYTXYK6Y.js");
7748
+ const { startWebServer } = await import("./server-RCAFE2LO.js");
7762
7749
  await startWebServer({ port, host: options.host });
7763
7750
  });
7764
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) => {
@@ -7925,11 +7912,11 @@ program.command("sessions").description("List recent conversation sessions").opt
7925
7912
  console.log(footer + "\n");
7926
7913
  });
7927
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) => {
7928
- const { runUsageCli } = await import("./usage-EHV6YVGH.js");
7915
+ const { runUsageCli } = await import("./usage-KNMT35C2.js");
7929
7916
  await runUsageCli(options);
7930
7917
  });
7931
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) => {
7932
- const { runDoctorCli } = await import("./doctor-cli-3VNTECP2.js");
7919
+ const { runDoctorCli } = await import("./doctor-cli-XTIL3RTQ.js");
7933
7920
  const argv = process.argv.slice(2);
7934
7921
  await runDoctorCli({
7935
7922
  json: !!options.json || argv.includes("--json"),
@@ -7938,7 +7925,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
7938
7925
  });
7939
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) => {
7940
7927
  try {
7941
- const batch = await import("./batch-XZHTNJXJ.js");
7928
+ const batch = await import("./batch-T74D2CCK.js");
7942
7929
  switch (action) {
7943
7930
  case "submit":
7944
7931
  if (!arg) {
@@ -7981,7 +7968,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7981
7968
  }
7982
7969
  });
7983
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) => {
7984
- const { startMcpServer } = await import("./server-5RXWIX4I.js");
7971
+ const { startMcpServer } = await import("./server-Q7MNZB4X.js");
7985
7972
  await startMcpServer({
7986
7973
  allowDestructive: !!options.allowDestructive,
7987
7974
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7994,7 +7981,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7994
7981
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
7995
7982
  process.exit(1);
7996
7983
  }
7997
- const { runPrCli } = await import("./pr-HY2QCVUY.js");
7984
+ const { runPrCli } = await import("./pr-NUHU64NS.js");
7998
7985
  const result = await runPrCli({
7999
7986
  action,
8000
7987
  target,
@@ -8014,8 +8001,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8014
8001
  process.exit(result.exitCode);
8015
8002
  });
8016
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) => {
8017
- const { runCi } = await import("./ci-ZCVDKFXY.js");
8018
- const { formatCiResult } = await import("./ci-format-CKXDFTN3.js");
8004
+ const { runCi } = await import("./ci-ADQTAYOZ.js");
8005
+ const { formatCiResult } = await import("./ci-format-KZSTHIEW.js");
8019
8006
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8020
8007
  if (formats > 1) {
8021
8008
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8173,7 +8160,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8173
8160
  config.get("customProviders"),
8174
8161
  config.getConfigDir()
8175
8162
  );
8176
- const { startHub } = await import("./hub-LIH5JEI7.js");
8163
+ const { startHub } = await import("./hub-BHHNMBCY.js");
8177
8164
  await startHub(
8178
8165
  {
8179
8166
  topic: topic ?? "",
@@ -8459,7 +8446,7 @@ Provider '${options.provider}' is not configured. Run: ai-cli config
8459
8446
  config.setTransient("defaultModels", { ...defaultModels, [provider]: options.model });
8460
8447
  }
8461
8448
  process.on("SIGTERM", async () => {
8462
- await sessions.save();
8449
+ await sessions.save(true);
8463
8450
  process.exit(0);
8464
8451
  });
8465
8452
  await repl.start();
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  discussionToMessages,
4
4
  persistDiscussion
5
- } from "./chunk-DEHVRQWW.js";
6
- import "./chunk-QYQCCIBT.js";
5
+ } from "./chunk-4KM53GLG.js";
6
+ import "./chunk-ZWU7FWHO.js";
7
7
  import "./chunk-B5TYJO7V.js";
8
8
  import "./chunk-IW3Q7AE5.js";
9
9
  export {
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-PQLRX7US.js";
6
- import "./chunk-AXIMNQSY.js";
5
+ } from "./chunk-LMKCS5XH.js";
6
+ import "./chunk-T3A74XGG.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -11,15 +11,15 @@ import {
11
11
  } from "./chunk-HLWUDRBO.js";
12
12
  import {
13
13
  ProviderRegistry
14
- } from "./chunk-EEQHP4GK.js";
14
+ } from "./chunk-62R7CACG.js";
15
15
  import "./chunk-ODYTXQ26.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-FEVOW3NQ.js";
18
+ } from "./chunk-DKPHVQUA.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-B3POS7LB.js";
22
+ } from "./chunk-6GSDDDEO.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-AEXWMIRE.js";
6
- import "./chunk-B3POS7LB.js";
5
+ } from "./chunk-S6SFZP3G.js";
6
+ import "./chunk-6GSDDDEO.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-QCGKCNBX.js";
4
+ } from "./chunk-7I4GGVIS.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-DMF6UHO6.js";
4
+ } from "./chunk-F2DUNYGY.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-TEXAIWUJ.js";
11
+ } from "./chunk-ITEGK3IN.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  schemaToJsonSchema
@@ -16,10 +16,10 @@ import {
16
16
  import "./chunk-5ULLIOVC.js";
17
17
  import "./chunk-HOSJZMQS.js";
18
18
  import "./chunk-4BKXL7SM.js";
19
- import "./chunk-AEXWMIRE.js";
19
+ import "./chunk-S6SFZP3G.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-B3POS7LB.js";
22
+ } from "./chunk-6GSDDDEO.js";
23
23
  import "./chunk-NVUCDUXE.js";
24
24
  import "./chunk-KHYD3WXE.js";
25
25
  import "./chunk-B5TYJO7V.js";
@@ -7,7 +7,7 @@ import {
7
7
  import "./chunk-3ARPAVNV.js";
8
8
  import {
9
9
  persistDiscussion
10
- } from "./chunk-DEHVRQWW.js";
10
+ } from "./chunk-4KM53GLG.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-SJ36SUG7.js";
26
+ } from "./chunk-SKUNYJDW.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-DMF6UHO6.js";
70
+ } from "./chunk-F2DUNYGY.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-QYQCCIBT.js";
78
+ } from "./chunk-ZWU7FWHO.js";
79
79
  import {
80
80
  computeCost,
81
81
  formatCost
@@ -84,10 +84,10 @@ import {
84
84
  buildDoctorReport,
85
85
  formatDoctorReport,
86
86
  loadContextFiles
87
- } from "./chunk-QFOJ4GXC.js";
87
+ } from "./chunk-SARJYCDV.js";
88
88
  import {
89
89
  ProviderRegistry
90
- } from "./chunk-EEQHP4GK.js";
90
+ } from "./chunk-62R7CACG.js";
91
91
  import {
92
92
  describePlugin,
93
93
  getActivePluginAssets,
@@ -102,7 +102,7 @@ import {
102
102
  runTool,
103
103
  setPluginEnabled,
104
104
  trustPlugin
105
- } from "./chunk-TEXAIWUJ.js";
105
+ } from "./chunk-ITEGK3IN.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-ODYTXQ26.js";
122
122
  import {
123
123
  ConfigManager
124
- } from "./chunk-FEVOW3NQ.js";
124
+ } from "./chunk-DKPHVQUA.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-AEXWMIRE.js";
132
+ import "./chunk-S6SFZP3G.js";
133
133
  import {
134
134
  AGENTIC_BEHAVIOR_GUIDELINE,
135
135
  AUTHOR,
@@ -146,7 +146,7 @@ import {
146
146
  SKILLS_DIR_NAME,
147
147
  VERSION,
148
148
  buildUserIdentityPrompt
149
- } from "./chunk-B3POS7LB.js";
149
+ } from "./chunk-6GSDDDEO.js";
150
150
  import "./chunk-NVUCDUXE.js";
151
151
  import "./chunk-KHYD3WXE.js";
152
152
  import {
@@ -1352,37 +1352,32 @@ async function handleRewind(args, ctx) {
1352
1352
  async function handleTools(_args, ctx) {
1353
1353
  ctx.sendToolsList();
1354
1354
  }
1355
- async function handlePlugins(_args, ctx) {
1356
- const configDir = ctx.config.getConfigDir();
1357
- const pluginsDir = join(configDir, PLUGINS_DIR_NAME);
1358
- const pluginTools = ctx.toolRegistry.listPluginTools();
1359
- const pluginPackages = listInstalledPlugins(configDir);
1360
- const lines = [`\u{1F50C} **Plugins:**`, `Dir: ${pluginsDir}`, ""];
1361
- if (pluginTools.length === 0 && pluginPackages.length === 0) {
1362
- lines.push("No plugins loaded.");
1363
- lines.push("Use /plugin install <path>, /plugin trust <name>, then /plugin enable <name>.");
1364
- } else {
1365
- if (pluginPackages.length > 0) {
1366
- lines.push(`Package plugins (${pluginPackages.length}):`);
1367
- for (const p of pluginPackages) lines.push(` \u2022 ${p.name}@${p.manifest.version} \u2014 ${p.enabled ? "enabled" : "disabled"} / ${p.trusted ? "trusted" : "untrusted"}`);
1368
- lines.push("");
1369
- }
1370
- if (pluginTools.length > 0) {
1371
- lines.push(`Legacy JS plugin tools (${pluginTools.length}):`);
1372
- for (const t of pluginTools) lines.push(` \u2022 ${t.definition.name} \u2014 ${t.definition.description}`);
1373
- }
1374
- }
1375
- ctx.send({ type: "info", message: lines.join("\n") });
1376
- }
1377
1355
  async function handlePlugin(args, ctx) {
1378
1356
  const configDir = ctx.config.getConfigDir();
1379
1357
  const sub = args[0] ?? "list";
1380
1358
  try {
1381
1359
  if (sub === "list") {
1382
1360
  const plugins = listInstalledPlugins(configDir);
1383
- const lines = [`\u{1F50C} **Package Plugins**`, `Dir: ${pluginRoot(configDir)}`, ""];
1384
- if (plugins.length === 0) lines.push("No package plugins installed.");
1385
- for (const p of plugins) lines.push(` \u2022 ${p.name}@${p.manifest.version} \u2014 ${p.enabled ? "enabled" : "disabled"} / ${p.trusted ? "trusted" : "untrusted"}`);
1361
+ const pluginTools = ctx.toolRegistry.listPluginTools();
1362
+ const lines = ["\u{1F50C} **Plugins**", ""];
1363
+ if (plugins.length === 0 && pluginTools.length === 0) {
1364
+ lines.push("No plugins loaded.");
1365
+ lines.push(`Dir: ${pluginRoot(configDir)}`);
1366
+ lines.push("Use /plugin install <path>, /plugin trust <name>, then /plugin enable <name>.");
1367
+ } else {
1368
+ if (plugins.length > 0) {
1369
+ lines.push(`**Package plugins** (${plugins.length}):`);
1370
+ lines.push(`Dir: ${pluginRoot(configDir)}`);
1371
+ for (const p of plugins) lines.push(` \u2022 ${p.name}@${p.manifest.version} \u2014 ${p.enabled ? "enabled" : "disabled"} / ${p.trusted ? "trusted" : "untrusted"}`);
1372
+ lines.push("");
1373
+ }
1374
+ if (pluginTools.length > 0) {
1375
+ const legacyDir = join(configDir, PLUGINS_DIR_NAME);
1376
+ lines.push(`**Legacy JS tools** (${pluginTools.length}):`);
1377
+ lines.push(`Dir: ${legacyDir}`);
1378
+ for (const t of pluginTools) lines.push(` \u2022 ${t.definition.name} \u2014 ${t.definition.description}`);
1379
+ }
1380
+ }
1386
1381
  ctx.send({ type: "info", message: lines.join("\n") });
1387
1382
  return;
1388
1383
  }
@@ -1598,7 +1593,7 @@ async function handleSecurityReview(args, ctx) {
1598
1593
  async function handleTest(args, ctx) {
1599
1594
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1600
1595
  try {
1601
- const { executeTests } = await import("./run-tests-WBGQI5V7.js");
1596
+ const { executeTests } = await import("./run-tests-HZMY436A.js");
1602
1597
  const argStr = args.join(" ").trim();
1603
1598
  let testArgs = {};
1604
1599
  if (argStr) {
@@ -2078,8 +2073,7 @@ async function handleHelp(_args, ctx) {
2078
2073
  " /scaffold <desc> \u2014 Generate project scaffolding with AI",
2079
2074
  " /add-dir [path|remove] \u2014 Add/remove directory from AI context",
2080
2075
  " /mcp [reconnect] \u2014 Show/manage MCP servers",
2081
- " /plugins \u2014 Show loaded plugins",
2082
- " /plugin <cmd> \u2014 Manage package plugins",
2076
+ " /plugin <cmd> \u2014 Manage plugins (list/install/enable/disable/inspect/trust)",
2083
2077
  " /commands \u2014 List custom commands",
2084
2078
  " /doctor \u2014 Health check (API keys, config, MCP)",
2085
2079
  " /bug \u2014 Generate bug report template",
@@ -2196,7 +2190,6 @@ var webCommandHandlers = {
2196
2190
  fork: handleFork,
2197
2191
  rewind: handleRewind,
2198
2192
  tools: handleTools,
2199
- plugins: handlePlugins,
2200
2193
  plugin: handlePlugin,
2201
2194
  mcp: handleMcp,
2202
2195
  skill: handleSkill,
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-DMF6UHO6.js";
6
+ } from "./chunk-F2DUNYGY.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-TEXAIWUJ.js";
13
+ } from "./chunk-ITEGK3IN.js";
14
14
  import {
15
15
  getDangerLevel,
16
16
  runLeanAgentLoop
@@ -18,10 +18,10 @@ import {
18
18
  import "./chunk-5ULLIOVC.js";
19
19
  import "./chunk-HOSJZMQS.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-AEXWMIRE.js";
21
+ import "./chunk-S6SFZP3G.js";
22
22
  import {
23
23
  SUBAGENT_ALLOWED_TOOLS
24
- } from "./chunk-B3POS7LB.js";
24
+ } from "./chunk-6GSDDDEO.js";
25
25
  import "./chunk-NVUCDUXE.js";
26
26
  import "./chunk-KHYD3WXE.js";
27
27
  import "./chunk-B5TYJO7V.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-FEVOW3NQ.js";
11
+ } from "./chunk-DKPHVQUA.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-B3POS7LB.js";
13
+ import "./chunk-6GSDDDEO.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
 
16
16
  // src/cli/usage.ts
@@ -716,14 +716,22 @@ window.copyConfirmDiff = function(el) {
716
716
  };
717
717
  // DaisyUI light themes → highlight.js light stylesheet; others → dark
718
718
  const LIGHT_DAISYUI_THEMES = new Set(['light', 'cupcake', 'bumblebee', 'emerald', 'corporate', 'garden', 'lofi', 'pastel', 'fantasy', 'wireframe', 'cmyk', 'autumn', 'acid', 'lemonade', 'winter', 'nord']);
719
- // v0.4.153: vendored locally (was cdn.jsdelivr.net) — see index.html.
720
- const HLJS_CDN = 'vendor';
719
+ // v0.4.153: vendored locally (was cdn.jsdelivr.net).
721
720
 
722
721
  function updateCodeTheme(daisyTheme) {
723
722
  const isLight = LIGHT_DAISYUI_THEMES.has(daisyTheme);
724
- const hljsFile = isLight ? 'github.min.css' : 'github-dark.min.css';
725
- const link = document.getElementById('hljs-theme');
726
- if (link) link.href = `${HLJS_CDN}/${hljsFile}`;
723
+ // P2-SEC-01: toggle disabled instead of changing href — preserves SRI integrity
724
+ const darkLink = document.getElementById('hljs-theme-dark');
725
+ const lightLink = document.getElementById('hljs-theme-light');
726
+ if (darkLink && lightLink) {
727
+ if (isLight) {
728
+ darkLink.disabled = true;
729
+ lightLink.disabled = false;
730
+ } else {
731
+ lightLink.disabled = true;
732
+ darkLink.disabled = false;
733
+ }
734
+ }
727
735
  }
728
736
 
729
737
  window.setTheme = function(theme) {
@@ -17,12 +17,20 @@
17
17
  CDN failed the whole UI rendered unstyled AND the `.hidden` login overlay
18
18
  became visible (no users → "can't log in"). Serving locally makes the UI
19
19
  work offline / behind GFW with zero behavior change. -->
20
- <link href="vendor/daisyui-full.min.css" rel="stylesheet">
21
- <script src="vendor/tailwind.js"></script>
22
- <!-- Markdown + Code highlighting -->
23
- <script src="vendor/marked.min.js"></script>
24
- <link id="hljs-theme" rel="stylesheet" href="vendor/github-dark.min.css">
25
- <script src="vendor/highlight.min.js"></script>
20
+ <link href="vendor/daisyui-full.min.css" rel="stylesheet"
21
+ integrity="sha384-Qn1dWOhPHD8ZitIQRnpquZJZmyWs+sq1SKENTuBIc3+Yg16SG2u3RqsC8LVbkZre" crossorigin="anonymous">
22
+ <script src="vendor/tailwind.js"
23
+ integrity="sha384-igm5BeiBt36UU4gqwWS7imYmelpTsZlQ45FZf+XBn9MuJbn4nQr7yx1yFydocC/K" crossorigin="anonymous"></script>
24
+ <!-- Markdown + Code highlighting -->
25
+ <script src="vendor/marked.min.js"
26
+ integrity="sha384-948ahk4ZmxYVYOc+rxN1H2gM1EJ2Duhp7uHtZ4WSLkV4Vtx5MUqnV+l7u9B+jFv+" crossorigin="anonymous"></script>
27
+ <!-- P2-SEC-01: SRI integrity for both hljs themes — toggle disabled instead of changing href -->
28
+ <link id="hljs-theme-dark" rel="stylesheet" href="vendor/github-dark.min.css"
29
+ integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH" crossorigin="anonymous">
30
+ <link id="hljs-theme-light" rel="stylesheet" href="vendor/github.min.css" disabled
31
+ integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
32
+ <script src="vendor/highlight.min.js"
33
+ integrity="sha384-F/bZzf7p3Joyp5psL90p/p89AZJsndkSoGwRpXcZhleCWhd8SnRuoYo4d0yirjJp" crossorigin="anonymous"></script>
26
34
  <link rel="stylesheet" href="style.css">
27
35
  </head>
28
36
  <body class="bg-base-300 h-screen overflow-hidden">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.229",
3
+ "version": "0.4.230",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",