@ycodium-ai/agent-dsh 0.2.3935 → 0.2.3982
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 +8 -41
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -7369,6 +7369,11 @@ var require_dist = __commonJS({
|
|
|
7369
7369
|
|
|
7370
7370
|
// src/index.ts
|
|
7371
7371
|
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
7372
|
+
|
|
7373
|
+
// ../../packages/plugin-api/src/version.ts
|
|
7374
|
+
var PLUGIN_API_VERSION = 76;
|
|
7375
|
+
|
|
7376
|
+
// src/index.ts
|
|
7372
7377
|
import * as NodeOS6 from "node:os";
|
|
7373
7378
|
import * as NodePath7 from "node:path";
|
|
7374
7379
|
import {
|
|
@@ -34227,9 +34232,7 @@ function createExecutorRuntime({
|
|
|
34227
34232
|
if (shared.disposed) {
|
|
34228
34233
|
return;
|
|
34229
34234
|
}
|
|
34230
|
-
eventStream.publish(
|
|
34231
|
-
options.originBindingGeneration === void 0 ? event : { ...event, originBindingGeneration: options.originBindingGeneration }
|
|
34232
|
-
);
|
|
34235
|
+
eventStream.publish(event);
|
|
34233
34236
|
};
|
|
34234
34237
|
const emit = publish;
|
|
34235
34238
|
const emitArtifacts = makeArtifactEmitter({
|
|
@@ -36829,38 +36832,6 @@ var RESUME_SCHEMA_VERSION = 1;
|
|
|
36829
36832
|
var yieldTick = () => new Promise((resolve4) => {
|
|
36830
36833
|
setImmediate(resolve4);
|
|
36831
36834
|
});
|
|
36832
|
-
var EventBus = class {
|
|
36833
|
-
#queued = [];
|
|
36834
|
-
#waiters = [];
|
|
36835
|
-
#closed = false;
|
|
36836
|
-
push(event) {
|
|
36837
|
-
const waiter = this.#waiters.shift();
|
|
36838
|
-
if (waiter) {
|
|
36839
|
-
waiter({ done: false, value: event });
|
|
36840
|
-
return;
|
|
36841
|
-
}
|
|
36842
|
-
this.#queued.push(event);
|
|
36843
|
-
}
|
|
36844
|
-
close() {
|
|
36845
|
-
if (this.#closed) return;
|
|
36846
|
-
this.#closed = true;
|
|
36847
|
-
while (this.#waiters.length > 0) {
|
|
36848
|
-
this.#waiters.shift()?.({ done: true, value: void 0 });
|
|
36849
|
-
}
|
|
36850
|
-
}
|
|
36851
|
-
[Symbol.asyncIterator]() {
|
|
36852
|
-
return {
|
|
36853
|
-
next: () => {
|
|
36854
|
-
const queued = this.#queued.shift();
|
|
36855
|
-
if (queued !== void 0) return Promise.resolve({ done: false, value: queued });
|
|
36856
|
-
if (this.#closed) return Promise.resolve({ done: true, value: void 0 });
|
|
36857
|
-
return new Promise((resolve4) => {
|
|
36858
|
-
this.#waiters.push(resolve4);
|
|
36859
|
-
});
|
|
36860
|
-
}
|
|
36861
|
-
};
|
|
36862
|
-
}
|
|
36863
|
-
};
|
|
36864
36835
|
function modelIdFromSelection(selection) {
|
|
36865
36836
|
if (typeof selection !== "object" || selection === null || Array.isArray(selection)) {
|
|
36866
36837
|
return void 0;
|
|
@@ -36881,7 +36852,6 @@ async function stopBooked(booked, processExit) {
|
|
|
36881
36852
|
}
|
|
36882
36853
|
var createDshInstance = (config2, host) => {
|
|
36883
36854
|
const recipe = parseDshInstanceConfig(config2);
|
|
36884
|
-
const events = new EventBus();
|
|
36885
36855
|
const threads = /* @__PURE__ */ new Map();
|
|
36886
36856
|
const overlayChecks = /* @__PURE__ */ new Map();
|
|
36887
36857
|
let disposed = false;
|
|
@@ -36892,7 +36862,6 @@ var createDshInstance = (config2, host) => {
|
|
|
36892
36862
|
);
|
|
36893
36863
|
const disposeOnce = createRetryableClose(async () => {
|
|
36894
36864
|
await stopAll();
|
|
36895
|
-
events.close();
|
|
36896
36865
|
});
|
|
36897
36866
|
const instance = {
|
|
36898
36867
|
probe: async (signal) => {
|
|
@@ -36999,7 +36968,6 @@ var createDshInstance = (config2, host) => {
|
|
|
36999
36968
|
},
|
|
37000
36969
|
...requestedModelId === void 0 ? {} : { requestedModelId },
|
|
37001
36970
|
...requestedEffort === void 0 ? {} : { requestedEffort },
|
|
37002
|
-
...input2.bindingGeneration === void 0 ? {} : { originBindingGeneration: input2.bindingGeneration },
|
|
37003
36971
|
// 内置编排那一条排第一,后面跟用户在插件中心配的;缺了这一栏,
|
|
37004
36972
|
// `mcp__ycodium__*` 整套工具(浏览器等)在这只手的会话里都不存在。
|
|
37005
36973
|
// http / sse 由执行器按握手里的 `mcpCapabilities` 再筛。
|
|
@@ -37007,7 +36975,7 @@ var createDshInstance = (config2, host) => {
|
|
|
37007
36975
|
...resume === void 0 ? {} : { resumeSessionId: resume.sessionId }
|
|
37008
36976
|
});
|
|
37009
36977
|
const forwarding = (async () => {
|
|
37010
|
-
for await (const event of executor.events) events.
|
|
36978
|
+
for await (const event of executor.events) input2.events.emit(event);
|
|
37011
36979
|
})();
|
|
37012
36980
|
try {
|
|
37013
36981
|
throwIfStartAborted(signal);
|
|
@@ -37136,7 +37104,6 @@ var createDshInstance = (config2, host) => {
|
|
|
37136
37104
|
const booked = requireThread(threadId);
|
|
37137
37105
|
return { threadId, turns: booked.turns };
|
|
37138
37106
|
},
|
|
37139
|
-
events,
|
|
37140
37107
|
// 额度是 DeepSeek 账户的剩余金额(API key,没有订阅窗口);token 暂无来源,见 dshBalance.ts 与 README。
|
|
37141
37108
|
usage: createDshUsage({
|
|
37142
37109
|
environment: recipe.environment,
|
|
@@ -37166,7 +37133,7 @@ var executors = [
|
|
|
37166
37133
|
];
|
|
37167
37134
|
var index_default = definePlugin({
|
|
37168
37135
|
id: "agent-dsh",
|
|
37169
|
-
apiVersion:
|
|
37136
|
+
apiVersion: PLUGIN_API_VERSION,
|
|
37170
37137
|
executors,
|
|
37171
37138
|
activate(ctx) {
|
|
37172
37139
|
ctx.command({
|
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.3982",
|
|
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
|
-
"
|
|
26
|
-
"ycodium-
|
|
27
|
-
"ycodium-
|
|
25
|
+
"ycodium-acp-executor": "0.2.3982",
|
|
26
|
+
"ycodium-executor-testing": "0.0.0",
|
|
27
|
+
"@ycodium-ai/plugin-api": "0.2.3982"
|
|
28
28
|
},
|
|
29
29
|
"ycodium": {
|
|
30
30
|
"plugin": "./dist/index.js",
|