@wrongstack/acp 1.0.4 → 1.0.6

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/agent.js CHANGED
@@ -1731,11 +1731,11 @@ function toolToPriority(tool) {
1731
1731
  }
1732
1732
 
1733
1733
  // src/agent/wrongstack-acp-agent.ts
1734
- import { timingSafeEqual } from "node:crypto";
1735
1734
  import { createServer } from "node:http";
1736
1735
  import { isIP } from "node:net";
1737
1736
  import { fileURLToPath } from "node:url";
1738
1737
  import { expandIPv6, writeErr as writeErr2 } from "@wrongstack/core/utils";
1738
+ import { timingSafeTokenEqual } from "@wrongstack/primitives";
1739
1739
  var LISTEN_RETRY_LIMIT = 5;
1740
1740
  var LISTEN_RETRY_BASE_MS = 25;
1741
1741
  var WrongStackACPServer = class {
@@ -1969,13 +1969,6 @@ var WrongStackACPServer = class {
1969
1969
  var defaultEchoRunTurn = async (_input, _emit) => {
1970
1970
  return { stopReason: "end_turn" };
1971
1971
  };
1972
- function timingSafeTokenEqual(supplied, expected) {
1973
- if (!supplied || !expected) return false;
1974
- const a = Buffer.from(supplied);
1975
- const b = Buffer.from(expected);
1976
- if (a.length !== b.length) return false;
1977
- return timingSafeEqual(a, b);
1978
- }
1979
1972
  function isLoopbackPeer(req) {
1980
1973
  const address = req.socket.remoteAddress?.replace(/^::ffff:/i, "");
1981
1974
  return address !== void 0 && isLoopbackHost(address);
package/dist/index.js CHANGED
@@ -1401,11 +1401,11 @@ function toolToPriority(tool) {
1401
1401
  }
1402
1402
 
1403
1403
  // src/agent/wrongstack-acp-agent.ts
1404
- import { timingSafeEqual } from "node:crypto";
1405
1404
  import { createServer } from "node:http";
1406
1405
  import { isIP } from "node:net";
1407
1406
  import { fileURLToPath } from "node:url";
1408
1407
  import { expandIPv6, writeErr as writeErr2 } from "@wrongstack/core/utils";
1408
+ import { timingSafeTokenEqual } from "@wrongstack/primitives";
1409
1409
  var LISTEN_RETRY_LIMIT = 5;
1410
1410
  var LISTEN_RETRY_BASE_MS = 25;
1411
1411
  var WrongStackACPServer = class {
@@ -1639,13 +1639,6 @@ var WrongStackACPServer = class {
1639
1639
  var defaultEchoRunTurn = async (_input, _emit) => {
1640
1640
  return { stopReason: "end_turn" };
1641
1641
  };
1642
- function timingSafeTokenEqual(supplied, expected) {
1643
- if (!supplied || !expected) return false;
1644
- const a = Buffer.from(supplied);
1645
- const b = Buffer.from(expected);
1646
- if (a.length !== b.length) return false;
1647
- return timingSafeEqual(a, b);
1648
- }
1649
1642
  function isLoopbackPeer(req) {
1650
1643
  const address = req.socket.remoteAddress?.replace(/^::ffff:/i, "");
1651
1644
  return address !== void 0 && isLoopbackHost(address);
@@ -1,9 +1,9 @@
1
1
  // src/agent/wrongstack-acp-agent.ts
2
- import { timingSafeEqual } from "node:crypto";
3
2
  import { createServer } from "node:http";
4
3
  import { isIP } from "node:net";
5
4
  import { fileURLToPath } from "node:url";
6
5
  import { expandIPv6, writeErr as writeErr2 } from "@wrongstack/core/utils";
6
+ import { timingSafeTokenEqual } from "@wrongstack/primitives";
7
7
 
8
8
  // src/agent/protocol-handler.ts
9
9
  import { randomUUID } from "node:crypto";
@@ -1283,13 +1283,6 @@ var WrongStackACPServer = class {
1283
1283
  var defaultEchoRunTurn = async (_input, _emit) => {
1284
1284
  return { stopReason: "end_turn" };
1285
1285
  };
1286
- function timingSafeTokenEqual(supplied, expected) {
1287
- if (!supplied || !expected) return false;
1288
- const a = Buffer.from(supplied);
1289
- const b = Buffer.from(expected);
1290
- if (a.length !== b.length) return false;
1291
- return timingSafeEqual(a, b);
1292
- }
1293
1286
  function isLoopbackPeer(req) {
1294
1287
  const address = req.socket.remoteAddress?.replace(/^::ffff:/i, "");
1295
1288
  return address !== void 0 && isLoopbackHost(address);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/acp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "license": "MIT",
5
5
  "description": "ACP (Agent Client Protocol) integration for WrongStack — client + agent support",
6
6
  "keywords": [
@@ -52,7 +52,8 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "@agentclientprotocol/sdk": "^1.4.0",
55
- "@wrongstack/core": "1.0.4"
55
+ "@wrongstack/core": "1.0.6",
56
+ "@wrongstack/primitives": "1.0.6"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@types/node": "^26.2.0",