@agentconnect.md/daemon 1.0.0-rc.78 → 1.0.0-rc.79

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
@@ -13463,6 +13463,7 @@ const FactsRuntimeProfile = object({
13463
13463
  "partial",
13464
13464
  "none"
13465
13465
  ]),
13466
+ acpProtocolVersion: number().int().optional(),
13466
13467
  toolCalling: boolean()
13467
13468
  });
13468
13469
  //#endregion
@@ -18003,6 +18004,7 @@ var AcpHost = class {
18003
18004
  canLoad = false;
18004
18005
  promptCaps = {};
18005
18006
  lastModelOptions = null;
18007
+ negotiatedProtocolVersion;
18006
18008
  constructor(runtime, opts) {
18007
18009
  this.runtime = runtime;
18008
18010
  this.opts = opts;
@@ -18055,6 +18057,7 @@ var AcpHost = class {
18055
18057
  writeTextFile: false
18056
18058
  } }
18057
18059
  });
18060
+ this.negotiatedProtocolVersion = init.protocolVersion;
18058
18061
  this.canLoad = init.agentCapabilities?.loadSession ?? false;
18059
18062
  this.promptCaps = init.agentCapabilities?.promptCapabilities ?? {};
18060
18063
  this.opts.log?.debug(`acp: agent initialized (loadSession=${this.canLoad}, prompt caps: image=${!!this.promptCaps.image} audio=${!!this.promptCaps.audio} embeddedContext=${!!this.promptCaps.embeddedContext})`);
@@ -18078,6 +18081,11 @@ var AcpHost = class {
18078
18081
  modelOptions() {
18079
18082
  return this.lastModelOptions;
18080
18083
  }
18084
+ /** The ACP protocol version negotiated at initialize, or undefined before the
18085
+ * handshake completed. Used by the runtime probe to report ACP coverage. */
18086
+ acpProtocolVersion() {
18087
+ return this.negotiatedProtocolVersion;
18088
+ }
18081
18089
  /** True iff THIS agent process created or loaded `sessionId` in its current lifetime. */
18082
18090
  hasSession(sessionId) {
18083
18091
  return this.live.has(sessionId);
@@ -82208,12 +82216,14 @@ async function probeRuntime(id, rt, cwd, opts = {}) {
82208
82216
  try {
82209
82217
  const opt = await Promise.race([run(), timeout]);
82210
82218
  const models = (opt?.models ?? []).filter((m) => m !== "default");
82219
+ const acpProtocolVersion = host.acpProtocolVersion();
82211
82220
  opts.log?.info(`probe: ${id} ok (models: ${models.length ? models.join(", ") : "none advertised"})`);
82212
82221
  return {
82213
82222
  runtime: id,
82214
82223
  ok: true,
82215
82224
  models,
82216
- currentModel: opt?.current
82225
+ currentModel: opt?.current,
82226
+ acpProtocolVersion
82217
82227
  };
82218
82228
  } catch (err) {
82219
82229
  const error = err.message;
@@ -83655,6 +83665,7 @@ var Daemon = class Daemon {
83655
83665
  runtimeNames = {};
83656
83666
  runtimeVersions = {};
83657
83667
  runtimeModels = /* @__PURE__ */ new Map();
83668
+ runtimeAcpVersions = /* @__PURE__ */ new Map();
83658
83669
  probing = false;
83659
83670
  lastProbeAtMs = 0;
83660
83671
  cpClient;
@@ -84751,6 +84762,7 @@ var Daemon = class Daemon {
84751
84762
  version: this.runtimeVersions[id] ?? "",
84752
84763
  models: this.runtimeModels.get(id) ?? [],
84753
84764
  acpSupport: "full",
84765
+ acpProtocolVersion: this.runtimeAcpVersions.get(id),
84754
84766
  toolCalling: true
84755
84767
  };
84756
84768
  }
@@ -84780,7 +84792,11 @@ var Daemon = class Daemon {
84780
84792
  this.log.info(`probe: sweeping ${ids.length} runtime(s): ${ids.join(", ")}`);
84781
84793
  try {
84782
84794
  const results = await (this.opts.probeRuntimes ?? probeAllRuntimes)(this.runtimes, { log: this.log });
84783
- for (const r of results) this.runtimeModels.set(r.runtime, r.ok ? r.models : []);
84795
+ for (const r of results) {
84796
+ this.runtimeModels.set(r.runtime, r.ok ? r.models : []);
84797
+ if (r.ok && r.acpProtocolVersion !== void 0) this.runtimeAcpVersions.set(r.runtime, r.acpProtocolVersion);
84798
+ else this.runtimeAcpVersions.delete(r.runtime);
84799
+ }
84784
84800
  this.lastProbeAtMs = Date.now();
84785
84801
  const okCount = results.filter((r) => r.ok).length;
84786
84802
  this.log.info(`probe: sweep complete — ${okCount}/${results.length} runtime(s) reachable`);