@openma/deepseek-harness-acp 0.4.8 → 0.4.10-beta.1
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/README.md +9 -3
- package/cordis.patch.yml +9 -16
- package/dist/bridge.js +132 -56
- package/dist/index.js +25 -6
- package/dist/plugin.js +3217 -0
- package/dist/server.js +3169 -0
- package/dist/stdio.js +91 -0
- package/package.json +13 -2
package/dist/stdio.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/bridge/self-harness.ts
|
|
12
|
+
import { createUserMessage, errorChain } from "@deepseek-ai/dsh-llm";
|
|
13
|
+
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
14
|
+
import { foldSessionTitle } from "@deepseek-ai/dsh-session-title";
|
|
15
|
+
import { SANDBOX_MODES, setSandboxMode } from "@deepseek-ai/dsh-sandbox-policy";
|
|
16
|
+
import * as agentModule from "@deepseek-ai/dsh-agent";
|
|
17
|
+
import * as mcpClient from "@deepseek-ai/dsh-mcp-client";
|
|
18
|
+
var init_self_harness = __esm({
|
|
19
|
+
"src/bridge/self-harness.ts"() {
|
|
20
|
+
"use strict";
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// src/bundle.ts
|
|
25
|
+
import { ndJsonStream as ndJsonStream2 } from "@agentclientprotocol/sdk";
|
|
26
|
+
import { Readable, Writable } from "node:stream";
|
|
27
|
+
|
|
28
|
+
// src/bridge/index.ts
|
|
29
|
+
import {
|
|
30
|
+
AgentSideConnection,
|
|
31
|
+
ndJsonStream,
|
|
32
|
+
PROTOCOL_VERSION,
|
|
33
|
+
RequestError
|
|
34
|
+
} from "@agentclientprotocol/sdk";
|
|
35
|
+
import { credentialRef } from "@deepseek-ai/dsh-credentials";
|
|
36
|
+
|
|
37
|
+
// src/version.ts
|
|
38
|
+
import { createRequire } from "node:module";
|
|
39
|
+
var VERSION = createRequire(import.meta.url)("../package.json").version;
|
|
40
|
+
|
|
41
|
+
// src/bridge/cordis-protocol.ts
|
|
42
|
+
var CORDIS_PROTOCOL = 0;
|
|
43
|
+
var CORDIS_CAPABILITY = Object.freeze({ protocol: CORDIS_PROTOCOL });
|
|
44
|
+
var CORDIS_METHODS = Object.freeze({
|
|
45
|
+
inspectSync: "_dsh/cordis/inspect/sync",
|
|
46
|
+
inspectResolve: "_dsh/cordis/inspect/resolve",
|
|
47
|
+
inspectQuery: "_dsh/cordis/inspect/query",
|
|
48
|
+
inspectQueryResolved: "_dsh/cordis/inspect/query-resolved",
|
|
49
|
+
runHost: "_dsh/cordis/run/host",
|
|
50
|
+
getClientCode: "_dsh/cordis/run/client-code",
|
|
51
|
+
resolveRequestRun: "_dsh/cordis/run/resolve",
|
|
52
|
+
requestRun: "_dsh/cordis/run/request",
|
|
53
|
+
requestRunResolved: "_dsh/cordis/run/request-resolved",
|
|
54
|
+
userRun: "_dsh/cordis/run/user",
|
|
55
|
+
settleUserRun: "_dsh/cordis/run/settle",
|
|
56
|
+
pluginInvoke: "_dsh/cordis/plugin/invoke",
|
|
57
|
+
pluginsList: "_dsh/cordis/plugins/list",
|
|
58
|
+
pluginStart: "_dsh/cordis/plugins/start",
|
|
59
|
+
pluginStop: "_dsh/cordis/plugins/stop",
|
|
60
|
+
pluginRetract: "_dsh/cordis/plugins/retract"
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// src/bridge/user-questions.ts
|
|
64
|
+
import { Service } from "@deepseek-ai/cordis";
|
|
65
|
+
import {
|
|
66
|
+
UserQuestionError
|
|
67
|
+
} from "@deepseek-ai/dsh-user-questions";
|
|
68
|
+
var ROUTERS_KEY = /* @__PURE__ */ Symbol.for("@openma/deepseek-harness-acp/user-question-routers");
|
|
69
|
+
var routers = globalThis[ROUTERS_KEY] ??= /* @__PURE__ */ new WeakMap();
|
|
70
|
+
|
|
71
|
+
// src/bundle.ts
|
|
72
|
+
init_self_harness();
|
|
73
|
+
function nodeAcpStream(input, output) {
|
|
74
|
+
return ndJsonStream2(
|
|
75
|
+
Writable.toWeb(output),
|
|
76
|
+
Readable.toWeb(input)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/stdio.ts
|
|
81
|
+
var name = "acp-stdio";
|
|
82
|
+
var inject2 = ["acpServer"];
|
|
83
|
+
function apply(ctx) {
|
|
84
|
+
const server = ctx.get("acpServer");
|
|
85
|
+
return server.connect(nodeAcpStream(process.stdin, process.stdout));
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
apply,
|
|
89
|
+
inject2 as inject,
|
|
90
|
+
name
|
|
91
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.4.
|
|
6
|
+
"version": "0.4.10-beta.1",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/openma-ai/deepseek-harness-acp.git"
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"dist/index.js",
|
|
22
22
|
"dist/bridge.js",
|
|
23
|
+
"dist/server.js",
|
|
24
|
+
"dist/plugin.js",
|
|
25
|
+
"dist/stdio.js",
|
|
23
26
|
"cordis.patch.yml",
|
|
24
27
|
"README.md",
|
|
25
28
|
"LICENSE",
|
|
@@ -31,6 +34,7 @@
|
|
|
31
34
|
"prepublishOnly": "npm run build",
|
|
32
35
|
"build": "node build.mjs",
|
|
33
36
|
"start": "node --import tsx src/index.ts",
|
|
37
|
+
"pretest": "npm run build",
|
|
34
38
|
"test": "vitest run",
|
|
35
39
|
"test:watch": "vitest",
|
|
36
40
|
"typecheck": "tsc --noEmit",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"devDependencies": {
|
|
45
49
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
46
50
|
"@deepseek-ai/cordis-plugin-timer": "^1.1.3",
|
|
51
|
+
"@deepseek-ai/dsh": "^0.1.0-rc.6",
|
|
47
52
|
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
48
53
|
"@deepseek-ai/dsh-agent-instructions": "^0.1.0-rc.6",
|
|
49
54
|
"@deepseek-ai/dsh-agent-loop": "^0.1.0-rc.6",
|
|
@@ -101,6 +106,7 @@
|
|
|
101
106
|
"@deepseek-ai/dsh-user-approval": "^0.1.0-rc.6",
|
|
102
107
|
"@types/node": "^26.1.0",
|
|
103
108
|
"esbuild": "^0.28.1",
|
|
109
|
+
"pnpm": "11.22.0",
|
|
104
110
|
"tsx": "^4.23.1",
|
|
105
111
|
"typescript": "^7.0.2",
|
|
106
112
|
"vitest": "^4.1.10"
|
|
@@ -113,12 +119,17 @@
|
|
|
113
119
|
"@deepseek-ai/dsh-sandbox-policy": "^0.1.0-rc.6",
|
|
114
120
|
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
115
121
|
"@deepseek-ai/dsh-session-title": "^0.1.0-rc.6",
|
|
116
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.0-rc.6"
|
|
122
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.0-rc.6"
|
|
123
|
+
},
|
|
124
|
+
"peerDependencies": {
|
|
117
125
|
"@deepseek-ai/dsh": "^0.1.0-rc.6"
|
|
118
126
|
},
|
|
119
127
|
"exports": {
|
|
120
128
|
".": "./dist/index.js",
|
|
121
129
|
"./bridge": "./dist/bridge.js",
|
|
130
|
+
"./server": "./dist/server.js",
|
|
131
|
+
"./plugin": "./dist/plugin.js",
|
|
132
|
+
"./stdio": "./dist/stdio.js",
|
|
122
133
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
123
134
|
"./package.json": "./package.json"
|
|
124
135
|
},
|