oh-my-opencode 3.8.3 → 3.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/atlas/index.d.ts +1 -6
- package/dist/agents/index.d.ts +0 -9
- package/dist/agents/prometheus/index.d.ts +1 -9
- package/dist/agents/sisyphus-gemini-overlays.d.ts +3 -0
- package/dist/cli/index.js +13 -8
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/agent-overrides.d.ts +60 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +57 -0
- package/dist/features/background-agent/index.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +3 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.d.ts +2 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/summarize-retry-strategy.d.ts +2 -0
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +17 -0
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +4 -2
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +5 -4
- package/dist/hooks/preemptive-compaction.d.ts +2 -1
- package/dist/hooks/shared/compaction-model-resolver.d.ts +5 -0
- package/dist/index.js +1187 -953
- package/dist/oh-my-opencode.schema.json +171 -0
- package/dist/tools/hashline-edit/hashline-edit-executor.d.ts +2 -2
- package/dist/tools/hashline-edit/normalize-edits.d.ts +13 -0
- package/package.json +8 -8
- package/dist/features/background-agent/background-task-completer.d.ts +0 -3
- package/dist/features/background-agent/format-duration.d.ts +0 -1
- package/dist/features/background-agent/message-dir.d.ts +0 -1
- package/dist/features/background-agent/parent-session-context-resolver.d.ts +0 -15
- package/dist/features/background-agent/parent-session-notifier.d.ts +0 -3
- package/dist/features/background-agent/result-handler-context.d.ts +0 -8
- package/dist/features/background-agent/result-handler.d.ts +0 -7
- package/dist/features/background-agent/session-output-validator.d.ts +0 -2
- package/dist/features/background-agent/session-task-cleanup.d.ts +0 -10
- package/dist/features/background-agent/session-todo-checker.d.ts +0 -2
- package/dist/features/background-agent/spawner/background-session-creator.d.ts +0 -10
- package/dist/features/background-agent/spawner/concurrency-key-from-launch-input.d.ts +0 -2
- package/dist/features/background-agent/spawner/spawner-context.d.ts +0 -11
- package/dist/features/background-agent/spawner/tmux-callback-invoker.d.ts +0 -8
- package/dist/features/claude-tasks/index.d.ts +0 -3
- package/dist/features/mcp-oauth/index.d.ts +0 -3
- package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +0 -1
- package/dist/hooks/session-recovery/recover-empty-content-message.d.ts +0 -5
- package/dist/shared/models-json-cache-reader.d.ts +0 -1
- package/dist/shared/open-code-client-accessors.d.ts +0 -3
- package/dist/shared/open-code-client-shapes.d.ts +0 -13
- package/dist/shared/provider-models-cache-model-reader.d.ts +0 -1
- package/dist/tools/call-omo-agent/session-completion-poller.d.ts +0 -13
- package/dist/tools/call-omo-agent/session-message-output-extractor.d.ts +0 -17
- package/dist/tools/call-omo-agent/subagent-session-prompter.d.ts +0 -11
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { ATLAS_GPT_SYSTEM_PROMPT, getGptAtlasPrompt } from "./gpt";
|
|
3
|
-
export { ATLAS_GEMINI_SYSTEM_PROMPT, getGeminiAtlasPrompt } from "./gemini";
|
|
4
|
-
export { getCategoryDescription, buildAgentSelectionSection, buildCategorySection, buildSkillsSection, buildDecisionMatrix, } from "./prompt-section-builder";
|
|
5
|
-
export { createAtlasAgent, getAtlasPromptSource, getAtlasPrompt, atlasPromptMetadata } from "./agent";
|
|
1
|
+
export { createAtlasAgent, atlasPromptMetadata } from "./agent";
|
|
6
2
|
export type { AtlasPromptSource, OrchestratorContext } from "./agent";
|
|
7
|
-
export { isGptModel } from "../types";
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
2
|
export { createBuiltinAgents } from "./builtin-agents";
|
|
3
3
|
export type { AvailableAgent, AvailableCategory, AvailableSkill } from "./dynamic-agent-prompt-builder";
|
|
4
|
-
export { createSisyphusAgent } from "./sisyphus";
|
|
5
|
-
export { createOracleAgent, ORACLE_PROMPT_METADATA } from "./oracle";
|
|
6
|
-
export { createLibrarianAgent, LIBRARIAN_PROMPT_METADATA } from "./librarian";
|
|
7
|
-
export { createExploreAgent, EXPLORE_PROMPT_METADATA } from "./explore";
|
|
8
|
-
export { createMultimodalLookerAgent, MULTIMODAL_LOOKER_PROMPT_METADATA } from "./multimodal-looker";
|
|
9
|
-
export { createMetisAgent, METIS_SYSTEM_PROMPT, metisPromptMetadata } from "./metis";
|
|
10
|
-
export { createMomusAgent, MOMUS_SYSTEM_PROMPT, momusPromptMetadata } from "./momus";
|
|
11
|
-
export { createAtlasAgent, atlasPromptMetadata } from "./atlas";
|
|
12
|
-
export { PROMETHEUS_SYSTEM_PROMPT, PROMETHEUS_PERMISSION, PROMETHEUS_GPT_SYSTEM_PROMPT, getPrometheusPrompt, getPrometheusPromptSource, getGptPrometheusPrompt, PROMETHEUS_IDENTITY_CONSTRAINTS, PROMETHEUS_INTERVIEW_MODE, PROMETHEUS_PLAN_GENERATION, PROMETHEUS_HIGH_ACCURACY_MODE, PROMETHEUS_PLAN_TEMPLATE, PROMETHEUS_BEHAVIORAL_SUMMARY, } from "./prometheus";
|
|
13
4
|
export type { PrometheusPromptSource } from "./prometheus";
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
export { PROMETHEUS_SYSTEM_PROMPT, PROMETHEUS_PERMISSION, getPrometheusPrompt,
|
|
1
|
+
export { PROMETHEUS_SYSTEM_PROMPT, PROMETHEUS_PERMISSION, getPrometheusPrompt, } from "./system-prompt";
|
|
2
2
|
export type { PrometheusPromptSource } from "./system-prompt";
|
|
3
|
-
export { PROMETHEUS_GPT_SYSTEM_PROMPT, getGptPrometheusPrompt } from "./gpt";
|
|
4
|
-
export { PROMETHEUS_GEMINI_SYSTEM_PROMPT, getGeminiPrometheusPrompt } from "./gemini";
|
|
5
|
-
export { PROMETHEUS_IDENTITY_CONSTRAINTS } from "./identity-constraints";
|
|
6
|
-
export { PROMETHEUS_INTERVIEW_MODE } from "./interview-mode";
|
|
7
|
-
export { PROMETHEUS_PLAN_GENERATION } from "./plan-generation";
|
|
8
|
-
export { PROMETHEUS_HIGH_ACCURACY_MODE } from "./high-accuracy-mode";
|
|
9
|
-
export { PROMETHEUS_PLAN_TEMPLATE } from "./plan-template";
|
|
10
|
-
export { PROMETHEUS_BEHAVIORAL_SUMMARY } from "./behavioral-summary";
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* - Avoid delegation, preferring to do work themselves
|
|
7
7
|
* - Claim completion without verification
|
|
8
8
|
* - Interpret constraints as suggestions
|
|
9
|
+
* - Skip intent classification gates (jump straight to action)
|
|
10
|
+
* - Conflate investigation with implementation ("look into X" → starts coding)
|
|
9
11
|
*
|
|
10
12
|
* These overlays inject corrective sections at strategic points
|
|
11
13
|
* in the dynamic Sisyphus prompt to counter these tendencies.
|
|
@@ -13,3 +15,4 @@
|
|
|
13
15
|
export declare function buildGeminiToolMandate(): string;
|
|
14
16
|
export declare function buildGeminiDelegationOverride(): string;
|
|
15
17
|
export declare function buildGeminiVerificationOverride(): string;
|
|
18
|
+
export declare function buildGeminiIntentGateEnforcement(): string;
|
package/dist/cli/index.js
CHANGED
|
@@ -9248,7 +9248,7 @@ var {
|
|
|
9248
9248
|
// package.json
|
|
9249
9249
|
var package_default = {
|
|
9250
9250
|
name: "oh-my-opencode",
|
|
9251
|
-
version: "3.8.
|
|
9251
|
+
version: "3.8.4",
|
|
9252
9252
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
9253
9253
|
main: "dist/index.js",
|
|
9254
9254
|
types: "dist/index.d.ts",
|
|
@@ -9322,13 +9322,13 @@ var package_default = {
|
|
|
9322
9322
|
typescript: "^5.7.3"
|
|
9323
9323
|
},
|
|
9324
9324
|
optionalDependencies: {
|
|
9325
|
-
"oh-my-opencode-darwin-arm64": "3.8.
|
|
9326
|
-
"oh-my-opencode-darwin-x64": "3.8.
|
|
9327
|
-
"oh-my-opencode-linux-arm64": "3.8.
|
|
9328
|
-
"oh-my-opencode-linux-arm64-musl": "3.8.
|
|
9329
|
-
"oh-my-opencode-linux-x64": "3.8.
|
|
9330
|
-
"oh-my-opencode-linux-x64-musl": "3.8.
|
|
9331
|
-
"oh-my-opencode-windows-x64": "3.8.
|
|
9325
|
+
"oh-my-opencode-darwin-arm64": "3.8.4",
|
|
9326
|
+
"oh-my-opencode-darwin-x64": "3.8.4",
|
|
9327
|
+
"oh-my-opencode-linux-arm64": "3.8.4",
|
|
9328
|
+
"oh-my-opencode-linux-arm64-musl": "3.8.4",
|
|
9329
|
+
"oh-my-opencode-linux-x64": "3.8.4",
|
|
9330
|
+
"oh-my-opencode-linux-x64-musl": "3.8.4",
|
|
9331
|
+
"oh-my-opencode-windows-x64": "3.8.4"
|
|
9332
9332
|
},
|
|
9333
9333
|
trustedDependencies: [
|
|
9334
9334
|
"@ast-grep/cli",
|
|
@@ -23474,6 +23474,10 @@ var AgentOverrideConfigSchema = exports_external.object({
|
|
|
23474
23474
|
ultrawork: exports_external.object({
|
|
23475
23475
|
model: exports_external.string().optional(),
|
|
23476
23476
|
variant: exports_external.string().optional()
|
|
23477
|
+
}).optional(),
|
|
23478
|
+
compaction: exports_external.object({
|
|
23479
|
+
model: exports_external.string().optional(),
|
|
23480
|
+
variant: exports_external.string().optional()
|
|
23477
23481
|
}).optional()
|
|
23478
23482
|
});
|
|
23479
23483
|
var AgentOverridesSchema = exports_external.object({
|
|
@@ -23779,6 +23783,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
23779
23783
|
disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
|
|
23780
23784
|
disabled_tools: exports_external.array(exports_external.string()).optional(),
|
|
23781
23785
|
hashline_edit: exports_external.boolean().optional(),
|
|
23786
|
+
model_fallback: exports_external.boolean().optional(),
|
|
23782
23787
|
agents: AgentOverridesSchema.optional(),
|
|
23783
23788
|
categories: CategoriesConfigSchema.optional(),
|
|
23784
23789
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { OhMyOpenCodeConfigSchema,
|
|
1
|
+
export { OhMyOpenCodeConfigSchema, } from "./schema";
|
|
2
2
|
export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, McpName, AgentName, HookName, BuiltinCommandName, SisyphusAgentConfig, ExperimentalConfig, DynamicContextPruningConfig, RalphLoopConfig, TmuxConfig, TmuxLayout, SisyphusConfig, SisyphusTasksConfig, RuntimeFallbackConfig, FallbackModels, } from "./schema";
|
|
@@ -78,6 +78,10 @@ export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
|
78
78
|
model: z.ZodOptional<z.ZodString>;
|
|
79
79
|
variant: z.ZodOptional<z.ZodString>;
|
|
80
80
|
}, z.core.$strip>>;
|
|
81
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
model: z.ZodOptional<z.ZodString>;
|
|
83
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
81
85
|
}, z.core.$strip>;
|
|
82
86
|
export declare const AgentOverridesSchema: z.ZodObject<{
|
|
83
87
|
build: z.ZodOptional<z.ZodObject<{
|
|
@@ -159,6 +163,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
159
163
|
model: z.ZodOptional<z.ZodString>;
|
|
160
164
|
variant: z.ZodOptional<z.ZodString>;
|
|
161
165
|
}, z.core.$strip>>;
|
|
166
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
model: z.ZodOptional<z.ZodString>;
|
|
168
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
162
170
|
}, z.core.$strip>>;
|
|
163
171
|
plan: z.ZodOptional<z.ZodObject<{
|
|
164
172
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -239,6 +247,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
239
247
|
model: z.ZodOptional<z.ZodString>;
|
|
240
248
|
variant: z.ZodOptional<z.ZodString>;
|
|
241
249
|
}, z.core.$strip>>;
|
|
250
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
model: z.ZodOptional<z.ZodString>;
|
|
252
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.core.$strip>>;
|
|
242
254
|
}, z.core.$strip>>;
|
|
243
255
|
sisyphus: z.ZodOptional<z.ZodObject<{
|
|
244
256
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -319,6 +331,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
319
331
|
model: z.ZodOptional<z.ZodString>;
|
|
320
332
|
variant: z.ZodOptional<z.ZodString>;
|
|
321
333
|
}, z.core.$strip>>;
|
|
334
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
335
|
+
model: z.ZodOptional<z.ZodString>;
|
|
336
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
337
|
+
}, z.core.$strip>>;
|
|
322
338
|
}, z.core.$strip>>;
|
|
323
339
|
hephaestus: z.ZodOptional<z.ZodObject<{
|
|
324
340
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -399,6 +415,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
399
415
|
model: z.ZodOptional<z.ZodString>;
|
|
400
416
|
variant: z.ZodOptional<z.ZodString>;
|
|
401
417
|
}, z.core.$strip>>;
|
|
418
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
419
|
+
model: z.ZodOptional<z.ZodString>;
|
|
420
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
402
422
|
}, z.core.$strip>>;
|
|
403
423
|
"sisyphus-junior": z.ZodOptional<z.ZodObject<{
|
|
404
424
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -479,6 +499,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
479
499
|
model: z.ZodOptional<z.ZodString>;
|
|
480
500
|
variant: z.ZodOptional<z.ZodString>;
|
|
481
501
|
}, z.core.$strip>>;
|
|
502
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
503
|
+
model: z.ZodOptional<z.ZodString>;
|
|
504
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
505
|
+
}, z.core.$strip>>;
|
|
482
506
|
}, z.core.$strip>>;
|
|
483
507
|
"OpenCode-Builder": z.ZodOptional<z.ZodObject<{
|
|
484
508
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -559,6 +583,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
559
583
|
model: z.ZodOptional<z.ZodString>;
|
|
560
584
|
variant: z.ZodOptional<z.ZodString>;
|
|
561
585
|
}, z.core.$strip>>;
|
|
586
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
587
|
+
model: z.ZodOptional<z.ZodString>;
|
|
588
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
589
|
+
}, z.core.$strip>>;
|
|
562
590
|
}, z.core.$strip>>;
|
|
563
591
|
prometheus: z.ZodOptional<z.ZodObject<{
|
|
564
592
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -639,6 +667,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
639
667
|
model: z.ZodOptional<z.ZodString>;
|
|
640
668
|
variant: z.ZodOptional<z.ZodString>;
|
|
641
669
|
}, z.core.$strip>>;
|
|
670
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
671
|
+
model: z.ZodOptional<z.ZodString>;
|
|
672
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
673
|
+
}, z.core.$strip>>;
|
|
642
674
|
}, z.core.$strip>>;
|
|
643
675
|
metis: z.ZodOptional<z.ZodObject<{
|
|
644
676
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -719,6 +751,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
719
751
|
model: z.ZodOptional<z.ZodString>;
|
|
720
752
|
variant: z.ZodOptional<z.ZodString>;
|
|
721
753
|
}, z.core.$strip>>;
|
|
754
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
755
|
+
model: z.ZodOptional<z.ZodString>;
|
|
756
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
757
|
+
}, z.core.$strip>>;
|
|
722
758
|
}, z.core.$strip>>;
|
|
723
759
|
momus: z.ZodOptional<z.ZodObject<{
|
|
724
760
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -799,6 +835,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
799
835
|
model: z.ZodOptional<z.ZodString>;
|
|
800
836
|
variant: z.ZodOptional<z.ZodString>;
|
|
801
837
|
}, z.core.$strip>>;
|
|
838
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
839
|
+
model: z.ZodOptional<z.ZodString>;
|
|
840
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
841
|
+
}, z.core.$strip>>;
|
|
802
842
|
}, z.core.$strip>>;
|
|
803
843
|
oracle: z.ZodOptional<z.ZodObject<{
|
|
804
844
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -879,6 +919,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
879
919
|
model: z.ZodOptional<z.ZodString>;
|
|
880
920
|
variant: z.ZodOptional<z.ZodString>;
|
|
881
921
|
}, z.core.$strip>>;
|
|
922
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
923
|
+
model: z.ZodOptional<z.ZodString>;
|
|
924
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
925
|
+
}, z.core.$strip>>;
|
|
882
926
|
}, z.core.$strip>>;
|
|
883
927
|
librarian: z.ZodOptional<z.ZodObject<{
|
|
884
928
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -959,6 +1003,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
959
1003
|
model: z.ZodOptional<z.ZodString>;
|
|
960
1004
|
variant: z.ZodOptional<z.ZodString>;
|
|
961
1005
|
}, z.core.$strip>>;
|
|
1006
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1007
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1009
|
+
}, z.core.$strip>>;
|
|
962
1010
|
}, z.core.$strip>>;
|
|
963
1011
|
explore: z.ZodOptional<z.ZodObject<{
|
|
964
1012
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1039,6 +1087,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1039
1087
|
model: z.ZodOptional<z.ZodString>;
|
|
1040
1088
|
variant: z.ZodOptional<z.ZodString>;
|
|
1041
1089
|
}, z.core.$strip>>;
|
|
1090
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1091
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1092
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1093
|
+
}, z.core.$strip>>;
|
|
1042
1094
|
}, z.core.$strip>>;
|
|
1043
1095
|
"multimodal-looker": z.ZodOptional<z.ZodObject<{
|
|
1044
1096
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1119,6 +1171,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1119
1171
|
model: z.ZodOptional<z.ZodString>;
|
|
1120
1172
|
variant: z.ZodOptional<z.ZodString>;
|
|
1121
1173
|
}, z.core.$strip>>;
|
|
1174
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1175
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1176
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1177
|
+
}, z.core.$strip>>;
|
|
1122
1178
|
}, z.core.$strip>>;
|
|
1123
1179
|
atlas: z.ZodOptional<z.ZodObject<{
|
|
1124
1180
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1199,6 +1255,10 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1199
1255
|
model: z.ZodOptional<z.ZodString>;
|
|
1200
1256
|
variant: z.ZodOptional<z.ZodString>;
|
|
1201
1257
|
}, z.core.$strip>>;
|
|
1258
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1259
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1260
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1261
|
+
}, z.core.$strip>>;
|
|
1202
1262
|
}, z.core.$strip>>;
|
|
1203
1263
|
}, z.core.$strip>;
|
|
1204
1264
|
export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
|
|
@@ -35,6 +35,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
35
35
|
}>>>;
|
|
36
36
|
disabled_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
37
|
hashline_edit: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
model_fallback: z.ZodOptional<z.ZodBoolean>;
|
|
38
39
|
agents: z.ZodOptional<z.ZodObject<{
|
|
39
40
|
build: z.ZodOptional<z.ZodObject<{
|
|
40
41
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -115,6 +116,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
115
116
|
model: z.ZodOptional<z.ZodString>;
|
|
116
117
|
variant: z.ZodOptional<z.ZodString>;
|
|
117
118
|
}, z.core.$strip>>;
|
|
119
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
model: z.ZodOptional<z.ZodString>;
|
|
121
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
118
123
|
}, z.core.$strip>>;
|
|
119
124
|
plan: z.ZodOptional<z.ZodObject<{
|
|
120
125
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -195,6 +200,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
195
200
|
model: z.ZodOptional<z.ZodString>;
|
|
196
201
|
variant: z.ZodOptional<z.ZodString>;
|
|
197
202
|
}, z.core.$strip>>;
|
|
203
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
model: z.ZodOptional<z.ZodString>;
|
|
205
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
198
207
|
}, z.core.$strip>>;
|
|
199
208
|
sisyphus: z.ZodOptional<z.ZodObject<{
|
|
200
209
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -275,6 +284,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
275
284
|
model: z.ZodOptional<z.ZodString>;
|
|
276
285
|
variant: z.ZodOptional<z.ZodString>;
|
|
277
286
|
}, z.core.$strip>>;
|
|
287
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
288
|
+
model: z.ZodOptional<z.ZodString>;
|
|
289
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
290
|
+
}, z.core.$strip>>;
|
|
278
291
|
}, z.core.$strip>>;
|
|
279
292
|
hephaestus: z.ZodOptional<z.ZodObject<{
|
|
280
293
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -355,6 +368,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
355
368
|
model: z.ZodOptional<z.ZodString>;
|
|
356
369
|
variant: z.ZodOptional<z.ZodString>;
|
|
357
370
|
}, z.core.$strip>>;
|
|
371
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
372
|
+
model: z.ZodOptional<z.ZodString>;
|
|
373
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
374
|
+
}, z.core.$strip>>;
|
|
358
375
|
}, z.core.$strip>>;
|
|
359
376
|
"sisyphus-junior": z.ZodOptional<z.ZodObject<{
|
|
360
377
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -435,6 +452,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
435
452
|
model: z.ZodOptional<z.ZodString>;
|
|
436
453
|
variant: z.ZodOptional<z.ZodString>;
|
|
437
454
|
}, z.core.$strip>>;
|
|
455
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
456
|
+
model: z.ZodOptional<z.ZodString>;
|
|
457
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
458
|
+
}, z.core.$strip>>;
|
|
438
459
|
}, z.core.$strip>>;
|
|
439
460
|
"OpenCode-Builder": z.ZodOptional<z.ZodObject<{
|
|
440
461
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -515,6 +536,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
515
536
|
model: z.ZodOptional<z.ZodString>;
|
|
516
537
|
variant: z.ZodOptional<z.ZodString>;
|
|
517
538
|
}, z.core.$strip>>;
|
|
539
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
model: z.ZodOptional<z.ZodString>;
|
|
541
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
542
|
+
}, z.core.$strip>>;
|
|
518
543
|
}, z.core.$strip>>;
|
|
519
544
|
prometheus: z.ZodOptional<z.ZodObject<{
|
|
520
545
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -595,6 +620,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
595
620
|
model: z.ZodOptional<z.ZodString>;
|
|
596
621
|
variant: z.ZodOptional<z.ZodString>;
|
|
597
622
|
}, z.core.$strip>>;
|
|
623
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
624
|
+
model: z.ZodOptional<z.ZodString>;
|
|
625
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
626
|
+
}, z.core.$strip>>;
|
|
598
627
|
}, z.core.$strip>>;
|
|
599
628
|
metis: z.ZodOptional<z.ZodObject<{
|
|
600
629
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -675,6 +704,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
675
704
|
model: z.ZodOptional<z.ZodString>;
|
|
676
705
|
variant: z.ZodOptional<z.ZodString>;
|
|
677
706
|
}, z.core.$strip>>;
|
|
707
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
708
|
+
model: z.ZodOptional<z.ZodString>;
|
|
709
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
710
|
+
}, z.core.$strip>>;
|
|
678
711
|
}, z.core.$strip>>;
|
|
679
712
|
momus: z.ZodOptional<z.ZodObject<{
|
|
680
713
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -755,6 +788,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
755
788
|
model: z.ZodOptional<z.ZodString>;
|
|
756
789
|
variant: z.ZodOptional<z.ZodString>;
|
|
757
790
|
}, z.core.$strip>>;
|
|
791
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
792
|
+
model: z.ZodOptional<z.ZodString>;
|
|
793
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
794
|
+
}, z.core.$strip>>;
|
|
758
795
|
}, z.core.$strip>>;
|
|
759
796
|
oracle: z.ZodOptional<z.ZodObject<{
|
|
760
797
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -835,6 +872,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
835
872
|
model: z.ZodOptional<z.ZodString>;
|
|
836
873
|
variant: z.ZodOptional<z.ZodString>;
|
|
837
874
|
}, z.core.$strip>>;
|
|
875
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
876
|
+
model: z.ZodOptional<z.ZodString>;
|
|
877
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
878
|
+
}, z.core.$strip>>;
|
|
838
879
|
}, z.core.$strip>>;
|
|
839
880
|
librarian: z.ZodOptional<z.ZodObject<{
|
|
840
881
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -915,6 +956,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
915
956
|
model: z.ZodOptional<z.ZodString>;
|
|
916
957
|
variant: z.ZodOptional<z.ZodString>;
|
|
917
958
|
}, z.core.$strip>>;
|
|
959
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
960
|
+
model: z.ZodOptional<z.ZodString>;
|
|
961
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
962
|
+
}, z.core.$strip>>;
|
|
918
963
|
}, z.core.$strip>>;
|
|
919
964
|
explore: z.ZodOptional<z.ZodObject<{
|
|
920
965
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -995,6 +1040,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
995
1040
|
model: z.ZodOptional<z.ZodString>;
|
|
996
1041
|
variant: z.ZodOptional<z.ZodString>;
|
|
997
1042
|
}, z.core.$strip>>;
|
|
1043
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1044
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1045
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
}, z.core.$strip>>;
|
|
998
1047
|
}, z.core.$strip>>;
|
|
999
1048
|
"multimodal-looker": z.ZodOptional<z.ZodObject<{
|
|
1000
1049
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1075,6 +1124,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1075
1124
|
model: z.ZodOptional<z.ZodString>;
|
|
1076
1125
|
variant: z.ZodOptional<z.ZodString>;
|
|
1077
1126
|
}, z.core.$strip>>;
|
|
1127
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1128
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1129
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
}, z.core.$strip>>;
|
|
1078
1131
|
}, z.core.$strip>>;
|
|
1079
1132
|
atlas: z.ZodOptional<z.ZodObject<{
|
|
1080
1133
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1155,6 +1208,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1155
1208
|
model: z.ZodOptional<z.ZodString>;
|
|
1156
1209
|
variant: z.ZodOptional<z.ZodString>;
|
|
1157
1210
|
}, z.core.$strip>>;
|
|
1211
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
1212
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1213
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1214
|
+
}, z.core.$strip>>;
|
|
1158
1215
|
}, z.core.$strip>>;
|
|
1159
1216
|
}, z.core.$strip>>;
|
|
1160
1217
|
categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
2
|
export { BackgroundManager, type SubagentSessionCreatedEvent, type OnSubagentSessionCreated } from "./manager";
|
|
3
|
-
export { TaskHistory, type TaskHistoryEntry } from "./task-history";
|
|
4
|
-
export { ConcurrencyManager } from "./concurrency";
|
|
5
|
-
export { TaskStateManager } from "./state";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { AutoCompactState } from "./types";
|
|
2
|
+
import type { OhMyOpenCodeConfig } from "../../config";
|
|
2
3
|
import type { ExperimentalConfig } from "../../config";
|
|
4
|
+
import type { Client } from "./client";
|
|
3
5
|
export { getLastAssistant } from "./message-builder";
|
|
4
|
-
export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client:
|
|
6
|
+
export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: Client, directory: string, pluginConfig: OhMyOpenCodeConfig, _experimental?: ExperimentalConfig): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { ExperimentalConfig } from "../../config";
|
|
2
|
+
import type { ExperimentalConfig, OhMyOpenCodeConfig } from "../../config";
|
|
3
3
|
export interface AnthropicContextWindowLimitRecoveryOptions {
|
|
4
4
|
experimental?: ExperimentalConfig;
|
|
5
|
+
pluginConfig: OhMyOpenCodeConfig;
|
|
5
6
|
}
|
|
6
7
|
export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: PluginInput, options?: AnthropicContextWindowLimitRecoveryOptions): {
|
|
7
8
|
event: ({ event }: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AutoCompactState } from "./types";
|
|
2
|
+
import type { OhMyOpenCodeConfig } from "../../config";
|
|
2
3
|
import type { Client } from "./client";
|
|
3
4
|
export declare function runSummarizeRetryStrategy(params: {
|
|
4
5
|
sessionID: string;
|
|
@@ -6,6 +7,7 @@ export declare function runSummarizeRetryStrategy(params: {
|
|
|
6
7
|
autoCompactState: AutoCompactState;
|
|
7
8
|
client: Client;
|
|
8
9
|
directory: string;
|
|
10
|
+
pluginConfig: OhMyOpenCodeConfig;
|
|
9
11
|
errorType?: string;
|
|
10
12
|
messageIndex?: number;
|
|
11
13
|
}): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini-optimized ultrawork message.
|
|
3
|
+
*
|
|
4
|
+
* Key differences from default (Claude) variant:
|
|
5
|
+
* - Mandatory intent gate enforcement before any action
|
|
6
|
+
* - Anti-skip mechanism for Phase 0 intent classification
|
|
7
|
+
* - Explicit self-check questions to counter Gemini's "eager" behavior
|
|
8
|
+
* - Stronger scope constraints (Gemini's creativity causes scope creep)
|
|
9
|
+
* - Anti-optimism checkpoints at verification stage
|
|
10
|
+
*
|
|
11
|
+
* Key differences from GPT variant:
|
|
12
|
+
* - GPT naturally follows structured gates; Gemini needs explicit enforcement
|
|
13
|
+
* - GPT self-delegates appropriately; Gemini tries to do everything itself
|
|
14
|
+
* - GPT respects MUST NOT; Gemini treats constraints as suggestions
|
|
15
|
+
*/
|
|
16
|
+
export declare const ULTRAWORK_GEMINI_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. Ultrathink before acting.\n\n<GEMINI_INTENT_GATE>\n## STEP 0: CLASSIFY INTENT \u2014 THIS IS NOT OPTIONAL\n\n**Before ANY tool call, exploration, or action, you MUST output:**\n\n```\nI detect [TYPE] intent \u2014 [REASON].\nMy approach: [ROUTING DECISION].\n```\n\nWhere TYPE is one of: research | implementation | investigation | evaluation | fix | open-ended\n\n**SELF-CHECK (answer each before proceeding):**\n\n1. Did the user EXPLICITLY ask me to build/create/implement something? \u2192 If NO, do NOT implement.\n2. Did the user say \"look into\", \"check\", \"investigate\", \"explain\"? \u2192 RESEARCH only. Do not code.\n3. Did the user ask \"what do you think?\" \u2192 EVALUATE and propose. Do NOT execute.\n4. Did the user report an error/bug? \u2192 MINIMAL FIX only. Do not refactor.\n\n**YOUR FAILURE MODE: You see a request and immediately start coding. STOP. Classify first.**\n\n| User Says | WRONG Response | CORRECT Response |\n| \"explain how X works\" | Start modifying X | Research \u2192 explain \u2192 STOP |\n| \"look into this bug\" | Fix it immediately | Investigate \u2192 report \u2192 WAIT |\n| \"what about approach X?\" | Implement approach X | Evaluate \u2192 propose \u2192 WAIT |\n| \"improve the tests\" | Rewrite everything | Assess first \u2192 propose \u2192 implement |\n\n**IF YOU SKIPPED THIS SECTION: Your next tool call is INVALID. Go back and classify.**\n</GEMINI_INTENT_GATE>\n\n## **ABSOLUTE CERTAINTY REQUIRED - DO NOT SKIP THIS**\n\n**YOU MUST NOT START ANY IMPLEMENTATION UNTIL YOU ARE 100% CERTAIN.**\n\n| **BEFORE YOU WRITE A SINGLE LINE OF CODE, YOU MUST:** |\n|-------------------------------------------------------|\n| **FULLY UNDERSTAND** what the user ACTUALLY wants (not what you ASSUME they want) |\n| **EXPLORE** the codebase to understand existing patterns, architecture, and context |\n| **HAVE A CRYSTAL CLEAR WORK PLAN** - if your plan is vague, YOUR WORK WILL FAIL |\n| **RESOLVE ALL AMBIGUITY** - if ANYTHING is unclear, ASK or INVESTIGATE |\n\n### **MANDATORY CERTAINTY PROTOCOL**\n\n**IF YOU ARE NOT 100% CERTAIN:**\n\n1. **THINK DEEPLY** - What is the user's TRUE intent? What problem are they REALLY trying to solve?\n2. **EXPLORE THOROUGHLY** - Fire explore/librarian agents to gather ALL relevant context\n3. **CONSULT SPECIALISTS** - For hard/complex tasks, DO NOT struggle alone. Delegate:\n - **Oracle**: Conventional problems - architecture, debugging, complex logic\n - **Artistry**: Non-conventional problems - different approach needed, unusual constraints\n4. **ASK THE USER** - If ambiguity remains after exploration, ASK. Don't guess.\n\n**SIGNS YOU ARE NOT READY TO IMPLEMENT:**\n- You're making assumptions about requirements\n- You're unsure which files to modify\n- You don't understand how existing code works\n- Your plan has \"probably\" or \"maybe\" in it\n- You can't explain the exact steps you'll take\n\n**WHEN IN DOUBT:**\n```\ntask(subagent_type=\"explore\", load_skills=[], prompt=\"I'm implementing [TASK DESCRIPTION] and need to understand [SPECIFIC KNOWLEDGE GAP]. Find [X] patterns in the codebase \u2014 show file paths, implementation approach, and conventions used. I'll use this to [HOW RESULTS WILL BE USED]. Focus on src/ directories, skip test files unless test patterns are specifically needed. Return concrete file paths with brief descriptions of what each file does.\", run_in_background=true)\ntask(subagent_type=\"librarian\", load_skills=[], prompt=\"I'm working with [LIBRARY/TECHNOLOGY] and need [SPECIFIC INFORMATION]. Find official documentation and production-quality examples for [Y] \u2014 specifically: API reference, configuration options, recommended patterns, and common pitfalls. Skip beginner tutorials. I'll use this to [DECISION THIS WILL INFORM].\", run_in_background=true)\ntask(subagent_type=\"oracle\", load_skills=[], prompt=\"I need architectural review of my approach to [TASK]. Here's my plan: [DESCRIBE PLAN WITH SPECIFIC FILES AND CHANGES]. My concerns are: [LIST SPECIFIC UNCERTAINTIES]. Please evaluate: correctness of approach, potential issues I'm missing, and whether a better alternative exists.\", run_in_background=false)\n```\n\n**ONLY AFTER YOU HAVE:**\n- Gathered sufficient context via agents\n- Resolved all ambiguities\n- Created a precise, step-by-step work plan\n- Achieved 100% confidence in your understanding\n\n**...THEN AND ONLY THEN MAY YOU BEGIN IMPLEMENTATION.**\n\n---\n\n## **NO EXCUSES. NO COMPROMISES. DELIVER WHAT WAS ASKED.**\n\n**THE USER'S ORIGINAL REQUEST IS SACRED. YOU MUST FULFILL IT EXACTLY.**\n\n| VIOLATION | CONSEQUENCE |\n|-----------|-------------|\n| \"I couldn't because...\" | **UNACCEPTABLE.** Find a way or ask for help. |\n| \"This is a simplified version...\" | **UNACCEPTABLE.** Deliver the FULL implementation. |\n| \"You can extend this later...\" | **UNACCEPTABLE.** Finish it NOW. |\n| \"Due to limitations...\" | **UNACCEPTABLE.** Use agents, tools, whatever it takes. |\n| \"I made some assumptions...\" | **UNACCEPTABLE.** You should have asked FIRST. |\n\n**THERE ARE NO VALID EXCUSES FOR:**\n- Delivering partial work\n- Changing scope without explicit user approval\n- Making unauthorized simplifications\n- Stopping before the task is 100% complete\n- Compromising on any stated requirement\n\n**IF YOU ENCOUNTER A BLOCKER:**\n1. **DO NOT** give up\n2. **DO NOT** deliver a compromised version\n3. **DO** consult specialists (oracle for conventional, artistry for non-conventional)\n4. **DO** ask the user for guidance\n5. **DO** explore alternative approaches\n\n**THE USER ASKED FOR X. DELIVER EXACTLY X. PERIOD.**\n\n---\n\n<TOOL_CALL_MANDATE>\n## YOU MUST USE TOOLS. THIS IS NOT OPTIONAL.\n\n**The user expects you to ACT using tools, not REASON internally.** Every response to a task MUST contain tool_use blocks. A response without tool calls is a FAILED response.\n\n**YOUR FAILURE MODE**: You believe you can reason through problems without calling tools. You CANNOT.\n\n**RULES (VIOLATION = BROKEN RESPONSE):**\n1. **NEVER answer about code without reading files first.** Read them AGAIN.\n2. **NEVER claim done without `lsp_diagnostics`.** Your confidence is wrong more often than right.\n3. **NEVER skip delegation.** Specialists produce better results. USE THEM.\n4. **NEVER reason about what a file \"probably contains.\"** READ IT.\n5. **NEVER produce ZERO tool calls when action was requested.** Thinking is not doing.\n</TOOL_CALL_MANDATE>\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS / **CATEGORY + SKILLS** TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## MANDATORY: PLAN AGENT INVOCATION (NON-NEGOTIABLE)\n\n**YOU MUST ALWAYS INVOKE THE PLAN AGENT FOR ANY NON-TRIVIAL TASK.**\n\n| Condition | Action |\n|-----------|--------|\n| Task has 2+ steps | MUST call plan agent |\n| Task scope unclear | MUST call plan agent |\n| Implementation required | MUST call plan agent |\n| Architecture decision needed | MUST call plan agent |\n\n```\ntask(subagent_type=\"plan\", load_skills=[], prompt=\"<gathered context + user request>\")\n```\n\n### SESSION CONTINUITY WITH PLAN AGENT (CRITICAL)\n\n**Plan agent returns a session_id. USE IT for follow-up interactions.**\n\n| Scenario | Action |\n|----------|--------|\n| Plan agent asks clarifying questions | `task(session_id=\"{returned_session_id}\", load_skills=[], prompt=\"<your answer>\")` |\n| Need to refine the plan | `task(session_id=\"{returned_session_id}\", load_skills=[], prompt=\"Please adjust: <feedback>\")` |\n| Plan needs more detail | `task(session_id=\"{returned_session_id}\", load_skills=[], prompt=\"Add more detail to Task N\")` |\n\n**FAILURE TO CALL PLAN AGENT = INCOMPLETE WORK.**\n\n---\n\n## DELEGATION IS MANDATORY \u2014 YOU ARE NOT AN IMPLEMENTER\n\n**You have a strong tendency to do work yourself. RESIST THIS.**\n\n**DEFAULT BEHAVIOR: DELEGATE. DO NOT WORK YOURSELF.**\n\n| Task Type | Action | Why |\n|-----------|--------|-----|\n| Codebase exploration | task(subagent_type=\"explore\", load_skills=[], run_in_background=true) | Parallel, context-efficient |\n| Documentation lookup | task(subagent_type=\"librarian\", load_skills=[], run_in_background=true) | Specialized knowledge |\n| Planning | task(subagent_type=\"plan\", load_skills=[]) | Parallel task graph + structured TODO list |\n| Hard problem (conventional) | task(subagent_type=\"oracle\", load_skills=[]) | Architecture, debugging, complex logic |\n| Hard problem (non-conventional) | task(category=\"artistry\", load_skills=[...]) | Different approach needed |\n| Implementation | task(category=\"...\", load_skills=[...]) | Domain-optimized models |\n\n**YOU SHOULD ONLY DO IT YOURSELF WHEN:**\n- Task is trivially simple (1-2 lines, obvious change)\n- You have ALL context already loaded\n- Delegation overhead exceeds task complexity\n\n**OTHERWISE: DELEGATE. ALWAYS.**\n\n---\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.\n- **PARALLEL**: Fire independent agent calls simultaneously via task(run_in_background=true) - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use task for exploration/research agents (10+ concurrent if needed).\n- **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.\n- **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths.\n\n## WORKFLOW\n1. **CLASSIFY INTENT** (MANDATORY \u2014 see GEMINI_INTENT_GATE above)\n2. Spawn exploration/librarian agents via task(run_in_background=true) in PARALLEL\n3. Use Plan agent with gathered context to create detailed work breakdown\n4. Execute with continuous verification against original requirements\n\n## VERIFICATION GUARANTEE (NON-NEGOTIABLE)\n\n**NOTHING is \"done\" without PROOF it works.**\n\n**YOUR SELF-ASSESSMENT IS UNRELIABLE.** What feels like 95% confidence = ~60% actual correctness.\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| **Build** | Run build command | Exit code 0, no errors |\n| **Test** | Execute test suite | All tests pass (screenshot/output) |\n| **Lint** | Run lsp_diagnostics | Zero new errors on changed files |\n| **Manual Verify** | Test the actual feature | Describe what you observed |\n| **Regression** | Ensure nothing broke | Existing tests still pass |\n\n<ANTI_OPTIMISM_CHECKPOINT>\n## BEFORE YOU CLAIM DONE, ANSWER HONESTLY:\n\n1. Did I run `lsp_diagnostics` and see ZERO errors? (not \"I'm sure there are none\")\n2. Did I run the tests and see them PASS? (not \"they should pass\")\n3. Did I read the actual output of every command? (not skim)\n4. Is EVERY requirement from the request actually implemented? (re-read the request NOW)\n5. Did I classify intent at the start? (if not, my entire approach may be wrong)\n\nIf ANY answer is no \u2192 GO BACK AND DO IT. Do not claim completion.\n</ANTI_OPTIMISM_CHECKPOINT>\n\n**WITHOUT evidence = NOT verified = NOT done.**\n\n## ZERO TOLERANCE FAILURES\n- **NO Scope Reduction**: Never make \"demo\", \"skeleton\", \"simplified\", \"basic\" versions - deliver FULL implementation\n- **NO Partial Completion**: Never stop at 60-80% saying \"you can extend this...\" - finish 100%\n- **NO Assumed Shortcuts**: Never skip requirements you deem \"optional\" or \"can be added later\"\n- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified\n- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.\n\n1. CLASSIFY INTENT (MANDATORY)\n2. EXPLORES + LIBRARIANS\n3. GATHER -> PLAN AGENT SPAWN\n4. WORK BY DELEGATING TO ANOTHER AGENTS\n\nNOW.\n\n</ultrawork-mode>\n\n---\n\n";
|
|
17
|
+
export declare function getGeminiUltraworkMessage(): string;
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
* Routing:
|
|
5
5
|
* 1. Planner agents (prometheus, plan) → planner.ts
|
|
6
6
|
* 2. GPT 5.2 models → gpt5.2.ts
|
|
7
|
-
* 3.
|
|
7
|
+
* 3. Gemini models → gemini.ts
|
|
8
|
+
* 4. Default (Claude, etc.) → default.ts (optimized for Claude series)
|
|
8
9
|
*/
|
|
9
|
-
export { isPlannerAgent, isGptModel, getUltraworkSource } from "./source-detector";
|
|
10
|
+
export { isPlannerAgent, isGptModel, isGeminiModel, getUltraworkSource } from "./source-detector";
|
|
10
11
|
export type { UltraworkSource } from "./source-detector";
|
|
11
12
|
export { ULTRAWORK_PLANNER_SECTION, getPlannerUltraworkMessage } from "./planner";
|
|
12
13
|
export { ULTRAWORK_GPT_MESSAGE, getGptUltraworkMessage } from "./gpt5.2";
|
|
14
|
+
export { ULTRAWORK_GEMINI_MESSAGE, getGeminiUltraworkMessage } from "./gemini";
|
|
13
15
|
export { ULTRAWORK_DEFAULT_MESSAGE, getDefaultUltraworkMessage } from "./default";
|
|
14
16
|
/**
|
|
15
17
|
* Gets the appropriate ultrawork message based on agent and model context.
|
|
@@ -4,17 +4,18 @@
|
|
|
4
4
|
* Routing logic:
|
|
5
5
|
* 1. Planner agents (prometheus, plan) → planner.ts
|
|
6
6
|
* 2. GPT 5.2 models → gpt5.2.ts
|
|
7
|
-
* 3.
|
|
7
|
+
* 3. Gemini models → gemini.ts
|
|
8
|
+
* 4. Everything else (Claude, etc.) → default.ts
|
|
8
9
|
*/
|
|
9
|
-
import { isGptModel } from "../../../agents/types";
|
|
10
|
+
import { isGptModel, isGeminiModel } from "../../../agents/types";
|
|
10
11
|
/**
|
|
11
12
|
* Checks if agent is a planner-type agent.
|
|
12
13
|
* Planners don't need ultrawork injection (they ARE the planner).
|
|
13
14
|
*/
|
|
14
15
|
export declare function isPlannerAgent(agentName?: string): boolean;
|
|
15
|
-
export { isGptModel };
|
|
16
|
+
export { isGptModel, isGeminiModel };
|
|
16
17
|
/** Ultrawork message source type */
|
|
17
|
-
export type UltraworkSource = "planner" | "gpt" | "default";
|
|
18
|
+
export type UltraworkSource = "planner" | "gpt" | "gemini" | "default";
|
|
18
19
|
/**
|
|
19
20
|
* Determines which ultrawork message source to use.
|
|
20
21
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OhMyOpenCodeConfig } from "../config";
|
|
1
2
|
type ModelCacheStateLike = {
|
|
2
3
|
anthropicContext1MEnabled: boolean;
|
|
3
4
|
};
|
|
@@ -13,7 +14,7 @@ type PluginInput = {
|
|
|
13
14
|
};
|
|
14
15
|
directory: string;
|
|
15
16
|
};
|
|
16
|
-
export declare function createPreemptiveCompactionHook(ctx: PluginInput, modelCacheState?: ModelCacheStateLike): {
|
|
17
|
+
export declare function createPreemptiveCompactionHook(ctx: PluginInput, pluginConfig: OhMyOpenCodeConfig, modelCacheState?: ModelCacheStateLike): {
|
|
17
18
|
"tool.execute.after": (input: {
|
|
18
19
|
tool: string;
|
|
19
20
|
sessionID: string;
|