@ycodium-ai/agent-dsh 0.2.2868 → 0.2.2870

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.
package/dist/index.js CHANGED
@@ -7414,6 +7414,8 @@ var DSH_CARD = {
7414
7414
  // DSH 换模型只有 `session/set_config_option` 一条路;库会按握手形状自动协商,
7415
7415
  // 但插件不承诺在跑着的会话里换型号,名片必须说实话。
7416
7416
  sessionModelSwitch: "unsupported",
7417
+ // 力度档只在建会话时经 `session/set_config_option` 发一次:中途换档,宿主带 resume cursor 重开。
7418
+ sessionOptionSwitch: "unsupported",
7417
7419
  // **这一位今天是空头支票,别当它验过**(2026-09-19 拿真 `dsh --profile acp`
7418
7420
  // 起一轮 ACP 会话实测)。两件事都不成立:
7419
7421
  //
@@ -7479,6 +7481,7 @@ var DSH_CARD = {
7479
7481
  };
7480
7482
 
7481
7483
  // src/dshInstance.ts
7484
+ import { modelSelectionStringOption } from "@ycodium-ai/plugin-api/executor";
7482
7485
  import { nodeStreamsFromHandle as nodeStreamsFromHandle2 } from "@ycodium-ai/plugin-api/process-stdin";
7483
7486
 
7484
7487
  // ../../packages/ycodium-acp-executor/src/executor.ts
@@ -32749,7 +32752,8 @@ function modelSelectionStateFromSetup(setup) {
32749
32752
  sessionModelsAdvertised: sessionModels !== void 0,
32750
32753
  modelConfigId,
32751
32754
  currentModelId,
32752
- advertisedModelValues: strategy === "config-option" ? modelConfigOption === void 0 ? [] : collectSessionConfigOptionValues(modelConfigOption) : collectSessionModelIds(sessionModels)
32755
+ advertisedModelValues: strategy === "config-option" ? modelConfigOption === void 0 ? [] : collectSessionConfigOptionValues(modelConfigOption) : collectSessionModelIds(sessionModels),
32756
+ configOptions: setup.configOptions
32753
32757
  };
32754
32758
  }
32755
32759
 
@@ -33374,12 +33378,13 @@ function createAcpExecutor(options) {
33374
33378
  if (value === input2.state.currentModelId) {
33375
33379
  return input2.state;
33376
33380
  }
33381
+ let configOptions = input2.state.configOptions;
33377
33382
  if (input2.state.strategy === "config-option") {
33378
- await connection.request("session/set_config_option", {
33379
- sessionId: input2.acpSessionId,
33380
- configId: input2.state.modelConfigId,
33381
- value
33382
- });
33383
+ const switched = await connection.request(
33384
+ "session/set_config_option",
33385
+ { sessionId: input2.acpSessionId, configId: input2.state.modelConfigId, value }
33386
+ );
33387
+ configOptions = switched?.configOptions ?? configOptions;
33383
33388
  } else {
33384
33389
  await connection.request("session/set_model", {
33385
33390
  sessionId: input2.acpSessionId,
@@ -33389,13 +33394,12 @@ function createAcpExecutor(options) {
33389
33394
  if (!isLive(input2.expectedGeneration)) {
33390
33395
  throw new AcpExecutorDisposedError();
33391
33396
  }
33392
- return { ...input2.state, currentModelId: value };
33397
+ return { ...input2.state, currentModelId: value, configOptions };
33393
33398
  };
33394
33399
  const applyRequestedEffort = async (input2) => {
33395
33400
  const requested = input2.requestedEffort?.trim();
33396
33401
  if (!requested) return;
33397
- const configOptions = typeof input2.setup === "object" && input2.setup !== null ? input2.setup.configOptions : void 0;
33398
- const effort = findAcpEffortConfig(configOptions);
33402
+ const effort = findAcpEffortConfig(input2.configOptions);
33399
33403
  if (effort === void 0) return;
33400
33404
  const matched = effort.choices.find((choice) => choice.value === requested);
33401
33405
  if (matched === void 0) {
@@ -33495,7 +33499,7 @@ function createAcpExecutor(options) {
33495
33499
  expectedGeneration
33496
33500
  });
33497
33501
  await applyRequestedEffort({
33498
- setup,
33502
+ configOptions: nextModelSelectionState.configOptions,
33499
33503
  acpSessionId: nextSessionId,
33500
33504
  requestedEffort: options.requestedEffort,
33501
33505
  expectedGeneration
@@ -34521,7 +34525,8 @@ import * as NodeOS4 from "node:os";
34521
34525
  import * as NodePath4 from "node:path";
34522
34526
  import {
34523
34527
  describeExecutorSpawnFailure,
34524
- ExecutorSpawnRefusedError
34528
+ ExecutorSpawnRefusedError,
34529
+ REASONING_OPTION_LABEL
34525
34530
  } from "@ycodium-ai/plugin-api/executor";
34526
34531
  import { nodeStreamsFromHandle } from "@ycodium-ai/plugin-api/process-stdin";
34527
34532
 
@@ -34625,7 +34630,7 @@ function dshProbeModels(setup) {
34625
34630
  optionDescriptors: [
34626
34631
  {
34627
34632
  id: DSH_EFFORT_OPTION_ID,
34628
- label: effort.label || "Reasoning",
34633
+ label: effort.label || REASONING_OPTION_LABEL,
34629
34634
  type: "select",
34630
34635
  options: effort.choices.map((choice) => ({
34631
34636
  id: choice.value,
@@ -34847,6 +34852,10 @@ var createDshInstance = (config2, host) => {
34847
34852
  const { readable, writable, stderrTail } = nodeStreamsFromHandle2(handle);
34848
34853
  const resume = input2.discardResumeCursor === true ? void 0 : parseAcpResumeCursor(input2.resumeCursor, RESUME_SCHEMA_VERSION);
34849
34854
  const requestedModelId = modelIdFromSelection(input2.modelSelection);
34855
+ const requestedEffort = modelSelectionStringOption(
34856
+ input2.modelSelection,
34857
+ DSH_EFFORT_OPTION_ID
34858
+ );
34850
34859
  const executor = createAcpExecutor({
34851
34860
  readable,
34852
34861
  writable,
@@ -34866,6 +34875,7 @@ var createDshInstance = (config2, host) => {
34866
34875
  // 持久会话而不重放记录,发 load 会卡在永远不结算的重放门上。
34867
34876
  resumeMethod: "session/resume",
34868
34877
  ...requestedModelId === void 0 ? {} : { requestedModelId },
34878
+ ...requestedEffort === void 0 ? {} : { requestedEffort },
34869
34879
  ...input2.bindingGeneration === void 0 ? {} : { originBindingGeneration: input2.bindingGeneration },
34870
34880
  // 内置编排那一条排第一,后面跟用户在插件中心配的;缺了这一栏,
34871
34881
  // `mcp__ycodium__*` 整套工具(浏览器等)在这只手的会话里都不存在。
@@ -6,7 +6,7 @@
6
6
  "placeholder": "dsh"
7
7
  },
8
8
  "homePath": {
9
- "title": "账户目录",
9
+ "title": "账号目录",
10
10
  "description": "会话保存在这里,因此共用同一目录的 provider 可以接手彼此的会话,目录不同的则不能。留空则使用该命令行工具的默认目录(~/.dsh)。",
11
11
  "placeholder": "例如 ~/.dsh-work"
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-dsh",
3
- "version": "0.2.2868",
3
+ "version": "0.2.2870",
4
4
  "description": "DeepSeek Harness executor: dsh CLI over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -22,9 +22,9 @@
22
22
  "esbuild": "0.28.1",
23
23
  "vite-plus": "0.2.2",
24
24
  "yaml": "^2.9.0",
25
- "@ycodium-ai/plugin-api": "0.2.2868",
26
- "ycodium-acp-executor": "0.2.2868",
27
- "ycodium-executor-testing": "0.0.0"
25
+ "@ycodium-ai/plugin-api": "0.2.2870",
26
+ "ycodium-executor-testing": "0.0.0",
27
+ "ycodium-acp-executor": "0.2.2870"
28
28
  },
29
29
  "ycodium": {
30
30
  "plugin": "./dist/index.js",