@lensmcp/protocol-types 1.25.56 → 1.25.58
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/lib/team-roadmap.d.ts +233 -0
- package/lib/team-roadmap.js +1 -1
- package/lib/team.d.ts +12 -0
- package/package.json +1 -1
package/lib/team-roadmap.d.ts
CHANGED
|
@@ -32,7 +32,94 @@ export interface GoalSchedule {
|
|
|
32
32
|
start: number;
|
|
33
33
|
finish: number;
|
|
34
34
|
};
|
|
35
|
+
/** A 2–4 word name for the timeline bar (planning/team/24); the title stays everywhere else. */
|
|
36
|
+
label?: string;
|
|
37
|
+
/** Who set `estimate`/`remaining`, when and why (RM-D2: agent hours, kept as minutes in the ranges above). */
|
|
38
|
+
estimateSource?: EstimateSource;
|
|
35
39
|
}
|
|
40
|
+
/** Where a goal's estimate came from: the person's numbers, or an accepted planner proposal. */
|
|
41
|
+
export interface EstimateSource {
|
|
42
|
+
by: 'user' | 'planner';
|
|
43
|
+
at: number;
|
|
44
|
+
/** The planner proposal the estimate was accepted from. */
|
|
45
|
+
proposalId?: string;
|
|
46
|
+
confidence?: 'low' | 'medium' | 'high';
|
|
47
|
+
/** One or two sentences: what the estimate rests on. */
|
|
48
|
+
why?: string;
|
|
49
|
+
/** Finished goals of this repository it was compared with, and how long each really took. */
|
|
50
|
+
comparedWith?: Array<{
|
|
51
|
+
goalId: string;
|
|
52
|
+
title: string;
|
|
53
|
+
actualHours: number;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A link between two top-level goals (planning/team/24 RM-D7): `goal` is the one that waits or yields, `on` the other.
|
|
58
|
+
* needs `goal` is not claimed until `on` is completed (a completed goal is merged: managers merge before completing,
|
|
59
|
+
* native delivery integrates before it may complete); a cancelled `on` blocks until the link is removed
|
|
60
|
+
* after order only: `goal` ranks below `on`, but starts first when `on` cannot and a slot would sit idle
|
|
61
|
+
* apart never at the same time (same files): `goal` is not claimed while `on` runs — either order
|
|
62
|
+
*/
|
|
63
|
+
export type GoalLinkKind = 'needs' | 'after' | 'apart';
|
|
64
|
+
export declare const GOAL_LINK_KINDS: readonly GoalLinkKind[];
|
|
65
|
+
export interface GoalLink {
|
|
66
|
+
goal: string;
|
|
67
|
+
on: string;
|
|
68
|
+
kind: GoalLinkKind;
|
|
69
|
+
why?: string;
|
|
70
|
+
by: 'user' | 'planner';
|
|
71
|
+
at: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One change to the roadmap (planning/team/24). The prompt bar, the Order view, the drawer and an accepted planner
|
|
75
|
+
* proposal all send these, as `{ action: 'ops', ops, reason, revision, requestId, preview }`. Hours are agent hours.
|
|
76
|
+
*/
|
|
77
|
+
export type RoadmapOp = {
|
|
78
|
+
op: 'move';
|
|
79
|
+
goalId: string;
|
|
80
|
+
to: 'top' | 'bottom' | {
|
|
81
|
+
before: string;
|
|
82
|
+
} | {
|
|
83
|
+
after: string;
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
op: 'order';
|
|
87
|
+
goalIds: string[];
|
|
88
|
+
} | {
|
|
89
|
+
op: 'postpone';
|
|
90
|
+
goalId: string;
|
|
91
|
+
until: number | null;
|
|
92
|
+
} | {
|
|
93
|
+
op: 'link';
|
|
94
|
+
goal: string;
|
|
95
|
+
on: string;
|
|
96
|
+
kind: GoalLinkKind;
|
|
97
|
+
why?: string;
|
|
98
|
+
} | {
|
|
99
|
+
op: 'unlink';
|
|
100
|
+
goal: string;
|
|
101
|
+
on: string;
|
|
102
|
+
kind?: GoalLinkKind;
|
|
103
|
+
} | {
|
|
104
|
+
op: 'pin';
|
|
105
|
+
goalId: string;
|
|
106
|
+
pinned: boolean;
|
|
107
|
+
} | {
|
|
108
|
+
op: 'estimate';
|
|
109
|
+
goalId: string;
|
|
110
|
+
hours: {
|
|
111
|
+
low: number;
|
|
112
|
+
likely: number;
|
|
113
|
+
high: number;
|
|
114
|
+
};
|
|
115
|
+
remaining?: boolean;
|
|
116
|
+
source?: Omit<EstimateSource, 'at' | 'by'>;
|
|
117
|
+
} | {
|
|
118
|
+
op: 'label';
|
|
119
|
+
goalId: string;
|
|
120
|
+
label: string;
|
|
121
|
+
};
|
|
122
|
+
export declare const ROADMAP_OPS: readonly ["move", "order", "postpone", "link", "unlink", "pin", "estimate", "label"];
|
|
36
123
|
export interface DeliveryEpic {
|
|
37
124
|
id: string;
|
|
38
125
|
title: string;
|
|
@@ -59,6 +146,11 @@ export interface DeliveryState {
|
|
|
59
146
|
schedules: GoalSchedule[];
|
|
60
147
|
outputs: AcceptedGoalOutput[];
|
|
61
148
|
audit: DeliveryAudit[];
|
|
149
|
+
/** The ranked goals, first first (RM-D6): the claim order. Goals not in it rank after it, by priority then age. */
|
|
150
|
+
order?: string[];
|
|
151
|
+
/** Goals a re-plan never moves. */
|
|
152
|
+
pinned?: string[];
|
|
153
|
+
links?: GoalLink[];
|
|
62
154
|
}
|
|
63
155
|
export interface RoadmapGoal {
|
|
64
156
|
id: string;
|
|
@@ -74,6 +166,18 @@ export interface RoadmapGoal {
|
|
|
74
166
|
finish: DurationRange;
|
|
75
167
|
};
|
|
76
168
|
blockers: string[];
|
|
169
|
+
/** The task's own priority: P0 jumps the ranked order (RM-D6). */
|
|
170
|
+
priority?: number;
|
|
171
|
+
/** 1-based place in the effective order, for goals not completed or cancelled. */
|
|
172
|
+
rank?: number;
|
|
173
|
+
pinned?: boolean;
|
|
174
|
+
/** Where its design is, when it has one (`approved` is the only stage that lets it start). */
|
|
175
|
+
design?: string;
|
|
176
|
+
/**
|
|
177
|
+
* How LensMCP landed it on main (agent_task_update merge, flow.json goal.merge): main's commit and the branch tip it
|
|
178
|
+
* took. After a squash the tip is not on main, so this commit is the goal's output there.
|
|
179
|
+
*/
|
|
180
|
+
integration?: import('./team.js').DashTeamGoalIntegration;
|
|
77
181
|
}
|
|
78
182
|
export interface RoadmapAnswer {
|
|
79
183
|
now: number;
|
|
@@ -88,4 +192,133 @@ export interface RoadmapAnswer {
|
|
|
88
192
|
goals: RoadmapGoal[];
|
|
89
193
|
outputs: AcceptedGoalOutput[];
|
|
90
194
|
audit: DeliveryAudit[];
|
|
195
|
+
/** The effective order (state order + every other live goal, P0 first, `needs`/`after` predecessors above). */
|
|
196
|
+
order: string[];
|
|
197
|
+
pinned: string[];
|
|
198
|
+
links: GoalLink[];
|
|
199
|
+
/**
|
|
200
|
+
* The same goals planned with 1–4 goals at once (planning/team/24 RM-D1): when everything with a forecast finishes,
|
|
201
|
+
* and how many live goals get no forecast under that shape.
|
|
202
|
+
*/
|
|
203
|
+
shapes?: Array<{
|
|
204
|
+
goals: number;
|
|
205
|
+
finish?: DurationRange;
|
|
206
|
+
unplaced: number;
|
|
207
|
+
}>;
|
|
208
|
+
/** The newest change Undo restores (RM-D8: 24 h). */
|
|
209
|
+
undo?: {
|
|
210
|
+
at: number;
|
|
211
|
+
reason: string;
|
|
212
|
+
until: number;
|
|
213
|
+
};
|
|
214
|
+
/** Finished goals with an estimate: how many landed within their low–high range, and the median actual ÷ likely. */
|
|
215
|
+
accuracy?: {
|
|
216
|
+
goals: number;
|
|
217
|
+
withinRange: number;
|
|
218
|
+
medianRatio?: number;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
/** A goal's part of a planner proposal (planning/team/24 R3). Hours are agent hours. */
|
|
222
|
+
export interface PlannerGoalProposal {
|
|
223
|
+
goalId: string;
|
|
224
|
+
title: string;
|
|
225
|
+
label?: string;
|
|
226
|
+
/** `remaining` for a running goal: the time left, not the whole. */
|
|
227
|
+
estimate?: {
|
|
228
|
+
low: number;
|
|
229
|
+
likely: number;
|
|
230
|
+
high: number;
|
|
231
|
+
confidence: 'low' | 'medium' | 'high';
|
|
232
|
+
remaining?: boolean;
|
|
233
|
+
};
|
|
234
|
+
why?: string;
|
|
235
|
+
comparedWith?: Array<{
|
|
236
|
+
goalId: string;
|
|
237
|
+
title: string;
|
|
238
|
+
actualHours: number;
|
|
239
|
+
}>;
|
|
240
|
+
links?: Array<{
|
|
241
|
+
on: string;
|
|
242
|
+
kind: GoalLinkKind;
|
|
243
|
+
why: string;
|
|
244
|
+
}>;
|
|
245
|
+
/** Backlog clean-up suggestions (RM-D12): never applied, only shown. */
|
|
246
|
+
hints?: Array<{
|
|
247
|
+
kind: 'split' | 'merge' | 'epic' | 'cancel' | 'other';
|
|
248
|
+
text: string;
|
|
249
|
+
with?: string[];
|
|
250
|
+
}>;
|
|
251
|
+
/** Design prerequisite keys it could not match to a goal. */
|
|
252
|
+
unmapped?: string[];
|
|
253
|
+
state: 'proposed' | 'accepted' | 'skipped';
|
|
254
|
+
}
|
|
255
|
+
export interface PlannerProposal {
|
|
256
|
+
id: string;
|
|
257
|
+
at: number;
|
|
258
|
+
/** `all` = Plan all (a click), `goal` = one goal on design approval, `remaining` = a running goal past its high. */
|
|
259
|
+
kind: 'all' | 'goal' | 'remaining';
|
|
260
|
+
state: 'running' | 'ready' | 'failed' | 'decided';
|
|
261
|
+
model?: string;
|
|
262
|
+
costUsd?: number;
|
|
263
|
+
/** The AI ledger id of the call (Diagnose › Runs). */
|
|
264
|
+
runId?: string;
|
|
265
|
+
/** The order it proposes for the goals it planned, first first, and why. */
|
|
266
|
+
order?: string[];
|
|
267
|
+
orderWhy?: string;
|
|
268
|
+
orderState?: 'proposed' | 'accepted' | 'skipped';
|
|
269
|
+
goals: PlannerGoalProposal[];
|
|
270
|
+
unmappedPrerequisites?: Array<{
|
|
271
|
+
key: string;
|
|
272
|
+
seenIn: string[];
|
|
273
|
+
why: string;
|
|
274
|
+
}>;
|
|
275
|
+
/** What LensMCP dropped from the answer and why (unknown ids, cycles, bad ranges) — never silently. */
|
|
276
|
+
dropped?: string[];
|
|
277
|
+
error?: string;
|
|
278
|
+
}
|
|
279
|
+
/** GET /api/team/roadmap/planner. */
|
|
280
|
+
export interface RoadmapPlannerState {
|
|
281
|
+
/** Settings › Agent teams `roadmapPlanner`. */
|
|
282
|
+
on: boolean;
|
|
283
|
+
/** A working Anthropic key is there. */
|
|
284
|
+
key: boolean;
|
|
285
|
+
model: string;
|
|
286
|
+
spentToday: number;
|
|
287
|
+
dailyUsd: number;
|
|
288
|
+
/** Goals live and not estimated (what Plan all would plan). */
|
|
289
|
+
unplanned: number;
|
|
290
|
+
/** When «next week» starts (RM-D9: Settings `roadmapWeekStart` + `roadmapDayStart`, the machine's time zone), UTC ms. */
|
|
291
|
+
nextWeekAt: number;
|
|
292
|
+
/** Tomorrow at the day's start hour, UTC ms. */
|
|
293
|
+
tomorrowAt: number;
|
|
294
|
+
proposals: PlannerProposal[];
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* POST /api/team/roadmap/ask `{ text, revision }`: Claude reads the sentence into operations; LensMCP previews them at
|
|
298
|
+
* the given revision. Nothing is applied — the page sends `ops` back as `{ action: 'ops', preview: false }`.
|
|
299
|
+
*/
|
|
300
|
+
export interface RoadmapAskAnswer {
|
|
301
|
+
text: string;
|
|
302
|
+
ops: Array<{
|
|
303
|
+
op: RoadmapOp;
|
|
304
|
+
label: string;
|
|
305
|
+
}>;
|
|
306
|
+
/** «4 goals at once»: applied through Team › Limits (goalsMax), not the roadmap state. */
|
|
307
|
+
shape?: {
|
|
308
|
+
goals: number;
|
|
309
|
+
label: string;
|
|
310
|
+
};
|
|
311
|
+
/** When it cannot tell which goal is meant: a question and the candidates. */
|
|
312
|
+
clarify?: {
|
|
313
|
+
question: string;
|
|
314
|
+
options: Array<{
|
|
315
|
+
goalId: string;
|
|
316
|
+
title: string;
|
|
317
|
+
}>;
|
|
318
|
+
};
|
|
319
|
+
/** The ops previewed (absent when there are none or a question is asked). */
|
|
320
|
+
preview?: RoadmapAnswer;
|
|
321
|
+
/** What it could not do, in words. */
|
|
322
|
+
note?: string;
|
|
323
|
+
costUsd?: number;
|
|
91
324
|
}
|
package/lib/team-roadmap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export
|
|
1
|
+
"use strict";export const GOAL_LINK_KINDS=["needs","after","apart"],ROADMAP_OPS=["move","order","postpone","link","unlink","pin","estimate","label"];
|
package/lib/team.d.ts
CHANGED
|
@@ -30,6 +30,13 @@ export interface DashTeamLogLine {
|
|
|
30
30
|
kind: 'progress' | 'decision' | 'blocker' | 'handoff' | 'note' | 'state';
|
|
31
31
|
text: string;
|
|
32
32
|
}
|
|
33
|
+
/** How LensMCP landed a goal on main (storage flow.ts GoalIntegration): its strategy, main's new commit, the tip it took. */
|
|
34
|
+
export interface DashTeamGoalIntegration {
|
|
35
|
+
strategy: 'squash' | 'merge' | 'ff';
|
|
36
|
+
sha: string;
|
|
37
|
+
tip: string;
|
|
38
|
+
at: number;
|
|
39
|
+
}
|
|
33
40
|
export interface DashTeamTask {
|
|
34
41
|
delivery?: PackageDeliverySummary;
|
|
35
42
|
admission?: GoalAdmission;
|
|
@@ -82,6 +89,11 @@ export interface DashTeamTask {
|
|
|
82
89
|
result?: string;
|
|
83
90
|
evidence?: string[];
|
|
84
91
|
completedHead?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* A goal LensMCP landed on main (agent_task_update merge, flow.json goal.merge): the strategy, the commit main moved
|
|
94
|
+
* to (`sha` — a squash or merge commit, or the branch tip for `ff`), the branch tip it took, when (the drawer).
|
|
95
|
+
*/
|
|
96
|
+
integration?: DashTeamGoalIntegration;
|
|
85
97
|
paths?: string[];
|
|
86
98
|
tags?: string[];
|
|
87
99
|
/** A review's items, whole (the drawer): each point it checks and its verdict (planning/team/06-team-operations.md OP-D3). */
|