@wrongstack/acp 1.0.24 → 1.0.27
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 +12 -3
- package/dist/client/acp-session-auth.d.ts +20 -0
- package/dist/client/acp-session.d.ts +1 -0
- package/dist/client.js +474 -406
- package/dist/index.js +475 -408
- package/dist/wrongstack-acp-agent.js +12 -3
- package/package.json +3 -3
|
@@ -988,6 +988,16 @@ import { treeKill } from "@wrongstack/core/utils/tree-kill";
|
|
|
988
988
|
var DEFAULT_MAX_FRAME_CHARS = 20 * 1024 * 1024;
|
|
989
989
|
var DEFAULT_MAX_QUEUED_MESSAGES = 1e3;
|
|
990
990
|
var DEFAULT_MAX_QUEUED_CHARS = 32 * 1024 * 1024;
|
|
991
|
+
function takeLines(pending, chunk) {
|
|
992
|
+
const lines = [];
|
|
993
|
+
let start = 0;
|
|
994
|
+
for (let nl = chunk.indexOf("\n"); nl !== -1; nl = chunk.indexOf("\n", start)) {
|
|
995
|
+
lines.push(pending + chunk.slice(start, nl));
|
|
996
|
+
pending = "";
|
|
997
|
+
start = nl + 1;
|
|
998
|
+
}
|
|
999
|
+
return { lines, pending: pending + chunk.slice(start) };
|
|
1000
|
+
}
|
|
991
1001
|
function positiveLimit(value, fallback) {
|
|
992
1002
|
return value !== void 0 && Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback;
|
|
993
1003
|
}
|
|
@@ -1075,9 +1085,8 @@ var StdioTransport = class {
|
|
|
1075
1085
|
this.claimHandlers.clear();
|
|
1076
1086
|
}
|
|
1077
1087
|
onData(chunk) {
|
|
1078
|
-
this.buffer
|
|
1079
|
-
|
|
1080
|
-
this.buffer = lines.pop() ?? "";
|
|
1088
|
+
const { lines, pending } = takeLines(this.buffer, chunk);
|
|
1089
|
+
this.buffer = pending;
|
|
1081
1090
|
if (this.buffer.length > this.maxFrameChars) {
|
|
1082
1091
|
this.stderr.write(
|
|
1083
1092
|
`[wstack-acp frame error] pending frame exceeds ${this.maxFrameChars} characters
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/acp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ACP (Agent Client Protocol) integration for WrongStack — client + agent support",
|
|
6
6
|
"keywords": [
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@agentclientprotocol/sdk": "^1.4.0",
|
|
55
|
-
"@wrongstack/core": "1.0.
|
|
56
|
-
"@wrongstack/primitives": "1.0.
|
|
55
|
+
"@wrongstack/core": "1.0.27",
|
|
56
|
+
"@wrongstack/primitives": "1.0.27"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^26.5.1",
|