opencode-swarm 7.78.0 → 7.78.2
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/cli/index.js +1 -1
- package/dist/index.js +32 -26
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "opencode-swarm",
|
|
55
|
-
version: "7.78.
|
|
55
|
+
version: "7.78.2",
|
|
56
56
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
57
57
|
main: "dist/index.js",
|
|
58
58
|
types: "dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var package_default;
|
|
|
69
69
|
var init_package = __esm(() => {
|
|
70
70
|
package_default = {
|
|
71
71
|
name: "opencode-swarm",
|
|
72
|
-
version: "7.78.
|
|
72
|
+
version: "7.78.2",
|
|
73
73
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
74
74
|
main: "dist/index.js",
|
|
75
75
|
types: "dist/index.d.ts",
|
|
@@ -26887,7 +26887,8 @@ ${textPart2.text}`;
|
|
|
26887
26887
|
const TRANSIENT_PREFIXES = [
|
|
26888
26888
|
"TRANSIENT ERROR:",
|
|
26889
26889
|
"MODEL FALLBACK:",
|
|
26890
|
-
"DEGRADED:"
|
|
26890
|
+
"DEGRADED:",
|
|
26891
|
+
"[pr-monitor:"
|
|
26891
26892
|
];
|
|
26892
26893
|
const transientAdvisories = allAdvisories.filter((m) => TRANSIENT_PREFIXES.some((p) => m.startsWith(p)));
|
|
26893
26894
|
if (transientAdvisories.length > 0) {
|
|
@@ -104283,14 +104284,6 @@ async function ghExecAsync(args2, cwd) {
|
|
|
104283
104284
|
});
|
|
104284
104285
|
}
|
|
104285
104286
|
var _internals59 = { ghExec, ghExecAsync };
|
|
104286
|
-
function isGhAvailable(cwd) {
|
|
104287
|
-
try {
|
|
104288
|
-
ghExec(["--version"], cwd);
|
|
104289
|
-
return true;
|
|
104290
|
-
} catch {
|
|
104291
|
-
return false;
|
|
104292
|
-
}
|
|
104293
|
-
}
|
|
104294
104287
|
async function getPRStatus(prNumber, repoFullName, cwd) {
|
|
104295
104288
|
let stdout;
|
|
104296
104289
|
try {
|
|
@@ -104811,7 +104804,7 @@ class PrMonitorWorker {
|
|
|
104811
104804
|
const cooldownSeconds = Math.min(this.config.cooldown_seconds * 2 ** (cb.cooldownLevel - 1), this.config.max_cooldown_seconds);
|
|
104812
104805
|
cb.suspendedUntil = Date.now() + cooldownSeconds * 1000;
|
|
104813
104806
|
this.circuitBreakerMap.set(correlationId, cb);
|
|
104814
|
-
|
|
104807
|
+
error48("[PrMonitorWorker] Circuit breaker tripped for PR", {
|
|
104815
104808
|
correlationId,
|
|
104816
104809
|
errorCount: cb.errorCount,
|
|
104817
104810
|
cooldownSeconds
|
|
@@ -105988,9 +105981,6 @@ function tickAndMaybeDispatchCadence(directory, sessionID, counter, config3, opt
|
|
|
105988
105981
|
return decision;
|
|
105989
105982
|
}
|
|
105990
105983
|
|
|
105991
|
-
// src/git/index.ts
|
|
105992
|
-
init_branch();
|
|
105993
|
-
|
|
105994
105984
|
// src/hooks/agent-activity.ts
|
|
105995
105985
|
init_state();
|
|
105996
105986
|
init_utils();
|
|
@@ -115030,14 +115020,18 @@ async function appendAudit(directory, record3) {
|
|
|
115030
115020
|
});
|
|
115031
115021
|
await appendFile11(filePath, `${JSON.stringify(record3)}
|
|
115032
115022
|
`, "utf-8");
|
|
115033
|
-
|
|
115034
|
-
|
|
115023
|
+
try {
|
|
115024
|
+
const content = await readFile27(filePath, "utf-8");
|
|
115025
|
+
const lines = content.split(`
|
|
115035
115026
|
`).filter((line) => line.trim().length > 0);
|
|
115036
|
-
|
|
115037
|
-
|
|
115038
|
-
|
|
115027
|
+
if (lines.length > MAX_LEGACY_APPLICATION_LOG_ENTRIES) {
|
|
115028
|
+
const trimmed = lines.slice(-MAX_LEGACY_APPLICATION_LOG_ENTRIES);
|
|
115029
|
+
await atomicWriteFile(filePath, `${trimmed.join(`
|
|
115039
115030
|
`)}
|
|
115040
115031
|
`);
|
|
115032
|
+
}
|
|
115033
|
+
} catch (err2) {
|
|
115034
|
+
warn(`[knowledge-application] appendAudit cap failed: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
115041
115035
|
}
|
|
115042
115036
|
} finally {
|
|
115043
115037
|
if (release)
|
|
@@ -146805,14 +146799,10 @@ async function initializeOpenCodeSwarm(ctx) {
|
|
|
146805
146799
|
});
|
|
146806
146800
|
}
|
|
146807
146801
|
const prMonitorConfig = PrMonitorConfigSchema.parse(config3.pr_monitor ?? {});
|
|
146808
|
-
|
|
146802
|
+
function ensurePrMonitorWorkerRunning(directory) {
|
|
146809
146803
|
try {
|
|
146810
146804
|
if (!prMonitorConfig.enabled)
|
|
146811
146805
|
return;
|
|
146812
|
-
if (!isGhAvailable(directory)) {
|
|
146813
|
-
log("[pr-monitor] gh CLI not available — skipping worker start");
|
|
146814
|
-
return;
|
|
146815
|
-
}
|
|
146816
146806
|
if (!prMonitorWorker) {
|
|
146817
146807
|
prMonitorWorker = new PrMonitorWorker({
|
|
146818
146808
|
directory,
|
|
@@ -146821,13 +146811,16 @@ async function initializeOpenCodeSwarm(ctx) {
|
|
|
146821
146811
|
}
|
|
146822
146812
|
if (!prMonitorWorker.isRunning()) {
|
|
146823
146813
|
prMonitorWorker.start();
|
|
146824
|
-
log("PR Monitor Worker
|
|
146814
|
+
log("PR Monitor Worker started", { directory });
|
|
146825
146815
|
}
|
|
146826
146816
|
} catch (err3) {
|
|
146827
|
-
|
|
146817
|
+
error48("[pr-monitor] Worker failed to start (non-fatal)", {
|
|
146828
146818
|
error: err3 instanceof Error ? err3.message : String(err3)
|
|
146829
146819
|
});
|
|
146830
146820
|
}
|
|
146821
|
+
}
|
|
146822
|
+
setOnSubscriptionCreated((directory, _record3) => {
|
|
146823
|
+
ensurePrMonitorWorkerRunning(directory);
|
|
146831
146824
|
});
|
|
146832
146825
|
let prEventCleanup = null;
|
|
146833
146826
|
if (prMonitorConfig.enabled) {
|
|
@@ -146843,6 +146836,19 @@ async function initializeOpenCodeSwarm(ctx) {
|
|
|
146843
146836
|
});
|
|
146844
146837
|
}
|
|
146845
146838
|
}
|
|
146839
|
+
if (prMonitorConfig.enabled) {
|
|
146840
|
+
queueMicrotask(() => {
|
|
146841
|
+
listActive(ctx.directory).then((active) => {
|
|
146842
|
+
if (active.length > 0) {
|
|
146843
|
+
ensurePrMonitorWorkerRunning(ctx.directory);
|
|
146844
|
+
}
|
|
146845
|
+
}).catch((err3) => {
|
|
146846
|
+
error48("[pr-monitor] Startup scan failed (non-fatal)", {
|
|
146847
|
+
error: err3 instanceof Error ? err3.message : String(err3)
|
|
146848
|
+
});
|
|
146849
|
+
});
|
|
146850
|
+
});
|
|
146851
|
+
}
|
|
146846
146852
|
const cleanupAutomation = () => {
|
|
146847
146853
|
automationManager?.stop();
|
|
146848
146854
|
prMonitorWorker?.stop();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.78.
|
|
3
|
+
"version": "7.78.2",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|