@loucompanion/forge-bridge 0.1.1-dev.895607f4402a → 0.1.1-dev.9219f8477b8a

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.
@@ -2,8 +2,11 @@ import type { RunOnceDispatchPacket, RunnerDispatchArtifact } from "./session.ty
2
2
  import type { WorktreeHandle } from "../worktree/worktree.types.js";
3
3
  export type DevelopCompletionPhase = "implementation" | "self_review" | "validation";
4
4
  export type DebugCompletionPhase = "debug_repro" | "debug_root_cause" | "debug_fix" | "debug_regression";
5
- export type CompletionPhase = DevelopCompletionPhase | "qa" | DebugCompletionPhase;
5
+ export type ArchitectCompletionPhase = "architect";
6
+ export type DraftCompletionPhase = "draft";
7
+ export type CompletionPhase = DevelopCompletionPhase | "qa" | DebugCompletionPhase | ArchitectCompletionPhase | DraftCompletionPhase;
6
8
  export type QaCompletionGate = "qa_plan" | "qa_regression" | "qa_api" | "qa_manual_web" | "qa_bug_repro" | "qa_findings" | "qa_verdict";
9
+ export type DraftCompletionGate = "draft_intent" | "draft_repo_context" | "draft_graph_context" | "draft_product_scope" | "draft_work_order_plan" | "draft_critic" | "draft_proposal";
7
10
  export interface CompletionToolRuntime {
8
11
  readonly serverName: string;
9
12
  readonly command: string;
@@ -28,6 +31,8 @@ export interface CompletionToolServerConfig {
28
31
  readonly developCycle?: boolean;
29
32
  readonly qaCycle?: boolean;
30
33
  readonly debugCycle?: boolean;
34
+ readonly architectCycle?: boolean;
35
+ readonly draftCycle?: boolean;
31
36
  }
32
37
  export interface CompletionToolCallResult {
33
38
  readonly content: readonly {
@@ -38,6 +43,7 @@ export interface CompletionToolCallResult {
38
43
  readonly gate: {
39
44
  readonly phase: CompletionPhase;
40
45
  readonly qaGate?: QaCompletionGate;
46
+ readonly draftGate?: DraftCompletionGate;
41
47
  readonly status: string;
42
48
  readonly allowed: boolean;
43
49
  readonly reason: string;
@@ -60,20 +66,25 @@ export interface CompletionArtifactReference {
60
66
  }
61
67
  export declare const debugCompletionPhaseOrder: readonly DebugCompletionPhase[];
62
68
  export declare const qaCompletionGateOrder: readonly QaCompletionGate[];
69
+ export declare const draftCompletionGateOrder: readonly DraftCompletionGate[];
63
70
  export declare function completionPhaseFromDispatch(dispatch: RunOnceDispatchPacket): CompletionPhase;
64
71
  export declare function normalizeCompletionPhase(value: string | null | undefined): CompletionPhase;
65
72
  export declare function usesDevelopCycleCompletion(dispatch: RunOnceDispatchPacket): boolean;
66
73
  export declare function usesQaCycleCompletion(dispatch: RunOnceDispatchPacket): boolean;
67
74
  export declare function usesDebugCycleCompletion(dispatch: RunOnceDispatchPacket): boolean;
75
+ export declare function usesArchitectCycleCompletion(dispatch: RunOnceDispatchPacket): boolean;
68
76
  export declare function completionToolNamesForPhase(phase: CompletionPhase): readonly string[];
69
77
  export declare function completionToolNamesForQaGate(gate: QaCompletionGate): readonly string[];
70
78
  export declare function completionToolNamesForDebugGate(gate: DebugCompletionPhase): readonly string[];
79
+ export declare function completionToolNamesForDraftGate(gate: DraftCompletionGate): readonly string[];
71
80
  export declare function expectedCompletionToolName(phase: CompletionPhase): string;
72
81
  export declare function expectedQaCompletionToolName(gate: QaCompletionGate): string;
73
82
  export declare function expectedDebugCompletionToolName(gate: DebugCompletionPhase): string;
83
+ export declare function expectedDraftCompletionToolName(gate: DraftCompletionGate): string;
74
84
  export declare function artifactRootFor(worktreePath: string, workItemId: string): string;
75
- export declare function completionArtifactJsonPath(worktreePath: string, workItemId: string, phase: CompletionPhase): string;
76
- export declare function completionArtifactReportPath(worktreePath: string, workItemId: string, phase: CompletionPhase): string;
85
+ export declare function artifactRootForOwner(worktreePath: string, ownerType: string, ownerId: string): string;
86
+ export declare function completionArtifactJsonPath(worktreePath: string, workItemId: string, phase: CompletionPhase, ownerType?: string | null, ownerId?: string | null): string;
87
+ export declare function completionArtifactReportPath(worktreePath: string, workItemId: string, phase: CompletionPhase, ownerType?: string | null, ownerId?: string | null): string;
77
88
  export declare function prepareCompletionToolRuntime(options: CompletionToolRuntimeOptions): Promise<CompletionToolRuntime>;
78
89
  export declare function buildCompletionToolServerArgs(config: CompletionToolServerConfig): readonly string[];
79
90
  export declare function codexMcpConfigArgs(runtime: CompletionToolRuntime): readonly string[];
@@ -81,25 +92,29 @@ export declare function cursorMcpServerConfig(runtime: CompletionToolRuntime): u
81
92
  export declare function completionPromptForPhase(phase: CompletionPhase): string;
82
93
  export declare function completionPromptForDevelopCycle(phase: CompletionPhase): string;
83
94
  export declare function completionPromptForQaCycle(currentGate?: QaCompletionGate): string;
95
+ export declare function completionPromptForDraftCycle(currentGate?: DraftCompletionGate): string;
84
96
  export declare function completionPromptForDebugCycle(currentGate?: DebugCompletionPhase): string;
85
97
  export declare function completionToolNamesForServer(config: CompletionToolServerConfig): readonly string[];
86
98
  export declare class CompletionToolServerSession {
87
99
  private readonly config;
88
100
  private currentPhase;
89
101
  private currentQaGate;
102
+ private currentDraftGate;
90
103
  private completed;
91
104
  constructor(config: CompletionToolServerConfig);
92
105
  get instructions(): string;
93
106
  toolDefinitions(): readonly unknown[];
94
107
  callTool(toolName: string, input: unknown): Promise<CompletionToolCallResult>;
108
+ private callDraftGateTool;
95
109
  private callDebugGateTool;
96
110
  private callQaGateTool;
97
111
  private advanceAfterPass;
112
+ private advanceAfterDraftGate;
98
113
  private advanceAfterQaGate;
99
114
  private advanceAfterDebugGate;
100
115
  }
101
116
  export declare function writeCompletionArtifact(config: CompletionToolServerConfig, toolName: string, input: unknown): Promise<CompletionArtifactReference>;
102
- export declare function readCompletionArtifact(worktreePath: string, workItemId: string, phase: CompletionPhase): Promise<RunnerDispatchArtifact | null>;
117
+ export declare function readCompletionArtifact(worktreePath: string, workItemId: string, phase: CompletionPhase, ownerType?: string | null, ownerId?: string | null): Promise<RunnerDispatchArtifact | null>;
103
118
  export declare function runCompletionMcpServer(config: CompletionToolServerConfig): Promise<void>;
104
119
  export declare function parseCompletionMcpArgs(argv: readonly string[]): {
105
120
  readonly ok: true;