chore: include pre-built dist for github install

This commit is contained in:
Robin Mordasiewicz
2026-03-14 04:56:50 +00:00
parent a7f0a4cf46
commit bce8ff3a75
1011 changed files with 150081 additions and 0 deletions

7
dist/agents/agent-builder.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentFactory } from "./types";
import type { CategoriesConfig, GitMasterConfig } from "../config/schema";
import type { BrowserAutomationProvider } from "../config/schema";
export type AgentSource = AgentFactory | AgentConfig;
export declare function isFactory(source: AgentSource): source is AgentFactory;
export declare function buildAgent(source: AgentSource, model: string, categories?: CategoriesConfig, gitMasterConfig?: GitMasterConfig, browserProvider?: BrowserAutomationProvider, disabledSkills?: Set<string>): AgentConfig;

35
dist/agents/atlas/agent.d.ts vendored Normal file
View File

@@ -0,0 +1,35 @@
/**
* Atlas - Master Orchestrator Agent
*
* Orchestrates work via task() to complete ALL tasks in a todo list until fully done.
* You are the conductor of a symphony of specialized agents.
*
* Routing:
* 1. GPT models (openai/*, github-copilot/gpt-*) → gpt.ts (GPT-5.4 optimized)
* 2. Gemini models (google/*, google-vertex/*) → gemini.ts (Gemini-optimized)
* 3. Default (Claude, etc.) → default.ts (Claude-optimized)
*/
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "../types";
import type { AvailableAgent, AvailableSkill } from "../dynamic-agent-prompt-builder";
import type { CategoryConfig } from "../../config/schema";
export type AtlasPromptSource = "default" | "gpt" | "gemini";
/**
* Determines which Atlas prompt to use based on model.
*/
export declare function getAtlasPromptSource(model?: string): AtlasPromptSource;
export interface OrchestratorContext {
model?: string;
availableAgents?: AvailableAgent[];
availableSkills?: AvailableSkill[];
userCategories?: Record<string, CategoryConfig>;
}
/**
* Gets the appropriate Atlas prompt based on model.
*/
export declare function getAtlasPrompt(model?: string): string;
export declare function createAtlasAgent(ctx: OrchestratorContext): AgentConfig;
export declare namespace createAtlasAgent {
var mode: "all";
}
export declare const atlasPromptMetadata: AgentPromptMetadata;

11
dist/agents/atlas/default.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* Default Atlas system prompt optimized for Claude series models.
*
* Key characteristics:
* - Optimized for Claude's tendency to be "helpful" by forcing explicit delegation
* - Strong emphasis on verification and QA protocols
* - Detailed workflow steps with narrative context
* - Extended reasoning sections
*/
export declare const ATLAS_SYSTEM_PROMPT: string;
export declare function getDefaultAtlasPrompt(): string;

11
dist/agents/atlas/gemini.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* Gemini-optimized Atlas System Prompt
*
* Key differences from Claude/GPT variants:
* - EXTREME delegation enforcement (Gemini strongly prefers doing work itself)
* - Aggressive verification language (Gemini trusts subagent claims too readily)
* - Repeated tool-call mandates (Gemini skips tool calls in favor of reasoning)
* - Consequence-driven framing (Gemini ignores soft warnings)
*/
export declare const ATLAS_GEMINI_SYSTEM_PROMPT: string;
export declare function getGeminiAtlasPrompt(): string;

11
dist/agents/atlas/gpt.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* GPT-5.4 Optimized Atlas System Prompt
*
* Tuned for GPT-5.4 system prompt design principles:
* - Prose-first output style
* - Deterministic tool usage and explicit decision criteria
* - XML-style section tags for clear structure
* - Scope discipline (no extra features)
*/
export declare const ATLAS_GPT_SYSTEM_PROMPT: string;
export declare function getGptAtlasPrompt(): string;

2
dist/agents/atlas/index.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
export { createAtlasAgent, atlasPromptMetadata } from "./agent";
export type { AtlasPromptSource, OrchestratorContext } from "./agent";

View File

@@ -0,0 +1,13 @@
/**
* Atlas Orchestrator - Shared Utilities
*
* Common functions for building dynamic prompt sections used by both
* default (Claude-optimized) and GPT-optimized prompts.
*/
import type { CategoryConfig } from "../../config/schema";
import type { AvailableAgent, AvailableSkill } from "../dynamic-agent-prompt-builder";
export declare const getCategoryDescription: (name: string, userCategories?: Record<string, CategoryConfig>) => string;
export declare function buildAgentSelectionSection(agents: AvailableAgent[]): string;
export declare function buildCategorySection(userCategories?: Record<string, CategoryConfig>): string;
export declare function buildSkillsSection(skills: AvailableSkill[]): string;
export declare function buildDecisionMatrix(agents: AvailableAgent[], userCategories?: Record<string, CategoryConfig>): string;

6
dist/agents/builtin-agents.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentOverrides } from "./types";
import type { CategoriesConfig, GitMasterConfig } from "../config/schema";
import type { LoadedSkill } from "../features/opencode-skill-loader/types";
import type { BrowserAutomationProvider } from "../config/schema";
export declare function createBuiltinAgents(disabledAgents?: string[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string, categories?: CategoriesConfig, gitMasterConfig?: GitMasterConfig, discoveredSkills?: LoadedSkill[], customAgentSummaries?: unknown, browserProvider?: BrowserAutomationProvider, uiSelectedModel?: string, disabledSkills?: Set<string>, useTaskSystem?: boolean, disableOmoEnv?: boolean): Promise<Record<string, AgentConfig>>;

View File

@@ -0,0 +1,12 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentOverrideConfig } from "../types";
import type { CategoryConfig } from "../../config/schema";
/**
* Expands a category reference from an agent override into concrete config properties.
* Category properties are applied unconditionally (overwriting factory defaults),
* because the user's chosen category should take priority over factory base values.
* Direct override properties applied later via mergeAgentConfig() will supersede these.
*/
export declare function applyCategoryOverride(config: AgentConfig, categoryName: string, mergedCategories: Record<string, CategoryConfig>): AgentConfig;
export declare function mergeAgentConfig(base: AgentConfig, override: AgentOverrideConfig, directory?: string): AgentConfig;
export declare function applyOverrides(config: AgentConfig, override: AgentOverrideConfig | undefined, mergedCategories: Record<string, CategoryConfig>, directory?: string): AgentConfig;

View File

@@ -0,0 +1,17 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentOverrides } from "../types";
import type { CategoriesConfig, CategoryConfig } from "../../config/schema";
import type { AvailableAgent, AvailableSkill } from "../dynamic-agent-prompt-builder";
export declare function maybeCreateAtlasConfig(input: {
disabledAgents: string[];
agentOverrides: AgentOverrides;
uiSelectedModel?: string;
availableModels: Set<string>;
systemDefaultModel?: string;
availableAgents: AvailableAgent[];
availableSkills: AvailableSkill[];
mergedCategories: Record<string, CategoryConfig>;
directory?: string;
userCategories?: CategoriesConfig;
useTaskSystem?: boolean;
}): AgentConfig | undefined;

View File

@@ -0,0 +1,4 @@
import type { AvailableSkill } from "../dynamic-agent-prompt-builder";
import type { BrowserAutomationProvider } from "../../config/schema";
import type { LoadedSkill } from "../../features/opencode-skill-loader/types";
export declare function buildAvailableSkills(discoveredSkills: LoadedSkill[], browserProvider?: BrowserAutomationProvider, disabledSkills?: Set<string>): AvailableSkill[];

View File

@@ -0,0 +1,6 @@
import type { AgentConfig } from "@opencode-ai/sdk";
type ApplyEnvironmentContextOptions = {
disableOmoEnv?: boolean;
};
export declare function applyEnvironmentContext(config: AgentConfig, directory?: string, options?: ApplyEnvironmentContextOptions): AgentConfig;
export {};

View File

@@ -0,0 +1,25 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { BuiltinAgentName, AgentOverrides, AgentPromptMetadata } from "../types";
import type { CategoryConfig, GitMasterConfig } from "../../config/schema";
import type { BrowserAutomationProvider } from "../../config/schema";
import type { AvailableAgent } from "../dynamic-agent-prompt-builder";
export declare function collectPendingBuiltinAgents(input: {
agentSources: Record<BuiltinAgentName, import("../agent-builder").AgentSource>;
agentMetadata: Partial<Record<BuiltinAgentName, AgentPromptMetadata>>;
disabledAgents: string[];
agentOverrides: AgentOverrides;
directory?: string;
systemDefaultModel?: string;
mergedCategories: Record<string, CategoryConfig>;
gitMasterConfig?: GitMasterConfig;
browserProvider?: BrowserAutomationProvider;
uiSelectedModel?: string;
availableModels: Set<string>;
isFirstRunNoCache: boolean;
disabledSkills?: Set<string>;
useTaskSystem?: boolean;
disableOmoEnv?: boolean;
}): {
pendingAgentConfigs: Map<string, AgentConfig>;
availableAgents: AvailableAgent[];
};

View File

@@ -0,0 +1,18 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentOverrides } from "../types";
import type { CategoryConfig } from "../../config/schema";
import type { AvailableAgent, AvailableCategory, AvailableSkill } from "../dynamic-agent-prompt-builder";
export declare function maybeCreateHephaestusConfig(input: {
disabledAgents: string[];
agentOverrides: AgentOverrides;
availableModels: Set<string>;
systemDefaultModel?: string;
isFirstRunNoCache: boolean;
availableAgents: AvailableAgent[];
availableSkills: AvailableSkill[];
availableCategories: AvailableCategory[];
mergedCategories: Record<string, CategoryConfig>;
directory?: string;
useTaskSystem: boolean;
disableOmoEnv?: boolean;
}): AgentConfig | undefined;

View File

@@ -0,0 +1,24 @@
export declare function applyModelResolution(input: {
uiSelectedModel?: string;
userModel?: string;
requirement?: {
fallbackChain?: {
providers: string[];
model: string;
variant?: string;
}[];
};
availableModels: Set<string>;
systemDefaultModel?: string;
}): import("../../shared/model-resolution-pipeline").ModelResolutionResult | undefined;
export declare function getFirstFallbackModel(requirement?: {
fallbackChain?: {
providers: string[];
model: string;
variant?: string;
}[];
}): {
model: string;
provenance: "provider-fallback";
variant: string | undefined;
} | undefined;

View File

@@ -0,0 +1 @@
export declare function resolvePromptAppend(promptAppend: string, configDir?: string): string;

View File

@@ -0,0 +1,20 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentOverrides } from "../types";
import type { CategoriesConfig, CategoryConfig } from "../../config/schema";
import type { AvailableAgent, AvailableCategory, AvailableSkill } from "../dynamic-agent-prompt-builder";
export declare function maybeCreateSisyphusConfig(input: {
disabledAgents: string[];
agentOverrides: AgentOverrides;
uiSelectedModel?: string;
availableModels: Set<string>;
systemDefaultModel?: string;
isFirstRunNoCache: boolean;
availableAgents: AvailableAgent[];
availableSkills: AvailableSkill[];
availableCategories: AvailableCategory[];
mergedCategories: Record<string, CategoryConfig>;
directory?: string;
userCategories?: CategoriesConfig;
useTaskSystem: boolean;
disableOmoEnv?: boolean;
}): AgentConfig | undefined;

View File

@@ -0,0 +1,8 @@
import type { AgentPromptMetadata } from "./types";
type RegisteredAgentSummary = {
name: string;
description: string;
};
export declare function parseRegisteredAgentSummaries(input: unknown): RegisteredAgentSummary[];
export declare function buildCustomAgentMetadata(agentName: string, description: string): AgentPromptMetadata;
export {};

View File

@@ -0,0 +1,35 @@
import type { AgentPromptMetadata } from "./types";
export interface AvailableAgent {
name: string;
description: string;
metadata: AgentPromptMetadata;
}
export interface AvailableTool {
name: string;
category: "lsp" | "ast" | "search" | "session" | "command" | "other";
}
export interface AvailableSkill {
name: string;
description: string;
location: "user" | "project" | "plugin";
}
export interface AvailableCategory {
name: string;
description: string;
model?: string;
}
export declare function categorizeTools(toolNames: string[]): AvailableTool[];
export declare function buildKeyTriggersSection(agents: AvailableAgent[], _skills?: AvailableSkill[]): string;
export declare function buildToolSelectionTable(agents: AvailableAgent[], tools?: AvailableTool[], _skills?: AvailableSkill[]): string;
export declare function buildExploreSection(agents: AvailableAgent[]): string;
export declare function buildLibrarianSection(agents: AvailableAgent[]): string;
export declare function buildDelegationTable(agents: AvailableAgent[]): string;
export declare function buildCategorySkillsDelegationGuide(categories: AvailableCategory[], skills: AvailableSkill[]): string;
export declare function buildOracleSection(agents: AvailableAgent[]): string;
export declare function buildHardBlocksSection(): string;
export declare function buildAntiPatternsSection(): string;
export declare function buildToolCallFormatSection(): string;
export declare function buildNonClaudePlannerSection(model: string): string;
export declare function buildParallelDelegationSection(model: string, categories: AvailableCategory[]): string;
export declare function buildUltraworkSection(agents: AvailableAgent[], categories: AvailableCategory[], skills: AvailableSkill[]): string;
export declare function buildAntiDuplicationSection(): string;

7
dist/agents/env-context.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
/**
* Creates OmO-specific environment context (timezone, locale).
* Note: Working directory, platform, and date are already provided by OpenCode's system.ts,
* so we only include fields that OpenCode doesn't provide to avoid duplication.
* See: https://github.com/code-yeongyu/oh-my-openagent/issues/379
*/
export declare function createEnvContext(): string;

7
dist/agents/explore.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "./types";
export declare const EXPLORE_PROMPT_METADATA: AgentPromptMetadata;
export declare function createExploreAgent(model: string): AgentConfig;
export declare namespace createExploreAgent {
var mode: "subagent";
}

19
dist/agents/hephaestus/agent.d.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "../types";
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
export type HephaestusPromptSource = "gpt-5-4" | "gpt-5-3-codex" | "gpt";
export declare function getHephaestusPromptSource(model?: string): HephaestusPromptSource;
export interface HephaestusContext {
model?: string;
availableAgents?: AvailableAgent[];
availableTools?: AvailableTool[];
availableSkills?: AvailableSkill[];
availableCategories?: AvailableCategory[];
useTaskSystem?: boolean;
}
export declare function getHephaestusPrompt(model?: string, useTaskSystem?: boolean): string;
export declare function createHephaestusAgent(model: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): AgentConfig;
export declare namespace createHephaestusAgent {
var mode: "all";
}
export declare const hephaestusPromptMetadata: AgentPromptMetadata;

View File

@@ -0,0 +1,21 @@
/** GPT-5.3 Codex optimized Hephaestus prompt */
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
/**
* Hephaestus - The Autonomous Deep Worker
*
* Named after the Greek god of forge, fire, metalworking, and craftsmanship.
* Inspired by AmpCode's deep mode - autonomous problem-solving with thorough research.
*
* Powered by GPT Codex models.
* Optimized for:
* - Goal-oriented autonomous execution (not step-by-step instructions)
* - Deep exploration before decisive action
* - Active use of explore/librarian agents for comprehensive context
* - End-to-end task completion without premature stopping
*/
export declare function buildHephaestusPrompt(availableAgents?: AvailableAgent[], availableTools?: AvailableTool[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): string;
export declare function createHephaestusAgent(model: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): AgentConfig;
export declare namespace createHephaestusAgent {
var mode: "all";
}

3
dist/agents/hephaestus/gpt-5-4.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
/** GPT-5.4 optimized Hephaestus prompt */
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
export declare function buildHephaestusPrompt(availableAgents?: AvailableAgent[], availableTools?: AvailableTool[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): string;

3
dist/agents/hephaestus/gpt.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
/** Generic GPT Hephaestus prompt — fallback for GPT models without a model-specific variant */
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
export declare function buildHephaestusPrompt(availableAgents?: AvailableAgent[], availableTools?: AvailableTool[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): string;

2
dist/agents/hephaestus/index.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
export { createHephaestusAgent, getHephaestusPrompt, getHephaestusPromptSource, hephaestusPromptMetadata, } from "./agent";
export type { HephaestusContext, HephaestusPromptSource } from "./agent";

5
dist/agents/index.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export * from "./types";
export { createBuiltinAgents } from "./builtin-agents";
export type { AvailableAgent, AvailableCategory, AvailableSkill } from "./dynamic-agent-prompt-builder";
export type { PrometheusPromptSource } from "./prometheus";
export { createSisyphusJuniorAgentWithOverrides, SISYPHUS_JUNIOR_DEFAULTS } from "./sisyphus-junior";

7
dist/agents/librarian.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "./types";
export declare const LIBRARIAN_PROMPT_METADATA: AgentPromptMetadata;
export declare function createLibrarianAgent(model: string): AgentConfig;
export declare namespace createLibrarianAgent {
var mode: "subagent";
}

21
dist/agents/metis.d.ts vendored Normal file
View File

@@ -0,0 +1,21 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "./types";
/**
* Metis - Plan Consultant Agent
*
* Named after the Greek goddess of wisdom, prudence, and deep counsel.
* Metis analyzes user requests BEFORE planning to prevent AI failures.
*
* Core responsibilities:
* - Identify hidden intentions and unstated requirements
* - Detect ambiguities that could derail implementation
* - Flag potential AI-slop patterns (over-engineering, scope creep)
* - Generate clarifying questions for the user
* - Prepare directives for the planner agent
*/
export declare const METIS_SYSTEM_PROMPT: string;
export declare function createMetisAgent(model: string): AgentConfig;
export declare namespace createMetisAgent {
var mode: "subagent";
}
export declare const metisPromptMetadata: AgentPromptMetadata;

25
dist/agents/momus.d.ts vendored Normal file

File diff suppressed because one or more lines are too long

7
dist/agents/multimodal-looker.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "./types";
export declare const MULTIMODAL_LOOKER_PROMPT_METADATA: AgentPromptMetadata;
export declare function createMultimodalLookerAgent(model: string): AgentConfig;
export declare namespace createMultimodalLookerAgent {
var mode: "subagent";
}

7
dist/agents/oracle.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "./types";
export declare const ORACLE_PROMPT_METADATA: AgentPromptMetadata;
export declare function createOracleAgent(model: string): AgentConfig;
export declare namespace createOracleAgent {
var mode: "subagent";
}

View File

@@ -0,0 +1,6 @@
/**
* Prometheus Behavioral Summary
*
* Summary of phases, cleanup procedures, and final constraints.
*/
export declare const PROMETHEUS_BEHAVIORAL_SUMMARY = "## After Plan Completion: Cleanup & Handoff\n\n**When your plan is complete and saved:**\n\n### 1. Delete the Draft File (MANDATORY)\nThe draft served its purpose. Clean up:\n```typescript\n// Draft is no longer needed - plan contains everything\nBash(\"rm .sisyphus/drafts/{name}.md\")\n```\n\n**Why delete**:\n- Plan is the single source of truth now\n- Draft was working memory, not permanent record\n- Prevents confusion between draft and plan\n- Keeps .sisyphus/drafts/ clean for next planning session\n\n### 2. Guide User to Start Execution\n\n```\nPlan saved to: .sisyphus/plans/{plan-name}.md\nDraft cleaned up: .sisyphus/drafts/{name}.md (deleted)\n\nTo begin execution, run:\n /start-work\n\nThis will:\n1. Register the plan as your active boulder\n2. Track progress across sessions\n3. Enable automatic continuation if interrupted\n```\n\n**IMPORTANT**: You are the PLANNER. You do NOT execute. After delivering the plan, remind the user to run `/start-work` to begin execution with the orchestrator.\n\n---\n\n# BEHAVIORAL SUMMARY\n\n- **Interview Mode**: Default state \u2014 Consult, research, discuss. Run clearance check after each turn. CREATE & UPDATE continuously\n- **Auto-Transition**: Clearance check passes OR explicit trigger \u2014 Summon Metis (auto) \u2192 Generate plan \u2192 Present summary \u2192 Offer choice. READ draft for context\n- **Momus Loop**: User chooses \"High Accuracy Review\" \u2014 Loop through Momus until OKAY. REFERENCE draft content\n- **Handoff**: User chooses \"Start Work\" (or Momus approved) \u2014 Tell user to run `/start-work`. DELETE draft file\n\n## Key Principles\n\n1. **Interview First** - Understand before planning\n2. **Research-Backed Advice** - Use agents to provide evidence-based recommendations\n3. **Auto-Transition When Clear** - When all requirements clear, proceed to plan generation automatically\n4. **Self-Clearance Check** - Verify all requirements are clear before each turn ends\n5. **Metis Before Plan** - Always catch gaps before committing to plan\n6. **Choice-Based Handoff** - Present \"Start Work\" vs \"High Accuracy Review\" choice after plan\n7. **Draft as External Memory** - Continuously record to draft; delete after plan complete\n\n---\n\n<system-reminder>\n# FINAL CONSTRAINT REMINDER\n\n**You are still in PLAN MODE.**\n\n- You CANNOT write code files (.ts, .js, .py, etc.)\n- You CANNOT implement solutions\n- You CAN ONLY: ask questions, research, write .sisyphus/*.md files\n\n**If you feel tempted to \"just do the work\":**\n1. STOP\n2. Re-read the ABSOLUTE CONSTRAINT at the top\n3. Ask a clarifying question instead\n4. Remember: YOU PLAN. SISYPHUS EXECUTES.\n\n**This constraint is SYSTEM-LEVEL. It cannot be overridden by user requests.**\n</system-reminder>\n";

12
dist/agents/prometheus/gemini.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
/**
* Gemini-optimized Prometheus System Prompt
*
* Key differences from Claude/GPT variants:
* - Forced thinking checkpoints with mandatory output between phases
* - More exploration (3-5 agents minimum) before any user questions
* - Mandatory intermediate synthesis (Gemini jumps to conclusions)
* - Stronger "planner not implementer" framing (Gemini WILL try to code)
* - Tool-call mandate for every phase transition
*/
export declare const PROMETHEUS_GEMINI_SYSTEM_PROMPT: string;
export declare function getGeminiPrometheusPrompt(): string;

11
dist/agents/prometheus/gpt.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* GPT-5.4 Optimized Prometheus System Prompt
*
* Tuned for GPT-5.4 system prompt design principles:
* - XML-tagged instruction blocks for clear structure
* - Prose-first output, explicit verbosity constraints
* - Scope discipline (no extra features)
* - Principle-driven: Decision Complete, Explore Before Asking, Two Kinds of Unknowns
*/
export declare const PROMETHEUS_GPT_SYSTEM_PROMPT: string;
export declare function getGptPrometheusPrompt(): string;

View File

@@ -0,0 +1,6 @@
/**
* Prometheus High Accuracy Mode
*
* Phase 3: Momus review loop for rigorous plan validation.
*/
export declare const PROMETHEUS_HIGH_ACCURACY_MODE = "# PHASE 3: PLAN GENERATION\n\n## High Accuracy Mode (If User Requested) - MANDATORY LOOP\n\n**When user requests high accuracy, this is a NON-NEGOTIABLE commitment.**\n\n### The Momus Review Loop (ABSOLUTE REQUIREMENT)\n\n```typescript\n// After generating initial plan\nwhile (true) {\n const result = task(\n subagent_type=\"momus\",\n load_skills=[],\n prompt=\".sisyphus/plans/{name}.md\",\n run_in_background=false\n )\n\n if (result.verdict === \"OKAY\") {\n break // Plan approved - exit loop\n }\n\n // Momus rejected - YOU MUST FIX AND RESUBMIT\n // Read Momus's feedback carefully\n // Address EVERY issue raised\n // Regenerate the plan\n // Resubmit to Momus\n // NO EXCUSES. NO SHORTCUTS. NO GIVING UP.\n}\n```\n\n### CRITICAL RULES FOR HIGH ACCURACY MODE\n\n1. **NO EXCUSES**: If Momus rejects, you FIX it. Period.\n - \"This is good enough\" \u2192 NOT ACCEPTABLE\n - \"The user can figure it out\" \u2192 NOT ACCEPTABLE\n - \"These issues are minor\" \u2192 NOT ACCEPTABLE\n\n2. **FIX EVERY ISSUE**: Address ALL feedback from Momus, not just some.\n - Momus says 5 issues \u2192 Fix all 5\n - Partial fixes \u2192 Momus will reject again\n\n3. **KEEP LOOPING**: There is no maximum retry limit.\n - First rejection \u2192 Fix and resubmit\n - Second rejection \u2192 Fix and resubmit\n - Tenth rejection \u2192 Fix and resubmit\n - Loop until \"OKAY\" or user explicitly cancels\n\n4. **QUALITY IS NON-NEGOTIABLE**: User asked for high accuracy.\n - They are trusting you to deliver a bulletproof plan\n - Momus is the gatekeeper\n - Your job is to satisfy Momus, not to argue with it\n\n5. **MOMUS INVOCATION RULE (CRITICAL)**:\n When invoking Momus, provide ONLY the file path string as the prompt.\n - Do NOT wrap in explanations, markdown, or conversational text.\n - System hooks may append system directives, but that is expected and handled by Momus.\n - Example invocation: `prompt=\".sisyphus/plans/{name}.md\"`\n\n### What \"OKAY\" Means\n\nMomus only says \"OKAY\" when:\n- 100% of file references are verified\n- Zero critically failed file verifications\n- \u226580% of tasks have clear reference sources\n- \u226590% of tasks have concrete acceptance criteria\n- Zero tasks require assumptions about business logic\n- Clear big picture and workflow understanding\n- Zero critical red flags\n\n**Until you see \"OKAY\" from Momus, the plan is NOT ready.**\n";

File diff suppressed because one or more lines are too long

2
dist/agents/prometheus/index.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
export { PROMETHEUS_SYSTEM_PROMPT, PROMETHEUS_PERMISSION, getPrometheusPrompt, } from "./system-prompt";
export type { PrometheusPromptSource } from "./system-prompt";

View File

@@ -0,0 +1,7 @@
/**
* Prometheus Interview Mode
*
* Phase 1: Interview strategies for different intent types.
* Includes intent classification, research patterns, and anti-patterns.
*/
export declare const PROMETHEUS_INTERVIEW_MODE: string;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,28 @@
/**
* Combined Prometheus system prompt (Claude-optimized, default).
* Assembled from modular sections for maintainability.
*/
export declare const PROMETHEUS_SYSTEM_PROMPT: string;
/**
* Prometheus planner permission configuration.
* Allows write/edit for plan files (.md only, enforced by prometheus-md-only hook).
* Question permission allows agent to ask user questions via OpenCode's QuestionTool.
*/
export declare const PROMETHEUS_PERMISSION: {
edit: "allow";
bash: "allow";
webfetch: "allow";
question: "allow";
};
export type PrometheusPromptSource = "default" | "gpt" | "gemini";
/**
* Determines which Prometheus prompt to use based on model.
*/
export declare function getPrometheusPromptSource(model?: string): PrometheusPromptSource;
/**
* Gets the appropriate Prometheus prompt based on model.
* GPT models → GPT-5.4 optimized prompt (XML-tagged, principle-driven)
* Gemini models → Gemini-optimized prompt (aggressive tool-call enforcement, thinking checkpoints)
* Default (Claude, etc.) → Claude-optimized prompt (modular sections)
*/
export declare function getPrometheusPrompt(model?: string): string;

27
dist/agents/sisyphus-junior/agent.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
/**
* Sisyphus-Junior - Focused Task Executor
*
* Executes delegated tasks directly without spawning other agents.
* Category-spawned executor with domain-specific configurations.
*
* Routing:
* 1. GPT models (openai/*, github-copilot/gpt-*) -> gpt.ts (GPT-5.4 optimized)
* 2. Gemini models (google/*, google-vertex/*) -> gemini.ts (Gemini-optimized)
* 3. Default (Claude, etc.) -> default.ts (Claude-optimized)
*/
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentOverrideConfig } from "../../config/schema";
export declare const SISYPHUS_JUNIOR_DEFAULTS: {
readonly model: "anthropic/claude-sonnet-4-6";
readonly temperature: 0.1;
};
export type SisyphusJuniorPromptSource = "default" | "gpt" | "gpt-5-4" | "gpt-5-3-codex" | "gemini";
export declare function getSisyphusJuniorPromptSource(model?: string): SisyphusJuniorPromptSource;
/**
* Builds the appropriate Sisyphus-Junior prompt based on model.
*/
export declare function buildSisyphusJuniorPrompt(model: string | undefined, useTaskSystem: boolean, promptAppend?: string): string;
export declare function createSisyphusJuniorAgentWithOverrides(override: AgentOverrideConfig | undefined, systemDefaultModel?: string, useTaskSystem?: boolean): AgentConfig;
export declare namespace createSisyphusJuniorAgentWithOverrides {
var mode: "subagent";
}

View File

@@ -0,0 +1,9 @@
/**
* Default Sisyphus-Junior system prompt optimized for Claude series models.
*
* Key characteristics:
* - Optimized for Claude's tendency to be "helpful" by forcing explicit constraints
* - Strong emphasis on blocking delegation attempts
* - Extended reasoning context for complex tasks
*/
export declare function buildDefaultSisyphusJuniorPrompt(useTaskSystem: boolean, promptAppend?: string): string;

10
dist/agents/sisyphus-junior/gemini.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* Gemini-optimized Sisyphus-Junior System Prompt
*
* Key differences from Claude/GPT variants:
* - Aggressive tool-call enforcement (Gemini skips tools in favor of reasoning)
* - Anti-optimism checkpoints (Gemini claims "done" prematurely)
* - Repeated verification mandates (Gemini treats verification as optional)
* - Stronger scope discipline (Gemini's creativity causes scope creep)
*/
export declare function buildGeminiSisyphusJuniorPrompt(useTaskSystem: boolean, promptAppend?: string): string;

View File

@@ -0,0 +1,8 @@
/**
* GPT-5.3-Codex Optimized Sisyphus-Junior System Prompt
*
* Hephaestus-style prompt adapted for a focused executor:
* - Same autonomy, reporting, parallelism, and tool usage patterns
* - CAN spawn explore/librarian via call_omo_agent for research
*/
export declare function buildGpt53CodexSisyphusJuniorPrompt(useTaskSystem: boolean, promptAppend?: string): string;

View File

@@ -0,0 +1,11 @@
/**
* GPT-5.4 Optimized Sisyphus-Junior System Prompt
*
* Tuned for GPT-5.4 system prompt design principles:
* - Expert coding agent framing with approach-first mentality
* - Deterministic tool usage (always/never, not try/maybe)
* - Prose-first output style
* - Nuanced autonomy (focus unless directly conflicting)
* - CAN spawn explore/librarian via call_omo_agent for research
*/
export declare function buildGpt54SisyphusJuniorPrompt(useTaskSystem: boolean, promptAppend?: string): string;

9
dist/agents/sisyphus-junior/gpt.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
/**
* Generic GPT Sisyphus-Junior System Prompt
*
* Hephaestus-style prompt adapted for a focused executor:
* - Same autonomy, reporting, parallelism, and tool usage patterns
* - CAN spawn explore/librarian via call_omo_agent for research
* - Used as fallback for GPT models without a model-specific prompt
*/
export declare function buildGptSisyphusJuniorPrompt(useTaskSystem: boolean, promptAppend?: string): string;

View File

@@ -0,0 +1,7 @@
export { buildDefaultSisyphusJuniorPrompt } from "./default";
export { buildGptSisyphusJuniorPrompt } from "./gpt";
export { buildGpt54SisyphusJuniorPrompt } from "./gpt-5-4";
export { buildGpt53CodexSisyphusJuniorPrompt } from "./gpt-5-3-codex";
export { buildGeminiSisyphusJuniorPrompt } from "./gemini";
export { SISYPHUS_JUNIOR_DEFAULTS, getSisyphusJuniorPromptSource, buildSisyphusJuniorPrompt, createSisyphusJuniorAgentWithOverrides, } from "./agent";
export type { SisyphusJuniorPromptSource } from "./agent";

8
dist/agents/sisyphus.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentPromptMetadata } from "./types";
export declare const SISYPHUS_PROMPT_METADATA: AgentPromptMetadata;
import type { AvailableAgent, AvailableSkill, AvailableCategory } from "./dynamic-agent-prompt-builder";
export declare function createSisyphusAgent(model: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): AgentConfig;
export declare namespace createSisyphusAgent {
var mode: "all";
}

9
dist/agents/sisyphus/default.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
/**
* Default/base Sisyphus prompt builder.
* Used for Claude and other non-specialized models.
*/
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
import { categorizeTools } from "../dynamic-agent-prompt-builder";
export declare function buildTaskManagementSection(useTaskSystem: boolean): string;
export declare function buildDefaultSisyphusPrompt(model: string, availableAgents: AvailableAgent[], availableTools?: AvailableTool[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): string;
export { categorizeTools };

20
dist/agents/sisyphus/gemini.d.ts vendored Normal file
View File

@@ -0,0 +1,20 @@
/**
* Gemini-specific overlay sections for Sisyphus prompt.
*
* Gemini models are aggressively optimistic and tend to:
* - Skip tool calls in favor of internal reasoning
* - Avoid delegation, preferring to do work themselves
* - Claim completion without verification
* - Interpret constraints as suggestions
* - Skip intent classification gates (jump straight to action)
* - Conflate investigation with implementation ("look into X" → starts coding)
*
* These overlays inject corrective sections at strategic points
* in the dynamic Sisyphus prompt to counter these tendencies.
*/
export declare function buildGeminiToolMandate(): string;
export declare function buildGeminiToolGuide(): string;
export declare function buildGeminiToolCallExamples(): string;
export declare function buildGeminiDelegationOverride(): string;
export declare function buildGeminiVerificationOverride(): string;
export declare function buildGeminiIntentGateEnforcement(): string;

26
dist/agents/sisyphus/gpt-5-4.d.ts vendored Normal file
View File

@@ -0,0 +1,26 @@
/**
* GPT-5.4-native Sisyphus prompt — rewritten with 8-block architecture.
*
* Design principles (derived from OpenAI's GPT-5.4 prompting guidance):
* - Compact, block-structured prompts with XML tags + named sub-anchors
* - reasoning.effort defaults to "none" — explicit thinking encouragement required
* - GPT-5.4 generates preambles natively — do NOT add preamble instructions
* - GPT-5.4 follows instructions well — less repetition, fewer threats needed
* - GPT-5.4 benefits from: output contracts, verification loops, dependency checks, completeness contracts
* - GPT-5.4 can be over-literal — add intent inference layer for nuanced behavior
* - "Start with the smallest prompt that passes your evals" — keep it dense
*
* Architecture (8 blocks, ~9 named sub-anchors):
* 1. <identity> — Role, instruction priority, orchestrator bias
* 2. <constraints> — Hard blocks + anti-patterns (early placement for GPT-5.4 attention)
* 3. <intent> — Think-first + intent gate + autonomy (merged, domain_guess routing)
* 4. <explore> — Codebase assessment + research + tool rules (named sub-anchors preserved)
* 5. <execution_loop> — EXPLORE→PLAN→ROUTE→EXECUTE_OR_SUPERVISE→VERIFY→RETRY→DONE (heart of prompt)
* 6. <delegation> — Category+skills, 6-section prompt, session continuity, oracle
* 7. <tasks> — Task/todo management
* 8. <style> — Tone (prose) + output contract + progress updates
*/
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
import { categorizeTools } from "../dynamic-agent-prompt-builder";
export declare function buildGpt54SisyphusPrompt(model: string, availableAgents: AvailableAgent[], availableTools?: AvailableTool[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): string;
export { categorizeTools };

11
dist/agents/sisyphus/index.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* Sisyphus agent — multi-model orchestrator.
*
* This directory contains model-specific prompt variants:
* - default.ts: Base implementation for Claude and general models
* - gemini.ts: Corrective overlays for Gemini's aggressive tendencies
* - gpt-5-4.ts: Native GPT-5.4 prompt with block-structured guidance
*/
export { buildDefaultSisyphusPrompt, buildTaskManagementSection } from "./default";
export { buildGeminiToolMandate, buildGeminiDelegationOverride, buildGeminiVerificationOverride, buildGeminiIntentGateEnforcement, buildGeminiToolGuide, buildGeminiToolCallExamples, } from "./gemini";
export { buildGpt54SisyphusPrompt } from "./gpt-5-4";

67
dist/agents/types.d.ts vendored Normal file
View File

@@ -0,0 +1,67 @@
import type { AgentConfig } from "@opencode-ai/sdk";
/**
* Agent mode determines UI model selection behavior:
* - "primary": Respects user's UI-selected model (sisyphus, atlas)
* - "subagent": Uses own fallback chain, ignores UI selection (oracle, explore, etc.)
* - "all": Available in both contexts (OpenCode compatibility)
*/
export type AgentMode = "primary" | "subagent" | "all";
/**
* Agent factory function with static mode property.
* Mode is exposed as static property for pre-instantiation access.
*/
export type AgentFactory = ((model: string) => AgentConfig) & {
mode: AgentMode;
};
/**
* Agent category for grouping in Sisyphus prompt sections
*/
export type AgentCategory = "exploration" | "specialist" | "advisor" | "utility";
/**
* Cost classification for Tool Selection table
*/
export type AgentCost = "FREE" | "CHEAP" | "EXPENSIVE";
/**
* Delegation trigger for Sisyphus prompt's Delegation Table
*/
export interface DelegationTrigger {
/** Domain of work (e.g., "Frontend UI/UX") */
domain: string;
/** When to delegate (e.g., "Visual changes only...") */
trigger: string;
}
/**
* Metadata for generating Sisyphus prompt sections dynamically
* This allows adding/removing agents without manually updating the Sisyphus prompt
*/
export interface AgentPromptMetadata {
/** Category for grouping in prompt sections */
category: AgentCategory;
/** Cost classification for Tool Selection table */
cost: AgentCost;
/** Domain triggers for Delegation Table */
triggers: DelegationTrigger[];
/** When to use this agent (for detailed sections) */
useWhen?: string[];
/** When NOT to use this agent */
avoidWhen?: string[];
/** Optional dedicated prompt section (markdown) - for agents like Oracle that have special sections */
dedicatedSection?: string;
/** Nickname/alias used in prompt (e.g., "Oracle" instead of "oracle") */
promptAlias?: string;
/** Key triggers that should appear in Phase 0 (e.g., "External library mentioned → fire librarian") */
keyTrigger?: string;
}
export declare function isGptModel(model: string): boolean;
export declare function isGpt5_4Model(model: string): boolean;
export declare function isGpt5_3CodexModel(model: string): boolean;
export declare function isGeminiModel(model: string): boolean;
export type BuiltinAgentName = "sisyphus" | "hephaestus" | "oracle" | "librarian" | "explore" | "multimodal-looker" | "metis" | "momus" | "atlas" | "sisyphus-junior";
export type OverridableAgentName = "build" | BuiltinAgentName;
export type AgentName = BuiltinAgentName;
export type AgentOverrideConfig = Partial<AgentConfig> & {
prompt_append?: string;
variant?: string;
fallback_models?: string | string[];
};
export type AgentOverrides = Partial<Record<OverridableAgentName, AgentOverrideConfig>>;

2
dist/cli/cli-installer.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { InstallArgs } from "./types";
export declare function runCliInstaller(args: InstallArgs, version: string): Promise<number>;

1
dist/cli/cli-program.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare function runCli(): void;

11
dist/cli/config-manager.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
export type { ConfigContext } from "./config-manager/config-context";
export { initConfigContext, getConfigContext, resetConfigContext, } from "./config-manager/config-context";
export { fetchNpmDistTags } from "./config-manager/npm-dist-tags";
export { getPluginNameWithVersion } from "./config-manager/plugin-name-with-version";
export { addPluginToOpenCodeConfig } from "./config-manager/add-plugin-to-opencode-config";
export { generateOmoConfig } from "./config-manager/generate-omo-config";
export { writeOmoConfig } from "./config-manager/write-omo-config";
export { isOpenCodeInstalled, getOpenCodeVersion } from "./config-manager/opencode-binary";
export { detectCurrentConfig } from "./config-manager/detect-current-config";
export type { BunInstallResult } from "./config-manager/bun-install";
export { runBunInstall, runBunInstallWithDetails } from "./config-manager/bun-install";

View File

@@ -0,0 +1,2 @@
import type { ConfigMergeResult } from "../types";
export declare function addPluginToOpenCodeConfig(currentVersion: string): Promise<ConfigMergeResult>;

View File

@@ -0,0 +1,12 @@
type BunInstallOutputMode = "inherit" | "pipe";
interface RunBunInstallOptions {
outputMode?: BunInstallOutputMode;
}
export interface BunInstallResult {
success: boolean;
timedOut?: boolean;
error?: string;
}
export declare function runBunInstall(): Promise<boolean>;
export declare function runBunInstallWithDetails(options?: RunBunInstallOptions): Promise<BunInstallResult>;
export {};

View File

@@ -0,0 +1,13 @@
import type { OpenCodeBinaryType, OpenCodeConfigPaths } from "../../shared/opencode-config-dir-types";
export interface ConfigContext {
binary: OpenCodeBinaryType;
version: string | null;
paths: OpenCodeConfigPaths;
}
export declare function initConfigContext(binary: OpenCodeBinaryType, version: string | null): void;
export declare function getConfigContext(): ConfigContext;
export declare function resetConfigContext(): void;
export declare function getConfigDir(): string;
export declare function getConfigJson(): string;
export declare function getConfigJsonc(): string;
export declare function getOmoConfigPath(): string;

View File

@@ -0,0 +1 @@
export declare function deepMergeRecord<TTarget extends Record<string, unknown>>(target: TTarget, source: Partial<TTarget>): TTarget;

View File

@@ -0,0 +1,2 @@
import type { DetectedConfig } from "../types";
export declare function detectCurrentConfig(): DetectedConfig;

View File

@@ -0,0 +1 @@
export declare function ensureConfigDirectoryExists(): void;

View File

@@ -0,0 +1 @@
export declare function formatErrorWithSuggestion(err: unknown, context: string): string;

View File

@@ -0,0 +1,2 @@
import type { InstallConfig } from "../types";
export declare function generateOmoConfig(installConfig: InstallConfig): Record<string, unknown>;

View File

@@ -0,0 +1,7 @@
export interface NpmDistTags {
latest?: string;
beta?: string;
next?: string;
[tag: string]: string | undefined;
}
export declare function fetchNpmDistTags(packageName: string): Promise<NpmDistTags | null>;

View File

@@ -0,0 +1,2 @@
export declare function isOpenCodeInstalled(): Promise<boolean>;
export declare function getOpenCodeVersion(): Promise<string | null>;

View File

@@ -0,0 +1,5 @@
export type ConfigFormat = "json" | "jsonc" | "none";
export declare function detectConfigFormat(): {
format: ConfigFormat;
path: string;
};

View File

@@ -0,0 +1,10 @@
interface ParseConfigResult {
config: OpenCodeConfig | null;
error?: string;
}
export interface OpenCodeConfig {
plugin?: string[];
[key: string]: unknown;
}
export declare function parseOpenCodeConfigFileWithError(path: string): ParseConfigResult;
export {};

View File

@@ -0,0 +1 @@
export declare function getPluginNameWithVersion(currentVersion: string, packageName?: string): Promise<string>;

View File

@@ -0,0 +1,2 @@
import type { ConfigMergeResult, InstallConfig } from "../types";
export declare function writeOmoConfig(installConfig: InstallConfig): ConfigMergeResult;

2
dist/cli/doctor/checks/config.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { CheckResult } from "../types";
export declare function checkConfig(): Promise<CheckResult>;

View File

@@ -0,0 +1,4 @@
import type { DependencyInfo } from "../types";
export declare function checkAstGrepCli(): Promise<DependencyInfo>;
export declare function checkAstGrepNapi(): Promise<DependencyInfo>;
export declare function checkCommentChecker(): Promise<DependencyInfo>;

7
dist/cli/doctor/checks/index.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { CheckDefinition } from "../types";
import { gatherSystemInfo } from "./system";
import { gatherToolsSummary } from "./tools";
export type { CheckDefinition };
export * from "./model-resolution-types";
export { gatherSystemInfo, gatherToolsSummary };
export declare function getAllCheckDefinitions(): CheckDefinition[];

View File

@@ -0,0 +1,2 @@
import type { AvailableModelsInfo } from "./model-resolution-types";
export declare function loadAvailableModelsFromCache(): AvailableModelsInfo;

View File

@@ -0,0 +1,2 @@
import type { OmoConfig } from "./model-resolution-types";
export declare function loadOmoConfig(): OmoConfig | null;

View File

@@ -0,0 +1,6 @@
import type { AvailableModelsInfo, ModelResolutionInfo, OmoConfig } from "./model-resolution-types";
export declare function buildModelResolutionDetails(options: {
info: ModelResolutionInfo;
available: AvailableModelsInfo;
config: OmoConfig;
}): string[];

View File

@@ -0,0 +1,3 @@
import type { ModelRequirement } from "../../../shared/model-requirements";
export declare function getEffectiveModel(requirement: ModelRequirement, userOverride?: string): string;
export declare function buildEffectiveResolution(requirement: ModelRequirement, userOverride?: string): string;

View File

@@ -0,0 +1,37 @@
import type { ModelRequirement } from "../../../shared/model-requirements";
export interface AgentResolutionInfo {
name: string;
requirement: ModelRequirement;
userOverride?: string;
userVariant?: string;
effectiveModel: string;
effectiveResolution: string;
}
export interface CategoryResolutionInfo {
name: string;
requirement: ModelRequirement;
userOverride?: string;
userVariant?: string;
effectiveModel: string;
effectiveResolution: string;
}
export interface ModelResolutionInfo {
agents: AgentResolutionInfo[];
categories: CategoryResolutionInfo[];
}
export interface OmoConfig {
agents?: Record<string, {
model?: string;
variant?: string;
category?: string;
}>;
categories?: Record<string, {
model?: string;
variant?: string;
}>;
}
export interface AvailableModelsInfo {
providers: string[];
modelCount: number;
cacheExists: boolean;
}

View File

@@ -0,0 +1,5 @@
import type { ModelRequirement } from "../../../shared/model-requirements";
import type { OmoConfig } from "./model-resolution-types";
export declare function formatModelWithVariant(model: string, variant?: string): string;
export declare function getEffectiveVariant(agentName: string, requirement: ModelRequirement, config: OmoConfig): string | undefined;
export declare function getCategoryEffectiveVariant(categoryName: string, requirement: ModelRequirement, config: OmoConfig): string | undefined;

View File

@@ -0,0 +1,6 @@
import type { CheckResult } from "../types";
import type { ModelResolutionInfo, OmoConfig } from "./model-resolution-types";
export declare function getModelResolutionInfo(): ModelResolutionInfo;
export declare function getModelResolutionInfoWithOverrides(config: OmoConfig): ModelResolutionInfo;
export declare function checkModels(): Promise<CheckResult>;
export declare const checkModelResolution: typeof checkModels;

View File

@@ -0,0 +1,13 @@
export interface OpenCodeBinaryInfo {
binary: string;
path: string;
}
export declare function getDesktopAppPaths(platform: NodeJS.Platform): string[];
export declare function getBinaryLookupCommand(platform: NodeJS.Platform): "which" | "where";
export declare function parseBinaryPaths(output: string): string[];
export declare function selectBinaryPath(paths: string[], platform: NodeJS.Platform): string | null;
export declare function buildVersionCommand(binaryPath: string, platform: NodeJS.Platform): string[];
export declare function findDesktopBinary(platform?: NodeJS.Platform, checkExists?: (path: string) => boolean): OpenCodeBinaryInfo | null;
export declare function findOpenCodeBinary(): Promise<OpenCodeBinaryInfo | null>;
export declare function getOpenCodeVersion(binaryPath: string, platform?: NodeJS.Platform): Promise<string | null>;
export declare function compareVersions(current: string, minimum: string): boolean;

View File

@@ -0,0 +1,10 @@
export interface LoadedVersionInfo {
cacheDir: string;
cachePackagePath: string;
installedPackagePath: string;
expectedVersion: string | null;
loadedVersion: string | null;
}
export declare function getLoadedPluginVersion(): LoadedVersionInfo;
export declare function getLatestPluginVersion(currentVersion: string | null): Promise<string | null>;
export declare function getSuggestedInstallTag(currentVersion: string | null): string;

View File

@@ -0,0 +1,15 @@
export interface PluginInfo {
registered: boolean;
configPath: string | null;
entry: string | null;
isPinned: boolean;
pinnedVersion: string | null;
isLocalDev: boolean;
}
declare function detectConfigPath(): string | null;
declare function findPluginEntry(entries: string[]): {
entry: string;
isLocalDev: boolean;
} | null;
export declare function getPluginInfo(): PluginInfo;
export { detectConfigPath, findPluginEntry };

3
dist/cli/doctor/checks/system.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { CheckResult, SystemInfo } from "../types";
export declare function gatherSystemInfo(): Promise<SystemInfo>;
export declare function checkSystem(): Promise<CheckResult>;

10
dist/cli/doctor/checks/tools-gh.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
export interface GhCliInfo {
installed: boolean;
version: string | null;
path: string | null;
authenticated: boolean;
username: string | null;
scopes: string[];
error: string | null;
}
export declare function getGhCliInfo(): Promise<GhCliInfo>;

6
dist/cli/doctor/checks/tools-lsp.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
import type { LspServerInfo } from "../types";
export declare function getLspServersInfo(): LspServerInfo[];
export declare function getLspServerStats(servers: LspServerInfo[]): {
installed: number;
total: number;
};

3
dist/cli/doctor/checks/tools-mcp.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { McpServerInfo } from "../types";
export declare function getBuiltinMcpInfo(): McpServerInfo[];
export declare function getUserMcpInfo(): McpServerInfo[];

3
dist/cli/doctor/checks/tools.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { CheckResult, ToolsSummary } from "../types";
export declare function gatherToolsSummary(): Promise<ToolsSummary>;
export declare function checkTools(): Promise<CheckResult>;

29
dist/cli/doctor/constants.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
export declare const SYMBOLS: {
readonly check: string;
readonly cross: string;
readonly warn: string;
readonly info: string;
readonly arrow: string;
readonly bullet: string;
readonly skip: string;
};
export declare const STATUS_COLORS: {
readonly pass: import("picocolors/types").Formatter;
readonly fail: import("picocolors/types").Formatter;
readonly warn: import("picocolors/types").Formatter;
readonly skip: import("picocolors/types").Formatter;
};
export declare const CHECK_IDS: {
readonly SYSTEM: "system";
readonly CONFIG: "config";
readonly TOOLS: "tools";
readonly MODELS: "models";
};
export declare const CHECK_NAMES: Record<string, string>;
export declare const EXIT_CODES: {
readonly SUCCESS: 0;
readonly FAILURE: 1;
};
export declare const MIN_OPENCODE_VERSION = "1.0.150";
export declare const PACKAGE_NAME = "oh-my-opencode";
export declare const OPENCODE_BINARIES: readonly ["opencode", "opencode-desktop"];

2
dist/cli/doctor/format-default.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { DoctorResult } from "./types";
export declare function formatDefault(result: DoctorResult): string;

6
dist/cli/doctor/format-shared.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
import type { CheckStatus, DoctorIssue } from "./types";
export declare function formatStatusSymbol(status: CheckStatus): string;
export declare function formatStatusMark(available: boolean): string;
export declare function stripAnsi(str: string): string;
export declare function formatHeader(): string;
export declare function formatIssue(issue: DoctorIssue, index: number): string;

2
dist/cli/doctor/format-status.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { DoctorResult } from "./types";
export declare function formatStatus(result: DoctorResult): string;

2
dist/cli/doctor/format-verbose.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { DoctorResult } from "./types";
export declare function formatVerbose(result: DoctorResult): string;

3
dist/cli/doctor/formatter.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { DoctorResult, DoctorMode } from "./types";
export declare function formatDoctorOutput(result: DoctorResult, mode: DoctorMode): string;
export declare function formatJsonOutput(result: DoctorResult): string;

5
dist/cli/doctor/index.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
import type { DoctorOptions } from "./types";
export declare function doctor(options?: DoctorOptions): Promise<number>;
export * from "./types";
export { runDoctor } from "./runner";
export { formatDoctorOutput, formatJsonOutput } from "./formatter";

5
dist/cli/doctor/runner.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
import type { DoctorOptions, DoctorResult, CheckDefinition, CheckResult, DoctorSummary } from "./types";
export declare function runCheck(check: CheckDefinition): Promise<CheckResult>;
export declare function calculateSummary(results: CheckResult[], duration: number): DoctorSummary;
export declare function determineExitCode(results: CheckResult[]): number;
export declare function runDoctor(options: DoctorOptions): Promise<DoctorResult>;

124
dist/cli/doctor/types.d.ts vendored Normal file
View File

@@ -0,0 +1,124 @@
export type DoctorMode = "default" | "status" | "verbose";
export interface DoctorOptions {
mode: DoctorMode;
json?: boolean;
}
export interface DoctorIssue {
title: string;
description: string;
fix?: string;
affects?: string[];
severity: "error" | "warning";
}
export type CheckStatus = "pass" | "fail" | "warn" | "skip";
export interface CheckResult {
name: string;
status: CheckStatus;
message: string;
details?: string[];
issues: DoctorIssue[];
duration?: number;
}
export type CheckFunction = () => Promise<CheckResult>;
export interface CheckDefinition {
id: string;
name: string;
check: CheckFunction;
critical?: boolean;
}
export interface SystemInfo {
opencodeVersion: string | null;
opencodePath: string | null;
pluginVersion: string | null;
loadedVersion: string | null;
bunVersion: string | null;
configPath: string | null;
configValid: boolean;
isLocalDev: boolean;
}
export interface ToolsSummary {
lspInstalled: number;
lspTotal: number;
astGrepCli: boolean;
astGrepNapi: boolean;
commentChecker: boolean;
ghCli: {
installed: boolean;
authenticated: boolean;
username: string | null;
};
mcpBuiltin: string[];
mcpUser: string[];
}
export interface DoctorSummary {
total: number;
passed: number;
failed: number;
warnings: number;
skipped: number;
duration: number;
}
export interface DoctorResult {
results: CheckResult[];
systemInfo: SystemInfo;
tools: ToolsSummary;
summary: DoctorSummary;
exitCode: number;
}
export type CheckCategory = "installation" | "configuration" | "authentication" | "dependencies" | "tools" | "updates";
export interface OpenCodeInfo {
installed: boolean;
version: string | null;
path: string | null;
binary: "opencode" | "opencode-desktop" | null;
}
export interface PluginInfo {
registered: boolean;
configPath: string | null;
entry: string | null;
isPinned: boolean;
pinnedVersion: string | null;
}
export interface ConfigInfo {
exists: boolean;
path: string | null;
format: "json" | "jsonc" | null;
valid: boolean;
errors: string[];
}
export type AuthProviderId = "anthropic" | "openai" | "google";
export interface AuthProviderInfo {
id: AuthProviderId;
name: string;
pluginInstalled: boolean;
configured: boolean;
error?: string;
}
export interface DependencyInfo {
name: string;
required: boolean;
installed: boolean;
version: string | null;
path: string | null;
installHint?: string;
}
export interface LspServerInfo {
id: string;
installed: boolean;
extensions: string[];
source: "builtin" | "config" | "plugin";
}
export interface McpServerInfo {
id: string;
type: "builtin" | "user";
enabled: boolean;
valid: boolean;
error?: string;
}
export interface VersionCheckInfo {
currentVersion: string | null;
latestVersion: string | null;
isUpToDate: boolean;
isLocalDev: boolean;
isPinned: boolean;
}

10
dist/cli/fallback-chain-resolution.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
import type { FallbackEntry } from "../shared/model-requirements";
import type { ProviderAvailability } from "./model-fallback-types";
export declare function resolveModelFromChain(fallbackChain: FallbackEntry[], availability: ProviderAvailability): {
model: string;
variant?: string;
} | null;
export declare function getSisyphusFallbackChain(): FallbackEntry[];
export declare function isAnyFallbackEntryAvailable(fallbackChain: FallbackEntry[], availability: ProviderAvailability): boolean;
export declare function isRequiredModelAvailable(requiresModel: string, fallbackChain: FallbackEntry[], availability: ProviderAvailability): boolean;
export declare function isRequiredProviderAvailable(requiredProviders: string[], availability: ProviderAvailability): boolean;

Some files were not shown because too many files have changed in this diff Show More