harnery 0.17.0 → 0.19.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 +1 -1
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +187 -4
- package/dist/commands/supervisor.d.ts.map +1 -1
- package/dist/commands/supervisor.js +76 -4
- package/dist/core/supervisor/index.d.ts +3 -3
- package/dist/core/supervisor/index.d.ts.map +1 -1
- package/dist/core/supervisor/index.js +2 -2
- package/dist/core/supervisor/plan-read.d.ts +2 -1
- package/dist/core/supervisor/plan-read.d.ts.map +1 -1
- package/dist/core/supervisor/plan-read.js +222 -3
- package/dist/core/supervisor/plan-types.d.ts +60 -3
- package/dist/core/supervisor/plan-types.d.ts.map +1 -1
- package/dist/core/supervisor/plan-types.js +2 -0
- package/dist/core/supervisor/planning.d.ts.map +1 -1
- package/dist/core/supervisor/planning.js +804 -56
- package/dist/core/supervisor/read.d.ts +3 -3
- package/dist/core/supervisor/read.d.ts.map +1 -1
- package/dist/core/supervisor/read.js +2 -2
- package/dist/core/supervisor/runner.d.ts.map +1 -1
- package/dist/core/supervisor/runner.js +7 -2
- package/dist/core/supervisor/service.js +3 -0
- package/dist/core/supervisor/state.d.ts +17 -2
- package/dist/core/supervisor/state.d.ts.map +1 -1
- package/dist/core/supervisor/state.js +211 -33
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +24 -6
- package/dist/core/workflow/types.d.ts +6 -0
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/core/workflow/validate.d.ts +3 -2
- package/dist/core/workflow/validate.d.ts.map +1 -1
- package/dist/core/workflow/validate.js +31 -3
- package/dist/lib/browser/client.d.ts +18 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +39 -0
- package/dist/lib/browser/geometry.d.ts +146 -0
- package/dist/lib/browser/geometry.d.ts.map +1 -0
- package/dist/lib/browser/geometry.js +525 -0
- package/dist/lib/browser/index.d.ts +2 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/target-size.d.ts +65 -0
- package/dist/lib/browser/target-size.d.ts.map +1 -0
- package/dist/lib/browser/target-size.js +108 -0
- package/package.json +7 -1
- package/src/commands/browse.ts +319 -0
- package/src/commands/supervisor.ts +92 -5
- package/src/core/supervisor/index.ts +17 -1
- package/src/core/supervisor/plan-read.ts +292 -2
- package/src/core/supervisor/plan-types.ts +69 -1
- package/src/core/supervisor/planning.ts +1012 -51
- package/src/core/supervisor/read.ts +16 -1
- package/src/core/supervisor/runner.ts +9 -2
- package/src/core/supervisor/service.ts +3 -0
- package/src/core/supervisor/state.ts +272 -31
- package/src/core/workflow/engine.ts +29 -6
- package/src/core/workflow/types.ts +6 -0
- package/src/core/workflow/validate.ts +34 -3
- package/src/lib/browser/client.ts +62 -0
- package/src/lib/browser/geometry.ts +695 -0
- package/src/lib/browser/index.ts +25 -0
- package/src/lib/browser/target-size.ts +180 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const SUPERVISOR_PLAN_SCHEMA_VERSION = 1 as const;
|
|
2
|
+
export const MAX_SUPERVISOR_PLAN_REVIEWERS = 5 as const;
|
|
3
|
+
export const MAX_SUPERVISOR_PLAN_REVISION_ROUNDS = 3 as const;
|
|
2
4
|
|
|
3
5
|
export interface SupervisorPlanTemplate {
|
|
4
6
|
workflow: { path: string; sha256: string };
|
|
@@ -13,6 +15,10 @@ export interface SupervisorReplanningPolicy {
|
|
|
13
15
|
max_work_items_per_plan: number;
|
|
14
16
|
max_total_work_items: number;
|
|
15
17
|
templates: Record<string, SupervisorPlanTemplate>;
|
|
18
|
+
review?: {
|
|
19
|
+
reviewer_specialists: string[];
|
|
20
|
+
max_revision_rounds: number;
|
|
21
|
+
};
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
export interface CreateSupervisorPlanTemplateInput {
|
|
@@ -28,6 +34,10 @@ export interface CreateSupervisorReplanningInput {
|
|
|
28
34
|
maxWorkItemsPerPlan?: number;
|
|
29
35
|
maxTotalWorkItems?: number;
|
|
30
36
|
templates: Readonly<Record<string, CreateSupervisorPlanTemplateInput>>;
|
|
37
|
+
review?: {
|
|
38
|
+
reviewerSpecialists: readonly string[];
|
|
39
|
+
maxRevisionRounds: number;
|
|
40
|
+
};
|
|
31
41
|
}
|
|
32
42
|
|
|
33
43
|
export interface SupervisorPlanRequest {
|
|
@@ -35,12 +45,20 @@ export interface SupervisorPlanRequest {
|
|
|
35
45
|
id: string;
|
|
36
46
|
goal_id: string;
|
|
37
47
|
sequence: number;
|
|
48
|
+
trigger?: "initial" | "recovery" | "milestone";
|
|
38
49
|
trigger_fingerprint: string;
|
|
39
50
|
prior_root_work_id: string;
|
|
40
51
|
workflow_run_id: string;
|
|
41
52
|
created_at: string;
|
|
42
53
|
}
|
|
43
54
|
|
|
55
|
+
export interface SupervisorPlanMilestone {
|
|
56
|
+
sequence: number;
|
|
57
|
+
title: string;
|
|
58
|
+
objective: string;
|
|
59
|
+
acceptance: string[];
|
|
60
|
+
}
|
|
61
|
+
|
|
44
62
|
export interface SupervisorPlanWorkSpec {
|
|
45
63
|
key: string;
|
|
46
64
|
title: string;
|
|
@@ -53,22 +71,68 @@ export interface SupervisorPlanWorkSpec {
|
|
|
53
71
|
export interface SupervisorPlanProposal {
|
|
54
72
|
schema_version: typeof SUPERVISOR_PLAN_SCHEMA_VERSION;
|
|
55
73
|
plan_id: string;
|
|
56
|
-
decision: "apply" | "attention";
|
|
74
|
+
decision: "apply" | "complete" | "attention";
|
|
57
75
|
rationale: string;
|
|
58
76
|
root: string;
|
|
59
77
|
work: SupervisorPlanWorkSpec[];
|
|
78
|
+
milestone?: SupervisorPlanMilestone;
|
|
60
79
|
proposed_at: string;
|
|
61
80
|
}
|
|
62
81
|
|
|
63
82
|
export type SupervisorPlanEventType =
|
|
64
83
|
| "plan.awaiting_approval"
|
|
65
84
|
| "plan.resumed"
|
|
85
|
+
| "plan.reviewed"
|
|
66
86
|
| "plan.proposed"
|
|
67
87
|
| "plan.applied"
|
|
88
|
+
| "plan.completed"
|
|
68
89
|
| "plan.rejected"
|
|
69
90
|
| "plan.attention"
|
|
70
91
|
| "plan.failed";
|
|
71
92
|
|
|
93
|
+
export type SupervisorPlanReviewStatus = "passed" | "revision_exhausted" | "attention" | "failed";
|
|
94
|
+
|
|
95
|
+
export type SupervisorPlanReviewVerdict = "approve" | "revise" | "attention";
|
|
96
|
+
|
|
97
|
+
export interface SupervisorPlanReviewFinding {
|
|
98
|
+
code: string;
|
|
99
|
+
severity: "blocking" | "advisory";
|
|
100
|
+
summary: string;
|
|
101
|
+
recommendation: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface SupervisorPlanReviewReviewer {
|
|
105
|
+
specialist: string;
|
|
106
|
+
verdict: SupervisorPlanReviewVerdict;
|
|
107
|
+
rationale: string;
|
|
108
|
+
findings: SupervisorPlanReviewFinding[];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface SupervisorPlanReviewRound {
|
|
112
|
+
round: number;
|
|
113
|
+
candidate_sha256: string;
|
|
114
|
+
reviewers: SupervisorPlanReviewReviewer[];
|
|
115
|
+
outcome: "approved" | "revise" | "attention" | "failed";
|
|
116
|
+
revision_workflow_run_id?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface SupervisorPlanReviewReceipt {
|
|
120
|
+
schema_version: typeof SUPERVISOR_PLAN_SCHEMA_VERSION;
|
|
121
|
+
plan_id: string;
|
|
122
|
+
status: SupervisorPlanReviewStatus;
|
|
123
|
+
candidate_sha256: string;
|
|
124
|
+
final_candidate: SupervisorPlanProposal;
|
|
125
|
+
rounds: SupervisorPlanReviewRound[];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface SupervisorPlanReviewSummary {
|
|
129
|
+
status: SupervisorPlanReviewStatus;
|
|
130
|
+
candidate_sha256: string;
|
|
131
|
+
rounds: number;
|
|
132
|
+
blocking_findings: number;
|
|
133
|
+
advisory_findings: number;
|
|
134
|
+
}
|
|
135
|
+
|
|
72
136
|
export interface SupervisorPlanEvent {
|
|
73
137
|
schema_version: typeof SUPERVISOR_PLAN_SCHEMA_VERSION;
|
|
74
138
|
plan_id: string;
|
|
@@ -88,6 +152,7 @@ export type SupervisorPlanStatus =
|
|
|
88
152
|
| "resumable"
|
|
89
153
|
| "proposed"
|
|
90
154
|
| "applied"
|
|
155
|
+
| "completed"
|
|
91
156
|
| "rejected"
|
|
92
157
|
| "attention"
|
|
93
158
|
| "failed";
|
|
@@ -95,6 +160,7 @@ export type SupervisorPlanStatus =
|
|
|
95
160
|
export interface SupervisorPlanRecord {
|
|
96
161
|
request: SupervisorPlanRequest;
|
|
97
162
|
proposal?: SupervisorPlanProposal;
|
|
163
|
+
review?: SupervisorPlanReviewSummary;
|
|
98
164
|
events: SupervisorPlanEvent[];
|
|
99
165
|
status: SupervisorPlanStatus;
|
|
100
166
|
approval_id?: string;
|
|
@@ -109,6 +175,8 @@ export interface SupervisorPlanHistory {
|
|
|
109
175
|
generation: number;
|
|
110
176
|
applied_work_ids: string[];
|
|
111
177
|
materialized_work_ids: string[];
|
|
178
|
+
milestones_completed: number;
|
|
179
|
+
completed: boolean;
|
|
112
180
|
latest?: SupervisorPlanRecord;
|
|
113
181
|
}
|
|
114
182
|
|