jinzd-ai-cli 0.4.94 → 0.4.95

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.
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-W7HOEYAA.js";
4
+ } from "./chunk-3OTYFGZX.js";
5
5
  import "./chunk-2ZD3YTVM.js";
6
- import "./chunk-CD6FE5UD.js";
6
+ import "./chunk-KANAVCLY.js";
7
7
 
8
8
  // src/cli/batch.ts
9
9
  import Anthropic from "@anthropic-ai/sdk";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-6VRJGH25.js";
24
24
  import {
25
25
  runTestsTool
26
- } from "./chunk-PH7ICI6O.js";
26
+ } from "./chunk-64NBIR3O.js";
27
27
  import {
28
28
  CONFIG_DIR_NAME,
29
29
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
@@ -31,7 +31,7 @@ import {
31
31
  SUBAGENT_ALLOWED_TOOLS,
32
32
  SUBAGENT_DEFAULT_MAX_ROUNDS,
33
33
  SUBAGENT_MAX_ROUNDS_LIMIT
34
- } from "./chunk-CD6FE5UD.js";
34
+ } from "./chunk-KANAVCLY.js";
35
35
 
36
36
  // src/tools/types.ts
37
37
  function isFileWriteTool(name) {
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-CD6FE5UD.js";
11
+ } from "./chunk-KANAVCLY.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-CD6FE5UD.js";
4
+ } from "./chunk-KANAVCLY.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync } from "child_process";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.94";
9
+ var VERSION = "0.4.95";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.94";
4
+ var VERSION = "0.4.95";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  schemaToJsonSchema,
4
4
  truncateForPersist
5
- } from "./chunk-7SBSBVUB.js";
5
+ } from "./chunk-27KAJTRV.js";
6
6
  import {
7
7
  AuthError,
8
8
  ProviderError,
@@ -21,7 +21,7 @@ import {
21
21
  MCP_PROTOCOL_VERSION,
22
22
  MCP_TOOL_PREFIX,
23
23
  VERSION
24
- } from "./chunk-CD6FE5UD.js";
24
+ } from "./chunk-KANAVCLY.js";
25
25
 
26
26
  // src/providers/claude.ts
27
27
  import Anthropic from "@anthropic-ai/sdk";
@@ -1075,6 +1075,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1075
1075
  const toolCallAccumulators = /* @__PURE__ */ new Map();
1076
1076
  let toolCallsEnded = false;
1077
1077
  let thinkingStarted = false;
1078
+ let reasoningAccumulator = "";
1078
1079
  for await (const chunk of stream) {
1079
1080
  const choice = chunk.choices[0];
1080
1081
  if (!choice && chunk.usage) {
@@ -1090,7 +1091,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1090
1091
  }
1091
1092
  yield {
1092
1093
  type: "done",
1093
- usage: toUsage(chunk.usage)
1094
+ usage: toUsage(chunk.usage),
1095
+ ...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {}
1094
1096
  };
1095
1097
  continue;
1096
1098
  }
@@ -1102,6 +1104,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1102
1104
  yield { type: "thinking_start" };
1103
1105
  thinkingStarted = true;
1104
1106
  }
1107
+ reasoningAccumulator += reasoningDelta;
1105
1108
  yield { type: "thinking_delta", delta: reasoningDelta };
1106
1109
  continue;
1107
1110
  }
@@ -1143,7 +1146,10 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1143
1146
  yield { type: "tool_call_end", index: idx };
1144
1147
  }
1145
1148
  }
1146
- yield { type: "done" };
1149
+ yield {
1150
+ type: "done",
1151
+ ...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {}
1152
+ };
1147
1153
  } catch (err) {
1148
1154
  if (err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError")) {
1149
1155
  throw err;
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-7UABIQX3.js";
39
+ } from "./chunk-DBNMDRR3.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -1586,6 +1586,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1586
1586
  const toolCallAccumulators = /* @__PURE__ */ new Map();
1587
1587
  let toolCallsEnded = false;
1588
1588
  let thinkingStarted = false;
1589
+ let reasoningAccumulator = "";
1589
1590
  for await (const chunk of stream) {
1590
1591
  const choice = chunk.choices[0];
1591
1592
  if (!choice && chunk.usage) {
@@ -1601,7 +1602,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1601
1602
  }
1602
1603
  yield {
1603
1604
  type: "done",
1604
- usage: toUsage(chunk.usage)
1605
+ usage: toUsage(chunk.usage),
1606
+ ...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {}
1605
1607
  };
1606
1608
  continue;
1607
1609
  }
@@ -1613,6 +1615,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1613
1615
  yield { type: "thinking_start" };
1614
1616
  thinkingStarted = true;
1615
1617
  }
1618
+ reasoningAccumulator += reasoningDelta;
1616
1619
  yield { type: "thinking_delta", delta: reasoningDelta };
1617
1620
  continue;
1618
1621
  }
@@ -1654,7 +1657,10 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1654
1657
  yield { type: "tool_call_end", index: idx };
1655
1658
  }
1656
1659
  }
1657
- yield { type: "done" };
1660
+ yield {
1661
+ type: "done",
1662
+ ...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {}
1663
+ };
1658
1664
  } catch (err) {
1659
1665
  if (err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError")) {
1660
1666
  throw err;
@@ -10308,6 +10314,7 @@ ${summaryResult.content}`,
10308
10314
  const toolArgBuffers = /* @__PURE__ */ new Map();
10309
10315
  let usage;
10310
10316
  let rawContent;
10317
+ let reasoningContent;
10311
10318
  for await (const event of streamGen) {
10312
10319
  if (ac.signal.aborted) break;
10313
10320
  switch (event.type) {
@@ -10349,6 +10356,7 @@ ${summaryResult.content}`,
10349
10356
  case "done":
10350
10357
  usage = event.usage;
10351
10358
  rawContent = event.rawContent;
10359
+ reasoningContent = event.reasoningContent;
10352
10360
  break;
10353
10361
  }
10354
10362
  }
@@ -10359,7 +10367,7 @@ ${summaryResult.content}`,
10359
10367
  if (textContent) {
10360
10368
  toolCalls._streamedText = textContent;
10361
10369
  }
10362
- return { toolCalls, usage };
10370
+ return { toolCalls, usage, reasoningContent };
10363
10371
  }
10364
10372
  return { content: textContent, usage };
10365
10373
  }
@@ -11367,7 +11375,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
11367
11375
  case "test": {
11368
11376
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
11369
11377
  try {
11370
- const { executeTests } = await import("./run-tests-WMM2B3RR.js");
11378
+ const { executeTests } = await import("./run-tests-A3HXYWYK.js");
11371
11379
  const argStr = args.join(" ").trim();
11372
11380
  let testArgs = {};
11373
11381
  if (argStr) {
@@ -385,7 +385,7 @@ ${content}`);
385
385
  }
386
386
  }
387
387
  async function runTaskMode(config, providers, configManager, topic) {
388
- const { TaskOrchestrator } = await import("./task-orchestrator-FDV2MB42.js");
388
+ const { TaskOrchestrator } = await import("./task-orchestrator-3TEU2UXU.js");
389
389
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
390
390
  let interrupted = false;
391
391
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -30,10 +30,10 @@ import {
30
30
  saveDevState,
31
31
  sessionHasMeaningfulContent,
32
32
  setupProxy
33
- } from "./chunk-73IPBBNL.js";
33
+ } from "./chunk-VWJ6UJCF.js";
34
34
  import {
35
35
  ConfigManager
36
- } from "./chunk-W7HOEYAA.js";
36
+ } from "./chunk-3OTYFGZX.js";
37
37
  import {
38
38
  ToolExecutor,
39
39
  ToolRegistry,
@@ -52,7 +52,7 @@ import {
52
52
  spawnAgentContext,
53
53
  theme,
54
54
  undoStack
55
- } from "./chunk-7SBSBVUB.js";
55
+ } from "./chunk-27KAJTRV.js";
56
56
  import "./chunk-2ZD3YTVM.js";
57
57
  import {
58
58
  fileCheckpoints
@@ -70,7 +70,7 @@ import "./chunk-KJLJPUY2.js";
70
70
  import "./chunk-6VRJGH25.js";
71
71
  import "./chunk-2DXY7UGF.js";
72
72
  import "./chunk-KHYD3WXE.js";
73
- import "./chunk-PH7ICI6O.js";
73
+ import "./chunk-64NBIR3O.js";
74
74
  import {
75
75
  AGENTIC_BEHAVIOR_GUIDELINE,
76
76
  AUTHOR,
@@ -92,7 +92,7 @@ import {
92
92
  SKILLS_DIR_NAME,
93
93
  VERSION,
94
94
  buildUserIdentityPrompt
95
- } from "./chunk-CD6FE5UD.js";
95
+ } from "./chunk-KANAVCLY.js";
96
96
 
97
97
  // src/index.ts
98
98
  import { program } from "commander";
@@ -2612,7 +2612,7 @@ ${hint}` : "")
2612
2612
  usage: "/test [command|filter]",
2613
2613
  async execute(args, ctx) {
2614
2614
  try {
2615
- const { executeTests } = await import("./run-tests-BOAAXNEG.js");
2615
+ const { executeTests } = await import("./run-tests-52NQAWN3.js");
2616
2616
  const argStr = args.join(" ").trim();
2617
2617
  let testArgs = {};
2618
2618
  if (argStr) {
@@ -5747,6 +5747,7 @@ Session '${this.resumeSessionId}' not found.
5747
5747
  const toolCallAccumulators = /* @__PURE__ */ new Map();
5748
5748
  let usage;
5749
5749
  let rawContent;
5750
+ let reasoningContent;
5750
5751
  let spinnerStopped = false;
5751
5752
  const stopSpinner = () => {
5752
5753
  if (!spinnerStopped) {
@@ -5795,6 +5796,7 @@ Session '${this.resumeSessionId}' not found.
5795
5796
  case "done":
5796
5797
  if (event.usage) usage = event.usage;
5797
5798
  if (event.rawContent) rawContent = event.rawContent;
5799
+ if (event.reasoningContent) reasoningContent = event.reasoningContent;
5798
5800
  break;
5799
5801
  }
5800
5802
  }
@@ -5806,7 +5808,8 @@ Session '${this.resumeSessionId}' not found.
5806
5808
  textContent: textParts.join(""),
5807
5809
  toolCalls: [],
5808
5810
  usage,
5809
- rawContent
5811
+ rawContent,
5812
+ reasoningContent
5810
5813
  };
5811
5814
  }
5812
5815
  throw err;
@@ -5836,7 +5839,8 @@ Session '${this.resumeSessionId}' not found.
5836
5839
  textContent: textParts.join(""),
5837
5840
  toolCalls,
5838
5841
  usage,
5839
- rawContent
5842
+ rawContent,
5843
+ reasoningContent
5840
5844
  };
5841
5845
  }
5842
5846
  async handleChatWithTools(provider, messages, modelOverride) {
@@ -6048,7 +6052,11 @@ ${mcpBudgetNote}` : "");
6048
6052
  if (streamResult.textContent) {
6049
6053
  toolCalls._streamedText = streamResult.textContent;
6050
6054
  }
6051
- result = { toolCalls, usage: streamResult.usage };
6055
+ result = {
6056
+ toolCalls,
6057
+ usage: streamResult.usage,
6058
+ ...streamResult.reasoningContent ? { reasoningContent: streamResult.reasoningContent } : {}
6059
+ };
6052
6060
  } else {
6053
6061
  result = { content: streamResult.textContent, usage: streamResult.usage };
6054
6062
  alreadyRendered = true;
@@ -6738,7 +6746,7 @@ program.command("web").description("Start Web UI server with browser-based chat
6738
6746
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
6739
6747
  process.exit(1);
6740
6748
  }
6741
- const { startWebServer } = await import("./server-UOK3E2GS.js");
6749
+ const { startWebServer } = await import("./server-ON3BYV2G.js");
6742
6750
  await startWebServer({ port, host: options.host });
6743
6751
  });
6744
6752
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
@@ -6861,7 +6869,7 @@ program.command("sessions").description("List recent conversation sessions").act
6861
6869
  });
6862
6870
  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) => {
6863
6871
  try {
6864
- const batch = await import("./batch-NB5TANTJ.js");
6872
+ const batch = await import("./batch-EGNBEZ7L.js");
6865
6873
  switch (action) {
6866
6874
  case "submit":
6867
6875
  if (!arg) {
@@ -6904,7 +6912,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
6904
6912
  }
6905
6913
  });
6906
6914
  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) => {
6907
- const { startMcpServer } = await import("./server-2TLRJGFI.js");
6915
+ const { startMcpServer } = await import("./server-DBJJXHMH.js");
6908
6916
  await startMcpServer({
6909
6917
  allowDestructive: !!options.allowDestructive,
6910
6918
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7031,7 +7039,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7031
7039
  }),
7032
7040
  config.get("customProviders")
7033
7041
  );
7034
- const { startHub } = await import("./hub-OPIWSRVH.js");
7042
+ const { startHub } = await import("./hub-6NPN7P76.js");
7035
7043
  await startHub(
7036
7044
  {
7037
7045
  topic: topic ?? "",
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-PH7ICI6O.js";
6
- import "./chunk-CD6FE5UD.js";
5
+ } from "./chunk-64NBIR3O.js";
6
+ import "./chunk-KANAVCLY.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-7UABIQX3.js";
4
+ } from "./chunk-DBNMDRR3.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -3,7 +3,7 @@ import {
3
3
  ToolRegistry,
4
4
  getDangerLevel,
5
5
  schemaToJsonSchema
6
- } from "./chunk-7SBSBVUB.js";
6
+ } from "./chunk-27KAJTRV.js";
7
7
  import "./chunk-2ZD3YTVM.js";
8
8
  import "./chunk-4BKXL7SM.js";
9
9
  import "./chunk-ANYYM4CF.js";
@@ -12,10 +12,10 @@ import "./chunk-KJLJPUY2.js";
12
12
  import "./chunk-6VRJGH25.js";
13
13
  import "./chunk-2DXY7UGF.js";
14
14
  import "./chunk-KHYD3WXE.js";
15
- import "./chunk-PH7ICI6O.js";
15
+ import "./chunk-64NBIR3O.js";
16
16
  import {
17
17
  VERSION
18
- } from "./chunk-CD6FE5UD.js";
18
+ } from "./chunk-KANAVCLY.js";
19
19
 
20
20
  // src/mcp/server.ts
21
21
  import { createInterface } from "readline";
@@ -23,10 +23,10 @@ import {
23
23
  persistToolRound,
24
24
  rebuildExtraMessages,
25
25
  setupProxy
26
- } from "./chunk-73IPBBNL.js";
26
+ } from "./chunk-VWJ6UJCF.js";
27
27
  import {
28
28
  ConfigManager
29
- } from "./chunk-W7HOEYAA.js";
29
+ } from "./chunk-3OTYFGZX.js";
30
30
  import {
31
31
  ToolExecutor,
32
32
  ToolRegistry,
@@ -44,7 +44,7 @@ import {
44
44
  spawnAgentContext,
45
45
  truncateOutput,
46
46
  undoStack
47
- } from "./chunk-7SBSBVUB.js";
47
+ } from "./chunk-27KAJTRV.js";
48
48
  import "./chunk-2ZD3YTVM.js";
49
49
  import "./chunk-4BKXL7SM.js";
50
50
  import "./chunk-ANYYM4CF.js";
@@ -53,7 +53,7 @@ import "./chunk-KJLJPUY2.js";
53
53
  import "./chunk-6VRJGH25.js";
54
54
  import "./chunk-2DXY7UGF.js";
55
55
  import "./chunk-KHYD3WXE.js";
56
- import "./chunk-PH7ICI6O.js";
56
+ import "./chunk-64NBIR3O.js";
57
57
  import {
58
58
  AGENTIC_BEHAVIOR_GUIDELINE,
59
59
  AUTHOR,
@@ -72,7 +72,7 @@ import {
72
72
  SKILLS_DIR_NAME,
73
73
  VERSION,
74
74
  buildUserIdentityPrompt
75
- } from "./chunk-CD6FE5UD.js";
75
+ } from "./chunk-KANAVCLY.js";
76
76
 
77
77
  // src/web/server.ts
78
78
  import express from "express";
@@ -1178,6 +1178,7 @@ ${summaryResult.content}`,
1178
1178
  const toolArgBuffers = /* @__PURE__ */ new Map();
1179
1179
  let usage;
1180
1180
  let rawContent;
1181
+ let reasoningContent;
1181
1182
  for await (const event of streamGen) {
1182
1183
  if (ac.signal.aborted) break;
1183
1184
  switch (event.type) {
@@ -1219,6 +1220,7 @@ ${summaryResult.content}`,
1219
1220
  case "done":
1220
1221
  usage = event.usage;
1221
1222
  rawContent = event.rawContent;
1223
+ reasoningContent = event.reasoningContent;
1222
1224
  break;
1223
1225
  }
1224
1226
  }
@@ -1229,7 +1231,7 @@ ${summaryResult.content}`,
1229
1231
  if (textContent) {
1230
1232
  toolCalls._streamedText = textContent;
1231
1233
  }
1232
- return { toolCalls, usage };
1234
+ return { toolCalls, usage, reasoningContent };
1233
1235
  }
1234
1236
  return { content: textContent, usage };
1235
1237
  }
@@ -2237,7 +2239,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2237
2239
  case "test": {
2238
2240
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2239
2241
  try {
2240
- const { executeTests } = await import("./run-tests-BOAAXNEG.js");
2242
+ const { executeTests } = await import("./run-tests-52NQAWN3.js");
2241
2243
  const argStr = args.join(" ").trim();
2242
2244
  let testArgs = {};
2243
2245
  if (argStr) {
@@ -4,7 +4,7 @@ import {
4
4
  getDangerLevel,
5
5
  googleSearchContext,
6
6
  truncateOutput
7
- } from "./chunk-7SBSBVUB.js";
7
+ } from "./chunk-27KAJTRV.js";
8
8
  import "./chunk-2ZD3YTVM.js";
9
9
  import "./chunk-4BKXL7SM.js";
10
10
  import "./chunk-ANYYM4CF.js";
@@ -13,10 +13,10 @@ import "./chunk-KJLJPUY2.js";
13
13
  import "./chunk-6VRJGH25.js";
14
14
  import "./chunk-2DXY7UGF.js";
15
15
  import "./chunk-KHYD3WXE.js";
16
- import "./chunk-PH7ICI6O.js";
16
+ import "./chunk-64NBIR3O.js";
17
17
  import {
18
18
  SUBAGENT_ALLOWED_TOOLS
19
- } from "./chunk-CD6FE5UD.js";
19
+ } from "./chunk-KANAVCLY.js";
20
20
 
21
21
  // src/hub/task-orchestrator.ts
22
22
  import { createInterface } from "readline";