@wrongstack/acp 0.284.1 → 0.285.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.
- package/dist/agent/index.d.ts +13 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/{wrongstack-acp-agent-nzrqmJnc.d.ts → agent/protocol-handler.d.ts} +26 -75
- package/dist/agent/protocol-handler.d.ts.map +1 -0
- package/dist/{server-agent-turn-C3U0lhA-.d.ts → agent/server-agent-turn.d.ts} +8 -63
- package/dist/agent/server-agent-turn.d.ts.map +1 -0
- package/dist/agent/session-store.d.ts +53 -0
- package/dist/agent/session-store.d.ts.map +1 -0
- package/dist/agent/stdio-transport.d.ts +82 -0
- package/dist/agent/stdio-transport.d.ts.map +1 -0
- package/dist/{tools-registry-D2xdbzN7.d.ts → agent/tools-registry.d.ts} +4 -7
- package/dist/agent/tools-registry.d.ts.map +1 -0
- package/dist/agent/wrongstack-acp-agent.d.ts +58 -0
- package/dist/agent/wrongstack-acp-agent.d.ts.map +1 -0
- package/dist/agent/ws-bridge-transport.d.ts +37 -0
- package/dist/agent/ws-bridge-transport.d.ts.map +1 -0
- package/dist/agent.d.ts +1 -45
- package/dist/agent.js +21 -11
- package/dist/agent.js.map +7 -1
- package/dist/client/acp-session.d.ts +349 -0
- package/dist/client/acp-session.d.ts.map +1 -0
- package/dist/client/file-server.d.ts +44 -0
- package/dist/client/file-server.d.ts.map +1 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/permission.d.ts +45 -0
- package/dist/client/permission.d.ts.map +1 -0
- package/dist/client/terminal-server.d.ts +54 -0
- package/dist/client/terminal-server.d.ts.map +1 -0
- package/dist/{index-DEEYyEpu.d.ts → client/tool-translator.d.ts} +17 -8
- package/dist/client/tool-translator.d.ts.map +1 -0
- package/dist/client/websocket-transport.d.ts +40 -0
- package/dist/client/websocket-transport.d.ts.map +1 -0
- package/dist/client.d.ts +1 -5
- package/dist/client.js +36 -17
- package/dist/client.js.map +7 -1
- package/dist/index.d.ts +43 -457
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +126 -67
- package/dist/index.js.map +7 -1
- package/dist/integration/acp-bench.d.ts +68 -0
- package/dist/integration/acp-bench.d.ts.map +1 -0
- package/dist/integration/acp-subagent-runner.d.ts +194 -0
- package/dist/integration/acp-subagent-runner.d.ts.map +1 -0
- package/dist/integration/ensemble-runner.d.ts +147 -0
- package/dist/integration/ensemble-runner.d.ts.map +1 -0
- package/dist/integration/run-one-acp-task.d.ts +29 -0
- package/dist/integration/run-one-acp-task.d.ts.map +1 -0
- package/dist/registry/acp-registry-fetch.d.ts +86 -0
- package/dist/registry/acp-registry-fetch.d.ts.map +1 -0
- package/dist/registry/agents.catalog.d.ts +46 -0
- package/dist/registry/agents.catalog.d.ts.map +1 -0
- package/dist/registry/ensemble-registry.d.ts +104 -0
- package/dist/registry/ensemble-registry.d.ts.map +1 -0
- package/dist/sdk.d.ts +41 -12
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +142 -72
- package/dist/sdk.js.map +7 -1
- package/dist/types/acp-messages.d.ts +133 -0
- package/dist/types/acp-messages.d.ts.map +1 -0
- package/dist/types/acp-v1.d.ts +476 -0
- package/dist/types/acp-v1.d.ts.map +1 -0
- package/dist/win32-cmd.d.ts +7 -0
- package/dist/win32-cmd.d.ts.map +1 -0
- package/dist/wrongstack-acp-agent.d.ts +1 -3
- package/dist/wrongstack-acp-agent.js +11 -9
- package/dist/wrongstack-acp-agent.js.map +7 -1
- package/package.json +4 -4
- package/dist/acp-subagent-runner-BAlo23L-.d.ts +0 -644
- package/dist/acp-v1-BxskPsdo.d.ts +0 -520
- package/dist/terminal-server-P9KpMZTT.d.ts +0 -99
package/dist/client.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { expectDefined, writeErr } from '@wrongstack/core';
|
|
2
|
-
import * as fsp from 'fs/promises';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { spawn } from 'child_process';
|
|
5
|
-
import '@wrongstack/core/coordination';
|
|
6
|
-
|
|
7
1
|
// src/agent/stdio-transport.ts
|
|
2
|
+
import { expectDefined, writeErr } from "@wrongstack/core";
|
|
8
3
|
|
|
9
4
|
// src/win32-cmd.ts
|
|
10
5
|
var WIN32_CMD_META = /[&|<>"\r\n\0]/;
|
|
@@ -48,9 +43,9 @@ var ClientTransport = class {
|
|
|
48
43
|
async start() {
|
|
49
44
|
if (this.child) return;
|
|
50
45
|
const [{ spawn: spawn2 }, { buildChildEnv }, os] = await Promise.all([
|
|
51
|
-
import(
|
|
52
|
-
import(
|
|
53
|
-
import(
|
|
46
|
+
import("node:child_process"),
|
|
47
|
+
import("@wrongstack/core"),
|
|
48
|
+
import("node:os")
|
|
54
49
|
]);
|
|
55
50
|
return new Promise((resolve3, reject) => {
|
|
56
51
|
const timeout = setTimeout(() => {
|
|
@@ -301,6 +296,9 @@ var WebSocketClientTransport = class {
|
|
|
301
296
|
}
|
|
302
297
|
}
|
|
303
298
|
};
|
|
299
|
+
|
|
300
|
+
// src/client/tool-translator.ts
|
|
301
|
+
import { expectDefined as expectDefined2 } from "@wrongstack/core";
|
|
304
302
|
var DEFAULT_OPTIONS = {
|
|
305
303
|
asyncTools: true,
|
|
306
304
|
pollIntervalMs: 500,
|
|
@@ -322,7 +320,7 @@ var ToolTranslator = class {
|
|
|
322
320
|
const pending = this.pending.get(msg.id);
|
|
323
321
|
if (pending) {
|
|
324
322
|
clearTimeout(pending.timeout);
|
|
325
|
-
this.pending.delete(
|
|
323
|
+
this.pending.delete(expectDefined2(msg.id));
|
|
326
324
|
pending.resolve(msg);
|
|
327
325
|
}
|
|
328
326
|
}
|
|
@@ -330,7 +328,7 @@ var ToolTranslator = class {
|
|
|
330
328
|
const pending = this.pending.get(msg.id);
|
|
331
329
|
if (pending) {
|
|
332
330
|
clearTimeout(pending.timeout);
|
|
333
|
-
this.pending.delete(
|
|
331
|
+
this.pending.delete(expectDefined2(msg.id));
|
|
334
332
|
pending.reject(new Error("Call cancelled by client"));
|
|
335
333
|
}
|
|
336
334
|
}
|
|
@@ -366,6 +364,10 @@ var ToolTranslator = class {
|
|
|
366
364
|
|
|
367
365
|
// src/types/acp-v1.ts
|
|
368
366
|
var ACP_PROTOCOL_VERSION = 1;
|
|
367
|
+
|
|
368
|
+
// src/client/file-server.ts
|
|
369
|
+
import * as fsp from "node:fs/promises";
|
|
370
|
+
import * as path from "node:path";
|
|
369
371
|
var FsError = class extends Error {
|
|
370
372
|
code;
|
|
371
373
|
path;
|
|
@@ -509,6 +511,10 @@ function makePermissionPolicy(decide) {
|
|
|
509
511
|
return allow ? pickAllow(req.options) : pickReject(req.options);
|
|
510
512
|
};
|
|
511
513
|
}
|
|
514
|
+
|
|
515
|
+
// src/client/terminal-server.ts
|
|
516
|
+
import { spawn } from "node:child_process";
|
|
517
|
+
import * as path2 from "node:path";
|
|
512
518
|
var TerminalServer = class {
|
|
513
519
|
terminals = /* @__PURE__ */ new Map();
|
|
514
520
|
projectRoot;
|
|
@@ -516,7 +522,7 @@ var TerminalServer = class {
|
|
|
516
522
|
outputByteLimit;
|
|
517
523
|
nextId = 1;
|
|
518
524
|
constructor(opts) {
|
|
519
|
-
this.projectRoot =
|
|
525
|
+
this.projectRoot = path2.resolve(opts.projectRoot);
|
|
520
526
|
this.commandTimeoutMs = opts.commandTimeoutMs ?? 5 * 6e4;
|
|
521
527
|
this.outputByteLimit = opts.outputByteLimit ?? 1024 * 1024;
|
|
522
528
|
if (opts.signal) {
|
|
@@ -652,8 +658,8 @@ var TerminalServer = class {
|
|
|
652
658
|
}
|
|
653
659
|
resolveCwd(cwd) {
|
|
654
660
|
if (!cwd) return this.projectRoot;
|
|
655
|
-
const resolved =
|
|
656
|
-
const rootWithSep = this.projectRoot.endsWith(
|
|
661
|
+
const resolved = path2.resolve(cwd);
|
|
662
|
+
const rootWithSep = this.projectRoot.endsWith(path2.sep) ? this.projectRoot : this.projectRoot + path2.sep;
|
|
657
663
|
if (resolved !== this.projectRoot && !resolved.startsWith(rootWithSep)) {
|
|
658
664
|
return this.projectRoot;
|
|
659
665
|
}
|
|
@@ -1649,6 +1655,8 @@ function emptyRunResult(stopReason) {
|
|
|
1649
1655
|
thoughts: ""
|
|
1650
1656
|
};
|
|
1651
1657
|
}
|
|
1658
|
+
|
|
1659
|
+
// src/integration/acp-subagent-runner.ts
|
|
1652
1660
|
async function makeACPSubagentRunner(options) {
|
|
1653
1661
|
const { runner, stop } = await makeACPSubagentRunnerWithStop(options);
|
|
1654
1662
|
const wrappedRunner = async (task, ctx) => {
|
|
@@ -1786,7 +1794,18 @@ function isRetryable(kind) {
|
|
|
1786
1794
|
return false;
|
|
1787
1795
|
}
|
|
1788
1796
|
}
|
|
1789
|
-
|
|
1790
|
-
|
|
1797
|
+
export {
|
|
1798
|
+
ACPSession,
|
|
1799
|
+
ACPSessionError,
|
|
1800
|
+
ClientTransport,
|
|
1801
|
+
ToolTranslator,
|
|
1802
|
+
WebSocketClientTransport,
|
|
1803
|
+
audioContent,
|
|
1804
|
+
defaultPermissionPolicy,
|
|
1805
|
+
imageContent,
|
|
1806
|
+
makeACPSubagentRunner,
|
|
1807
|
+
makePermissionPolicy,
|
|
1808
|
+
readOnlyPermissionPolicy,
|
|
1809
|
+
textContent
|
|
1810
|
+
};
|
|
1791
1811
|
//# sourceMappingURL=client.js.map
|
|
1792
|
-
//# sourceMappingURL=client.js.map
|