@ycodium-ai/agent-acp 0.2.2868 → 0.2.2874
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 +16 -12
- package/locales/zh-CN.json +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -25356,7 +25356,8 @@ function modelSelectionStateFromSetup(setup) {
|
|
|
25356
25356
|
sessionModelsAdvertised: sessionModels !== void 0,
|
|
25357
25357
|
modelConfigId,
|
|
25358
25358
|
currentModelId,
|
|
25359
|
-
advertisedModelValues: strategy === "config-option" ? modelConfigOption === void 0 ? [] : collectSessionConfigOptionValues(modelConfigOption) : collectSessionModelIds(sessionModels)
|
|
25359
|
+
advertisedModelValues: strategy === "config-option" ? modelConfigOption === void 0 ? [] : collectSessionConfigOptionValues(modelConfigOption) : collectSessionModelIds(sessionModels),
|
|
25360
|
+
configOptions: setup.configOptions
|
|
25360
25361
|
};
|
|
25361
25362
|
}
|
|
25362
25363
|
|
|
@@ -25981,12 +25982,13 @@ function createAcpExecutor(options) {
|
|
|
25981
25982
|
if (value === input2.state.currentModelId) {
|
|
25982
25983
|
return input2.state;
|
|
25983
25984
|
}
|
|
25985
|
+
let configOptions = input2.state.configOptions;
|
|
25984
25986
|
if (input2.state.strategy === "config-option") {
|
|
25985
|
-
await connection.request(
|
|
25986
|
-
|
|
25987
|
-
configId: input2.state.modelConfigId,
|
|
25988
|
-
|
|
25989
|
-
|
|
25987
|
+
const switched = await connection.request(
|
|
25988
|
+
"session/set_config_option",
|
|
25989
|
+
{ sessionId: input2.acpSessionId, configId: input2.state.modelConfigId, value }
|
|
25990
|
+
);
|
|
25991
|
+
configOptions = switched?.configOptions ?? configOptions;
|
|
25990
25992
|
} else {
|
|
25991
25993
|
await connection.request("session/set_model", {
|
|
25992
25994
|
sessionId: input2.acpSessionId,
|
|
@@ -25996,13 +25998,12 @@ function createAcpExecutor(options) {
|
|
|
25996
25998
|
if (!isLive(input2.expectedGeneration)) {
|
|
25997
25999
|
throw new AcpExecutorDisposedError();
|
|
25998
26000
|
}
|
|
25999
|
-
return { ...input2.state, currentModelId: value };
|
|
26001
|
+
return { ...input2.state, currentModelId: value, configOptions };
|
|
26000
26002
|
};
|
|
26001
26003
|
const applyRequestedEffort = async (input2) => {
|
|
26002
26004
|
const requested = input2.requestedEffort?.trim();
|
|
26003
26005
|
if (!requested) return;
|
|
26004
|
-
const
|
|
26005
|
-
const effort = findAcpEffortConfig(configOptions);
|
|
26006
|
+
const effort = findAcpEffortConfig(input2.configOptions);
|
|
26006
26007
|
if (effort === void 0) return;
|
|
26007
26008
|
const matched = effort.choices.find((choice) => choice.value === requested);
|
|
26008
26009
|
if (matched === void 0) {
|
|
@@ -26102,7 +26103,7 @@ function createAcpExecutor(options) {
|
|
|
26102
26103
|
expectedGeneration
|
|
26103
26104
|
});
|
|
26104
26105
|
await applyRequestedEffort({
|
|
26105
|
-
|
|
26106
|
+
configOptions: nextModelSelectionState.configOptions,
|
|
26106
26107
|
acpSessionId: nextSessionId,
|
|
26107
26108
|
requestedEffort: options.requestedEffort,
|
|
26108
26109
|
expectedGeneration
|
|
@@ -26750,6 +26751,8 @@ var ACP_CARD = {
|
|
|
26750
26751
|
everydayHarness: false,
|
|
26751
26752
|
capabilities: {
|
|
26752
26753
|
sessionModelSwitch: "unsupported",
|
|
26754
|
+
// 力度档只在建会话时经 `session/set_config_option` 发一次:中途换档,宿主带 resume cursor 重开。
|
|
26755
|
+
sessionOptionSwitch: "unsupported",
|
|
26753
26756
|
// **这一位仍是空头支票,切档走的是下面那位。** `setRuntimeMode` 在这里只改自己的
|
|
26754
26757
|
// 会话记录,从不发 RPC——宿主四档发不到 CLI 上。它没删是因为编排还在读它(哪些手
|
|
26755
26758
|
// 要重开会话),但用户真正切得动的是 `nativeModeSwitch` 那条:这只手自报几档、
|
|
@@ -26919,7 +26922,8 @@ import * as NodeOS from "node:os";
|
|
|
26919
26922
|
import * as NodePath from "node:path";
|
|
26920
26923
|
import {
|
|
26921
26924
|
describeExecutorSpawnFailure,
|
|
26922
|
-
ExecutorSpawnRefusedError
|
|
26925
|
+
ExecutorSpawnRefusedError,
|
|
26926
|
+
REASONING_OPTION_LABEL
|
|
26923
26927
|
} from "@ycodium-ai/plugin-api/executor";
|
|
26924
26928
|
import { nodeStreamsFromHandle } from "@ycodium-ai/plugin-api/process-stdin";
|
|
26925
26929
|
var PROBE_REQUEST_TIMEOUT_MS = 15e3;
|
|
@@ -26970,7 +26974,7 @@ function acpProbeModels(setup) {
|
|
|
26970
26974
|
optionDescriptors: [
|
|
26971
26975
|
{
|
|
26972
26976
|
id: ACP_EFFORT_OPTION_ID,
|
|
26973
|
-
label: effort.label ||
|
|
26977
|
+
label: effort.label || REASONING_OPTION_LABEL,
|
|
26974
26978
|
type: "select",
|
|
26975
26979
|
options: effort.choices.map((choice) => ({
|
|
26976
26980
|
id: choice.value,
|
package/locales/zh-CN.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"placeholder": "例如 acp 或 --acp"
|
|
12
12
|
},
|
|
13
13
|
"homePath": {
|
|
14
|
-
"title": "
|
|
15
|
-
"description": "
|
|
14
|
+
"title": "账号目录",
|
|
15
|
+
"description": "此账号的登录信息与历史记录所在的目录。留空则使用该命令行工具的默认目录。",
|
|
16
16
|
"placeholder": "例如 ~/.my-agent-work"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-acp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2874",
|
|
4
4
|
"description": "Generic ACP executor: user-supplied CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@types/node": "24.12.4",
|
|
22
22
|
"esbuild": "0.28.1",
|
|
23
23
|
"vite-plus": "0.2.2",
|
|
24
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
25
|
-
"ycodium-acp-executor": "0.2.
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.2874",
|
|
25
|
+
"ycodium-acp-executor": "0.2.2874",
|
|
26
26
|
"ycodium-executor-testing": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"ycodium": {
|