oh-my-opencode 3.15.2 → 3.16.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/agents/dynamic-agent-core-sections.d.ts +7 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
- package/dist/cli/config-manager/backup-config.d.ts +6 -0
- package/dist/cli/config-manager/version-compatibility.d.ts +9 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/doctor/constants.d.ts +1 -1
- package/dist/cli/index.js +1691 -552
- package/dist/cli/minimum-opencode-version.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +3 -0
- package/dist/cli/run/continuation-state.d.ts +2 -1
- package/dist/cli/types.d.ts +1 -0
- package/dist/create-managers.d.ts +14 -0
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +5 -2
- package/dist/features/boulder-state/storage.d.ts +8 -1
- package/dist/features/boulder-state/types.d.ts +1 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +1 -1
- package/dist/features/claude-code-mcp-loader/env-expander.d.ts +5 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +15 -0
- package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +2 -0
- package/dist/features/claude-code-plugin-loader/types.d.ts +11 -0
- package/dist/features/claude-code-session-state/state.d.ts +1 -0
- package/dist/features/mcp-oauth/provider.d.ts +1 -0
- package/dist/features/mcp-oauth/refresh-mutex.d.ts +26 -0
- package/dist/features/skill-mcp-manager/error-redaction.d.ts +10 -0
- package/dist/features/skill-mcp-manager/oauth-handler.d.ts +7 -0
- package/dist/features/skill-mcp-manager/types.d.ts +3 -1
- package/dist/hooks/atlas/background-launch-session-tracking.d.ts +11 -0
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +2 -1
- package/dist/hooks/atlas/task-context.d.ts +7 -0
- package/dist/hooks/atlas/types.d.ts +2 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
- package/dist/hooks/keyword-detector/hook.d.ts +2 -1
- package/dist/hooks/ralph-loop/constants.d.ts +1 -0
- package/dist/hooks/ralph-loop/oracle-verification-detector.d.ts +8 -0
- package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -5
- package/dist/hooks/session-recovery/types.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/token-limit-detection.d.ts +4 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +7 -0
- package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +1 -0
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
- package/dist/index.js +2439 -1222
- package/dist/plugin/chat-params.d.ts +1 -0
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
- package/dist/shared/agent-display-names.d.ts +10 -2
- package/dist/shared/compaction-marker.d.ts +12 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/internal-initiator-marker.d.ts +1 -0
- package/dist/shared/session-prompt-params-state.d.ts +1 -0
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/resolve-call-id.d.ts +2 -0
- package/package.json +16 -18
- package/postinstall.mjs +63 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getUnsupportedOpenCodeVersionMessage(openCodeVersion: string | null): string | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FallbackModelObject } from "../config/schema/fallback-models";
|
|
1
2
|
export interface ProviderAvailability {
|
|
2
3
|
native: {
|
|
3
4
|
claude: boolean;
|
|
@@ -14,10 +15,12 @@ export interface ProviderAvailability {
|
|
|
14
15
|
export interface AgentConfig {
|
|
15
16
|
model: string;
|
|
16
17
|
variant?: string;
|
|
18
|
+
fallback_models?: FallbackModelObject[];
|
|
17
19
|
}
|
|
18
20
|
export interface CategoryConfig {
|
|
19
21
|
model: string;
|
|
20
22
|
variant?: string;
|
|
23
|
+
fallback_models?: FallbackModelObject[];
|
|
21
24
|
}
|
|
22
25
|
export interface GeneratedOmoConfig {
|
|
23
26
|
$schema: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RunContext } from "./types";
|
|
1
2
|
export interface ContinuationState {
|
|
2
3
|
hasActiveBoulder: boolean;
|
|
3
4
|
hasActiveRalphLoop: boolean;
|
|
@@ -6,4 +7,4 @@ export interface ContinuationState {
|
|
|
6
7
|
hasActiveHookMarker: boolean;
|
|
7
8
|
activeHookMarkerReason: string | null;
|
|
8
9
|
}
|
|
9
|
-
export declare function getContinuationState(directory: string, sessionID: string): ContinuationState
|
|
10
|
+
export declare function getContinuationState(directory: string, sessionID: string, client?: RunContext["client"]): Promise<ContinuationState>;
|
package/dist/cli/types.d.ts
CHANGED
|
@@ -3,8 +3,20 @@ import type { ModelCacheState } from "./plugin-state";
|
|
|
3
3
|
import type { PluginContext, TmuxConfig } from "./plugin/types";
|
|
4
4
|
import { BackgroundManager } from "./features/background-agent";
|
|
5
5
|
import { SkillMcpManager } from "./features/skill-mcp-manager";
|
|
6
|
+
import { initTaskToastManager } from "./features/task-toast-manager";
|
|
6
7
|
import { TmuxSessionManager } from "./features/tmux-subagent";
|
|
8
|
+
import { registerManagerForCleanup } from "./features/background-agent/process-cleanup";
|
|
7
9
|
import { createConfigHandler } from "./plugin-handlers";
|
|
10
|
+
import { markServerRunningInProcess } from "./shared/tmux/tmux-utils/server-health";
|
|
11
|
+
type CreateManagersDeps = {
|
|
12
|
+
BackgroundManagerClass: typeof BackgroundManager;
|
|
13
|
+
SkillMcpManagerClass: typeof SkillMcpManager;
|
|
14
|
+
TmuxSessionManagerClass: typeof TmuxSessionManager;
|
|
15
|
+
initTaskToastManagerFn: typeof initTaskToastManager;
|
|
16
|
+
registerManagerForCleanupFn: typeof registerManagerForCleanup;
|
|
17
|
+
createConfigHandlerFn: typeof createConfigHandler;
|
|
18
|
+
markServerRunningInProcessFn: typeof markServerRunningInProcess;
|
|
19
|
+
};
|
|
8
20
|
export type Managers = {
|
|
9
21
|
tmuxSessionManager: TmuxSessionManager;
|
|
10
22
|
backgroundManager: BackgroundManager;
|
|
@@ -17,4 +29,6 @@ export declare function createManagers(args: {
|
|
|
17
29
|
tmuxConfig: TmuxConfig;
|
|
18
30
|
modelCacheState: ModelCacheState;
|
|
19
31
|
backgroundNotificationHookEnabled: boolean;
|
|
32
|
+
deps?: Partial<CreateManagersDeps>;
|
|
20
33
|
}): Managers;
|
|
34
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { StoredMessage } from "../hook-message-injector";
|
|
2
|
+
export { isCompactionAgent } from "../../shared/compaction-marker";
|
|
2
3
|
type SessionMessage = {
|
|
4
|
+
id?: string;
|
|
3
5
|
info?: {
|
|
4
6
|
agent?: string;
|
|
5
7
|
model?: {
|
|
@@ -11,8 +13,9 @@ type SessionMessage = {
|
|
|
11
13
|
modelID?: string;
|
|
12
14
|
tools?: StoredMessage["tools"];
|
|
13
15
|
};
|
|
16
|
+
parts?: Array<{
|
|
17
|
+
type?: string;
|
|
18
|
+
}>;
|
|
14
19
|
};
|
|
15
|
-
export declare function isCompactionAgent(agent: string | undefined): boolean;
|
|
16
20
|
export declare function resolvePromptContextFromSessionMessages(messages: SessionMessage[], sessionID?: string): StoredMessage | null;
|
|
17
21
|
export declare function findNearestMessageExcludingCompaction(messageDir: string, sessionID?: string): StoredMessage | null;
|
|
18
|
-
export {};
|
|
@@ -7,7 +7,7 @@ import type { BoulderState, PlanProgress, TaskSessionState } from "./types";
|
|
|
7
7
|
export declare function getBoulderFilePath(directory: string): string;
|
|
8
8
|
export declare function readBoulderState(directory: string): BoulderState | null;
|
|
9
9
|
export declare function writeBoulderState(directory: string, state: BoulderState): boolean;
|
|
10
|
-
export declare function appendSessionId(directory: string, sessionId: string): BoulderState | null;
|
|
10
|
+
export declare function appendSessionId(directory: string, sessionId: string, origin?: "direct" | "appended"): BoulderState | null;
|
|
11
11
|
export declare function clearBoulderState(directory: string): boolean;
|
|
12
12
|
export declare function getTaskSessionState(directory: string, taskKey: string): TaskSessionState | null;
|
|
13
13
|
export declare function upsertTaskSessionState(directory: string, input: {
|
|
@@ -25,6 +25,13 @@ export declare function upsertTaskSessionState(directory: string, input: {
|
|
|
25
25
|
export declare function findPrometheusPlans(directory: string): string[];
|
|
26
26
|
/**
|
|
27
27
|
* Parse a plan file and count checkbox progress.
|
|
28
|
+
*
|
|
29
|
+
* Only top-level (zero-indent) checkboxes under `## TODOs` and
|
|
30
|
+
* `## Final Verification Wave` sections are counted. The checkbox
|
|
31
|
+
* body must carry a valid task label (`N.` for TODOs, `FN.` for
|
|
32
|
+
* Final Verification Wave). Nested acceptance-criteria checkboxes
|
|
33
|
+
* and checkboxes in other sections are intentionally ignored so
|
|
34
|
+
* that progress tracking stays aligned with `readCurrentTopLevelTask`.
|
|
28
35
|
*/
|
|
29
36
|
export declare function getPlanProgress(planPath: string): PlanProgress;
|
|
30
37
|
/**
|
|
@@ -11,6 +11,7 @@ export interface BoulderState {
|
|
|
11
11
|
started_at: string;
|
|
12
12
|
/** Session IDs that have worked on this plan */
|
|
13
13
|
session_ids: string[];
|
|
14
|
+
session_origins?: Record<string, "direct" | "appended">;
|
|
14
15
|
/** Plan name derived from filename */
|
|
15
16
|
plan_name: string;
|
|
16
17
|
/** Agent type to use when resuming (e.g., 'atlas') */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const RALPH_LOOP_TEMPLATE = "You are starting a Ralph Loop - a self-referential development loop that runs until task completion.\n\n## How Ralph Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output your completion promise tag when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-ralph` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N] [--strategy=reset|continue]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
|
|
2
|
-
export declare const ULW_LOOP_TEMPLATE = "You are starting an ULTRAWORK Loop - a self-referential development loop that runs until verified completion.\n\n## How ULTRAWORK Loop Works\n\n1. You will work on the task continuously\n2. When you believe the work is complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. That does NOT finish the loop yet. The system will require Oracle verification\n4. The loop only ends after the system confirms Oracle verified the result\n5.
|
|
2
|
+
export declare const ULW_LOOP_TEMPLATE = "You are starting an ULTRAWORK Loop - a self-referential development loop that runs until verified completion.\n\n## How ULTRAWORK Loop Works\n\n1. You will work on the task continuously\n2. When you believe the work is complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. That does NOT finish the loop yet. The system will require Oracle verification\n4. The loop only ends after the system confirms Oracle verified the result\n5. The iteration limit is 500 for ultrawork mode, 100 for normal mode\n\n## Rules\n\n- Focus on finishing the task completely\n- After you emit the completion promise, run Oracle verification when instructed\n- Do not treat DONE as final completion until Oracle verifies it\n\n## Exit Conditions\n\n1. **Verified Completion**: Oracle verifies the result and the system confirms it\n2. **Cancel**: User runs `/cancel-ralph`\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--strategy=reset|continue]`\n\nDefault completion promise is \"DONE\".";
|
|
3
3
|
export declare const CANCEL_RALPH_TEMPLATE = "Cancel the currently active Ralph Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export interface ExpandEnvVarsOptions {
|
|
2
|
+
trusted?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function expandEnvVars(value: string, options?: ExpandEnvVarsOptions): string;
|
|
5
|
+
export declare function expandEnvVarsInObject<T>(obj: T, options?: ExpandEnvVarsOptions): T;
|
|
@@ -2,6 +2,12 @@ import type { CommandDefinition } from "../claude-code-command-loader/types";
|
|
|
2
2
|
import type { McpServerConfig } from "../claude-code-mcp-loader/types";
|
|
3
3
|
import type { ClaudeCodeAgentConfig } from "../claude-code-agent-loader/types";
|
|
4
4
|
import type { HooksConfig, LoadedPlugin, PluginLoadError, PluginLoaderOptions } from "./types";
|
|
5
|
+
import { discoverInstalledPlugins } from "./discovery";
|
|
6
|
+
import { loadPluginCommands } from "./command-loader";
|
|
7
|
+
import { loadPluginSkillsAsCommands } from "./skill-loader";
|
|
8
|
+
import { loadPluginAgents } from "./agent-loader";
|
|
9
|
+
import { loadPluginMcpServers } from "./mcp-server-loader";
|
|
10
|
+
import { loadPluginHooksConfigs } from "./hook-loader";
|
|
5
11
|
export { discoverInstalledPlugins } from "./discovery";
|
|
6
12
|
export { loadPluginCommands } from "./command-loader";
|
|
7
13
|
export { loadPluginSkillsAsCommands } from "./skill-loader";
|
|
@@ -17,5 +23,14 @@ export interface PluginComponentsResult {
|
|
|
17
23
|
plugins: LoadedPlugin[];
|
|
18
24
|
errors: PluginLoadError[];
|
|
19
25
|
}
|
|
26
|
+
export interface PluginComponentLoadDeps {
|
|
27
|
+
discoverInstalledPlugins: typeof discoverInstalledPlugins;
|
|
28
|
+
loadPluginCommands: typeof loadPluginCommands;
|
|
29
|
+
loadPluginSkillsAsCommands: typeof loadPluginSkillsAsCommands;
|
|
30
|
+
loadPluginAgents: typeof loadPluginAgents;
|
|
31
|
+
loadPluginMcpServers: typeof loadPluginMcpServers;
|
|
32
|
+
loadPluginHooksConfigs: typeof loadPluginHooksConfigs;
|
|
33
|
+
}
|
|
20
34
|
export declare function clearPluginComponentsCache(): void;
|
|
21
35
|
export declare function loadAllPluginComponents(options?: PluginLoaderOptions): Promise<PluginComponentsResult>;
|
|
36
|
+
export declare function loadAllPluginComponentsWithDeps(options: PluginLoaderOptions | undefined, deps: PluginComponentLoadDeps): Promise<PluginComponentsResult>;
|
|
@@ -16,6 +16,12 @@ export interface PluginInstallation {
|
|
|
16
16
|
lastUpdated: string;
|
|
17
17
|
gitCommitSha?: string;
|
|
18
18
|
isLocal?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Claude Code records this on project/local-scoped installations.
|
|
21
|
+
* Absolute path (or `~`-prefixed) of the project the plugin was installed for.
|
|
22
|
+
* Used to filter project/local plugins that do not belong to the current cwd.
|
|
23
|
+
*/
|
|
24
|
+
projectPath?: string;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* Installed plugins database v1 (legacy)
|
|
@@ -46,6 +52,11 @@ export interface InstalledPluginEntryV3 {
|
|
|
46
52
|
installPath: string;
|
|
47
53
|
lastUpdated: string;
|
|
48
54
|
gitCommitSha?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Claude Code records this on project/local-scoped installations.
|
|
57
|
+
* Absolute path (or `~`-prefixed) of the project the plugin was installed for.
|
|
58
|
+
*/
|
|
59
|
+
projectPath?: string;
|
|
49
60
|
}
|
|
50
61
|
/**
|
|
51
62
|
* Installed plugins database structure
|
|
@@ -4,6 +4,7 @@ export declare function setMainSession(id: string | undefined): void;
|
|
|
4
4
|
export declare function getMainSessionID(): string | undefined;
|
|
5
5
|
export declare function registerAgentName(name: string): void;
|
|
6
6
|
export declare function isAgentRegistered(name: string): boolean;
|
|
7
|
+
export declare function resolveRegisteredAgentName(name: string | undefined): string | undefined;
|
|
7
8
|
/** @internal For testing only */
|
|
8
9
|
export declare function _resetForTesting(): void;
|
|
9
10
|
export declare function setSessionAgent(sessionID: string, agent: string): void;
|
|
@@ -25,5 +25,6 @@ export declare class McpOAuthProvider {
|
|
|
25
25
|
code: string;
|
|
26
26
|
}>;
|
|
27
27
|
login(): Promise<OAuthTokenData>;
|
|
28
|
+
refresh(refreshToken: string): Promise<OAuthTokenData>;
|
|
28
29
|
}
|
|
29
30
|
export { generateCodeVerifier, generateCodeChallenge, buildAuthorizationUrl, startCallbackServer };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { OAuthTokenData } from "./storage";
|
|
2
|
+
/**
|
|
3
|
+
* Execute a token refresh with per-server mutual exclusion.
|
|
4
|
+
*
|
|
5
|
+
* If a refresh is already in progress for the given server, this will
|
|
6
|
+
* return the same promise to all concurrent callers. Once the refresh
|
|
7
|
+
* completes (success or failure), the lock is released.
|
|
8
|
+
*
|
|
9
|
+
* @param serverUrl - The OAuth server URL (used as mutex key)
|
|
10
|
+
* @param refreshFn - The actual refresh operation to execute
|
|
11
|
+
* @returns Promise that resolves to the new token data
|
|
12
|
+
*/
|
|
13
|
+
export declare function withRefreshMutex(serverUrl: string, refreshFn: () => Promise<OAuthTokenData>): Promise<OAuthTokenData>;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a refresh is currently in progress for a server.
|
|
16
|
+
*
|
|
17
|
+
* @param serverUrl - The OAuth server URL
|
|
18
|
+
* @returns true if a refresh operation is active
|
|
19
|
+
*/
|
|
20
|
+
export declare function isRefreshInProgress(serverUrl: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Get the number of servers currently undergoing token refresh.
|
|
23
|
+
*
|
|
24
|
+
* @returns Number of active refresh operations
|
|
25
|
+
*/
|
|
26
|
+
export declare function getActiveRefreshCount(): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redacts sensitive tokens from a string.
|
|
3
|
+
* Used for error messages that may contain command-line arguments or environment info.
|
|
4
|
+
*/
|
|
5
|
+
export declare function redactSensitiveData(input: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Redacts sensitive data from an Error object, returning a new Error.
|
|
8
|
+
* Preserves the stack trace but redacts the message.
|
|
9
|
+
*/
|
|
10
|
+
export declare function redactErrorSensitiveData(error: Error): Error;
|
|
@@ -8,3 +8,10 @@ export declare function handleStepUpIfNeeded(params: {
|
|
|
8
8
|
authProviders: Map<string, OAuthProviderLike>;
|
|
9
9
|
createOAuthProvider?: OAuthProviderFactory;
|
|
10
10
|
}): Promise<boolean>;
|
|
11
|
+
export declare function handlePostRequestAuthError(params: {
|
|
12
|
+
error: Error;
|
|
13
|
+
config: ClaudeCodeMcpServer;
|
|
14
|
+
authProviders: Map<string, OAuthProviderLike>;
|
|
15
|
+
createOAuthProvider?: OAuthProviderFactory;
|
|
16
|
+
refreshAttempted?: Set<string>;
|
|
17
|
+
}): Promise<boolean>;
|
|
@@ -3,11 +3,13 @@ import type { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdi
|
|
|
3
3
|
import type { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
4
4
|
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
5
5
|
import type { McpOAuthProvider } from "../mcp-oauth/provider";
|
|
6
|
+
import type { SkillScope } from "../opencode-skill-loader/types";
|
|
6
7
|
export type SkillMcpConfig = Record<string, ClaudeCodeMcpServer>;
|
|
7
8
|
export interface SkillMcpClientInfo {
|
|
8
9
|
serverName: string;
|
|
9
10
|
skillName: string;
|
|
10
11
|
sessionID: string;
|
|
12
|
+
scope?: SkillScope | "local";
|
|
11
13
|
}
|
|
12
14
|
export interface SkillMcpServerContext {
|
|
13
15
|
config: ClaudeCodeMcpServer;
|
|
@@ -38,7 +40,7 @@ export interface ProcessCleanupHandler {
|
|
|
38
40
|
signal: NodeJS.Signals;
|
|
39
41
|
listener: () => void;
|
|
40
42
|
}
|
|
41
|
-
export type OAuthProviderLike = Pick<McpOAuthProvider, "tokens" | "login">;
|
|
43
|
+
export type OAuthProviderLike = Pick<McpOAuthProvider, "tokens" | "login" | "refresh">;
|
|
42
44
|
export type OAuthProviderFactory = (options: {
|
|
43
45
|
serverUrl: string;
|
|
44
46
|
clientId?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import { type BoulderState } from "../../features/boulder-state";
|
|
3
|
+
import type { PendingTaskRef, ToolExecuteAfterInput, ToolExecuteAfterOutput } from "./types";
|
|
4
|
+
export declare function syncBackgroundLaunchSessionTracking(input: {
|
|
5
|
+
ctx: PluginInput;
|
|
6
|
+
boulderState: BoulderState | null;
|
|
7
|
+
toolInput: ToolExecuteAfterInput;
|
|
8
|
+
toolOutput: ToolExecuteAfterOutput;
|
|
9
|
+
pendingTaskRef: PendingTaskRef | undefined;
|
|
10
|
+
metadataSessionId?: string;
|
|
11
|
+
}): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
3
|
import type { SessionState } from "./types";
|
|
4
|
+
export type BoulderContinuationResult = "injected" | "skipped_background_tasks" | "skipped_agent_unavailable" | "failed";
|
|
4
5
|
export declare function injectBoulderContinuation(input: {
|
|
5
6
|
ctx: PluginInput;
|
|
6
7
|
sessionID: string;
|
|
@@ -13,4 +14,4 @@ export declare function injectBoulderContinuation(input: {
|
|
|
13
14
|
preferredTaskTitle?: string;
|
|
14
15
|
backgroundManager?: BackgroundManager;
|
|
15
16
|
sessionState: SessionState;
|
|
16
|
-
}): Promise<
|
|
17
|
+
}): Promise<BoulderContinuationResult>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PendingTaskRef, TrackedTopLevelTaskRef } from "./types";
|
|
2
|
+
export declare function resolvePreferredSessionId(currentSessionId?: string, trackedSessionId?: string): string;
|
|
3
|
+
export declare function resolveTaskContext(pendingTaskRef: PendingTaskRef | undefined, planPath: string): {
|
|
4
|
+
currentTask: TrackedTopLevelTaskRef | null;
|
|
5
|
+
shouldSkipTaskSessionUpdate: boolean;
|
|
6
|
+
shouldIgnoreCurrentSessionId: boolean;
|
|
7
|
+
};
|
|
@@ -4,6 +4,7 @@ import type { TopLevelTaskRef } from "../../features/boulder-state";
|
|
|
4
4
|
export type ModelInfo = {
|
|
5
5
|
providerID: string;
|
|
6
6
|
modelID: string;
|
|
7
|
+
variant?: string;
|
|
7
8
|
};
|
|
8
9
|
export interface AtlasHookOptions {
|
|
9
10
|
directory: string;
|
|
@@ -38,6 +39,7 @@ export type PendingTaskRef = {
|
|
|
38
39
|
export interface SessionState {
|
|
39
40
|
lastEventWasAbortError?: boolean;
|
|
40
41
|
lastContinuationInjectedAt?: number;
|
|
42
|
+
isInjectingContinuation?: boolean;
|
|
41
43
|
promptFailureCount: number;
|
|
42
44
|
lastFailureAt?: number;
|
|
43
45
|
pendingRetryTimer?: ReturnType<typeof setTimeout>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const PACKAGE_NAME = "oh-my-
|
|
2
|
-
export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-
|
|
1
|
+
export declare const PACKAGE_NAME = "oh-my-opencode";
|
|
2
|
+
export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-opencode/dist-tags";
|
|
3
3
|
export declare const NPM_FETCH_TIMEOUT = 5000;
|
|
4
4
|
export declare const CACHE_ROOT_DIR: string;
|
|
5
5
|
export declare const CACHE_DIR: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { ContextCollector } from "../../features/context-injector";
|
|
3
|
-
|
|
3
|
+
import type { RalphLoopHook } from "../ralph-loop";
|
|
4
|
+
export declare function createKeywordDetectorHook(ctx: PluginInput, _collector?: ContextCollector, ralphLoop?: Pick<RalphLoopHook, "startLoop">): {
|
|
4
5
|
"chat.message": (input: {
|
|
5
6
|
sessionID: string;
|
|
6
7
|
agent?: string;
|
|
@@ -2,5 +2,6 @@ export declare const HOOK_NAME = "ralph-loop";
|
|
|
2
2
|
export declare const DEFAULT_STATE_FILE = ".sisyphus/ralph-loop.local.md";
|
|
3
3
|
export declare const COMPLETION_TAG_PATTERN: RegExp;
|
|
4
4
|
export declare const DEFAULT_MAX_ITERATIONS = 100;
|
|
5
|
+
export declare const ULTRAWORK_MAX_ITERATIONS = 500;
|
|
5
6
|
export declare const DEFAULT_COMPLETION_PROMISE = "DONE";
|
|
6
7
|
export declare const ULTRAWORK_VERIFICATION_PROMISE = "VERIFIED";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface OracleVerificationEvidence {
|
|
2
|
+
agent: string;
|
|
3
|
+
promise: string;
|
|
4
|
+
sessionID?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function parseOracleVerificationEvidence(text: string): OracleVerificationEvidence | undefined;
|
|
7
|
+
export declare function isOracleVerified(text: string): boolean;
|
|
8
|
+
export declare function extractOracleSessionID(text: string): string | undefined;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
export { extractAutoRetrySignal } from "./auto-retry-signal";
|
|
1
2
|
export declare function getErrorMessage(error: unknown): string;
|
|
2
3
|
export declare function extractStatusCode(error: unknown, retryOnErrors?: number[]): number | undefined;
|
|
3
4
|
export declare function extractErrorName(error: unknown): string | undefined;
|
|
4
5
|
export declare function classifyErrorType(error: unknown): string | undefined;
|
|
5
|
-
export interface AutoRetrySignal {
|
|
6
|
-
signal: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const AUTO_RETRY_PATTERNS: Array<(combined: string) => boolean>;
|
|
9
|
-
export declare function extractAutoRetrySignal(info: Record<string, unknown> | undefined): AutoRetrySignal | undefined;
|
|
10
6
|
export declare function containsErrorContent(parts: Array<{
|
|
11
7
|
type?: string;
|
|
12
8
|
text?: string;
|
|
@@ -66,6 +66,7 @@ export interface MessageData {
|
|
|
66
66
|
model?: {
|
|
67
67
|
providerID: string;
|
|
68
68
|
modelID: string;
|
|
69
|
+
variant?: string;
|
|
69
70
|
};
|
|
70
71
|
system?: string;
|
|
71
72
|
tools?: Record<string, boolean>;
|
|
@@ -86,6 +87,7 @@ export interface ResumeConfig {
|
|
|
86
87
|
model?: {
|
|
87
88
|
providerID: string;
|
|
88
89
|
modelID: string;
|
|
90
|
+
variant?: string;
|
|
89
91
|
};
|
|
90
92
|
tools?: Record<string, boolean>;
|
|
91
93
|
}
|
|
@@ -28,6 +28,7 @@ export interface SessionState {
|
|
|
28
28
|
countdownInterval?: ReturnType<typeof setInterval>;
|
|
29
29
|
isRecovering?: boolean;
|
|
30
30
|
wasCancelled?: boolean;
|
|
31
|
+
tokenLimitDetected?: boolean;
|
|
31
32
|
countdownStartedAt?: number;
|
|
32
33
|
abortDetectedAt?: number;
|
|
33
34
|
lastIncompleteCount?: number;
|
|
@@ -51,6 +52,7 @@ export interface MessageInfo {
|
|
|
51
52
|
model?: {
|
|
52
53
|
providerID: string;
|
|
53
54
|
modelID: string;
|
|
55
|
+
variant?: string;
|
|
54
56
|
};
|
|
55
57
|
providerID?: string;
|
|
56
58
|
modelID?: string;
|
|
@@ -58,18 +60,23 @@ export interface MessageInfo {
|
|
|
58
60
|
}
|
|
59
61
|
export interface MessageWithInfo {
|
|
60
62
|
info?: MessageInfo;
|
|
63
|
+
parts?: Array<{
|
|
64
|
+
type?: string;
|
|
65
|
+
}>;
|
|
61
66
|
}
|
|
62
67
|
export interface ResolvedMessageInfo {
|
|
63
68
|
agent?: string;
|
|
64
69
|
model?: {
|
|
65
70
|
providerID: string;
|
|
66
71
|
modelID: string;
|
|
72
|
+
variant?: string;
|
|
67
73
|
};
|
|
68
74
|
tools?: Record<string, ToolPermission>;
|
|
69
75
|
}
|
|
70
76
|
export interface ResolveLatestMessageInfoResult {
|
|
71
77
|
resolvedInfo?: ResolvedMessageInfo;
|
|
72
78
|
encounteredCompaction: boolean;
|
|
79
|
+
latestMessageWasCompaction: boolean;
|
|
73
80
|
}
|
|
74
81
|
export interface ContinuationProgressOptions {
|
|
75
82
|
allowActivityProgress?: boolean;
|
|
@@ -23,6 +23,7 @@ type BabysitterContext = {
|
|
|
23
23
|
text: string;
|
|
24
24
|
}>;
|
|
25
25
|
agent?: string;
|
|
26
|
+
variant?: string;
|
|
26
27
|
model?: {
|
|
27
28
|
providerID: string;
|
|
28
29
|
modelID: string;
|
|
@@ -43,6 +44,7 @@ type BabysitterContext = {
|
|
|
43
44
|
text: string;
|
|
44
45
|
}>;
|
|
45
46
|
agent?: string;
|
|
47
|
+
variant?: string;
|
|
46
48
|
model?: {
|
|
47
49
|
providerID: string;
|
|
48
50
|
modelID: string;
|