@ycodium-ai/agent-acp 0.2.3935 → 0.2.3982

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/dist/index.js +6 -41
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -7,6 +7,9 @@ var __export = (target, all) => {
7
7
  // src/index.ts
8
8
  import { definePlugin } from "@ycodium-ai/plugin-api";
9
9
 
10
+ // ../../packages/plugin-api/src/version.ts
11
+ var PLUGIN_API_VERSION = 76;
12
+
10
13
  // src/acpInstance.ts
11
14
  import * as NodeOS3 from "node:os";
12
15
  import * as NodePath4 from "node:path";
@@ -26772,9 +26775,7 @@ function createExecutorRuntime({
26772
26775
  if (shared.disposed) {
26773
26776
  return;
26774
26777
  }
26775
- eventStream.publish(
26776
- options.originBindingGeneration === void 0 ? event : { ...event, originBindingGeneration: options.originBindingGeneration }
26777
- );
26778
+ eventStream.publish(event);
26778
26779
  };
26779
26780
  const emit = publish;
26780
26781
  const emitArtifacts = makeArtifactEmitter({
@@ -28967,38 +28968,6 @@ var CLIENT_INFO2 = { name: "ycodium-agent-acp", version: "0.2.0" };
28967
28968
  var yieldTick = () => new Promise((resolve2) => {
28968
28969
  setImmediate(resolve2);
28969
28970
  });
28970
- var EventBus = class {
28971
- #queued = [];
28972
- #waiters = [];
28973
- #closed = false;
28974
- push(event) {
28975
- const waiter = this.#waiters.shift();
28976
- if (waiter) {
28977
- waiter({ done: false, value: event });
28978
- return;
28979
- }
28980
- this.#queued.push(event);
28981
- }
28982
- close() {
28983
- if (this.#closed) return;
28984
- this.#closed = true;
28985
- while (this.#waiters.length > 0) {
28986
- this.#waiters.shift()?.({ done: true, value: void 0 });
28987
- }
28988
- }
28989
- [Symbol.asyncIterator]() {
28990
- return {
28991
- next: () => {
28992
- const queued = this.#queued.shift();
28993
- if (queued !== void 0) return Promise.resolve({ done: false, value: queued });
28994
- if (this.#closed) return Promise.resolve({ done: true, value: void 0 });
28995
- return new Promise((resolve2) => {
28996
- this.#waiters.push(resolve2);
28997
- });
28998
- }
28999
- };
29000
- }
29001
- };
29002
28971
  function expandHomePath(value) {
29003
28972
  if (value === "~") return NodeOS3.homedir();
29004
28973
  if (value.startsWith("~/") || value.startsWith("~\\")) {
@@ -29040,7 +29009,6 @@ async function stopBooked(booked, processExit) {
29040
29009
  }
29041
29010
  var createAcpInstance = (config2, host) => {
29042
29011
  const recipe = parseAcpInstanceConfig(config2);
29043
- const events = new EventBus();
29044
29012
  const threads = /* @__PURE__ */ new Map();
29045
29013
  let disposed = false;
29046
29014
  const { requireThread, registerSession, stopSession, stopAll } = createAcpSessionRegistry(
@@ -29050,7 +29018,6 @@ var createAcpInstance = (config2, host) => {
29050
29018
  );
29051
29019
  const disposeOnce = createRetryableClose(async () => {
29052
29020
  await stopAll();
29053
- events.close();
29054
29021
  });
29055
29022
  const instance = {
29056
29023
  probe: async (signal) => {
@@ -29173,7 +29140,6 @@ var createAcpInstance = (config2, host) => {
29173
29140
  slashCommands: acpCommandsToSlashCommands(commands)
29174
29141
  }),
29175
29142
  ...requestedModelId === void 0 ? {} : { requestedModelId },
29176
- ...input2.bindingGeneration === void 0 ? {} : { originBindingGeneration: input2.bindingGeneration },
29177
29143
  ...autoApprove === void 0 ? {} : { autoApprove },
29178
29144
  ...resume === void 0 ? {} : { resumeSessionId: resume.sessionId },
29179
29145
  // 内置编排那一条排第一,后面跟用户在插件中心配的;缺了 `mcpServers` 这一栏,
@@ -29182,7 +29148,7 @@ var createAcpInstance = (config2, host) => {
29182
29148
  });
29183
29149
  const forwarding = (async () => {
29184
29150
  for await (const event of executor.events) {
29185
- events.push(event);
29151
+ input2.events.emit(event);
29186
29152
  }
29187
29153
  })();
29188
29154
  try {
@@ -29321,7 +29287,6 @@ var createAcpInstance = (config2, host) => {
29321
29287
  const booked = requireThread(threadId);
29322
29288
  return { threadId, turns: booked.turns };
29323
29289
  },
29324
- events,
29325
29290
  continuationKey: acpContinuationKey(recipe),
29326
29291
  dispose: () => {
29327
29292
  disposed = true;
@@ -29344,7 +29309,7 @@ var executors = [
29344
29309
  ];
29345
29310
  var index_default = definePlugin({
29346
29311
  id: "agent-acp",
29347
- apiVersion: 69,
29312
+ apiVersion: PLUGIN_API_VERSION,
29348
29313
  executors,
29349
29314
  activate(ctx) {
29350
29315
  ctx.log.info("generic ACP executor ready");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-acp",
3
- "version": "0.2.3935",
3
+ "version": "0.2.3982",
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-acp-executor": "0.2.0",
25
- "@ycodium-ai/plugin-api": "0.2.3935",
24
+ "@ycodium-ai/plugin-api": "0.2.3982",
25
+ "ycodium-acp-executor": "0.2.3982",
26
26
  "ycodium-executor-testing": "0.0.0"
27
27
  },
28
28
  "ycodium": {