opencode-immune 1.0.43 → 1.0.45
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/plugin.js +14 -3
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -11,7 +11,7 @@ const child_process_1 = require("child_process");
|
|
|
11
11
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
12
12
|
// PLUGIN VERSION CHECK
|
|
13
13
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
14
|
-
const PLUGIN_VERSION = "1.0.
|
|
14
|
+
const PLUGIN_VERSION = "1.0.44";
|
|
15
15
|
const PLUGIN_PACKAGE_NAME = "opencode-immune";
|
|
16
16
|
/**
|
|
17
17
|
* Read plugin version from package.json at runtime.
|
|
@@ -96,11 +96,11 @@ const MANAGED_SESSION_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
|
96
96
|
const PROVIDER_RETRY_WATCHDOG_MS = 30_000;
|
|
97
97
|
const CHILD_FALLBACK_REQUEST_TTL_MS = 10 * 60 * 1000;
|
|
98
98
|
const RATE_LIMIT_FALLBACK_MODEL = {
|
|
99
|
-
providerID: "
|
|
99
|
+
providerID: "codexsale",
|
|
100
100
|
modelID: "gpt-5.5",
|
|
101
101
|
};
|
|
102
102
|
const CHILD_SESSION_FALLBACK_MODEL = {
|
|
103
|
-
providerID: "
|
|
103
|
+
providerID: "codexsale",
|
|
104
104
|
modelID: "gpt-5.5",
|
|
105
105
|
};
|
|
106
106
|
function isManagedUltraworkSession(state, sessionID) {
|
|
@@ -192,6 +192,12 @@ async function addManagedChildSession(state, sessionID, parentSessionID, timesta
|
|
|
192
192
|
const parent = state.managedUltraworkSessions.get(parentSessionID);
|
|
193
193
|
if (!parent)
|
|
194
194
|
return;
|
|
195
|
+
cancelProviderRetryWatchdog(state, parent.rootSessionID, `child session ${sessionID} created`);
|
|
196
|
+
await writeDiagnosticLog(state, "provider-retry-watchdog:cancel-child-created", {
|
|
197
|
+
sessionID,
|
|
198
|
+
parentSessionID,
|
|
199
|
+
rootSessionID: parent.rootSessionID,
|
|
200
|
+
});
|
|
195
201
|
const existing = state.managedUltraworkSessions.get(sessionID);
|
|
196
202
|
state.managedUltraworkSessions.set(sessionID, {
|
|
197
203
|
kind: "child",
|
|
@@ -1409,12 +1415,17 @@ function createEventHandler(state) {
|
|
|
1409
1415
|
}
|
|
1410
1416
|
// Reset retry counter on successful activity
|
|
1411
1417
|
if (eventType === "session.updated" && sessionID) {
|
|
1418
|
+
const managedSession = getManagedSession(state, sessionID);
|
|
1412
1419
|
cancelPendingSessionRetry(state, sessionID, "session updated");
|
|
1413
1420
|
cancelProviderRetryWatchdog(state, sessionID, "session updated");
|
|
1414
1421
|
state.sessionErrorRetryCount.delete(sessionID);
|
|
1415
1422
|
if (markUltraworkSessionActive(state, sessionID)) {
|
|
1416
1423
|
// session activity tracked in-memory only
|
|
1417
1424
|
}
|
|
1425
|
+
if (managedSession?.kind === "child") {
|
|
1426
|
+
cancelProviderRetryWatchdog(state, managedSession.rootSessionID, `child session ${sessionID} updated`);
|
|
1427
|
+
markUltraworkSessionActive(state, managedSession.rootSessionID);
|
|
1428
|
+
}
|
|
1418
1429
|
}
|
|
1419
1430
|
if (eventType === "session.deleted" && sessionID) {
|
|
1420
1431
|
await removeManagedUltraworkSession(state, sessionID, "session deleted");
|