@loucompanion/forge-bridge 0.1.1-dev.cada6731ecc7 → 0.1.1-dev.d71662695396
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/session/phase-completion.d.ts +12 -1
- package/dist/session/phase-completion.js +482 -22
- package/dist/session/provider-cli/provider-cli.service.d.ts +7 -0
- package/dist/session/provider-cli/provider-cli.service.js +296 -24
- package/dist/session/session.types.d.ts +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worktree/artifact-injector.js +39 -0
- package/package.json +1 -1
|
@@ -3,8 +3,10 @@ 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
5
|
export type ArchitectCompletionPhase = "architect";
|
|
6
|
-
export type
|
|
6
|
+
export type DraftCompletionPhase = "draft";
|
|
7
|
+
export type CompletionPhase = DevelopCompletionPhase | "qa" | DebugCompletionPhase | ArchitectCompletionPhase | DraftCompletionPhase;
|
|
7
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";
|
|
8
10
|
export interface CompletionToolRuntime {
|
|
9
11
|
readonly serverName: string;
|
|
10
12
|
readonly command: string;
|
|
@@ -30,6 +32,7 @@ export interface CompletionToolServerConfig {
|
|
|
30
32
|
readonly qaCycle?: boolean;
|
|
31
33
|
readonly debugCycle?: boolean;
|
|
32
34
|
readonly architectCycle?: boolean;
|
|
35
|
+
readonly draftCycle?: boolean;
|
|
33
36
|
}
|
|
34
37
|
export interface CompletionToolCallResult {
|
|
35
38
|
readonly content: readonly {
|
|
@@ -40,6 +43,7 @@ export interface CompletionToolCallResult {
|
|
|
40
43
|
readonly gate: {
|
|
41
44
|
readonly phase: CompletionPhase;
|
|
42
45
|
readonly qaGate?: QaCompletionGate;
|
|
46
|
+
readonly draftGate?: DraftCompletionGate;
|
|
43
47
|
readonly status: string;
|
|
44
48
|
readonly allowed: boolean;
|
|
45
49
|
readonly reason: string;
|
|
@@ -62,6 +66,7 @@ export interface CompletionArtifactReference {
|
|
|
62
66
|
}
|
|
63
67
|
export declare const debugCompletionPhaseOrder: readonly DebugCompletionPhase[];
|
|
64
68
|
export declare const qaCompletionGateOrder: readonly QaCompletionGate[];
|
|
69
|
+
export declare const draftCompletionGateOrder: readonly DraftCompletionGate[];
|
|
65
70
|
export declare function completionPhaseFromDispatch(dispatch: RunOnceDispatchPacket): CompletionPhase;
|
|
66
71
|
export declare function normalizeCompletionPhase(value: string | null | undefined): CompletionPhase;
|
|
67
72
|
export declare function usesDevelopCycleCompletion(dispatch: RunOnceDispatchPacket): boolean;
|
|
@@ -71,9 +76,11 @@ export declare function usesArchitectCycleCompletion(dispatch: RunOnceDispatchPa
|
|
|
71
76
|
export declare function completionToolNamesForPhase(phase: CompletionPhase): readonly string[];
|
|
72
77
|
export declare function completionToolNamesForQaGate(gate: QaCompletionGate): readonly string[];
|
|
73
78
|
export declare function completionToolNamesForDebugGate(gate: DebugCompletionPhase): readonly string[];
|
|
79
|
+
export declare function completionToolNamesForDraftGate(gate: DraftCompletionGate): readonly string[];
|
|
74
80
|
export declare function expectedCompletionToolName(phase: CompletionPhase): string;
|
|
75
81
|
export declare function expectedQaCompletionToolName(gate: QaCompletionGate): string;
|
|
76
82
|
export declare function expectedDebugCompletionToolName(gate: DebugCompletionPhase): string;
|
|
83
|
+
export declare function expectedDraftCompletionToolName(gate: DraftCompletionGate): string;
|
|
77
84
|
export declare function artifactRootFor(worktreePath: string, workItemId: string): string;
|
|
78
85
|
export declare function artifactRootForOwner(worktreePath: string, ownerType: string, ownerId: string): string;
|
|
79
86
|
export declare function completionArtifactJsonPath(worktreePath: string, workItemId: string, phase: CompletionPhase, ownerType?: string | null, ownerId?: string | null): string;
|
|
@@ -85,20 +92,24 @@ export declare function cursorMcpServerConfig(runtime: CompletionToolRuntime): u
|
|
|
85
92
|
export declare function completionPromptForPhase(phase: CompletionPhase): string;
|
|
86
93
|
export declare function completionPromptForDevelopCycle(phase: CompletionPhase): string;
|
|
87
94
|
export declare function completionPromptForQaCycle(currentGate?: QaCompletionGate): string;
|
|
95
|
+
export declare function completionPromptForDraftCycle(currentGate?: DraftCompletionGate): string;
|
|
88
96
|
export declare function completionPromptForDebugCycle(currentGate?: DebugCompletionPhase): string;
|
|
89
97
|
export declare function completionToolNamesForServer(config: CompletionToolServerConfig): readonly string[];
|
|
90
98
|
export declare class CompletionToolServerSession {
|
|
91
99
|
private readonly config;
|
|
92
100
|
private currentPhase;
|
|
93
101
|
private currentQaGate;
|
|
102
|
+
private currentDraftGate;
|
|
94
103
|
private completed;
|
|
95
104
|
constructor(config: CompletionToolServerConfig);
|
|
96
105
|
get instructions(): string;
|
|
97
106
|
toolDefinitions(): readonly unknown[];
|
|
98
107
|
callTool(toolName: string, input: unknown): Promise<CompletionToolCallResult>;
|
|
108
|
+
private callDraftGateTool;
|
|
99
109
|
private callDebugGateTool;
|
|
100
110
|
private callQaGateTool;
|
|
101
111
|
private advanceAfterPass;
|
|
112
|
+
private advanceAfterDraftGate;
|
|
102
113
|
private advanceAfterQaGate;
|
|
103
114
|
private advanceAfterDebugGate;
|
|
104
115
|
}
|