@openclaw/copilot 2026.9.4 → 2026.9.6
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/assets/activity.svg +30 -0
- package/assets/icon.png +0 -0
- package/dist/{attempt-EPgLnjoV.js → .setup/attempt-DKgdMTpc.mjs} +240 -233
- package/dist/{harness-C_65tSNm.js → .setup/harness-BH2_ctMF.mjs} +105 -75
- package/dist/{isolated-completion-YG0Z8FkF.js → .setup/isolated-completion-CpLMQyd3.mjs} +2 -2
- package/dist/{runtime-LtZ5NAjV.js → .setup/runtime-D6DFeSZX.mjs} +2 -2
- package/dist/harness.js +1 -1
- package/dist/index.js +2 -2
- package/openclaw.plugin.json +9 -1
- package/package.json +8 -6
- /package/dist/{usage-bridge-Cpa-ZYwL.js → .setup/usage-bridge-Cpa-ZYwL.mjs} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { filterStringRecord, normalizeOptionalString, readNonEmptyStringPreservingWhitespace } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { buildAgentHookContextChannelFields, compactWithSafetyTimeout, getModelProviderRequestTransport, projectSettledTurnFinalizationAttemptResult, resolveCompactionTimeoutMs, runAgentHarnessAfterCompactionHook, runAgentHarnessBeforeCompactionHook } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
3
|
+
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
3
4
|
import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
4
5
|
import { homedir } from "node:os";
|
|
5
6
|
import { join, resolve } from "node:path";
|
|
@@ -646,30 +647,30 @@ function normalizeAttemptBinding(value) {
|
|
|
646
647
|
compatKey: legacy.compatKey
|
|
647
648
|
};
|
|
648
649
|
}
|
|
649
|
-
function lookupStoredBinding(store, key) {
|
|
650
|
+
async function lookupStoredBinding(store, key) {
|
|
650
651
|
try {
|
|
651
|
-
return normalizeAttemptBinding(store?.lookup(key));
|
|
652
|
+
return normalizeAttemptBinding(await store?.lookup(key));
|
|
652
653
|
} catch {
|
|
653
654
|
try {
|
|
654
|
-
store?.delete(key);
|
|
655
|
+
await store?.delete(key);
|
|
655
656
|
} catch {}
|
|
656
657
|
return;
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
|
-
function registerStoredBinding(store, key, binding) {
|
|
660
|
+
async function registerStoredBinding(store, key, binding) {
|
|
660
661
|
try {
|
|
661
|
-
store?.register(key, binding);
|
|
662
|
+
await store?.register(key, binding);
|
|
662
663
|
return true;
|
|
663
664
|
} catch {
|
|
664
665
|
try {
|
|
665
|
-
store?.delete(key);
|
|
666
|
+
await store?.delete(key);
|
|
666
667
|
} catch {}
|
|
667
668
|
return false;
|
|
668
669
|
}
|
|
669
670
|
}
|
|
670
|
-
function deleteStoredBinding(store, key) {
|
|
671
|
+
async function deleteStoredBinding(store, key) {
|
|
671
672
|
try {
|
|
672
|
-
store?.delete(key);
|
|
673
|
+
await store?.delete(key);
|
|
673
674
|
return true;
|
|
674
675
|
} catch {
|
|
675
676
|
return false;
|
|
@@ -845,13 +846,23 @@ function createCopilotAgentHarness(options) {
|
|
|
845
846
|
let disposed = false;
|
|
846
847
|
let disposePromise;
|
|
847
848
|
const inFlight = /* @__PURE__ */ new Set();
|
|
849
|
+
const bindingQueue = new KeyedAsyncQueue();
|
|
848
850
|
const deferredCompactionCleanups = /* @__PURE__ */ new Map();
|
|
849
851
|
const trackedSessions = /* @__PURE__ */ new Map();
|
|
850
852
|
const resetBlockedStoredSessions = /* @__PURE__ */ new Set();
|
|
853
|
+
async function trackOperation(operation) {
|
|
854
|
+
const pending = operation();
|
|
855
|
+
inFlight.add(pending);
|
|
856
|
+
try {
|
|
857
|
+
return await pending;
|
|
858
|
+
} finally {
|
|
859
|
+
inFlight.delete(pending);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
851
862
|
async function getPool() {
|
|
852
863
|
if (options?.pool) return options.pool;
|
|
853
864
|
if (!poolPromise) poolPromise = (async () => {
|
|
854
|
-
const { createCopilotClientPool } = await import("./runtime-
|
|
865
|
+
const { createCopilotClientPool } = await import("./runtime-D6DFeSZX.mjs");
|
|
855
866
|
createdPool = createCopilotClientPool(options?.poolOptions);
|
|
856
867
|
return createdPool;
|
|
857
868
|
})();
|
|
@@ -872,10 +883,10 @@ function createCopilotAgentHarness(options) {
|
|
|
872
883
|
cleanups.delete(cleanup);
|
|
873
884
|
if (cleanups.size === 0) deferredCompactionCleanups.delete(sessionId);
|
|
874
885
|
}
|
|
875
|
-
function hasPendingDeferredCompactionCleanup(sessionId) {
|
|
886
|
+
async function hasPendingDeferredCompactionCleanup(sessionId) {
|
|
876
887
|
const cleanups = deferredCompactionCleanups.get(sessionId);
|
|
877
888
|
if (!cleanups) return false;
|
|
878
|
-
const currentSdkSessionId = trackedSessions.get(sessionId)?.sdkSessionId ?? lookupStoredBinding(options?.sessionStore, sessionId)?.sdkSessionId;
|
|
889
|
+
const currentSdkSessionId = trackedSessions.get(sessionId)?.sdkSessionId ?? (await lookupStoredBinding(options?.sessionStore, sessionId))?.sdkSessionId;
|
|
879
890
|
return currentSdkSessionId !== void 0 && [...cleanups.values()].some((cleanup) => cleanup.sdkSessionId === currentSdkSessionId);
|
|
880
891
|
}
|
|
881
892
|
async function abortDeferredCompactionCleanups(sessionId) {
|
|
@@ -888,7 +899,7 @@ function createCopilotAgentHarness(options) {
|
|
|
888
899
|
async function runHarnessAttempt(params, operation) {
|
|
889
900
|
const attemptPromise = (async () => {
|
|
890
901
|
if (disposed) throw new Error("[copilot] harness has been disposed; cannot start new attempts");
|
|
891
|
-
const { resolvePoolAcquire, runCopilotAttempt } = await import("./attempt-
|
|
902
|
+
const { resolvePoolAcquire, runCopilotAttempt } = await import("./attempt-DKgdMTpc.mjs");
|
|
892
903
|
if (disposed) throw new Error("[copilot] harness was disposed while starting an attempt");
|
|
893
904
|
const pool = await getPool();
|
|
894
905
|
if (disposed) throw new Error("[copilot] harness was disposed while starting an attempt");
|
|
@@ -902,11 +913,14 @@ function createCopilotAgentHarness(options) {
|
|
|
902
913
|
const openclawSessionId = typeof params.sessionId === "string" ? params.sessionId : void 0;
|
|
903
914
|
const currentCompatKey = computeSessionCompatKey(params);
|
|
904
915
|
const currentCompactKey = computeAttemptCompactKey(params);
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
916
|
+
const resumableBinding = openclawSessionId ? await bindingQueue.enqueue(openclawSessionId, async () => {
|
|
917
|
+
if (await hasPendingDeferredCompactionCleanup(openclawSessionId) || resetBlockedStoredSessions.has(openclawSessionId)) return;
|
|
918
|
+
const tracked = trackedSessions.get(openclawSessionId);
|
|
919
|
+
const stored = tracked ? void 0 : await lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
920
|
+
const binding = tracked ?? stored;
|
|
921
|
+
return binding?.compatKey === currentCompatKey ? binding : void 0;
|
|
922
|
+
}) : void 0;
|
|
923
|
+
if (disposed) throw new Error("[copilot] harness was disposed while starting an attempt");
|
|
910
924
|
const resumableSessionId = resumableBinding?.sdkSessionId;
|
|
911
925
|
if (operation === "settled-tool-finalization" && !resumableSessionId) throw new Error("[copilot] cannot safely finalize a settled tool turn without its compatible SDK session");
|
|
912
926
|
const result = await runCopilotAttempt(resumableSessionId ? {
|
|
@@ -936,8 +950,8 @@ function createCopilotAgentHarness(options) {
|
|
|
936
950
|
} : params, {
|
|
937
951
|
pool,
|
|
938
952
|
...operation === "settled-tool-finalization" ? { operation } : {},
|
|
939
|
-
onSessionEstablished: operation === "attempt" && openclawSessionId ? ({ compactionSessionConfig, sdkSessionId, pooledClient, sessionConfig }) => {
|
|
940
|
-
|
|
953
|
+
onSessionEstablished: operation === "attempt" && openclawSessionId ? ({ compactionSessionConfig, sdkSessionId, pooledClient, sessionConfig }) => bindingQueue.enqueue(openclawSessionId, async () => {
|
|
954
|
+
const tracked = {
|
|
941
955
|
sdkSessionId,
|
|
942
956
|
client: pooledClient.client,
|
|
943
957
|
clientOptions: poolAcquire.options,
|
|
@@ -946,8 +960,8 @@ function createCopilotAgentHarness(options) {
|
|
|
946
960
|
poolKey: pooledClient.key,
|
|
947
961
|
sessionConfig: compactionSessionConfig ?? sessionConfig,
|
|
948
962
|
...sessionAuthFields(poolAcquire.auth)
|
|
949
|
-
}
|
|
950
|
-
registerStoredBinding(options?.sessionStore, openclawSessionId, {
|
|
963
|
+
};
|
|
964
|
+
await registerStoredBinding(options?.sessionStore, openclawSessionId, {
|
|
951
965
|
schemaVersion: 2,
|
|
952
966
|
sdkSessionId,
|
|
953
967
|
compatKey: currentCompatKey,
|
|
@@ -955,57 +969,60 @@ function createCopilotAgentHarness(options) {
|
|
|
955
969
|
...sessionAuthFields(poolAcquire.auth),
|
|
956
970
|
updatedAt: Date.now()
|
|
957
971
|
});
|
|
972
|
+
trackedSessions.set(openclawSessionId, tracked);
|
|
958
973
|
resetBlockedStoredSessions.delete(openclawSessionId);
|
|
959
|
-
} : void 0,
|
|
960
|
-
onDeferredCompaction: openclawSessionId ? ({ abort, cleanup, sdkSessionId }) => {
|
|
974
|
+
}) : void 0,
|
|
975
|
+
onDeferredCompaction: openclawSessionId ? ({ abort, cleanup, sdkSessionId }) => bindingQueue.enqueue(openclawSessionId, async () => {
|
|
961
976
|
const trackedBinding = trackedSessions.get(openclawSessionId);
|
|
962
|
-
const storedBinding = lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
977
|
+
const storedBinding = await lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
963
978
|
const ownsTrackedSession = trackedBinding?.sdkSessionId === sdkSessionId;
|
|
964
979
|
const ownsStoredSession = storedBinding?.sdkSessionId === sdkSessionId;
|
|
965
980
|
if (!ownsTrackedSession && !ownsStoredSession) return;
|
|
981
|
+
resetBlockedStoredSessions.add(openclawSessionId);
|
|
966
982
|
trackDeferredCompactionCleanup({
|
|
967
983
|
abort,
|
|
968
|
-
cleanup,
|
|
984
|
+
cleanup: cleanup.then((outcome) => bindingQueue.enqueue(openclawSessionId, async () => {
|
|
985
|
+
const currentTracked = trackedSessions.get(openclawSessionId);
|
|
986
|
+
const currentStored = await lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
987
|
+
const stillOwnsTrackedSession = currentTracked?.sdkSessionId === sdkSessionId;
|
|
988
|
+
const stillOwnsStoredSession = currentStored?.sdkSessionId === sdkSessionId;
|
|
989
|
+
if (outcome === "completed") {
|
|
990
|
+
if (stillOwnsTrackedSession || stillOwnsStoredSession) resetBlockedStoredSessions.delete(openclawSessionId);
|
|
991
|
+
return outcome;
|
|
992
|
+
}
|
|
993
|
+
if (stillOwnsTrackedSession) trackedSessions.delete(openclawSessionId);
|
|
994
|
+
if (stillOwnsStoredSession) await deleteStoredBinding(options?.sessionStore, openclawSessionId);
|
|
995
|
+
if (stillOwnsTrackedSession || stillOwnsStoredSession) resetBlockedStoredSessions.add(openclawSessionId);
|
|
996
|
+
return outcome;
|
|
997
|
+
})),
|
|
969
998
|
sessionId: openclawSessionId,
|
|
970
999
|
sdkSessionId
|
|
971
1000
|
});
|
|
972
|
-
|
|
973
|
-
cleanup.then((outcome) => {
|
|
974
|
-
const currentTracked = trackedSessions.get(openclawSessionId);
|
|
975
|
-
const currentStored = lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
976
|
-
const stillOwnsTrackedSession = currentTracked?.sdkSessionId === sdkSessionId;
|
|
977
|
-
const stillOwnsStoredSession = currentStored?.sdkSessionId === sdkSessionId;
|
|
978
|
-
if (outcome === "completed") {
|
|
979
|
-
if (stillOwnsTrackedSession || stillOwnsStoredSession) resetBlockedStoredSessions.delete(openclawSessionId);
|
|
980
|
-
return;
|
|
981
|
-
}
|
|
982
|
-
if (stillOwnsTrackedSession) trackedSessions.delete(openclawSessionId);
|
|
983
|
-
if (stillOwnsStoredSession) deleteStoredBinding(options?.sessionStore, openclawSessionId);
|
|
984
|
-
if (stillOwnsTrackedSession || stillOwnsStoredSession) resetBlockedStoredSessions.add(openclawSessionId);
|
|
985
|
-
});
|
|
986
|
-
} : void 0
|
|
1001
|
+
}) : void 0
|
|
987
1002
|
});
|
|
988
1003
|
if (operation === "attempt" && openclawSessionId) {
|
|
989
1004
|
const attemptResult = result;
|
|
990
1005
|
const sdkSessionId = attemptResult.sdkSessionId;
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1006
|
+
await bindingQueue.enqueue(openclawSessionId, async () => {
|
|
1007
|
+
const trackedSession = trackedSessions.get(openclawSessionId);
|
|
1008
|
+
if (sdkSessionId && trackedSession?.sdkSessionId === sdkSessionId) {
|
|
1009
|
+
const { journalVersion: _journalVersion, ...baseTracked } = trackedSession;
|
|
1010
|
+
const nextTracked = {
|
|
1011
|
+
...baseTracked,
|
|
1012
|
+
...attemptResult.journalValidated ? { journalVersion: 1 } : {}
|
|
1013
|
+
};
|
|
1014
|
+
await registerStoredBinding(options?.sessionStore, openclawSessionId, {
|
|
1015
|
+
schemaVersion: 2,
|
|
1016
|
+
...attemptResult.journalValidated ? { journalVersion: 1 } : {},
|
|
1017
|
+
sdkSessionId,
|
|
1018
|
+
compatKey: nextTracked.compatKey,
|
|
1019
|
+
compactKey: nextTracked.compactKey,
|
|
1020
|
+
...sessionAuthFields(nextTracked),
|
|
1021
|
+
updatedAt: Date.now()
|
|
1022
|
+
});
|
|
1023
|
+
trackedSessions.set(openclawSessionId, nextTracked);
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1009
1026
|
}
|
|
1010
1027
|
return result;
|
|
1011
1028
|
})();
|
|
@@ -1019,7 +1036,7 @@ function createCopilotAgentHarness(options) {
|
|
|
1019
1036
|
async function runIsolatedCompletionV2(params) {
|
|
1020
1037
|
const completionPromise = (async () => {
|
|
1021
1038
|
if (disposed) throw new Error("[copilot] harness has been disposed; cannot start isolated completion");
|
|
1022
|
-
const { runCopilotIsolatedCompletion } = await import("./isolated-completion-
|
|
1039
|
+
const { runCopilotIsolatedCompletion } = await import("./isolated-completion-CpLMQyd3.mjs");
|
|
1023
1040
|
if (disposed) throw new Error("[copilot] harness was disposed while starting isolated completion");
|
|
1024
1041
|
return await runCopilotIsolatedCompletion(params, async () => {
|
|
1025
1042
|
const pool = await getPool();
|
|
@@ -1079,31 +1096,40 @@ function createCopilotAgentHarness(options) {
|
|
|
1079
1096
|
const result = await runHarnessAttempt(attempt, "settled-tool-finalization");
|
|
1080
1097
|
return projectSettledTurnFinalizationAttemptResult(result);
|
|
1081
1098
|
},
|
|
1082
|
-
|
|
1099
|
+
reset: (params) => trackOperation(async () => {
|
|
1100
|
+
if (disposed) return;
|
|
1083
1101
|
const openclawSessionId = typeof params.sessionId === "string" ? params.sessionId : void 0;
|
|
1084
1102
|
if (!openclawSessionId) return;
|
|
1085
|
-
const tracked =
|
|
1086
|
-
|
|
1087
|
-
|
|
1103
|
+
const { tracked, stored } = await bindingQueue.enqueue(openclawSessionId, async () => {
|
|
1104
|
+
const binding = await lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
1105
|
+
resetBlockedStoredSessions.add(openclawSessionId);
|
|
1106
|
+
return {
|
|
1107
|
+
tracked: trackedSessions.get(openclawSessionId),
|
|
1108
|
+
stored: binding
|
|
1109
|
+
};
|
|
1110
|
+
});
|
|
1088
1111
|
await abortDeferredCompactionCleanups(openclawSessionId);
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
if (
|
|
1092
|
-
|
|
1112
|
+
await bindingQueue.enqueue(openclawSessionId, async () => {
|
|
1113
|
+
const currentStored = await lookupStoredBinding(options?.sessionStore, openclawSessionId);
|
|
1114
|
+
if (stored !== void 0 && currentStored?.sdkSessionId === stored.sdkSessionId) {
|
|
1115
|
+
if (await deleteStoredBinding(options?.sessionStore, openclawSessionId)) resetBlockedStoredSessions.delete(openclawSessionId);
|
|
1116
|
+
} else resetBlockedStoredSessions.delete(openclawSessionId);
|
|
1117
|
+
if (tracked && trackedSessions.get(openclawSessionId)?.sdkSessionId === tracked.sdkSessionId) trackedSessions.delete(openclawSessionId);
|
|
1118
|
+
});
|
|
1093
1119
|
if (!tracked) return;
|
|
1094
|
-
if (trackedSessions.get(openclawSessionId)?.sdkSessionId === tracked.sdkSessionId) trackedSessions.delete(openclawSessionId);
|
|
1095
1120
|
try {
|
|
1096
1121
|
await tracked.client.deleteSession(tracked.sdkSessionId);
|
|
1097
1122
|
} catch {}
|
|
1098
|
-
},
|
|
1099
|
-
|
|
1123
|
+
}),
|
|
1124
|
+
compact: (params) => trackOperation(async () => {
|
|
1125
|
+
if (disposed) return;
|
|
1100
1126
|
const openclawSessionId = typeof params.sessionId === "string" ? params.sessionId : void 0;
|
|
1101
1127
|
if (!openclawSessionId) return {
|
|
1102
1128
|
ok: false,
|
|
1103
1129
|
compacted: false,
|
|
1104
1130
|
reason: "missing-required-params"
|
|
1105
1131
|
};
|
|
1106
|
-
if (hasPendingDeferredCompactionCleanup(openclawSessionId)) return {
|
|
1132
|
+
if (await bindingQueue.enqueue(openclawSessionId, () => hasPendingDeferredCompactionCleanup(openclawSessionId))) return {
|
|
1107
1133
|
ok: false,
|
|
1108
1134
|
compacted: false,
|
|
1109
1135
|
reason: "background-compaction-pending",
|
|
@@ -1111,7 +1137,7 @@ function createCopilotAgentHarness(options) {
|
|
|
1111
1137
|
};
|
|
1112
1138
|
const tracked = trackedSessions.get(openclawSessionId);
|
|
1113
1139
|
const currentCompactKey = computeCompactRequestKey(params);
|
|
1114
|
-
const { resolvePoolAcquire } = await import("./attempt-
|
|
1140
|
+
const { resolvePoolAcquire } = await import("./attempt-DKgdMTpc.mjs");
|
|
1115
1141
|
let resolvedPoolAcquire;
|
|
1116
1142
|
let currentAuth;
|
|
1117
1143
|
try {
|
|
@@ -1178,8 +1204,12 @@ function createCopilotAgentHarness(options) {
|
|
|
1178
1204
|
} catch (err) {
|
|
1179
1205
|
const rawError = err instanceof Error ? err.message : String(err);
|
|
1180
1206
|
if (isStaleSdkSessionError(err)) {
|
|
1181
|
-
|
|
1182
|
-
|
|
1207
|
+
await bindingQueue.enqueue(openclawSessionId, async () => {
|
|
1208
|
+
if (trackedSessions.get(openclawSessionId)?.sdkSessionId === compatibleTracked.sdkSessionId) {
|
|
1209
|
+
await deleteStoredBinding(options?.sessionStore, openclawSessionId);
|
|
1210
|
+
trackedSessions.delete(openclawSessionId);
|
|
1211
|
+
}
|
|
1212
|
+
});
|
|
1183
1213
|
return {
|
|
1184
1214
|
ok: false,
|
|
1185
1215
|
compacted: false,
|
|
@@ -1231,7 +1261,7 @@ function createCopilotAgentHarness(options) {
|
|
|
1231
1261
|
sessionFile: params.sessionFile
|
|
1232
1262
|
} } : {}
|
|
1233
1263
|
};
|
|
1234
|
-
},
|
|
1264
|
+
}),
|
|
1235
1265
|
async dispose() {
|
|
1236
1266
|
if (disposePromise) return disposePromise;
|
|
1237
1267
|
disposed = true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as resolveCopilotProvider, o as tokenFingerprint, r as createCopilotByokProxy } from "./harness-
|
|
2
|
-
import { r as createCopilotIsolatedSessionRestrictions, t as buildCopilotAssistantUsage } from "./usage-bridge-Cpa-ZYwL.
|
|
1
|
+
import { n as resolveCopilotProvider, o as tokenFingerprint, r as createCopilotByokProxy } from "./harness-BH2_ctMF.mjs";
|
|
2
|
+
import { r as createCopilotIsolatedSessionRestrictions, t as buildCopilotAssistantUsage } from "./usage-bridge-Cpa-ZYwL.mjs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
//#region extensions/copilot/src/isolated-completion.ts
|
|
5
5
|
function startBestEffortCleanup(cleanup) {
|
|
@@ -5,7 +5,7 @@ import { existsSync } from "node:fs";
|
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
7
7
|
//#region extensions/copilot/package.json
|
|
8
|
-
var dependencies = { "@github/copilot-sdk": "1.0.
|
|
8
|
+
var dependencies = { "@github/copilot-sdk": "1.0.13" };
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region extensions/copilot/src/sdk-loader.ts
|
|
11
11
|
function resolveCopilotSdkFallbackDir(env = process.env) {
|
|
@@ -52,7 +52,7 @@ function createMissingSdkError(primaryErr, fallbackErr, fallbackPath) {
|
|
|
52
52
|
"[copilot] @github/copilot-sdk is not installed.",
|
|
53
53
|
"",
|
|
54
54
|
"The external @openclaw/copilot plugin depends on @github/copilot-sdk",
|
|
55
|
-
"
|
|
55
|
+
"including its platform-specific Copilot runtime package.",
|
|
56
56
|
"Reinstall the plugin once with:",
|
|
57
57
|
"",
|
|
58
58
|
" openclaw plugins install @openclaw/copilot",
|
package/dist/harness.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createCopilotAgentHarness } from "
|
|
1
|
+
import { t as createCopilotAgentHarness } from "./.setup/harness-BH2_ctMF.mjs";
|
|
2
2
|
export { createCopilotAgentHarness };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createCopilotAgentHarness } from "
|
|
1
|
+
import { t as createCopilotAgentHarness } from "./.setup/harness-BH2_ctMF.mjs";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/copilot/index.ts
|
|
@@ -18,7 +18,7 @@ var copilot_default = definePluginEntry({
|
|
|
18
18
|
if (api.registrationMode !== "full" && api.registrationMode !== "discovery" && api.registrationMode !== "tool-discovery") return;
|
|
19
19
|
const poolOptions = readPoolOptions(api.pluginConfig);
|
|
20
20
|
let sessionStore;
|
|
21
|
-
const getSessionStore = () => sessionStore ??= api.runtime.state.
|
|
21
|
+
const getSessionStore = () => sessionStore ??= api.runtime.state.openKeyedStore({
|
|
22
22
|
namespace: "sdk-sessions",
|
|
23
23
|
maxEntries: 5e3,
|
|
24
24
|
defaultTtlMs: 7776e6
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "copilot",
|
|
3
|
-
"categories": ["
|
|
3
|
+
"categories": ["agent-runtimes"],
|
|
4
4
|
"doctorContract": {
|
|
5
5
|
"configRepair": true
|
|
6
6
|
},
|
|
@@ -21,6 +21,14 @@
|
|
|
21
21
|
"onStartup": false,
|
|
22
22
|
"onAgentHarnesses": ["copilot"]
|
|
23
23
|
},
|
|
24
|
+
"configGroups": [
|
|
25
|
+
{
|
|
26
|
+
"id": "client-pool",
|
|
27
|
+
"title": "Client pool",
|
|
28
|
+
"order": 10,
|
|
29
|
+
"properties": ["pool"]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
24
32
|
"configSchema": {
|
|
25
33
|
"type": "object",
|
|
26
34
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/copilot",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.6",
|
|
4
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
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@github/copilot-sdk": "1.0.
|
|
11
|
+
"@github/copilot-sdk": "1.0.13"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@openclaw/plugin-sdk": "workspace:*"
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"minHostVersion": ">=2026.5.28"
|
|
25
25
|
},
|
|
26
26
|
"compat": {
|
|
27
|
-
"pluginApi": ">=2026.9.
|
|
27
|
+
"pluginApi": ">=2026.9.6"
|
|
28
28
|
},
|
|
29
29
|
"build": {
|
|
30
|
-
"openclawVersion": "2026.9.
|
|
30
|
+
"openclawVersion": "2026.9.6",
|
|
31
31
|
"bundledDist": false
|
|
32
32
|
},
|
|
33
33
|
"release": {
|
|
@@ -42,10 +42,12 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"dist/**",
|
|
44
44
|
"openclaw.plugin.json",
|
|
45
|
-
"README.md"
|
|
45
|
+
"README.md",
|
|
46
|
+
"assets/icon.png",
|
|
47
|
+
"assets/activity.svg"
|
|
46
48
|
],
|
|
47
49
|
"peerDependencies": {
|
|
48
|
-
"openclaw": ">=2026.9.
|
|
50
|
+
"openclaw": ">=2026.9.6"
|
|
49
51
|
},
|
|
50
52
|
"peerDependenciesMeta": {
|
|
51
53
|
"openclaw": {
|
|
File without changes
|