@ycodium-ai/agent-dsh 0.2.3094 → 0.2.3102
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/index.js +24 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -34454,6 +34454,24 @@ var dispatchAcpPrompt = (executor, input2) => {
|
|
|
34454
34454
|
]);
|
|
34455
34455
|
};
|
|
34456
34456
|
|
|
34457
|
+
// ../../packages/ycodium-acp-executor/src/start-abort.ts
|
|
34458
|
+
function throwIfStartAborted(signal) {
|
|
34459
|
+
if (signal?.aborted) throw new Error("aborted");
|
|
34460
|
+
}
|
|
34461
|
+
async function raceStartAbort(promise2, signal) {
|
|
34462
|
+
void promise2.catch(() => void 0);
|
|
34463
|
+
throwIfStartAborted(signal);
|
|
34464
|
+
if (signal === void 0) return promise2;
|
|
34465
|
+
const aborted2 = Promise.withResolvers();
|
|
34466
|
+
const onAbort = () => aborted2.reject(new Error("aborted"));
|
|
34467
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
34468
|
+
try {
|
|
34469
|
+
return await Promise.race([promise2, aborted2.promise]);
|
|
34470
|
+
} finally {
|
|
34471
|
+
signal.removeEventListener("abort", onAbort);
|
|
34472
|
+
}
|
|
34473
|
+
}
|
|
34474
|
+
|
|
34457
34475
|
// ../../packages/ycodium-acp-executor/src/mcp-servers.ts
|
|
34458
34476
|
function toAcpMcpServers(entries) {
|
|
34459
34477
|
return (entries ?? []).map(
|
|
@@ -35340,7 +35358,7 @@ var createDshInstance = (config2, host) => {
|
|
|
35340
35358
|
// 还没用真机确认这家 CLI 对 cwd 之外的读怎么处理、要不要放行。确认之后再接这一栏。
|
|
35341
35359
|
startSession: async (input2, signal) => {
|
|
35342
35360
|
if (disposed) throw new Error("instance disposed");
|
|
35343
|
-
|
|
35361
|
+
throwIfStartAborted(signal);
|
|
35344
35362
|
if (recipe.binaryPath.length === 0) {
|
|
35345
35363
|
throw new Error("DeepSeek Harness program path is not configured");
|
|
35346
35364
|
}
|
|
@@ -35350,6 +35368,7 @@ var createDshInstance = (config2, host) => {
|
|
|
35350
35368
|
if (existing !== void 0) {
|
|
35351
35369
|
await stopBooked(existing);
|
|
35352
35370
|
threads.delete(input2.threadId);
|
|
35371
|
+
throwIfStartAborted(signal);
|
|
35353
35372
|
}
|
|
35354
35373
|
const env = buildSpawnEnv(recipe, resolveHomePath(recipe.homePath), input2.nativeModeId);
|
|
35355
35374
|
const launch = {
|
|
@@ -35364,6 +35383,7 @@ var createDshInstance = (config2, host) => {
|
|
|
35364
35383
|
launch,
|
|
35365
35384
|
verified: skillOverlayChecks
|
|
35366
35385
|
});
|
|
35386
|
+
throwIfStartAborted(signal);
|
|
35367
35387
|
const { handle, spawned } = await spawnDsh(host, launch, skillArgs);
|
|
35368
35388
|
const { readable, writable, stderrTail } = nodeStreamsFromHandle2(handle);
|
|
35369
35389
|
const resume = input2.discardResumeCursor === true ? void 0 : parseAcpResumeCursor(input2.resumeCursor, RESUME_SCHEMA_VERSION);
|
|
@@ -35405,8 +35425,10 @@ var createDshInstance = (config2, host) => {
|
|
|
35405
35425
|
}
|
|
35406
35426
|
})();
|
|
35407
35427
|
try {
|
|
35408
|
-
|
|
35428
|
+
throwIfStartAborted(signal);
|
|
35429
|
+
const started = await raceStartAbort(executor.start(), signal);
|
|
35409
35430
|
await yieldTick();
|
|
35431
|
+
throwIfStartAborted(signal);
|
|
35410
35432
|
const createdAt = nowIso();
|
|
35411
35433
|
const resumeCursor = {
|
|
35412
35434
|
schemaVersion: RESUME_SCHEMA_VERSION,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3102",
|
|
4
4
|
"description": "DeepSeek Harness executor: dsh CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"esbuild": "0.28.1",
|
|
23
23
|
"vite-plus": "0.2.2",
|
|
24
24
|
"yaml": "^2.9.0",
|
|
25
|
-
"ycodium-
|
|
25
|
+
"@ycodium-ai/plugin-api": "0.2.3102",
|
|
26
26
|
"ycodium-executor-testing": "0.0.0",
|
|
27
|
-
"
|
|
27
|
+
"ycodium-acp-executor": "0.2.3102"
|
|
28
28
|
},
|
|
29
29
|
"ycodium": {
|
|
30
30
|
"plugin": "./dist/index.js",
|