@lensmcp/protocol-types 1.25.49 → 1.25.51
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/index.d.ts +4 -0
- package/index.js +1 -1
- package/lib/dashboard.d.ts +6 -0
- package/lib/goal-design.d.ts +200 -0
- package/lib/goal-design.js +1 -0
- package/lib/goal-outcome.d.ts +159 -0
- package/lib/goal-outcome.js +1 -0
- package/lib/goal-retro.d.ts +60 -0
- package/lib/goal-retro.js +1 -0
- package/lib/overseer-findings.d.ts +113 -2
- package/lib/overseer-findings.js +1 -1
- package/lib/overseer-messages.d.ts +28 -0
- package/lib/overseer-messages.js +1 -0
- package/lib/overseer-rounds.d.ts +78 -0
- package/lib/overseer-rounds.js +1 -1
- package/lib/team-library.d.ts +9 -0
- package/lib/team.d.ts +144 -4
- package/lib/team.js +1 -1
- package/lib/workspace-actions.d.ts +159 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -32,8 +32,12 @@ export * from './lib/event-loop.js';
|
|
|
32
32
|
export * from './lib/workspace-actions.js';
|
|
33
33
|
export * from './lib/team.js';
|
|
34
34
|
export * from './lib/team-review-changes.js';
|
|
35
|
+
export * from './lib/goal-outcome.js';
|
|
36
|
+
export * from './lib/goal-retro.js';
|
|
35
37
|
export * from './lib/team-design.js';
|
|
36
38
|
export * from './lib/team-library.js';
|
|
37
39
|
export * from './lib/system-report.js';
|
|
38
40
|
export * from './lib/overseer-findings.js';
|
|
39
41
|
export * from './lib/overseer-rounds.js';
|
|
42
|
+
export * from './lib/goal-design.js';
|
|
43
|
+
export * from './lib/overseer-messages.js';
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export*from"./lib/schema-version.js";export*from"./lib/source-location.js";export*from"./lib/context.js";export*from"./lib/event.js";export*from"./lib/node.js";export*from"./lib/edge.js";export*from"./lib/attributes.js";export*from"./lib/producer-health.js";export*from"./lib/resources.js";export*from"./lib/tokens.js";export*from"./lib/capture-demand.js";export*from"./lib/bounded-clone.js";export*from"./lib/bounded-map.js";export*from"./lib/flood-guard.js";export*from"./lib/dashboard.js";export*from"./lib/log-query.js";export*from"./lib/error-dismissal.js";export*from"./lib/ai-content.js";export*from"./lib/http-exchange.js";export*from"./lib/ai-call.js";export*from"./lib/ai-call-row.js";export*from"./lib/ai-call-groups.js";export*from"./lib/ai-context.js";export*from"./lib/ai-origins.js";export*from"./lib/ai-playground.js";export*from"./lib/pod-memory.js";export*from"./lib/perf-rules.js";export*from"./lib/sources.js";export*from"./lib/page-visit.js";export*from"./lib/replay.js";export*from"./lib/event-loop.js";export*from"./lib/workspace-actions.js";export*from"./lib/team.js";export*from"./lib/team-review-changes.js";export*from"./lib/team-design.js";export*from"./lib/team-library.js";export*from"./lib/system-report.js";export*from"./lib/overseer-findings.js";export*from"./lib/overseer-rounds.js";
|
|
1
|
+
"use strict";export*from"./lib/schema-version.js";export*from"./lib/source-location.js";export*from"./lib/context.js";export*from"./lib/event.js";export*from"./lib/node.js";export*from"./lib/edge.js";export*from"./lib/attributes.js";export*from"./lib/producer-health.js";export*from"./lib/resources.js";export*from"./lib/tokens.js";export*from"./lib/capture-demand.js";export*from"./lib/bounded-clone.js";export*from"./lib/bounded-map.js";export*from"./lib/flood-guard.js";export*from"./lib/dashboard.js";export*from"./lib/log-query.js";export*from"./lib/error-dismissal.js";export*from"./lib/ai-content.js";export*from"./lib/http-exchange.js";export*from"./lib/ai-call.js";export*from"./lib/ai-call-row.js";export*from"./lib/ai-call-groups.js";export*from"./lib/ai-context.js";export*from"./lib/ai-origins.js";export*from"./lib/ai-playground.js";export*from"./lib/pod-memory.js";export*from"./lib/perf-rules.js";export*from"./lib/sources.js";export*from"./lib/page-visit.js";export*from"./lib/replay.js";export*from"./lib/event-loop.js";export*from"./lib/workspace-actions.js";export*from"./lib/team.js";export*from"./lib/team-review-changes.js";export*from"./lib/goal-outcome.js";export*from"./lib/goal-retro.js";export*from"./lib/team-design.js";export*from"./lib/team-library.js";export*from"./lib/system-report.js";export*from"./lib/overseer-findings.js";export*from"./lib/overseer-rounds.js";export*from"./lib/goal-design.js";export*from"./lib/overseer-messages.js";
|
package/lib/dashboard.d.ts
CHANGED
|
@@ -271,6 +271,11 @@ export interface DashCluster {
|
|
|
271
271
|
}>;
|
|
272
272
|
/** This project's worktree INSTANCES the gateway knows (`lensmcp instance start`) — running or stopped. */
|
|
273
273
|
worktrees?: DashWorktree[];
|
|
274
|
+
/**
|
|
275
|
+
* Worktrees still on record whose folder is no longer a checkout — removed, or removed with a failure the lens recorded
|
|
276
|
+
* — left out of `worktrees`: `lensmcp instance prune` forgets them and drops the data the lens made for them.
|
|
277
|
+
*/
|
|
278
|
+
worktreesGone?: number;
|
|
274
279
|
/** Set when THIS dashboard is a worktree instance's: whose worktree it is. */
|
|
275
280
|
instance?: {
|
|
276
281
|
name: string;
|
|
@@ -965,6 +970,7 @@ export interface DashSummary {
|
|
|
965
970
|
troubled: number;
|
|
966
971
|
instance?: DashCluster['instance'];
|
|
967
972
|
worktrees?: DashWorktree[];
|
|
973
|
+
worktreesGone?: number;
|
|
968
974
|
};
|
|
969
975
|
/** `DashSession.setupIssues.length`. */
|
|
970
976
|
setupIssues?: number;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design first (planning/team/20): no top-level goal starts without a design the person approved. The goal itself waits in
|
|
3
|
+
* the task state `design` (DF-D1) while the overseer writes its design — Markdown from a template per type (DF-D2,
|
|
4
|
+
* DF-D3) — and the person answers its questions and approves it (DF-D5, DF-D6). Approving opens the goal from the
|
|
5
|
+
* design's brief; managers claim it as any goal.
|
|
6
|
+
*
|
|
7
|
+
* A design has one **type** — what the change is for — and any number of **concerns**: the parts of the system it touches
|
|
8
|
+
* that need their own say (the owner's DF-D3 note: «maybe more types, or recategorize them»). The type sets the sections
|
|
9
|
+
* that argue the change; each concern adds the sections a reviewer of that part asks for.
|
|
10
|
+
*/
|
|
11
|
+
/** What the change is for — one per design. */
|
|
12
|
+
export declare const DESIGN_TYPES: readonly ["bug", "investigation", "performance", "reliability", "feature", "architecture", "maintenance"];
|
|
13
|
+
export type DesignType = (typeof DESIGN_TYPES)[number];
|
|
14
|
+
/** What the change touches that needs its own sections — any number per design. */
|
|
15
|
+
export declare const DESIGN_CONCERNS: readonly ["security", "data", "api", "ui", "integration", "operations"];
|
|
16
|
+
export type DesignConcern = (typeof DESIGN_CONCERNS)[number];
|
|
17
|
+
/** Words for a type: its name on a page, and the one line that says when to pick it. */
|
|
18
|
+
export declare const DESIGN_TYPE_INFO: Readonly<Record<DesignType, {
|
|
19
|
+
label: string;
|
|
20
|
+
when: string;
|
|
21
|
+
}>>;
|
|
22
|
+
export declare const DESIGN_CONCERN_INFO: Readonly<Record<DesignConcern, {
|
|
23
|
+
label: string;
|
|
24
|
+
when: string;
|
|
25
|
+
}>>;
|
|
26
|
+
/**
|
|
27
|
+
* Where a design is:
|
|
28
|
+
* proposed the overseer or LensMCP suggests it; the person starts it (DF-D9)
|
|
29
|
+
* requested started — waiting for the overseer to draft it
|
|
30
|
+
* drafting the overseer writes it
|
|
31
|
+
* waiting a version waits for the person: answers, then Approve / Ask for changes / Decline
|
|
32
|
+
* changes the person answered otherwise or asked for changes — the overseer writes the next version
|
|
33
|
+
* approved the goal is open (or the amendment holds)
|
|
34
|
+
* declined the person declined it — the goal is cancelled
|
|
35
|
+
*/
|
|
36
|
+
export declare const DESIGN_STAGES: readonly ["proposed", "requested", "drafting", "waiting", "changes", "approved", "declined"];
|
|
37
|
+
export type DesignStage = (typeof DESIGN_STAGES)[number];
|
|
38
|
+
/** A design's question for the person, read from its `## Questions` section: 2–4 options, exactly one recommended. */
|
|
39
|
+
export interface DashDesignQuestion {
|
|
40
|
+
/** `q1`, `q2` … in the order the version asks them. */
|
|
41
|
+
id: string;
|
|
42
|
+
question: string;
|
|
43
|
+
/** What the overseer found that the answer turns on. */
|
|
44
|
+
context?: string;
|
|
45
|
+
options: Array<{
|
|
46
|
+
label: string;
|
|
47
|
+
detail?: string;
|
|
48
|
+
}>;
|
|
49
|
+
/** The number (1…) of the recommended option. */
|
|
50
|
+
recommended: number;
|
|
51
|
+
}
|
|
52
|
+
export interface DashDesignFigure {
|
|
53
|
+
name: string;
|
|
54
|
+
mediaType: string;
|
|
55
|
+
bytes: number;
|
|
56
|
+
sha256: string;
|
|
57
|
+
}
|
|
58
|
+
/** One version of a design: what it was, who wrote it, its questions, and what LensMCP's check warned about. */
|
|
59
|
+
export interface DashDesignVersion {
|
|
60
|
+
n: number;
|
|
61
|
+
at: number;
|
|
62
|
+
/** A session id (the overseer's), or `user`. */
|
|
63
|
+
by: string;
|
|
64
|
+
byName?: string;
|
|
65
|
+
title: string;
|
|
66
|
+
summary: string;
|
|
67
|
+
bytes: number;
|
|
68
|
+
sha256: string;
|
|
69
|
+
questions: DashDesignQuestion[];
|
|
70
|
+
figures: DashDesignFigure[];
|
|
71
|
+
/** What the check let through but said (an inferred concern, an unreferenced figure). */
|
|
72
|
+
warnings?: string[];
|
|
73
|
+
/** A change to a goal already open (DF-D12): approving it changes the goal's brief and plan. */
|
|
74
|
+
amendment?: boolean;
|
|
75
|
+
/** What changed since the previous version, in the author's words. */
|
|
76
|
+
changes?: string;
|
|
77
|
+
}
|
|
78
|
+
/** The person's answer to one question: an option, words, or both. Unanswered questions take the recommended option. */
|
|
79
|
+
export interface DashDesignAnswer {
|
|
80
|
+
id: string;
|
|
81
|
+
option?: number;
|
|
82
|
+
text?: string;
|
|
83
|
+
}
|
|
84
|
+
/** The person's word on one version. */
|
|
85
|
+
export interface DashDesignReply {
|
|
86
|
+
version: number;
|
|
87
|
+
at: number;
|
|
88
|
+
verdict: 'approve' | 'changes' | 'decline';
|
|
89
|
+
answers: DashDesignAnswer[];
|
|
90
|
+
note?: string;
|
|
91
|
+
/** An approve that answered otherwise than recommended, or left a note: it sent the design back for a revision (DF-D5). */
|
|
92
|
+
revise?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface DashDesignRequest {
|
|
95
|
+
text: string;
|
|
96
|
+
/** `user`, the overseer's session id, or `lensmcp` (a main QA run's follow-up). */
|
|
97
|
+
by: string;
|
|
98
|
+
byName?: string;
|
|
99
|
+
from: 'person' | 'overseer' | 'lensmcp';
|
|
100
|
+
at: number;
|
|
101
|
+
}
|
|
102
|
+
export interface DashGoalDesign {
|
|
103
|
+
type: DesignType;
|
|
104
|
+
concerns: DesignConcern[];
|
|
105
|
+
stage: DesignStage;
|
|
106
|
+
request: DashDesignRequest;
|
|
107
|
+
/** Who writes it: the overseer, or the person (who then approves it with no second round — DF-D4). */
|
|
108
|
+
author: 'overseer' | 'person';
|
|
109
|
+
drafting?: {
|
|
110
|
+
by: string;
|
|
111
|
+
byName?: string;
|
|
112
|
+
at: number;
|
|
113
|
+
until: number;
|
|
114
|
+
};
|
|
115
|
+
versions: DashDesignVersion[];
|
|
116
|
+
replies: DashDesignReply[];
|
|
117
|
+
approved?: {
|
|
118
|
+
at: number;
|
|
119
|
+
version: number;
|
|
120
|
+
};
|
|
121
|
+
declined?: {
|
|
122
|
+
at: number;
|
|
123
|
+
why: string;
|
|
124
|
+
};
|
|
125
|
+
/** An amendment's version waiting for the person, on a goal that is open or claimed. */
|
|
126
|
+
amendment?: {
|
|
127
|
+
version: number;
|
|
128
|
+
at: number;
|
|
129
|
+
};
|
|
130
|
+
/** Where the approved design is committed by the goal's branch (DF-D13), repository-relative. */
|
|
131
|
+
file?: string;
|
|
132
|
+
}
|
|
133
|
+
/** A design on the Inbox › Designs list. */
|
|
134
|
+
export interface DashDesignBrief {
|
|
135
|
+
goalId: string;
|
|
136
|
+
title: string;
|
|
137
|
+
state: string;
|
|
138
|
+
stage: DesignStage;
|
|
139
|
+
type: DesignType;
|
|
140
|
+
concerns: DesignConcern[];
|
|
141
|
+
author: 'overseer' | 'person';
|
|
142
|
+
priority: number;
|
|
143
|
+
/** The newest version's number, summary and open question count. */
|
|
144
|
+
version?: number;
|
|
145
|
+
summary?: string;
|
|
146
|
+
questions?: number;
|
|
147
|
+
amendment?: boolean;
|
|
148
|
+
request: DashDesignRequest;
|
|
149
|
+
updatedAt: number;
|
|
150
|
+
}
|
|
151
|
+
export interface DashDesignsAnswer {
|
|
152
|
+
designs: DashDesignBrief[];
|
|
153
|
+
/** Designs waiting on the person (stage `waiting`, an amendment too) and proposed ones. */
|
|
154
|
+
counts: {
|
|
155
|
+
waiting: number;
|
|
156
|
+
proposed: number;
|
|
157
|
+
drafting: number;
|
|
158
|
+
requested: number;
|
|
159
|
+
};
|
|
160
|
+
/** Whether this repository requires a design for every goal (`.lensmcp/team/design.json`, on by default — DF-D8). */
|
|
161
|
+
required: boolean;
|
|
162
|
+
observedAt: number;
|
|
163
|
+
}
|
|
164
|
+
/** One design whole: the goal's design record and the newest (or asked) version's Markdown. */
|
|
165
|
+
export interface DashDesignAnswerOne {
|
|
166
|
+
goalId: string;
|
|
167
|
+
title: string;
|
|
168
|
+
state: string;
|
|
169
|
+
priority: number;
|
|
170
|
+
design: DashGoalDesign;
|
|
171
|
+
version?: number;
|
|
172
|
+
markdown?: string;
|
|
173
|
+
/** The previous version's Markdown, for the page's diff. */
|
|
174
|
+
previous?: string;
|
|
175
|
+
}
|
|
176
|
+
/** The template a person (or the overseer) fills in, for a type and its concerns. */
|
|
177
|
+
export interface DashDesignTemplate {
|
|
178
|
+
type: DesignType;
|
|
179
|
+
concerns: DesignConcern[];
|
|
180
|
+
markdown: string;
|
|
181
|
+
}
|
|
182
|
+
/** What LensMCP's check says of a draft: refused for any problem; warnings let it through. */
|
|
183
|
+
export interface DashDesignCheck {
|
|
184
|
+
ok: boolean;
|
|
185
|
+
problems: string[];
|
|
186
|
+
warnings: string[];
|
|
187
|
+
questions: DashDesignQuestion[];
|
|
188
|
+
title?: string;
|
|
189
|
+
summary?: string;
|
|
190
|
+
}
|
|
191
|
+
/** A goal's design as the board shows it (DashTeamTask.design): where it is, its type, its newest version. */
|
|
192
|
+
export interface DashTeamTaskDesign {
|
|
193
|
+
stage: DesignStage;
|
|
194
|
+
type: DesignType;
|
|
195
|
+
author: 'overseer' | 'person';
|
|
196
|
+
version?: number;
|
|
197
|
+
/** The newest version's questions for the person. */
|
|
198
|
+
questions?: number;
|
|
199
|
+
amendment?: boolean;
|
|
200
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const DESIGN_TYPES=["bug","investigation","performance","reliability","feature","architecture","maintenance"],DESIGN_CONCERNS=["security","data","api","ui","integration","operations"],DESIGN_TYPE_INFO={bug:{label:"Bug",when:"Something works wrong, and the cause is known or can be found by reading the code."},investigation:{label:"Investigation",when:"Symptoms without a known cause: research first, and the goal ends in a decision or a fix."},performance:{label:"Performance",when:"Something is measurably slow, heavy or costly: a baseline the lens measured and a target."},reliability:{label:"Reliability",when:"Crashes, stalls, flaky tests, lost work, CI or the machine: how it fails and how often."},feature:{label:"Feature",when:"Someone can do something they cannot do now."},architecture:{label:"Architecture",when:"Boundaries, contracts or structure change, in steps that each ship."},maintenance:{label:"Maintenance",when:"Upgrades, moves, tooling and cleanup: no new behaviour, and nothing breaks."}},DESIGN_CONCERN_INFO={security:{label:"Security",when:"Auth, permissions, secrets, input from outside, or anything an attacker would read."},data:{label:"Data",when:"Schema, migrations, backfills, or data already stored."},api:{label:"API",when:"A request or response other code or other people depend on."},ui:{label:"UI",when:"Screens, flows or what a person sees."},integration:{label:"Integration",when:"A service outside the repository: its API, keys, limits and failures."},operations:{label:"Operations",when:"How it deploys, runs, is watched and is rolled back."}},DESIGN_STAGES=["proposed","requested","drafting","waiting","changes","approved","declined"];
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { DashTeamKind, DashTeamOutcome, DashTeamTaskState } from './team.js';
|
|
2
|
+
/**
|
|
3
|
+
* A goal's outcome row (planning/team/18 RT-D16): its run's outcomes in numbers, written when its archive is, or by the
|
|
4
|
+
* retrospective for a goal that never archives, and kept in the coordination store. Later retrospectives grade the
|
|
5
|
+
* changes applied after a goal against the rows of the goals that follow it; a row says nothing about why.
|
|
6
|
+
*/
|
|
7
|
+
export interface DashGoalOutcome {
|
|
8
|
+
schema: 1;
|
|
9
|
+
goalId: string;
|
|
10
|
+
title: string;
|
|
11
|
+
repoId: string;
|
|
12
|
+
/** What wrote it: the goal's archive, or a retrospective of a goal with none. */
|
|
13
|
+
source: 'archive' | 'retrospective';
|
|
14
|
+
writtenAt: number;
|
|
15
|
+
/** The run review's window — `open`: the goal was still running. */
|
|
16
|
+
window: {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
open: boolean;
|
|
20
|
+
};
|
|
21
|
+
state: DashTeamTaskState;
|
|
22
|
+
outcome?: DashTeamOutcome;
|
|
23
|
+
/** The lensmcp that wrote the row. */
|
|
24
|
+
lensmcp?: string;
|
|
25
|
+
changes: DashGoalOutcomeChanges;
|
|
26
|
+
/** Bugs filed against, and tests failed on, a change a review had approved — the verdicts an outcome contradicted. */
|
|
27
|
+
afterApproval: DashGoalOutcomeContradiction[];
|
|
28
|
+
/** Per check: seeded, its verdicts, caught later (check-counts.ts), without the review ids. */
|
|
29
|
+
checks: DashGoalOutcomeCheck[];
|
|
30
|
+
qa: {
|
|
31
|
+
runs: number;
|
|
32
|
+
passed: number;
|
|
33
|
+
failed: number;
|
|
34
|
+
};
|
|
35
|
+
/** Per kind of task: how many, ms waited from created to first claim, ms worked from first claim to closed. */
|
|
36
|
+
time: Partial<Record<DashTeamKind, {
|
|
37
|
+
tasks: number;
|
|
38
|
+
waited: number;
|
|
39
|
+
worked: number;
|
|
40
|
+
}>>;
|
|
41
|
+
sessions: DashGoalOutcomeSessions;
|
|
42
|
+
/** The run's model tokens (input with cache, and output), corrected as foodguard-157 made them; per change made. */
|
|
43
|
+
tokens?: {
|
|
44
|
+
total: number;
|
|
45
|
+
perChange?: number;
|
|
46
|
+
};
|
|
47
|
+
/** The paths the goal's work named or edited, at most 300 — what a proposal's path scope is matched against. */
|
|
48
|
+
touched?: string[];
|
|
49
|
+
/** The run review's flags by kind. */
|
|
50
|
+
flags: Record<string, number>;
|
|
51
|
+
/** What the agents worked under (RT-D5): each role's rules hash and when it was in force, the flow's, the checks'. */
|
|
52
|
+
inForce: DashGoalInForce;
|
|
53
|
+
/**
|
|
54
|
+
* The lessons the run's claims were told (RT-D15), each with the claims and changes it was told on, and the bugs filed
|
|
55
|
+
* and tests failed after an approval on those changes — what grades a lesson beyond its finding's acceptance check.
|
|
56
|
+
* Absent on a row a lensmcp before this wrote.
|
|
57
|
+
*/
|
|
58
|
+
lessons?: DashGoalOutcomeLesson[];
|
|
59
|
+
/**
|
|
60
|
+
* Transcript mistakes LensMCP's recipes counted (planning/team/18 gate 7) — kept by the goal's retrospective, which
|
|
61
|
+
* reads the transcripts; absent on a row no retrospective read.
|
|
62
|
+
*/
|
|
63
|
+
transcripts?: DashGoalTranscripts;
|
|
64
|
+
/** Items left out past a cap — the row counts what it read. */
|
|
65
|
+
truncated?: {
|
|
66
|
+
tasks?: number;
|
|
67
|
+
joins?: number;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface DashGoalOutcomeChanges {
|
|
71
|
+
/** Builds and bugs the team made. */
|
|
72
|
+
total: number;
|
|
73
|
+
/** Those with at least one review, and those whose every reviewing role's newest review approved. */
|
|
74
|
+
reviewed: number;
|
|
75
|
+
approved: number;
|
|
76
|
+
/** Those reworked at least once, and the rework rounds of all of them. */
|
|
77
|
+
reworked: number;
|
|
78
|
+
reworkRounds: number;
|
|
79
|
+
/** Reviewed changes by rework rounds: `{ "0": 5, "1": 2, "2": 1 }`. */
|
|
80
|
+
byRounds: Record<string, number>;
|
|
81
|
+
}
|
|
82
|
+
export interface DashGoalOutcomeContradiction {
|
|
83
|
+
/** The bug filed, or the test that failed. */
|
|
84
|
+
taskId: string;
|
|
85
|
+
kind: 'bug' | 'test';
|
|
86
|
+
/** The change it contradicts, and the reviews that had approved it. */
|
|
87
|
+
changeId: string;
|
|
88
|
+
approvedBy: string[];
|
|
89
|
+
/** The paths it and the change share — the change's own when it names none. */
|
|
90
|
+
paths: string[];
|
|
91
|
+
/** The check families the approving reviews passed or ruled n/a. */
|
|
92
|
+
families: string[];
|
|
93
|
+
}
|
|
94
|
+
export interface DashGoalTranscripts {
|
|
95
|
+
/** Transcripts read, their bytes, and those cut or left out past the caps. */
|
|
96
|
+
agents: number;
|
|
97
|
+
bytes: number;
|
|
98
|
+
cut?: number;
|
|
99
|
+
/** By recipe: lines matched and the agents they came from; for repeated errors, groups and their keys (`5× Error: …`). */
|
|
100
|
+
recipes: Partial<Record<string, {
|
|
101
|
+
count: number;
|
|
102
|
+
agents: number;
|
|
103
|
+
keys?: string[];
|
|
104
|
+
}>>;
|
|
105
|
+
}
|
|
106
|
+
export interface DashGoalOutcomeLesson {
|
|
107
|
+
id: string;
|
|
108
|
+
/** Claims it was told at, and the changes (builds and bugs) those claims were on. */
|
|
109
|
+
told: number;
|
|
110
|
+
changes: number;
|
|
111
|
+
/** The afterApproval rows on a change it was told on: the bug or test's task id — it was told, and it did not hold. */
|
|
112
|
+
missed: string[];
|
|
113
|
+
}
|
|
114
|
+
export type DashGoalOutcomeCheck = {
|
|
115
|
+
id: string;
|
|
116
|
+
family: string;
|
|
117
|
+
level?: 'must' | 'should';
|
|
118
|
+
seeded: number;
|
|
119
|
+
pass: number;
|
|
120
|
+
fail: number;
|
|
121
|
+
na: number;
|
|
122
|
+
open: number;
|
|
123
|
+
caughtLater: number;
|
|
124
|
+
};
|
|
125
|
+
export interface DashGoalOutcomeSessions {
|
|
126
|
+
/** Agents with a session, by the role they held longest. */
|
|
127
|
+
byRole: Record<string, number>;
|
|
128
|
+
/** Agents that claimed work and completed none. */
|
|
129
|
+
finishedNothing: number;
|
|
130
|
+
/** Spawned agents that never joined. */
|
|
131
|
+
unjoined: number;
|
|
132
|
+
}
|
|
133
|
+
export interface DashGoalInForce {
|
|
134
|
+
/** Each role's rules hash, in the order first joined: how many joins carried it, and when the first and last were. */
|
|
135
|
+
roles: Array<{
|
|
136
|
+
role: string;
|
|
137
|
+
rulesHash: string;
|
|
138
|
+
joins: number;
|
|
139
|
+
from: number;
|
|
140
|
+
to: number;
|
|
141
|
+
}>;
|
|
142
|
+
/** The flow's (flow.json and its caps) and the check catalog's hashes the joins saw. */
|
|
143
|
+
flow: string[];
|
|
144
|
+
checks: string[];
|
|
145
|
+
/** Joins from a lensmcp too old to record what it sent. */
|
|
146
|
+
unrecorded: number;
|
|
147
|
+
/**
|
|
148
|
+
* The lensmcp versions that served the joins, in the order first seen, with the roles that joined through each: two
|
|
149
|
+
* versions in one goal is LensMCP's own rules changing under it (a lens upgraded mid-run, or a worktree's older lens).
|
|
150
|
+
* Absent on a row a lensmcp before this recorded, and empty when no join recorded its version.
|
|
151
|
+
*/
|
|
152
|
+
lensmcp?: Array<{
|
|
153
|
+
version: string;
|
|
154
|
+
joins: number;
|
|
155
|
+
roles: string[];
|
|
156
|
+
from: number;
|
|
157
|
+
to: number;
|
|
158
|
+
}>;
|
|
159
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A goal's retrospective run (planning/team/18 RT-D1, RT-D2): queued when the goal's archive is written or the person
|
|
3
|
+
* clicks, run by the lens — a digest code builds, one Opus call only when a gate fired — and what it wrote: the goal's
|
|
4
|
+
* account, the findings it proposed, those it merged into a live one, those it dropped and why, the grades it read first.
|
|
5
|
+
*/
|
|
6
|
+
export type DashGoalRetroState = 'queued' | 'running' | 'waiting' | 'done' | 'failed';
|
|
7
|
+
export interface DashGoalRetroGate {
|
|
8
|
+
id: string;
|
|
9
|
+
rank: number;
|
|
10
|
+
fired: boolean;
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DashGoalRetro {
|
|
14
|
+
schema: 1;
|
|
15
|
+
goalId: string;
|
|
16
|
+
repoId: string;
|
|
17
|
+
title: string;
|
|
18
|
+
/** Who asked: the goal's archive (it completed), or the person. */
|
|
19
|
+
by: 'archive' | 'person';
|
|
20
|
+
queuedAt: number;
|
|
21
|
+
state: DashGoalRetroState;
|
|
22
|
+
/** What it waits on: Retrospectives switched off, no working key, the day's allowance spent. */
|
|
23
|
+
wait?: 'off' | 'key' | 'allowance';
|
|
24
|
+
reason?: string;
|
|
25
|
+
startedAt?: number;
|
|
26
|
+
endedAt?: number;
|
|
27
|
+
gates?: DashGoalRetroGate[];
|
|
28
|
+
/** The goal's account (markdown): where time went, what nobody knew, how earlier fixes fared. */
|
|
29
|
+
account?: string;
|
|
30
|
+
/** Findings it wrote, those a new sighting merged into, and the proposals it dropped with why. */
|
|
31
|
+
findings?: string[];
|
|
32
|
+
merged?: string[];
|
|
33
|
+
dropped?: string[];
|
|
34
|
+
/** The earlier proposals it graded before proposing (RT-D16). */
|
|
35
|
+
graded?: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
verdict: string;
|
|
38
|
+
}>;
|
|
39
|
+
costUsd?: number;
|
|
40
|
+
model?: string;
|
|
41
|
+
toolCalls?: number;
|
|
42
|
+
digestBytes?: number;
|
|
43
|
+
/** The goal's earlier runs, newest last (at most 10): what each cost counts toward its day's allowance. */
|
|
44
|
+
earlier?: Array<{
|
|
45
|
+
endedAt: number;
|
|
46
|
+
state: DashGoalRetroState;
|
|
47
|
+
costUsd: number;
|
|
48
|
+
findings: number;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
/** `/api/team/retro?id=` — a goal's retrospective (none yet: null), and the day's allowance for them. */
|
|
52
|
+
export interface DashGoalRetroAnswer {
|
|
53
|
+
retro: DashGoalRetro | null;
|
|
54
|
+
allowance: {
|
|
55
|
+
on: boolean;
|
|
56
|
+
dailyUsd: number;
|
|
57
|
+
runUsd: number;
|
|
58
|
+
spentTodayUsd: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
|
@@ -83,6 +83,49 @@ export type DashFindingAction = {
|
|
|
83
83
|
kind: 'issue';
|
|
84
84
|
title: string;
|
|
85
85
|
draft: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A check file in the project's layer (planning/team/18 RT-D7): `add` a new one, `narrow` one with the same id (the
|
|
89
|
+
* whole file both times), or `off` — never for a must check of the security or data families. Written uncommitted.
|
|
90
|
+
*/
|
|
91
|
+
| {
|
|
92
|
+
kind: 'check';
|
|
93
|
+
repoId: string;
|
|
94
|
+
id: string;
|
|
95
|
+
op: 'add' | 'narrow' | 'off';
|
|
96
|
+
text?: string;
|
|
97
|
+
why?: string;
|
|
98
|
+
level?: 'must' | 'should';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* One rule of `project.md` or a role file, by its anchor — the rule's exact text, found exactly once: `add` a line
|
|
102
|
+
* after it, `edit` it, `retire` its line. Refused past the brief's cut or a role's budget. Written uncommitted.
|
|
103
|
+
*/
|
|
104
|
+
| {
|
|
105
|
+
kind: 'rule';
|
|
106
|
+
repoId: string;
|
|
107
|
+
file: string;
|
|
108
|
+
op: 'add' | 'edit' | 'retire';
|
|
109
|
+
anchor: string;
|
|
110
|
+
text?: string;
|
|
111
|
+
}
|
|
112
|
+
/** `flow.json` keys set (caps, goal, handOffs; null takes one out) — refused below the lensmcp that reads them. */
|
|
113
|
+
| {
|
|
114
|
+
kind: 'flow';
|
|
115
|
+
repoId: string;
|
|
116
|
+
set: Record<string, unknown>;
|
|
117
|
+
minLensmcp?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A team lesson (planning/team/18 RT-D15), `.lensmcp/team/lessons/<id>.md`: `add` the whole file (a fact, its roles and
|
|
121
|
+
* paths, the file:line it cites; LensMCP sets its expiry, 90 days), `renew` its expiry, `retire` it. Written uncommitted.
|
|
122
|
+
*/
|
|
123
|
+
| {
|
|
124
|
+
kind: 'lesson';
|
|
125
|
+
repoId: string;
|
|
126
|
+
id: string;
|
|
127
|
+
op: 'add' | 'renew' | 'retire';
|
|
128
|
+
text?: string;
|
|
86
129
|
};
|
|
87
130
|
export type DashFindingActionKind = DashFindingAction['kind'];
|
|
88
131
|
/** The kinds Apply runs itself; any other is the person's — but an `issue`, run once the issues folder is set (S6). */
|
|
@@ -99,6 +142,9 @@ export interface DashFindingActionResult {
|
|
|
99
142
|
kind: DashFindingActionKind;
|
|
100
143
|
outcome: 'ran' | 'yours' | 'failed';
|
|
101
144
|
message?: string;
|
|
145
|
+
/** A file it wrote, and the sha-256 of what it wrote — a later edit outside Apply is the person's (planning/team/18 RT-D14). */
|
|
146
|
+
path?: string;
|
|
147
|
+
sha?: string;
|
|
102
148
|
}
|
|
103
149
|
/** The newest Apply: every action run (or the person's) — or, not ok, the ones that failed; the finding stays proposed. */
|
|
104
150
|
export interface DashFindingApply {
|
|
@@ -117,8 +163,62 @@ export interface DashFindingDismissed {
|
|
|
117
163
|
}
|
|
118
164
|
export interface DashFindingFixed {
|
|
119
165
|
at: number;
|
|
120
|
-
/**
|
|
121
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Its proposal applied and its checks ok for 24 h; its checks ok for 24 h with nothing applied; the overseer said so;
|
|
168
|
+
* its acceptance check held on the goals after it (planning/team/18 RT-D16).
|
|
169
|
+
*/
|
|
170
|
+
how: 'applied' | 'cleared' | 'overseer' | 'held';
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* How an applied proposal is judged on the goals after it (planning/team/18 RT-D16): a metric read from their outcome
|
|
174
|
+
* rows, with no model. `metric` is one of:
|
|
175
|
+
* - `check.caughtLater:<id>`, `check.fail:<id>`: per seeding of the check;
|
|
176
|
+
* - `afterApproval`, `afterApproval.family:<family>`: bugs and failed tests after an approval, per reviewed change;
|
|
177
|
+
* - `rework.rounds`: per reviewed change;
|
|
178
|
+
* - `flags:<kind>`: per goal;
|
|
179
|
+
* - `sessions.finishedNothing`: per session;
|
|
180
|
+
* - `wait:<kind>`: ms waited per ms worked, for tasks of the kind;
|
|
181
|
+
* - `tokens.perChange`: per change made.
|
|
182
|
+
*/
|
|
183
|
+
export interface DashFindingAcceptance {
|
|
184
|
+
metric: string;
|
|
185
|
+
/** The goals it is judged on: those touching one of these roles or paths — none: every goal of its repository. */
|
|
186
|
+
scope?: {
|
|
187
|
+
roles?: string[];
|
|
188
|
+
paths?: string[];
|
|
189
|
+
};
|
|
190
|
+
/** The metric over the goals it came from, and what it must reach: at most (`down`) or at least (`up`). */
|
|
191
|
+
baseline: number;
|
|
192
|
+
target: number;
|
|
193
|
+
direction: 'down' | 'up';
|
|
194
|
+
/** The next `goals` goals in scope (3), or what `days` (21) brought. */
|
|
195
|
+
goals: number;
|
|
196
|
+
days: number;
|
|
197
|
+
/** The least exposure a verdict needs (3): seedings, reviewed changes, sessions, tasks of the kind, goals. */
|
|
198
|
+
minExposure: number;
|
|
199
|
+
/** One metric that must not get worse by more than `tolerance`, a fraction of its baseline (0.25). */
|
|
200
|
+
counter?: {
|
|
201
|
+
metric: string;
|
|
202
|
+
baseline: number;
|
|
203
|
+
direction: 'down' | 'up';
|
|
204
|
+
tolerance: number;
|
|
205
|
+
};
|
|
206
|
+
/** The goals its baseline was read from: never graded on them. */
|
|
207
|
+
from?: string[];
|
|
208
|
+
}
|
|
209
|
+
export type DashFindingGradeVerdict = 'held' | 'not-held' | 'side-effect' | 'unexposed' | 'expired';
|
|
210
|
+
/** An applied proposal graded (RT-D16) — a count of recurrence over the goals read, not a claim about cause. */
|
|
211
|
+
export interface DashFindingGrade {
|
|
212
|
+
at: number;
|
|
213
|
+
verdict: DashFindingGradeVerdict;
|
|
214
|
+
/** The goals read, oldest first. */
|
|
215
|
+
goals: string[];
|
|
216
|
+
/** The metric over them, and its exposure; the counter-metric's. */
|
|
217
|
+
value?: number;
|
|
218
|
+
exposure: number;
|
|
219
|
+
counterValue?: number;
|
|
220
|
+
/** Not held or a side effect, across the proposals tried for it: two make a retire or escalate proposal. */
|
|
221
|
+
failures: number;
|
|
122
222
|
}
|
|
123
223
|
/**
|
|
124
224
|
* A LensMCP-cause finding filed as an issue in the lensmcp checkout (planning/team/15 S6, SA-D5): its copy in the
|
|
@@ -166,6 +266,17 @@ export interface DashFinding {
|
|
|
166
266
|
fixed?: DashFindingFixed;
|
|
167
267
|
/** Filed as a LensMCP issue (cause `lensmcp`, the issues folder set). */
|
|
168
268
|
issue?: DashFindingIssue;
|
|
269
|
+
/** How its applied proposal is judged on the goals after it, and the newest grade (planning/team/18 RT-D16). */
|
|
270
|
+
acceptance?: DashFindingAcceptance;
|
|
271
|
+
grade?: DashFindingGrade;
|
|
272
|
+
/** A retrospective wrote it (planning/team/18 RT-D1) — the overseer's otherwise. */
|
|
273
|
+
source?: 'retrospective';
|
|
274
|
+
/** `<repo>:<target>:<signal>` (RT-D8): a new sighting of the same cause merges into it as another goal (RT-D9). */
|
|
275
|
+
causeKey?: string;
|
|
276
|
+
/** The independent goals that showed its cause, oldest first. */
|
|
277
|
+
goals?: string[];
|
|
278
|
+
/** An unapplied retrospective proposal expires then (RT-D9: 14 days). */
|
|
279
|
+
expiresAt?: number;
|
|
169
280
|
createdAt: number;
|
|
170
281
|
updatedAt: number;
|
|
171
282
|
/** The evidence and the proposal in words (markdown) — whole on one finding, absent in a list. */
|
package/lib/overseer-findings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var i=(e,n)=>c(e,"name",{value:n,configurable:!0});var u=Object.defineProperty,o=i((e,n)=>u(e,"name",{value:n,configurable:!0}),"
|
|
1
|
+
"use strict";var c=Object.defineProperty;var i=(e,n)=>c(e,"name",{value:n,configurable:!0});var u=Object.defineProperty,o=i((e,n)=>u(e,"name",{value:n,configurable:!0}),"s");export const FINDING_RUN_KINDS=["operate","stop-launch","close-session","role","role-off","check","rule","flow","lesson"];export function findingLive(e){return e.state==="open"||e.state==="proposed"||e.state==="applied"}i(findingLive,"findingLive"),o(findingLive,"findingLive");export function findingRunsActions(e,n={}){return e.actions.some(s=>FINDING_RUN_KINDS.includes(s.kind)||s.kind==="issue"&&n.issuesFolder===!0)}i(findingRunsActions,"findingRunsActions"),o(findingRunsActions,"findingRunsActions");export function findingsForCheck(e,n,s){const r=`repo:${n}/team.${s}`;return e.filter(t=>findingLive(t)&&t.checks.includes(r))}i(findingsForCheck,"findingsForCheck"),o(findingsForCheck,"findingsForCheck");
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The person writes to the overseer (planning/team/20 DF-D10): one contact for questions, designs and the board. A
|
|
3
|
+
* message wakes the overseer's inbox launch; its reply comes back to the Inbox beside it. Kept machine-wide in
|
|
4
|
+
* `~/.lensmcp/overseer/messages.json` (the newest 100).
|
|
5
|
+
*/
|
|
6
|
+
export interface DashOverseerMessage {
|
|
7
|
+
/** `om-` and 10 hex digits. */
|
|
8
|
+
id: string;
|
|
9
|
+
at: number;
|
|
10
|
+
text: string;
|
|
11
|
+
/** A repository it is about, by name — none: the whole machine. */
|
|
12
|
+
repository?: string;
|
|
13
|
+
/** A goal it is about. */
|
|
14
|
+
goalId?: string;
|
|
15
|
+
reply?: {
|
|
16
|
+
at: number;
|
|
17
|
+
text: string;
|
|
18
|
+
};
|
|
19
|
+
/** The overseer read it (an inbox launch picked it up) and has not replied yet. */
|
|
20
|
+
seenAt?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface DashOverseerMessagesAnswer {
|
|
23
|
+
messages: DashOverseerMessage[];
|
|
24
|
+
unanswered: number;
|
|
25
|
+
observedAt: number;
|
|
26
|
+
}
|
|
27
|
+
/** The most a message or a reply holds. */
|
|
28
|
+
export declare const MAX_OVERSEER_MESSAGE = 4000;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const MAX_OVERSEER_MESSAGE=4e3;
|
package/lib/overseer-rounds.d.ts
CHANGED
|
@@ -9,6 +9,12 @@ import type { DashTeamLaunch, DashTeamLaunchClient } from './team.js';
|
|
|
9
9
|
* POST /api/overseer/rounds { requestId } → DashOverseerStatus — a round now, as the person asks
|
|
10
10
|
* POST /api/overseer/rounds/<id>/stop → DashOverseerStatus
|
|
11
11
|
* GET /api/overseer/digests[/<id>] DashOverseerDigests / { digest }
|
|
12
|
+
* GET /api/overseer/messages DashOverseerMessagesAnswer (overseer-messages.ts)
|
|
13
|
+
* POST /api/overseer/messages { text, repository?, goalId?, requestId? } → { message } — the person's
|
|
14
|
+
*
|
|
15
|
+
* One identity and one folder, three kinds of launch (planning/team/20 DF-D11), each single-flight on the machine:
|
|
16
|
+
* a **round** (plan 15), a **design** (the machine's next design to draft, at most `designsPerDay`), and the **inbox**
|
|
17
|
+
* (a question waiting on the person, or a message from them) — so a long design never delays an answer.
|
|
12
18
|
*/
|
|
13
19
|
export interface DashOverseerSettings {
|
|
14
20
|
/** Off until the person turns it on: no tick, no round. */
|
|
@@ -34,7 +40,27 @@ export interface DashOverseerSettings {
|
|
|
34
40
|
* LensMCP. None: findings stay in `~/.lensmcp/overseer/findings/` alone.
|
|
35
41
|
*/
|
|
36
42
|
issuesDir?: string;
|
|
43
|
+
/** The most design launches a day (local) — 0–48, 12 by default (DF-D11, the owner's choice); 0: none. */
|
|
44
|
+
designsPerDay: number;
|
|
45
|
+
/** A design launch is stopped past this many minutes — 10–120, 45 by default. */
|
|
46
|
+
designMinutes: number;
|
|
47
|
+
/** A design launch is stopped past this many million tokens — 1–60, 15 by default. */
|
|
48
|
+
designTokensM: number;
|
|
49
|
+
/** An inbox launch starts at most this often, in minutes — 2–120, 10 by default. */
|
|
50
|
+
inboxEveryMinutes: number;
|
|
51
|
+
/** An inbox launch is stopped past this many minutes — 2–60, 10 by default. */
|
|
52
|
+
inboxMinutes: number;
|
|
53
|
+
/** An inbox launch is stopped past this many million tokens — 1–20, 3 by default. */
|
|
54
|
+
inboxTokensM: number;
|
|
55
|
+
/**
|
|
56
|
+
* A design launch's model and effort, in the client's own words. None: {@link DESIGN_MODEL_DEFAULT} on Claude Code
|
|
57
|
+
* (Opus — design is where model strength matters), the round's model on Codex; {@link DESIGN_EFFORT_DEFAULT}.
|
|
58
|
+
*/
|
|
59
|
+
designModel?: string;
|
|
60
|
+
designEffort?: string;
|
|
37
61
|
}
|
|
62
|
+
/** What a launch of the overseer is for (planning/team/20 DF-D11). */
|
|
63
|
+
export type DashOverseerPurpose = 'round' | 'design' | 'inbox';
|
|
38
64
|
/** Why a round ran: a new bad item, a warning held a day, the day's digest, or the person asked. */
|
|
39
65
|
export type DashOverseerRoundReason = 'bad' | 'held' | 'digest' | 'asked';
|
|
40
66
|
export interface DashOverseerRound {
|
|
@@ -62,6 +88,26 @@ export interface DashOverseerNext {
|
|
|
62
88
|
/** The next digest round, when it is on. */
|
|
63
89
|
digestAt?: number;
|
|
64
90
|
}
|
|
91
|
+
/** A design or an inbox launch (planning/team/20 DF-D11) — a round is a {@link DashOverseerRound}. */
|
|
92
|
+
export interface DashOverseerLaunch {
|
|
93
|
+
/** Its launch's id. */
|
|
94
|
+
id: string;
|
|
95
|
+
purpose: 'design' | 'inbox';
|
|
96
|
+
startedAt: number;
|
|
97
|
+
/** A design launch's design: the goal it drafts, where. */
|
|
98
|
+
design?: {
|
|
99
|
+
repoId: string;
|
|
100
|
+
repository: string;
|
|
101
|
+
goalId: string;
|
|
102
|
+
title: string;
|
|
103
|
+
};
|
|
104
|
+
/** An inbox launch's reasons: the questions waiting on the person and the person's messages that woke it, by id. */
|
|
105
|
+
questions?: string[];
|
|
106
|
+
messages?: string[];
|
|
107
|
+
launch?: DashTeamLaunch;
|
|
108
|
+
tokensM?: number;
|
|
109
|
+
stoppedFor?: 'deadline' | 'tokens';
|
|
110
|
+
}
|
|
65
111
|
/** `GET /api/overseer`. */
|
|
66
112
|
export interface DashOverseerStatus {
|
|
67
113
|
settings: DashOverseerSettings;
|
|
@@ -76,6 +122,10 @@ export interface DashOverseerStatus {
|
|
|
76
122
|
/** Rounds started today (local), of `roundsPerDay`. */
|
|
77
123
|
today: number;
|
|
78
124
|
next: DashOverseerNext;
|
|
125
|
+
/** Design and inbox launches, newest first, at most 20 (planning/team/20). */
|
|
126
|
+
launches?: DashOverseerLaunch[];
|
|
127
|
+
/** Design launches started today (local), of `designsPerDay`. */
|
|
128
|
+
designsToday?: number;
|
|
79
129
|
}
|
|
80
130
|
export interface DashOverseerDigest {
|
|
81
131
|
id: string;
|
|
@@ -108,4 +158,32 @@ export declare const OVERSEER_BOUNDS: {
|
|
|
108
158
|
readonly min: 1;
|
|
109
159
|
readonly max: 200;
|
|
110
160
|
};
|
|
161
|
+
readonly designsPerDay: {
|
|
162
|
+
readonly min: 0;
|
|
163
|
+
readonly max: 48;
|
|
164
|
+
};
|
|
165
|
+
readonly designMinutes: {
|
|
166
|
+
readonly min: 10;
|
|
167
|
+
readonly max: 120;
|
|
168
|
+
};
|
|
169
|
+
readonly designTokensM: {
|
|
170
|
+
readonly min: 1;
|
|
171
|
+
readonly max: 60;
|
|
172
|
+
};
|
|
173
|
+
readonly inboxEveryMinutes: {
|
|
174
|
+
readonly min: 2;
|
|
175
|
+
readonly max: 120;
|
|
176
|
+
};
|
|
177
|
+
readonly inboxMinutes: {
|
|
178
|
+
readonly min: 2;
|
|
179
|
+
readonly max: 60;
|
|
180
|
+
};
|
|
181
|
+
readonly inboxTokensM: {
|
|
182
|
+
readonly min: 1;
|
|
183
|
+
readonly max: 20;
|
|
184
|
+
};
|
|
111
185
|
};
|
|
186
|
+
/** A design launch's model on Claude Code when the settings name none: Opus (DF-D11). */
|
|
187
|
+
export declare const DESIGN_MODEL_DEFAULT = "opus";
|
|
188
|
+
/** A design launch's effort when the settings name none. */
|
|
189
|
+
export declare const DESIGN_EFFORT_DEFAULT = "high";
|
package/lib/overseer-rounds.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const OVERSEER_SETTINGS_DEFAULTS={on:!1,client:"claude",roundsPerDay:4,digestHour:8,roundMinutes:30,roundTokensM:20},OVERSEER_BOUNDS={roundsPerDay:{min:1,max:12},digestHour:{min:0,max:23},roundMinutes:{min:5,max:120},roundTokensM:{min:1,max:200}};
|
|
1
|
+
"use strict";export const OVERSEER_SETTINGS_DEFAULTS={on:!1,client:"claude",roundsPerDay:4,digestHour:8,roundMinutes:30,roundTokensM:20,designsPerDay:12,designMinutes:45,designTokensM:15,inboxEveryMinutes:10,inboxMinutes:10,inboxTokensM:3},OVERSEER_BOUNDS={roundsPerDay:{min:1,max:12},digestHour:{min:0,max:23},roundMinutes:{min:5,max:120},roundTokensM:{min:1,max:200},designsPerDay:{min:0,max:48},designMinutes:{min:10,max:120},designTokensM:{min:1,max:60},inboxEveryMinutes:{min:2,max:120},inboxMinutes:{min:2,max:60},inboxTokensM:{min:1,max:20}},DESIGN_MODEL_DEFAULT="opus",DESIGN_EFFORT_DEFAULT="high";
|
package/lib/team-library.d.ts
CHANGED
|
@@ -154,6 +154,15 @@ export interface DashTeamMember {
|
|
|
154
154
|
fields: Record<string, DashTeamFieldSource>;
|
|
155
155
|
/** Why its file was not read (the default stood in) — empty when it was. */
|
|
156
156
|
problems: string[];
|
|
157
|
+
/** The checks it is held to (planning/team/17): how many, how many must, by family — team://checks names them. */
|
|
158
|
+
checks?: {
|
|
159
|
+
count: number;
|
|
160
|
+
must: number;
|
|
161
|
+
families: Array<{
|
|
162
|
+
family: string;
|
|
163
|
+
count: number;
|
|
164
|
+
}>;
|
|
165
|
+
};
|
|
157
166
|
}
|
|
158
167
|
/** `GET /api/team/roles` — the team as the checkout's files make it. */
|
|
159
168
|
export interface DashTeamMembers {
|
package/lib/team.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DashTeamTaskDesign } from './goal-design.js';
|
|
1
2
|
/**
|
|
2
3
|
* The Team page (servers/lensmcp-mcp/src/dashboard/team.ts): the repository's agent team as its coordination store
|
|
3
4
|
* holds it — the agents in their roles, the tasks they take and hand on, each task's work log — and what the person at
|
|
@@ -10,10 +11,11 @@
|
|
|
10
11
|
*/
|
|
11
12
|
export declare const DASH_TEAM_KINDS: readonly ["goal", "build", "bug", "review", "test", "qa", "docs", "marketing", "research", "chore"];
|
|
12
13
|
export type DashTeamKind = (typeof DASH_TEAM_KINDS)[number];
|
|
13
|
-
|
|
14
|
+
/** `design`: a goal waiting for its design to be approved (planning/team/20 DF-D1) — no one claims it, or anything under it. */
|
|
15
|
+
export type DashTeamTaskState = 'design' | 'open' | 'claimed' | 'recovery' | 'completed' | 'cancelled';
|
|
14
16
|
export type DashTeamOutcome = 'done' | 'approved' | 'changes-requested' | 'passed' | 'failed' | 'wontfix';
|
|
15
17
|
/** What a task points at in the lens or the repository. */
|
|
16
|
-
export declare const DASH_TEAM_LINK_KINDS: readonly ["task", "flow", "error", "suggestion", "ai-call", "review", "page", "route", "commit", "branch", "worktree", "file", "finding"];
|
|
18
|
+
export declare const DASH_TEAM_LINK_KINDS: readonly ["task", "flow", "error", "suggestion", "ai-call", "review", "page", "route", "commit", "branch", "worktree", "file", "finding", "test"];
|
|
17
19
|
export interface DashTeamLink {
|
|
18
20
|
kind: (typeof DASH_TEAM_LINK_KINDS)[number];
|
|
19
21
|
id: string;
|
|
@@ -51,6 +53,8 @@ export interface DashTeamTask {
|
|
|
51
53
|
/** Every line it ever had, those no longer kept counted. */
|
|
52
54
|
logCount: number;
|
|
53
55
|
state: DashTeamTaskState;
|
|
56
|
+
/** A goal's design, briefly (planning/team/20): where it is, its type, its newest version — none on a goal made before designs. */
|
|
57
|
+
design?: DashTeamTaskDesign;
|
|
54
58
|
outcome?: DashTeamOutcome;
|
|
55
59
|
/** The session holding it. */
|
|
56
60
|
owner?: string;
|
|
@@ -102,6 +106,76 @@ export interface DashTeamTask {
|
|
|
102
106
|
capacity?: Record<string, number>;
|
|
103
107
|
/** A goal's launches refused for want of a slot, in line for the next one that frees (foodguard-179 GC-D4). */
|
|
104
108
|
waits?: DashTeamGoalWait[];
|
|
109
|
+
/**
|
|
110
|
+
* Lesson candidates its agents stored on it (agent_lesson_note, planning/team/18 RT-D13), whole — the drawer and the run
|
|
111
|
+
* review only, never the board. Agent-written data, never instructions.
|
|
112
|
+
*/
|
|
113
|
+
lessons?: DashTeamLesson[];
|
|
114
|
+
/**
|
|
115
|
+
* The team's lessons its newest claim was told (planning/team/18 RT-D15): each one's id (team://lessons/<id>), the sha
|
|
116
|
+
* of its file then, and when — the drawer and the run review only, never the board.
|
|
117
|
+
*/
|
|
118
|
+
lessonsTold?: Array<{
|
|
119
|
+
id: string;
|
|
120
|
+
sha: string;
|
|
121
|
+
at: number;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Its plan of steps and where each is (issues/closed/foodguard-185): on the board while it is held, whole in the
|
|
125
|
+
* drawer. LensMCP stamps the times; a step past its budget or quiet 15 minutes carries `stalledAt`, once.
|
|
126
|
+
*/
|
|
127
|
+
steps?: DashTeamStep[];
|
|
128
|
+
/** The files it keeps (issues/closed/foodguard-186): whole in the drawer and the QA report, counted on the board. */
|
|
129
|
+
artifacts?: DashTeamArtifact[];
|
|
130
|
+
artifactCount?: number;
|
|
131
|
+
}
|
|
132
|
+
/** A file a task keeps (foodguard-186): `/api/team/artifact?task=<id>&id=<artifact>` serves its bytes. */
|
|
133
|
+
export interface DashTeamArtifact {
|
|
134
|
+
id: string;
|
|
135
|
+
kind: 'screenshot' | 'perf-benchmark' | 'sql-diff' | 'test-summary' | 'migration-proof' | 'other';
|
|
136
|
+
title: string;
|
|
137
|
+
mediaType: string;
|
|
138
|
+
bytes: number;
|
|
139
|
+
sha256: string;
|
|
140
|
+
at: number;
|
|
141
|
+
by: string;
|
|
142
|
+
stepId?: string;
|
|
143
|
+
/** The file it was read from, or the tool whose answer it is (`tool:catalog_route`). */
|
|
144
|
+
from?: string;
|
|
145
|
+
note?: string;
|
|
146
|
+
/** Its bytes are gone — kept 30 days. Set by the drawer's read. */
|
|
147
|
+
pruned?: boolean;
|
|
148
|
+
}
|
|
149
|
+
/** One step of a task's plan (foodguard-185). */
|
|
150
|
+
export interface DashTeamStep {
|
|
151
|
+
id: string;
|
|
152
|
+
title: string;
|
|
153
|
+
budgetMinutes?: number;
|
|
154
|
+
state: 'queued' | 'running' | 'passed' | 'failed' | 'skipped';
|
|
155
|
+
startedAt?: number;
|
|
156
|
+
endedAt?: number;
|
|
157
|
+
updatedAt?: number;
|
|
158
|
+
counts?: {
|
|
159
|
+
passed?: number;
|
|
160
|
+
failed?: number;
|
|
161
|
+
skipped?: number;
|
|
162
|
+
total?: number;
|
|
163
|
+
};
|
|
164
|
+
runIds?: string[];
|
|
165
|
+
note?: string;
|
|
166
|
+
stalledAt?: number;
|
|
167
|
+
}
|
|
168
|
+
/** A fact a team agent noticed while it worked (RT-D13): agent-written data — no other agent is shown it. */
|
|
169
|
+
export interface DashTeamLesson {
|
|
170
|
+
at: number;
|
|
171
|
+
/** The session that wrote it, and the role it was in. */
|
|
172
|
+
sessionId: string;
|
|
173
|
+
role?: string;
|
|
174
|
+
fact: string;
|
|
175
|
+
/** Repository-relative paths it is about, the roles it matters to, and the tasks it rests on. */
|
|
176
|
+
paths?: string[];
|
|
177
|
+
roles?: string[];
|
|
178
|
+
rests?: string[];
|
|
105
179
|
}
|
|
106
180
|
/** A launch in line for a slot (issues/closed/foodguard-179 GC-D4). */
|
|
107
181
|
export interface DashTeamGoalWait {
|
|
@@ -208,7 +282,7 @@ export interface DashTeamTaskWork {
|
|
|
208
282
|
* change completed with no commit or no check, a QA pass naming no run, a claim with no line in ten minutes, a holder
|
|
209
283
|
* whose process ended. Hints, never verdicts.
|
|
210
284
|
*/
|
|
211
|
-
export type DashTeamConductKind = 'checker-edited' | 'whole-suite' | 'outside-paths' | 'no-commit' | 'unchecked' | 'qa-unrun' | 'quiet-claim' | 'host-gone' | 'edited-reserved';
|
|
285
|
+
export type DashTeamConductKind = 'checker-edited' | 'whole-suite' | 'outside-paths' | 'no-commit' | 'unchecked' | 'qa-unrun' | 'quiet-claim' | 'host-gone' | 'edited-reserved' | 'check-unproved' | 'over-budget';
|
|
212
286
|
export interface DashTeamFlag {
|
|
213
287
|
kind: DashTeamConductKind;
|
|
214
288
|
severity: 'info' | 'warn';
|
|
@@ -221,9 +295,52 @@ export interface DashTeamFlag {
|
|
|
221
295
|
export interface DashTeamReviewItem {
|
|
222
296
|
id: string;
|
|
223
297
|
text: string;
|
|
224
|
-
from: 'done-means' | 'tests' | 'recheck' | 'reviewer';
|
|
298
|
+
from: 'done-means' | 'tests' | 'recheck' | 'check' | 'reviewer';
|
|
225
299
|
verdict?: 'pass' | 'fail' | 'n/a';
|
|
226
300
|
note?: string;
|
|
301
|
+
/** A check's item (planning/team/17): `<id>@<hash8>`, its level, what its note must show, what not to flag, and why it applied. */
|
|
302
|
+
check?: string;
|
|
303
|
+
level?: 'must' | 'should';
|
|
304
|
+
proof?: string;
|
|
305
|
+
not?: string;
|
|
306
|
+
why?: string;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* A goal's checks as the Team page's drawer shows them (planning/team/17 SK-D7): the pick's state and its picks — each
|
|
310
|
+
* with why, the paths it was picked for, and whether the model or the person chose it — the ids the person removed,
|
|
311
|
+
* and the checks in force to add from. `GET /api/team/goal/checks?id=`.
|
|
312
|
+
*/
|
|
313
|
+
export interface DashTeamGoalChecks {
|
|
314
|
+
goal: {
|
|
315
|
+
id: string;
|
|
316
|
+
title: string;
|
|
317
|
+
};
|
|
318
|
+
checks?: {
|
|
319
|
+
state: 'picked' | 'floor' | 'running';
|
|
320
|
+
picked: Array<{
|
|
321
|
+
id: string;
|
|
322
|
+
why: string;
|
|
323
|
+
paths?: string[];
|
|
324
|
+
by: 'model' | 'person';
|
|
325
|
+
}>;
|
|
326
|
+
removed: string[];
|
|
327
|
+
at: number;
|
|
328
|
+
reason?: string;
|
|
329
|
+
wait?: 'key' | 'allowance' | 'off';
|
|
330
|
+
model?: string;
|
|
331
|
+
again?: boolean;
|
|
332
|
+
costUsd?: number;
|
|
333
|
+
};
|
|
334
|
+
catalog: {
|
|
335
|
+
sha: string;
|
|
336
|
+
checks: Array<{
|
|
337
|
+
id: string;
|
|
338
|
+
title: string;
|
|
339
|
+
level: 'must' | 'should';
|
|
340
|
+
family: string;
|
|
341
|
+
layer: 'library' | 'user' | 'project';
|
|
342
|
+
}>;
|
|
343
|
+
};
|
|
227
344
|
}
|
|
228
345
|
/** A task named in another's chain: its parent, its children, a blocker. */
|
|
229
346
|
export interface DashTeamTaskRef {
|
|
@@ -796,6 +913,27 @@ export interface DashTeamReview {
|
|
|
796
913
|
/** The reviewed goal's plan, and its next list (GS-D1–D2). */
|
|
797
914
|
plan?: import('./team-review-changes.js').DashTeamReviewPlan;
|
|
798
915
|
next?: DashTeamNextItem[];
|
|
916
|
+
/** How each check fared in the run's reviews (planning/team/17 SK-D12) — absent: no review held a check item. */
|
|
917
|
+
checks?: DashTeamCheckCount[];
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* One check's record in a window's reviews (planning/team/17 SK-D12, libs/storage check-counts.ts): seeded, its verdicts,
|
|
921
|
+
* and caught later — passed or n/a, then a later review of the same change failed an item of its family, or a bug filed
|
|
922
|
+
* after it names the check.
|
|
923
|
+
*/
|
|
924
|
+
export interface DashTeamCheckCount {
|
|
925
|
+
/** Without its content hash: `data/no-query-in-loop` — team://checks/<id>. */
|
|
926
|
+
id: string;
|
|
927
|
+
family: string;
|
|
928
|
+
level?: 'must' | 'should';
|
|
929
|
+
seeded: number;
|
|
930
|
+
pass: number;
|
|
931
|
+
fail: number;
|
|
932
|
+
na: number;
|
|
933
|
+
open: number;
|
|
934
|
+
caughtLater: number;
|
|
935
|
+
/** The reviews it was in, at most 5: caught later first, then failed, then the newest. */
|
|
936
|
+
reviews: string[];
|
|
799
937
|
}
|
|
800
938
|
/** The clients LensMCP launches headless: Codex (`codex exec`) and Claude Code (`claude -p`). */
|
|
801
939
|
export type DashTeamLaunchClient = 'codex' | 'claude';
|
|
@@ -1060,6 +1198,8 @@ export interface DashTeamHealth {
|
|
|
1060
1198
|
joins?: number;
|
|
1061
1199
|
messages?: number;
|
|
1062
1200
|
};
|
|
1201
|
+
/** How each check fared in the window's reviews (planning/team/17 SK-D12) — absent: no review held a check item. */
|
|
1202
|
+
reviewChecks?: DashTeamCheckCount[];
|
|
1063
1203
|
observedAt: number;
|
|
1064
1204
|
}
|
|
1065
1205
|
/**
|
package/lib/team.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var r=(t,e)=>o(t,"name",{value:e,configurable:!0});var i=Object.defineProperty,a=r((t,e)=>i(t,"name",{value:e,configurable:!0}),"r");export const DASH_TEAM_KINDS=["goal","build","bug","review","test","qa","docs","marketing","research","chore"],DASH_TEAM_LINK_KINDS=["task","flow","error","suggestion","ai-call","review","page","route","commit","branch","worktree","file","finding"];export function modelClient(t){const e=t?.trim()??"";if(/\b(claude|opus|sonnet|haiku|fable)\b/i.test(e))return"claude";if(/^(gpt|o\d+|codex)\b/i.test(e))return"codex"}r(modelClient,"modelClient"),a(modelClient,"modelClient");
|
|
1
|
+
"use strict";var o=Object.defineProperty;var r=(t,e)=>o(t,"name",{value:e,configurable:!0});var i=Object.defineProperty,a=r((t,e)=>i(t,"name",{value:e,configurable:!0}),"r");export const DASH_TEAM_KINDS=["goal","build","bug","review","test","qa","docs","marketing","research","chore"],DASH_TEAM_LINK_KINDS=["task","flow","error","suggestion","ai-call","review","page","route","commit","branch","worktree","file","finding","test"];export function modelClient(t){const e=t?.trim()??"";if(/\b(claude|opus|sonnet|haiku|fable)\b/i.test(e))return"claude";if(/^(gpt|o\d+|codex)\b/i.test(e))return"codex"}r(modelClient,"modelClient"),a(modelClient,"modelClient");
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
export type WorkspaceActionKind = 'start' | 'stop' | 'restart' | 'migrate' | 'test' | 'e2e' | 'typecheck' | 'lint' | 'build' | 'verify' | 'worktree-stop' | 'worktree-remove';
|
|
1
|
+
export type WorkspaceActionKind = 'start' | 'stop' | 'restart' | 'migrate' | 'test' | 'e2e' | 'typecheck' | 'lint' | 'build' | 'verify' | 'benchmark' | 'capture' | 'worktree-stop' | 'worktree-remove';
|
|
2
2
|
export type WorkspaceActionState = 'queued' | 'running' | 'passed' | 'failed' | 'errored' | 'cancelled' | 'timeout';
|
|
3
|
+
/**
|
|
4
|
+
* The machine queue's lane (issues/closed/foodguard-189): `heavy` runs one at a time on the machine — a whole test target,
|
|
5
|
+
* e2e, verify, anything over an hour; `light` runs a few at once, admitted by free memory — specs by file or relation, a
|
|
6
|
+
* typecheck, a lint, a build.
|
|
7
|
+
*/
|
|
8
|
+
export type WorkspaceActionLane = 'light' | 'heavy';
|
|
3
9
|
export interface WorkspaceActionInput {
|
|
4
10
|
action: WorkspaceActionKind;
|
|
5
|
-
project
|
|
11
|
+
/** The Nx project — absent only for a run over `affected` projects. */
|
|
12
|
+
project?: string;
|
|
6
13
|
target?: string;
|
|
7
14
|
worktree?: string;
|
|
8
15
|
timeoutMs?: number;
|
|
@@ -10,13 +17,88 @@ export interface WorkspaceActionInput {
|
|
|
10
17
|
heapMb?: number;
|
|
11
18
|
files?: string[];
|
|
12
19
|
testName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* A test run of the specs related to these source files (issues/closed/foodguard-188): jest's `--findRelatedTests`, or
|
|
22
|
+
* for vitest the specs the repository's import graph says import them at any depth. Paths in the checkout.
|
|
23
|
+
*/
|
|
24
|
+
related?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* The target over every project Nx says is affected between `base` and `head` (HEAD) — one step per project, in the
|
|
27
|
+
* heavy lane, `stage` saying «test 12 of 148: dashboard» (foodguard-188, main-level QA). `project` may be left out.
|
|
28
|
+
*/
|
|
29
|
+
affected?: {
|
|
30
|
+
base: string;
|
|
31
|
+
head?: string;
|
|
32
|
+
};
|
|
13
33
|
hard?: boolean;
|
|
34
|
+
/** The queue's lane — none: by what the run is (heavy for a whole test target, e2e, verify or over an hour). */
|
|
35
|
+
lane?: WorkspaceActionLane;
|
|
14
36
|
/** Preparation of an existing instance. Only services started by this run are cleaned up. */
|
|
15
37
|
prepare?: {
|
|
16
38
|
migrationProject?: string;
|
|
17
39
|
migrationTarget?: string;
|
|
18
40
|
services?: string[];
|
|
19
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* benchmark (issues/closed/foodguard-191): the routes called through the lens, `calls` times each after `warmup`, on
|
|
44
|
+
* this run's checkout and — `compare`, on by default in a worktree — on Main, alone on the machine.
|
|
45
|
+
*/
|
|
46
|
+
benchmark?: {
|
|
47
|
+
origin: string;
|
|
48
|
+
routes: WorkspaceBenchmarkRoute[];
|
|
49
|
+
calls?: number;
|
|
50
|
+
warmup?: number;
|
|
51
|
+
compare?: boolean;
|
|
52
|
+
};
|
|
53
|
+
/** capture (foodguard-191): real PNGs of the pages, at each width and theme, on this run's checkout and on Main. */
|
|
54
|
+
capture?: {
|
|
55
|
+
origin: string;
|
|
56
|
+
pages: WorkspaceCapturePage[];
|
|
57
|
+
widths?: number[];
|
|
58
|
+
themes?: Array<'light' | 'dark'>;
|
|
59
|
+
compare?: boolean;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface WorkspaceBenchmarkRoute {
|
|
63
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
64
|
+
path: string;
|
|
65
|
+
as?: string;
|
|
66
|
+
body?: unknown;
|
|
67
|
+
service?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface WorkspaceCapturePage {
|
|
70
|
+
path: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
}
|
|
73
|
+
/** One route on one checkout, as a benchmark measured it. */
|
|
74
|
+
export interface WorkspaceBenchmarkRow {
|
|
75
|
+
route: string;
|
|
76
|
+
checkout: string;
|
|
77
|
+
as?: string;
|
|
78
|
+
calls: number;
|
|
79
|
+
/** Calls that did not answer 2xx/3xx, or did not answer. */
|
|
80
|
+
failed: number;
|
|
81
|
+
p50Ms?: number;
|
|
82
|
+
p95Ms?: number;
|
|
83
|
+
maxMs?: number;
|
|
84
|
+
/** SQL statements one request ran, its median; and the most times one request ran the same statement (a loop). */
|
|
85
|
+
sqlPerRequest?: number;
|
|
86
|
+
dbInLoop?: number;
|
|
87
|
+
statuses: Record<string, number>;
|
|
88
|
+
/** A few of its flows, to open with flow_get. */
|
|
89
|
+
flows?: string[];
|
|
90
|
+
note?: string;
|
|
91
|
+
}
|
|
92
|
+
/** One picture a capture took: `file` is the run's evidence (`capture-3.bin`, a PNG — workspace_action_read gives it base64). */
|
|
93
|
+
export interface WorkspaceCaptureShot {
|
|
94
|
+
checkout: string;
|
|
95
|
+
page: string;
|
|
96
|
+
width: number;
|
|
97
|
+
theme: 'light' | 'dark';
|
|
98
|
+
file?: string;
|
|
99
|
+
bytes?: number;
|
|
100
|
+
url: string;
|
|
101
|
+
note?: string;
|
|
20
102
|
}
|
|
21
103
|
export interface WorkspaceActionDescriptor {
|
|
22
104
|
id: string;
|
|
@@ -29,12 +111,50 @@ export interface WorkspaceActionDescriptor {
|
|
|
29
111
|
prerequisites: string[];
|
|
30
112
|
}
|
|
31
113
|
export interface WorkspaceActionFailure {
|
|
114
|
+
/** Of the test's file as the checkout knows it and its full name: the same test has one id in every checkout. */
|
|
32
115
|
id: string;
|
|
33
116
|
name: string;
|
|
34
117
|
file?: string;
|
|
35
118
|
line?: number;
|
|
36
119
|
message: string;
|
|
37
120
|
occurrences: number;
|
|
121
|
+
/**
|
|
122
|
+
* Against main's known failures for its project and target (issues/closed/foodguard-184): `known` — it fails on main
|
|
123
|
+
* too — or `new`. None: no baseline was read (an opaque target, or a run from before LensMCP read one).
|
|
124
|
+
*/
|
|
125
|
+
status?: 'new' | 'known';
|
|
126
|
+
/** A known failure: main's latest commit it failed at, and the commit and day it was first seen failing there. */
|
|
127
|
+
known?: {
|
|
128
|
+
sha: string;
|
|
129
|
+
firstSha: string;
|
|
130
|
+
since: string;
|
|
131
|
+
firstAt?: number;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A test step against main's known failures for its project and target (issues/closed/foodguard-184). `sha`, `date`
|
|
136
|
+
* and `run`: main's latest run that kept the list — none when no main run is recorded, and every failure is new.
|
|
137
|
+
*/
|
|
138
|
+
export interface WorkspaceActionBaseline {
|
|
139
|
+
branch?: string;
|
|
140
|
+
sha?: string;
|
|
141
|
+
date?: string;
|
|
142
|
+
run?: string;
|
|
143
|
+
/** Only narrowed main runs (by file, name or relation) kept this list: a test none of them ran is new by default. */
|
|
144
|
+
partial?: boolean;
|
|
145
|
+
newFailed: number;
|
|
146
|
+
knownFailed: number;
|
|
147
|
+
/** Known on main, and passed here: the first 10, and how many in all. */
|
|
148
|
+
fixedHere: Array<{
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
file?: string;
|
|
152
|
+
}>;
|
|
153
|
+
fixedHereCount: number;
|
|
154
|
+
/** This run was clean on Main and kept the list: `whole` replaced it; `narrowed` added its failures and cleared what passed. */
|
|
155
|
+
recorded?: 'whole' | 'narrowed';
|
|
156
|
+
/** Why the list was not read, or why this run on Main did not keep it. */
|
|
157
|
+
note?: string;
|
|
38
158
|
}
|
|
39
159
|
export interface WorkspaceActionCounts {
|
|
40
160
|
passed: number;
|
|
@@ -44,6 +164,11 @@ export interface WorkspaceActionCounts {
|
|
|
44
164
|
}
|
|
45
165
|
export interface WorkspaceActionStep {
|
|
46
166
|
id: string;
|
|
167
|
+
/** The project it ran — a run over several projects (`affected`) has one step each. */
|
|
168
|
+
project?: string;
|
|
169
|
+
/** A related run: the specs it ran (first 50), and how many in all. */
|
|
170
|
+
specs?: string[];
|
|
171
|
+
specsCount?: number;
|
|
47
172
|
action: WorkspaceActionKind | 'cleanup';
|
|
48
173
|
state: WorkspaceActionState | 'skipped';
|
|
49
174
|
durationMs: number;
|
|
@@ -79,6 +204,17 @@ export interface WorkspaceActionStep {
|
|
|
79
204
|
changed: string[];
|
|
80
205
|
};
|
|
81
206
|
};
|
|
207
|
+
/** A test step's failures against main's known ones: how many are new, how many known, and what passed here. */
|
|
208
|
+
baseline?: WorkspaceActionBaseline;
|
|
209
|
+
/** A benchmark step's rows: each route on each checkout, Main beside this one (foodguard-191). */
|
|
210
|
+
benchmark?: {
|
|
211
|
+
rows: WorkspaceBenchmarkRow[];
|
|
212
|
+
quiet?: string;
|
|
213
|
+
};
|
|
214
|
+
/** A capture step's pictures (foodguard-191). */
|
|
215
|
+
capture?: {
|
|
216
|
+
shots: WorkspaceCaptureShot[];
|
|
217
|
+
};
|
|
82
218
|
evidence: {
|
|
83
219
|
log: string;
|
|
84
220
|
report?: string;
|
|
@@ -101,6 +237,27 @@ export interface WorkspaceActionRun {
|
|
|
101
237
|
durationMs: number;
|
|
102
238
|
steps: WorkspaceActionStep[];
|
|
103
239
|
note?: string;
|
|
240
|
+
/** The machine queue: its lane; while queued, its place and why it waits; once admitted, how long it waited. */
|
|
241
|
+
queue?: WorkspaceActionQueue;
|
|
242
|
+
/** A run over many projects: its steps by state — the summary keeps the ones that did not pass, and folds the rest here. */
|
|
243
|
+
rollup?: {
|
|
244
|
+
steps: number;
|
|
245
|
+
passed: number;
|
|
246
|
+
failed: number;
|
|
247
|
+
errored: number;
|
|
248
|
+
skipped: number;
|
|
249
|
+
other: number;
|
|
250
|
+
folded: number;
|
|
251
|
+
newFailed?: number;
|
|
252
|
+
knownFailed?: number;
|
|
253
|
+
};
|
|
104
254
|
resultRef: string;
|
|
105
255
|
retentionDays: number;
|
|
106
256
|
}
|
|
257
|
+
export interface WorkspaceActionQueue {
|
|
258
|
+
lane: WorkspaceActionLane;
|
|
259
|
+
place?: number;
|
|
260
|
+
of?: number;
|
|
261
|
+
why?: string;
|
|
262
|
+
waitedMs?: number;
|
|
263
|
+
}
|