@ycodium-ai/agent-acp 0.2.3976 → 0.2.3990
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 +3 -41
- 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 = 77;
|
|
12
12
|
|
|
13
13
|
// src/acpInstance.ts
|
|
14
14
|
import * as NodeOS3 from "node:os";
|
|
@@ -26775,9 +26775,7 @@ function createExecutorRuntime({
|
|
|
26775
26775
|
if (shared.disposed) {
|
|
26776
26776
|
return;
|
|
26777
26777
|
}
|
|
26778
|
-
eventStream.publish(
|
|
26779
|
-
options.originBindingGeneration === void 0 ? event : { ...event, originBindingGeneration: options.originBindingGeneration }
|
|
26780
|
-
);
|
|
26778
|
+
eventStream.publish(event);
|
|
26781
26779
|
};
|
|
26782
26780
|
const emit = publish;
|
|
26783
26781
|
const emitArtifacts = makeArtifactEmitter({
|
|
@@ -28970,38 +28968,6 @@ var CLIENT_INFO2 = { name: "ycodium-agent-acp", version: "0.2.0" };
|
|
|
28970
28968
|
var yieldTick = () => new Promise((resolve2) => {
|
|
28971
28969
|
setImmediate(resolve2);
|
|
28972
28970
|
});
|
|
28973
|
-
var EventBus = class {
|
|
28974
|
-
#queued = [];
|
|
28975
|
-
#waiters = [];
|
|
28976
|
-
#closed = false;
|
|
28977
|
-
push(event) {
|
|
28978
|
-
const waiter = this.#waiters.shift();
|
|
28979
|
-
if (waiter) {
|
|
28980
|
-
waiter({ done: false, value: event });
|
|
28981
|
-
return;
|
|
28982
|
-
}
|
|
28983
|
-
this.#queued.push(event);
|
|
28984
|
-
}
|
|
28985
|
-
close() {
|
|
28986
|
-
if (this.#closed) return;
|
|
28987
|
-
this.#closed = true;
|
|
28988
|
-
while (this.#waiters.length > 0) {
|
|
28989
|
-
this.#waiters.shift()?.({ done: true, value: void 0 });
|
|
28990
|
-
}
|
|
28991
|
-
}
|
|
28992
|
-
[Symbol.asyncIterator]() {
|
|
28993
|
-
return {
|
|
28994
|
-
next: () => {
|
|
28995
|
-
const queued = this.#queued.shift();
|
|
28996
|
-
if (queued !== void 0) return Promise.resolve({ done: false, value: queued });
|
|
28997
|
-
if (this.#closed) return Promise.resolve({ done: true, value: void 0 });
|
|
28998
|
-
return new Promise((resolve2) => {
|
|
28999
|
-
this.#waiters.push(resolve2);
|
|
29000
|
-
});
|
|
29001
|
-
}
|
|
29002
|
-
};
|
|
29003
|
-
}
|
|
29004
|
-
};
|
|
29005
28971
|
function expandHomePath(value) {
|
|
29006
28972
|
if (value === "~") return NodeOS3.homedir();
|
|
29007
28973
|
if (value.startsWith("~/") || value.startsWith("~\\")) {
|
|
@@ -29043,7 +29009,6 @@ async function stopBooked(booked, processExit) {
|
|
|
29043
29009
|
}
|
|
29044
29010
|
var createAcpInstance = (config2, host) => {
|
|
29045
29011
|
const recipe = parseAcpInstanceConfig(config2);
|
|
29046
|
-
const events = new EventBus();
|
|
29047
29012
|
const threads = /* @__PURE__ */ new Map();
|
|
29048
29013
|
let disposed = false;
|
|
29049
29014
|
const { requireThread, registerSession, stopSession, stopAll } = createAcpSessionRegistry(
|
|
@@ -29053,7 +29018,6 @@ var createAcpInstance = (config2, host) => {
|
|
|
29053
29018
|
);
|
|
29054
29019
|
const disposeOnce = createRetryableClose(async () => {
|
|
29055
29020
|
await stopAll();
|
|
29056
|
-
events.close();
|
|
29057
29021
|
});
|
|
29058
29022
|
const instance = {
|
|
29059
29023
|
probe: async (signal) => {
|
|
@@ -29176,7 +29140,6 @@ var createAcpInstance = (config2, host) => {
|
|
|
29176
29140
|
slashCommands: acpCommandsToSlashCommands(commands)
|
|
29177
29141
|
}),
|
|
29178
29142
|
...requestedModelId === void 0 ? {} : { requestedModelId },
|
|
29179
|
-
...input2.bindingGeneration === void 0 ? {} : { originBindingGeneration: input2.bindingGeneration },
|
|
29180
29143
|
...autoApprove === void 0 ? {} : { autoApprove },
|
|
29181
29144
|
...resume === void 0 ? {} : { resumeSessionId: resume.sessionId },
|
|
29182
29145
|
// 内置编排那一条排第一,后面跟用户在插件中心配的;缺了 `mcpServers` 这一栏,
|
|
@@ -29185,7 +29148,7 @@ var createAcpInstance = (config2, host) => {
|
|
|
29185
29148
|
});
|
|
29186
29149
|
const forwarding = (async () => {
|
|
29187
29150
|
for await (const event of executor.events) {
|
|
29188
|
-
events.
|
|
29151
|
+
input2.events.emit(event);
|
|
29189
29152
|
}
|
|
29190
29153
|
})();
|
|
29191
29154
|
try {
|
|
@@ -29324,7 +29287,6 @@ var createAcpInstance = (config2, host) => {
|
|
|
29324
29287
|
const booked = requireThread(threadId);
|
|
29325
29288
|
return { threadId, turns: booked.turns };
|
|
29326
29289
|
},
|
|
29327
|
-
events,
|
|
29328
29290
|
continuationKey: acpContinuationKey(recipe),
|
|
29329
29291
|
dispose: () => {
|
|
29330
29292
|
disposed = true;
|
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.3990",
|
|
4
4
|
"description": "Generic ACP executor: user-supplied CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"@types/node": "24.12.4",
|
|
22
22
|
"esbuild": "0.28.1",
|
|
23
23
|
"vite-plus": "0.2.2",
|
|
24
|
-
"ycodium-
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.3990",
|
|
25
25
|
"ycodium-executor-testing": "0.0.0",
|
|
26
|
-
"
|
|
26
|
+
"ycodium-acp-executor": "0.2.0"
|
|
27
27
|
},
|
|
28
28
|
"ycodium": {
|
|
29
29
|
"plugin": "./dist/index.js",
|