oh-my-opencode 3.9.0 → 3.11.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/README.ja.md +25 -36
- package/README.ko.md +25 -41
- package/README.md +4 -15
- package/README.ru.md +357 -0
- package/README.zh-cn.md +25 -36
- package/dist/agents/atlas/agent.d.ts +1 -1
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gemini.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +6 -14
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -1
- package/dist/agents/hephaestus/agent.d.ts +19 -0
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +21 -0
- package/dist/agents/hephaestus/gpt-5-4.d.ts +3 -0
- package/dist/agents/hephaestus/gpt.d.ts +3 -0
- package/dist/agents/hephaestus/index.d.ts +2 -0
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/momus.d.ts +5 -1
- package/dist/agents/prometheus/gpt.d.ts +5 -18
- package/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/sisyphus/default.d.ts +9 -0
- package/dist/agents/{sisyphus-gemini-overlays.d.ts → sisyphus/gemini.d.ts} +2 -0
- package/dist/agents/sisyphus/gpt-5-4.d.ts +26 -0
- package/dist/agents/sisyphus/index.d.ts +11 -0
- package/dist/agents/sisyphus-junior/agent.d.ts +2 -5
- package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +8 -0
- package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +11 -0
- package/dist/agents/sisyphus-junior/gpt.d.ts +2 -1
- package/dist/agents/sisyphus-junior/index.d.ts +2 -0
- package/dist/agents/types.d.ts +2 -0
- package/dist/cli/config-manager.d.ts +0 -3
- package/dist/cli/doctor/checks/system-loaded-version.d.ts +1 -0
- package/dist/cli/index.js +4093 -3285
- package/dist/config/schema/background-task.d.ts +1 -0
- package/dist/config/schema/categories.d.ts +1 -1
- package/dist/config/schema/hooks.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +4 -0
- package/dist/config/schema/start-work.d.ts +5 -0
- package/dist/create-hooks.d.ts +1 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +1 -0
- package/dist/features/claude-code-plugin-loader/types.d.ts +13 -3
- package/dist/features/context-injector/types.d.ts +2 -2
- package/dist/features/hook-message-injector/injector.d.ts +2 -0
- package/dist/hooks/atlas/session-last-agent.d.ts +10 -3
- package/dist/hooks/atlas/tool-execute-after.d.ts +1 -0
- package/dist/hooks/atlas/types.d.ts +3 -0
- package/dist/hooks/atlas/verification-reminders.d.ts +2 -1
- package/dist/hooks/auto-slash-command/executor.d.ts +2 -0
- package/dist/hooks/auto-slash-command/hook.d.ts +2 -0
- package/dist/hooks/claude-code-hooks/dispatch-hook.d.ts +4 -0
- package/dist/hooks/claude-code-hooks/execute-http-hook.d.ts +4 -0
- package/dist/hooks/claude-code-hooks/types.d.ts +9 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +11 -0
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +5 -5
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +1 -1
- package/dist/hooks/preemptive-compaction.d.ts +1 -0
- package/dist/hooks/ralph-loop/completion-handler.d.ts +14 -0
- package/dist/hooks/ralph-loop/completion-promise-detector.d.ts +1 -1
- package/dist/hooks/ralph-loop/constants.d.ts +1 -0
- package/dist/hooks/ralph-loop/continuation-prompt-builder.d.ts +1 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +3 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +3 -0
- package/dist/hooks/ralph-loop/session-event-handler.d.ts +12 -0
- package/dist/hooks/ralph-loop/types.d.ts +5 -1
- package/dist/hooks/ralph-loop/verification-failure-handler.d.ts +12 -0
- package/dist/hooks/read-image-resizer/hook.d.ts +12 -0
- package/dist/hooks/read-image-resizer/image-dimensions.d.ts +2 -0
- package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -0
- package/dist/hooks/read-image-resizer/index.d.ts +1 -0
- package/dist/hooks/read-image-resizer/types.d.ts +14 -0
- package/dist/hooks/session-notification-utils.d.ts +1 -0
- package/dist/index.js +22679 -5503
- package/dist/oh-my-opencode.schema.json +18 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-skill-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- package/dist/plugin/system-transform.d.ts +6 -1
- package/dist/plugin/tool-execute-after.d.ts +2 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/model-format-normalizer.d.ts +7 -0
- package/dist/shared/model-normalization.d.ts +2 -0
- package/dist/shared/plugin-command-discovery.d.ts +6 -0
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/executor-types.d.ts +1 -0
- package/dist/tools/delegate-task/index.d.ts +1 -1
- package/dist/tools/delegate-task/prompt-builder.d.ts +1 -0
- package/dist/tools/delegate-task/sync-session-poller.d.ts +1 -1
- package/dist/tools/delegate-task/timing.d.ts +2 -0
- package/dist/tools/delegate-task/tools.d.ts +1 -1
- package/dist/tools/delegate-task/types.d.ts +1 -0
- package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
- package/dist/tools/look-at/image-converter.d.ts +7 -0
- package/dist/tools/skill/types.d.ts +4 -0
- package/dist/tools/skill-mcp/constants.d.ts +1 -0
- package/dist/tools/slashcommand/command-discovery.d.ts +5 -1
- package/dist/tools/slashcommand/types.d.ts +1 -1
- package/package.json +19 -15
- package/dist/agents/hephaestus.d.ts +0 -6
- package/dist/cli/config-manager/add-provider-config.d.ts +0 -2
- package/dist/cli/config-manager/antigravity-provider-configuration.d.ts +0 -122
- package/dist/cli/config-manager/auth-plugins.d.ts +0 -3
- package/dist/cli/config-manager/jsonc-provider-editor.d.ts +0 -1
- package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +0 -15
- package/dist/shared/model-name-matcher.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/assets/oh-my-opencode.schema.json",
|
|
4
4
|
"title": "Oh My OpenCode Configuration",
|
|
5
5
|
"description": "Configuration schema for oh-my-opencode plugin",
|
|
6
6
|
"type": "object",
|
|
@@ -3685,6 +3685,10 @@
|
|
|
3685
3685
|
"messageStalenessTimeoutMs": {
|
|
3686
3686
|
"type": "number",
|
|
3687
3687
|
"minimum": 60000
|
|
3688
|
+
},
|
|
3689
|
+
"syncPollTimeoutMs": {
|
|
3690
|
+
"type": "number",
|
|
3691
|
+
"minimum": 60000
|
|
3688
3692
|
}
|
|
3689
3693
|
},
|
|
3690
3694
|
"additionalProperties": false
|
|
@@ -3837,6 +3841,19 @@
|
|
|
3837
3841
|
},
|
|
3838
3842
|
"additionalProperties": false
|
|
3839
3843
|
},
|
|
3844
|
+
"start_work": {
|
|
3845
|
+
"type": "object",
|
|
3846
|
+
"properties": {
|
|
3847
|
+
"auto_commit": {
|
|
3848
|
+
"default": true,
|
|
3849
|
+
"type": "boolean"
|
|
3850
|
+
}
|
|
3851
|
+
},
|
|
3852
|
+
"required": [
|
|
3853
|
+
"auto_commit"
|
|
3854
|
+
],
|
|
3855
|
+
"additionalProperties": false
|
|
3856
|
+
},
|
|
3840
3857
|
"_migrations": {
|
|
3841
3858
|
"type": "array",
|
|
3842
3859
|
"items": {
|
|
@@ -22,6 +22,7 @@ export declare function createCoreHooks(args: {
|
|
|
22
22
|
writeExistingFileGuard: ReturnType<typeof import("../../hooks").createWriteExistingFileGuardHook> | null;
|
|
23
23
|
hashlineReadEnhancer: ReturnType<typeof import("../../hooks").createHashlineReadEnhancerHook> | null;
|
|
24
24
|
jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
|
|
25
|
+
readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
|
|
25
26
|
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
26
27
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
|
27
28
|
sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
|
2
|
-
import type { HookName } from "../../config";
|
|
2
|
+
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
|
3
3
|
import type { LoadedSkill } from "../../features/opencode-skill-loader/types";
|
|
4
4
|
import type { PluginContext } from "../types";
|
|
5
5
|
import { createAutoSlashCommandHook, createCategorySkillReminderHook } from "../../hooks";
|
|
@@ -9,6 +9,7 @@ export type SkillHooks = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function createSkillHooks(args: {
|
|
11
11
|
ctx: PluginContext;
|
|
12
|
+
pluginConfig: OhMyOpenCodeConfig;
|
|
12
13
|
isHookEnabled: (hookName: HookName) => boolean;
|
|
13
14
|
safeHookEnabled: boolean;
|
|
14
15
|
mergedSkills: LoadedSkill[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
|
2
2
|
import type { ModelCacheState } from "../../plugin-state";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
|
-
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook } from "../../hooks";
|
|
4
|
+
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook } from "../../hooks";
|
|
5
5
|
export type ToolGuardHooks = {
|
|
6
6
|
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
|
7
7
|
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
|
@@ -13,6 +13,7 @@ export type ToolGuardHooks = {
|
|
|
13
13
|
writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null;
|
|
14
14
|
hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null;
|
|
15
15
|
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
|
|
16
|
+
readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
|
|
16
17
|
};
|
|
17
18
|
export declare function createToolGuardHooks(args: {
|
|
18
19
|
ctx: PluginContext;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from "./system-directive";
|
|
|
30
30
|
export * from "./agent-tool-restrictions";
|
|
31
31
|
export * from "./model-requirements";
|
|
32
32
|
export * from "./model-resolver";
|
|
33
|
+
export { normalizeModel, normalizeModelID } from "./model-normalization";
|
|
33
34
|
export { normalizeFallbackModels } from "./model-resolver";
|
|
34
35
|
export { resolveModelPipeline } from "./model-resolution-pipeline";
|
|
35
36
|
export type { ModelResolutionRequest, ModelResolutionProvenance, ModelResolutionResult, } from "./model-resolution-types";
|
|
@@ -51,4 +52,5 @@ export * from "./normalize-sdk-response";
|
|
|
51
52
|
export * from "./session-directory-resolver";
|
|
52
53
|
export * from "./prompt-tools";
|
|
53
54
|
export * from "./internal-initiator-marker";
|
|
55
|
+
export * from "./plugin-command-discovery";
|
|
54
56
|
export { SessionCategoryRegistry } from "./session-category-registry";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../features/claude-code-command-loader/types";
|
|
2
|
+
export interface PluginCommandDiscoveryOptions {
|
|
3
|
+
pluginsEnabled?: boolean;
|
|
4
|
+
enabledPluginsOverride?: Record<string, boolean>;
|
|
5
|
+
}
|
|
6
|
+
export declare function discoverPluginCommandDefinitions(options?: PluginCommandDiscoveryOptions): Record<string, CommandDefinition>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const BACKGROUND_TASK_DESCRIPTION = "Run agent task in background. Returns task_id immediately; notifies on completion.\n\nUse `background_output` to get results. Prompts MUST be in English.";
|
|
2
|
-
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed.";
|
|
2
|
+
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed. - Timeout values are in milliseconds (ms), NOT seconds.";
|
|
3
3
|
export declare const BACKGROUND_CANCEL_DESCRIPTION = "Cancel running background task(s). Use all=true to cancel ALL before final answer.";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CategoryConfig } from "../../config/schema";
|
|
2
2
|
import type { AvailableCategory, AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
|
3
|
-
export declare const VISUAL_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on VISUAL/UI tasks.\n\nDesign-first mindset:\n- Bold aesthetic choices over safe defaults\n- Unexpected layouts, asymmetry, grid-breaking elements\n- Distinctive typography (avoid: Arial, Inter, Roboto, Space Grotesk)\n- Cohesive color palettes with sharp accents\n- High-impact animations with staggered reveals\n- Atmosphere: gradient meshes, noise textures, layered transparencies\n\nAVOID: Generic fonts, purple gradients on white, predictable layouts, cookie-cutter patterns.\n</Category_Context>";
|
|
3
|
+
export declare const VISUAL_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on VISUAL/UI tasks.\n\n<DESIGN_SYSTEM_WORKFLOW_MANDATE>\n## YOU ARE A VISUAL ENGINEER. FOLLOW THIS WORKFLOW OR YOUR OUTPUT IS REJECTED.\n\n**YOUR FAILURE MODE**: You skip design system analysis and jump straight to writing components with hardcoded colors, arbitrary spacing, and ad-hoc font sizes. The result is INCONSISTENT GARBAGE that looks like 5 different people built it. THIS STOPS NOW.\n\n**EVERY visual task follows this EXACT workflow. VIOLATION = BROKEN OUTPUT.**\n\n### PHASE 1: ANALYZE THE DESIGN SYSTEM (MANDATORY FIRST ACTION)\n\n**BEFORE writing a SINGLE line of CSS, HTML, JSX, Svelte, or component code \u2014 you MUST:**\n\n1. **SEARCH for the design system.** Use Grep, Glob, Read \u2014 actually LOOK:\n - Design tokens: colors, spacing, typography, shadows, border-radii\n - Theme files: CSS variables, Tailwind config, `theme.ts`, styled-components theme, design tokens file\n - Shared/base components: Button, Card, Input, Layout primitives\n - Existing UI patterns: How are pages structured? What spacing grid? What color usage?\n\n2. **READ at minimum 5-10 existing UI components.** Understand:\n - Naming conventions (BEM? Atomic? Utility-first? Component-scoped?)\n - Spacing system (4px grid? 8px? Tailwind scale? CSS variables?)\n - Color usage (semantic tokens? Direct hex? Theme references?)\n - Typography scale (heading levels, body, caption \u2014 how many? What font stack?)\n - Component composition patterns (slots? children? compound components?)\n\n**DO NOT proceed to Phase 2 until you can answer ALL of these. If you cannot, you have not explored enough. EXPLORE MORE.**\n\n### PHASE 2: NO DESIGN SYSTEM? BUILD ONE. NOW.\n\nIf Phase 1 reveals NO coherent design system (or scattered, inconsistent patterns):\n\n1. **STOP. Do NOT build the requested UI yet.**\n2. **Extract what exists** \u2014 even inconsistent patterns have salvageable decisions.\n3. **Create a minimal design system FIRST:**\n - Color palette: primary, secondary, neutral, semantic (success/warning/error/info)\n - Typography scale: heading levels (h1-h4 minimum), body, small, caption\n - Spacing scale: consistent increments (4px or 8px base)\n - Border radii, shadows, transitions \u2014 systematic, not random\n - Component primitives: the reusable building blocks\n4. **Commit/save the design system, THEN proceed to Phase 3.**\n\nA design system is NOT optional overhead. It is the FOUNDATION. Building UI without one is like building a house on sand. It WILL collapse into inconsistency.\n\n### PHASE 3: BUILD WITH THE SYSTEM. NEVER AROUND IT.\n\n**NOW and ONLY NOW** \u2014 implement the requested visual work:\n\n| Element | CORRECT | WRONG (WILL BE REJECTED) |\n|---------|---------|--------------------------|\n| Color | Design token / CSS variable | Hardcoded `#3b82f6`, `rgb(59,130,246)` |\n| Spacing | System value (`space-4`, `gap-md`, `var(--spacing-4)`) | Arbitrary `margin: 13px`, `padding: 7px` |\n| Typography | Scale value (`text-lg`, `heading-2`, token) | Ad-hoc `font-size: 17px` |\n| Component | Extend/compose from existing primitives | One-off div soup with inline styles |\n| Border radius | System token | Random `border-radius: 6px` |\n\n**IF the design requires something OUTSIDE the current system:**\n- **Extend the system FIRST** \u2014 add the new token/primitive\n- **THEN use the new token** in your component\n- **NEVER one-off override.** That is how design systems die.\n\n### PHASE 4: VERIFY BEFORE CLAIMING DONE\n\nBEFORE reporting visual work as complete, answer these:\n\n- [ ] Does EVERY color reference a design token or CSS variable?\n- [ ] Does EVERY spacing use the system scale?\n- [ ] Does EVERY component follow the existing composition pattern?\n- [ ] Would a designer see CONSISTENCY across old and new components?\n- [ ] Are there ZERO hardcoded magic numbers for visual properties?\n\n**If ANY answer is NO \u2014 FIX IT. You are NOT done.**\n\n</DESIGN_SYSTEM_WORKFLOW_MANDATE>\n\n<DESIGN_QUALITY>\nDesign-first mindset (AFTER design system is established):\n- Bold aesthetic choices over safe defaults\n- Unexpected layouts, asymmetry, grid-breaking elements\n- Distinctive typography (avoid: Arial, Inter, Roboto, Space Grotesk)\n- Cohesive color palettes with sharp accents\n- High-impact animations with staggered reveals\n- Atmosphere: gradient meshes, noise textures, layered transparencies\n\nAVOID: Generic fonts, purple gradients on white, predictable layouts, cookie-cutter patterns.\n</DESIGN_QUALITY>\n</Category_Context>";
|
|
4
4
|
export declare const ULTRABRAIN_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on DEEP LOGICAL REASONING / COMPLEX ARCHITECTURE tasks.\n\n**CRITICAL - CODE STYLE REQUIREMENTS (NON-NEGOTIABLE)**:\n1. BEFORE writing ANY code, SEARCH the existing codebase to find similar patterns/styles\n2. Your code MUST match the project's existing conventions - blend in seamlessly\n3. Write READABLE code that humans can easily understand - no clever tricks\n4. If unsure about style, explore more files until you find the pattern\n\nStrategic advisor mindset:\n- Bias toward simplicity: least complex solution that fulfills requirements\n- Leverage existing code/patterns over new components\n- Prioritize developer experience and maintainability\n- One clear recommendation with effort estimate (Quick/Short/Medium/Large)\n- Signal when advanced approach warranted\n\nResponse format:\n- Bottom line (2-3 sentences)\n- Action plan (numbered steps)\n- Risks and mitigations (if relevant)\n</Category_Context>";
|
|
5
5
|
export declare const ARTISTRY_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on HIGHLY CREATIVE / ARTISTIC tasks.\n\nArtistic genius mindset:\n- Push far beyond conventional boundaries\n- Explore radical, unconventional directions\n- Surprise and delight: unexpected twists, novel combinations\n- Rich detail and vivid expression\n- Break patterns deliberately when it serves the creative vision\n\nApproach:\n- Generate diverse, bold options first\n- Embrace ambiguity and wild experimentation\n- Balance novelty with coherence\n- This is for tasks requiring exceptional creativity\n</Category_Context>";
|
|
6
6
|
export declare const QUICK_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on SMALL / QUICK tasks.\n\nEfficient execution mindset:\n- Fast, focused, minimal overhead\n- Get to the point immediately\n- No over-engineering\n- Simple solutions for simple problems\n\nApproach:\n- Minimal viable implementation\n- Skip unnecessary abstractions\n- Direct and concise\n</Category_Context>\n\n<Caller_Warning>\nTHIS CATEGORY USES A LESS CAPABLE MODEL (claude-haiku-4-5).\n\nThe model executing this task has LIMITED reasoning capacity. Your prompt MUST be:\n\n**EXHAUSTIVELY EXPLICIT** - Leave NOTHING to interpretation:\n1. MUST DO: List every required action as atomic, numbered steps\n2. MUST NOT DO: Explicitly forbid likely mistakes and deviations\n3. EXPECTED OUTPUT: Describe exact success criteria with concrete examples\n\n**WHY THIS MATTERS:**\n- Less capable models WILL deviate without explicit guardrails\n- Vague instructions \u2192 unpredictable results\n- Implicit expectations \u2192 missed requirements\n\n**PROMPT STRUCTURE (MANDATORY):**\n```\nTASK: [One-sentence goal]\n\nMUST DO:\n1. [Specific action with exact details]\n2. [Another specific action]\n...\n\nMUST NOT DO:\n- [Forbidden action + why]\n- [Another forbidden action]\n...\n\nEXPECTED OUTPUT:\n- [Exact deliverable description]\n- [Success criteria / verification method]\n```\n\nIf your prompt lacks this structure, REWRITE IT before delegating.\n</Caller_Warning>";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createDelegateTask, resolveCategoryConfig, buildSystemContent } from "./tools";
|
|
1
|
+
export { createDelegateTask, resolveCategoryConfig, buildSystemContent, buildTaskPrompt } from "./tools";
|
|
2
2
|
export type { DelegateTaskToolOptions, SyncSessionCreatedEvent, BuildSystemContentInput } from "./tools";
|
|
3
3
|
export type * from "./types";
|
|
4
4
|
export * from "./constants";
|
|
@@ -4,3 +4,4 @@ import type { BuildSystemContentInput } from "./types";
|
|
|
4
4
|
* Combines skill content, category prompt append, and plan agent system prepend.
|
|
5
5
|
*/
|
|
6
6
|
export declare function buildSystemContent(input: BuildSystemContentInput): string | undefined;
|
|
7
|
+
export declare function buildTaskPrompt(prompt: string, agentName: string | undefined): string;
|
|
@@ -2,5 +2,5 @@ import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
|
2
2
|
import type { DelegateTaskToolOptions } from "./types";
|
|
3
3
|
export { resolveCategoryConfig } from "./categories";
|
|
4
4
|
export type { SyncSessionCreatedEvent, DelegateTaskToolOptions, BuildSystemContentInput } from "./types";
|
|
5
|
-
export { buildSystemContent } from "./prompt-builder";
|
|
5
|
+
export { buildSystemContent, buildTaskPrompt } from "./prompt-builder";
|
|
6
6
|
export declare function createDelegateTask(options: DelegateTaskToolOptions): ToolDefinition;
|
|
@@ -63,6 +63,7 @@ export interface DelegateTaskToolOptions {
|
|
|
63
63
|
availableSkills?: AvailableSkill[];
|
|
64
64
|
agentOverrides?: AgentOverrides;
|
|
65
65
|
onSyncSessionCreated?: (event: SyncSessionCreatedEvent) => Promise<void>;
|
|
66
|
+
syncPollTimeoutMs?: number;
|
|
66
67
|
}
|
|
67
68
|
export interface BuildSystemContentInput {
|
|
68
69
|
skillContent?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HASHLINE_EDIT_DESCRIPTION = "Edit files using LINE#ID format for precise, safe modifications.\n\nWORKFLOW:\n1. Read target file/range and copy exact LINE#ID tags.\n2. Pick the smallest operation per logical mutation site.\n3. Submit one edit call per file with all related operations.\n4. If same file needs another call, re-read first.\n5. Use anchors as \"LINE#ID\" only (never include trailing \"|content\").\n\nVALIDATION:\n Payload shape: { \"filePath\": string, \"edits\": [...], \"delete\"?: boolean, \"rename\"?: string }\n Each edit must be one of: replace, append, prepend\n Edit shape: { \"op\": \"replace\"|\"append\"|\"prepend\", \"pos\"?: \"LINE#ID\", \"end\"?: \"LINE#ID\", \"lines\": string|string[]|null }\n lines must contain plain replacement text only (no LINE#ID prefixes, no diff + markers)\n CRITICAL: all operations validate against the same pre-edit file snapshot and apply bottom-up. Refs/tags are interpreted against the last-read version of the file.\n\nLINE#ID FORMAT (CRITICAL):\n Each line reference must be in \"{line_number}#{hash_id}\" format where:\n {line_number}: 1-based line number\n {hash_id}: Two CID letters from the set ZPMQVRWSNKTXJBYH\n\nFILE MODES:\n delete=true deletes file and requires edits=[] with no rename\n rename moves final content to a new path and removes old path\n\nCONTENT FORMAT:\n lines can be a string (single line) or string[] (multi-line, preferred).\n If you pass a multi-line string, it is split by real newline characters.\n Literal \"\\n\" is preserved as text.\n\nFILE CREATION:\n append without anchors adds content at EOF. If file does not exist, creates it.\n prepend without anchors adds content at BOF. If file does not exist, creates it.\n CRITICAL: only unanchored append/prepend can create a missing file.\n\nOPERATION CHOICE:\n replace with pos only -> replace one line at pos
|
|
1
|
+
export declare const HASHLINE_EDIT_DESCRIPTION = "Edit files using LINE#ID format for precise, safe modifications.\n\nWORKFLOW:\n1. Read target file/range and copy exact LINE#ID tags.\n2. Pick the smallest operation per logical mutation site.\n3. Submit one edit call per file with all related operations.\n4. If same file needs another call, re-read first.\n5. Use anchors as \"LINE#ID\" only (never include trailing \"|content\").\n\nVALIDATION:\n Payload shape: { \"filePath\": string, \"edits\": [...], \"delete\"?: boolean, \"rename\"?: string }\n Each edit must be one of: replace, append, prepend\n Edit shape: { \"op\": \"replace\"|\"append\"|\"prepend\", \"pos\"?: \"LINE#ID\", \"end\"?: \"LINE#ID\", \"lines\": string|string[]|null }\n lines must contain plain replacement text only (no LINE#ID prefixes, no diff + markers)\n CRITICAL: all operations validate against the same pre-edit file snapshot and apply bottom-up. Refs/tags are interpreted against the last-read version of the file.\n\nLINE#ID FORMAT (CRITICAL):\n Each line reference must be in \"{line_number}#{hash_id}\" format where:\n {line_number}: 1-based line number\n {hash_id}: Two CID letters from the set ZPMQVRWSNKTXJBYH\n\nFILE MODES:\n delete=true deletes file and requires edits=[] with no rename\n rename moves final content to a new path and removes old path\n\nCONTENT FORMAT:\n lines can be a string (single line) or string[] (multi-line, preferred).\n If you pass a multi-line string, it is split by real newline characters.\n Literal \"\\n\" is preserved as text.\n\nFILE CREATION:\n append without anchors adds content at EOF. If file does not exist, creates it.\n prepend without anchors adds content at BOF. If file does not exist, creates it.\n CRITICAL: only unanchored append/prepend can create a missing file.\n\nOPERATION CHOICE:\n replace with pos only -> replace one line at pos\n replace with pos+end -> replace ENTIRE range pos..end as a block (ranges MUST NOT overlap across edits)\n append with pos/end anchor -> insert after that anchor\n prepend with pos/end anchor -> insert before that anchor\n append/prepend without anchors -> EOF/BOF insertion\n\nRULES (CRITICAL):\n 1. Minimize scope: one logical mutation site per operation.\n 2. Preserve formatting: keep indentation, punctuation, line breaks, trailing commas, brace style.\n 3. Prefer insertion over neighbor rewrites: anchor to structural boundaries (}, ], },), not interior property lines.\n 4. No no-ops: replacement content must differ from current content.\n 5. Touch only requested code: avoid incidental edits.\n 6. Use exact current tokens: NEVER rewrite approximately.\n 7. For swaps/moves: prefer one range operation over multiple single-line operations.\n 8. Output tool calls only; no prose or commentary between them.\n\nTAG CHOICE (ALWAYS):\n - Copy tags exactly from read output or >>> mismatch output.\n - NEVER guess tags.\n - Anchor to structural lines (function/class/brace), NEVER blank lines.\n - Anti-pattern warning: blank/whitespace anchors are fragile.\n - Re-read after each successful edit call before issuing another on the same file.\n\nAUTOCORRECT (built-in - you do NOT need to handle these):\n Merged lines are auto-expanded back to original line count.\n Indentation is auto-restored from original lines.\n BOM and CRLF line endings are preserved automatically.\n Hashline prefixes and diff markers in text are auto-stripped.\n\nRECOVERY (when >>> mismatch error appears):\n Copy the updated LINE#ID tags shown in the error output directly.\n Re-read only if the needed tags are missing from the error snippet.\n ALWAYS batch all edits for one file in a single call.";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function needsConversion(mimeType: string): boolean;
|
|
2
|
+
export declare function convertImageToJpeg(inputPath: string, mimeType: string): string;
|
|
3
|
+
export declare function cleanupConvertedImage(filePath: string): void;
|
|
4
|
+
export declare function convertBase64ImageToJpeg(base64Data: string, mimeType: string): {
|
|
5
|
+
base64: string;
|
|
6
|
+
tempFiles: string[];
|
|
7
|
+
};
|
|
@@ -30,4 +30,8 @@ export interface SkillLoadOptions {
|
|
|
30
30
|
/** Git master configuration for watermark/co-author settings */
|
|
31
31
|
gitMasterConfig?: GitMasterConfig;
|
|
32
32
|
disabledSkills?: Set<string>;
|
|
33
|
+
/** Include Claude marketplace plugin commands in discovery (default: true) */
|
|
34
|
+
pluginsEnabled?: boolean;
|
|
35
|
+
/** Override plugin enablement from Claude settings by plugin key */
|
|
36
|
+
enabledPluginsOverride?: Record<string, boolean>;
|
|
33
37
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const SKILL_MCP_TOOL_NAME = "skill_mcp";
|
|
2
2
|
export declare const SKILL_MCP_DESCRIPTION = "Invoke MCP server operations from skill-embedded MCPs. Requires mcp_name plus exactly one of: tool_name, resource_name, or prompt_name.";
|
|
3
|
+
export declare const BUILTIN_MCP_TOOL_HINTS: Record<string, string[]>;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { CommandInfo } from "./types";
|
|
2
|
-
export
|
|
2
|
+
export interface CommandDiscoveryOptions {
|
|
3
|
+
pluginsEnabled?: boolean;
|
|
4
|
+
enabledPluginsOverride?: Record<string, boolean>;
|
|
5
|
+
}
|
|
6
|
+
export declare function discoverCommandsSync(directory?: string, options?: CommandDiscoveryOptions): CommandInfo[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LazyContentLoader } from "../../features/opencode-skill-loader";
|
|
2
|
-
export type CommandScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
|
|
2
|
+
export type CommandScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project" | "plugin";
|
|
3
3
|
export interface CommandMetadata {
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"build:binaries": "bun run script/build-binaries.ts",
|
|
27
27
|
"build:schema": "bun run script/build-schema.ts",
|
|
28
28
|
"clean": "rm -rf dist",
|
|
29
|
+
"prepare": "bun run build",
|
|
29
30
|
"postinstall": "node postinstall.mjs",
|
|
30
31
|
"prepublishOnly": "bun run clean && bun run build",
|
|
31
32
|
"typecheck": "tsc --noEmit",
|
|
@@ -54,10 +55,10 @@
|
|
|
54
55
|
"@ast-grep/cli": "^0.40.0",
|
|
55
56
|
"@ast-grep/napi": "^0.40.0",
|
|
56
57
|
"@clack/prompts": "^0.11.0",
|
|
57
|
-
"@code-yeongyu/comment-checker": "^0.
|
|
58
|
+
"@code-yeongyu/comment-checker": "^0.7.0",
|
|
58
59
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
59
|
-
"@opencode-ai/plugin": "^1.
|
|
60
|
-
"@opencode-ai/sdk": "^1.
|
|
60
|
+
"@opencode-ai/plugin": "^1.2.16",
|
|
61
|
+
"@opencode-ai/sdk": "^1.2.17",
|
|
61
62
|
"commander": "^14.0.2",
|
|
62
63
|
"detect-libc": "^2.0.0",
|
|
63
64
|
"diff": "^8.0.3",
|
|
@@ -75,17 +76,20 @@
|
|
|
75
76
|
"typescript": "^5.7.3"
|
|
76
77
|
},
|
|
77
78
|
"optionalDependencies": {
|
|
78
|
-
"oh-my-opencode-darwin-arm64": "3.
|
|
79
|
-
"oh-my-opencode-darwin-x64": "3.
|
|
80
|
-
"oh-my-opencode-darwin-x64-baseline": "3.
|
|
81
|
-
"oh-my-opencode-linux-arm64": "3.
|
|
82
|
-
"oh-my-opencode-linux-arm64-musl": "3.
|
|
83
|
-
"oh-my-opencode-linux-x64": "3.
|
|
84
|
-
"oh-my-opencode-linux-x64-baseline": "3.
|
|
85
|
-
"oh-my-opencode-linux-x64-musl": "3.
|
|
86
|
-
"oh-my-opencode-linux-x64-musl-baseline": "3.
|
|
87
|
-
"oh-my-opencode-windows-x64": "3.
|
|
88
|
-
"oh-my-opencode-windows-x64-baseline": "3.
|
|
79
|
+
"oh-my-opencode-darwin-arm64": "3.11.0",
|
|
80
|
+
"oh-my-opencode-darwin-x64": "3.11.0",
|
|
81
|
+
"oh-my-opencode-darwin-x64-baseline": "3.11.0",
|
|
82
|
+
"oh-my-opencode-linux-arm64": "3.11.0",
|
|
83
|
+
"oh-my-opencode-linux-arm64-musl": "3.11.0",
|
|
84
|
+
"oh-my-opencode-linux-x64": "3.11.0",
|
|
85
|
+
"oh-my-opencode-linux-x64-baseline": "3.11.0",
|
|
86
|
+
"oh-my-opencode-linux-x64-musl": "3.11.0",
|
|
87
|
+
"oh-my-opencode-linux-x64-musl-baseline": "3.11.0",
|
|
88
|
+
"oh-my-opencode-windows-x64": "3.11.0",
|
|
89
|
+
"oh-my-opencode-windows-x64-baseline": "3.11.0"
|
|
90
|
+
},
|
|
91
|
+
"overrides": {
|
|
92
|
+
"@opencode-ai/sdk": "^1.2.17"
|
|
89
93
|
},
|
|
90
94
|
"trustedDependencies": [
|
|
91
95
|
"@ast-grep/cli",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
-
import type { AvailableAgent, AvailableSkill, AvailableCategory } from "./dynamic-agent-prompt-builder";
|
|
3
|
-
export declare function createHephaestusAgent(model: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[], useTaskSystem?: boolean): AgentConfig;
|
|
4
|
-
export declare namespace createHephaestusAgent {
|
|
5
|
-
var mode: "all";
|
|
6
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity Provider Configuration
|
|
3
|
-
*
|
|
4
|
-
* IMPORTANT: Model names MUST use `antigravity-` prefix for stability.
|
|
5
|
-
*
|
|
6
|
-
* Since opencode-antigravity-auth v1.3.0, models use a variant system:
|
|
7
|
-
* - `antigravity-gemini-3.1-pro` with variants: low, high
|
|
8
|
-
* - `antigravity-gemini-3-flash` with variants: minimal, low, medium, high
|
|
9
|
-
*
|
|
10
|
-
* Legacy tier-suffixed names (e.g., `antigravity-gemini-3.1-pro-high`) still work
|
|
11
|
-
* but variants are the recommended approach.
|
|
12
|
-
*
|
|
13
|
-
* @see https://github.com/NoeFabris/opencode-antigravity-auth#models
|
|
14
|
-
*/
|
|
15
|
-
export declare const ANTIGRAVITY_PROVIDER_CONFIG: {
|
|
16
|
-
google: {
|
|
17
|
-
name: string;
|
|
18
|
-
models: {
|
|
19
|
-
"antigravity-gemini-3.1-pro": {
|
|
20
|
-
name: string;
|
|
21
|
-
limit: {
|
|
22
|
-
context: number;
|
|
23
|
-
output: number;
|
|
24
|
-
};
|
|
25
|
-
modalities: {
|
|
26
|
-
input: string[];
|
|
27
|
-
output: string[];
|
|
28
|
-
};
|
|
29
|
-
variants: {
|
|
30
|
-
low: {
|
|
31
|
-
thinkingLevel: string;
|
|
32
|
-
};
|
|
33
|
-
high: {
|
|
34
|
-
thinkingLevel: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
"antigravity-gemini-3-flash": {
|
|
39
|
-
name: string;
|
|
40
|
-
limit: {
|
|
41
|
-
context: number;
|
|
42
|
-
output: number;
|
|
43
|
-
};
|
|
44
|
-
modalities: {
|
|
45
|
-
input: string[];
|
|
46
|
-
output: string[];
|
|
47
|
-
};
|
|
48
|
-
variants: {
|
|
49
|
-
minimal: {
|
|
50
|
-
thinkingLevel: string;
|
|
51
|
-
};
|
|
52
|
-
low: {
|
|
53
|
-
thinkingLevel: string;
|
|
54
|
-
};
|
|
55
|
-
medium: {
|
|
56
|
-
thinkingLevel: string;
|
|
57
|
-
};
|
|
58
|
-
high: {
|
|
59
|
-
thinkingLevel: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
"antigravity-claude-sonnet-4-6": {
|
|
64
|
-
name: string;
|
|
65
|
-
limit: {
|
|
66
|
-
context: number;
|
|
67
|
-
output: number;
|
|
68
|
-
};
|
|
69
|
-
modalities: {
|
|
70
|
-
input: string[];
|
|
71
|
-
output: string[];
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
"antigravity-claude-sonnet-4-6-thinking": {
|
|
75
|
-
name: string;
|
|
76
|
-
limit: {
|
|
77
|
-
context: number;
|
|
78
|
-
output: number;
|
|
79
|
-
};
|
|
80
|
-
modalities: {
|
|
81
|
-
input: string[];
|
|
82
|
-
output: string[];
|
|
83
|
-
};
|
|
84
|
-
variants: {
|
|
85
|
-
low: {
|
|
86
|
-
thinkingConfig: {
|
|
87
|
-
thinkingBudget: number;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
max: {
|
|
91
|
-
thinkingConfig: {
|
|
92
|
-
thinkingBudget: number;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
"antigravity-claude-opus-4-5-thinking": {
|
|
98
|
-
name: string;
|
|
99
|
-
limit: {
|
|
100
|
-
context: number;
|
|
101
|
-
output: number;
|
|
102
|
-
};
|
|
103
|
-
modalities: {
|
|
104
|
-
input: string[];
|
|
105
|
-
output: string[];
|
|
106
|
-
};
|
|
107
|
-
variants: {
|
|
108
|
-
low: {
|
|
109
|
-
thinkingConfig: {
|
|
110
|
-
thinkingBudget: number;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
max: {
|
|
114
|
-
thinkingConfig: {
|
|
115
|
-
thinkingBudget: number;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function modifyProviderInJsonc(content: string, newProviderValue: Record<string, unknown>): string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ultrawork message optimized for GPT 5.2 series models.
|
|
3
|
-
*
|
|
4
|
-
* Key characteristics (from GPT 5.2 Prompting Guide):
|
|
5
|
-
* - "Stronger instruction adherence" - follows instructions more literally
|
|
6
|
-
* - "Conservative grounding bias" - prefers correctness over speed
|
|
7
|
-
* - "Parallelize independent reads to reduce latency" - official guidance
|
|
8
|
-
*
|
|
9
|
-
* Design principles:
|
|
10
|
-
* - Two-track parallel context gathering (Direct tools + Background agents)
|
|
11
|
-
* - Fire background agents, then use direct tools while waiting
|
|
12
|
-
* - Explicit complexity-based decision criteria
|
|
13
|
-
*/
|
|
14
|
-
export declare const ULTRAWORK_GPT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Think deeply before acting.\n\n<output_verbosity_spec>\n- Default: 3-6 sentences or \u22645 bullets for typical answers\n- Simple yes/no questions: \u22642 sentences\n- Complex multi-file tasks: 1 short overview paragraph + \u22645 bullets (What, Where, Risks, Next, Open)\n- Avoid long narrative paragraphs; prefer compact bullets\n- Do not rephrase the user's request unless it changes semantics\n</output_verbosity_spec>\n\n<scope_constraints>\n- Implement EXACTLY and ONLY what the user requests\n- No extra features, no added components, no embellishments\n- If any instruction is ambiguous, choose the simplest valid interpretation\n- Do NOT expand the task beyond what was asked\n</scope_constraints>\n\n## CERTAINTY PROTOCOL\n\n**Before implementation, ensure you have:**\n- Full understanding of the user's actual intent\n- Explored the codebase to understand existing patterns\n- A clear work plan (mental or written)\n- Resolved any ambiguities through exploration (not questions)\n\n<uncertainty_handling>\n- If the question is ambiguous or underspecified:\n - EXPLORE FIRST using tools (grep, file reads, explore agents)\n - If still unclear, state your interpretation and proceed\n - Ask clarifying questions ONLY as last resort\n- Never fabricate exact figures, line numbers, or references when uncertain\n- Prefer \"Based on the provided context...\" over absolute claims when unsure\n</uncertainty_handling>\n\n## DECISION FRAMEWORK: Self vs Delegate\n\n**Evaluate each task against these criteria to decide:**\n\n| Complexity | Criteria | Decision |\n|------------|----------|----------|\n| **Trivial** | <10 lines, single file, obvious pattern | **DO IT YOURSELF** |\n| **Moderate** | Single domain, clear pattern, <100 lines | **DO IT YOURSELF** (faster than delegation overhead) |\n| **Complex** | Multi-file, unfamiliar domain, >100 lines, needs specialized expertise | **DELEGATE** to appropriate category+skills |\n| **Research** | Need broad codebase context or external docs | **DELEGATE** to explore/librarian (background, parallel) |\n\n**Decision Factors:**\n- Delegation overhead \u2248 10-15 seconds. If task takes less, do it yourself.\n- If you already have full context loaded, do it yourself.\n- If task requires specialized expertise (frontend-ui-ux, git operations), delegate.\n- If you need information from multiple sources, fire parallel background agents.\n\n## AVAILABLE RESOURCES\n\nUse these when they provide clear value based on the decision framework above:\n\n| Resource | When to Use | How to Use |\n|----------|-------------|------------|\n| explore agent | Need codebase patterns you don't have | `task(subagent_type=\"explore\", load_skills=[], run_in_background=true, ...)` |\n| librarian agent | External library docs, OSS examples | `task(subagent_type=\"librarian\", load_skills=[], run_in_background=true, ...)` |\n| oracle agent | Stuck on architecture/debugging after 2+ attempts | `task(subagent_type=\"oracle\", load_skills=[], ...)` |\n| plan agent | Complex multi-step with dependencies (5+ steps) | `task(subagent_type=\"plan\", load_skills=[], ...)` |\n| task category | Specialized work matching a category | `task(category=\"...\", load_skills=[...])` |\n\n<tool_usage_rules>\n- Prefer tools over internal knowledge for fresh or user-specific data\n- Parallelize independent reads (read_file, grep, explore, librarian) to reduce latency\n- After any write/update, briefly restate: What changed, Where (path), Follow-up needed\n</tool_usage_rules>\n\n## EXECUTION PATTERN\n\n**Context gathering uses TWO parallel tracks:**\n\n| Track | Tools | Speed | Purpose |\n|-------|-------|-------|---------|\n| **Direct** | Grep, Read, LSP, AST-grep | Instant | Quick wins, known locations |\n| **Background** | explore, librarian agents | Async | Deep search, external docs |\n\n**ALWAYS run both tracks in parallel:**\n```\n// Fire background agents for deep exploration\ntask(subagent_type=\"explore\", load_skills=[], prompt=\"I'm implementing [TASK] and need to understand [KNOWLEDGE GAP]. Find [X] patterns in the codebase \u2014 file paths, implementation approach, conventions used, and how modules connect. I'll use this to [DOWNSTREAM DECISION]. Focus on production code in src/. Return file paths with brief descriptions.\", run_in_background=true)\ntask(subagent_type=\"librarian\", load_skills=[], prompt=\"I'm working with [TECHNOLOGY] and need [SPECIFIC INFO]. Find official docs and production examples for [Y] \u2014 API reference, configuration, recommended patterns, and pitfalls. Skip tutorials. I'll use this to [DECISION THIS INFORMS].\", run_in_background=true)\n\n// WHILE THEY RUN - use direct tools for immediate context\ngrep(pattern=\"relevant_pattern\", path=\"src/\")\nread_file(filePath=\"known/important/file.ts\")\n\n// Collect background results when ready\ndeep_context = background_output(task_id=...)\n\n// Merge ALL findings for comprehensive understanding\n```\n\n**Plan agent (complex tasks only):**\n- Only if 5+ interdependent steps\n- Invoke AFTER gathering context from both tracks\n\n**Execute:**\n- Surgical, minimal changes matching existing patterns\n- If delegating: provide exhaustive context and success criteria\n\n**Verify:**\n- `lsp_diagnostics` on modified files\n- Run tests if available\n\n## QUALITY STANDARDS\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| Build | Run build command | Exit code 0 |\n| Test | Execute test suite | All tests pass |\n| Lint | Run lsp_diagnostics | Zero new errors |\n\n## COMPLETION CRITERIA\n\nA task is complete when:\n1. Requested functionality is fully implemented (not partial, not simplified)\n2. lsp_diagnostics shows zero errors on modified files\n3. Tests pass (or pre-existing failures documented)\n4. Code matches existing codebase patterns\n\n**Deliver exactly what was asked. No more, no less.**\n\n</ultrawork-mode>\n\n---\n\n";
|
|
15
|
-
export declare function getGptUltraworkMessage(): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function fuzzyMatchModel(target: string, available: Set<string>, providers?: string[]): string | null;
|