@valoir/rizz-brain 0.2.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/dist/index.d.ts +474 -0
- package/dist/index.js +13064 -0
- package/dist/sensitivity.d.ts +17 -0
- package/dist/sensitivity.js +223 -0
- package/package.json +22 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
type Confidence = 'verified' | 'inferred' | 'uncertain';
|
|
2
|
+
type BenchmarkTaskCategory = 'component-explanation' | 'flow-explanation' | 'architecture-impact' | 'review-blast-radius' | 'evidence-unknown-coverage';
|
|
3
|
+
type ComponentBoundaryType = 'entrypoint' | 'orchestration' | 'service' | 'adapter' | 'interface' | 'automation' | 'knowledge' | 'quality' | 'source' | 'unknown';
|
|
4
|
+
type EntityType = 'project' | 'file' | 'folder' | 'component' | 'service' | 'api' | 'database/table' | 'config' | 'dependency' | 'command' | 'test' | 'flow' | 'decision' | 'risk' | 'agent' | 'task' | 'session' | 'handoff' | 'review' | 'finding' | 'evidence' | 'status';
|
|
5
|
+
interface BrainRelationship {
|
|
6
|
+
readonly from: string;
|
|
7
|
+
readonly relation: 'owns' | 'depends_on' | 'used_by' | 'calls' | 'imports' | 'exposes' | 'configures' | 'tests' | 'breaks_if_removed' | 'changed_by' | 'reviewed_by' | 'handed_off_to' | 'produced' | 'supersedes' | 'contradicts' | 'related_to';
|
|
8
|
+
readonly to: string;
|
|
9
|
+
readonly evidence_ids: readonly string[];
|
|
10
|
+
readonly confidence: Confidence;
|
|
11
|
+
}
|
|
12
|
+
type ArchitectureImpactSurfaceType = 'component' | 'route';
|
|
13
|
+
interface ComponentIntelligence {
|
|
14
|
+
readonly purpose: string;
|
|
15
|
+
readonly boundary_type: ComponentBoundaryType;
|
|
16
|
+
readonly responsibilities: readonly string[];
|
|
17
|
+
readonly interfaces: readonly string[];
|
|
18
|
+
readonly entry_points: readonly string[];
|
|
19
|
+
readonly consumers: readonly string[];
|
|
20
|
+
readonly dependencies: readonly string[];
|
|
21
|
+
readonly dependency_roles: readonly string[];
|
|
22
|
+
readonly exposed_apis: readonly string[];
|
|
23
|
+
readonly tests: readonly string[];
|
|
24
|
+
readonly configs: readonly string[];
|
|
25
|
+
readonly coupling: {
|
|
26
|
+
readonly level: 'low' | 'medium' | 'high';
|
|
27
|
+
readonly score: number;
|
|
28
|
+
readonly static_import_count: number;
|
|
29
|
+
readonly internal_imports: readonly string[];
|
|
30
|
+
readonly external_imports: readonly string[];
|
|
31
|
+
readonly reasons: readonly string[];
|
|
32
|
+
};
|
|
33
|
+
readonly criticality: 'low' | 'medium' | 'high';
|
|
34
|
+
readonly criticality_score: number;
|
|
35
|
+
readonly blast_radius: BlastRadius;
|
|
36
|
+
readonly ownership_confidence: {
|
|
37
|
+
readonly score: number;
|
|
38
|
+
readonly reason: string;
|
|
39
|
+
readonly signals: readonly string[];
|
|
40
|
+
};
|
|
41
|
+
readonly tradeoffs: readonly string[];
|
|
42
|
+
readonly failure_modes: readonly string[];
|
|
43
|
+
readonly what_breaks_if_removed: readonly string[];
|
|
44
|
+
readonly risky_seams: readonly string[];
|
|
45
|
+
readonly important_files: readonly string[];
|
|
46
|
+
readonly read_first: readonly string[];
|
|
47
|
+
readonly known_risks: readonly string[];
|
|
48
|
+
readonly unknowns: readonly string[];
|
|
49
|
+
readonly field_evidence: Readonly<Record<string, readonly string[]>>;
|
|
50
|
+
readonly signals: readonly string[];
|
|
51
|
+
}
|
|
52
|
+
type FlowKind = 'api' | 'cli' | 'job' | 'ui' | 'config' | 'test' | 'unknown';
|
|
53
|
+
type FlowEntrypointType = 'route' | 'command' | 'function' | 'script' | 'file' | 'config';
|
|
54
|
+
type FlowStepType = 'route' | 'handler' | 'service' | 'function' | 'config' | 'dependency' | 'test' | 'external';
|
|
55
|
+
type FlowRiskKind = 'missing_test' | 'missing_config' | 'weak_evidence' | 'orphan_step' | 'changed_hotspot';
|
|
56
|
+
interface FlowEntrypoint {
|
|
57
|
+
readonly type: FlowEntrypointType;
|
|
58
|
+
readonly path: string;
|
|
59
|
+
readonly symbol: string | null;
|
|
60
|
+
readonly component_id?: string | null;
|
|
61
|
+
readonly evidence: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
interface FlowStep {
|
|
64
|
+
readonly step_id: string;
|
|
65
|
+
readonly order: number;
|
|
66
|
+
readonly type: FlowStepType;
|
|
67
|
+
readonly path: string;
|
|
68
|
+
readonly symbol: string | null;
|
|
69
|
+
readonly description: string;
|
|
70
|
+
readonly evidence: readonly string[];
|
|
71
|
+
}
|
|
72
|
+
interface FlowRisk {
|
|
73
|
+
readonly risk_id: string;
|
|
74
|
+
readonly kind: FlowRiskKind;
|
|
75
|
+
readonly description: string;
|
|
76
|
+
readonly evidence: readonly string[];
|
|
77
|
+
}
|
|
78
|
+
type ReviewSeverity = 'low' | 'medium' | 'high' | 'critical';
|
|
79
|
+
type ReviewCategory = 'Correctness' | 'Regression risk' | 'Architecture drift' | 'Hidden coupling' | 'Missing tests' | 'Security' | 'Performance' | 'Maintainability' | 'Backward compatibility' | 'Overengineering';
|
|
80
|
+
type OverallRisk = 'low' | 'medium' | 'high' | 'critical';
|
|
81
|
+
type BlastRadius = 'narrow' | 'moderate' | 'broad';
|
|
82
|
+
type RecommendedAction = 'approve' | 'request changes' | 'investigate';
|
|
83
|
+
interface ReviewEvalArtifactData {
|
|
84
|
+
readonly schema_version: number;
|
|
85
|
+
readonly generated_at: string;
|
|
86
|
+
readonly review_id: string;
|
|
87
|
+
readonly deterministic: boolean;
|
|
88
|
+
readonly provider_calls_required: boolean;
|
|
89
|
+
readonly network_required: boolean;
|
|
90
|
+
readonly total_findings: number;
|
|
91
|
+
readonly findings_by_severity: Record<ReviewSeverity, number>;
|
|
92
|
+
readonly findings_by_category: Record<ReviewCategory, number>;
|
|
93
|
+
readonly affected_component_count: number;
|
|
94
|
+
readonly direct_affected_component_count: number;
|
|
95
|
+
readonly dependent_component_count: number;
|
|
96
|
+
readonly affected_flow_count: number;
|
|
97
|
+
readonly affected_relationship_count: number;
|
|
98
|
+
readonly architecture_impact_surface_count: number;
|
|
99
|
+
readonly architecture_impact_component_surface_count: number;
|
|
100
|
+
readonly architecture_impact_route_surface_count: number;
|
|
101
|
+
readonly architecture_what_breaks_note_count: number;
|
|
102
|
+
readonly architecture_evidence_gap_count: number;
|
|
103
|
+
readonly architecture_confidence_gap_count: number;
|
|
104
|
+
readonly architecture_affected_test_count: number;
|
|
105
|
+
readonly architecture_affected_config_count: number;
|
|
106
|
+
readonly required_test_count: number;
|
|
107
|
+
readonly evidence_id_count: number;
|
|
108
|
+
readonly blast_radius: BlastRadius;
|
|
109
|
+
readonly overall_risk: OverallRisk;
|
|
110
|
+
readonly surgicality_score: number;
|
|
111
|
+
readonly review_readiness_score: number;
|
|
112
|
+
readonly secret_safety: {
|
|
113
|
+
readonly redaction_applied: boolean;
|
|
114
|
+
readonly redacted_reference_count: number;
|
|
115
|
+
readonly unsafe_sensitive_reference_count: number;
|
|
116
|
+
readonly output_secret_safe: boolean;
|
|
117
|
+
};
|
|
118
|
+
readonly redaction: {
|
|
119
|
+
readonly redacted_reference_count: number;
|
|
120
|
+
readonly unsafe_sensitive_reference_count: number;
|
|
121
|
+
readonly note: string;
|
|
122
|
+
};
|
|
123
|
+
readonly scoring_notes: readonly string[];
|
|
124
|
+
}
|
|
125
|
+
interface ReviewFindingData {
|
|
126
|
+
readonly id: string;
|
|
127
|
+
readonly severity: ReviewSeverity;
|
|
128
|
+
readonly category: ReviewCategory;
|
|
129
|
+
readonly title: string;
|
|
130
|
+
readonly description: string;
|
|
131
|
+
readonly affected_files: readonly string[];
|
|
132
|
+
readonly affected_entities: readonly string[];
|
|
133
|
+
readonly evidence_ids: readonly string[];
|
|
134
|
+
readonly confidence: Confidence;
|
|
135
|
+
readonly recommendation: string;
|
|
136
|
+
readonly safer_alternative?: string;
|
|
137
|
+
}
|
|
138
|
+
interface AffectedFlowData {
|
|
139
|
+
readonly id: string;
|
|
140
|
+
readonly name: string;
|
|
141
|
+
readonly kind: string;
|
|
142
|
+
readonly framework?: string;
|
|
143
|
+
readonly route_path?: string;
|
|
144
|
+
readonly route_type?: string;
|
|
145
|
+
readonly confidence: Confidence;
|
|
146
|
+
readonly score: number;
|
|
147
|
+
readonly entrypoints: readonly string[];
|
|
148
|
+
readonly changed_files: readonly string[];
|
|
149
|
+
readonly components: readonly string[];
|
|
150
|
+
readonly tests: readonly string[];
|
|
151
|
+
readonly configs: readonly string[];
|
|
152
|
+
readonly risks: number;
|
|
153
|
+
readonly evidence_ids: readonly string[];
|
|
154
|
+
readonly reasons: readonly string[];
|
|
155
|
+
}
|
|
156
|
+
interface ReviewAffectedComponentData {
|
|
157
|
+
readonly id: string;
|
|
158
|
+
readonly name: string;
|
|
159
|
+
readonly boundary_type: string;
|
|
160
|
+
readonly criticality: string;
|
|
161
|
+
readonly blast_radius: string;
|
|
162
|
+
readonly changed_files: readonly string[];
|
|
163
|
+
readonly affected_flows: readonly string[];
|
|
164
|
+
readonly tests: readonly string[];
|
|
165
|
+
readonly configs: readonly string[];
|
|
166
|
+
readonly evidence_ids: readonly string[];
|
|
167
|
+
readonly reason: string;
|
|
168
|
+
}
|
|
169
|
+
interface ReviewAffectedRelationshipData {
|
|
170
|
+
readonly from: string;
|
|
171
|
+
readonly relation: BrainRelationship['relation'];
|
|
172
|
+
readonly to: string;
|
|
173
|
+
readonly confidence: Confidence;
|
|
174
|
+
readonly evidence_ids: readonly string[];
|
|
175
|
+
}
|
|
176
|
+
interface ReviewEvidenceSummaryData {
|
|
177
|
+
readonly changed_files: number;
|
|
178
|
+
readonly direct_components: number;
|
|
179
|
+
readonly dependent_components: number;
|
|
180
|
+
readonly affected_flows: number;
|
|
181
|
+
readonly architecture_impact_surfaces: number;
|
|
182
|
+
readonly architecture_confidence_gaps: readonly string[];
|
|
183
|
+
readonly architecture_evidence_gap_ids: readonly string[];
|
|
184
|
+
readonly architecture_what_breaks: readonly string[];
|
|
185
|
+
readonly affected_tests: readonly string[];
|
|
186
|
+
readonly affected_configs: readonly string[];
|
|
187
|
+
readonly evidence_ids: readonly string[];
|
|
188
|
+
}
|
|
189
|
+
interface ReviewArchitectureImpactData {
|
|
190
|
+
readonly impact_id: string;
|
|
191
|
+
readonly surface_type: ArchitectureImpactSurfaceType;
|
|
192
|
+
readonly entity_id: string;
|
|
193
|
+
readonly name: string;
|
|
194
|
+
readonly route_path?: string;
|
|
195
|
+
readonly route_type?: string;
|
|
196
|
+
readonly matched_changed_files: readonly string[];
|
|
197
|
+
readonly matched_components: readonly string[];
|
|
198
|
+
readonly matched_flows: readonly string[];
|
|
199
|
+
readonly affected_flows: readonly string[];
|
|
200
|
+
readonly affected_files: readonly string[];
|
|
201
|
+
readonly affected_tests: readonly string[];
|
|
202
|
+
readonly affected_configs: readonly string[];
|
|
203
|
+
readonly dependent_components: readonly string[];
|
|
204
|
+
readonly coupling_level: ComponentIntelligence['coupling']['level'];
|
|
205
|
+
readonly coupling_score: number;
|
|
206
|
+
readonly confidence: Confidence;
|
|
207
|
+
readonly confidence_score: number;
|
|
208
|
+
readonly evidence_ids: readonly string[];
|
|
209
|
+
readonly evidence_gap_ids: readonly string[];
|
|
210
|
+
readonly what_breaks: readonly string[];
|
|
211
|
+
readonly reasons: readonly string[];
|
|
212
|
+
}
|
|
213
|
+
interface ReviewSummaryData {
|
|
214
|
+
readonly id: string;
|
|
215
|
+
readonly generated_at: string;
|
|
216
|
+
readonly changed_files: readonly string[];
|
|
217
|
+
readonly direct_affected_components: readonly ReviewAffectedComponentData[];
|
|
218
|
+
readonly dependent_components: readonly ReviewAffectedComponentData[];
|
|
219
|
+
readonly affected_components: readonly string[];
|
|
220
|
+
readonly affected_flows: readonly AffectedFlowData[];
|
|
221
|
+
readonly affected_relationships: readonly ReviewAffectedRelationshipData[];
|
|
222
|
+
readonly architecture_impact_map: readonly ReviewArchitectureImpactData[];
|
|
223
|
+
readonly affected_entities: readonly string[];
|
|
224
|
+
readonly blast_radius_reasons: readonly string[];
|
|
225
|
+
readonly review_evidence_summary: ReviewEvidenceSummaryData;
|
|
226
|
+
readonly findings: readonly ReviewFindingData[];
|
|
227
|
+
readonly overall_risk: OverallRisk;
|
|
228
|
+
readonly surgicality_score: number;
|
|
229
|
+
readonly blast_radius: BlastRadius;
|
|
230
|
+
readonly required_tests: readonly string[];
|
|
231
|
+
readonly suggested_reviewer_focus_areas: readonly string[];
|
|
232
|
+
readonly recommended_action: RecommendedAction;
|
|
233
|
+
}
|
|
234
|
+
interface ExplainSummaryData {
|
|
235
|
+
readonly generated_at: string;
|
|
236
|
+
readonly target: string;
|
|
237
|
+
readonly resolved_entity_id: string;
|
|
238
|
+
readonly entity_type: EntityType;
|
|
239
|
+
readonly summary: string;
|
|
240
|
+
readonly purpose: string;
|
|
241
|
+
readonly responsibilities: readonly string[];
|
|
242
|
+
readonly dependencies: readonly string[];
|
|
243
|
+
readonly dependency_roles: readonly string[];
|
|
244
|
+
readonly consumers: readonly string[];
|
|
245
|
+
readonly important_files: readonly string[];
|
|
246
|
+
readonly entry_points: readonly string[];
|
|
247
|
+
readonly tests: readonly string[];
|
|
248
|
+
readonly configs: readonly string[];
|
|
249
|
+
readonly tradeoffs: readonly string[];
|
|
250
|
+
readonly failure_modes: readonly string[];
|
|
251
|
+
readonly breaks_if_changed: readonly string[];
|
|
252
|
+
readonly risks: readonly string[];
|
|
253
|
+
readonly read_first: readonly string[];
|
|
254
|
+
readonly evidence_ids: readonly string[];
|
|
255
|
+
readonly depends_on: readonly string[];
|
|
256
|
+
readonly depended_on_by: readonly string[];
|
|
257
|
+
readonly confidence: Confidence;
|
|
258
|
+
readonly confidence_basis: readonly string[];
|
|
259
|
+
readonly unknowns: readonly string[];
|
|
260
|
+
readonly evidence_summary: {
|
|
261
|
+
readonly evidence_count: number;
|
|
262
|
+
readonly direct_evidence_ids: readonly string[];
|
|
263
|
+
readonly field_evidence: readonly string[];
|
|
264
|
+
readonly records: readonly {
|
|
265
|
+
readonly id: string;
|
|
266
|
+
readonly label: string;
|
|
267
|
+
readonly description: string;
|
|
268
|
+
readonly confidence: Confidence;
|
|
269
|
+
readonly source_files: readonly string[];
|
|
270
|
+
readonly kind?: string;
|
|
271
|
+
}[];
|
|
272
|
+
readonly redacted_evidence_count: number;
|
|
273
|
+
};
|
|
274
|
+
readonly evidence_gaps: readonly string[];
|
|
275
|
+
readonly related_components: readonly string[];
|
|
276
|
+
readonly related_flows: readonly string[];
|
|
277
|
+
readonly benchmark_task_hints: readonly {
|
|
278
|
+
readonly id: string;
|
|
279
|
+
readonly category: BenchmarkTaskCategory;
|
|
280
|
+
readonly prompt: string;
|
|
281
|
+
readonly expected_artifact: string;
|
|
282
|
+
readonly expected_check_fields: readonly string[];
|
|
283
|
+
readonly confidence: Confidence;
|
|
284
|
+
readonly why_it_matters: string;
|
|
285
|
+
}[];
|
|
286
|
+
readonly research_artifacts: {
|
|
287
|
+
readonly proving: readonly string[];
|
|
288
|
+
readonly limiting: readonly string[];
|
|
289
|
+
};
|
|
290
|
+
readonly component?: {
|
|
291
|
+
readonly boundary_type: string;
|
|
292
|
+
readonly criticality: string;
|
|
293
|
+
readonly criticality_score?: number;
|
|
294
|
+
readonly ownership_confidence?: {
|
|
295
|
+
readonly score?: number;
|
|
296
|
+
readonly reason?: string;
|
|
297
|
+
readonly signals?: readonly string[];
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
readonly flow?: {
|
|
301
|
+
readonly kind: FlowKind;
|
|
302
|
+
readonly framework?: string;
|
|
303
|
+
readonly route_path?: string;
|
|
304
|
+
readonly route_type?: string;
|
|
305
|
+
readonly entrypoints: readonly FlowEntrypoint[];
|
|
306
|
+
readonly steps: readonly FlowStep[];
|
|
307
|
+
readonly components: readonly string[];
|
|
308
|
+
readonly files: readonly string[];
|
|
309
|
+
readonly dependencies: readonly string[];
|
|
310
|
+
readonly tests: readonly string[];
|
|
311
|
+
readonly configs: readonly string[];
|
|
312
|
+
readonly risks: readonly FlowRisk[];
|
|
313
|
+
readonly entry_contract: readonly string[];
|
|
314
|
+
readonly exit_contract: readonly string[];
|
|
315
|
+
readonly inputs: readonly string[];
|
|
316
|
+
readonly outputs: readonly string[];
|
|
317
|
+
readonly side_effects: readonly string[];
|
|
318
|
+
readonly state_transitions: readonly string[];
|
|
319
|
+
readonly failure_modes: readonly string[];
|
|
320
|
+
readonly required_tests: readonly string[];
|
|
321
|
+
readonly confidence_reasons: readonly string[];
|
|
322
|
+
readonly confidence_score: number;
|
|
323
|
+
readonly confidence_reason: string;
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
export interface GenerateProjectBrainOptions {
|
|
327
|
+
readonly rootDir: string;
|
|
328
|
+
readonly now?: Date;
|
|
329
|
+
readonly maxFiles?: number;
|
|
330
|
+
}
|
|
331
|
+
export interface GenerateProjectBrainSummary {
|
|
332
|
+
readonly rootDir: string;
|
|
333
|
+
readonly brainDir: string;
|
|
334
|
+
readonly researchDir: string;
|
|
335
|
+
readonly latestPath: string;
|
|
336
|
+
readonly reportPath: string;
|
|
337
|
+
readonly scannedFiles: number;
|
|
338
|
+
readonly changedFiles: number;
|
|
339
|
+
readonly staleFiles: number;
|
|
340
|
+
readonly components: number;
|
|
341
|
+
readonly flows: number;
|
|
342
|
+
readonly commands: number;
|
|
343
|
+
readonly tests: number;
|
|
344
|
+
}
|
|
345
|
+
export type GenerateProjectBrainResult = {
|
|
346
|
+
readonly ok: true;
|
|
347
|
+
readonly value: GenerateProjectBrainSummary;
|
|
348
|
+
} | {
|
|
349
|
+
readonly ok: false;
|
|
350
|
+
readonly error: {
|
|
351
|
+
readonly code: string;
|
|
352
|
+
readonly message: string;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
export interface ReviewProjectChangesOptions {
|
|
356
|
+
readonly rootDir: string;
|
|
357
|
+
readonly now?: Date;
|
|
358
|
+
readonly json?: boolean;
|
|
359
|
+
}
|
|
360
|
+
export interface ReviewProjectChangesSummary {
|
|
361
|
+
readonly rootDir: string;
|
|
362
|
+
readonly reviewPath: string;
|
|
363
|
+
readonly reviewEvalPath: string;
|
|
364
|
+
readonly latestPath: string;
|
|
365
|
+
readonly reportPath: string;
|
|
366
|
+
readonly changedFiles: number;
|
|
367
|
+
readonly affectedComponents: number;
|
|
368
|
+
readonly affectedFlows: number;
|
|
369
|
+
readonly findings: number;
|
|
370
|
+
readonly overallRisk: OverallRisk;
|
|
371
|
+
readonly surgicalityScore: number;
|
|
372
|
+
readonly blastRadius: BlastRadius;
|
|
373
|
+
readonly recommendedAction: RecommendedAction;
|
|
374
|
+
readonly review: ReviewSummaryData;
|
|
375
|
+
readonly reviewEval: ReviewEvalArtifactData;
|
|
376
|
+
}
|
|
377
|
+
export type ReviewProjectChangesResult = {
|
|
378
|
+
readonly ok: true;
|
|
379
|
+
readonly value: ReviewProjectChangesSummary;
|
|
380
|
+
} | {
|
|
381
|
+
readonly ok: false;
|
|
382
|
+
readonly error: {
|
|
383
|
+
readonly code: string;
|
|
384
|
+
readonly message: string;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
export interface ExplainProjectTargetOptions {
|
|
388
|
+
readonly rootDir: string;
|
|
389
|
+
readonly target: string;
|
|
390
|
+
readonly now?: Date;
|
|
391
|
+
}
|
|
392
|
+
export interface ExplainProjectTargetSummary {
|
|
393
|
+
readonly rootDir: string;
|
|
394
|
+
readonly latestPath: string;
|
|
395
|
+
readonly reportPath: string;
|
|
396
|
+
readonly targetId: string;
|
|
397
|
+
readonly confidence: Confidence;
|
|
398
|
+
readonly explanation: ExplainSummaryData;
|
|
399
|
+
}
|
|
400
|
+
export type ExplainProjectTargetResult = {
|
|
401
|
+
readonly ok: true;
|
|
402
|
+
readonly value: ExplainProjectTargetSummary;
|
|
403
|
+
} | {
|
|
404
|
+
readonly ok: false;
|
|
405
|
+
readonly error: {
|
|
406
|
+
readonly code: string;
|
|
407
|
+
readonly message: string;
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
type AskQuestionIntent = 'read_first' | 'breaks_if_changed' | 'dependents' | 'why_exists' | 'evidence';
|
|
411
|
+
type AskAnswerStatus = 'answered' | 'limited' | 'blocked';
|
|
412
|
+
interface AskReadinessSummary {
|
|
413
|
+
readonly status: 'ready' | 'limited' | 'blocked';
|
|
414
|
+
readonly score: number;
|
|
415
|
+
readonly summary: string;
|
|
416
|
+
readonly reasons: readonly string[];
|
|
417
|
+
readonly next_required_improvements: readonly string[];
|
|
418
|
+
}
|
|
419
|
+
export interface AskProjectQuestionOptions {
|
|
420
|
+
readonly rootDir: string;
|
|
421
|
+
readonly question: string;
|
|
422
|
+
readonly now?: Date;
|
|
423
|
+
}
|
|
424
|
+
export interface AskProjectQuestionAnswer {
|
|
425
|
+
readonly schema_version: 1;
|
|
426
|
+
readonly generated_at: string;
|
|
427
|
+
readonly question: string;
|
|
428
|
+
readonly intent: AskQuestionIntent;
|
|
429
|
+
readonly status: AskAnswerStatus;
|
|
430
|
+
readonly answer: string;
|
|
431
|
+
readonly answer_items: readonly string[];
|
|
432
|
+
readonly confidence: Confidence;
|
|
433
|
+
readonly readiness: AskReadinessSummary;
|
|
434
|
+
readonly evidence_ids: readonly string[];
|
|
435
|
+
readonly evidence_summary: {
|
|
436
|
+
readonly evidence_count: number;
|
|
437
|
+
readonly records: readonly {
|
|
438
|
+
readonly id: string;
|
|
439
|
+
readonly description: string;
|
|
440
|
+
readonly confidence: Confidence;
|
|
441
|
+
readonly source_files: readonly string[];
|
|
442
|
+
}[];
|
|
443
|
+
readonly redacted_evidence_count: number;
|
|
444
|
+
};
|
|
445
|
+
readonly unknowns: readonly string[];
|
|
446
|
+
readonly related_entities: readonly string[];
|
|
447
|
+
readonly research_artifacts: readonly string[];
|
|
448
|
+
readonly deterministic: true;
|
|
449
|
+
readonly provider_calls_required: false;
|
|
450
|
+
readonly network_required: false;
|
|
451
|
+
}
|
|
452
|
+
export interface AskProjectQuestionSummary {
|
|
453
|
+
readonly rootDir: string;
|
|
454
|
+
readonly latestPath: string;
|
|
455
|
+
readonly reportPath: string;
|
|
456
|
+
readonly answer: AskProjectQuestionAnswer;
|
|
457
|
+
}
|
|
458
|
+
export type AskProjectQuestionResult = {
|
|
459
|
+
readonly ok: true;
|
|
460
|
+
readonly value: AskProjectQuestionSummary;
|
|
461
|
+
} | {
|
|
462
|
+
readonly ok: false;
|
|
463
|
+
readonly error: {
|
|
464
|
+
readonly code: string;
|
|
465
|
+
readonly message: string;
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
export declare function generateProjectBrain(options: GenerateProjectBrainOptions): Promise<GenerateProjectBrainResult>;
|
|
469
|
+
export declare function hasProjectBrain(rootDir: string): Promise<boolean>;
|
|
470
|
+
export declare function reviewProjectChanges(options: ReviewProjectChangesOptions): Promise<ReviewProjectChangesResult>;
|
|
471
|
+
export declare function explainProjectTarget(options: ExplainProjectTargetOptions): Promise<ExplainProjectTargetResult>;
|
|
472
|
+
export declare function askProjectQuestion(options: AskProjectQuestionOptions): Promise<AskProjectQuestionResult>;
|
|
473
|
+
export {};
|
|
474
|
+
//# sourceMappingURL=index.d.ts.map
|