@cortexkit/aft 0.43.1 → 0.44.0

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 +20 -10
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1513,7 +1513,7 @@ var init_pool = __esm(() => {
1513
1513
  CLEANUP_INTERVAL_MS = 60 * 1000;
1514
1514
  });
1515
1515
 
1516
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/auth.ts
1516
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/auth.ts
1517
1517
  import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
1518
1518
  function computeProof(key, domain, clientNonce, serverNonce, daemonId) {
1519
1519
  const mac = createHmac("sha256", Buffer.from(key));
@@ -1574,7 +1574,7 @@ var init_auth = __esm(() => {
1574
1574
  };
1575
1575
  });
1576
1576
 
1577
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/connection-file.ts
1577
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/connection-file.ts
1578
1578
  import { promises as fs } from "node:fs";
1579
1579
  function toBytes(value, field) {
1580
1580
  if (!Array.isArray(value) || value.some((n) => typeof n !== "number")) {
@@ -1642,7 +1642,7 @@ var init_connection_file = __esm(() => {
1642
1642
  };
1643
1643
  });
1644
1644
 
1645
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/envelope.ts
1645
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/envelope.ts
1646
1646
  function isPureHeader(ty) {
1647
1647
  return ty === 6 /* Cancel */ || ty === 7 /* Ping */ || ty === 8 /* Pong */ || ty === 11 /* Goodbye */;
1648
1648
  }
@@ -1741,7 +1741,7 @@ var init_envelope = __esm(() => {
1741
1741
  };
1742
1742
  });
1743
1743
 
1744
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/socket.ts
1744
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/socket.ts
1745
1745
  import net from "node:net";
1746
1746
 
1747
1747
  class SubcSocket {
@@ -1766,6 +1766,9 @@ class SubcSocket {
1766
1766
  sock.on("end", () => fail(new SocketClosedError("subc closed the connection")));
1767
1767
  sock.on("close", () => fail(new SocketClosedError("subc connection closed")));
1768
1768
  }
1769
+ localPort() {
1770
+ return this.sock.localPort ?? null;
1771
+ }
1769
1772
  static connect(host, port, deadlineMs) {
1770
1773
  return new Promise((resolve4, reject) => {
1771
1774
  const sock = net.connect({ host, port });
@@ -1926,7 +1929,7 @@ var init_socket = __esm(() => {
1926
1929
  };
1927
1930
  });
1928
1931
 
1929
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/client.ts
1932
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/client.ts
1930
1933
  import { promises as fs2 } from "node:fs";
1931
1934
 
1932
1935
  class SubcClient {
@@ -2121,7 +2124,7 @@ class SubcClient {
2121
2124
  timer: null
2122
2125
  };
2123
2126
  pending.timer = setTimeout(() => {
2124
- this.rejectPending(key, pending, new SubcError(`request on channel ${channel} timed out after ${ms}ms`));
2127
+ this.rejectPending(key, pending, new SubcError(this.timeoutMessage(channel, corr, ms)));
2125
2128
  }, ms);
2126
2129
  this.pending.set(key, pending);
2127
2130
  this.sock.write(encodeFrame(frame), Date.now() + ms).catch((err) => {
@@ -2168,7 +2171,7 @@ class SubcClient {
2168
2171
  classifyFailure
2169
2172
  };
2170
2173
  pending.timer = setTimeout(() => {
2171
- this.rejectPending(key, pending, new SubcError(`request on channel ${channel} timed out after ${ms}ms`));
2174
+ this.rejectPending(key, pending, new SubcError(this.timeoutMessage(channel, corr, ms)));
2172
2175
  }, ms);
2173
2176
  this.pending.set(key, pending);
2174
2177
  const write = this.sock.writeTracked(encodeFrame(frame), Date.now() + ms);
@@ -2316,7 +2319,9 @@ class SubcClient {
2316
2319
  for (const cached of this.routes.values()) {
2317
2320
  if (cached.closed)
2318
2321
  continue;
2319
- const channel = await this.routeOpen(cached.target, cached.identity);
2322
+ const channel = await this.routeOpen(cached.target, cached.identity, {
2323
+ consumerIdentity: cached.consumerIdentity ?? null
2324
+ });
2320
2325
  if (cached.closed) {
2321
2326
  this.sendRouteGoodbye(channel);
2322
2327
  continue;
@@ -2325,6 +2330,11 @@ class SubcClient {
2325
2330
  cached.generation = this.generation;
2326
2331
  }
2327
2332
  }
2333
+ timeoutMessage(channel, corr, ms) {
2334
+ const port = this.sock.localPort();
2335
+ const where = port === null ? "channel" : `local_port=${port} channel`;
2336
+ return `request on ${where} ${channel} corr ${corr} timed out after ${ms}ms`;
2337
+ }
2328
2338
  routeClosedDuringOpen() {
2329
2339
  return new SubcCallError("not_sent", "route was closed before route.open completed", "route_closed");
2330
2340
  }
@@ -2513,7 +2523,7 @@ var init_client = __esm(() => {
2513
2523
  };
2514
2524
  });
2515
2525
 
2516
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/provider.ts
2526
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/provider.ts
2517
2527
  import { Buffer as Buffer2 } from "node:buffer";
2518
2528
 
2519
2529
  class SubcProvider {
@@ -3066,7 +3076,7 @@ var init_provider = __esm(() => {
3066
3076
  };
3067
3077
  });
3068
3078
 
3069
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/index.ts
3079
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.2.1/node_modules/@cortexkit/subc-client/src/index.ts
3070
3080
  var init_src = __esm(() => {
3071
3081
  init_client();
3072
3082
  init_connection_file();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft",
3
- "version": "0.43.1",
3
+ "version": "0.44.0",
4
4
  "type": "module",
5
5
  "description": "Unified CLI for Agent File Tools (AFT) — setup, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@clack/prompts": "^1.6.0",
27
- "@cortexkit/aft-bridge": "0.43.1",
27
+ "@cortexkit/aft-bridge": "0.44.0",
28
28
  "comment-json": "^4.6.2"
29
29
  },
30
30
  "devDependencies": {