@reinamaccredy/oh-my-opencode 3.0.0-beta.15 → 3.0.0-beta.16

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 (47) hide show
  1. package/dist/cli/config-manager.d.ts +3 -3
  2. package/dist/cli/index.js +156 -349
  3. package/dist/cli/types.d.ts +0 -1
  4. package/dist/config/index.d.ts +2 -2
  5. package/dist/config/schema.d.ts +215 -181
  6. package/dist/features/boulder-state/index.d.ts +1 -0
  7. package/dist/features/boulder-state/unified-state.d.ts +86 -0
  8. package/dist/features/workflow-engine/contracts/v1/types.d.ts +9 -0
  9. package/dist/hooks/index.d.ts +2 -0
  10. package/dist/hooks/maestro-sisyphus-bridge/constants.d.ts +9 -0
  11. package/dist/hooks/maestro-sisyphus-bridge/index.d.ts +53 -0
  12. package/dist/hooks/tdd-enforcement/constants.d.ts +16 -0
  13. package/dist/hooks/tdd-enforcement/index.d.ts +54 -0
  14. package/dist/index.js +1578 -4807
  15. package/package.json +2 -6
  16. package/dist/auth/antigravity/accounts.d.ts +0 -40
  17. package/dist/auth/antigravity/accounts.test.d.ts +0 -1
  18. package/dist/auth/antigravity/browser.d.ts +0 -27
  19. package/dist/auth/antigravity/browser.test.d.ts +0 -1
  20. package/dist/auth/antigravity/cli.d.ts +0 -2
  21. package/dist/auth/antigravity/cli.test.d.ts +0 -1
  22. package/dist/auth/antigravity/constants.d.ts +0 -98
  23. package/dist/auth/antigravity/constants.test.d.ts +0 -1
  24. package/dist/auth/antigravity/fetch.d.ts +0 -69
  25. package/dist/auth/antigravity/index.d.ts +0 -13
  26. package/dist/auth/antigravity/integration.test.d.ts +0 -10
  27. package/dist/auth/antigravity/message-converter.d.ts +0 -54
  28. package/dist/auth/antigravity/oauth.d.ts +0 -51
  29. package/dist/auth/antigravity/oauth.test.d.ts +0 -1
  30. package/dist/auth/antigravity/plugin.d.ts +0 -54
  31. package/dist/auth/antigravity/project.d.ts +0 -10
  32. package/dist/auth/antigravity/request.d.ts +0 -116
  33. package/dist/auth/antigravity/request.test.d.ts +0 -1
  34. package/dist/auth/antigravity/response.d.ts +0 -137
  35. package/dist/auth/antigravity/storage.d.ts +0 -5
  36. package/dist/auth/antigravity/storage.test.d.ts +0 -1
  37. package/dist/auth/antigravity/thinking.d.ts +0 -278
  38. package/dist/auth/antigravity/thinking.test.d.ts +0 -10
  39. package/dist/auth/antigravity/thought-signature-store.d.ts +0 -52
  40. package/dist/auth/antigravity/token.d.ts +0 -38
  41. package/dist/auth/antigravity/token.test.d.ts +0 -1
  42. package/dist/auth/antigravity/tools.d.ts +0 -119
  43. package/dist/auth/antigravity/types.d.ts +0 -229
  44. package/dist/cli/commands/auth.d.ts +0 -2
  45. package/dist/cli/config-manager.test.d.ts +0 -1
  46. package/dist/google-auth.d.ts +0 -3
  47. package/dist/google-auth.js +0 -3871
@@ -1,3 +1,4 @@
1
1
  export * from "./types";
2
2
  export * from "./constants";
3
3
  export * from "./storage";
4
+ export * from "./unified-state";
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Unified Workflow State
3
+ *
4
+ * Merges boulder.json (Sisyphus), conductor tracks (Maestro), and design phases
5
+ * into a single unified state for seamless Maestro-Sisyphus integration.
6
+ */
7
+ /**
8
+ * Unified workflow state combining boulder, conductor, and design phases
9
+ */
10
+ export interface UnifiedWorkflowState {
11
+ /** Version for migration support */
12
+ version: "1.0.0";
13
+ /** Boulder state (Sisyphus plan tracking) */
14
+ boulder: {
15
+ activePlan: string | null;
16
+ planName: string | null;
17
+ startedAt: string | null;
18
+ sessionIds: string[];
19
+ };
20
+ /** Plan progress */
21
+ progress: {
22
+ total: number;
23
+ completed: number;
24
+ inProgress: number;
25
+ blocked: number;
26
+ isComplete: boolean;
27
+ percentage: number;
28
+ };
29
+ /** Maestro design phase state */
30
+ designPhase: {
31
+ currentPhase: number | null;
32
+ mode: "speed" | "ask" | "full" | null;
33
+ complexityScore: number | null;
34
+ oracleApproved: boolean | null;
35
+ };
36
+ /** Conductor tracks (for parallel execution) */
37
+ tracks: Array<{
38
+ id: string;
39
+ name: string;
40
+ phase: "design" | "planning" | "ready" | "executing" | "completed";
41
+ taskCount: number;
42
+ completedCount: number;
43
+ }>;
44
+ /** TDD state (for enforcement) */
45
+ tdd: {
46
+ currentCycle: "red" | "green" | "refactor" | null;
47
+ lastTestRun: string | null;
48
+ testsPassing: boolean | null;
49
+ failingTestName: string | null;
50
+ };
51
+ /** Timestamps */
52
+ createdAt: string;
53
+ updatedAt: string;
54
+ }
55
+ /**
56
+ * Get the unified state file path
57
+ */
58
+ export declare function getUnifiedStateFilePath(directory: string): string;
59
+ /**
60
+ * Read unified workflow state
61
+ */
62
+ export declare function readUnifiedState(directory: string): UnifiedWorkflowState | null;
63
+ /**
64
+ * Write unified workflow state
65
+ */
66
+ export declare function writeUnifiedState(directory: string, state: UnifiedWorkflowState): boolean;
67
+ /**
68
+ * Create empty unified state
69
+ */
70
+ export declare function createEmptyUnifiedState(): UnifiedWorkflowState;
71
+ /**
72
+ * Update design phase in unified state
73
+ */
74
+ export declare function updateDesignPhase(directory: string, phase: number, mode?: "speed" | "ask" | "full"): boolean;
75
+ /**
76
+ * Update TDD cycle state
77
+ */
78
+ export declare function updateTddState(directory: string, cycle: "red" | "green" | "refactor", testsPassing?: boolean, failingTestName?: string): boolean;
79
+ /**
80
+ * Update progress in unified state
81
+ */
82
+ export declare function updateProgress(directory: string, progress: Partial<UnifiedWorkflowState["progress"]>): boolean;
83
+ /**
84
+ * Start a new workflow from a plan
85
+ */
86
+ export declare function startWorkflow(directory: string, planPath: string, sessionId: string): UnifiedWorkflowState;
@@ -295,6 +295,11 @@ export type WorkflowEvent = {
295
295
  } | {
296
296
  type: "plan:updated";
297
297
  plan: WorkflowPlan;
298
+ } | {
299
+ type: "plan:ready";
300
+ planPath: string;
301
+ planName: string;
302
+ autoExecute?: boolean;
298
303
  } | {
299
304
  type: "task:created";
300
305
  task: WorkflowTask;
@@ -327,6 +332,10 @@ export type WorkflowEvent = {
327
332
  type: "execution:completed";
328
333
  success: boolean;
329
334
  summary?: string;
335
+ } | {
336
+ type: "execution:requested";
337
+ planPath: string;
338
+ triggeredBy: "maestro" | "prometheus" | "manual";
330
339
  } | {
331
340
  type: "handoff:created";
332
341
  payload: HandoffPayload;
@@ -29,3 +29,5 @@ export { createTaskResumeInfoHook } from "./task-resume-info";
29
29
  export { createStartWorkHook } from "./start-work";
30
30
  export { createSisyphusOrchestratorHook } from "./sisyphus-orchestrator";
31
31
  export { createMaestroModeDetectorHook, MAESTRO_HOOK_NAME } from "../features/maestro/hooks";
32
+ export { createMaestroSisyphusBridgeHook } from "./maestro-sisyphus-bridge";
33
+ export { createTddEnforcementHook } from "./tdd-enforcement";
@@ -0,0 +1,9 @@
1
+ export declare const HOOK_NAME = "maestro-sisyphus-bridge";
2
+ export declare const PLAN_READY_PROMPT = "\n## Plan Ready for Execution\n\nA new work plan has been created by Prometheus:\n- **Plan**: $PLAN_NAME\n- **Path**: $PLAN_PATH\n\nWould you like to start execution now? \n- Type \"yes\" or \"start\" to begin Sisyphus execution\n- Type \"no\" to review the plan first\n\n[Auto-execution can be enabled in config: maestro.autoExecute: true]\n";
3
+ export declare const AUTO_EXECUTE_PROMPT = "\n## Plan Ready - Auto-Executing\n\nA new work plan has been created by Prometheus:\n- **Plan**: $PLAN_NAME\n- **Path**: $PLAN_PATH\n\n**Auto-execution is enabled (maestro.autoExecute: true)**\n\nStarting Sisyphus execution automatically...\n\nRun /start-work now to begin executing the plan.\n";
4
+ export declare const DESIGN_PHASE_CONTEXT = "\n## Current Maestro Design Phase\n\nYou are operating within a Maestro workflow at **Phase $PHASE/10**:\n| Phase | Name | Status |\n|-------|------|--------|\n| 1 | DISCOVER (Diverge) | $P1 |\n| 2 | DEFINE (Converge) | $P2 |\n| 3 | DEVELOP (Diverge) | $P3 |\n| 4 | VERIFY (Oracle) | $P4 |\n| 5 | DECOMPOSE (Beads) | $P5 |\n| 6 | VALIDATE (Dependencies) | $P6 |\n| 7 | ASSIGN (Tracks) | $P7 |\n| 8 | READY (Handoff) | $P8 |\n| 9 | EXECUTE (Implementation) | $P9 |\n| 10 | FINISH (Archive) | $P10 |\n\nRespect the current phase constraints. Do not skip ahead.\n";
5
+ export declare const TDD_GATE_MESSAGES: {
6
+ RED_NO_FAILING_TEST: string;
7
+ GREEN_TEST_NOT_PASSING: string;
8
+ REFACTOR_TESTS_FAILED: string;
9
+ };
@@ -0,0 +1,53 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { MaestroConfig } from "../../config/schema";
3
+ export * from "./constants";
4
+ interface BridgeHookInput {
5
+ sessionID: string;
6
+ messageID?: string;
7
+ }
8
+ interface BridgeHookOutput {
9
+ parts: Array<{
10
+ type: string;
11
+ text?: string;
12
+ }>;
13
+ messages?: Array<{
14
+ role: string;
15
+ content: string;
16
+ }>;
17
+ }
18
+ interface WorkflowProgress {
19
+ planPath: string;
20
+ planName: string;
21
+ totalTasks: number;
22
+ completedTasks: number;
23
+ currentTask?: string;
24
+ phase: number;
25
+ lastUpdated: string;
26
+ }
27
+ export declare function getWorkflowProgress(): WorkflowProgress | null;
28
+ export declare function updateWorkflowProgress(update: Partial<WorkflowProgress>): void;
29
+ export declare function createMaestroSisyphusBridgeHook(ctx: PluginInput, maestroConfig?: MaestroConfig): {
30
+ /**
31
+ * Inject plan ready notification into chat
32
+ */
33
+ "chat.message": (input: BridgeHookInput, output: BridgeHookOutput) => Promise<void>;
34
+ /**
35
+ * Track design phase changes and task progress (bidirectional events)
36
+ */
37
+ "tool.execute.after": (input: {
38
+ tool: string;
39
+ sessionID: string;
40
+ }, output: {
41
+ result?: unknown;
42
+ message?: string;
43
+ }) => Promise<void>;
44
+ /**
45
+ * Inject design phase context into Sisyphus agent prompts
46
+ */
47
+ "agent.prompt.before": (input: {
48
+ agentName: string;
49
+ sessionID: string;
50
+ }, output: {
51
+ systemPrompt?: string;
52
+ }) => Promise<void>;
53
+ };
@@ -0,0 +1,16 @@
1
+ export declare const HOOK_NAME = "tdd-enforcement";
2
+ export declare const TDD_PHASES: {
3
+ readonly RED: "red";
4
+ readonly GREEN: "green";
5
+ readonly REFACTOR: "refactor";
6
+ };
7
+ export type TddPhase = typeof TDD_PHASES[keyof typeof TDD_PHASES];
8
+ export declare const TDD_GATE_PROMPTS: {
9
+ RED_REQUIRES_FAILING_TEST: string;
10
+ GREEN_REQUIRES_PASSING_TEST: string;
11
+ REFACTOR_REQUIRES_GREEN_TESTS: string;
12
+ BLOCK_IMPLEMENTATION_NO_TEST: string;
13
+ BLOCK_REFACTOR_TESTS_FAILING: string;
14
+ };
15
+ export declare const IMPLEMENTATION_INDICATORS: string[];
16
+ export declare const TEST_FILE_PATTERNS: string[];
@@ -0,0 +1,54 @@
1
+ /**
2
+ * TDD Enforcement Hook
3
+ *
4
+ * Engine-level TDD gate that enforces RED-GREEN-REFACTOR cycle
5
+ * when maestro.enforceTdd is enabled.
6
+ */
7
+ import type { PluginInput } from "@opencode-ai/plugin";
8
+ import type { MaestroConfig } from "../../config/schema";
9
+ export * from "./constants";
10
+ interface TddHookInput {
11
+ tool: string;
12
+ sessionID: string;
13
+ callID: string;
14
+ }
15
+ interface TddHookOutput {
16
+ args: Record<string, unknown>;
17
+ message?: string;
18
+ blocked?: boolean;
19
+ }
20
+ export declare function createTddEnforcementHook(ctx: PluginInput, maestroConfig?: MaestroConfig): {
21
+ /**
22
+ * Pre-tool hook to enforce TDD gates
23
+ */
24
+ "tool.execute.before"?: undefined;
25
+ /**
26
+ * Post-tool hook to track test results
27
+ */
28
+ "tool.execute.after"?: undefined;
29
+ /**
30
+ * Inject TDD context into agent prompts
31
+ */
32
+ "agent.prompt.before"?: undefined;
33
+ } | {
34
+ /**
35
+ * Pre-tool hook to enforce TDD gates
36
+ */
37
+ "tool.execute.before": (input: TddHookInput, output: TddHookOutput) => Promise<void>;
38
+ /**
39
+ * Post-tool hook to track test results
40
+ */
41
+ "tool.execute.after": (input: TddHookInput, output: {
42
+ result?: unknown;
43
+ message?: string;
44
+ }) => Promise<void>;
45
+ /**
46
+ * Inject TDD context into agent prompts
47
+ */
48
+ "agent.prompt.before": (input: {
49
+ agentName: string;
50
+ sessionID: string;
51
+ }, output: {
52
+ systemPrompt?: string;
53
+ }) => Promise<void>;
54
+ };