bosun 0.35.2 → 0.35.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/README.md +14 -1
- package/agent-hooks.mjs +7 -1
- package/agent-pool.mjs +16 -0
- package/agent-prompts.mjs +190 -4
- package/agent-sdk.mjs +6 -1
- package/agent-work-analyzer.mjs +48 -9
- package/autofix.mjs +32 -18
- package/bosun.schema.json +1 -1
- package/kanban-adapter.mjs +62 -12
- package/monitor.mjs +25 -6
- package/opencode-shell.mjs +881 -0
- package/package.json +5 -2
- package/primary-agent.mjs +43 -0
- package/setup.mjs +33 -4
- package/task-executor.mjs +43 -14
- package/ui/app.js +10 -7
- package/ui/components/chat-view.js +31 -9
- package/ui/components/session-list.js +20 -4
- package/ui/modules/router.js +2 -0
- package/ui/tabs/agents.js +66 -8
- package/ui-server.mjs +142 -5
- package/workflow-engine.mjs +664 -10
- package/workflow-nodes.mjs +250 -1
- package/workflow-templates/github.mjs +389 -71
- package/workflow-templates/planning.mjs +31 -11
- package/workflow-templates.mjs +3 -0
package/monitor.mjs
CHANGED
|
@@ -731,19 +731,26 @@ async function pollAgentAlerts() {
|
|
|
731
731
|
);
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
// Act on
|
|
735
|
-
// immediately restart the same session against
|
|
736
|
-
if (
|
|
734
|
+
// Act on failed-session alerts: apply a cooldown so task-executor does not
|
|
735
|
+
// immediately restart the same session against a failing API/provider.
|
|
736
|
+
if (
|
|
737
|
+
(alert.type === "failed_session_high_errors" || alert.type === "failed_session_transient_errors") &&
|
|
738
|
+
alert.task_id &&
|
|
739
|
+
internalTaskExecutor
|
|
740
|
+
) {
|
|
737
741
|
try {
|
|
738
742
|
const taskId = alert.task_id;
|
|
739
|
-
const
|
|
743
|
+
const cooldownMs = alert.type === "failed_session_transient_errors"
|
|
744
|
+
? 30 * 60_000
|
|
745
|
+
: 15 * 60_000;
|
|
746
|
+
const cooldownUntil = Date.now() + cooldownMs;
|
|
740
747
|
if (typeof internalTaskExecutor.applyTaskCooldown === "function") {
|
|
741
748
|
internalTaskExecutor.applyTaskCooldown(taskId, cooldownUntil);
|
|
742
749
|
} else if (internalTaskExecutor._skipUntil instanceof Map) {
|
|
743
750
|
internalTaskExecutor._skipUntil.set(taskId, cooldownUntil);
|
|
744
751
|
}
|
|
745
752
|
console.warn(
|
|
746
|
-
`[monitor]
|
|
753
|
+
`[monitor] ${Math.round(cooldownMs / 60_000)}m cooldown applied to task ${taskId} after ${alert.error_count || "?"} API errors (${alert.type}, executor: ${alert.executor || "unknown"})`,
|
|
747
754
|
);
|
|
748
755
|
} catch { /* best effort */ }
|
|
749
756
|
}
|
|
@@ -14857,7 +14864,12 @@ function isStreamNoise(msg) {
|
|
|
14857
14864
|
msg.includes("This operation was aborted") ||
|
|
14858
14865
|
msg.includes("setRawMode EIO") ||
|
|
14859
14866
|
msg.includes("hard_timeout") ||
|
|
14860
|
-
msg.includes("watchdog-timeout")
|
|
14867
|
+
msg.includes("watchdog-timeout") ||
|
|
14868
|
+
// Spawn failures: codex/copilot binary not found — transient noise, not a monitor bug
|
|
14869
|
+
msg.includes("ENOENT") ||
|
|
14870
|
+
msg.includes("The system cannot find the file specified") ||
|
|
14871
|
+
msg.includes("os error 2") ||
|
|
14872
|
+
msg.includes("spawn failed")
|
|
14861
14873
|
);
|
|
14862
14874
|
}
|
|
14863
14875
|
|
|
@@ -15479,11 +15491,18 @@ if (isExecutorDisabled()) {
|
|
|
15479
15491
|
} else if (executorMode === "internal" || executorMode === "hybrid") {
|
|
15480
15492
|
// Start internal executor
|
|
15481
15493
|
try {
|
|
15494
|
+
const workflowOwnsTaskExecutorLifecycle = isWorkflowReplacingModule("task-executor.mjs");
|
|
15495
|
+
if (workflowOwnsTaskExecutorLifecycle) {
|
|
15496
|
+
console.log(
|
|
15497
|
+
"[monitor] task-executor lifecycle delegation enabled — finalization/recovery handled by workflow replacement",
|
|
15498
|
+
);
|
|
15499
|
+
}
|
|
15482
15500
|
const execOpts = {
|
|
15483
15501
|
...internalExecutorConfig,
|
|
15484
15502
|
repoRoot,
|
|
15485
15503
|
repoSlug,
|
|
15486
15504
|
agentPrompts,
|
|
15505
|
+
workflowOwnsTaskLifecycle: workflowOwnsTaskExecutorLifecycle,
|
|
15487
15506
|
sendTelegram:
|
|
15488
15507
|
telegramToken && telegramChatId
|
|
15489
15508
|
? (msg) => void sendTelegramMessage(msg)
|