planpong 0.5.7 → 0.6.1
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 +53 -14
- package/dist/bin/planpong.js +4 -0
- package/dist/bin/planpong.js.map +1 -1
- package/dist/src/cli/commands/config.d.ts +10 -0
- package/dist/src/cli/commands/config.js +65 -0
- package/dist/src/cli/commands/config.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts +53 -0
- package/dist/src/cli/commands/init.js +221 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/commands/plan.js +7 -7
- package/dist/src/cli/commands/plan.js.map +1 -1
- package/dist/src/cli/commands/review.js +7 -7
- package/dist/src/cli/commands/review.js.map +1 -1
- package/dist/src/cli/ui.js +11 -19
- package/dist/src/cli/ui.js.map +1 -1
- package/dist/src/config/loader.d.ts +5 -0
- package/dist/src/config/loader.js +21 -1
- package/dist/src/config/loader.js.map +1 -1
- package/dist/src/config/mutate.d.ts +26 -0
- package/dist/src/config/mutate.js +51 -38
- package/dist/src/config/mutate.js.map +1 -1
- package/dist/src/core/convergence.js +1 -1
- package/dist/src/core/convergence.js.map +1 -1
- package/dist/src/core/operations.d.ts +44 -1
- package/dist/src/core/operations.js +110 -37
- package/dist/src/core/operations.js.map +1 -1
- package/dist/src/core/presentation.d.ts +39 -0
- package/dist/src/core/presentation.js +132 -0
- package/dist/src/core/presentation.js.map +1 -0
- package/dist/src/core/round-state.d.ts +15 -0
- package/dist/src/core/round-state.js +49 -0
- package/dist/src/core/round-state.js.map +1 -0
- package/dist/src/core/session.d.ts +1 -0
- package/dist/src/core/session.js +60 -1
- package/dist/src/core/session.js.map +1 -1
- package/dist/src/mcp/server.js +6 -6
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools/get-feedback.d.ts +1 -2
- package/dist/src/mcp/tools/get-feedback.js +154 -56
- package/dist/src/mcp/tools/get-feedback.js.map +1 -1
- package/dist/src/mcp/tools/record-revision.d.ts +0 -6
- package/dist/src/mcp/tools/record-revision.js +170 -95
- package/dist/src/mcp/tools/record-revision.js.map +1 -1
- package/dist/src/mcp/tools/revise.d.ts +1 -7
- package/dist/src/mcp/tools/revise.js +126 -90
- package/dist/src/mcp/tools/revise.js.map +1 -1
- package/dist/src/mcp/tools/status.js +18 -1
- package/dist/src/mcp/tools/status.js.map +1 -1
- package/dist/src/providers/claude.d.ts +22 -1
- package/dist/src/providers/claude.js +10 -10
- package/dist/src/providers/claude.js.map +1 -1
- package/dist/src/providers/codex.d.ts +12 -1
- package/dist/src/providers/codex.js +6 -3
- package/dist/src/providers/codex.js.map +1 -1
- package/dist/src/providers/gemini.d.ts +58 -0
- package/dist/src/providers/gemini.js +169 -0
- package/dist/src/providers/gemini.js.map +1 -0
- package/dist/src/providers/registry.js +8 -2
- package/dist/src/providers/registry.js.map +1 -1
- package/dist/src/providers/shared.d.ts +16 -0
- package/dist/src/providers/shared.js +22 -0
- package/dist/src/providers/shared.js.map +1 -0
- package/dist/src/providers/types.d.ts +1 -1
- package/dist/src/schemas/metrics.d.ts +14 -14
- package/dist/src/schemas/metrics.js +13 -2
- package/dist/src/schemas/metrics.js.map +1 -1
- package/dist/src/schemas/session.d.ts +2 -2
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const InvocationAttemptSchema: z.ZodObject<{
|
|
3
|
-
mode: z.ZodEnum<["structured", "
|
|
3
|
+
mode: z.ZodEffects<z.ZodEnum<["structured", "prompted"]>, "structured" | "prompted", unknown>;
|
|
4
4
|
provider: z.ZodString;
|
|
5
5
|
model: z.ZodNullable<z.ZodString>;
|
|
6
6
|
effort: z.ZodNullable<z.ZodString>;
|
|
@@ -16,28 +16,28 @@ export declare const InvocationAttemptSchema: z.ZodObject<{
|
|
|
16
16
|
provider: string;
|
|
17
17
|
model: string | null;
|
|
18
18
|
effort: string | null;
|
|
19
|
-
|
|
20
|
-
mode: "structured" | "legacy";
|
|
19
|
+
mode: "structured" | "prompted";
|
|
21
20
|
prompt_chars: number;
|
|
22
21
|
prompt_lines: number;
|
|
23
22
|
output_chars: number | null;
|
|
24
23
|
output_lines: number | null;
|
|
25
24
|
duration_ms: number;
|
|
25
|
+
ok: boolean;
|
|
26
26
|
error_kind: "capability" | "fatal" | "parse" | "zod" | "edit-retry" | null;
|
|
27
27
|
error_exit_code: number | null;
|
|
28
28
|
}, {
|
|
29
29
|
provider: string;
|
|
30
30
|
model: string | null;
|
|
31
31
|
effort: string | null;
|
|
32
|
-
ok: boolean;
|
|
33
|
-
mode: "structured" | "legacy";
|
|
34
32
|
prompt_chars: number;
|
|
35
33
|
prompt_lines: number;
|
|
36
34
|
output_chars: number | null;
|
|
37
35
|
output_lines: number | null;
|
|
38
36
|
duration_ms: number;
|
|
37
|
+
ok: boolean;
|
|
39
38
|
error_kind: "capability" | "fatal" | "parse" | "zod" | "edit-retry" | null;
|
|
40
39
|
error_exit_code: number | null;
|
|
40
|
+
mode?: unknown;
|
|
41
41
|
}>;
|
|
42
42
|
export declare const RoundMetricsSchema: z.ZodObject<{
|
|
43
43
|
schema_version: z.ZodLiteral<1>;
|
|
@@ -49,7 +49,7 @@ export declare const RoundMetricsSchema: z.ZodObject<{
|
|
|
49
49
|
completed_at: z.ZodString;
|
|
50
50
|
total_duration_ms: z.ZodNumber;
|
|
51
51
|
attempts: z.ZodArray<z.ZodObject<{
|
|
52
|
-
mode: z.ZodEnum<["structured", "
|
|
52
|
+
mode: z.ZodEffects<z.ZodEnum<["structured", "prompted"]>, "structured" | "prompted", unknown>;
|
|
53
53
|
provider: z.ZodString;
|
|
54
54
|
model: z.ZodNullable<z.ZodString>;
|
|
55
55
|
effort: z.ZodNullable<z.ZodString>;
|
|
@@ -65,28 +65,28 @@ export declare const RoundMetricsSchema: z.ZodObject<{
|
|
|
65
65
|
provider: string;
|
|
66
66
|
model: string | null;
|
|
67
67
|
effort: string | null;
|
|
68
|
-
|
|
69
|
-
mode: "structured" | "legacy";
|
|
68
|
+
mode: "structured" | "prompted";
|
|
70
69
|
prompt_chars: number;
|
|
71
70
|
prompt_lines: number;
|
|
72
71
|
output_chars: number | null;
|
|
73
72
|
output_lines: number | null;
|
|
74
73
|
duration_ms: number;
|
|
74
|
+
ok: boolean;
|
|
75
75
|
error_kind: "capability" | "fatal" | "parse" | "zod" | "edit-retry" | null;
|
|
76
76
|
error_exit_code: number | null;
|
|
77
77
|
}, {
|
|
78
78
|
provider: string;
|
|
79
79
|
model: string | null;
|
|
80
80
|
effort: string | null;
|
|
81
|
-
ok: boolean;
|
|
82
|
-
mode: "structured" | "legacy";
|
|
83
81
|
prompt_chars: number;
|
|
84
82
|
prompt_lines: number;
|
|
85
83
|
output_chars: number | null;
|
|
86
84
|
output_lines: number | null;
|
|
87
85
|
duration_ms: number;
|
|
86
|
+
ok: boolean;
|
|
88
87
|
error_kind: "capability" | "fatal" | "parse" | "zod" | "edit-retry" | null;
|
|
89
88
|
error_exit_code: number | null;
|
|
89
|
+
mode?: unknown;
|
|
90
90
|
}>, "many">;
|
|
91
91
|
revision_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["full", "edits"]>>>;
|
|
92
92
|
edits_attempted: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -109,13 +109,13 @@ export declare const RoundMetricsSchema: z.ZodObject<{
|
|
|
109
109
|
provider: string;
|
|
110
110
|
model: string | null;
|
|
111
111
|
effort: string | null;
|
|
112
|
-
|
|
113
|
-
mode: "structured" | "legacy";
|
|
112
|
+
mode: "structured" | "prompted";
|
|
114
113
|
prompt_chars: number;
|
|
115
114
|
prompt_lines: number;
|
|
116
115
|
output_chars: number | null;
|
|
117
116
|
output_lines: number | null;
|
|
118
117
|
duration_ms: number;
|
|
118
|
+
ok: boolean;
|
|
119
119
|
error_kind: "capability" | "fatal" | "parse" | "zod" | "edit-retry" | null;
|
|
120
120
|
error_exit_code: number | null;
|
|
121
121
|
}[];
|
|
@@ -140,15 +140,15 @@ export declare const RoundMetricsSchema: z.ZodObject<{
|
|
|
140
140
|
provider: string;
|
|
141
141
|
model: string | null;
|
|
142
142
|
effort: string | null;
|
|
143
|
-
ok: boolean;
|
|
144
|
-
mode: "structured" | "legacy";
|
|
145
143
|
prompt_chars: number;
|
|
146
144
|
prompt_lines: number;
|
|
147
145
|
output_chars: number | null;
|
|
148
146
|
output_lines: number | null;
|
|
149
147
|
duration_ms: number;
|
|
148
|
+
ok: boolean;
|
|
150
149
|
error_kind: "capability" | "fatal" | "parse" | "zod" | "edit-retry" | null;
|
|
151
150
|
error_exit_code: number | null;
|
|
151
|
+
mode?: unknown;
|
|
152
152
|
}[];
|
|
153
153
|
revision_mode?: "edits" | "full" | null | undefined;
|
|
154
154
|
planner_mode?: "external" | "inline" | undefined;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
// Schema-enforcement mode for a single provider invocation:
|
|
3
|
+
// - "structured": output shape was constrained at the API level via the
|
|
4
|
+
// provider's schema flag (`--json-schema`, `--output-schema`).
|
|
5
|
+
// - "prompted": output shape was requested through prompt instructions
|
|
6
|
+
// wrapped in `<planpong-feedback>` / `<planpong-revision>` tags, then
|
|
7
|
+
// extracted and parsed. Used when the provider lacks a schema flag
|
|
8
|
+
// (e.g., gemini) or after a structured-mode failure downgrades.
|
|
9
|
+
//
|
|
10
|
+
// Reads accept the historical name `"legacy"` and normalize it to
|
|
11
|
+
// `"prompted"` so metrics files written before the rename still parse.
|
|
12
|
+
const InvocationModeSchema = z.preprocess((value) => (value === "legacy" ? "prompted" : value), z.enum(["structured", "prompted"]));
|
|
2
13
|
export const InvocationAttemptSchema = z.object({
|
|
3
|
-
mode:
|
|
14
|
+
mode: InvocationModeSchema,
|
|
4
15
|
provider: z.string(),
|
|
5
16
|
model: z.string().nullable(),
|
|
6
17
|
effort: z.string().nullable(),
|
|
@@ -12,7 +23,7 @@ export const InvocationAttemptSchema = z.object({
|
|
|
12
23
|
ok: z.boolean(),
|
|
13
24
|
// `edit-retry` marks the targeted retry pass for failed edits in
|
|
14
25
|
// edits-mode revisions. It is not a state-machine downgrade — the
|
|
15
|
-
// structured/
|
|
26
|
+
// structured/prompted mode is captured in `mode` independently.
|
|
16
27
|
error_kind: z
|
|
17
28
|
.enum(["capability", "fatal", "parse", "zod", "edit-retry"])
|
|
18
29
|
.nullable(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/schemas/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/schemas/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4DAA4D;AAC5D,wEAAwE;AACxE,iEAAiE;AACjE,uEAAuE;AACvE,wEAAwE;AACxE,qEAAqE;AACrE,kEAAkE;AAClE,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,MAAM,oBAAoB,GAAG,CAAC,CAAC,UAAU,CACvC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACpD,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,oBAAoB;IAC1B,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;IAC7B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,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,CAAC,MAAM;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -51,13 +51,13 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
51
51
|
model?: string | undefined;
|
|
52
52
|
effort?: string | undefined;
|
|
53
53
|
};
|
|
54
|
-
plannerMode: "external" | "inline";
|
|
55
54
|
repoRoot: string;
|
|
56
55
|
planPath: string;
|
|
57
56
|
planPathAbsolute: string;
|
|
58
57
|
currentRound: number;
|
|
59
58
|
startedAt: string;
|
|
60
59
|
planHash: string;
|
|
60
|
+
plannerMode: "external" | "inline";
|
|
61
61
|
initialLineCount?: number | undefined;
|
|
62
62
|
reviewerSessionId?: string | undefined;
|
|
63
63
|
reviewerSessionInitialized?: boolean | undefined;
|
|
@@ -80,9 +80,9 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
80
80
|
currentRound: number;
|
|
81
81
|
startedAt: string;
|
|
82
82
|
planHash: string;
|
|
83
|
-
plannerMode?: "external" | "inline" | undefined;
|
|
84
83
|
initialLineCount?: number | undefined;
|
|
85
84
|
reviewerSessionId?: string | undefined;
|
|
86
85
|
reviewerSessionInitialized?: boolean | undefined;
|
|
86
|
+
plannerMode?: "external" | "inline" | undefined;
|
|
87
87
|
}>;
|
|
88
88
|
export type Session = z.infer<typeof SessionSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "planpong",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Multi-model adversarial plan review — orchestrates AI agents to critique and refine implementation plans",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"adversarial",
|
|
29
29
|
"ai-agents",
|
|
30
30
|
"claude",
|
|
31
|
-
"codex"
|
|
31
|
+
"codex",
|
|
32
|
+
"gemini"
|
|
32
33
|
],
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|