planpong 0.1.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 +110 -0
- package/dist/bin/planpong-mcp.d.ts +2 -0
- package/dist/bin/planpong-mcp.js +7 -0
- package/dist/bin/planpong-mcp.js.map +1 -0
- package/dist/bin/planpong.d.ts +2 -0
- package/dist/bin/planpong.js +13 -0
- package/dist/bin/planpong.js.map +1 -0
- package/dist/src/cli/commands/plan.d.ts +2 -0
- package/dist/src/cli/commands/plan.js +128 -0
- package/dist/src/cli/commands/plan.js.map +1 -0
- package/dist/src/cli/commands/review.d.ts +2 -0
- package/dist/src/cli/commands/review.js +156 -0
- package/dist/src/cli/commands/review.js.map +1 -0
- package/dist/src/cli/ui.d.ts +11 -0
- package/dist/src/cli/ui.js +65 -0
- package/dist/src/cli/ui.js.map +1 -0
- package/dist/src/config/defaults.d.ts +2 -0
- package/dist/src/config/defaults.js +12 -0
- package/dist/src/config/defaults.js.map +1 -0
- package/dist/src/config/loader.d.ts +17 -0
- package/dist/src/config/loader.js +74 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/core/convergence.d.ts +10 -0
- package/dist/src/core/convergence.js +56 -0
- package/dist/src/core/convergence.js.map +1 -0
- package/dist/src/core/loop.d.ts +53 -0
- package/dist/src/core/loop.js +256 -0
- package/dist/src/core/loop.js.map +1 -0
- package/dist/src/core/operations.d.ts +68 -0
- package/dist/src/core/operations.js +323 -0
- package/dist/src/core/operations.js.map +1 -0
- package/dist/src/core/session.d.ts +14 -0
- package/dist/src/core/session.js +77 -0
- package/dist/src/core/session.js.map +1 -0
- package/dist/src/mcp/server.d.ts +2 -0
- package/dist/src/mcp/server.js +109 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/tools/get-feedback.d.ts +2 -0
- package/dist/src/mcp/tools/get-feedback.js +109 -0
- package/dist/src/mcp/tools/get-feedback.js.map +1 -0
- package/dist/src/mcp/tools/list-sessions.d.ts +2 -0
- package/dist/src/mcp/tools/list-sessions.js +61 -0
- package/dist/src/mcp/tools/list-sessions.js.map +1 -0
- package/dist/src/mcp/tools/revise.d.ts +2 -0
- package/dist/src/mcp/tools/revise.js +84 -0
- package/dist/src/mcp/tools/revise.js.map +1 -0
- package/dist/src/mcp/tools/start-review.d.ts +2 -0
- package/dist/src/mcp/tools/start-review.js +105 -0
- package/dist/src/mcp/tools/start-review.js.map +1 -0
- package/dist/src/mcp/tools/status.d.ts +2 -0
- package/dist/src/mcp/tools/status.js +83 -0
- package/dist/src/mcp/tools/status.js.map +1 -0
- package/dist/src/prompts/planner.d.ts +3 -0
- package/dist/src/prompts/planner.js +96 -0
- package/dist/src/prompts/planner.js.map +1 -0
- package/dist/src/prompts/reviewer.d.ts +11 -0
- package/dist/src/prompts/reviewer.js +70 -0
- package/dist/src/prompts/reviewer.js.map +1 -0
- package/dist/src/providers/claude.d.ts +8 -0
- package/dist/src/providers/claude.js +77 -0
- package/dist/src/providers/claude.js.map +1 -0
- package/dist/src/providers/codex.d.ts +8 -0
- package/dist/src/providers/codex.js +83 -0
- package/dist/src/providers/codex.js.map +1 -0
- package/dist/src/providers/registry.d.ts +4 -0
- package/dist/src/providers/registry.js +17 -0
- package/dist/src/providers/registry.js.map +1 -0
- package/dist/src/providers/types.d.ts +18 -0
- package/dist/src/providers/types.js +2 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/schemas/config.d.ts +75 -0
- package/dist/src/schemas/config.js +14 -0
- package/dist/src/schemas/config.js.map +1 -0
- package/dist/src/schemas/feedback.d.ts +95 -0
- package/dist/src/schemas/feedback.js +24 -0
- package/dist/src/schemas/feedback.js.map +1 -0
- package/dist/src/schemas/revision.d.ts +116 -0
- package/dist/src/schemas/revision.js +17 -0
- package/dist/src/schemas/revision.js.map +1 -0
- package/dist/src/schemas/session.d.ts +79 -0
- package/dist/src/schemas/session.js +16 -0
- package/dist/src/schemas/session.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export function buildReviewPrompt(planContent, priorDecisions) {
|
|
2
|
+
const priorBlock = priorDecisions
|
|
3
|
+
? `\n## Prior Round Decisions\n\n${priorDecisions}\n\nDo not re-raise rejected items without citing specific new evidence (a URL, a test result, a behavior change). Issues rejected in prior rounds with valid rationale are RESOLVED.\n`
|
|
4
|
+
: "";
|
|
5
|
+
return `You are reviewing an implementation plan. Your role is adversarial but fair.
|
|
6
|
+
|
|
7
|
+
- Only flag issues you have concrete evidence for. Cite the plan section.
|
|
8
|
+
- Assign severity honestly:
|
|
9
|
+
- P1 = blocks implementation or causes failure
|
|
10
|
+
- P2 = significant quality/reliability concern
|
|
11
|
+
- P3 = improvement opportunity
|
|
12
|
+
- If a prior round's issue was marked "rejected" with a valid rationale, do not re-raise it. You can escalate ONLY if you have new evidence.
|
|
13
|
+
- If all prior issues have been addressed or reasonably rejected, approve the plan. Do not invent new concerns to justify continued review.
|
|
14
|
+
- Deferred items from prior rounds are acknowledged and do not block approval.
|
|
15
|
+
- If the plan is solid with only minor informational notes, use "approved_with_notes" (all issues must be P3).
|
|
16
|
+
- If you approve with "approved_with_notes", do NOT include any P1 or P2 issues.
|
|
17
|
+
${priorBlock}
|
|
18
|
+
## Plan to Review
|
|
19
|
+
|
|
20
|
+
${planContent}
|
|
21
|
+
|
|
22
|
+
## Your Task
|
|
23
|
+
|
|
24
|
+
Respond with a JSON object wrapped in <planpong-feedback> tags. The JSON must match this schema:
|
|
25
|
+
|
|
26
|
+
\`\`\`
|
|
27
|
+
{
|
|
28
|
+
"verdict": "needs_revision" | "approved" | "approved_with_notes",
|
|
29
|
+
"summary": "Overall assessment of the plan",
|
|
30
|
+
"issues": [
|
|
31
|
+
{
|
|
32
|
+
"id": "F1",
|
|
33
|
+
"severity": "P1" | "P2" | "P3",
|
|
34
|
+
"section": "Which part of the plan this relates to",
|
|
35
|
+
"title": "One-line summary",
|
|
36
|
+
"description": "Detailed explanation",
|
|
37
|
+
"suggestion": "Recommended fix"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
If the plan is approved with no issues, use:
|
|
44
|
+
\`\`\`
|
|
45
|
+
{ "verdict": "approved", "summary": "...", "issues": [] }
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
IMPORTANT: Wrap your JSON response in <planpong-feedback>...</planpong-feedback> tags.
|
|
49
|
+
|
|
50
|
+
<planpong-feedback>
|
|
51
|
+
YOUR_JSON_HERE
|
|
52
|
+
</planpong-feedback>`;
|
|
53
|
+
}
|
|
54
|
+
export function formatPriorDecisions(rounds) {
|
|
55
|
+
const lines = [];
|
|
56
|
+
for (const round of rounds) {
|
|
57
|
+
for (const response of round.responses) {
|
|
58
|
+
const issue = round.issues.find((i) => i.id === response.issue_id);
|
|
59
|
+
const severity = issue?.severity ?? "??";
|
|
60
|
+
const title = issue?.title ?? response.issue_id;
|
|
61
|
+
const action = response.action.toUpperCase();
|
|
62
|
+
const rationale = response.rationale.length > 80
|
|
63
|
+
? response.rationale.slice(0, 80) + "..."
|
|
64
|
+
: response.rationale;
|
|
65
|
+
lines.push(`- R${round.round} ${response.issue_id} (${severity}): ${title} → ${action} (${rationale})`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return lines.join("\n");
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=reviewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../../src/prompts/reviewer.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAC/B,WAAmB,EACnB,cAA6B;IAE7B,MAAM,UAAU,GAAG,cAAc;QAC/B,CAAC,CAAC,iCAAiC,cAAc,yLAAyL;QAC1O,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;;;;;;;;;;;;EAYP,UAAU;;;EAGV,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCQ,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,MAIE;IAEF,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACvC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACnE,MAAM,QAAQ,GAAG,KAAK,EAAE,QAAQ,IAAI,IAAI,CAAC;YACzC,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,IAAI,QAAQ,CAAC,QAAQ,CAAC;YAChD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAC7C,MAAM,SAAS,GACb,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,EAAE;gBAC5B,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK;gBACzC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;YACzB,KAAK,CAAC,IAAI,CACR,MAAM,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC,QAAQ,KAAK,QAAQ,MAAM,KAAK,MAAM,MAAM,KAAK,SAAS,GAAG,CAC5F,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Provider, InvokeOptions, ProviderResponse } from "./types.js";
|
|
2
|
+
export declare class ClaudeProvider implements Provider {
|
|
3
|
+
name: string;
|
|
4
|
+
invoke(prompt: string, options: InvokeOptions): Promise<ProviderResponse>;
|
|
5
|
+
isAvailable(): Promise<boolean>;
|
|
6
|
+
getModels(): string[];
|
|
7
|
+
getEffortLevels(): string[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { execa } from "execa";
|
|
2
|
+
const MODELS = ["opus", "sonnet", "haiku"];
|
|
3
|
+
/**
|
|
4
|
+
* Build a clean env object with CLAUDECODE removed.
|
|
5
|
+
* This allows spawning headless `claude -p` from inside a Claude Code session.
|
|
6
|
+
*/
|
|
7
|
+
function cleanEnv() {
|
|
8
|
+
const env = {};
|
|
9
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
10
|
+
if (key !== "CLAUDECODE" && value !== undefined) {
|
|
11
|
+
env[key] = value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return env;
|
|
15
|
+
}
|
|
16
|
+
export class ClaudeProvider {
|
|
17
|
+
name = "claude";
|
|
18
|
+
async invoke(prompt, options) {
|
|
19
|
+
// claude -p reads prompt from stdin when no positional arg is given
|
|
20
|
+
const args = ["-p", "--output-format", "text"];
|
|
21
|
+
if (options.model) {
|
|
22
|
+
args.push("--model", options.model);
|
|
23
|
+
}
|
|
24
|
+
const start = Date.now();
|
|
25
|
+
try {
|
|
26
|
+
const result = await execa("claude", args, {
|
|
27
|
+
cwd: options.cwd,
|
|
28
|
+
preferLocal: true,
|
|
29
|
+
timeout: options.timeout ?? 300_000,
|
|
30
|
+
reject: false,
|
|
31
|
+
env: cleanEnv(),
|
|
32
|
+
extendEnv: false,
|
|
33
|
+
input: prompt,
|
|
34
|
+
});
|
|
35
|
+
if (result.exitCode !== 0) {
|
|
36
|
+
process.stderr.write(`[claude-provider] exit=${result.exitCode} stderr=${result.stderr?.slice(0, 500)}\n`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
content: result.stdout,
|
|
40
|
+
exitCode: result.exitCode ?? 1,
|
|
41
|
+
duration: Date.now() - start,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return {
|
|
46
|
+
content: error instanceof Error
|
|
47
|
+
? error.message
|
|
48
|
+
: "Unknown error invoking claude",
|
|
49
|
+
exitCode: 1,
|
|
50
|
+
duration: Date.now() - start,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async isAvailable() {
|
|
55
|
+
try {
|
|
56
|
+
const result = await execa("claude", ["--version"], {
|
|
57
|
+
preferLocal: true,
|
|
58
|
+
timeout: 5_000,
|
|
59
|
+
reject: false,
|
|
60
|
+
env: cleanEnv(),
|
|
61
|
+
extendEnv: false,
|
|
62
|
+
});
|
|
63
|
+
return result.exitCode === 0;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
getModels() {
|
|
70
|
+
return MODELS;
|
|
71
|
+
}
|
|
72
|
+
getEffortLevels() {
|
|
73
|
+
// Claude effort maps to model selection — opus is highest reasoning
|
|
74
|
+
return ["default"];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=claude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/providers/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAE3C;;;GAGG;AACH,SAAS,QAAQ;IACf,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,IAAI,GAAG,KAAK,YAAY,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAChD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,OAAO,cAAc;IACzB,IAAI,GAAG,QAAQ,CAAC;IAEhB,KAAK,CAAC,MAAM,CACV,MAAc,EACd,OAAsB;QAEtB,oEAAoE;QACpE,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAE/C,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE;gBACzC,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,OAAO;gBACnC,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,QAAQ,EAAE;gBACf,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,MAAM;aACd,CAAC,CAAC;YAEH,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0BAA0B,MAAM,CAAC,QAAQ,WAAW,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CACrF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,MAAM,CAAC,MAAM;gBACtB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC;gBAC9B,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAC7B,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EACL,KAAK,YAAY,KAAK;oBACpB,CAAC,CAAC,KAAK,CAAC,OAAO;oBACf,CAAC,CAAC,+BAA+B;gBACrC,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAC7B,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE;gBAClD,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,QAAQ,EAAE;gBACf,SAAS,EAAE,KAAK;aACjB,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,SAAS;QACP,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,eAAe;QACb,oEAAoE;QACpE,OAAO,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Provider, InvokeOptions, ProviderResponse } from "./types.js";
|
|
2
|
+
export declare class CodexProvider implements Provider {
|
|
3
|
+
name: string;
|
|
4
|
+
invoke(prompt: string, options: InvokeOptions): Promise<ProviderResponse>;
|
|
5
|
+
isAvailable(): Promise<boolean>;
|
|
6
|
+
getModels(): string[];
|
|
7
|
+
getEffortLevels(): string[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
import { readFileSync, unlinkSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { execa } from "execa";
|
|
6
|
+
const MODELS = ["gpt-5.3-codex", "o3-pro", "o3", "o4-mini"];
|
|
7
|
+
const EFFORT_LEVELS = ["low", "medium", "high", "xhigh"];
|
|
8
|
+
export class CodexProvider {
|
|
9
|
+
name = "codex";
|
|
10
|
+
async invoke(prompt, options) {
|
|
11
|
+
const args = ["exec"];
|
|
12
|
+
if (options.model) {
|
|
13
|
+
args.push("-m", options.model);
|
|
14
|
+
}
|
|
15
|
+
if (options.effort) {
|
|
16
|
+
args.push("-c", `model_reasoning_effort="${options.effort}"`);
|
|
17
|
+
}
|
|
18
|
+
// Write clean output to a temp file to avoid parsing header/footer
|
|
19
|
+
const outFile = join(tmpdir(), `planpong-codex-${randomBytes(6).toString("hex")}.txt`);
|
|
20
|
+
args.push("-o", outFile);
|
|
21
|
+
// Use stdin for prompt (CLI arg has length limits)
|
|
22
|
+
args.push("-");
|
|
23
|
+
const start = Date.now();
|
|
24
|
+
try {
|
|
25
|
+
const result = await execa("codex", args, {
|
|
26
|
+
cwd: options.cwd,
|
|
27
|
+
preferLocal: true,
|
|
28
|
+
timeout: options.timeout ?? 300_000,
|
|
29
|
+
reject: false,
|
|
30
|
+
input: prompt,
|
|
31
|
+
});
|
|
32
|
+
let content;
|
|
33
|
+
try {
|
|
34
|
+
content = readFileSync(outFile, "utf-8");
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// Fall back to stdout if output file wasn't created
|
|
38
|
+
content = result.stdout;
|
|
39
|
+
}
|
|
40
|
+
// Clean up temp file
|
|
41
|
+
try {
|
|
42
|
+
unlinkSync(outFile);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// ignore
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
content,
|
|
49
|
+
exitCode: result.exitCode ?? 1,
|
|
50
|
+
duration: Date.now() - start,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
return {
|
|
55
|
+
content: error instanceof Error
|
|
56
|
+
? error.message
|
|
57
|
+
: "Unknown error invoking codex",
|
|
58
|
+
exitCode: 1,
|
|
59
|
+
duration: Date.now() - start,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async isAvailable() {
|
|
64
|
+
try {
|
|
65
|
+
const result = await execa("codex", ["--version"], {
|
|
66
|
+
preferLocal: true,
|
|
67
|
+
timeout: 5_000,
|
|
68
|
+
reject: false,
|
|
69
|
+
});
|
|
70
|
+
return result.exitCode === 0;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
getModels() {
|
|
77
|
+
return MODELS;
|
|
78
|
+
}
|
|
79
|
+
getEffortLevels() {
|
|
80
|
+
return EFFORT_LEVELS;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/providers/codex.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ClaudeProvider } from "./claude.js";
|
|
2
|
+
import { CodexProvider } from "./codex.js";
|
|
3
|
+
const ALL_PROVIDERS = [new ClaudeProvider(), new CodexProvider()];
|
|
4
|
+
export async function getAvailableProviders() {
|
|
5
|
+
const results = await Promise.all(ALL_PROVIDERS.map(async (p) => ({
|
|
6
|
+
provider: p,
|
|
7
|
+
available: await p.isAvailable(),
|
|
8
|
+
})));
|
|
9
|
+
return results.filter((r) => r.available).map((r) => r.provider);
|
|
10
|
+
}
|
|
11
|
+
export function getProvider(name) {
|
|
12
|
+
return ALL_PROVIDERS.find((p) => p.name === name);
|
|
13
|
+
}
|
|
14
|
+
export function getAllProviders() {
|
|
15
|
+
return ALL_PROVIDERS;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/providers/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,aAAa,GAAe,CAAC,IAAI,cAAc,EAAE,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;AAE9E,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9B,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,MAAM,CAAC,CAAC,WAAW,EAAE;KACjC,CAAC,CAAC,CACJ,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface InvokeOptions {
|
|
2
|
+
cwd: string;
|
|
3
|
+
model?: string;
|
|
4
|
+
effort?: string;
|
|
5
|
+
timeout?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ProviderResponse {
|
|
8
|
+
content: string;
|
|
9
|
+
exitCode: number;
|
|
10
|
+
duration: number;
|
|
11
|
+
}
|
|
12
|
+
export interface Provider {
|
|
13
|
+
name: string;
|
|
14
|
+
invoke(prompt: string, options: InvokeOptions): Promise<ProviderResponse>;
|
|
15
|
+
isAvailable(): Promise<boolean>;
|
|
16
|
+
getModels(): string[];
|
|
17
|
+
getEffortLevels(): string[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/providers/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ProviderConfigSchema: z.ZodObject<{
|
|
3
|
+
provider: z.ZodString;
|
|
4
|
+
model: z.ZodOptional<z.ZodString>;
|
|
5
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
provider: string;
|
|
8
|
+
model?: string | undefined;
|
|
9
|
+
effort?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
provider: string;
|
|
12
|
+
model?: string | undefined;
|
|
13
|
+
effort?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const PlanpongConfigSchema: z.ZodObject<{
|
|
16
|
+
planner: z.ZodObject<{
|
|
17
|
+
provider: z.ZodString;
|
|
18
|
+
model: z.ZodOptional<z.ZodString>;
|
|
19
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
provider: string;
|
|
22
|
+
model?: string | undefined;
|
|
23
|
+
effort?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
provider: string;
|
|
26
|
+
model?: string | undefined;
|
|
27
|
+
effort?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
reviewer: z.ZodObject<{
|
|
30
|
+
provider: z.ZodString;
|
|
31
|
+
model: z.ZodOptional<z.ZodString>;
|
|
32
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
provider: string;
|
|
35
|
+
model?: string | undefined;
|
|
36
|
+
effort?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
provider: string;
|
|
39
|
+
model?: string | undefined;
|
|
40
|
+
effort?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
plans_dir: z.ZodDefault<z.ZodString>;
|
|
43
|
+
max_rounds: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
human_in_loop: z.ZodDefault<z.ZodBoolean>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
planner: {
|
|
47
|
+
provider: string;
|
|
48
|
+
model?: string | undefined;
|
|
49
|
+
effort?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
reviewer: {
|
|
52
|
+
provider: string;
|
|
53
|
+
model?: string | undefined;
|
|
54
|
+
effort?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
plans_dir: string;
|
|
57
|
+
max_rounds: number;
|
|
58
|
+
human_in_loop: boolean;
|
|
59
|
+
}, {
|
|
60
|
+
planner: {
|
|
61
|
+
provider: string;
|
|
62
|
+
model?: string | undefined;
|
|
63
|
+
effort?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
reviewer: {
|
|
66
|
+
provider: string;
|
|
67
|
+
model?: string | undefined;
|
|
68
|
+
effort?: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
plans_dir?: string | undefined;
|
|
71
|
+
max_rounds?: number | undefined;
|
|
72
|
+
human_in_loop?: boolean | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export type ProviderConfig = z.infer<typeof ProviderConfigSchema>;
|
|
75
|
+
export type PlanpongConfig = z.infer<typeof PlanpongConfigSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const ProviderConfigSchema = z.object({
|
|
3
|
+
provider: z.string(),
|
|
4
|
+
model: z.string().optional(),
|
|
5
|
+
effort: z.string().optional(),
|
|
6
|
+
});
|
|
7
|
+
export const PlanpongConfigSchema = z.object({
|
|
8
|
+
planner: ProviderConfigSchema,
|
|
9
|
+
reviewer: ProviderConfigSchema,
|
|
10
|
+
plans_dir: z.string().default("docs/plans"),
|
|
11
|
+
max_rounds: z.number().int().min(1).max(50).default(10),
|
|
12
|
+
human_in_loop: z.boolean().default(true),
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/schemas/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,oBAAoB;IAC7B,QAAQ,EAAE,oBAAoB;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvD,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const FeedbackIssueSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
severity: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
5
|
+
section: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
suggestion: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
severity: "P1" | "P2" | "P3";
|
|
12
|
+
section: string;
|
|
13
|
+
title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
suggestion: string;
|
|
16
|
+
}, {
|
|
17
|
+
id: string;
|
|
18
|
+
severity: "P1" | "P2" | "P3";
|
|
19
|
+
section: string;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
suggestion: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
25
|
+
verdict: z.ZodEnum<["needs_revision", "approved", "approved_with_notes"]>;
|
|
26
|
+
summary: z.ZodString;
|
|
27
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
severity: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
30
|
+
section: z.ZodString;
|
|
31
|
+
title: z.ZodString;
|
|
32
|
+
description: z.ZodString;
|
|
33
|
+
suggestion: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
id: string;
|
|
36
|
+
severity: "P1" | "P2" | "P3";
|
|
37
|
+
section: string;
|
|
38
|
+
title: string;
|
|
39
|
+
description: string;
|
|
40
|
+
suggestion: string;
|
|
41
|
+
}, {
|
|
42
|
+
id: string;
|
|
43
|
+
severity: "P1" | "P2" | "P3";
|
|
44
|
+
section: string;
|
|
45
|
+
title: string;
|
|
46
|
+
description: string;
|
|
47
|
+
suggestion: string;
|
|
48
|
+
}>, "many">;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
issues: {
|
|
51
|
+
id: string;
|
|
52
|
+
severity: "P1" | "P2" | "P3";
|
|
53
|
+
section: string;
|
|
54
|
+
title: string;
|
|
55
|
+
description: string;
|
|
56
|
+
suggestion: string;
|
|
57
|
+
}[];
|
|
58
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
59
|
+
summary: string;
|
|
60
|
+
}, {
|
|
61
|
+
issues: {
|
|
62
|
+
id: string;
|
|
63
|
+
severity: "P1" | "P2" | "P3";
|
|
64
|
+
section: string;
|
|
65
|
+
title: string;
|
|
66
|
+
description: string;
|
|
67
|
+
suggestion: string;
|
|
68
|
+
}[];
|
|
69
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
70
|
+
summary: string;
|
|
71
|
+
}>, {
|
|
72
|
+
issues: {
|
|
73
|
+
id: string;
|
|
74
|
+
severity: "P1" | "P2" | "P3";
|
|
75
|
+
section: string;
|
|
76
|
+
title: string;
|
|
77
|
+
description: string;
|
|
78
|
+
suggestion: string;
|
|
79
|
+
}[];
|
|
80
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
81
|
+
summary: string;
|
|
82
|
+
}, {
|
|
83
|
+
issues: {
|
|
84
|
+
id: string;
|
|
85
|
+
severity: "P1" | "P2" | "P3";
|
|
86
|
+
section: string;
|
|
87
|
+
title: string;
|
|
88
|
+
description: string;
|
|
89
|
+
suggestion: string;
|
|
90
|
+
}[];
|
|
91
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
92
|
+
summary: string;
|
|
93
|
+
}>;
|
|
94
|
+
export type FeedbackIssue = z.infer<typeof FeedbackIssueSchema>;
|
|
95
|
+
export type ReviewFeedback = z.infer<typeof ReviewFeedbackSchema>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const FeedbackIssueSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
severity: z.enum(["P1", "P2", "P3"]),
|
|
5
|
+
section: z.string(),
|
|
6
|
+
title: z.string(),
|
|
7
|
+
description: z.string(),
|
|
8
|
+
suggestion: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export const ReviewFeedbackSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
verdict: z.enum(["needs_revision", "approved", "approved_with_notes"]),
|
|
13
|
+
summary: z.string(),
|
|
14
|
+
issues: z.array(FeedbackIssueSchema),
|
|
15
|
+
})
|
|
16
|
+
.refine((data) => {
|
|
17
|
+
if (data.verdict === "approved_with_notes") {
|
|
18
|
+
return data.issues.every((issue) => issue.severity === "P3");
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}, {
|
|
22
|
+
message: "approved_with_notes is only valid when all issues are P3. Either downgrade issues to P3 or change verdict to needs_revision.",
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../../src/schemas/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,UAAU,EAAE,qBAAqB,CAAC,CAAC;IACtE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;CACrC,CAAC;KACD,MAAM,CACL,CAAC,IAAI,EAAE,EAAE;IACP,IAAI,IAAI,CAAC,OAAO,KAAK,qBAAqB,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,EACD;IACE,OAAO,EACL,8HAA8H;CACjI,CACF,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SeverityDisputeSchema: z.ZodObject<{
|
|
3
|
+
original: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
4
|
+
revised: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
5
|
+
justification: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
original: "P1" | "P2" | "P3";
|
|
8
|
+
revised: "P1" | "P2" | "P3";
|
|
9
|
+
justification: string;
|
|
10
|
+
}, {
|
|
11
|
+
original: "P1" | "P2" | "P3";
|
|
12
|
+
revised: "P1" | "P2" | "P3";
|
|
13
|
+
justification: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const IssueResponseSchema: z.ZodObject<{
|
|
16
|
+
issue_id: z.ZodString;
|
|
17
|
+
action: z.ZodEnum<["accepted", "rejected", "deferred"]>;
|
|
18
|
+
severity_dispute: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
original: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
20
|
+
revised: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
21
|
+
justification: z.ZodString;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
original: "P1" | "P2" | "P3";
|
|
24
|
+
revised: "P1" | "P2" | "P3";
|
|
25
|
+
justification: string;
|
|
26
|
+
}, {
|
|
27
|
+
original: "P1" | "P2" | "P3";
|
|
28
|
+
revised: "P1" | "P2" | "P3";
|
|
29
|
+
justification: string;
|
|
30
|
+
}>>;
|
|
31
|
+
rationale: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
issue_id: string;
|
|
34
|
+
action: "accepted" | "rejected" | "deferred";
|
|
35
|
+
rationale: string;
|
|
36
|
+
severity_dispute?: {
|
|
37
|
+
original: "P1" | "P2" | "P3";
|
|
38
|
+
revised: "P1" | "P2" | "P3";
|
|
39
|
+
justification: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
issue_id: string;
|
|
43
|
+
action: "accepted" | "rejected" | "deferred";
|
|
44
|
+
rationale: string;
|
|
45
|
+
severity_dispute?: {
|
|
46
|
+
original: "P1" | "P2" | "P3";
|
|
47
|
+
revised: "P1" | "P2" | "P3";
|
|
48
|
+
justification: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const PlannerRevisionSchema: z.ZodObject<{
|
|
52
|
+
responses: z.ZodArray<z.ZodObject<{
|
|
53
|
+
issue_id: z.ZodString;
|
|
54
|
+
action: z.ZodEnum<["accepted", "rejected", "deferred"]>;
|
|
55
|
+
severity_dispute: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
original: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
57
|
+
revised: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
58
|
+
justification: z.ZodString;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
original: "P1" | "P2" | "P3";
|
|
61
|
+
revised: "P1" | "P2" | "P3";
|
|
62
|
+
justification: string;
|
|
63
|
+
}, {
|
|
64
|
+
original: "P1" | "P2" | "P3";
|
|
65
|
+
revised: "P1" | "P2" | "P3";
|
|
66
|
+
justification: string;
|
|
67
|
+
}>>;
|
|
68
|
+
rationale: z.ZodString;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
issue_id: string;
|
|
71
|
+
action: "accepted" | "rejected" | "deferred";
|
|
72
|
+
rationale: string;
|
|
73
|
+
severity_dispute?: {
|
|
74
|
+
original: "P1" | "P2" | "P3";
|
|
75
|
+
revised: "P1" | "P2" | "P3";
|
|
76
|
+
justification: string;
|
|
77
|
+
} | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
issue_id: string;
|
|
80
|
+
action: "accepted" | "rejected" | "deferred";
|
|
81
|
+
rationale: string;
|
|
82
|
+
severity_dispute?: {
|
|
83
|
+
original: "P1" | "P2" | "P3";
|
|
84
|
+
revised: "P1" | "P2" | "P3";
|
|
85
|
+
justification: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
}>, "many">;
|
|
88
|
+
updated_plan: z.ZodString;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
responses: {
|
|
91
|
+
issue_id: string;
|
|
92
|
+
action: "accepted" | "rejected" | "deferred";
|
|
93
|
+
rationale: string;
|
|
94
|
+
severity_dispute?: {
|
|
95
|
+
original: "P1" | "P2" | "P3";
|
|
96
|
+
revised: "P1" | "P2" | "P3";
|
|
97
|
+
justification: string;
|
|
98
|
+
} | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
updated_plan: string;
|
|
101
|
+
}, {
|
|
102
|
+
responses: {
|
|
103
|
+
issue_id: string;
|
|
104
|
+
action: "accepted" | "rejected" | "deferred";
|
|
105
|
+
rationale: string;
|
|
106
|
+
severity_dispute?: {
|
|
107
|
+
original: "P1" | "P2" | "P3";
|
|
108
|
+
revised: "P1" | "P2" | "P3";
|
|
109
|
+
justification: string;
|
|
110
|
+
} | undefined;
|
|
111
|
+
}[];
|
|
112
|
+
updated_plan: string;
|
|
113
|
+
}>;
|
|
114
|
+
export type SeverityDispute = z.infer<typeof SeverityDisputeSchema>;
|
|
115
|
+
export type IssueResponse = z.infer<typeof IssueResponseSchema>;
|
|
116
|
+
export type PlannerRevision = z.infer<typeof PlannerRevisionSchema>;
|