jinzd-ai-cli 0.4.319 → 0.4.321

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 (35) hide show
  1. package/dist/{batch-CQ542WJF.js → batch-EW6QTSE6.js} +2 -2
  2. package/dist/{chunk-D6BLSFYD.js → chunk-2GOBINY4.js} +4 -4
  3. package/dist/{chunk-A7YZLLWN.js → chunk-2R6Y5SJH.js} +1 -1
  4. package/dist/{chunk-2PAQOR2X.js → chunk-4MO2I5JB.js} +9 -9
  5. package/dist/{chunk-YHMQMP2I.js → chunk-6RCGQQFM.js} +57 -20
  6. package/dist/{chunk-Y3SEC5EC.js → chunk-6XXHAS5B.js} +1 -1
  7. package/dist/{chunk-GP24X3KJ.js → chunk-7QW3DFYV.js} +1 -1
  8. package/dist/{chunk-KEOMNFBH.js → chunk-COHKPZ2E.js} +1 -1
  9. package/dist/{chunk-GVAAGBHX.js → chunk-E2W2MI6H.js} +74 -5
  10. package/dist/{chunk-PGQ5OV3P.js → chunk-I3GEFCKP.js} +1 -1
  11. package/dist/{chunk-AC44E4CV.js → chunk-JHSULP5D.js} +1 -1
  12. package/dist/{chunk-OQZIP4LU.js → chunk-LEA4AMXE.js} +1 -1
  13. package/dist/{chunk-46OEMKQX.js → chunk-NFPJ6KUU.js} +8 -4
  14. package/dist/{chunk-DCQDFQDW.js → chunk-VEO2MILP.js} +1 -1
  15. package/dist/{chunk-662ZJPJE.js → chunk-VS43QMR2.js} +1 -1
  16. package/dist/{chunk-N2MHUA4B.js → chunk-XVB4RARX.js} +75 -2
  17. package/dist/{chunk-SZBSTSG4.js → chunk-ZDO3XCXL.js} +4 -4
  18. package/dist/{ci-HAPWBC37.js → ci-EZZD7CMS.js} +6 -6
  19. package/dist/{ci-format-NGWP4GTQ.js → ci-format-ZWECV6XI.js} +2 -2
  20. package/dist/{constants-GSUK6ILC.js → constants-F2ULZ6W2.js} +1 -1
  21. package/dist/{constants-CPHZLOCQ.js → constants-HF5AYLBR.js} +1 -1
  22. package/dist/{doctor-cli-L6AK2GJ7.js → doctor-cli-QAKYBWLG.js} +6 -6
  23. package/dist/electron-server.js +218 -35
  24. package/dist/{hub-TCZFG2ZG.js → hub-OYH2UGER.js} +1 -1
  25. package/dist/index.js +56 -26
  26. package/dist/{persistent-memory-IPNMYXU4.js → persistent-memory-EVZX7SLR.js} +2 -2
  27. package/dist/{persistent-memory-E3UYP7RJ.js → persistent-memory-WNPZSVE4.js} +2 -2
  28. package/dist/{pr-J5TSU5P6.js → pr-XPQVXG2G.js} +6 -6
  29. package/dist/{run-tests-PDD4KUQL.js → run-tests-3SYXE2PJ.js} +2 -2
  30. package/dist/{run-tests-FLGSE63O.js → run-tests-MFXQ76ZJ.js} +2 -2
  31. package/dist/{server-3C6IK3JE.js → server-AF5PIBUD.js} +6 -6
  32. package/dist/{server-XQ3IQUZ5.js → server-VOGBRYA5.js} +16 -16
  33. package/dist/{task-orchestrator-544JETWF.js → task-orchestrator-QHJEDRDS.js} +9 -7
  34. package/dist/{usage-MQTA7HHZ.js → usage-EZOW27TR.js} +3 -3
  35. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24,12 +24,12 @@ import {
24
24
  setupProxy,
25
25
  snapshotFile,
26
26
  stripRoutingTags
27
- } from "./chunk-2PAQOR2X.js";
27
+ } from "./chunk-4MO2I5JB.js";
28
28
  import {
29
29
  CostTracker,
30
30
  getPricing,
31
31
  setCostCurrency
32
- } from "./chunk-46OEMKQX.js";
32
+ } from "./chunk-NFPJ6KUU.js";
33
33
  import {
34
34
  ToolExecutor,
35
35
  ToolRegistry,
@@ -47,7 +47,7 @@ import {
47
47
  setMaxOutputCap,
48
48
  spawnAgentContext,
49
49
  undoStack
50
- } from "./chunk-YHMQMP2I.js";
50
+ } from "./chunk-6RCGQQFM.js";
51
51
  import "./chunk-HLWUDRBO.js";
52
52
  import {
53
53
  NO_THINKING,
@@ -60,7 +60,7 @@ import {
60
60
  countPendingMemories,
61
61
  detectStaleLegacyMarkdownEdit,
62
62
  formatMemoryForPrompt
63
- } from "./chunk-PGQ5OV3P.js";
63
+ } from "./chunk-I3GEFCKP.js";
64
64
  import "./chunk-RWRZVQCB.js";
65
65
  import "./chunk-B3MPYI4E.js";
66
66
  import "./chunk-M6HLYG33.js";
@@ -81,22 +81,22 @@ import {
81
81
  import {
82
82
  loadContextFiles,
83
83
  writeCrashLog
84
- } from "./chunk-D6BLSFYD.js";
84
+ } from "./chunk-2GOBINY4.js";
85
85
  import {
86
86
  getActivePluginAssets,
87
87
  getPendingHookTrust,
88
88
  installFlushOnExit,
89
89
  mergePluginHooks,
90
90
  runLifecycleHooks
91
- } from "./chunk-662ZJPJE.js";
91
+ } from "./chunk-VS43QMR2.js";
92
92
  import "./chunk-RS7SKYTS.js";
93
93
  import {
94
94
  ProviderRegistry,
95
95
  listBuiltInProviderMetadata
96
- } from "./chunk-N2MHUA4B.js";
96
+ } from "./chunk-XVB4RARX.js";
97
97
  import {
98
98
  ConfigManager
99
- } from "./chunk-KEOMNFBH.js";
99
+ } from "./chunk-COHKPZ2E.js";
100
100
  import {
101
101
  CONTENT_ONLY_STREAM_REMINDER,
102
102
  TEE_FINAL_USER_NUDGE,
@@ -114,7 +114,7 @@ import {
114
114
  runAgentLoop,
115
115
  stripToolCallReminder,
116
116
  teeStreamErrorSummary
117
- } from "./chunk-GVAAGBHX.js";
117
+ } from "./chunk-E2W2MI6H.js";
118
118
  import {
119
119
  AuthError,
120
120
  ProviderError,
@@ -134,7 +134,7 @@ import {
134
134
  isInterrupted,
135
135
  requestInterrupt,
136
136
  resetInterrupt
137
- } from "./chunk-Y3SEC5EC.js";
137
+ } from "./chunk-6XXHAS5B.js";
138
138
  import {
139
139
  AGENTIC_BEHAVIOR_GUIDELINE,
140
140
  AUTHOR,
@@ -152,7 +152,7 @@ import {
152
152
  SKILLS_DIR_NAME,
153
153
  VERSION,
154
154
  buildUserIdentityPrompt
155
- } from "./chunk-A7YZLLWN.js";
155
+ } from "./chunk-2R6Y5SJH.js";
156
156
  import "./chunk-SXIJLSVF.js";
157
157
 
158
158
  // src/index.ts
@@ -1627,6 +1627,8 @@ var Repl = class {
1627
1627
  * true 时:工具集过滤为只读工具,system prompt 注入规划说明,提示符加 [PLAN] 标记。
1628
1628
  */
1629
1629
  planMode = false;
1630
+ /** 小窗口裁掉内置工具的提示每个 REPL 只打一次(每轮都会重算预算) */
1631
+ toolBudgetNoticeShown = false;
1630
1632
  /** 技能管理器 */
1631
1633
  skillManager = null;
1632
1634
  customCommandManager = null;
@@ -3147,13 +3149,20 @@ Session '${this.resumeSessionId}' not found.
3147
3149
  const contextWindow = this.getContextWindowSize(effectiveModel);
3148
3150
  if (contextWindow > 0) {
3149
3151
  const toolBudget = Math.floor(contextWindow * 0.2);
3150
- const { definitions, trimmedCount, systemNote } = this.toolRegistry.getDefinitionsWithBudget(toolBudget, usedMcpToolNames);
3152
+ const { definitions, trimmedCount, trimmedBuiltins, systemNote } = this.toolRegistry.getDefinitionsWithBudget(toolBudget, usedMcpToolNames);
3151
3153
  toolDefs = definitions;
3152
3154
  mcpBudgetNote = systemNote;
3153
3155
  if (trimmedCount > 0) {
3154
3156
  process.stderr.write(theme.dim(` [MCP budget] ${trimmedCount} MCP tool(s) trimmed to fit ${toolBudget.toLocaleString()} token budget
3155
3157
  `));
3156
3158
  }
3159
+ if (trimmedBuiltins.length > 0 && !this.toolBudgetNoticeShown) {
3160
+ this.toolBudgetNoticeShown = true;
3161
+ process.stderr.write(theme.dim(
3162
+ ` [tool budget] ${contextWindow.toLocaleString()}-token context: ${trimmedBuiltins.length} builtin tool(s) left out to save room (${trimmedBuiltins.join(", ")})
3163
+ `
3164
+ ));
3165
+ }
3157
3166
  } else {
3158
3167
  toolDefs = this.toolRegistry.getDefinitions();
3159
3168
  }
@@ -3697,7 +3706,7 @@ Tip: You can continue the conversation by asking the AI to proceed.`
3697
3706
  );
3698
3707
  if (verdict.kind === "reject") {
3699
3708
  cleanupRejectedTeeFile(saveToFile);
3700
- const label = verdict.reason === "meta-narration" ? "meta-narration / leaked reasoning, not document body" : verdict.reason === "empty" ? "an empty stream (no text produced)" : "pseudo-tool-call markup with no usable document body";
3709
+ const label = verdict.reason === "meta-narration" ? "meta-narration / leaked reasoning, not document body" : verdict.reason === "empty" ? "an empty stream (no text produced)" : verdict.reason === "not-a-document" ? `only an announcement ("I'll write it now\u2026"), not the document` : "pseudo-tool-call markup with no usable document body";
3701
3710
  pendingTeeSave = armDeferredSave(saveToFile);
3702
3711
  process.stdout.write(theme.warning(
3703
3712
  `
@@ -4107,7 +4116,7 @@ program.command("web").description("Start Web UI server with browser-based chat
4107
4116
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
4108
4117
  process.exit(1);
4109
4118
  }
4110
- const { startWebServer } = await import("./server-XQ3IQUZ5.js");
4119
+ const { startWebServer } = await import("./server-VOGBRYA5.js");
4111
4120
  await startWebServer({ port, host: options.host, externalOrigin: options.externalOrigin });
4112
4121
  });
4113
4122
  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) => {
@@ -4274,11 +4283,11 @@ program.command("sessions").description("List recent conversation sessions").opt
4274
4283
  console.log(footer + "\n");
4275
4284
  });
4276
4285
  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) => {
4277
- const { runUsageCli } = await import("./usage-MQTA7HHZ.js");
4286
+ const { runUsageCli } = await import("./usage-EZOW27TR.js");
4278
4287
  await runUsageCli(options);
4279
4288
  });
4280
4289
  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) => {
4281
- const { runDoctorCli } = await import("./doctor-cli-L6AK2GJ7.js");
4290
+ const { runDoctorCli } = await import("./doctor-cli-QAKYBWLG.js");
4282
4291
  const argv = process.argv.slice(2);
4283
4292
  await runDoctorCli({
4284
4293
  json: !!options.json || argv.includes("--json"),
@@ -4287,7 +4296,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
4287
4296
  });
4288
4297
  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) => {
4289
4298
  try {
4290
- const batch = await import("./batch-CQ542WJF.js");
4299
+ const batch = await import("./batch-EW6QTSE6.js");
4291
4300
  switch (action) {
4292
4301
  case "submit":
4293
4302
  if (!arg) {
@@ -4330,7 +4339,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
4330
4339
  }
4331
4340
  });
4332
4341
  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) => {
4333
- const { startMcpServer } = await import("./server-3C6IK3JE.js");
4342
+ const { startMcpServer } = await import("./server-AF5PIBUD.js");
4334
4343
  await startMcpServer({
4335
4344
  allowDestructive: !!options.allowDestructive,
4336
4345
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -4343,7 +4352,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4343
4352
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
4344
4353
  process.exit(1);
4345
4354
  }
4346
- const { runPrCli } = await import("./pr-J5TSU5P6.js");
4355
+ const { runPrCli } = await import("./pr-XPQVXG2G.js");
4347
4356
  const result = await runPrCli({
4348
4357
  action,
4349
4358
  target,
@@ -4363,8 +4372,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4363
4372
  process.exit(result.exitCode);
4364
4373
  });
4365
4374
  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) => {
4366
- const { runCi } = await import("./ci-HAPWBC37.js");
4367
- const { formatCiResult } = await import("./ci-format-NGWP4GTQ.js");
4375
+ const { runCi } = await import("./ci-EZZD7CMS.js");
4376
+ const { formatCiResult } = await import("./ci-format-ZWECV6XI.js");
4368
4377
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
4369
4378
  if (formats > 1) {
4370
4379
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -4523,7 +4532,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
4523
4532
  config.get("customProviders"),
4524
4533
  config.getConfigDir()
4525
4534
  );
4526
- const { startHub } = await import("./hub-TCZFG2ZG.js");
4535
+ const { startHub } = await import("./hub-OYH2UGER.js");
4527
4536
  await startHub(
4528
4537
  {
4529
4538
  topic: topic ?? "",
@@ -4664,6 +4673,17 @@ ${loaded.mergedContent}` : void 0
4664
4673
  const f = new ThinkTagFilter();
4665
4674
  return f.push(text) + f.flush();
4666
4675
  };
4676
+ let emptyResult = false;
4677
+ const checkEmpty = (content, usage) => {
4678
+ if (content.trim()) return;
4679
+ emptyResult = true;
4680
+ const spent = usage?.outputTokens ?? 0;
4681
+ process.stderr.write(
4682
+ `[aicli] empty response from ${providerId}/${model}` + (spent > 0 ? ` (${spent} output tokens were spent, most likely on reasoning). Try --think off, or raise modelParams.<model>.maxTokens.
4683
+ ` : `. The model returned no text.
4684
+ `)
4685
+ );
4686
+ };
4667
4687
  try {
4668
4688
  if (isStreamingJson) {
4669
4689
  const stream = provider.chatStream({
@@ -4701,6 +4721,7 @@ ${loaded.mergedContent}` : void 0
4701
4721
  if (finalUsage) doneOut["usage"] = finalUsage;
4702
4722
  recordUsage(finalUsage);
4703
4723
  process.stdout.write(JSON.stringify(doneOut) + "\n");
4724
+ checkEmpty(fullContent, finalUsage);
4704
4725
  } else if (options.json) {
4705
4726
  const response = await provider.chat({
4706
4727
  messages,
@@ -4720,6 +4741,7 @@ ${loaded.mergedContent}` : void 0
4720
4741
  };
4721
4742
  recordUsage(response.usage);
4722
4743
  process.stdout.write(JSON.stringify(out, null, 2) + "\n");
4744
+ checkEmpty(out.content, response.usage);
4723
4745
  } else if (useStream) {
4724
4746
  const stream = provider.chatStream({
4725
4747
  messages,
@@ -4733,13 +4755,19 @@ ${loaded.mergedContent}` : void 0
4733
4755
  });
4734
4756
  const textFilter = new ThinkTagFilter();
4735
4757
  let streamUsage;
4758
+ let streamedText = "";
4759
+ const emitText = (text) => {
4760
+ streamedText += text;
4761
+ process.stdout.write(text);
4762
+ };
4736
4763
  for await (const chunk of stream) {
4737
4764
  if (chunk.usage) streamUsage = chunk.usage;
4738
- if (chunk.delta) process.stdout.write(keepThinking ? chunk.delta : textFilter.push(chunk.delta));
4765
+ if (chunk.delta) emitText(keepThinking ? chunk.delta : textFilter.push(chunk.delta));
4739
4766
  }
4740
- if (!keepThinking) process.stdout.write(textFilter.flush());
4767
+ if (!keepThinking) emitText(textFilter.flush());
4741
4768
  recordUsage(streamUsage);
4742
4769
  process.stdout.write("\n");
4770
+ checkEmpty(streamedText, streamUsage);
4743
4771
  } else {
4744
4772
  const response = await provider.chat({
4745
4773
  messages,
@@ -4752,10 +4780,12 @@ ${loaded.mergedContent}` : void 0
4752
4780
  ...thinkingParams
4753
4781
  });
4754
4782
  recordUsage(response.usage);
4755
- process.stdout.write(stripThinking(response.content) + "\n");
4783
+ const text = stripThinking(response.content);
4784
+ process.stdout.write(text + "\n");
4785
+ checkEmpty(text, response.usage);
4756
4786
  }
4757
4787
  costTracker.flush();
4758
- process.exit(0);
4788
+ process.exit(emptyResult ? 2 : 0);
4759
4789
  } catch (err) {
4760
4790
  costTracker.flush();
4761
4791
  const msg = err instanceof Error ? err.message : String(err);
@@ -27,11 +27,11 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-GP24X3KJ.js";
30
+ } from "./chunk-7QW3DFYV.js";
31
31
  import "./chunk-FSC6KEWU.js";
32
32
  import "./chunk-2XMUCC42.js";
33
33
  import "./chunk-CGLYJRFA.js";
34
- import "./chunk-DCQDFQDW.js";
34
+ import "./chunk-VEO2MILP.js";
35
35
  export {
36
36
  addMemoryEntry,
37
37
  backupMemoryStore,
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-PGQ5OV3P.js";
31
+ } from "./chunk-I3GEFCKP.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-BMLQPSHP.js";
35
- import "./chunk-A7YZLLWN.js";
35
+ import "./chunk-2R6Y5SJH.js";
36
36
  export {
37
37
  addMemoryEntry,
38
38
  backupMemoryStore,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-SZBSTSG4.js";
6
- import "./chunk-OQZIP4LU.js";
5
+ } from "./chunk-ZDO3XCXL.js";
6
+ import "./chunk-LEA4AMXE.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -14,16 +14,16 @@ import {
14
14
  } from "./chunk-6YZEZFX5.js";
15
15
  import {
16
16
  ProviderRegistry
17
- } from "./chunk-N2MHUA4B.js";
17
+ } from "./chunk-XVB4RARX.js";
18
18
  import {
19
19
  ConfigManager
20
- } from "./chunk-KEOMNFBH.js";
21
- import "./chunk-GVAAGBHX.js";
20
+ } from "./chunk-COHKPZ2E.js";
21
+ import "./chunk-E2W2MI6H.js";
22
22
  import "./chunk-TU3L3PW7.js";
23
23
  import "./chunk-BMLQPSHP.js";
24
24
  import {
25
25
  VERSION
26
- } from "./chunk-A7YZLLWN.js";
26
+ } from "./chunk-2R6Y5SJH.js";
27
27
 
28
28
  // src/cli/pr.ts
29
29
  import { execFileSync } from "child_process";
@@ -2,9 +2,9 @@ import {
2
2
  executeTests,
3
3
  runTestProcess,
4
4
  runTestsTool
5
- } from "./chunk-AC44E4CV.js";
5
+ } from "./chunk-JHSULP5D.js";
6
6
  import "./chunk-QMFMST2T.js";
7
- import "./chunk-DCQDFQDW.js";
7
+ import "./chunk-VEO2MILP.js";
8
8
  export {
9
9
  executeTests,
10
10
  runTestProcess,
@@ -3,8 +3,8 @@ import {
3
3
  executeTests,
4
4
  runTestProcess,
5
5
  runTestsTool
6
- } from "./chunk-Y3SEC5EC.js";
7
- import "./chunk-A7YZLLWN.js";
6
+ } from "./chunk-6XXHAS5B.js";
7
+ import "./chunk-2R6Y5SJH.js";
8
8
  import "./chunk-SXIJLSVF.js";
9
9
  export {
10
10
  executeTests,
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-YHMQMP2I.js";
4
+ } from "./chunk-6RCGQQFM.js";
5
5
  import "./chunk-6JHACXB3.js";
6
- import "./chunk-PGQ5OV3P.js";
6
+ import "./chunk-I3GEFCKP.js";
7
7
  import "./chunk-RWRZVQCB.js";
8
8
  import "./chunk-B3MPYI4E.js";
9
9
  import "./chunk-M6HLYG33.js";
@@ -14,20 +14,20 @@ import "./chunk-JL44HGZC.js";
14
14
  import "./chunk-3FEZSLGI.js";
15
15
  import {
16
16
  runTool
17
- } from "./chunk-662ZJPJE.js";
17
+ } from "./chunk-VS43QMR2.js";
18
18
  import "./chunk-RS7SKYTS.js";
19
19
  import {
20
20
  getDangerLevel,
21
21
  schemaToJsonSchema
22
- } from "./chunk-GVAAGBHX.js";
22
+ } from "./chunk-E2W2MI6H.js";
23
23
  import "./chunk-TU3L3PW7.js";
24
24
  import "./chunk-HOSJZMQS.js";
25
25
  import "./chunk-BMLQPSHP.js";
26
26
  import "./chunk-JJFJWD35.js";
27
- import "./chunk-Y3SEC5EC.js";
27
+ import "./chunk-6XXHAS5B.js";
28
28
  import {
29
29
  VERSION
30
- } from "./chunk-A7YZLLWN.js";
30
+ } from "./chunk-2R6Y5SJH.js";
31
31
  import "./chunk-SXIJLSVF.js";
32
32
 
33
33
  // src/mcp/server.ts
@@ -86,7 +86,7 @@ import {
86
86
  skillHistoryNote,
87
87
  snapshotFile,
88
88
  stripRoutingTags
89
- } from "./chunk-2PAQOR2X.js";
89
+ } from "./chunk-4MO2I5JB.js";
90
90
  import {
91
91
  CNY_PER_USD,
92
92
  CostTracker,
@@ -95,7 +95,7 @@ import {
95
95
  getCostCurrency,
96
96
  getPricing,
97
97
  setCostCurrency
98
- } from "./chunk-46OEMKQX.js";
98
+ } from "./chunk-NFPJ6KUU.js";
99
99
  import {
100
100
  DEFAULT_MAX_TOOL_OUTPUT_CHARS,
101
101
  ToolExecutor,
@@ -130,7 +130,7 @@ import {
130
130
  spawnAgentContext,
131
131
  truncateOutput,
132
132
  undoStack
133
- } from "./chunk-YHMQMP2I.js";
133
+ } from "./chunk-6RCGQQFM.js";
134
134
  import {
135
135
  buildReviewPrompt,
136
136
  buildSecurityReviewPrompt
@@ -157,7 +157,7 @@ import {
157
157
  restoreMemoryEntries,
158
158
  updateMemoryApproval,
159
159
  updateMemoryEntry
160
- } from "./chunk-PGQ5OV3P.js";
160
+ } from "./chunk-I3GEFCKP.js";
161
161
  import "./chunk-RWRZVQCB.js";
162
162
  import "./chunk-B3MPYI4E.js";
163
163
  import "./chunk-M6HLYG33.js";
@@ -176,7 +176,7 @@ import {
176
176
  buildDoctorReport,
177
177
  formatDoctorReport,
178
178
  loadContextFiles
179
- } from "./chunk-D6BLSFYD.js";
179
+ } from "./chunk-2GOBINY4.js";
180
180
  import {
181
181
  describePlugin,
182
182
  getActivePluginAssets,
@@ -191,14 +191,14 @@ import {
191
191
  runTool,
192
192
  setPluginEnabled,
193
193
  trustPlugin
194
- } from "./chunk-662ZJPJE.js";
194
+ } from "./chunk-VS43QMR2.js";
195
195
  import "./chunk-RS7SKYTS.js";
196
196
  import {
197
197
  ProviderRegistry
198
- } from "./chunk-N2MHUA4B.js";
198
+ } from "./chunk-XVB4RARX.js";
199
199
  import {
200
200
  ConfigManager
201
- } from "./chunk-KEOMNFBH.js";
201
+ } from "./chunk-COHKPZ2E.js";
202
202
  import {
203
203
  CONTENT_ONLY_STREAM_REMINDER,
204
204
  TEE_FINAL_USER_NUDGE,
@@ -214,7 +214,7 @@ import {
214
214
  runAgentLoop,
215
215
  stripToolCallReminder,
216
216
  teeStreamErrorSummary
217
- } from "./chunk-GVAAGBHX.js";
217
+ } from "./chunk-E2W2MI6H.js";
218
218
  import "./chunk-TU3L3PW7.js";
219
219
  import {
220
220
  formatGitContextForPrompt,
@@ -231,7 +231,7 @@ import {
231
231
  import {
232
232
  assertReadablePath
233
233
  } from "./chunk-JJFJWD35.js";
234
- import "./chunk-Y3SEC5EC.js";
234
+ import "./chunk-6XXHAS5B.js";
235
235
  import {
236
236
  AGENTIC_BEHAVIOR_GUIDELINE,
237
237
  AUTHOR,
@@ -247,7 +247,7 @@ import {
247
247
  SKILLS_DIR_NAME,
248
248
  VERSION,
249
249
  buildUserIdentityPrompt
250
- } from "./chunk-A7YZLLWN.js";
250
+ } from "./chunk-2R6Y5SJH.js";
251
251
  import {
252
252
  runWithExecutionContext,
253
253
  runWithSessionKey
@@ -978,7 +978,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
978
978
  Cost: ${formatCost(cost)}` : "";
979
979
  let memoryLine = "";
980
980
  try {
981
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-E3UYP7RJ.js");
981
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-WNPZSVE4.js");
982
982
  const pending = countPendingMemories2(ctx.config.getConfigDir());
983
983
  if (pending > 0) memoryLine = `
984
984
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1907,7 +1907,7 @@ async function handleTest(args, ctx) {
1907
1907
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1908
1908
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1909
1909
  }
1910
- const runTests = ctx.runTests ?? (await import("./run-tests-FLGSE63O.js")).executeTests;
1910
+ const runTests = ctx.runTests ?? (await import("./run-tests-MFXQ76ZJ.js")).executeTests;
1911
1911
  const report = await runTests(testArgs);
1912
1912
  ctx.send({ type: "info", message: report });
1913
1913
  } catch (err) {
@@ -2183,7 +2183,7 @@ async function handleMemory(args, ctx) {
2183
2183
  }
2184
2184
  if (intent.kind === "status") {
2185
2185
  const { getChatIndexStatus } = await import("./chat-index-7CLR4CBG.js");
2186
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-E3UYP7RJ.js");
2186
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-WNPZSVE4.js");
2187
2187
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
2188
2188
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
2189
2189
  const view = buildMemoryStatusView({
@@ -2206,7 +2206,7 @@ async function handleMemory(args, ctx) {
2206
2206
  return;
2207
2207
  }
2208
2208
  if (intent.kind === "recall") {
2209
- const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-E3UYP7RJ.js");
2209
+ const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-WNPZSVE4.js");
2210
2210
  const { searchChatMemory } = await import("./chat-index-7CLR4CBG.js");
2211
2211
  const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
2212
2212
  if (persistentHits.length > 0) {
@@ -2327,7 +2327,7 @@ async function handleMemory(args, ctx) {
2327
2327
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
2328
2328
  } else if (intent.kind === "export") {
2329
2329
  if (args[1] === "md") {
2330
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-E3UYP7RJ.js");
2330
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-WNPZSVE4.js");
2331
2331
  ctx.send({
2332
2332
  type: "export_data",
2333
2333
  format: "md",
@@ -4,9 +4,9 @@ import {
4
4
  googleSearchContext,
5
5
  isToolCapableProvider,
6
6
  truncateOutput
7
- } from "./chunk-YHMQMP2I.js";
7
+ } from "./chunk-6RCGQQFM.js";
8
8
  import "./chunk-6JHACXB3.js";
9
- import "./chunk-PGQ5OV3P.js";
9
+ import "./chunk-I3GEFCKP.js";
10
10
  import "./chunk-RWRZVQCB.js";
11
11
  import "./chunk-B3MPYI4E.js";
12
12
  import "./chunk-M6HLYG33.js";
@@ -17,22 +17,22 @@ import "./chunk-JL44HGZC.js";
17
17
  import "./chunk-3FEZSLGI.js";
18
18
  import {
19
19
  runTool
20
- } from "./chunk-662ZJPJE.js";
20
+ } from "./chunk-VS43QMR2.js";
21
21
  import "./chunk-RS7SKYTS.js";
22
22
  import {
23
23
  getDangerLevel,
24
24
  runLeanAgentLoop
25
- } from "./chunk-GVAAGBHX.js";
25
+ } from "./chunk-E2W2MI6H.js";
26
26
  import "./chunk-TU3L3PW7.js";
27
27
  import "./chunk-HOSJZMQS.js";
28
28
  import {
29
29
  atomicWriteFileSync
30
30
  } from "./chunk-BMLQPSHP.js";
31
31
  import "./chunk-JJFJWD35.js";
32
- import "./chunk-Y3SEC5EC.js";
32
+ import "./chunk-6XXHAS5B.js";
33
33
  import {
34
34
  SUBAGENT_ALLOWED_TOOLS
35
- } from "./chunk-A7YZLLWN.js";
35
+ } from "./chunk-2R6Y5SJH.js";
36
36
  import "./chunk-SXIJLSVF.js";
37
37
 
38
38
  // src/hub/task-orchestrator.ts
@@ -68,6 +68,7 @@ async function executeTask(options) {
68
68
  maxRounds,
69
69
  context,
70
70
  configManager,
71
+ thinking,
71
72
  onToolCall,
72
73
  onToolResult,
73
74
  onRound
@@ -113,7 +114,7 @@ ${task}`, timestamp: /* @__PURE__ */ new Date() }
113
114
  messages,
114
115
  model,
115
116
  maxRounds,
116
- chatParams: { temperature: 0.3, maxTokens: 8192 },
117
+ chatParams: { temperature: 0.3, maxTokens: 8192, ...thinking ?? {} },
117
118
  executeTools: (calls) => executor.executeAll(calls),
118
119
  systemPromptForRound: (_round, remaining) => {
119
120
  if (remaining <= 3 && remaining > 1) {
@@ -481,6 +482,7 @@ Example:
481
482
  maxRounds: maxRoundsPerTask,
482
483
  context: this.config.context,
483
484
  configManager: this.configManager,
485
+ thinking: this.config.thinking,
484
486
  onToolCall: (call, danger) => {
485
487
  const icon = danger === "write" ? chalk.yellow("\u270E") : chalk.cyan("\u2699");
486
488
  console.log(chalk.dim(` ${icon} ${call.name}`));
@@ -5,14 +5,14 @@ import {
5
5
  formatCost,
6
6
  getPricing,
7
7
  setCostCurrency
8
- } from "./chunk-46OEMKQX.js";
8
+ } from "./chunk-NFPJ6KUU.js";
9
9
  import "./chunk-RS7SKYTS.js";
10
10
  import {
11
11
  ConfigManager
12
- } from "./chunk-KEOMNFBH.js";
12
+ } from "./chunk-COHKPZ2E.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-BMLQPSHP.js";
15
- import "./chunk-A7YZLLWN.js";
15
+ import "./chunk-2R6Y5SJH.js";
16
16
 
17
17
  // src/cli/usage.ts
18
18
  function classifyRowCost(row) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.319",
3
+ "version": "0.4.321",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",