@loucompanion/forge-bridge 0.1.1-dev.eee62899e922 → 0.1.3-dev.04a84914da09
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/bridge/bridge.service.js +7 -4
- package/dist/cli/local-config.js +14 -1
- package/dist/session/phase-completion.d.ts +23 -1
- package/dist/session/phase-completion.js +693 -22
- package/dist/session/provider-cli/provider-cli.service.d.ts +8 -0
- package/dist/session/provider-cli/provider-cli.service.js +496 -56
- 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
|
@@ -23,6 +23,8 @@ export interface DispatchDraftPrompt {
|
|
|
23
23
|
readonly kind: string;
|
|
24
24
|
readonly systemPrompt: string;
|
|
25
25
|
readonly userPrompt: string;
|
|
26
|
+
readonly projectName?: string | null;
|
|
27
|
+
readonly repoName?: string | null;
|
|
26
28
|
}
|
|
27
29
|
export interface DispatchQaBrowserContext {
|
|
28
30
|
readonly required: boolean;
|
|
@@ -224,6 +226,8 @@ export interface RunnerDispatchArtifact {
|
|
|
224
226
|
readonly planJson?: string | null;
|
|
225
227
|
readonly evidenceJson?: string | null;
|
|
226
228
|
readonly findingsJson?: string | null;
|
|
229
|
+
readonly implementationPlanJson?: string | null;
|
|
230
|
+
readonly qaPlanJson?: string | null;
|
|
227
231
|
readonly report: string;
|
|
228
232
|
readonly producedBy: string;
|
|
229
233
|
readonly status: string;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const forgeBridgeVersion = "0.1.
|
|
1
|
+
export declare const forgeBridgeVersion = "0.1.3-dev.04a84914da09";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const forgeBridgeVersion = "0.1.
|
|
1
|
+
export const forgeBridgeVersion = "0.1.3-dev.04a84914da09";
|
|
@@ -31,6 +31,24 @@ const ARCHITECT_OPERATIONAL_HOOKS = new Set([
|
|
|
31
31
|
"architect-complete",
|
|
32
32
|
"architect-revise"
|
|
33
33
|
]);
|
|
34
|
+
const DRAFT_OPERATIONAL_SKILLS = new Set([
|
|
35
|
+
"draft-intent",
|
|
36
|
+
"draft-repo-context",
|
|
37
|
+
"draft-graph-context",
|
|
38
|
+
"draft-product-scope",
|
|
39
|
+
"draft-work-order-plan",
|
|
40
|
+
"draft-critic",
|
|
41
|
+
"draft-proposal"
|
|
42
|
+
]);
|
|
43
|
+
const DRAFT_OPERATIONAL_HOOKS = new Set([
|
|
44
|
+
"draft-intent",
|
|
45
|
+
"draft-repo-context",
|
|
46
|
+
"draft-graph-context",
|
|
47
|
+
"draft-product-scope",
|
|
48
|
+
"draft-work-order-plan",
|
|
49
|
+
"draft-critic",
|
|
50
|
+
"draft-proposal"
|
|
51
|
+
]);
|
|
34
52
|
export async function injectWorktreeArtifacts(worktreePath, artifacts) {
|
|
35
53
|
for (const artifact of artifacts) {
|
|
36
54
|
await writeArtifact(worktreePath, artifact);
|
|
@@ -45,6 +63,9 @@ export function filterArtifactsForLane(artifacts, lane, phase) {
|
|
|
45
63
|
if (normalizedLane === "architect") {
|
|
46
64
|
return artifacts.filter((artifact) => shouldInjectArchitectArtifact(artifact, commandSlug));
|
|
47
65
|
}
|
|
66
|
+
if (normalizedLane === "draft") {
|
|
67
|
+
return artifacts.filter((artifact) => shouldInjectDraftArtifact(artifact, commandSlug));
|
|
68
|
+
}
|
|
48
69
|
return artifacts;
|
|
49
70
|
}
|
|
50
71
|
export async function writeArtifact(worktreePath, artifact) {
|
|
@@ -79,6 +100,8 @@ export function resolveCommandSlug(lane, phase) {
|
|
|
79
100
|
return "rework-prompt";
|
|
80
101
|
}
|
|
81
102
|
switch (normalizedLane) {
|
|
103
|
+
case "draft":
|
|
104
|
+
return "draft-prompt";
|
|
82
105
|
case "architect":
|
|
83
106
|
return "architect-prompt";
|
|
84
107
|
case "qa":
|
|
@@ -119,6 +142,22 @@ function shouldInjectArchitectArtifact(artifact, commandSlug) {
|
|
|
119
142
|
return false;
|
|
120
143
|
}
|
|
121
144
|
}
|
|
145
|
+
function shouldInjectDraftArtifact(artifact, commandSlug) {
|
|
146
|
+
if (artifact.scope.trim().toLowerCase() !== "operational") {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
const slug = artifact.slug.trim().toLowerCase();
|
|
150
|
+
switch (normalizedArtifactKind(artifact.kind)) {
|
|
151
|
+
case "command":
|
|
152
|
+
return slug === commandSlug;
|
|
153
|
+
case "skill":
|
|
154
|
+
return DRAFT_OPERATIONAL_SKILLS.has(slug);
|
|
155
|
+
case "hook":
|
|
156
|
+
return DRAFT_OPERATIONAL_HOOKS.has(slug);
|
|
157
|
+
default:
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
122
161
|
export function buildSpecBody(laneCommand, workItem, phase = "implementation") {
|
|
123
162
|
const prompt = laneCommand.body.replaceAll("{workItemId}", workItem.id);
|
|
124
163
|
return `---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loucompanion/forge-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3-dev.04a84914da09",
|
|
4
4
|
"description": "Forge runner bridge CLI for connecting local developer machines to Forge dispatch.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|