@qdang46/opencode-dcp-plugin 0.2.2 → 0.2.3
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 +12 -3
- package/npm/darwin-arm64/opencode-dcp-bridge.darwin-arm64.node +0 -0
- package/npm/darwin-arm64/package.json +10 -0
- package/npm/darwin-x64/package.json +10 -0
- package/npm/linux-x64-gnu/package.json +10 -0
- package/npm/win32-x64-msvc/package.json +10 -0
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -7,12 +7,21 @@ const __dirname = dirname(__filename);
|
|
|
7
7
|
const _require = createRequire(import.meta.url);
|
|
8
8
|
function loadBridge() {
|
|
9
9
|
const root = resolve(__dirname, "..");
|
|
10
|
-
|
|
10
|
+
// Try platform-specific npm packages first (for proper NAPI-RS distribution)
|
|
11
|
+
const platformCandidates = [
|
|
12
|
+
join(root, "npm", "darwin-arm64", "opencode-dcp-bridge.darwin-arm64.node"),
|
|
13
|
+
join(root, "npm", "darwin-x64", "opencode-dcp-bridge.darwin-x64.node"),
|
|
14
|
+
join(root, "npm", "linux-x64-gnu", "opencode-dcp-bridge.linux-x64-gnu.node"),
|
|
15
|
+
join(root, "npm", "win32-x64-msvc", "opencode-dcp-bridge.win32-x64-msvc.node"),
|
|
16
|
+
];
|
|
17
|
+
// Also try root-level .node files (for development / single-platform builds)
|
|
18
|
+
const rootCandidates = [
|
|
11
19
|
join(root, "opencode-dcp-bridge.darwin-arm64.node"),
|
|
12
20
|
join(root, "opencode-dcp-bridge.darwin-x64.node"),
|
|
13
21
|
join(root, "opencode-dcp-bridge.linux-x64-gnu.node"),
|
|
14
22
|
join(root, "opencode-dcp-bridge.win32-x64-msvc.node"),
|
|
15
23
|
];
|
|
24
|
+
const candidates = [...platformCandidates, ...rootCandidates];
|
|
16
25
|
for (const name of candidates) {
|
|
17
26
|
try {
|
|
18
27
|
return _require(name);
|
|
@@ -98,7 +107,7 @@ const createPlugin = async (_ctx) => {
|
|
|
98
107
|
output.parts.push({
|
|
99
108
|
type: "text",
|
|
100
109
|
text: formatHelpText(),
|
|
101
|
-
id: `
|
|
110
|
+
id: `prt-${Date.now()}`,
|
|
102
111
|
sessionID: input.sessionID,
|
|
103
112
|
messageID: `cmd-${Date.now()}`,
|
|
104
113
|
synthetic: true,
|
|
@@ -114,7 +123,7 @@ const createPlugin = async (_ctx) => {
|
|
|
114
123
|
text: result.status === "ok"
|
|
115
124
|
? result.text
|
|
116
125
|
: `⚠️ ${result.text}`,
|
|
117
|
-
id: `
|
|
126
|
+
id: `prt-${Date.now()}`,
|
|
118
127
|
sessionID: input.sessionID,
|
|
119
128
|
messageID: `cmd-${Date.now()}`,
|
|
120
129
|
synthetic: true,
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qdang46/opencode-dcp-bridge-darwin-arm64",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "DCP native bridge for darwin-arm64",
|
|
5
|
+
"main": "opencode-dcp-bridge.darwin-arm64.node",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"opencode-dcp-bridge.darwin-arm64.node"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qdang46/opencode-dcp-bridge-linux-x64-gnu",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "DCP native bridge for linux-x64-gnu",
|
|
5
|
+
"main": "opencode-dcp-bridge.linux-x64-gnu.node",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"opencode-dcp-bridge.linux-x64-gnu.node"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qdang46/opencode-dcp-bridge-win32-x64-msvc",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "DCP native bridge for win32-x64-msvc",
|
|
5
|
+
"main": "opencode-dcp-bridge.win32-x64-msvc.node",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"opencode-dcp-bridge.win32-x64-msvc.node"
|
|
9
|
+
]
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qdang46/opencode-dcp-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"npm/",
|
|
35
35
|
"README.md"
|
|
36
36
|
],
|
|
37
|
-
"description": "NAPI-RS native OpenCode plugin for Dynamic Context Pruning
|
|
37
|
+
"description": "NAPI-RS native OpenCode plugin for Dynamic Context Pruning — intelligently manages conversation context to optimize token usage",
|
|
38
38
|
"keywords": [
|
|
39
39
|
"opencode",
|
|
40
40
|
"opencode-plugin",
|
|
@@ -56,5 +56,8 @@
|
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=18"
|
|
59
|
+
},
|
|
60
|
+
"optionalDependencies": {
|
|
61
|
+
"@qdang46/opencode-dcp-bridge-darwin-arm64": "0.2.2"
|
|
59
62
|
}
|
|
60
63
|
}
|