@openclaw/copilot 2026.5.28
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 +28 -0
- package/dist/attempt-DMegR4ua.js +1667 -0
- package/dist/doctor-contract-api.js +30 -0
- package/dist/harness-Blgz_qk3.js +473 -0
- package/dist/harness.js +2 -0
- package/dist/index.js +33 -0
- package/dist/runtime-C2rPhifm.js +341 -0
- package/npm-shrinkwrap.json +160 -0
- package/openclaw.plugin.json +39 -0
- package/package.json +57 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import path, { normalize, resolve, sep } from "node:path";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
6
|
+
//#region extensions/copilot/src/sdk-loader.ts
|
|
7
|
+
function resolveCopilotSdkFallbackDir(env = process.env) {
|
|
8
|
+
return path.join(resolveStateDir(env), "npm-runtime", "copilot");
|
|
9
|
+
}
|
|
10
|
+
resolveCopilotSdkFallbackDir();
|
|
11
|
+
const COPILOT_SDK_SPEC = "@github/copilot-sdk@1.0.0-beta.4";
|
|
12
|
+
let cached;
|
|
13
|
+
async function loadCopilotSdk(options = {}) {
|
|
14
|
+
const useCache = options.cache !== false;
|
|
15
|
+
if (useCache && cached) return cached;
|
|
16
|
+
const promise = doLoad(options);
|
|
17
|
+
if (useCache) {
|
|
18
|
+
cached = promise.catch((err) => {
|
|
19
|
+
cached = void 0;
|
|
20
|
+
throw err;
|
|
21
|
+
});
|
|
22
|
+
return cached;
|
|
23
|
+
}
|
|
24
|
+
return promise;
|
|
25
|
+
}
|
|
26
|
+
async function doLoad(options) {
|
|
27
|
+
const fallbackDir = options.fallbackDir ?? resolveCopilotSdkFallbackDir();
|
|
28
|
+
const primaryImport = options.primaryImport ?? (async () => await import("@github/copilot-sdk"));
|
|
29
|
+
let primaryErr;
|
|
30
|
+
try {
|
|
31
|
+
return await primaryImport();
|
|
32
|
+
} catch (err) {
|
|
33
|
+
primaryErr = err;
|
|
34
|
+
}
|
|
35
|
+
const fallbackPath = path.join(fallbackDir, "node_modules", "@github", "copilot-sdk");
|
|
36
|
+
if (!existsSync(fallbackPath)) throw createMissingSdkError(primaryErr, void 0, fallbackPath);
|
|
37
|
+
const fallbackImport = options.fallbackImport ?? (async () => {
|
|
38
|
+
return await import(pathToFileURL(createRequire(path.join(fallbackDir, "package.json")).resolve("@github/copilot-sdk")).href);
|
|
39
|
+
});
|
|
40
|
+
try {
|
|
41
|
+
return await fallbackImport(fallbackPath);
|
|
42
|
+
} catch (fallbackErr) {
|
|
43
|
+
throw createMissingSdkError(primaryErr, fallbackErr, fallbackPath);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function createMissingSdkError(primaryErr, fallbackErr, fallbackPath) {
|
|
47
|
+
const lines = [
|
|
48
|
+
"[copilot] @github/copilot-sdk is not installed.",
|
|
49
|
+
"",
|
|
50
|
+
"The external @openclaw/copilot plugin depends on @github/copilot-sdk",
|
|
51
|
+
"(~260 MB after pulling its platform-specific @github/copilot CLI binary).",
|
|
52
|
+
"Reinstall the plugin once with:",
|
|
53
|
+
"",
|
|
54
|
+
" openclaw plugins install @openclaw/copilot",
|
|
55
|
+
"",
|
|
56
|
+
"For source checkouts or offline repair, install the SDK directly:",
|
|
57
|
+
"",
|
|
58
|
+
` npm install ${COPILOT_SDK_SPEC}`,
|
|
59
|
+
"",
|
|
60
|
+
`The legacy fallback location is still probed at\n ${fallbackPath}`,
|
|
61
|
+
"",
|
|
62
|
+
"Primary resolution error:",
|
|
63
|
+
` ${summarizeError(primaryErr)}`
|
|
64
|
+
];
|
|
65
|
+
if (fallbackErr !== void 0) lines.push("", "Fallback resolution error:", ` ${summarizeError(fallbackErr)}`);
|
|
66
|
+
const err = new Error(lines.join("\n"));
|
|
67
|
+
err.code = "COPILOT_SDK_MISSING";
|
|
68
|
+
return err;
|
|
69
|
+
}
|
|
70
|
+
function summarizeError(value) {
|
|
71
|
+
if (value === void 0 || value === null) return "(none)";
|
|
72
|
+
if (value instanceof Error) return value.message || String(value);
|
|
73
|
+
if (typeof value === "string") return value;
|
|
74
|
+
try {
|
|
75
|
+
return JSON.stringify(value);
|
|
76
|
+
} catch {
|
|
77
|
+
return Object.prototype.toString.call(value);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region extensions/copilot/src/runtime.ts
|
|
82
|
+
const DEFAULT_IDLE_TTL_MS = 300 * 1e3;
|
|
83
|
+
const POOL_DISPOSED_MESSAGE = "[copilot-pool] pool disposed";
|
|
84
|
+
function createCopilotClientPool(options = {}) {
|
|
85
|
+
const sdkFactory = options.sdkFactory ?? (async (clientOptions) => {
|
|
86
|
+
return new (await (loadCopilotSdk())).CopilotClient(clientOptions);
|
|
87
|
+
});
|
|
88
|
+
const idleTtlMs = options.idleTtlMs ?? DEFAULT_IDLE_TTL_MS;
|
|
89
|
+
const now = options.now ?? Date.now;
|
|
90
|
+
const entries = /* @__PURE__ */ new Map();
|
|
91
|
+
const releasedHandles = /* @__PURE__ */ new WeakSet();
|
|
92
|
+
let disposed = false;
|
|
93
|
+
let disposePromise;
|
|
94
|
+
let disposeCompleted = false;
|
|
95
|
+
const createDisposedError = () => new Error(POOL_DISPOSED_MESSAGE);
|
|
96
|
+
const maybeDeleteEntry = (entry) => {
|
|
97
|
+
if (entries.get(entry.cacheKey) === entry) entries.delete(entry.cacheKey);
|
|
98
|
+
};
|
|
99
|
+
const stopReadyOrIdleEntry = (entry, client, idleTimer) => {
|
|
100
|
+
if (idleTimer) clearTimeout(idleTimer);
|
|
101
|
+
if (entry.stopRan) {
|
|
102
|
+
if (entry.state.kind === "stopping") return entry.state.promise;
|
|
103
|
+
if (entry.state.kind === "stopped") return Promise.resolve([]);
|
|
104
|
+
}
|
|
105
|
+
entry.stopRan = true;
|
|
106
|
+
const stopPromise = (async () => {
|
|
107
|
+
try {
|
|
108
|
+
return await client.stop();
|
|
109
|
+
} catch (error) {
|
|
110
|
+
return [toError(error)];
|
|
111
|
+
} finally {
|
|
112
|
+
entry.state = { kind: "stopped" };
|
|
113
|
+
maybeDeleteEntry(entry);
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
entry.state = {
|
|
117
|
+
kind: "stopping",
|
|
118
|
+
client,
|
|
119
|
+
promise: stopPromise
|
|
120
|
+
};
|
|
121
|
+
return stopPromise;
|
|
122
|
+
};
|
|
123
|
+
const stopEntry = async (entry) => {
|
|
124
|
+
switch (entry.state.kind) {
|
|
125
|
+
case "creating":
|
|
126
|
+
try {
|
|
127
|
+
await entry.state.promise;
|
|
128
|
+
} catch (error) {
|
|
129
|
+
maybeDeleteEntry(entry);
|
|
130
|
+
return [toError(error)];
|
|
131
|
+
}
|
|
132
|
+
return stopEntry(entry);
|
|
133
|
+
case "ready": return stopReadyOrIdleEntry(entry, entry.state.client);
|
|
134
|
+
case "idle": return stopReadyOrIdleEntry(entry, entry.state.client, entry.state.idleTimer);
|
|
135
|
+
case "stopping": return entry.state.promise;
|
|
136
|
+
case "stopped": return [];
|
|
137
|
+
default: return entry.state;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const scheduleIdleStop = (entry, client) => {
|
|
141
|
+
entry.state = {
|
|
142
|
+
kind: "idle",
|
|
143
|
+
client,
|
|
144
|
+
idleTimer: setTimeout(() => {
|
|
145
|
+
stopEntry(entry);
|
|
146
|
+
}, idleTtlMs),
|
|
147
|
+
idleSinceMs: now()
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
const createEntry = (key, cacheKey, clientOptions) => {
|
|
151
|
+
const entry = {
|
|
152
|
+
key,
|
|
153
|
+
cacheKey,
|
|
154
|
+
refCount: 1,
|
|
155
|
+
stopRan: false,
|
|
156
|
+
state: {
|
|
157
|
+
kind: "creating",
|
|
158
|
+
promise: Promise.resolve(void 0)
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const createPromise = (async () => {
|
|
162
|
+
try {
|
|
163
|
+
const client = await sdkFactory(clientOptions);
|
|
164
|
+
entry.state = {
|
|
165
|
+
kind: "ready",
|
|
166
|
+
client
|
|
167
|
+
};
|
|
168
|
+
return client;
|
|
169
|
+
} catch (error) {
|
|
170
|
+
entry.state = { kind: "stopped" };
|
|
171
|
+
maybeDeleteEntry(entry);
|
|
172
|
+
throw toError(error);
|
|
173
|
+
}
|
|
174
|
+
})();
|
|
175
|
+
entry.state = {
|
|
176
|
+
kind: "creating",
|
|
177
|
+
promise: createPromise
|
|
178
|
+
};
|
|
179
|
+
entries.set(cacheKey, entry);
|
|
180
|
+
return {
|
|
181
|
+
entry,
|
|
182
|
+
createPromise
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
const acquire = async (inputKey, optionsForCreate) => {
|
|
186
|
+
const key = normalizePoolKey(inputKey, optionsForCreate.copilotHome);
|
|
187
|
+
const cacheKey = JSON.stringify(key);
|
|
188
|
+
const clientOptions = normalizeClientCreateOptions(optionsForCreate, key.copilotHome);
|
|
189
|
+
while (true) {
|
|
190
|
+
if (disposed) throw createDisposedError();
|
|
191
|
+
const existing = entries.get(cacheKey);
|
|
192
|
+
if (!existing) {
|
|
193
|
+
const created = createEntry(key, cacheKey, clientOptions);
|
|
194
|
+
try {
|
|
195
|
+
const client = await created.createPromise;
|
|
196
|
+
if (disposed) {
|
|
197
|
+
await stopEntry(created.entry);
|
|
198
|
+
throw createDisposedError();
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
key: created.entry.key,
|
|
202
|
+
client
|
|
203
|
+
};
|
|
204
|
+
} catch (error) {
|
|
205
|
+
throw toError(error);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
switch (existing.state.kind) {
|
|
209
|
+
case "creating":
|
|
210
|
+
existing.refCount += 1;
|
|
211
|
+
try {
|
|
212
|
+
const client = await existing.state.promise;
|
|
213
|
+
if (disposed) {
|
|
214
|
+
await stopEntry(existing);
|
|
215
|
+
throw createDisposedError();
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
key: existing.key,
|
|
219
|
+
client
|
|
220
|
+
};
|
|
221
|
+
} catch (error) {
|
|
222
|
+
throw toError(error);
|
|
223
|
+
}
|
|
224
|
+
case "ready":
|
|
225
|
+
existing.refCount += 1;
|
|
226
|
+
return {
|
|
227
|
+
key: existing.key,
|
|
228
|
+
client: existing.state.client
|
|
229
|
+
};
|
|
230
|
+
case "idle": {
|
|
231
|
+
const client = existing.state.client;
|
|
232
|
+
clearTimeout(existing.state.idleTimer);
|
|
233
|
+
existing.refCount += 1;
|
|
234
|
+
existing.state = {
|
|
235
|
+
kind: "ready",
|
|
236
|
+
client
|
|
237
|
+
};
|
|
238
|
+
return {
|
|
239
|
+
key: existing.key,
|
|
240
|
+
client
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
case "stopping":
|
|
244
|
+
await existing.state.promise;
|
|
245
|
+
continue;
|
|
246
|
+
case "stopped":
|
|
247
|
+
maybeDeleteEntry(existing);
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
const release = async (handle) => {
|
|
253
|
+
if (releasedHandles.has(handle)) return;
|
|
254
|
+
releasedHandles.add(handle);
|
|
255
|
+
const entry = entries.get(JSON.stringify(handle.key));
|
|
256
|
+
if (!entry) return;
|
|
257
|
+
switch (entry.state.kind) {
|
|
258
|
+
case "creating":
|
|
259
|
+
case "stopping":
|
|
260
|
+
case "stopped": return;
|
|
261
|
+
case "ready":
|
|
262
|
+
case "idle":
|
|
263
|
+
if (entry.state.client !== handle.client) return;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
if (entry.refCount <= 0) return;
|
|
267
|
+
entry.refCount -= 1;
|
|
268
|
+
if (entry.refCount > 0) return;
|
|
269
|
+
if (disposed) {
|
|
270
|
+
await stopEntry(entry);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (entry.state.kind === "ready") {
|
|
274
|
+
scheduleIdleStop(entry, entry.state.client);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (entry.state.kind === "idle") {
|
|
278
|
+
clearTimeout(entry.state.idleTimer);
|
|
279
|
+
scheduleIdleStop(entry, entry.state.client);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const dispose = async () => {
|
|
283
|
+
if (disposeCompleted) return [];
|
|
284
|
+
if (disposePromise) {
|
|
285
|
+
await disposePromise;
|
|
286
|
+
return [];
|
|
287
|
+
}
|
|
288
|
+
disposed = true;
|
|
289
|
+
const snapshot = [...entries.values()];
|
|
290
|
+
for (const entry of snapshot) if (entry.state.kind === "idle") clearTimeout(entry.state.idleTimer);
|
|
291
|
+
disposePromise = (async () => {
|
|
292
|
+
const errors = [];
|
|
293
|
+
for (const entry of snapshot) {
|
|
294
|
+
const stopErrors = await stopEntry(entry);
|
|
295
|
+
errors.push(...stopErrors);
|
|
296
|
+
}
|
|
297
|
+
entries.clear();
|
|
298
|
+
disposeCompleted = true;
|
|
299
|
+
return errors;
|
|
300
|
+
})();
|
|
301
|
+
try {
|
|
302
|
+
return await disposePromise;
|
|
303
|
+
} finally {
|
|
304
|
+
disposePromise = void 0;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
return {
|
|
308
|
+
acquire,
|
|
309
|
+
release,
|
|
310
|
+
dispose,
|
|
311
|
+
size: () => entries.size
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function normalizePoolKey(key, rawCopilotHome) {
|
|
315
|
+
return {
|
|
316
|
+
agentId: key.agentId,
|
|
317
|
+
copilotHome: normalizeCopilotHome(rawCopilotHome),
|
|
318
|
+
authMode: key.authMode,
|
|
319
|
+
authProfileId: key.authProfileId,
|
|
320
|
+
authProfileVersion: key.authProfileVersion
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
function normalizeClientCreateOptions(options, normalizedCopilotHome) {
|
|
324
|
+
return {
|
|
325
|
+
...options,
|
|
326
|
+
copilotHome: normalizedCopilotHome
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function normalizeCopilotHome(copilotHome) {
|
|
330
|
+
let normalizedHome = resolve(copilotHome);
|
|
331
|
+
normalizedHome = normalize(normalizedHome);
|
|
332
|
+
if (normalizedHome.endsWith(sep) && normalizedHome.length > 1) normalizedHome = normalizedHome.slice(0, -1);
|
|
333
|
+
if (process.platform === "win32") normalizedHome = normalizedHome.toLowerCase();
|
|
334
|
+
return normalizedHome;
|
|
335
|
+
}
|
|
336
|
+
function toError(error) {
|
|
337
|
+
if (error instanceof Error) return error;
|
|
338
|
+
return new Error(String(error));
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
341
|
+
export { createCopilotClientPool };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openclaw/copilot",
|
|
3
|
+
"version": "2026.5.28",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "@openclaw/copilot",
|
|
9
|
+
"version": "2026.5.28",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@github/copilot-sdk": "1.0.0-beta.4"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"node_modules/@github/copilot": {
|
|
15
|
+
"version": "1.0.48",
|
|
16
|
+
"resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.48.tgz",
|
|
17
|
+
"integrity": "sha512-U5SzyTEq376UU9A4Sd3TEKz+Y2nRUd90cLO4Hc1otaB8yFSy9Ur2UVGcI2/wCoodL3a39k6WbdgNzFxr0gWFRQ==",
|
|
18
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
19
|
+
"bin": {
|
|
20
|
+
"copilot": "npm-loader.js"
|
|
21
|
+
},
|
|
22
|
+
"optionalDependencies": {
|
|
23
|
+
"@github/copilot-darwin-arm64": "1.0.48",
|
|
24
|
+
"@github/copilot-darwin-x64": "1.0.48",
|
|
25
|
+
"@github/copilot-linux-arm64": "1.0.48",
|
|
26
|
+
"@github/copilot-linux-x64": "1.0.48",
|
|
27
|
+
"@github/copilot-win32-arm64": "1.0.48",
|
|
28
|
+
"@github/copilot-win32-x64": "1.0.48"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"node_modules/@github/copilot-darwin-arm64": {
|
|
32
|
+
"version": "1.0.48",
|
|
33
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.48.tgz",
|
|
34
|
+
"integrity": "sha512-82MLoMQwPVVFM8EYssihFxSEPUYtZADE8rMzQ3jG9HgRg2qjQSfnHQS1mKe64dlXswZUK/onw6/8kjnW5I4pPg==",
|
|
35
|
+
"cpu": [
|
|
36
|
+
"arm64"
|
|
37
|
+
],
|
|
38
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
39
|
+
"optional": true,
|
|
40
|
+
"os": [
|
|
41
|
+
"darwin"
|
|
42
|
+
],
|
|
43
|
+
"bin": {
|
|
44
|
+
"copilot-darwin-arm64": "copilot"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"node_modules/@github/copilot-darwin-x64": {
|
|
48
|
+
"version": "1.0.48",
|
|
49
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.48.tgz",
|
|
50
|
+
"integrity": "sha512-1VQ5r5F0h8GwboXmZTcutqcJT+iCpPXAF27QqodmpKEvW9aYfG8g9X2kFJOzDZoX+SA3Uaka9qXdYKF2xT6Uog==",
|
|
51
|
+
"cpu": [
|
|
52
|
+
"x64"
|
|
53
|
+
],
|
|
54
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
55
|
+
"optional": true,
|
|
56
|
+
"os": [
|
|
57
|
+
"darwin"
|
|
58
|
+
],
|
|
59
|
+
"bin": {
|
|
60
|
+
"copilot-darwin-x64": "copilot"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"node_modules/@github/copilot-linux-arm64": {
|
|
64
|
+
"version": "1.0.48",
|
|
65
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.48.tgz",
|
|
66
|
+
"integrity": "sha512-PmsGnb0DZlI+Bf53l9HM1PAHHkUcMyB4y8v/7tnC/jDOV5dGF124n0HnDNfJLOLiJGiQGodthIif6QtPaAxpeA==",
|
|
67
|
+
"cpu": [
|
|
68
|
+
"arm64"
|
|
69
|
+
],
|
|
70
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
71
|
+
"optional": true,
|
|
72
|
+
"os": [
|
|
73
|
+
"linux"
|
|
74
|
+
],
|
|
75
|
+
"bin": {
|
|
76
|
+
"copilot-linux-arm64": "copilot"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"node_modules/@github/copilot-linux-x64": {
|
|
80
|
+
"version": "1.0.48",
|
|
81
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.48.tgz",
|
|
82
|
+
"integrity": "sha512-b2cc4euSlke9fYHXXsS2EL9UYbctN0h4lZvtAcKUDY+RCnpYAQOVBZK+c1R9dQrtsT6Z/yUv7PuFPSs8qdtc2Q==",
|
|
83
|
+
"cpu": [
|
|
84
|
+
"x64"
|
|
85
|
+
],
|
|
86
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
87
|
+
"optional": true,
|
|
88
|
+
"os": [
|
|
89
|
+
"linux"
|
|
90
|
+
],
|
|
91
|
+
"bin": {
|
|
92
|
+
"copilot-linux-x64": "copilot"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"node_modules/@github/copilot-sdk": {
|
|
96
|
+
"version": "1.0.0-beta.4",
|
|
97
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-sdk/-/copilot-sdk-1.0.0-beta.4.tgz",
|
|
98
|
+
"integrity": "sha512-DcVMN2FWODxamFS9nTls8AW3QsyMnj6JDVBNRVBXaTY9kEhGHCjt8lp7sJp95/vyl52hvEb4/68Oh6SdFU9O/Q==",
|
|
99
|
+
"license": "MIT",
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"@github/copilot": "^1.0.46",
|
|
102
|
+
"vscode-jsonrpc": "^8.2.1",
|
|
103
|
+
"zod": "^4.3.6"
|
|
104
|
+
},
|
|
105
|
+
"engines": {
|
|
106
|
+
"node": ">=20.0.0"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"node_modules/@github/copilot-win32-arm64": {
|
|
110
|
+
"version": "1.0.48",
|
|
111
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.48.tgz",
|
|
112
|
+
"integrity": "sha512-VEEOwddtpJ3DTbXGhnK6K8im4ofl9m08q1m/K++sNvWV8wkkOSOQBTiPdyUsuU/TXAoFhb8tZMIJv+6NnMBtMw==",
|
|
113
|
+
"cpu": [
|
|
114
|
+
"arm64"
|
|
115
|
+
],
|
|
116
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
117
|
+
"optional": true,
|
|
118
|
+
"os": [
|
|
119
|
+
"win32"
|
|
120
|
+
],
|
|
121
|
+
"bin": {
|
|
122
|
+
"copilot-win32-arm64": "copilot.exe"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"node_modules/@github/copilot-win32-x64": {
|
|
126
|
+
"version": "1.0.48",
|
|
127
|
+
"resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.48.tgz",
|
|
128
|
+
"integrity": "sha512-93BzvXLPHTyy1gWBXQY/IWIHor4IAwZuuo7/obG80/Qa6U0WeaN9slz/FBJvrsgVNrrRfEID5Xm3At+S6Kj67Q==",
|
|
129
|
+
"cpu": [
|
|
130
|
+
"x64"
|
|
131
|
+
],
|
|
132
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
133
|
+
"optional": true,
|
|
134
|
+
"os": [
|
|
135
|
+
"win32"
|
|
136
|
+
],
|
|
137
|
+
"bin": {
|
|
138
|
+
"copilot-win32-x64": "copilot.exe"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"node_modules/vscode-jsonrpc": {
|
|
142
|
+
"version": "8.2.1",
|
|
143
|
+
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.1.tgz",
|
|
144
|
+
"integrity": "sha512-kdjOSJ2lLIn7r1rtrMbbNCHjyMPfRnowdKjBQ+mGq6NAW5QY2bEZC/khaC5OR8svbbjvLEaIXkOq45e2X9BIbQ==",
|
|
145
|
+
"license": "MIT",
|
|
146
|
+
"engines": {
|
|
147
|
+
"node": ">=14.0.0"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"node_modules/zod": {
|
|
151
|
+
"version": "4.4.3",
|
|
152
|
+
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
|
|
153
|
+
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
|
154
|
+
"license": "MIT",
|
|
155
|
+
"funding": {
|
|
156
|
+
"url": "https://github.com/sponsors/colinhacks"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "copilot",
|
|
3
|
+
"name": "GitHub Copilot agent runtime",
|
|
4
|
+
"description": "Registers the GitHub Copilot agent runtime.",
|
|
5
|
+
"version": "2026.5.28",
|
|
6
|
+
"activation": {
|
|
7
|
+
"onStartup": false,
|
|
8
|
+
"onAgentHarnesses": ["copilot"]
|
|
9
|
+
},
|
|
10
|
+
"configSchema": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"properties": {
|
|
14
|
+
"pool": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"idleTtlMs": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"minimum": 1,
|
|
21
|
+
"default": 300000
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"uiHints": {
|
|
28
|
+
"pool": {
|
|
29
|
+
"label": "Client Pool",
|
|
30
|
+
"help": "Advanced GitHub Copilot agent runtime client pooling controls.",
|
|
31
|
+
"advanced": true
|
|
32
|
+
},
|
|
33
|
+
"pool.idleTtlMs": {
|
|
34
|
+
"label": "Idle Client TTL",
|
|
35
|
+
"help": "Milliseconds to keep an idle GitHub Copilot agent runtime client alive before disposal.",
|
|
36
|
+
"advanced": true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openclaw/copilot",
|
|
3
|
+
"version": "2026.5.28",
|
|
4
|
+
"description": "OpenClaw GitHub Copilot agent runtime plugin (registers a `github-copilot` AgentHarness backed by @github/copilot-sdk over JSON-RPC to the GitHub Copilot CLI)",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/openclaw/openclaw"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@github/copilot-sdk": "1.0.0-beta.4"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@github/copilot": "1.0.48",
|
|
15
|
+
"@openclaw/plugin-sdk": "workspace:*"
|
|
16
|
+
},
|
|
17
|
+
"openclaw": {
|
|
18
|
+
"extensions": [
|
|
19
|
+
"./index.ts"
|
|
20
|
+
],
|
|
21
|
+
"install": {
|
|
22
|
+
"clawhubSpec": "clawhub:@openclaw/copilot",
|
|
23
|
+
"npmSpec": "@openclaw/copilot",
|
|
24
|
+
"defaultChoice": "npm",
|
|
25
|
+
"minHostVersion": ">=2026.5.28"
|
|
26
|
+
},
|
|
27
|
+
"compat": {
|
|
28
|
+
"pluginApi": ">=2026.5.28"
|
|
29
|
+
},
|
|
30
|
+
"build": {
|
|
31
|
+
"openclawVersion": "2026.5.28",
|
|
32
|
+
"bundledDist": false
|
|
33
|
+
},
|
|
34
|
+
"release": {
|
|
35
|
+
"bundleRuntimeDependencies": false,
|
|
36
|
+
"publishToClawHub": true,
|
|
37
|
+
"publishToNpm": true
|
|
38
|
+
},
|
|
39
|
+
"runtimeExtensions": [
|
|
40
|
+
"./dist/index.js"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist/**",
|
|
45
|
+
"openclaw.plugin.json",
|
|
46
|
+
"npm-shrinkwrap.json",
|
|
47
|
+
"README.md"
|
|
48
|
+
],
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"openclaw": ">=2026.5.28"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"openclaw": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|