poly-weaver 0.6.3 → 0.7.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.
- package/README.md +0 -15
- package/dist/agents/implementors/adapter.d.ts +1 -3
- package/dist/agents/implementors/adapter.d.ts.map +1 -1
- package/dist/agents/implementors/adapter.js +4 -4
- package/dist/agents/implementors/adapter.js.map +1 -1
- package/dist/agents/implementors/handler.d.ts.map +1 -1
- package/dist/agents/implementors/handler.js +1 -4
- package/dist/agents/implementors/handler.js.map +1 -1
- package/dist/agents/implementors/prompts.d.ts +6 -14
- package/dist/agents/implementors/prompts.d.ts.map +1 -1
- package/dist/agents/implementors/prompts.js +20 -48
- package/dist/agents/implementors/prompts.js.map +1 -1
- package/dist/agents/implementors/types.d.ts +2 -3
- package/dist/agents/implementors/types.d.ts.map +1 -1
- package/dist/agents/planners/adapter.d.ts +0 -3
- package/dist/agents/planners/adapter.d.ts.map +1 -1
- package/dist/agents/planners/adapter.js +1 -4
- package/dist/agents/planners/adapter.js.map +1 -1
- package/dist/agents/planners/handler.d.ts.map +1 -1
- package/dist/agents/planners/handler.js +1 -4
- package/dist/agents/planners/handler.js.map +1 -1
- package/dist/agents/planners/prompts.d.ts +6 -22
- package/dist/agents/planners/prompts.d.ts.map +1 -1
- package/dist/agents/planners/prompts.js +26 -104
- package/dist/agents/planners/prompts.js.map +1 -1
- package/dist/agents/planners/types.d.ts +0 -3
- package/dist/agents/planners/types.d.ts.map +1 -1
- package/dist/agents/reviewers/adapter.d.ts.map +1 -1
- package/dist/agents/reviewers/adapter.js +2 -10
- package/dist/agents/reviewers/adapter.js.map +1 -1
- package/dist/agents/reviewers/handler.d.ts.map +1 -1
- package/dist/agents/reviewers/handler.js +0 -4
- package/dist/agents/reviewers/handler.js.map +1 -1
- package/dist/agents/reviewers/prompts.d.ts +6 -28
- package/dist/agents/reviewers/prompts.d.ts.map +1 -1
- package/dist/agents/reviewers/prompts.js +51 -161
- package/dist/agents/reviewers/prompts.js.map +1 -1
- package/dist/agents/reviewers/types.d.ts +0 -3
- package/dist/agents/reviewers/types.d.ts.map +1 -1
- package/dist/agents/reviewers/types.js.map +1 -1
- package/dist/agents/runner.d.ts +0 -1
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +0 -3
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/simplifiers/prompts.js +4 -4
- package/dist/agents/simplifiers/prompts.js.map +1 -1
- package/dist/cli.js +2 -17
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -12
- package/dist/config.js.map +1 -1
- package/dist/flow/executor.d.ts.map +1 -1
- package/dist/flow/executor.js +0 -17
- package/dist/flow/executor.js.map +1 -1
- package/dist/flow/types.d.ts +0 -21
- package/dist/flow/types.d.ts.map +1 -1
- package/dist/flow/types.js +0 -18
- package/dist/flow/types.js.map +1 -1
- package/dist/orchestrator.d.ts +0 -2
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +92 -101
- package/dist/orchestrator.js.map +1 -1
- package/dist/preview-panel.d.ts +1 -1
- package/dist/preview-panel.js +1 -1
- package/dist/providers/codex/strategy.d.ts.map +1 -1
- package/dist/providers/codex/strategy.js +3 -8
- package/dist/providers/codex/strategy.js.map +1 -1
- package/dist/providers/copilot/strategy.d.ts.map +1 -1
- package/dist/providers/copilot/strategy.js +4 -9
- package/dist/providers/copilot/strategy.js.map +1 -1
- package/dist/providers/types.d.ts +3 -2
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/pty/spawn.d.ts +16 -0
- package/dist/pty/spawn.d.ts.map +1 -1
- package/dist/pty/spawn.js +106 -16
- package/dist/pty/spawn.js.map +1 -1
- package/dist/session/dir.d.ts +2 -7
- package/dist/session/dir.d.ts.map +1 -1
- package/dist/session/dir.js +2 -7
- package/dist/session/dir.js.map +1 -1
- package/dist/startup-tui.d.ts.map +1 -1
- package/dist/startup-tui.js +0 -16
- package/dist/startup-tui.js.map +1 -1
- package/package.json +1 -1
- package/dist/agents/whip-hint.d.ts +0 -23
- package/dist/agents/whip-hint.d.ts.map +0 -1
- package/dist/agents/whip-hint.js +0 -41
- package/dist/agents/whip-hint.js.map +0 -1
- package/dist/flow/neighbors.d.ts +0 -10
- package/dist/flow/neighbors.d.ts.map +0 -1
- package/dist/flow/neighbors.js +0 -48
- package/dist/flow/neighbors.js.map +0 -1
- package/dist/providers/prompt-file.d.ts +0 -8
- package/dist/providers/prompt-file.d.ts.map +0 -1
- package/dist/providers/prompt-file.js +0 -17
- package/dist/providers/prompt-file.js.map +0 -1
|
@@ -1,93 +1,15 @@
|
|
|
1
|
-
/** Append the "write plan
|
|
2
|
-
function appendOutputFileInstruction(lines, outputPlanFile
|
|
1
|
+
/** Append the "write plan as markdown" instruction when an output path is given. */
|
|
2
|
+
function appendOutputFileInstruction(lines, outputPlanFile) {
|
|
3
3
|
if (outputPlanFile) {
|
|
4
|
-
lines.push(`Write
|
|
4
|
+
lines.push(`Write it as markdown to: ${outputPlanFile}`);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Build the initial planner prompt.
|
|
9
|
-
* The planner reads the task from a file — this prompt tells it what to do.
|
|
10
|
-
*/
|
|
11
|
-
export function buildPlannerPrompt(taskFile, outputPlanFile) {
|
|
12
|
-
const lines = [
|
|
13
|
-
`Read the task description from the file: ${taskFile}`,
|
|
14
|
-
"",
|
|
15
|
-
"Create a detailed implementation plan for this task. Your plan should include:",
|
|
16
|
-
"- Architecture decisions and rationale",
|
|
17
|
-
"- Step-by-step implementation approach",
|
|
18
|
-
"- Key files to create or modify",
|
|
19
|
-
"- Potential risks and mitigations",
|
|
20
|
-
"",
|
|
21
|
-
];
|
|
22
|
-
appendOutputFileInstruction(lines, outputPlanFile);
|
|
23
|
-
lines.push("Do planning only. Do not implement code changes.");
|
|
24
|
-
return lines.join("\n");
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Build the revision planner prompt (when feedback was received).
|
|
28
|
-
*/
|
|
29
|
-
export function buildRevisionPrompt(taskFile, planFile, feedbackFile, source = "reviewer", outputPlanFile) {
|
|
30
|
-
const sourceLabel = source === "reviewer" ? "reviewer's" : "user's";
|
|
31
|
-
const lines = [
|
|
32
|
-
`Read the original task from: ${taskFile}`,
|
|
33
|
-
];
|
|
34
|
-
if (planFile) {
|
|
35
|
-
lines.push(`Read your previous plan from: ${planFile}`);
|
|
36
|
-
}
|
|
37
|
-
lines.push(`Read the ${sourceLabel} feedback from: ${feedbackFile}`, "", `Revise your plan to address the ${sourceLabel} feedback.`, "Keep what works, fix what was flagged.");
|
|
38
|
-
appendOutputFileInstruction(lines, outputPlanFile, "complete revised plan");
|
|
39
|
-
lines.push("Do planning only. Do not implement code changes.");
|
|
40
|
-
return lines.join("\n");
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Build a lighter revision prompt for resumed sessions.
|
|
44
|
-
* The agent already has the task and previous plan in context,
|
|
45
|
-
* so we only reference the feedback file.
|
|
46
|
-
*/
|
|
47
|
-
export function buildResumeRevisionPrompt(feedbackFile, source = "reviewer", outputPlanFile) {
|
|
48
|
-
const sourceLabel = source === "reviewer" ? "reviewer's" : "user's";
|
|
49
|
-
const lines = [
|
|
50
|
-
`Read the ${sourceLabel} feedback from: ${feedbackFile}`,
|
|
51
|
-
"",
|
|
52
|
-
`Revise your plan to address the ${sourceLabel} feedback.`,
|
|
53
|
-
"Keep what works, fix what was flagged.",
|
|
54
|
-
];
|
|
55
|
-
appendOutputFileInstruction(lines, outputPlanFile, "complete revised plan");
|
|
56
|
-
lines.push("Do planning only. Do not implement code changes.");
|
|
57
|
-
return lines.join("\n");
|
|
58
|
-
}
|
|
59
|
-
// ─── Impl-revision planner prompts ──────────────────────────────────────
|
|
60
|
-
/**
|
|
61
|
-
* Prompt for the planner:impl step — plans fixes based on the approved plan
|
|
62
|
-
* and implementation review issues.
|
|
63
|
-
*/
|
|
64
|
-
export function buildImplRevisionPrompt(planFile, prevRevisePlanFile, feedbackFile, outputPlanFile) {
|
|
65
|
-
const lines = [
|
|
66
|
-
`Read the approved implementation plan from: ${planFile}`,
|
|
67
|
-
];
|
|
68
|
-
if (prevRevisePlanFile) {
|
|
69
|
-
lines.push(`Read your previous revision from: ${prevRevisePlanFile}`);
|
|
70
|
-
}
|
|
71
|
-
lines.push(`Read the implementation review from: ${feedbackFile}`, "", "Plan the changes needed to address the review issues.", "Focus on concrete fixes — what to change, where, and why.");
|
|
72
|
-
appendOutputFileInstruction(lines, outputPlanFile, "complete revised plan");
|
|
73
|
-
lines.push("Do planning only. Do not implement code changes.");
|
|
74
|
-
return lines.join("\n");
|
|
75
|
-
}
|
|
76
|
-
export function buildImplResumeRevisionPrompt(feedbackFile, outputPlanFile) {
|
|
77
|
-
const lines = [
|
|
78
|
-
`Read the implementation review from: ${feedbackFile}`,
|
|
79
|
-
"",
|
|
80
|
-
"Plan the changes needed to address the new review issues.",
|
|
81
|
-
];
|
|
82
|
-
appendOutputFileInstruction(lines, outputPlanFile, "complete revised plan");
|
|
83
|
-
return lines.join("\n");
|
|
84
|
-
}
|
|
85
7
|
// ── Minimal planner prompts ──
|
|
86
8
|
export function buildMinimalPlannerPrompt(taskFile, outputPlanFile) {
|
|
87
9
|
const lines = [
|
|
88
|
-
`Read the task
|
|
10
|
+
`Read the task: ${taskFile}`,
|
|
89
11
|
"",
|
|
90
|
-
"Create an implementation plan
|
|
12
|
+
"Create an implementation plan.",
|
|
91
13
|
];
|
|
92
14
|
appendOutputFileInstruction(lines, outputPlanFile);
|
|
93
15
|
return lines.join("\n");
|
|
@@ -95,54 +17,53 @@ export function buildMinimalPlannerPrompt(taskFile, outputPlanFile) {
|
|
|
95
17
|
export function buildMinimalRevisionPrompt(taskFile, planFile, feedbackFile, source, outputPlanFile) {
|
|
96
18
|
const sourceLabel = source === "reviewer" ? "reviewer's" : "user's";
|
|
97
19
|
const lines = [
|
|
98
|
-
`Read the original task
|
|
20
|
+
`Read the original task with user clarifications: ${taskFile}`,
|
|
99
21
|
];
|
|
100
22
|
if (planFile) {
|
|
101
|
-
lines.push(`Read your previous plan
|
|
23
|
+
lines.push(`Read your previous implementation plan: ${planFile}`);
|
|
102
24
|
}
|
|
103
|
-
lines.push(`Read the ${sourceLabel} feedback
|
|
104
|
-
appendOutputFileInstruction(lines, outputPlanFile
|
|
25
|
+
lines.push(`Read the ${sourceLabel} feedback: ${feedbackFile}`, "", `Revise the implementation plan to address the ${sourceLabel} feedback.`);
|
|
26
|
+
appendOutputFileInstruction(lines, outputPlanFile);
|
|
105
27
|
return lines.join("\n");
|
|
106
28
|
}
|
|
107
29
|
export function buildMinimalResumeRevisionPrompt(feedbackFile, source, outputPlanFile) {
|
|
108
30
|
const sourceLabel = source === "reviewer" ? "reviewer's" : "user's";
|
|
109
31
|
const lines = [
|
|
110
|
-
`Read the ${sourceLabel} feedback
|
|
32
|
+
`Read the new ${sourceLabel} feedback: ${feedbackFile}`,
|
|
111
33
|
"",
|
|
112
|
-
`Revise your plan
|
|
34
|
+
`Revise your implementation plan accordingly.`,
|
|
113
35
|
];
|
|
114
|
-
appendOutputFileInstruction(lines, outputPlanFile
|
|
36
|
+
appendOutputFileInstruction(lines, outputPlanFile);
|
|
115
37
|
return lines.join("\n");
|
|
116
38
|
}
|
|
117
39
|
// ── Minimal impl-revision planner prompts ──
|
|
118
40
|
export function buildMinimalImplRevisionPrompt(planFile, prevRevisePlanFile, feedbackFile, outputPlanFile) {
|
|
119
41
|
const lines = [
|
|
120
|
-
`Read the approved implementation plan
|
|
42
|
+
`Read the approved implementation plan: ${planFile}`,
|
|
121
43
|
];
|
|
122
44
|
if (prevRevisePlanFile) {
|
|
123
|
-
lines.push(`Read your previous
|
|
45
|
+
lines.push(`Read your previous change plan: ${prevRevisePlanFile}`);
|
|
124
46
|
}
|
|
125
|
-
lines.push(`Read the implementation review
|
|
126
|
-
appendOutputFileInstruction(lines, outputPlanFile
|
|
47
|
+
lines.push(`Read the implementation review: ${feedbackFile}`, "", "Create a change plan to address the review issues.");
|
|
48
|
+
appendOutputFileInstruction(lines, outputPlanFile);
|
|
127
49
|
return lines.join("\n");
|
|
128
50
|
}
|
|
129
51
|
export function buildMinimalImplResumeRevisionPrompt(feedbackFile, outputPlanFile) {
|
|
130
52
|
const lines = [
|
|
131
|
-
`Read the implementation review
|
|
53
|
+
`Read the new implementation review: ${feedbackFile}`,
|
|
132
54
|
"",
|
|
133
|
-
"
|
|
55
|
+
"Create a new change plan to address the issues.",
|
|
134
56
|
];
|
|
135
|
-
appendOutputFileInstruction(lines, outputPlanFile
|
|
57
|
+
appendOutputFileInstruction(lines, outputPlanFile);
|
|
136
58
|
return lines.join("\n");
|
|
137
59
|
}
|
|
60
|
+
// ─── Opinion-mode planner prompts (aliased to minimal for now) ──────────
|
|
61
|
+
export const buildPlannerPrompt = buildMinimalPlannerPrompt;
|
|
62
|
+
export const buildRevisionPrompt = buildMinimalRevisionPrompt;
|
|
63
|
+
export const buildResumeRevisionPrompt = buildMinimalResumeRevisionPrompt;
|
|
64
|
+
export const buildImplRevisionPrompt = buildMinimalImplRevisionPrompt;
|
|
65
|
+
export const buildImplResumeRevisionPrompt = buildMinimalImplResumeRevisionPrompt;
|
|
138
66
|
// ─── Prompt set exports ──────────────────────────────────────────────────
|
|
139
|
-
export const defaultPlannerPrompts = {
|
|
140
|
-
initial: buildPlannerPrompt,
|
|
141
|
-
revision: buildRevisionPrompt,
|
|
142
|
-
resumeRevision: buildResumeRevisionPrompt,
|
|
143
|
-
implRevision: buildImplRevisionPrompt,
|
|
144
|
-
implResumeRevision: buildImplResumeRevisionPrompt,
|
|
145
|
-
};
|
|
146
67
|
export const minimalPlannerPrompts = {
|
|
147
68
|
initial: buildMinimalPlannerPrompt,
|
|
148
69
|
revision: buildMinimalRevisionPrompt,
|
|
@@ -150,4 +71,5 @@ export const minimalPlannerPrompts = {
|
|
|
150
71
|
implRevision: buildMinimalImplRevisionPrompt,
|
|
151
72
|
implResumeRevision: buildMinimalImplResumeRevisionPrompt,
|
|
152
73
|
};
|
|
74
|
+
export const defaultPlannerPrompts = minimalPlannerPrompts;
|
|
153
75
|
//# sourceMappingURL=prompts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/agents/planners/prompts.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/agents/planners/prompts.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,SAAS,2BAA2B,CAClC,KAAe,EACf,cAAkC;IAElC,IAAI,cAAc,EAAE,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,4BAA4B,cAAc,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC;AAED,gCAAgC;AAEhC,MAAM,UAAU,yBAAyB,CACvC,QAAgB,EAChB,cAAkC;IAElC,MAAM,KAAK,GAAG;QACZ,kBAAkB,QAAQ,EAAE;QAC5B,EAAE;QACF,gCAAgC;KACjC,CAAC;IACF,2BAA2B,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACnD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,QAAgB,EAChB,QAA4B,EAC5B,YAAoB,EACpB,MAA2B,EAC3B,cAAkC;IAElC,MAAM,WAAW,GAAG,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;IACpE,MAAM,KAAK,GAAG;QACZ,oDAAoD,QAAQ,EAAE;KAC/D,CAAC;IACF,IAAI,QAAQ,EAAE,CAAC;QACb,KAAK,CAAC,IAAI,CAAC,2CAA2C,QAAQ,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,KAAK,CAAC,IAAI,CACR,YAAY,WAAW,cAAc,YAAY,EAAE,EACnD,EAAE,EACF,iDAAiD,WAAW,YA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1B,CAAC;AAED,2EAA2E;AAE3E,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,gCAAgC,CAAC;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AACtE,MAAM,CAAC,MAAM,6BAA6B,GAAG,oCAAoC,CAAC;AAElF,4EAA4E;AAE5E,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACrD,OAAO,EAAE,yBAAyB;IAClC,QAAQ,EAAE,0BAA0B;IACpC,cAAc,EAAE,gCAAgC;IAChD,YAAY,EAAE,8BAA8B;IAC5C,kBAAkB,EAAE,oCAAoC;CACzD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAqB,qBAAqB,CAAC"}
|
|
@@ -5,7 +5,6 @@ export type PlannerPromptSet = {
|
|
|
5
5
|
implRevision: (planFile: string, prevRevisePlanFile: string | undefined, feedbackFile: string, outputPlanFile: string | undefined) => string;
|
|
6
6
|
implResumeRevision: (feedbackFile: string, outputPlanFile: string | undefined) => string;
|
|
7
7
|
};
|
|
8
|
-
import type { StepMeta } from "../../flow/types.js";
|
|
9
8
|
export interface PlannerDriver {
|
|
10
9
|
readonly name: string;
|
|
11
10
|
/** Spawn a PTY process, run the task, detect completion, send exit, return result. */
|
|
@@ -16,8 +15,6 @@ export interface PlannerDriver {
|
|
|
16
15
|
feedbackFile?: string;
|
|
17
16
|
feedbackSource?: "reviewer" | "user";
|
|
18
17
|
implReplan?: boolean;
|
|
19
|
-
producers?: Record<string, StepMeta>;
|
|
20
|
-
consumers?: Record<string, StepMeta[]>;
|
|
21
18
|
}): Promise<PlanResult>;
|
|
22
19
|
/** Get the session ID for resume/correlation. */
|
|
23
20
|
getSessionId(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/agents/planners/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;IAC1E,QAAQ,EAAE,CACR,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,GAAG,MAAM,EAC3B,cAAc,EAAE,MAAM,GAAG,SAAS,KAC/B,MAAM,CAAC;IACZ,cAAc,EAAE,CACd,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,GAAG,MAAM,EAC3B,cAAc,EAAE,MAAM,GAAG,SAAS,KAC/B,MAAM,CAAC;IACZ,YAAY,EAAE,CACZ,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,GAAG,SAAS,KAC/B,MAAM,CAAC;IACZ,kBAAkB,EAAE,CAClB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,GAAG,SAAS,KAC/B,MAAM,CAAC;CACb,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/agents/planners/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;IAC1E,QAAQ,EAAE,CACR,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,GAAG,MAAM,EAC3B,cAAc,EAAE,MAAM,GAAG,SAAS,KAC/B,MAAM,CAAC;IACZ,cAAc,EAAE,CACd,YAAY,EAAE,MAA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E,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/agents/reviewers/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,gCAAgC,EACjC,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/agents/reviewers/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,gCAAgC,EACjC,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,qBAAa,eAAgB,SAAQ,WAAY,YAAW,cAAc;IAItE,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAJ5C,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,MAAM,EACE,aAAa,GAAE,mBAAyC,EACxD,mBAAmB,CAAC,EAAE,mBAAmB,YAAA,EACzC,0BAA0B,CAAC,EAAE,gCAAgC,YAAA,EAC9E,IAAI,CAAC,EAAE,OAAO;IAKV,GAAG,CACP,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,YAAY,CAAC;CA6CzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { selectReviewerPromptBuilder } from "./types.js";
|
|
2
2
|
import { BaseAdapter } from "../runner.js";
|
|
3
|
-
import { buildWhipHint } from "../whip-hint.js";
|
|
4
3
|
import { buildReviewerPrompt } from "./prompts.js";
|
|
5
4
|
export class ReviewerAdapter extends BaseAdapter {
|
|
6
5
|
promptBuilder;
|
|
@@ -14,21 +13,14 @@ export class ReviewerAdapter extends BaseAdapter {
|
|
|
14
13
|
}
|
|
15
14
|
async run(taskFile, planFile, opts) {
|
|
16
15
|
const builder = selectReviewerPromptBuilder(this.promptBuilder, this.resumePromptBuilder, opts.resumeSessionId);
|
|
17
|
-
const
|
|
18
|
-
const artifactLabel = opts.variant === "impl" ? "implementation" : "plan";
|
|
19
|
-
const hint = buildWhipHint(this.strategy.name, opts, {
|
|
20
|
-
producer: (names) => `The ${artifactLabel} was produced by ${names}.`,
|
|
21
|
-
consumer: (names) => `Your review will be sent to ${names}.`,
|
|
22
|
-
});
|
|
23
|
-
const prompt = this.applyWhipHint(hint, rawPrompt);
|
|
16
|
+
const prompt = await builder(taskFile, planFile, opts.outputVerdictFile, opts.userDecisionsFile, opts.decisionsInline);
|
|
24
17
|
let freshFallbackPrompt;
|
|
25
18
|
if (this.freshFallbackPromptBuilder &&
|
|
26
19
|
opts.resumeSessionId &&
|
|
27
20
|
opts.decisionsInline &&
|
|
28
21
|
opts.planText &&
|
|
29
22
|
opts.prevVerdictText) {
|
|
30
|
-
|
|
31
|
-
freshFallbackPrompt = this.applyWhipHint(hint, rawFallback);
|
|
23
|
+
freshFallbackPrompt = await this.freshFallbackPromptBuilder(opts.planText, opts.prevVerdictText, opts.decisionsInline, opts.outputVerdictFile);
|
|
32
24
|
}
|
|
33
25
|
const result = await this.runAgent({
|
|
34
26
|
prompt,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/agents/reviewers/adapter.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,WAAW,EAA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IAAI,CAAC,iBAAiB,CACvB,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC;YACjC,MAAM;YACN,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,mBAAmB;SACpB,CAAC,CAAC;QAEH,OAAO;YACL,GAAG,EAAE,MAAM,CAAC,YAAY;YACxB,SAAS,EAAE,IAAI,CAAC,IAAI;YACpB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/agents/reviewers/handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAOjD,OAAO,
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/agents/reviewers/handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAOjD,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,mBAAoB,YAAW,WAAW;IACzC,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAEpC,OAAO,CACX,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC;CA6GvB"}
|
|
@@ -2,7 +2,6 @@ import { readFile } from "node:fs/promises";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { formatUserDecisionsInline } from "./prompts.js";
|
|
4
4
|
import { readVerdictFromContract, removeFileIfExists, } from "../../orchestrator.js";
|
|
5
|
-
import { resolveWhipNeighbors, } from "../../flow/types.js";
|
|
6
5
|
import { bindSessionReporter, bindDriverRuntime } from "../runner.js";
|
|
7
6
|
export class ReviewerRoleHandler {
|
|
8
7
|
driver;
|
|
@@ -23,7 +22,6 @@ export class ReviewerRoleHandler {
|
|
|
23
22
|
}
|
|
24
23
|
const outputVerdictFile = join(ctx.sessionDir, "verdict.json");
|
|
25
24
|
const resumeSessionId = ctx.sessionIds.get(sessionKey);
|
|
26
|
-
const { producers, consumers } = resolveWhipNeighbors(step, ctx);
|
|
27
25
|
bindSessionReporter(this.driver, ctx.lastStepSessionFilePaths);
|
|
28
26
|
bindDriverRuntime(this.driver, { output: ctx.output, terminalHost: ctx.terminalHost });
|
|
29
27
|
const decisionsAllowed = step.reads.userDecisions != null &&
|
|
@@ -76,8 +74,6 @@ export class ReviewerRoleHandler {
|
|
|
76
74
|
const reviewResult = await this.driver.run(taskFile, planFile, {
|
|
77
75
|
outputVerdictFile,
|
|
78
76
|
resumeSessionId: attempt === 1 ? resumeSessionId : undefined,
|
|
79
|
-
producers,
|
|
80
|
-
consumers,
|
|
81
77
|
variant: step.variant,
|
|
82
78
|
userDecisionsFile,
|
|
83
79
|
decisionsInline,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/agents/reviewers/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/agents/reviewers/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kB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AC5D,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,iBAAiB;gBACjB,eAAe;gBACf,QAAQ;gBACR,eAAe;aAChB,CAAC,CAAC;YAEH,MAAM,WAAW,GAAG,MAAM,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;YACrE,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;YAC9D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,+BAA+B;QAC/B,IAAI,YAAY,CAAC,eAAe,EAAE,CAAC;YACjC,GAAG,CAAC,wBAAwB,EAAE,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QACnE,CAAC;QAED,yEAAyE;QACzE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACrC,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,WAAW;YACjB,GAAG,CAAC,CAAC,WAAW,CAAC,QAAQ,IAAI;gBAC3B,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;aAC7B,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,YAAY,CAAC,SAAS,EAAE,CAAC;YAC3B,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
import type { UserDecisionsSidecar } from "../../user/curate-handler.js";
|
|
2
2
|
export declare function truncateWords(text: string, n: number): string;
|
|
3
3
|
export declare function formatUserDecisionsInline(decisions: UserDecisionsSidecar["decisions"]): string;
|
|
4
|
-
/**
|
|
5
|
-
* Build the reviewer prompt with the JSON schema embedded.
|
|
6
|
-
*/
|
|
7
|
-
export declare function buildReviewerPrompt(taskFile: string, planFile: string, outputVerdictFile: string): Promise<string>;
|
|
8
|
-
/**
|
|
9
|
-
* Build a lighter reviewer prompt for resumed sessions.
|
|
10
|
-
* The model already has the task and previous plan in context,
|
|
11
|
-
* so only reference the revised plan.
|
|
12
|
-
*/
|
|
13
|
-
export declare function buildResumeReviewerPrompt(_taskFile: string, planFile: string, outputVerdictFile: string, userDecisionsFile?: string, decisionsInline?: string): Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Fresh-session fallback used when an in-context resume fails. The plan and
|
|
16
|
-
* prior verdict are inlined verbatim so the fresh model sees them in context;
|
|
17
|
-
* the same numbered decision list and "Revise the verdict per user request"
|
|
18
|
-
* directive are appended so the model has identical instructions.
|
|
19
|
-
*/
|
|
20
|
-
export declare function buildInContextFreshFallbackReviewerPrompt(planText: string, prevVerdictText: string, decisionsInline: string, outputVerdictFile: string): Promise<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Build a lighter implementation reviewer prompt for resumed sessions.
|
|
23
|
-
* The model already has the approved plan in context,
|
|
24
|
-
* so only ask it to re-check the implementation.
|
|
25
|
-
*/
|
|
26
|
-
export declare function buildResumeImplementationReviewerPrompt(_taskFile: string, planFile: string, outputVerdictFile: string): Promise<string>;
|
|
27
|
-
/**
|
|
28
|
-
* Build the implementation reviewer prompt with the JSON schema embedded.
|
|
29
|
-
*/
|
|
30
|
-
export declare function buildImplementationReviewerPrompt(_taskFile: string, planFile: string, outputVerdictFile: string): Promise<string>;
|
|
31
4
|
export declare function buildMinimalReviewerPrompt(taskFile: string, planFile: string, outputVerdictFile: string): Promise<string>;
|
|
32
5
|
export declare function buildMinimalResumeReviewerPrompt(_taskFile: string, planFile: string, outputVerdictFile: string, userDecisionsFile?: string, decisionsInline?: string): Promise<string>;
|
|
33
6
|
/** Minimal twin of {@link buildInContextFreshFallbackReviewerPrompt}. */
|
|
34
7
|
export declare function buildMinimalInContextFreshFallbackReviewerPrompt(planText: string, prevVerdictText: string, decisionsInline: string, outputVerdictFile: string): Promise<string>;
|
|
35
8
|
export declare function buildMinimalImplementationReviewerPrompt(_taskFile: string, planFile: string, outputVerdictFile: string): Promise<string>;
|
|
36
|
-
export declare function buildMinimalResumeImplementationReviewerPrompt(_taskFile: string,
|
|
9
|
+
export declare function buildMinimalResumeImplementationReviewerPrompt(_taskFile: string, _planFile: string, outputVerdictFile: string): Promise<string>;
|
|
10
|
+
export declare const buildReviewerPrompt: typeof buildMinimalReviewerPrompt;
|
|
11
|
+
export declare const buildResumeReviewerPrompt: typeof buildMinimalResumeReviewerPrompt;
|
|
12
|
+
export declare const buildInContextFreshFallbackReviewerPrompt: typeof buildMinimalInContextFreshFallbackReviewerPrompt;
|
|
13
|
+
export declare const buildResumeImplementationReviewerPrompt: typeof buildMinimalResumeImplementationReviewerPrompt;
|
|
14
|
+
export declare const buildImplementationReviewerPrompt: typeof buildMinimalImplementationReviewerPrompt;
|
|
37
15
|
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/agents/reviewers/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/agents/reviewers/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,oBAAoB,CAAC,WAAW,CAAC,GAC3C,MAAM,CAeR;AA6CD,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED,wBAAsB,gCAAgC,CACpD,SAAS,EAAE,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