@qwen-code/qwen-code 0.6.1-nightly.20260107.2c285394 → 0.6.1-nightly.20260107.f6771c08

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 (2) hide show
  1. package/cli.js +50 -20
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -131344,6 +131344,7 @@ var init_converter = __esm({
131344
131344
  const totalTokens = usage2.total_tokens || 0;
131345
131345
  const extendedUsage = usage2;
131346
131346
  const cachedTokens = usage2.prompt_tokens_details?.cached_tokens ?? extendedUsage.cached_tokens ?? 0;
131347
+ const thinkingTokens = usage2.completion_tokens_details?.reasoning_tokens || 0;
131347
131348
  let finalPromptTokens = promptTokens;
131348
131349
  let finalCompletionTokens = completionTokens;
131349
131350
  if (totalTokens > 0 && promptTokens === 0 && completionTokens === 0) {
@@ -131354,7 +131355,8 @@ var init_converter = __esm({
131354
131355
  promptTokenCount: finalPromptTokens,
131355
131356
  candidatesTokenCount: finalCompletionTokens,
131356
131357
  totalTokenCount: totalTokens,
131357
- cachedContentTokenCount: cachedTokens
131358
+ cachedContentTokenCount: cachedTokens,
131359
+ thoughtsTokenCount: thinkingTokens
131358
131360
  };
131359
131361
  }
131360
131362
  return response;
@@ -139677,9 +139679,7 @@ var init_default = __esm({
139677
139679
  };
139678
139680
  }
139679
139681
  getDefaultGenerationConfig() {
139680
- return {
139681
- topP: 0.95
139682
- };
139682
+ return {};
139683
139683
  }
139684
139684
  };
139685
139685
  }
@@ -140399,13 +140399,7 @@ var init_pipeline = __esm({
140399
140399
  return params;
140400
140400
  }
140401
140401
  buildReasoningConfig() {
140402
- const reasoning = this.contentGeneratorConfig.reasoning;
140403
- if (reasoning === false) {
140404
- return {};
140405
- }
140406
- return {
140407
- reasoning_effort: reasoning?.effort ?? "medium"
140408
- };
140402
+ return {};
140409
140403
  }
140410
140404
  /**
140411
140405
  * Common error handling wrapper for execute methods
@@ -154435,7 +154429,7 @@ __export(geminiContentGenerator_exports, {
154435
154429
  createGeminiContentGenerator: () => createGeminiContentGenerator
154436
154430
  });
154437
154431
  function createGeminiContentGenerator(config2, gcConfig) {
154438
- const version2 = "0.6.1-nightly.20260107.2c285394";
154432
+ const version2 = "0.6.1-nightly.20260107.f6771c08";
154439
154433
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
154440
154434
  const baseHeaders = {
154441
154435
  "User-Agent": userAgent2
@@ -171507,7 +171501,7 @@ var init_coreToolScheduler = __esm({
171507
171501
  this.setToolCallOutcome(reqInfo.callId, ToolConfirmationOutcome.ProceedAlways);
171508
171502
  this.setStatusInternal(reqInfo.callId, "scheduled");
171509
171503
  } else {
171510
- const shouldAutoDeny = !this.config.isInteractive() && !this.config.getIdeMode() && !this.config.getExperimentalZedIntegration() && this.config.getInputFormat() !== InputFormat.STREAM_JSON;
171504
+ const shouldAutoDeny = !this.config.isInteractive() && !this.config.getExperimentalZedIntegration() && this.config.getInputFormat() !== InputFormat.STREAM_JSON;
171511
171505
  if (shouldAutoDeny) {
171512
171506
  const errorMessage = `Qwen Code requires permission to use "${reqInfo.name}", but that permission was declined.`;
171513
171507
  this.setStatusInternal(reqInfo.callId, "error", createErrorResponse(reqInfo, new Error(errorMessage), ToolErrorType.EXECUTION_DENIED));
@@ -227009,6 +227003,7 @@ var init_src2 = __esm({
227009
227003
  init_fileUtils();
227010
227004
  init_retry();
227011
227005
  init_shell_utils();
227006
+ init_tool_utils();
227012
227007
  init_terminalSerializer();
227013
227008
  init_systemEncoding();
227014
227009
  init_textUtils();
@@ -356328,7 +356323,7 @@ __name(getPackageJson, "getPackageJson");
356328
356323
  // packages/cli/src/utils/version.ts
356329
356324
  async function getCliVersion() {
356330
356325
  const pkgJson = await getPackageJson();
356331
- return "0.6.1-nightly.20260107.2c285394";
356326
+ return "0.6.1-nightly.20260107.f6771c08";
356332
356327
  }
356333
356328
  __name(getCliVersion, "getCliVersion");
356334
356329
 
@@ -360776,14 +360771,36 @@ async function loadCliConfig(settings, extensions, extensionEnablementManager, a
360776
360771
  interactive = false;
360777
360772
  }
360778
360773
  const extraExcludes = [];
360774
+ const resolvedCoreTools = argv.coreTools || settings.tools?.core || [];
360775
+ const resolvedAllowedTools = argv.allowedTools || settings.tools?.allowed || [];
360776
+ const isExplicitlyEnabled = /* @__PURE__ */ __name((toolName) => {
360777
+ if (resolvedCoreTools.length > 0) {
360778
+ if (isToolEnabled(toolName, resolvedCoreTools, [])) {
360779
+ return true;
360780
+ }
360781
+ }
360782
+ if (resolvedAllowedTools.length > 0) {
360783
+ if (isToolEnabled(toolName, resolvedAllowedTools, [])) {
360784
+ return true;
360785
+ }
360786
+ }
360787
+ return false;
360788
+ }, "isExplicitlyEnabled");
360789
+ const excludeUnlessExplicit = /* @__PURE__ */ __name((toolName) => {
360790
+ if (!isExplicitlyEnabled(toolName)) {
360791
+ extraExcludes.push(toolName);
360792
+ }
360793
+ }, "excludeUnlessExplicit");
360779
360794
  if (!interactive && !argv.experimentalAcp && inputFormat !== InputFormat.STREAM_JSON) {
360780
360795
  switch (approvalMode) {
360781
360796
  case ApprovalMode.PLAN:
360782
360797
  case ApprovalMode.DEFAULT:
360783
- extraExcludes.push(ShellTool.Name, EditTool.Name, WriteFileTool.Name);
360798
+ excludeUnlessExplicit(ShellTool.Name);
360799
+ excludeUnlessExplicit(EditTool.Name);
360800
+ excludeUnlessExplicit(WriteFileTool.Name);
360784
360801
  break;
360785
360802
  case ApprovalMode.AUTO_EDIT:
360786
- extraExcludes.push(ShellTool.Name);
360803
+ excludeUnlessExplicit(ShellTool.Name);
360787
360804
  break;
360788
360805
  case ApprovalMode.YOLO:
360789
360806
  break;
@@ -364389,7 +364406,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
364389
364406
 
364390
364407
  // packages/cli/src/generated/git-commit.ts
364391
364408
  init_esbuild_shims();
364392
- var GIT_COMMIT_INFO2 = "101c48a3";
364409
+ var GIT_COMMIT_INFO2 = "c27e81ff";
364393
364410
 
364394
364411
  // packages/cli/src/utils/systemInfo.ts
364395
364412
  async function getNpmVersion() {
@@ -367833,15 +367850,28 @@ var ShellProcessor = class {
367833
367850
  const command2 = injection.resolvedCommand;
367834
367851
  if (!command2) continue;
367835
367852
  const { allAllowed, disallowedCommands, blockReason, isHardDenial } = checkCommandPermissions(command2, config2, sessionShellAllowlist);
367853
+ const allowedTools = config2.getAllowedTools() || [];
367854
+ const invocation = {
367855
+ params: { command: command2 }
367856
+ };
367857
+ const isAllowedBySettings = doesToolInvocationMatch(
367858
+ "run_shell_command",
367859
+ invocation,
367860
+ allowedTools
367861
+ );
367836
367862
  if (!allAllowed) {
367837
367863
  if (isHardDenial) {
367838
367864
  throw new Error(
367839
367865
  `${this.commandName} cannot be run. Blocked command: "${command2}". Reason: ${blockReason || "Blocked by configuration."}`
367840
367866
  );
367841
367867
  }
367842
- if (config2.getApprovalMode() !== ApprovalMode.YOLO) {
367843
- disallowedCommands.forEach((uc) => commandsToConfirm.add(uc));
367868
+ if (isAllowedBySettings) {
367869
+ continue;
367870
+ }
367871
+ if (config2.getApprovalMode() === ApprovalMode.YOLO) {
367872
+ continue;
367844
367873
  }
367874
+ disallowedCommands.forEach((uc) => commandsToConfirm.add(uc));
367845
367875
  }
367846
367876
  }
367847
367877
  if (commandsToConfirm.size > 0) {
@@ -415391,7 +415421,7 @@ var GeminiAgent = class {
415391
415421
  name: APPROVAL_MODE_INFO[mode].name,
415392
415422
  description: APPROVAL_MODE_INFO[mode].description
415393
415423
  }));
415394
- const version2 = "0.6.1-nightly.20260107.2c285394";
415424
+ const version2 = "0.6.1-nightly.20260107.f6771c08";
415395
415425
  return {
415396
415426
  protocolVersion: PROTOCOL_VERSION,
415397
415427
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.6.1-nightly.20260107.2c285394",
3
+ "version": "0.6.1-nightly.20260107.f6771c08",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "locales"
21
21
  ],
22
22
  "config": {
23
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.6.1-nightly.20260107.2c285394"
23
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.6.1-nightly.20260107.f6771c08"
24
24
  },
25
25
  "dependencies": {
26
26
  "tiktoken": "^1.0.21"