open-multi-agent-kit 0.91.0 → 0.93.0
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/CHANGELOG.md +32 -1
- package/README.md +2 -2
- package/dist/core/agent-session.d.ts +29 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +89 -21
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/command-safety.d.ts.map +1 -1
- package/dist/core/command-safety.js +0 -50
- package/dist/core/command-safety.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +5 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +5 -7
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +12 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +28 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/transaction.d.ts.map +1 -1
- package/dist/core/compaction/transaction.js +7 -3
- package/dist/core/compaction/transaction.js.map +1 -1
- package/dist/core/context-budget-headroom-candidates.d.ts.map +1 -1
- package/dist/core/context-budget-headroom-candidates.js +21 -11
- package/dist/core/context-budget-headroom-candidates.js.map +1 -1
- package/dist/core/context-budget-system-prompt-items.d.ts +1 -0
- package/dist/core/context-budget-system-prompt-items.d.ts.map +1 -1
- package/dist/core/context-budget-system-prompt-items.js +7 -8
- package/dist/core/context-budget-system-prompt-items.js.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.d.ts +8 -0
- package/dist/core/extensions/builtin/command-safety-gate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.js +23 -0
- package/dist/core/extensions/builtin/command-safety-gate.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +5 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/loadouts.d.ts.map +1 -1
- package/dist/core/loadouts.js +27 -48
- package/dist/core/loadouts.js.map +1 -1
- package/dist/core/model-resolver.d.ts +41 -3
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +17 -9
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-resilience.d.ts.map +1 -1
- package/dist/core/provider-resilience.js +3 -1
- package/dist/core/provider-resilience.js.map +1 -1
- package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4-weights.js +9 -3
- package/dist/core/reasoning-router-v4-weights.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +94 -24
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +11 -5
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-file-compaction.d.ts.map +1 -1
- package/dist/core/session-file-compaction.js +39 -5
- package/dist/core/session-file-compaction.js.map +1 -1
- package/dist/core/session-termination.d.ts.map +1 -1
- package/dist/core/session-termination.js +1 -1
- package/dist/core/session-termination.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +8 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +36 -31
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +38 -11
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +112 -11
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.d.ts +27 -0
- package/dist/modes/interactive/components/control-panel-box.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.js +60 -8
- package/dist/modes/interactive/components/control-panel-box.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.js +100 -45
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +9 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.js +10 -8
- package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-sparkles.d.ts +5 -0
- package/dist/modes/interactive/components/control-panel-sparkles.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-sparkles.js +14 -9
- package/dist/modes/interactive/components/control-panel-sparkles.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +10 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +3 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/status-sidebar.d.ts +49 -0
- package/dist/modes/interactive/components/status-sidebar.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-sidebar.js +253 -0
- package/dist/modes/interactive/components/status-sidebar.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +94 -20
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/omk-neon-control.json +13 -13
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +9 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +19 -8
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/adaptorch-preview-spec.md +174 -0
- package/docs/adaptorch-preview.md +1 -1
- package/docs/compaction.md +20 -13
- package/docs/correctness-wall.md +13 -5
- package/docs/custom-provider.md +8 -8
- package/docs/development.md +2 -2
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +90 -0
- package/docs/extensions.md +8 -8
- package/docs/index.md +1 -0
- package/docs/json.md +4 -4
- package/docs/providers.md +1 -1
- package/docs/rpc.md +5 -2
- package/docs/session-format.md +5 -5
- package/docs/settings.md +1 -0
- package/docs/skills.md +2 -0
- package/docs/themes.md +2 -2
- package/docs/tui.md +4 -4
- package/docs/usage.md +4 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +35 -10
- package/examples/extensions/subagent/adaptive-agent-runtime.test.ts +234 -0
- package/examples/extensions/subagent/adaptive-agent-runtime.ts +240 -0
- package/examples/extensions/subagent/adaptive-result.ts +112 -0
- package/examples/extensions/subagent/agents.test.ts +86 -0
- package/examples/extensions/subagent/agents.ts +18 -4
- package/examples/extensions/subagent/capabilities.ts +15 -1
- package/examples/extensions/subagent/checkpoint-runtime.test.ts +125 -0
- package/examples/extensions/subagent/checkpoint-runtime.ts +198 -0
- package/examples/extensions/subagent/deadline-budget.test.ts +135 -0
- package/examples/extensions/subagent/deadline-budget.ts +242 -0
- package/examples/extensions/subagent/deadline-profile-store.test.ts +72 -0
- package/examples/extensions/subagent/deadline-profile-store.ts +172 -0
- package/examples/extensions/subagent/domain-profiles.ts +272 -0
- package/examples/extensions/subagent/fixtures/fake-omk-json.mjs +13 -0
- package/examples/extensions/subagent/fixtures/hanging-process-tree.mjs +40 -0
- package/examples/extensions/subagent/index.ts +253 -137
- package/examples/extensions/subagent/managed-process.test.ts +178 -0
- package/examples/extensions/subagent/managed-process.ts +236 -0
- package/examples/extensions/subagent/subagent-extension-smoke.test.ts +112 -0
- package/examples/extensions/subagent/subagent-runtime-types.ts +76 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +21 -21
- package/package.json +10 -7
|
@@ -286,6 +286,9 @@ export class AgentSession {
|
|
|
286
286
|
// Retry state
|
|
287
287
|
_retryAbortController = undefined;
|
|
288
288
|
_retryAttempt = 0;
|
|
289
|
+
// v10.3-Ω: models that already refused/failed this turn — failover must advance,
|
|
290
|
+
// not re-pick the same candidate (claude-opus-5 → grok → grok → grok loop fix).
|
|
291
|
+
_refusedModels = new Set();
|
|
289
292
|
// Bash execution state
|
|
290
293
|
_bashAbortController = undefined;
|
|
291
294
|
_pendingBashMessages = [];
|
|
@@ -927,6 +930,7 @@ export class AgentSession {
|
|
|
927
930
|
attempt: this._retryAttempt,
|
|
928
931
|
});
|
|
929
932
|
this._retryAttempt = 0;
|
|
933
|
+
this._refusedModels.clear();
|
|
930
934
|
}
|
|
931
935
|
}
|
|
932
936
|
}
|
|
@@ -1463,6 +1467,7 @@ export class AgentSession {
|
|
|
1463
1467
|
finalError: msg.errorMessage,
|
|
1464
1468
|
});
|
|
1465
1469
|
this._retryAttempt = 0;
|
|
1470
|
+
this._refusedModels.clear();
|
|
1466
1471
|
}
|
|
1467
1472
|
if (await this._checkCompaction(msg)) {
|
|
1468
1473
|
return true;
|
|
@@ -2409,7 +2414,9 @@ export class AgentSession {
|
|
|
2409
2414
|
const message = capture.report.activeMessages[index];
|
|
2410
2415
|
if (message?.role !== "user")
|
|
2411
2416
|
continue;
|
|
2412
|
-
const candidate = sanitizeBinaryOutput(redactSensitiveText(this._getUserMessageText(message)).trim())
|
|
2417
|
+
const candidate = sanitizeBinaryOutput(redactSensitiveText(this._getUserMessageText(message)).trim())
|
|
2418
|
+
.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu, "")
|
|
2419
|
+
.slice(0, 16_384);
|
|
2413
2420
|
if (candidate.length > 0)
|
|
2414
2421
|
latestIntent = candidate;
|
|
2415
2422
|
break;
|
|
@@ -2442,7 +2449,7 @@ export class AgentSession {
|
|
|
2442
2449
|
branch: null,
|
|
2443
2450
|
worktree: this._cwd,
|
|
2444
2451
|
modelHistory,
|
|
2445
|
-
nextAction: latestIntent,
|
|
2452
|
+
nextAction: latestIntent.slice(0, 4096) || "Continue the current session",
|
|
2446
2453
|
};
|
|
2447
2454
|
}
|
|
2448
2455
|
_barrierError(barrier) {
|
|
@@ -2741,7 +2748,7 @@ export class AgentSession {
|
|
|
2741
2748
|
}
|
|
2742
2749
|
else {
|
|
2743
2750
|
// Generate compaction result
|
|
2744
|
-
const result = await compact(preparation, compactionModel, apiKey, headers, customInstructions, this._compactionAbortController.signal, this.thinkingLevel, this.agent.streamFn);
|
|
2751
|
+
const result = await compact(preparation, compactionModel, apiKey, headers, customInstructions, this._compactionAbortController.signal, this.thinkingLevel, this.agent.streamFn, this.settingsManager.getRetrySettings(), this._summarizationRetryCallbacks({ source: "compaction", reason: "manual" }));
|
|
2745
2752
|
summary = result.summary;
|
|
2746
2753
|
firstKeptEntryId = result.firstKeptEntryId;
|
|
2747
2754
|
tokensBefore = result.tokensBefore;
|
|
@@ -2751,7 +2758,7 @@ export class AgentSession {
|
|
|
2751
2758
|
throw new Error("Compaction cancelled");
|
|
2752
2759
|
}
|
|
2753
2760
|
const compactionResult = {
|
|
2754
|
-
summary,
|
|
2761
|
+
summary: redactSensitiveText(summary),
|
|
2755
2762
|
firstKeptEntryId,
|
|
2756
2763
|
tokensBefore,
|
|
2757
2764
|
details,
|
|
@@ -3017,7 +3024,7 @@ export class AgentSession {
|
|
|
3017
3024
|
}
|
|
3018
3025
|
else {
|
|
3019
3026
|
// Generate compaction result
|
|
3020
|
-
const compactResult = await compact(preparation, compactionModel, apiKey, headers, undefined, this._autoCompactionAbortController.signal, this.thinkingLevel, this.agent.streamFn);
|
|
3027
|
+
const compactResult = await compact(preparation, compactionModel, apiKey, headers, undefined, this._autoCompactionAbortController.signal, this.thinkingLevel, this.agent.streamFn, this.settingsManager.getRetrySettings(), this._summarizationRetryCallbacks({ source: "compaction", reason }));
|
|
3021
3028
|
summary = compactResult.summary;
|
|
3022
3029
|
firstKeptEntryId = compactResult.firstKeptEntryId;
|
|
3023
3030
|
tokensBefore = compactResult.tokensBefore;
|
|
@@ -3034,7 +3041,7 @@ export class AgentSession {
|
|
|
3034
3041
|
return false;
|
|
3035
3042
|
}
|
|
3036
3043
|
const result = {
|
|
3037
|
-
summary,
|
|
3044
|
+
summary: redactSensitiveText(summary),
|
|
3038
3045
|
firstKeptEntryId,
|
|
3039
3046
|
tokensBefore,
|
|
3040
3047
|
details,
|
|
@@ -3048,7 +3055,21 @@ export class AgentSession {
|
|
|
3048
3055
|
fromExtension,
|
|
3049
3056
|
});
|
|
3050
3057
|
}
|
|
3051
|
-
|
|
3058
|
+
// Whether the agent loop will resume after this compaction. Shared by
|
|
3059
|
+
// the compaction_end event (so the TUI flushes its queued messages
|
|
3060
|
+
// correctly) and the return value below.
|
|
3061
|
+
const resumeMessages = this.agent.state.messages;
|
|
3062
|
+
let lastAssistantMsg;
|
|
3063
|
+
for (let i = resumeMessages.length - 1; i >= 0; i--) {
|
|
3064
|
+
const candidate = resumeMessages[i];
|
|
3065
|
+
if (candidate.role === "assistant") {
|
|
3066
|
+
lastAssistantMsg = candidate;
|
|
3067
|
+
break;
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
const endedCleanly = lastAssistantMsg?.stopReason === "stop";
|
|
3071
|
+
const willResume = this.agent.hasQueuedMessages() || !endedCleanly;
|
|
3072
|
+
const emitWillRetry = compactionEmitWillRetry(willRetry, willResume);
|
|
3052
3073
|
this._emit({ type: "compaction_end", reason, result, aborted: false, willRetry: emitWillRetry });
|
|
3053
3074
|
if (willRetry) {
|
|
3054
3075
|
const messages = this.agent.state.messages;
|
|
@@ -3058,9 +3079,16 @@ export class AgentSession {
|
|
|
3058
3079
|
}
|
|
3059
3080
|
return true;
|
|
3060
3081
|
}
|
|
3061
|
-
//
|
|
3062
|
-
//
|
|
3063
|
-
|
|
3082
|
+
// Resume the agent loop after a successful auto-compaction unless the
|
|
3083
|
+
// agent had already finished cleanly. Previously this returned
|
|
3084
|
+
// `hasQueuedMessages()`, which made the agent stall right after the
|
|
3085
|
+
// purple "Auto-compacting..." indicator whenever no steer/follow-up
|
|
3086
|
+
// messages were queued — even when the last turn was cut off mid-task
|
|
3087
|
+
// (stopReason toolUse/length/error/aborted). Continue in that case so
|
|
3088
|
+
// the task runs to completion on the compacted context. Hysteresis
|
|
3089
|
+
// (disarmed until context drops below rearmRatio) prevents an immediate
|
|
3090
|
+
// re-trigger; a clean "stop" with nothing queued still ends the loop.
|
|
3091
|
+
return willResume;
|
|
3064
3092
|
}
|
|
3065
3093
|
catch (error) {
|
|
3066
3094
|
const errorMessage = error instanceof Error ? error.message : "compaction failed";
|
|
@@ -3474,6 +3502,34 @@ export class AgentSession {
|
|
|
3474
3502
|
// Shared contract with provider-resilience.ts (Fable safety stop, K3 orphan tool_call_id, terminated).
|
|
3475
3503
|
return isTransientProviderErrorMessage(err);
|
|
3476
3504
|
}
|
|
3505
|
+
/**
|
|
3506
|
+
* Retry policy + callbacks shared by compaction and branch-summary summarization calls.
|
|
3507
|
+
* Uses the same `settings.retry` budget/backoff as agent-turn retries so a single transient
|
|
3508
|
+
* stream drop no longer fails the whole operation. `source` carries the context
|
|
3509
|
+
* the TUI needs to render the retry and recreate the underlying indicator.
|
|
3510
|
+
*/
|
|
3511
|
+
_summarizationRetryCallbacks(source) {
|
|
3512
|
+
return {
|
|
3513
|
+
onRetryScheduled: (attempt, maxAttempts, delayMs, errorMessage) => {
|
|
3514
|
+
this._emit({
|
|
3515
|
+
type: "summarization_retry_scheduled",
|
|
3516
|
+
attempt,
|
|
3517
|
+
maxAttempts,
|
|
3518
|
+
delayMs,
|
|
3519
|
+
errorMessage,
|
|
3520
|
+
});
|
|
3521
|
+
},
|
|
3522
|
+
onRetryAttemptStart: () => {
|
|
3523
|
+
this._emit({
|
|
3524
|
+
type: "summarization_retry_attempt_start",
|
|
3525
|
+
...source,
|
|
3526
|
+
});
|
|
3527
|
+
},
|
|
3528
|
+
onRetryFinished: () => {
|
|
3529
|
+
this._emit({ type: "summarization_retry_finished" });
|
|
3530
|
+
},
|
|
3531
|
+
};
|
|
3532
|
+
}
|
|
3477
3533
|
/**
|
|
3478
3534
|
* Prepare a retryable error for continuation with exponential backoff.
|
|
3479
3535
|
* @returns true if the caller should continue the agent, false otherwise
|
|
@@ -3502,8 +3558,9 @@ export class AgentSession {
|
|
|
3502
3558
|
await this.setModel(next);
|
|
3503
3559
|
}
|
|
3504
3560
|
/**
|
|
3505
|
-
*
|
|
3506
|
-
* Retrying the same model
|
|
3561
|
+
* Content/safety stops (stop_reason=refusal) are often false positives on coding turns
|
|
3562
|
+
* for Fable AND Claude Opus/Sonnet. Retrying the same model usually reprints the refusal —
|
|
3563
|
+
* switch via provider-resilience chain first. Failover targets still skip sticky models.
|
|
3507
3564
|
*/
|
|
3508
3565
|
async _maybeFailoverFromSafetyStop(message) {
|
|
3509
3566
|
const resilience = resolveProviderResilience(this.settingsManager.getProviderResilienceSettings());
|
|
@@ -3512,11 +3569,15 @@ export class AgentSession {
|
|
|
3512
3569
|
if (!isContentSafetyStopMessage(message.errorMessage))
|
|
3513
3570
|
return undefined;
|
|
3514
3571
|
const current = this.model;
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3572
|
+
// v10.0-Ω: do NOT gate on isStickySafetyModel(source).
|
|
3573
|
+
// claude-opus-5 emits the same stop_reason=refusal FP; same-model retry is useless.
|
|
3574
|
+
// v10.3-Ω: mark the model that just refused so we never re-pick it this turn.
|
|
3575
|
+
if (current)
|
|
3576
|
+
this._refusedModels.add(`${current.provider}/${current.id}`);
|
|
3519
3577
|
const pick = pickFailoverCandidate(resilience.failoverCandidates, current ? { provider: current.provider, id: current.id } : undefined, (c) => {
|
|
3578
|
+
// Skip any model that already refused/failed this turn → advance the chain.
|
|
3579
|
+
if (this._refusedModels.has(`${c.provider}/${c.id}`))
|
|
3580
|
+
return false;
|
|
3520
3581
|
const next = this._modelRegistry.find(c.provider, c.id);
|
|
3521
3582
|
return !!next && this._modelRegistry.hasConfiguredAuth(next);
|
|
3522
3583
|
});
|
|
@@ -3530,6 +3591,8 @@ export class AgentSession {
|
|
|
3530
3591
|
return `${next.provider}/${next.id}`;
|
|
3531
3592
|
}
|
|
3532
3593
|
catch {
|
|
3594
|
+
// setModel failed (auth/guard) — blacklist so next retry advances further.
|
|
3595
|
+
this._refusedModels.add(`${pick.provider}/${pick.id}`);
|
|
3533
3596
|
return undefined;
|
|
3534
3597
|
}
|
|
3535
3598
|
}
|
|
@@ -3544,7 +3607,7 @@ export class AgentSession {
|
|
|
3544
3607
|
this._retryAttempt--;
|
|
3545
3608
|
return false;
|
|
3546
3609
|
}
|
|
3547
|
-
// Content/safety stop
|
|
3610
|
+
// Content/safety stop (Fable/Opus/Sonnet): switch model BEFORE delay so retry is not same-model refusal.
|
|
3548
3611
|
const failoverTo = await this._maybeFailoverFromSafetyStop(message);
|
|
3549
3612
|
// Safety stops are usually immediate false positives — short delay after failover, full backoff otherwise.
|
|
3550
3613
|
const delayMs = failoverTo
|
|
@@ -3574,6 +3637,7 @@ export class AgentSession {
|
|
|
3574
3637
|
// Aborted during sleep - emit end event so UI can clean up
|
|
3575
3638
|
const attempt = this._retryAttempt;
|
|
3576
3639
|
this._retryAttempt = 0;
|
|
3640
|
+
this._refusedModels.clear();
|
|
3577
3641
|
this._emit({
|
|
3578
3642
|
type: "auto_retry_end",
|
|
3579
3643
|
success: false,
|
|
@@ -3629,11 +3693,10 @@ export class AgentSession {
|
|
|
3629
3693
|
assertLoadoutAccess((request) => decideLoadoutAccess(this._loadoutAccessPolicy, request), { operation: "execute", toolName: "bash", command: resolvedCommand });
|
|
3630
3694
|
}
|
|
3631
3695
|
// Non-negotiable safety floor for headless callers (RPC bash): hard-deny
|
|
3632
|
-
// block-tier commands
|
|
3633
|
-
// spawned. This mirrors the §0.1 freedom safety floor behavior in omakit.
|
|
3696
|
+
// block-tier commands before any shell is spawned.
|
|
3634
3697
|
if (options?.safetyGate === "headless") {
|
|
3635
3698
|
const floorVerdict = classifyShellCommand(command);
|
|
3636
|
-
if (floorVerdict.risk === "block"
|
|
3699
|
+
if (floorVerdict.risk === "block") {
|
|
3637
3700
|
throw new Error(`OMK §0.1 safety floor blocked bash: [${floorVerdict.rule}] ${floorVerdict.reason}`);
|
|
3638
3701
|
}
|
|
3639
3702
|
}
|
|
@@ -3661,7 +3724,10 @@ export class AgentSession {
|
|
|
3661
3724
|
shellPath,
|
|
3662
3725
|
sandboxPolicy: this._getBashSandboxPreflight(options?.sandboxPolicy),
|
|
3663
3726
|
}), {
|
|
3664
|
-
onChunk
|
|
3727
|
+
onChunk: (delta) => {
|
|
3728
|
+
onChunk?.(delta);
|
|
3729
|
+
this._emit({ type: "bash_execution_update", id: options?.id, delta });
|
|
3730
|
+
},
|
|
3665
3731
|
signal: this._bashAbortController.signal,
|
|
3666
3732
|
});
|
|
3667
3733
|
this.recordBashResult(command, result, options);
|
|
@@ -3837,6 +3903,8 @@ export class AgentSession {
|
|
|
3837
3903
|
replaceInstructions,
|
|
3838
3904
|
reserveTokens: branchSummarySettings.reserveTokens,
|
|
3839
3905
|
streamFn: this.agent.streamFn,
|
|
3906
|
+
retry: this.settingsManager.getRetrySettings(),
|
|
3907
|
+
callbacks: this._summarizationRetryCallbacks({ source: "branchSummary" }),
|
|
3840
3908
|
});
|
|
3841
3909
|
if (result.aborted) {
|
|
3842
3910
|
return { cancelled: true, aborted: true };
|