@planningo/duul 1.0.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/LICENSE +21 -0
- package/README.ko.md +438 -0
- package/README.md +463 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +18 -0
- package/build/prompts/code-review-system.d.ts +9 -0
- package/build/prompts/code-review-system.js +116 -0
- package/build/prompts/execution-partition-system.d.ts +11 -0
- package/build/prompts/execution-partition-system.js +76 -0
- package/build/prompts/plan-review-system.d.ts +29 -0
- package/build/prompts/plan-review-system.js +175 -0
- package/build/schemas/code-review.d.ts +514 -0
- package/build/schemas/code-review.js +175 -0
- package/build/schemas/common.d.ts +118 -0
- package/build/schemas/common.js +64 -0
- package/build/schemas/execution-partition.d.ts +597 -0
- package/build/schemas/execution-partition.js +107 -0
- package/build/schemas/plan-review.d.ts +523 -0
- package/build/schemas/plan-review.js +175 -0
- package/build/services/filesystem-tools.d.ts +6 -0
- package/build/services/filesystem-tools.js +39 -0
- package/build/services/filesystem.d.ts +69 -0
- package/build/services/filesystem.js +609 -0
- package/build/services/pricing.d.ts +8 -0
- package/build/services/pricing.js +105 -0
- package/build/services/providers/anthropic.d.ts +28 -0
- package/build/services/providers/anthropic.js +431 -0
- package/build/services/providers/google.d.ts +28 -0
- package/build/services/providers/google.js +358 -0
- package/build/services/providers/openai.d.ts +22 -0
- package/build/services/providers/openai.js +395 -0
- package/build/services/providers/types.d.ts +82 -0
- package/build/services/providers/types.js +1 -0
- package/build/services/review-gates.d.ts +83 -0
- package/build/services/review-gates.js +200 -0
- package/build/services/review-limits.d.ts +36 -0
- package/build/services/review-limits.js +65 -0
- package/build/services/reviewer.d.ts +30 -0
- package/build/services/reviewer.js +243 -0
- package/build/services/usage-logger.d.ts +2 -0
- package/build/services/usage-logger.js +42 -0
- package/build/tools/code-review.d.ts +2 -0
- package/build/tools/code-review.js +178 -0
- package/build/tools/execution-partition.d.ts +2 -0
- package/build/tools/execution-partition.js +146 -0
- package/build/tools/plan-review.d.ts +2 -0
- package/build/tools/plan-review.js +183 -0
- package/package.json +65 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ArtifactRefSchema, ReviewerConfigSchema, IterationMetaOutputSchema, TokenUsageOutputSchema } from './common.js';
|
|
3
|
+
export const ExecutionPartitionInputSchema = z.object({
|
|
4
|
+
approved_plan: z
|
|
5
|
+
.string()
|
|
6
|
+
.min(1, 'approved_plan must not be empty')
|
|
7
|
+
.describe('The previously approved plan to partition into execution units'),
|
|
8
|
+
workspace_root: z
|
|
9
|
+
.string()
|
|
10
|
+
.describe('Absolute path to the workspace root directory'),
|
|
11
|
+
working_directories: z
|
|
12
|
+
.array(z.string())
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('Subdirectories within workspace_root to restrict scope to'),
|
|
15
|
+
changed_files: z
|
|
16
|
+
.array(z.string())
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Files changed in this scope'),
|
|
19
|
+
entrypoints: z
|
|
20
|
+
.array(z.string())
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Entry point files'),
|
|
23
|
+
artifact_refs: z
|
|
24
|
+
.array(ArtifactRefSchema)
|
|
25
|
+
.max(30)
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('References to important files with reason and priority. Max 30.'),
|
|
28
|
+
constraints: z
|
|
29
|
+
.array(z.string())
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('Special constraints for partitioning'),
|
|
32
|
+
max_parallelism: z
|
|
33
|
+
.number()
|
|
34
|
+
.min(1)
|
|
35
|
+
.max(10)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Maximum number of parallel subtasks. Default 3.'),
|
|
38
|
+
previous_review_id: z
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe('Response ID from the plan review. Pass this to give the partitioner ' +
|
|
42
|
+
'context from the plan review conversation.'),
|
|
43
|
+
// --- Iteration tracking ---
|
|
44
|
+
iteration_count: z
|
|
45
|
+
.number()
|
|
46
|
+
.min(1)
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Current iteration number (1-based). Caller tracks and increments.'),
|
|
49
|
+
max_review_iterations: z
|
|
50
|
+
.number()
|
|
51
|
+
.min(1)
|
|
52
|
+
.max(20)
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('Override the default iteration limit for this request.'),
|
|
55
|
+
// --- Reviewer config ---
|
|
56
|
+
reviewer_config: ReviewerConfigSchema.optional().describe('Per-request reviewer configuration. Overrides env defaults.'),
|
|
57
|
+
});
|
|
58
|
+
const SubtaskScopeSchema = z.object({
|
|
59
|
+
working_directories: z.array(z.string()).optional().describe('Subdirectories for this subtask'),
|
|
60
|
+
changed_files: z.array(z.string()).optional().describe('Files this subtask will change'),
|
|
61
|
+
entrypoints: z.array(z.string()).optional().describe('Entry points for this subtask'),
|
|
62
|
+
artifact_refs: z.array(ArtifactRefSchema).optional().describe('Relevant files for this subtask'),
|
|
63
|
+
linked_roots: z.array(z.string()).optional().describe('Read-only external roots this subtask needs'),
|
|
64
|
+
});
|
|
65
|
+
const SubtaskSchema = z.object({
|
|
66
|
+
id: z.string().describe('Unique subtask identifier'),
|
|
67
|
+
title: z.string().describe('Short title for the subtask'),
|
|
68
|
+
goal: z.string().describe('What this subtask accomplishes'),
|
|
69
|
+
can_run_in_parallel: z.boolean().describe('Whether this subtask can run concurrently with other parallel-eligible subtasks'),
|
|
70
|
+
depends_on: z.array(z.string()).describe('IDs of subtasks that must complete before this one'),
|
|
71
|
+
workspace_name_hint: z.string().describe('Suggested workspace name for this subtask'),
|
|
72
|
+
spawn_strategy: z.enum(['new_workspace', 'reuse_workspace']).describe('Whether to create a new isolated workspace or reuse the existing one. ' +
|
|
73
|
+
'new_workspace for parallel tasks, reuse_workspace for serial/small changes.'),
|
|
74
|
+
scope: SubtaskScopeSchema.describe('File scope for this subtask'),
|
|
75
|
+
handoff_contract: z.array(z.string()).describe('Contracts this subtask must fulfill for downstream subtasks (e.g. "API endpoint /foo uses this schema")'),
|
|
76
|
+
completion_criteria: z.array(z.string()).describe('Conditions that must be met for this subtask to be complete'),
|
|
77
|
+
review_focus: z.array(z.string()).describe('What the code reviewer should focus on for this subtask'),
|
|
78
|
+
risk_level: z.enum(['high', 'medium', 'low']).describe('Risk level of this subtask'),
|
|
79
|
+
});
|
|
80
|
+
const RetryPolicySchema = z.object({
|
|
81
|
+
max_retries: z.number().describe('Maximum retry attempts per subtask. Default 2.'),
|
|
82
|
+
on_review_revise: z.literal('retry_subtask').describe('Action when review returns REVISE'),
|
|
83
|
+
on_tool_exhaustion: z.literal('retry_with_narrower_scope').describe('Action when tool loop is exhausted'),
|
|
84
|
+
on_conflict: z.literal('serialize_and_retry').describe('Action when two subtasks conflict on the same files'),
|
|
85
|
+
on_blocker: z.literal('escalate_to_human').describe('Action when a blocking issue cannot be auto-resolved'),
|
|
86
|
+
on_max_retries_exceeded: z.literal('abort_subtask_and_report').describe('Action when max retries exceeded'),
|
|
87
|
+
});
|
|
88
|
+
export const ExecutionPartitionOutputSchema = z.object({
|
|
89
|
+
execution_mode: z.enum(['serial', 'parallel', 'hybrid']).describe('Overall execution mode. serial = all subtasks sequential, parallel = all concurrent, hybrid = mixed.'),
|
|
90
|
+
rationale: z.string().describe('Why this execution mode and partitioning was chosen'),
|
|
91
|
+
requires_human_checkpoint: z.boolean().describe('Whether a human must confirm before execution begins (shared contracts, security, etc.)'),
|
|
92
|
+
human_checkpoint_reasons: z
|
|
93
|
+
.array(z.string())
|
|
94
|
+
.nullable()
|
|
95
|
+
.describe('Why a human checkpoint is required'),
|
|
96
|
+
spawn_strategy: z.enum(['new_workspace', 'reuse_workspace']).describe('Default spawn strategy for subtasks. Individual subtasks can override.'),
|
|
97
|
+
handoff_artifact_pattern: z.string().describe('File pattern for subtask results, e.g. ".context/subtasks/{subtask_id}.json"'),
|
|
98
|
+
subtask_result_schema_version: z.literal('1.0').describe('Version of the subtask result schema'),
|
|
99
|
+
subtasks: z.array(SubtaskSchema).describe('Ordered list of subtasks'),
|
|
100
|
+
global_checkpoints: z.array(z.string()).describe('Points where all prior subtasks must complete before continuing'),
|
|
101
|
+
merge_order: z.array(z.string()).describe('Order in which subtask branches should be merged'),
|
|
102
|
+
retry_policy: RetryPolicySchema.describe('Policy for handling failures during execution'),
|
|
103
|
+
});
|
|
104
|
+
export const ExecutionPartitionMcpOutputSchema = ExecutionPartitionOutputSchema
|
|
105
|
+
.extend({ review_id: z.string().describe('Response ID for context continuity') })
|
|
106
|
+
.merge(IterationMetaOutputSchema)
|
|
107
|
+
.merge(TokenUsageOutputSchema);
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ProjectContextSchema: z.ZodObject<{
|
|
3
|
+
file_tree: z.ZodOptional<z.ZodString>;
|
|
4
|
+
changed_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5
|
+
package_versions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6
|
+
relevant_code: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
file_path: z.ZodString;
|
|
8
|
+
code: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
code: string;
|
|
11
|
+
file_path: string;
|
|
12
|
+
}, {
|
|
13
|
+
code: string;
|
|
14
|
+
file_path: string;
|
|
15
|
+
}>, "many">>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
file_tree?: string | undefined;
|
|
18
|
+
changed_files?: string[] | undefined;
|
|
19
|
+
package_versions?: Record<string, string> | undefined;
|
|
20
|
+
relevant_code?: {
|
|
21
|
+
code: string;
|
|
22
|
+
file_path: string;
|
|
23
|
+
}[] | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
file_tree?: string | undefined;
|
|
26
|
+
changed_files?: string[] | undefined;
|
|
27
|
+
package_versions?: Record<string, string> | undefined;
|
|
28
|
+
relevant_code?: {
|
|
29
|
+
code: string;
|
|
30
|
+
file_path: string;
|
|
31
|
+
}[] | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const PlanReviewInputSchema: z.ZodObject<{
|
|
34
|
+
plan: z.ZodString;
|
|
35
|
+
project_context: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
file_tree: z.ZodOptional<z.ZodString>;
|
|
37
|
+
changed_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
38
|
+
package_versions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
39
|
+
relevant_code: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
40
|
+
file_path: z.ZodString;
|
|
41
|
+
code: z.ZodString;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
code: string;
|
|
44
|
+
file_path: string;
|
|
45
|
+
}, {
|
|
46
|
+
code: string;
|
|
47
|
+
file_path: string;
|
|
48
|
+
}>, "many">>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
file_tree?: string | undefined;
|
|
51
|
+
changed_files?: string[] | undefined;
|
|
52
|
+
package_versions?: Record<string, string> | undefined;
|
|
53
|
+
relevant_code?: {
|
|
54
|
+
code: string;
|
|
55
|
+
file_path: string;
|
|
56
|
+
}[] | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
file_tree?: string | undefined;
|
|
59
|
+
changed_files?: string[] | undefined;
|
|
60
|
+
package_versions?: Record<string, string> | undefined;
|
|
61
|
+
relevant_code?: {
|
|
62
|
+
code: string;
|
|
63
|
+
file_path: string;
|
|
64
|
+
}[] | undefined;
|
|
65
|
+
}>>;
|
|
66
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
67
|
+
notes_to_reviewer: z.ZodOptional<z.ZodString>;
|
|
68
|
+
user_original_request: z.ZodOptional<z.ZodString>;
|
|
69
|
+
workspace_root: z.ZodOptional<z.ZodString>;
|
|
70
|
+
project_root: z.ZodOptional<z.ZodString>;
|
|
71
|
+
working_directories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
72
|
+
linked_roots: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
+
changed_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
|
+
entrypoints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
artifact_refs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
+
path: z.ZodString;
|
|
77
|
+
reason: z.ZodString;
|
|
78
|
+
priority: z.ZodEnum<["high", "medium", "low"]>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
path: string;
|
|
81
|
+
reason: string;
|
|
82
|
+
priority: "high" | "medium" | "low";
|
|
83
|
+
}, {
|
|
84
|
+
path: string;
|
|
85
|
+
reason: string;
|
|
86
|
+
priority: "high" | "medium" | "low";
|
|
87
|
+
}>, "many">>;
|
|
88
|
+
tracked_only: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
git_head_sha: z.ZodOptional<z.ZodString>;
|
|
90
|
+
previous_git_head_sha: z.ZodOptional<z.ZodString>;
|
|
91
|
+
workspace_name: z.ZodOptional<z.ZodString>;
|
|
92
|
+
setup_script_present: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
run_script_present: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
environment_files_expected: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
git_diff: z.ZodOptional<z.ZodString>;
|
|
96
|
+
git_diff_base: z.ZodOptional<z.ZodString>;
|
|
97
|
+
previous_review_id: z.ZodOptional<z.ZodString>;
|
|
98
|
+
iteration_count: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
max_review_iterations: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
reviewer_config: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "anthropic", "google", "openrouter", "compatible"]>>;
|
|
102
|
+
model: z.ZodOptional<z.ZodString>;
|
|
103
|
+
base_url: z.ZodOptional<z.ZodString>;
|
|
104
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
105
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
provider?: "openai" | "anthropic" | "google" | "openrouter" | "compatible" | undefined;
|
|
109
|
+
model?: string | undefined;
|
|
110
|
+
base_url?: string | undefined;
|
|
111
|
+
api_key?: string | undefined;
|
|
112
|
+
temperature?: number | undefined;
|
|
113
|
+
top_p?: number | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
provider?: "openai" | "anthropic" | "google" | "openrouter" | "compatible" | undefined;
|
|
116
|
+
model?: string | undefined;
|
|
117
|
+
base_url?: string | undefined;
|
|
118
|
+
api_key?: string | undefined;
|
|
119
|
+
temperature?: number | undefined;
|
|
120
|
+
top_p?: number | undefined;
|
|
121
|
+
}>>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
plan: string;
|
|
124
|
+
iteration_count?: number | undefined;
|
|
125
|
+
changed_files?: string[] | undefined;
|
|
126
|
+
project_context?: {
|
|
127
|
+
file_tree?: string | undefined;
|
|
128
|
+
changed_files?: string[] | undefined;
|
|
129
|
+
package_versions?: Record<string, string> | undefined;
|
|
130
|
+
relevant_code?: {
|
|
131
|
+
code: string;
|
|
132
|
+
file_path: string;
|
|
133
|
+
}[] | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
constraints?: string[] | undefined;
|
|
136
|
+
notes_to_reviewer?: string | undefined;
|
|
137
|
+
user_original_request?: string | undefined;
|
|
138
|
+
workspace_root?: string | undefined;
|
|
139
|
+
project_root?: string | undefined;
|
|
140
|
+
working_directories?: string[] | undefined;
|
|
141
|
+
linked_roots?: string[] | undefined;
|
|
142
|
+
entrypoints?: string[] | undefined;
|
|
143
|
+
artifact_refs?: {
|
|
144
|
+
path: string;
|
|
145
|
+
reason: string;
|
|
146
|
+
priority: "high" | "medium" | "low";
|
|
147
|
+
}[] | undefined;
|
|
148
|
+
tracked_only?: boolean | undefined;
|
|
149
|
+
git_head_sha?: string | undefined;
|
|
150
|
+
previous_git_head_sha?: string | undefined;
|
|
151
|
+
workspace_name?: string | undefined;
|
|
152
|
+
setup_script_present?: boolean | undefined;
|
|
153
|
+
run_script_present?: boolean | undefined;
|
|
154
|
+
environment_files_expected?: string[] | undefined;
|
|
155
|
+
git_diff?: string | undefined;
|
|
156
|
+
git_diff_base?: string | undefined;
|
|
157
|
+
previous_review_id?: string | undefined;
|
|
158
|
+
max_review_iterations?: number | undefined;
|
|
159
|
+
reviewer_config?: {
|
|
160
|
+
provider?: "openai" | "anthropic" | "google" | "openrouter" | "compatible" | undefined;
|
|
161
|
+
model?: string | undefined;
|
|
162
|
+
base_url?: string | undefined;
|
|
163
|
+
api_key?: string | undefined;
|
|
164
|
+
temperature?: number | undefined;
|
|
165
|
+
top_p?: number | undefined;
|
|
166
|
+
} | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
plan: string;
|
|
169
|
+
iteration_count?: number | undefined;
|
|
170
|
+
changed_files?: string[] | undefined;
|
|
171
|
+
project_context?: {
|
|
172
|
+
file_tree?: string | undefined;
|
|
173
|
+
changed_files?: string[] | undefined;
|
|
174
|
+
package_versions?: Record<string, string> | undefined;
|
|
175
|
+
relevant_code?: {
|
|
176
|
+
code: string;
|
|
177
|
+
file_path: string;
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
} | undefined;
|
|
180
|
+
constraints?: string[] | undefined;
|
|
181
|
+
notes_to_reviewer?: string | undefined;
|
|
182
|
+
user_original_request?: string | undefined;
|
|
183
|
+
workspace_root?: string | undefined;
|
|
184
|
+
project_root?: string | undefined;
|
|
185
|
+
working_directories?: string[] | undefined;
|
|
186
|
+
linked_roots?: string[] | undefined;
|
|
187
|
+
entrypoints?: string[] | undefined;
|
|
188
|
+
artifact_refs?: {
|
|
189
|
+
path: string;
|
|
190
|
+
reason: string;
|
|
191
|
+
priority: "high" | "medium" | "low";
|
|
192
|
+
}[] | undefined;
|
|
193
|
+
tracked_only?: boolean | undefined;
|
|
194
|
+
git_head_sha?: string | undefined;
|
|
195
|
+
previous_git_head_sha?: string | undefined;
|
|
196
|
+
workspace_name?: string | undefined;
|
|
197
|
+
setup_script_present?: boolean | undefined;
|
|
198
|
+
run_script_present?: boolean | undefined;
|
|
199
|
+
environment_files_expected?: string[] | undefined;
|
|
200
|
+
git_diff?: string | undefined;
|
|
201
|
+
git_diff_base?: string | undefined;
|
|
202
|
+
previous_review_id?: string | undefined;
|
|
203
|
+
max_review_iterations?: number | undefined;
|
|
204
|
+
reviewer_config?: {
|
|
205
|
+
provider?: "openai" | "anthropic" | "google" | "openrouter" | "compatible" | undefined;
|
|
206
|
+
model?: string | undefined;
|
|
207
|
+
base_url?: string | undefined;
|
|
208
|
+
api_key?: string | undefined;
|
|
209
|
+
temperature?: number | undefined;
|
|
210
|
+
top_p?: number | undefined;
|
|
211
|
+
} | undefined;
|
|
212
|
+
}>;
|
|
213
|
+
export declare const PlanReviewOutputSchema: z.ZodObject<{
|
|
214
|
+
verdict: z.ZodEnum<["APPROVE", "REVISE"]>;
|
|
215
|
+
review_status: z.ZodEnum<["completed", "incomplete"]>;
|
|
216
|
+
confidence: z.ZodNumber;
|
|
217
|
+
requires_human_review: z.ZodBoolean;
|
|
218
|
+
architectural_analysis: z.ZodString;
|
|
219
|
+
blocking_issues: z.ZodArray<z.ZodObject<{
|
|
220
|
+
description: z.ZodString;
|
|
221
|
+
suggestion: z.ZodString;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
description: string;
|
|
224
|
+
suggestion: string;
|
|
225
|
+
}, {
|
|
226
|
+
description: string;
|
|
227
|
+
suggestion: string;
|
|
228
|
+
}>, "many">;
|
|
229
|
+
merge_blockers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
230
|
+
description: z.ZodString;
|
|
231
|
+
suggestion: z.ZodString;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
description: string;
|
|
234
|
+
suggestion: string;
|
|
235
|
+
}, {
|
|
236
|
+
description: string;
|
|
237
|
+
suggestion: string;
|
|
238
|
+
}>, "many">>;
|
|
239
|
+
non_blocking_suggestions: z.ZodArray<z.ZodString, "many">;
|
|
240
|
+
edge_cases: z.ZodArray<z.ZodString, "many">;
|
|
241
|
+
checklist_for_implementation: z.ZodArray<z.ZodString, "many">;
|
|
242
|
+
follow_up_todos: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
243
|
+
missing_context: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
244
|
+
evidence_files: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
245
|
+
used_tools: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
246
|
+
tool_exhaustion_reason: z.ZodNullable<z.ZodEnum<["budget", "repeat", "round_limit"]>>;
|
|
247
|
+
parallelization_hint: z.ZodNullable<z.ZodEnum<["serial", "parallel", "hybrid"]>>;
|
|
248
|
+
coordination_risks: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
249
|
+
recommended_subtask_boundaries: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
250
|
+
user_original_request_echo: z.ZodNullable<z.ZodString>;
|
|
251
|
+
symptom_impact: z.ZodNullable<z.ZodObject<{
|
|
252
|
+
before: z.ZodString;
|
|
253
|
+
after: z.ZodString;
|
|
254
|
+
causal_chain: z.ZodString;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
before: string;
|
|
257
|
+
after: string;
|
|
258
|
+
causal_chain: string;
|
|
259
|
+
}, {
|
|
260
|
+
before: string;
|
|
261
|
+
after: string;
|
|
262
|
+
causal_chain: string;
|
|
263
|
+
}>>;
|
|
264
|
+
symptom_match_notes: z.ZodNullable<z.ZodString>;
|
|
265
|
+
gates_tripped: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
verdict: "APPROVE" | "REVISE";
|
|
268
|
+
review_status: "completed" | "incomplete";
|
|
269
|
+
confidence: number;
|
|
270
|
+
requires_human_review: boolean;
|
|
271
|
+
architectural_analysis: string;
|
|
272
|
+
blocking_issues: {
|
|
273
|
+
description: string;
|
|
274
|
+
suggestion: string;
|
|
275
|
+
}[];
|
|
276
|
+
merge_blockers: {
|
|
277
|
+
description: string;
|
|
278
|
+
suggestion: string;
|
|
279
|
+
}[] | null;
|
|
280
|
+
non_blocking_suggestions: string[];
|
|
281
|
+
edge_cases: string[];
|
|
282
|
+
checklist_for_implementation: string[];
|
|
283
|
+
follow_up_todos: string[] | null;
|
|
284
|
+
missing_context: string[] | null;
|
|
285
|
+
evidence_files: string[] | null;
|
|
286
|
+
used_tools: string[] | null;
|
|
287
|
+
tool_exhaustion_reason: "budget" | "repeat" | "round_limit" | null;
|
|
288
|
+
parallelization_hint: "serial" | "parallel" | "hybrid" | null;
|
|
289
|
+
coordination_risks: string[] | null;
|
|
290
|
+
recommended_subtask_boundaries: string[] | null;
|
|
291
|
+
user_original_request_echo: string | null;
|
|
292
|
+
symptom_impact: {
|
|
293
|
+
before: string;
|
|
294
|
+
after: string;
|
|
295
|
+
causal_chain: string;
|
|
296
|
+
} | null;
|
|
297
|
+
symptom_match_notes: string | null;
|
|
298
|
+
gates_tripped: string[] | null;
|
|
299
|
+
}, {
|
|
300
|
+
verdict: "APPROVE" | "REVISE";
|
|
301
|
+
review_status: "completed" | "incomplete";
|
|
302
|
+
confidence: number;
|
|
303
|
+
requires_human_review: boolean;
|
|
304
|
+
architectural_analysis: string;
|
|
305
|
+
blocking_issues: {
|
|
306
|
+
description: string;
|
|
307
|
+
suggestion: string;
|
|
308
|
+
}[];
|
|
309
|
+
merge_blockers: {
|
|
310
|
+
description: string;
|
|
311
|
+
suggestion: string;
|
|
312
|
+
}[] | null;
|
|
313
|
+
non_blocking_suggestions: string[];
|
|
314
|
+
edge_cases: string[];
|
|
315
|
+
checklist_for_implementation: string[];
|
|
316
|
+
follow_up_todos: string[] | null;
|
|
317
|
+
missing_context: string[] | null;
|
|
318
|
+
evidence_files: string[] | null;
|
|
319
|
+
used_tools: string[] | null;
|
|
320
|
+
tool_exhaustion_reason: "budget" | "repeat" | "round_limit" | null;
|
|
321
|
+
parallelization_hint: "serial" | "parallel" | "hybrid" | null;
|
|
322
|
+
coordination_risks: string[] | null;
|
|
323
|
+
recommended_subtask_boundaries: string[] | null;
|
|
324
|
+
user_original_request_echo: string | null;
|
|
325
|
+
symptom_impact: {
|
|
326
|
+
before: string;
|
|
327
|
+
after: string;
|
|
328
|
+
causal_chain: string;
|
|
329
|
+
} | null;
|
|
330
|
+
symptom_match_notes: string | null;
|
|
331
|
+
gates_tripped: string[] | null;
|
|
332
|
+
}>;
|
|
333
|
+
export declare const PlanReviewMcpOutputSchema: z.ZodObject<{
|
|
334
|
+
verdict: z.ZodEnum<["APPROVE", "REVISE"]>;
|
|
335
|
+
review_status: z.ZodEnum<["completed", "incomplete"]>;
|
|
336
|
+
confidence: z.ZodNumber;
|
|
337
|
+
requires_human_review: z.ZodBoolean;
|
|
338
|
+
architectural_analysis: z.ZodString;
|
|
339
|
+
blocking_issues: z.ZodArray<z.ZodObject<{
|
|
340
|
+
description: z.ZodString;
|
|
341
|
+
suggestion: z.ZodString;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
description: string;
|
|
344
|
+
suggestion: string;
|
|
345
|
+
}, {
|
|
346
|
+
description: string;
|
|
347
|
+
suggestion: string;
|
|
348
|
+
}>, "many">;
|
|
349
|
+
merge_blockers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
350
|
+
description: z.ZodString;
|
|
351
|
+
suggestion: z.ZodString;
|
|
352
|
+
}, "strip", z.ZodTypeAny, {
|
|
353
|
+
description: string;
|
|
354
|
+
suggestion: string;
|
|
355
|
+
}, {
|
|
356
|
+
description: string;
|
|
357
|
+
suggestion: string;
|
|
358
|
+
}>, "many">>;
|
|
359
|
+
non_blocking_suggestions: z.ZodArray<z.ZodString, "many">;
|
|
360
|
+
edge_cases: z.ZodArray<z.ZodString, "many">;
|
|
361
|
+
checklist_for_implementation: z.ZodArray<z.ZodString, "many">;
|
|
362
|
+
follow_up_todos: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
363
|
+
missing_context: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
364
|
+
evidence_files: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
365
|
+
used_tools: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
366
|
+
tool_exhaustion_reason: z.ZodNullable<z.ZodEnum<["budget", "repeat", "round_limit"]>>;
|
|
367
|
+
parallelization_hint: z.ZodNullable<z.ZodEnum<["serial", "parallel", "hybrid"]>>;
|
|
368
|
+
coordination_risks: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
369
|
+
recommended_subtask_boundaries: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
370
|
+
user_original_request_echo: z.ZodNullable<z.ZodString>;
|
|
371
|
+
symptom_impact: z.ZodNullable<z.ZodObject<{
|
|
372
|
+
before: z.ZodString;
|
|
373
|
+
after: z.ZodString;
|
|
374
|
+
causal_chain: z.ZodString;
|
|
375
|
+
}, "strip", z.ZodTypeAny, {
|
|
376
|
+
before: string;
|
|
377
|
+
after: string;
|
|
378
|
+
causal_chain: string;
|
|
379
|
+
}, {
|
|
380
|
+
before: string;
|
|
381
|
+
after: string;
|
|
382
|
+
causal_chain: string;
|
|
383
|
+
}>>;
|
|
384
|
+
symptom_match_notes: z.ZodNullable<z.ZodString>;
|
|
385
|
+
gates_tripped: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
386
|
+
} & {
|
|
387
|
+
review_id: z.ZodString;
|
|
388
|
+
} & {
|
|
389
|
+
iteration_count: z.ZodNumber;
|
|
390
|
+
iteration_limit: z.ZodNumber;
|
|
391
|
+
iteration_limit_reached: z.ZodBoolean;
|
|
392
|
+
} & {
|
|
393
|
+
token_usage: z.ZodObject<{
|
|
394
|
+
input_tokens: z.ZodNumber;
|
|
395
|
+
output_tokens: z.ZodNumber;
|
|
396
|
+
total_tokens: z.ZodNumber;
|
|
397
|
+
api_calls: z.ZodNumber;
|
|
398
|
+
provider: z.ZodString;
|
|
399
|
+
model: z.ZodString;
|
|
400
|
+
estimated_cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
401
|
+
cached_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
}, "strip", z.ZodTypeAny, {
|
|
404
|
+
provider: string;
|
|
405
|
+
model: string;
|
|
406
|
+
input_tokens: number;
|
|
407
|
+
output_tokens: number;
|
|
408
|
+
total_tokens: number;
|
|
409
|
+
api_calls: number;
|
|
410
|
+
estimated_cost_usd: number | null;
|
|
411
|
+
cached_input_tokens?: number | undefined;
|
|
412
|
+
cache_creation_input_tokens?: number | undefined;
|
|
413
|
+
}, {
|
|
414
|
+
provider: string;
|
|
415
|
+
model: string;
|
|
416
|
+
input_tokens: number;
|
|
417
|
+
output_tokens: number;
|
|
418
|
+
total_tokens: number;
|
|
419
|
+
api_calls: number;
|
|
420
|
+
estimated_cost_usd: number | null;
|
|
421
|
+
cached_input_tokens?: number | undefined;
|
|
422
|
+
cache_creation_input_tokens?: number | undefined;
|
|
423
|
+
}>;
|
|
424
|
+
}, "strip", z.ZodTypeAny, {
|
|
425
|
+
iteration_count: number;
|
|
426
|
+
iteration_limit: number;
|
|
427
|
+
iteration_limit_reached: boolean;
|
|
428
|
+
token_usage: {
|
|
429
|
+
provider: string;
|
|
430
|
+
model: string;
|
|
431
|
+
input_tokens: number;
|
|
432
|
+
output_tokens: number;
|
|
433
|
+
total_tokens: number;
|
|
434
|
+
api_calls: number;
|
|
435
|
+
estimated_cost_usd: number | null;
|
|
436
|
+
cached_input_tokens?: number | undefined;
|
|
437
|
+
cache_creation_input_tokens?: number | undefined;
|
|
438
|
+
};
|
|
439
|
+
verdict: "APPROVE" | "REVISE";
|
|
440
|
+
review_status: "completed" | "incomplete";
|
|
441
|
+
confidence: number;
|
|
442
|
+
requires_human_review: boolean;
|
|
443
|
+
architectural_analysis: string;
|
|
444
|
+
blocking_issues: {
|
|
445
|
+
description: string;
|
|
446
|
+
suggestion: string;
|
|
447
|
+
}[];
|
|
448
|
+
merge_blockers: {
|
|
449
|
+
description: string;
|
|
450
|
+
suggestion: string;
|
|
451
|
+
}[] | null;
|
|
452
|
+
non_blocking_suggestions: string[];
|
|
453
|
+
edge_cases: string[];
|
|
454
|
+
checklist_for_implementation: string[];
|
|
455
|
+
follow_up_todos: string[] | null;
|
|
456
|
+
missing_context: string[] | null;
|
|
457
|
+
evidence_files: string[] | null;
|
|
458
|
+
used_tools: string[] | null;
|
|
459
|
+
tool_exhaustion_reason: "budget" | "repeat" | "round_limit" | null;
|
|
460
|
+
parallelization_hint: "serial" | "parallel" | "hybrid" | null;
|
|
461
|
+
coordination_risks: string[] | null;
|
|
462
|
+
recommended_subtask_boundaries: string[] | null;
|
|
463
|
+
user_original_request_echo: string | null;
|
|
464
|
+
symptom_impact: {
|
|
465
|
+
before: string;
|
|
466
|
+
after: string;
|
|
467
|
+
causal_chain: string;
|
|
468
|
+
} | null;
|
|
469
|
+
symptom_match_notes: string | null;
|
|
470
|
+
gates_tripped: string[] | null;
|
|
471
|
+
review_id: string;
|
|
472
|
+
}, {
|
|
473
|
+
iteration_count: number;
|
|
474
|
+
iteration_limit: number;
|
|
475
|
+
iteration_limit_reached: boolean;
|
|
476
|
+
token_usage: {
|
|
477
|
+
provider: string;
|
|
478
|
+
model: string;
|
|
479
|
+
input_tokens: number;
|
|
480
|
+
output_tokens: number;
|
|
481
|
+
total_tokens: number;
|
|
482
|
+
api_calls: number;
|
|
483
|
+
estimated_cost_usd: number | null;
|
|
484
|
+
cached_input_tokens?: number | undefined;
|
|
485
|
+
cache_creation_input_tokens?: number | undefined;
|
|
486
|
+
};
|
|
487
|
+
verdict: "APPROVE" | "REVISE";
|
|
488
|
+
review_status: "completed" | "incomplete";
|
|
489
|
+
confidence: number;
|
|
490
|
+
requires_human_review: boolean;
|
|
491
|
+
architectural_analysis: string;
|
|
492
|
+
blocking_issues: {
|
|
493
|
+
description: string;
|
|
494
|
+
suggestion: string;
|
|
495
|
+
}[];
|
|
496
|
+
merge_blockers: {
|
|
497
|
+
description: string;
|
|
498
|
+
suggestion: string;
|
|
499
|
+
}[] | null;
|
|
500
|
+
non_blocking_suggestions: string[];
|
|
501
|
+
edge_cases: string[];
|
|
502
|
+
checklist_for_implementation: string[];
|
|
503
|
+
follow_up_todos: string[] | null;
|
|
504
|
+
missing_context: string[] | null;
|
|
505
|
+
evidence_files: string[] | null;
|
|
506
|
+
used_tools: string[] | null;
|
|
507
|
+
tool_exhaustion_reason: "budget" | "repeat" | "round_limit" | null;
|
|
508
|
+
parallelization_hint: "serial" | "parallel" | "hybrid" | null;
|
|
509
|
+
coordination_risks: string[] | null;
|
|
510
|
+
recommended_subtask_boundaries: string[] | null;
|
|
511
|
+
user_original_request_echo: string | null;
|
|
512
|
+
symptom_impact: {
|
|
513
|
+
before: string;
|
|
514
|
+
after: string;
|
|
515
|
+
causal_chain: string;
|
|
516
|
+
} | null;
|
|
517
|
+
symptom_match_notes: string | null;
|
|
518
|
+
gates_tripped: string[] | null;
|
|
519
|
+
review_id: string;
|
|
520
|
+
}>;
|
|
521
|
+
export type PlanReviewInput = z.infer<typeof PlanReviewInputSchema>;
|
|
522
|
+
export type PlanReviewOutput = z.infer<typeof PlanReviewOutputSchema>;
|
|
523
|
+
export type PlanReviewMcpOutput = z.infer<typeof PlanReviewMcpOutputSchema>;
|