evil-omo 3.11.7 → 3.12.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/dist/cli/config-manager/bun-install.d.ts +2 -0
- package/dist/cli/index.js +142 -105
- package/dist/config/schema/background-task.d.ts +6 -0
- package/dist/config/schema/evil-omo-config.d.ts +6 -0
- package/dist/evil-omo.schema.json +26 -0
- package/dist/features/background-agent/constants.d.ts +5 -1
- package/dist/features/background-agent/loop-detector.d.ts +17 -0
- package/dist/features/background-agent/types.d.ts +7 -0
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +1 -1
- package/dist/index.js +642 -337
- package/dist/shared/plugin-identity.d.ts +2 -1
- package/dist/shared/shell-env.d.ts +27 -0
- package/dist/tools/delegate-task/model-selection.d.ts +2 -0
- package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
- package/dist/tools/look-at/constants.d.ts +1 -1
- package/package.json +12 -12
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { BackgroundTask, LaunchInput } from "./types";
|
|
3
3
|
export declare const TASK_TTL_MS: number;
|
|
4
|
+
export declare const TERMINAL_TASK_TTL_MS: number;
|
|
4
5
|
export declare const MIN_STABILITY_TIME_MS: number;
|
|
5
|
-
export declare const DEFAULT_STALE_TIMEOUT_MS =
|
|
6
|
+
export declare const DEFAULT_STALE_TIMEOUT_MS = 1200000;
|
|
6
7
|
export declare const DEFAULT_MESSAGE_STALENESS_TIMEOUT_MS = 1800000;
|
|
8
|
+
export declare const DEFAULT_MAX_TOOL_CALLS = 200;
|
|
9
|
+
export declare const DEFAULT_CIRCUIT_BREAKER_WINDOW_SIZE = 20;
|
|
10
|
+
export declare const DEFAULT_CIRCUIT_BREAKER_REPETITION_THRESHOLD_PERCENT = 80;
|
|
7
11
|
export declare const MIN_RUNTIME_BEFORE_STALE_MS = 30000;
|
|
8
12
|
export declare const MIN_IDLE_TIME_MS = 5000;
|
|
9
13
|
export declare const POLLING_INTERVAL_MS = 3000;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BackgroundTaskConfig } from "../../config/schema";
|
|
2
|
+
import type { ToolCallWindow } from "./types";
|
|
3
|
+
export interface CircuitBreakerSettings {
|
|
4
|
+
maxToolCalls: number;
|
|
5
|
+
windowSize: number;
|
|
6
|
+
repetitionThresholdPercent: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ToolLoopDetectionResult {
|
|
9
|
+
triggered: boolean;
|
|
10
|
+
toolName?: string;
|
|
11
|
+
repeatedCount?: number;
|
|
12
|
+
sampleSize?: number;
|
|
13
|
+
thresholdPercent?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveCircuitBreakerSettings(config?: BackgroundTaskConfig): CircuitBreakerSettings;
|
|
16
|
+
export declare function recordToolCall(window: ToolCallWindow | undefined, toolName: string, settings: CircuitBreakerSettings): ToolCallWindow;
|
|
17
|
+
export declare function detectRepetitiveToolUse(window: ToolCallWindow | undefined): ToolLoopDetectionResult;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
2
2
|
import type { SessionPermissionRule } from "../../shared/question-denied-session-permission";
|
|
3
3
|
export type BackgroundTaskStatus = "pending" | "running" | "completed" | "error" | "cancelled" | "interrupt";
|
|
4
|
+
export interface ToolCallWindow {
|
|
5
|
+
toolNames: string[];
|
|
6
|
+
windowSize: number;
|
|
7
|
+
thresholdPercent: number;
|
|
8
|
+
}
|
|
4
9
|
export interface TaskProgress {
|
|
5
10
|
toolCalls: number;
|
|
6
11
|
lastTool?: string;
|
|
12
|
+
toolCallWindow?: ToolCallWindow;
|
|
13
|
+
countedToolPartIDs?: string[];
|
|
7
14
|
lastUpdate: Date;
|
|
8
15
|
lastMessage?: string;
|
|
9
16
|
lastMessageAt?: Date;
|
|
@@ -2,6 +2,7 @@ import type { PluginInput } from "@opencode-ai/plugin";
|
|
|
2
2
|
import type { RalphLoopState } from "./types";
|
|
3
3
|
type LoopStateController = {
|
|
4
4
|
restartAfterFailedVerification: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null;
|
|
5
|
+
setVerificationSessionID: (sessionID: string, verificationSessionID: string) => RalphLoopState | null;
|
|
5
6
|
};
|
|
6
7
|
export declare function handlePendingVerification(ctx: PluginInput, input: {
|
|
7
8
|
sessionID: string;
|
|
@@ -4,7 +4,7 @@ export interface ContinuationProgressUpdate {
|
|
|
4
4
|
previousStagnationCount: number;
|
|
5
5
|
stagnationCount: number;
|
|
6
6
|
hasProgressed: boolean;
|
|
7
|
-
progressSource: "none" | "todo"
|
|
7
|
+
progressSource: "none" | "todo";
|
|
8
8
|
}
|
|
9
9
|
export interface SessionStateStore {
|
|
10
10
|
getState: (sessionID: string) => SessionState;
|