@ycodium-ai/agent-acp 0.2.5100 → 0.2.5177
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 +48 -31
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
9
9
|
|
|
10
10
|
// ../../packages/plugin-api/src/version.ts
|
|
11
|
-
var PLUGIN_API_VERSION =
|
|
11
|
+
var PLUGIN_API_VERSION = 152;
|
|
12
12
|
|
|
13
13
|
// src/acpInstance.ts
|
|
14
14
|
import { raceAbort as raceAbort3 } from "@ycodium-ai/plugin-api/executor";
|
|
@@ -28897,6 +28897,14 @@ function bindAcpInstanceThreads(input2) {
|
|
|
28897
28897
|
});
|
|
28898
28898
|
return { table, threads, requireThread, registerSession, stopSession, disposeOnce, threadOps };
|
|
28899
28899
|
}
|
|
28900
|
+
function assertAcpInstanceCanStart(input2) {
|
|
28901
|
+
if (input2.disposed) throw new Error("instance disposed");
|
|
28902
|
+
throwIfStartAborted(input2.signal);
|
|
28903
|
+
if (input2.binaryPath.length === 0) throw new Error(input2.missingProgram);
|
|
28904
|
+
}
|
|
28905
|
+
function readCliVersionIfConfigured(binaryPath, probe) {
|
|
28906
|
+
return (signal) => binaryPath.length === 0 ? Promise.resolve(null) : probe(signal);
|
|
28907
|
+
}
|
|
28900
28908
|
function acpProgramNotConfigured(detail) {
|
|
28901
28909
|
return {
|
|
28902
28910
|
installed: false,
|
|
@@ -29107,6 +29115,29 @@ function acpEffortCapabilities(configOptions, descriptor) {
|
|
|
29107
29115
|
};
|
|
29108
29116
|
}
|
|
29109
29117
|
|
|
29118
|
+
// ../../packages/ycodium-acp-executor/src/card-defaults.ts
|
|
29119
|
+
var PLUGIN_MANAGED_ACP_CARD_DEFAULTS = {
|
|
29120
|
+
commandName: "",
|
|
29121
|
+
launchArgs: "",
|
|
29122
|
+
homeEnvVar: "",
|
|
29123
|
+
environment: [],
|
|
29124
|
+
install: null,
|
|
29125
|
+
signIn: [],
|
|
29126
|
+
deviceCodeSignInArgs: [],
|
|
29127
|
+
npmPackage: "",
|
|
29128
|
+
homebrewFormula: "",
|
|
29129
|
+
selfUpdateArgs: [],
|
|
29130
|
+
docsUrl: "",
|
|
29131
|
+
setupNote: "",
|
|
29132
|
+
defaultModel: "",
|
|
29133
|
+
customModelIdExample: "",
|
|
29134
|
+
modelSlugAliases: null,
|
|
29135
|
+
mcpTransports: ["stdio", "http", "sse"],
|
|
29136
|
+
pluginManaged: true,
|
|
29137
|
+
verifiedSkills: false,
|
|
29138
|
+
everydayHarness: false
|
|
29139
|
+
};
|
|
29140
|
+
|
|
29110
29141
|
// ../../packages/ycodium-acp-executor/src/probe.ts
|
|
29111
29142
|
function withProbeTimeout(promise2, timeoutMs, what, signal) {
|
|
29112
29143
|
signal?.throwIfAborted();
|
|
@@ -29376,25 +29407,7 @@ var ACP_CARD = {
|
|
|
29376
29407
|
driverKind: ACP_DRIVER_KIND,
|
|
29377
29408
|
displayName: "Other agent (ACP)",
|
|
29378
29409
|
iconUrl: "./assets/icon.svg",
|
|
29379
|
-
|
|
29380
|
-
launchArgs: "",
|
|
29381
|
-
homeEnvVar: "",
|
|
29382
|
-
environment: [],
|
|
29383
|
-
install: null,
|
|
29384
|
-
signIn: [],
|
|
29385
|
-
deviceCodeSignInArgs: [],
|
|
29386
|
-
npmPackage: "",
|
|
29387
|
-
homebrewFormula: "",
|
|
29388
|
-
selfUpdateArgs: [],
|
|
29389
|
-
docsUrl: "",
|
|
29390
|
-
setupNote: "",
|
|
29391
|
-
defaultModel: "",
|
|
29392
|
-
customModelIdExample: "",
|
|
29393
|
-
modelSlugAliases: null,
|
|
29394
|
-
mcpTransports: ["stdio", "http", "sse"],
|
|
29395
|
-
pluginManaged: true,
|
|
29396
|
-
verifiedSkills: false,
|
|
29397
|
-
everydayHarness: false,
|
|
29410
|
+
...PLUGIN_MANAGED_ACP_CARD_DEFAULTS,
|
|
29398
29411
|
capabilities: {
|
|
29399
29412
|
// 执行器发送前按 agent 宣告的通道在会话里切(`session/set_model` 或 `session/set_config_option`),
|
|
29400
29413
|
// 不重开会话。agent 没宣告型号或档位时请求的值一样到不了它,重开也不会让它生效,只会关掉子 agent。
|
|
@@ -29698,20 +29711,24 @@ var createAcpInstance = (config2, host) => {
|
|
|
29698
29711
|
};
|
|
29699
29712
|
}
|
|
29700
29713
|
},
|
|
29701
|
-
readCliVersion: (
|
|
29702
|
-
recipe,
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29714
|
+
readCliVersion: readCliVersionIfConfigured(
|
|
29715
|
+
recipe.binaryPath,
|
|
29716
|
+
(signal) => probeAcpAgentVersion({
|
|
29717
|
+
recipe,
|
|
29718
|
+
host,
|
|
29719
|
+
env: homeLaunchEnv(recipe, recipe.homePath),
|
|
29720
|
+
...signal === void 0 ? {} : { signal }
|
|
29721
|
+
})
|
|
29722
|
+
),
|
|
29707
29723
|
// 暂不处理 input.readOnlyDirectories(有意为之):acp 经共享的 ycodium-acp-executor 起会话,
|
|
29708
29724
|
// 还没用真机确认这家 CLI 对 cwd 之外的读怎么处理、要不要放行。确认之后再接这一栏。
|
|
29709
29725
|
startSession: async (input2, signal) => {
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
29713
|
-
|
|
29714
|
-
|
|
29726
|
+
assertAcpInstanceCanStart({
|
|
29727
|
+
disposed,
|
|
29728
|
+
binaryPath: recipe.binaryPath,
|
|
29729
|
+
missingProgram: "ACP program path is not configured",
|
|
29730
|
+
...signal === void 0 ? {} : { signal }
|
|
29731
|
+
});
|
|
29715
29732
|
const cwd = input2.cwd ?? host.workspacePath(input2.threadId);
|
|
29716
29733
|
if (cwd.trim() === "") throw new Error("workspace path missing");
|
|
29717
29734
|
await stopExistingAcpThread(table, input2.threadId, () => disposed, signal);
|
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.5177",
|
|
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
|
-
"
|
|
25
|
-
"ycodium-
|
|
24
|
+
"ycodium-acp-executor": "0.2.5177",
|
|
25
|
+
"@ycodium-ai/plugin-api": "0.2.5177",
|
|
26
26
|
"ycodium-executor-testing": "0.0.0",
|
|
27
27
|
"ycodium-instance-config": "0.0.0"
|
|
28
28
|
},
|