oh-my-claudecode-opencode 0.1.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.
Files changed (48) hide show
  1. package/README.md +361 -0
  2. package/assets/AGENTS.md +357 -0
  3. package/assets/omco.example.json +34 -0
  4. package/assets/omco.schema.json +375 -0
  5. package/dist/agents/index.d.ts +139 -0
  6. package/dist/config/index.d.ts +179 -0
  7. package/dist/config/model-resolver.d.ts +46 -0
  8. package/dist/hooks/agent-usage-reminder.d.ts +12 -0
  9. package/dist/hooks/autopilot.d.ts +32 -0
  10. package/dist/hooks/context-recovery.d.ts +15 -0
  11. package/dist/hooks/continuation-messages.d.ts +24 -0
  12. package/dist/hooks/edit-error-recovery.d.ts +33 -0
  13. package/dist/hooks/index.d.ts +23 -0
  14. package/dist/hooks/keyword-detector.d.ts +23 -0
  15. package/dist/hooks/notepad.d.ts +109 -0
  16. package/dist/hooks/omc-orchestrator.d.ts +14 -0
  17. package/dist/hooks/persistent-mode.d.ts +60 -0
  18. package/dist/hooks/ralph-loop.d.ts +37 -0
  19. package/dist/hooks/ralph-verifier.d.ts +22 -0
  20. package/dist/hooks/remember-tag-processor.d.ts +47 -0
  21. package/dist/hooks/session-recovery.d.ts +10 -0
  22. package/dist/hooks/skill-injector.d.ts +16 -0
  23. package/dist/hooks/system-prompt-injector.d.ts +24 -0
  24. package/dist/hooks/todo-continuation-enforcer.d.ts +21 -0
  25. package/dist/hooks/tui-status.d.ts +72 -0
  26. package/dist/hooks/ultraqa-loop.d.ts +38 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.js +31047 -0
  29. package/dist/plugin-handlers/config-handler.d.ts +35 -0
  30. package/dist/plugin-handlers/index.d.ts +1 -0
  31. package/dist/prd/index.d.ts +2 -0
  32. package/dist/prd/prd-manager.d.ts +34 -0
  33. package/dist/prd/progress-tracker.d.ts +22 -0
  34. package/dist/prompts/ultrawork.d.ts +3 -0
  35. package/dist/shared/logger.d.ts +3 -0
  36. package/dist/shared/session-state.d.ts +5 -0
  37. package/dist/state/autopilot-state.d.ts +30 -0
  38. package/dist/state/index.d.ts +5 -0
  39. package/dist/state/ralph-state.d.ts +18 -0
  40. package/dist/state/ultraqa-state.d.ts +34 -0
  41. package/dist/state/ultrawork-state.d.ts +13 -0
  42. package/dist/state/verification-state.d.ts +15 -0
  43. package/dist/tools/background-manager.d.ts +22 -0
  44. package/dist/tools/background-tools.d.ts +3 -0
  45. package/dist/tools/builtin.d.ts +1 -0
  46. package/dist/tools/call-omo-agent.d.ts +3 -0
  47. package/dist/tools/index.d.ts +4 -0
  48. package/package.json +63 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Remember Tag Processor Hook
3
+ *
4
+ * Processes <remember> tags from Task agent output.
5
+ * Saves to .omc/notepad.md for compaction-resilient memory.
6
+ *
7
+ * Based on oh-my-claude-sisyphus post-tool-use hook.
8
+ *
9
+ * Tag formats:
10
+ * - <remember>content</remember> → Working Memory (auto-pruned after 7 days)
11
+ * - <remember priority>content</remember> → Priority Context (always loaded)
12
+ */
13
+ import type { PluginInput } from "@opencode-ai/plugin";
14
+ export interface RememberTagProcessorOptions {
15
+ /** Only process tags from Task tool output */
16
+ taskToolOnly?: boolean;
17
+ /** Tools to process (if not taskToolOnly) */
18
+ toolNames?: string[];
19
+ }
20
+ /**
21
+ * Create the Remember Tag Processor hook
22
+ */
23
+ export declare function createRememberTagProcessor(ctx: PluginInput, options?: RememberTagProcessorOptions): {
24
+ /**
25
+ * Process tool output for <remember> tags
26
+ */
27
+ "tool.execute.after": (input: {
28
+ tool: string;
29
+ sessionID: string;
30
+ callID: string;
31
+ }, output: {
32
+ title: string;
33
+ output: string;
34
+ metadata: unknown;
35
+ }) => Promise<void>;
36
+ };
37
+ /**
38
+ * Extract and process remember tags from arbitrary content
39
+ */
40
+ export declare function extractRememberTags(content: string): {
41
+ priority: string[];
42
+ working: string[];
43
+ };
44
+ /**
45
+ * Format remember tags for output
46
+ */
47
+ export declare function formatRememberTag(content: string, priority?: boolean): string;
@@ -0,0 +1,10 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createSessionRecoveryHook(ctx: PluginInput): {
3
+ setOnAbortCallback: (cb: (sessionID: string) => void) => void;
4
+ setOnRecoveryCompleteCallback: (cb: (sessionID: string) => void) => void;
5
+ isRecoverableError: (error: unknown) => boolean;
6
+ handleSessionRecovery: (messageInfo: {
7
+ sessionID?: string;
8
+ error?: unknown;
9
+ }) => Promise<boolean>;
10
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Skill Injector Hook
3
+ *
4
+ * Automatically detects context and injects skill prompts.
5
+ */
6
+ import type { PluginInput } from "@opencode-ai/plugin";
7
+ export interface SkillInjection {
8
+ skill: "frontend-ui-ux" | "git-master" | null;
9
+ prompt: string | null;
10
+ }
11
+ export declare function createSkillInjector(_ctx: PluginInput): {
12
+ /**
13
+ * Detect context and return appropriate skill injection
14
+ */
15
+ detectAndInject(sessionID: string, messageText: string): SkillInjection;
16
+ };
@@ -0,0 +1,24 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { SkillInjection } from "./skill-injector";
3
+ export type ActiveMode = "ultrawork" | "ralph-loop" | "ultrawork-ralph" | null;
4
+ interface ModeState {
5
+ mode: ActiveMode;
6
+ sessionID: string;
7
+ startedAt: number;
8
+ task?: string;
9
+ }
10
+ export declare function createSystemPromptInjector(_ctx: PluginInput): {
11
+ setMode: (sessionID: string, mode: ActiveMode, task?: string) => void;
12
+ getMode: (sessionID: string) => ModeState | undefined;
13
+ clearMode: (sessionID: string) => void;
14
+ getSystemPromptForMode: (mode: ActiveMode) => string | null;
15
+ setSkillInjection: (sessionID: string, injection: SkillInjection) => void;
16
+ getSkillInjection: (sessionID: string) => SkillInjection | undefined;
17
+ clearSkillInjection: (sessionID: string) => void;
18
+ "experimental.chat.system.transform": (input: {
19
+ sessionID: string;
20
+ }, output: {
21
+ system: string[];
22
+ }) => Promise<void>;
23
+ };
24
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { BackgroundManager } from "../tools/background-manager";
3
+ export interface TodoContinuationEnforcerOptions {
4
+ backgroundManager?: BackgroundManager;
5
+ /** Countdown seconds before resuming (default: 2) */
6
+ countdownSeconds?: number;
7
+ /** Skip countdown if completion percentage is above this threshold */
8
+ skipCountdownAbovePercent?: number;
9
+ /** Vary countdown based on task complexity */
10
+ adaptiveCountdown?: boolean;
11
+ }
12
+ export declare function createTodoContinuationEnforcer(ctx: PluginInput, options?: TodoContinuationEnforcerOptions): {
13
+ handler: ({ event }: {
14
+ event: {
15
+ type: string;
16
+ properties?: unknown;
17
+ };
18
+ }) => Promise<void>;
19
+ markRecovering: (sessionID: string) => void;
20
+ markRecoveryComplete: (sessionID: string) => void;
21
+ };
@@ -0,0 +1,72 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export interface TuiStatusOptions {
3
+ enabled?: boolean;
4
+ showAgentNotifications?: boolean;
5
+ showModeChanges?: boolean;
6
+ toastDuration?: number;
7
+ trackMetrics?: boolean;
8
+ }
9
+ type ToastVariant = "info" | "success" | "warning" | "error";
10
+ interface ToastOptions {
11
+ title?: string;
12
+ message: string;
13
+ variant: ToastVariant;
14
+ duration?: number;
15
+ }
16
+ interface AgentStatus {
17
+ name: string;
18
+ status: "running" | "completed" | "failed";
19
+ startTime: number;
20
+ endTime?: number;
21
+ task?: string;
22
+ callID?: string;
23
+ }
24
+ interface AgentMetrics {
25
+ totalCalls: number;
26
+ successCount: number;
27
+ failureCount: number;
28
+ totalDurationMs: number;
29
+ avgDurationMs: number;
30
+ minDurationMs: number;
31
+ maxDurationMs: number;
32
+ lastCallTime: number;
33
+ }
34
+ interface SessionMetrics {
35
+ sessionStartTime: number;
36
+ totalAgentCalls: number;
37
+ totalSuccesses: number;
38
+ totalFailures: number;
39
+ agentMetrics: Map<string, AgentMetrics>;
40
+ }
41
+ export declare function createTuiStatusHook(ctx: PluginInput, options?: TuiStatusOptions): {
42
+ showToast: (opts: ToastOptions) => Promise<void>;
43
+ notifyAgentStarted: (agentName: string, task?: string, callID?: string) => Promise<void>;
44
+ notifyAgentCompleted: (agentName: string, success?: boolean, callID?: string) => Promise<void>;
45
+ notifyModeChange: (mode: string, active: boolean) => Promise<void>;
46
+ notifyPhaseChange: (phase: string, current: number, total: number) => Promise<void>;
47
+ notifyIteration: (mode: string, current: number, max: number) => Promise<void>;
48
+ getActiveAgents: () => AgentStatus[];
49
+ getMetrics: () => {
50
+ session: Omit<SessionMetrics, "agentMetrics">;
51
+ agents: Record<string, AgentMetrics>;
52
+ };
53
+ getMetricsSummary: () => string;
54
+ resetMetrics: () => void;
55
+ "tool.execute.before": (input: {
56
+ tool: string;
57
+ sessionID: string;
58
+ callID: string;
59
+ }, output: {
60
+ args: Record<string, unknown>;
61
+ }) => Promise<void>;
62
+ "tool.execute.after": (input: {
63
+ tool: string;
64
+ sessionID: string;
65
+ callID: string;
66
+ }, output: {
67
+ title: string;
68
+ output: string;
69
+ metadata: any;
70
+ }) => Promise<void>;
71
+ };
72
+ export {};
@@ -0,0 +1,38 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import { type UltraQAState } from "../state/ultraqa-state";
3
+ export interface UltraQALoopOptions {
4
+ config?: {
5
+ enabled?: boolean;
6
+ maxIterations?: number;
7
+ buildCommand?: string;
8
+ testCommand?: string;
9
+ lintCommand?: string;
10
+ };
11
+ onCycleComplete?: (sessionId: string, state: UltraQAState) => void;
12
+ }
13
+ export declare function createUltraQALoopHook(ctx: PluginInput, options?: UltraQALoopOptions): {
14
+ startUltraQA: (sessionId: string, goal: string) => void;
15
+ cancelUltraQA: (sessionId: string) => void;
16
+ updateCycle: (sessionId: string, results: {
17
+ build?: "pass" | "fail";
18
+ lint?: "pass" | "fail";
19
+ test?: "pass" | "fail";
20
+ }) => void;
21
+ getState: (sessionId: string) => UltraQAState | undefined;
22
+ isActive: (sessionId: string) => boolean;
23
+ getQAPrompt: (state: UltraQAState) => string;
24
+ "chat.message": (input: {
25
+ sessionID: string;
26
+ }, output: {
27
+ parts: Array<{
28
+ type: string;
29
+ text?: string;
30
+ }>;
31
+ }) => Promise<void>;
32
+ event: (input: {
33
+ event: {
34
+ type: string;
35
+ properties?: unknown;
36
+ };
37
+ }) => Promise<void>;
38
+ };
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from "@opencode-ai/plugin";
2
+ declare const OmoOmcsPlugin: Plugin;
3
+ export default OmoOmcsPlugin;