@monotykamary/dsh-acp 0.1.0 → 0.1.2
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/lib/index.js +0 -11
- package/package.json +16 -16
package/lib/index.js
CHANGED
|
@@ -109,7 +109,6 @@ async function admitAcpPrompt(ctx, agent, prompt, imageEnabled, signal) {
|
|
|
109
109
|
break;
|
|
110
110
|
case "audio": throw new AcpContentError("audio prompt content is not supported", "invalid");
|
|
111
111
|
case "resource": throw new AcpContentError("embedded resource prompt content is not supported", "invalid");
|
|
112
|
-
/* v8 ignore next 2 -- ACP ContentBlock is a closed generated union. */
|
|
113
112
|
default: throw new AcpContentError("unsupported ACP prompt content", "invalid");
|
|
114
113
|
}
|
|
115
114
|
let refs = [];
|
|
@@ -153,11 +152,8 @@ async function admitAcpPrompt(ctx, agent, prompt, imageEnabled, signal) {
|
|
|
153
152
|
});
|
|
154
153
|
break;
|
|
155
154
|
}
|
|
156
|
-
/* v8 ignore start -- the validation pass above rejects both tags before reconstruction. */
|
|
157
155
|
case "audio":
|
|
158
156
|
case "resource": break;
|
|
159
|
-
/* v8 ignore stop */
|
|
160
|
-
/* v8 ignore next 2 -- validated by the first closed-union switch. */
|
|
161
157
|
default: break;
|
|
162
158
|
}
|
|
163
159
|
flushText();
|
|
@@ -211,7 +207,6 @@ function turnEndToStopReason(reason) {
|
|
|
211
207
|
case "interrupted": return "cancelled";
|
|
212
208
|
case "blocked":
|
|
213
209
|
case "error": return "end_turn";
|
|
214
|
-
/* v8 ignore next 2 -- TurnEndReason is closed and every member is handled above */
|
|
215
210
|
default: return "end_turn";
|
|
216
211
|
}
|
|
217
212
|
}
|
|
@@ -274,7 +269,6 @@ function apply(ctx, config) {
|
|
|
274
269
|
} catch (error) {
|
|
275
270
|
logger.warn(`acp: session/update failed: ${String(error)}`);
|
|
276
271
|
}
|
|
277
|
-
/* v8 ignore stop */
|
|
278
272
|
};
|
|
279
273
|
const rejectFromError = (inflight, reason) => {
|
|
280
274
|
inflight.reject(internalError(`turn failed: ${reason.error.message}`));
|
|
@@ -292,7 +286,6 @@ function apply(ctx, config) {
|
|
|
292
286
|
await record.agent.whenIdle();
|
|
293
287
|
await record.outputTail;
|
|
294
288
|
}
|
|
295
|
-
/* v8 ignore next -- this prompt owns the slot until this exact settlement clears it. */
|
|
296
289
|
if (record.inflight !== inflight) return;
|
|
297
290
|
record.inflight = void 0;
|
|
298
291
|
if (inflight.cancelRequested) {
|
|
@@ -316,7 +309,6 @@ function apply(ctx, config) {
|
|
|
316
309
|
record.inflight = void 0;
|
|
317
310
|
inflight.reject(internalError(`prompt settlement failed: ${errorChain(error)}`));
|
|
318
311
|
});
|
|
319
|
-
/* v8 ignore stop */
|
|
320
312
|
};
|
|
321
313
|
ctx.on("session/event", (session, event) => {
|
|
322
314
|
const record = sessions.get(session.header.id);
|
|
@@ -409,7 +401,6 @@ function apply(ctx, config) {
|
|
|
409
401
|
meta: { cwd: params.cwd },
|
|
410
402
|
agentOptions: agentOptions(config)
|
|
411
403
|
});
|
|
412
|
-
/* v8 ignore next 4 -- a real stdio close can race an in-flight create. */
|
|
413
404
|
if (closed) {
|
|
414
405
|
await handle.dispose();
|
|
415
406
|
throw internalError("connection closed during session/new");
|
|
@@ -536,13 +527,11 @@ function apply(ctx, config) {
|
|
|
536
527
|
})();
|
|
537
528
|
return quiescing;
|
|
538
529
|
};
|
|
539
|
-
/* v8 ignore start -- production transport rejection and teardown failure. */
|
|
540
530
|
conn.closed.catch((error) => {
|
|
541
531
|
logger.warn(`acp: connection closed with an error: ${String(error)}`);
|
|
542
532
|
}).then(quiesce).catch((error) => {
|
|
543
533
|
logger.warn(`acp: connection-close teardown failed: ${String(error)}`);
|
|
544
534
|
});
|
|
545
|
-
/* v8 ignore stop */
|
|
546
535
|
ctx.effect(() => quiesce, "acp.connection");
|
|
547
536
|
}
|
|
548
537
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monotykamary/dsh-acp",
|
|
3
3
|
"description": "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
"@monotykamary/schemastery": "^3.18.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@monotykamary/dsh-
|
|
40
|
-
"@monotykamary/dsh-
|
|
41
|
-
"@monotykamary/dsh-
|
|
42
|
-
"@monotykamary/dsh-
|
|
39
|
+
"@monotykamary/dsh-attachment": "^0.1.2",
|
|
40
|
+
"@monotykamary/dsh-agent": "^0.1.2",
|
|
41
|
+
"@monotykamary/dsh-invariants": "^0.1.2",
|
|
42
|
+
"@monotykamary/dsh-llm": "^0.1.2",
|
|
43
|
+
"@monotykamary/dsh-user-approval": "^0.1.2",
|
|
43
44
|
"@monotykamary/cordis": "^4.0.1",
|
|
44
|
-
"@monotykamary/dsh-session": "^0.1.
|
|
45
|
-
"@monotykamary/dsh-attachment": "^0.1.0"
|
|
45
|
+
"@monotykamary/dsh-session": "^0.1.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@monotykamary/dsh-
|
|
49
|
-
"@monotykamary/dsh-agent": "^0.1.
|
|
50
|
-
"@monotykamary/dsh-
|
|
51
|
-
"@monotykamary/dsh-invariants": "^0.1.
|
|
52
|
-
"@monotykamary/dsh-agent-loop": "^0.1.
|
|
53
|
-
"@monotykamary/dsh-llm": "^0.1.
|
|
54
|
-
"@monotykamary/dsh-session": "^0.1.
|
|
55
|
-
"@monotykamary/dsh-tools": "^0.1.
|
|
56
|
-
"@monotykamary/dsh-user-approval": "^0.1.
|
|
48
|
+
"@monotykamary/dsh-agent": "^0.1.2",
|
|
49
|
+
"@monotykamary/dsh-agent-loop-testkit": "^0.1.2",
|
|
50
|
+
"@monotykamary/dsh-attachment": "^0.1.2",
|
|
51
|
+
"@monotykamary/dsh-invariants": "^0.1.2",
|
|
52
|
+
"@monotykamary/dsh-agent-loop": "^0.1.2",
|
|
53
|
+
"@monotykamary/dsh-llm": "^0.1.2",
|
|
54
|
+
"@monotykamary/dsh-session": "^0.1.2",
|
|
55
|
+
"@monotykamary/dsh-tools": "^0.1.2",
|
|
56
|
+
"@monotykamary/dsh-user-approval": "^0.1.2",
|
|
57
57
|
"@monotykamary/cordis": "^4.0.1"
|
|
58
58
|
}
|
|
59
59
|
}
|