@lensmcp/protocol-types 1.25.78 → 1.26.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.
Files changed (61) hide show
  1. package/index.d.ts +10 -1
  2. package/index.js +1 -1
  3. package/lib/ai-call-groups.js +2 -2
  4. package/lib/ai-call-row.js +3 -3
  5. package/lib/ai-call.js +9 -9
  6. package/lib/ai-context.js +6 -6
  7. package/lib/ai-origins.js +9 -9
  8. package/lib/attributes.d.ts +19 -4
  9. package/lib/attributes.js +1 -1
  10. package/lib/bounded-clone.js +1 -1
  11. package/lib/bounded-map.js +1 -1
  12. package/lib/bounded-writer.js +1 -1
  13. package/lib/capture-demand.js +1 -1
  14. package/lib/changes.d.ts +50 -2
  15. package/lib/context.d.ts +2 -2
  16. package/lib/dashboard-lint.d.ts +207 -0
  17. package/lib/dashboard-lint.js +1 -0
  18. package/lib/dashboard-path.d.ts +15 -0
  19. package/lib/dashboard-path.js +1 -0
  20. package/lib/dashboard.d.ts +198 -3
  21. package/lib/edge.d.ts +8 -8
  22. package/lib/error-cause.d.ts +69 -0
  23. package/lib/error-cause.js +5 -0
  24. package/lib/error-dismissal.js +1 -1
  25. package/lib/event-loop.d.ts +57 -1
  26. package/lib/event-loop.js +1 -1
  27. package/lib/event.d.ts +45 -45
  28. package/lib/flood-guard.js +1 -1
  29. package/lib/follow-ups.d.ts +238 -0
  30. package/lib/follow-ups.js +1 -0
  31. package/lib/goal-design.d.ts +51 -0
  32. package/lib/goal-design.js +1 -1
  33. package/lib/goal-outcome.d.ts +12 -1
  34. package/lib/goal-retro.d.ts +21 -0
  35. package/lib/lint-coverage.d.ts +113 -0
  36. package/lib/lint-coverage.js +1 -0
  37. package/lib/log-query.js +1 -1
  38. package/lib/metrics-reset.js +1 -1
  39. package/lib/node.d.ts +11 -11
  40. package/lib/overseer-findings.js +1 -1
  41. package/lib/overseer-rounds.d.ts +2 -0
  42. package/lib/perf-rules.js +1 -1
  43. package/lib/pod-memory.d.ts +2 -0
  44. package/lib/pod-memory.js +1 -1
  45. package/lib/producer-health.js +1 -1
  46. package/lib/resources.d.ts +28 -28
  47. package/lib/role-fidelity.d.ts +210 -0
  48. package/lib/role-fidelity.js +1 -0
  49. package/lib/sources.js +1 -1
  50. package/lib/system-report.js +1 -1
  51. package/lib/team-delivery.d.ts +61 -3
  52. package/lib/team-delivery.js +1 -1
  53. package/lib/team-design.d.ts +224 -0
  54. package/lib/team-design.js +1 -1
  55. package/lib/team-prompts.d.ts +16 -7
  56. package/lib/team-prompts.js +4 -47
  57. package/lib/team-skills.d.ts +355 -0
  58. package/lib/team-skills.js +1 -0
  59. package/lib/team.d.ts +100 -1
  60. package/lib/team.js +1 -1
  61. package/package.json +1 -1
package/lib/event.d.ts CHANGED
@@ -1,5 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  export declare const EventSourceSchema: z.ZodEnum<{
3
+ gateway: "gateway";
4
+ ai: "ai";
5
+ db: "db";
6
+ redis: "redis";
7
+ queue: "queue";
8
+ external: "external";
9
+ visual: "visual";
10
+ react: "react";
11
+ memory: "memory";
12
+ lens: "lens";
3
13
  nx: "nx";
4
14
  vite: "vite";
5
15
  typescript: "typescript";
@@ -7,51 +17,41 @@ export declare const EventSourceSchema: z.ZodEnum<{
7
17
  rollup: "rollup";
8
18
  "client-runtime": "client-runtime";
9
19
  chrome: "chrome";
10
- react: "react";
11
20
  valtio: "valtio";
12
21
  nestjs: "nestjs";
13
22
  nextjs: "nextjs";
14
- db: "db";
15
- redis: "redis";
16
- queue: "queue";
17
- memory: "memory";
18
- visual: "visual";
19
23
  perf: "perf";
20
24
  security: "security";
21
- gateway: "gateway";
22
- external: "external";
23
- ai: "ai";
24
- lens: "lens";
25
25
  custom: "custom";
26
26
  }>;
27
27
  export type EventSource = z.infer<typeof EventSourceSchema>;
28
28
  export declare const EventCategorySchema: z.ZodEnum<{
29
+ test: "test";
30
+ typecheck: "typecheck";
31
+ lint: "lint";
32
+ build: "build";
33
+ state: "state";
34
+ agent: "agent";
35
+ network: "network";
36
+ ai: "ai";
29
37
  db: "db";
30
- memory: "memory";
31
38
  visual: "visual";
39
+ memory: "memory";
40
+ cluster: "cluster";
41
+ trace: "trace";
32
42
  security: "security";
33
- ai: "ai";
34
- build: "build";
35
- lint: "lint";
36
- typecheck: "typecheck";
37
- test: "test";
38
43
  runtime: "runtime";
39
44
  render: "render";
40
- trace: "trace";
41
- state: "state";
42
- network: "network";
43
45
  backend: "backend";
44
46
  performance: "performance";
45
47
  deps: "deps";
46
- cluster: "cluster";
47
- agent: "agent";
48
48
  }>;
49
49
  export type EventCategory = z.infer<typeof EventCategorySchema>;
50
50
  export declare const SeveritySchema: z.ZodEnum<{
51
51
  error: "error";
52
- debug: "debug";
53
52
  info: "info";
54
53
  warning: "warning";
54
+ debug: "debug";
55
55
  fatal: "fatal";
56
56
  }>;
57
57
  export type Severity = z.infer<typeof SeveritySchema>;
@@ -60,6 +60,16 @@ export declare const BaseEventSchema: z.ZodObject<{
60
60
  sessionId: z.ZodString;
61
61
  timestamp: z.ZodNumber;
62
62
  source: z.ZodEnum<{
63
+ gateway: "gateway";
64
+ ai: "ai";
65
+ db: "db";
66
+ redis: "redis";
67
+ queue: "queue";
68
+ external: "external";
69
+ visual: "visual";
70
+ react: "react";
71
+ memory: "memory";
72
+ lens: "lens";
63
73
  nx: "nx";
64
74
  vite: "vite";
65
75
  typescript: "typescript";
@@ -67,49 +77,39 @@ export declare const BaseEventSchema: z.ZodObject<{
67
77
  rollup: "rollup";
68
78
  "client-runtime": "client-runtime";
69
79
  chrome: "chrome";
70
- react: "react";
71
80
  valtio: "valtio";
72
81
  nestjs: "nestjs";
73
82
  nextjs: "nextjs";
74
- db: "db";
75
- redis: "redis";
76
- queue: "queue";
77
- memory: "memory";
78
- visual: "visual";
79
83
  perf: "perf";
80
84
  security: "security";
81
- gateway: "gateway";
82
- external: "external";
83
- ai: "ai";
84
- lens: "lens";
85
85
  custom: "custom";
86
86
  }>;
87
87
  category: z.ZodEnum<{
88
+ test: "test";
89
+ typecheck: "typecheck";
90
+ lint: "lint";
91
+ build: "build";
92
+ state: "state";
93
+ agent: "agent";
94
+ network: "network";
95
+ ai: "ai";
88
96
  db: "db";
89
- memory: "memory";
90
97
  visual: "visual";
98
+ memory: "memory";
99
+ cluster: "cluster";
100
+ trace: "trace";
91
101
  security: "security";
92
- ai: "ai";
93
- build: "build";
94
- lint: "lint";
95
- typecheck: "typecheck";
96
- test: "test";
97
102
  runtime: "runtime";
98
103
  render: "render";
99
- trace: "trace";
100
- state: "state";
101
- network: "network";
102
104
  backend: "backend";
103
105
  performance: "performance";
104
106
  deps: "deps";
105
- cluster: "cluster";
106
- agent: "agent";
107
107
  }>;
108
108
  severity: z.ZodEnum<{
109
109
  error: "error";
110
- debug: "debug";
111
110
  info: "info";
112
111
  warning: "warning";
112
+ debug: "debug";
113
113
  fatal: "fatal";
114
114
  }>;
115
115
  context: z.ZodObject<{
@@ -121,6 +121,7 @@ export declare const BaseEventSchema: z.ZodObject<{
121
121
  url: z.ZodOptional<z.ZodString>;
122
122
  flowId: z.ZodOptional<z.ZodString>;
123
123
  originType: z.ZodOptional<z.ZodEnum<{
124
+ request: "request";
124
125
  "user-click": "user-click";
125
126
  "user-input": "user-input";
126
127
  keyboard: "keyboard";
@@ -146,7 +147,6 @@ export declare const BaseEventSchema: z.ZodObject<{
146
147
  "page-load": "page-load";
147
148
  "form-submit": "form-submit";
148
149
  "input-change": "input-change";
149
- request: "request";
150
150
  job: "job";
151
151
  }>>;
152
152
  originNodeId: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- "use strict";var S=Object.defineProperty;var i=(t,n)=>S(t,"name",{value:n,configurable:!0});var m=Object.defineProperty,u=i((t,n)=>m(t,"name",{value:n,configurable:!0}),"o");function d(){const t=typeof process<"u"?process.env?.LENSMCP_EVENT_MAX_EPS:void 0;if(t===void 0||t==="")return;if(t==="off")return"off";const n=Number(t);if(Number.isFinite(n))return n<=0?"off":n}i(d,"S"),u(d,"envPerSec");export function createEventFloodGuard(t){const n=t?.envOverride===!1?void 0:d();if(n==="off")return{admit:u(()=>({ok:!0,suppressed:0}),"admit")};const l=n??t?.perSec??5,f=Math.max(1,t?.burst??Math.max(30,l*4)),c=t?.maxKeys??2048,r=new Map,p=u(o=>{for(const[s,e]of r)o-e.lastSeenAt>6e4&&r.delete(s);if(r.size>c){const s=[...r.entries()].sort((e,a)=>e[1].lastSeenAt-a[1].lastSeenAt);for(let e=0;e<s.length>>1;e++)r.delete(s[e][0])}},"evictStale");return{admit(o){const s=Date.now();let e=r.get(o);e||(r.size>=c&&p(s),e={tokens:f,lastRefillAt:s,suppressed:0,lastSeenAt:s},r.set(o,e)),e.lastSeenAt=s;const a=s-e.lastRefillAt;if(a>0&&(e.tokens=Math.min(f,e.tokens+a/1e3*l),e.lastRefillAt=s),e.tokens>=1){e.tokens-=1;const v=e.suppressed;return e.suppressed=0,{ok:!0,suppressed:v}}return e.suppressed+=1,{ok:!1,suppressed:0}}}}i(createEventFloodGuard,"createEventFloodGuard"),u(createEventFloodGuard,"createEventFloodGuard");
1
+ "use strict";var S=Object.defineProperty;var i=(t,s)=>S(t,"name",{value:s,configurable:!0});var A=Object.defineProperty,f=i((t,s)=>A(t,"name",{value:s,configurable:!0}),"i"),k=Object.defineProperty,u=f((t,s)=>k(t,"name",{value:s,configurable:!0}),"o");function l(){const t=typeof process<"u"?process.env?.LENSMCP_EVENT_MAX_EPS:void 0;if(t===void 0||t==="")return;if(t==="off")return"off";const s=Number(t);if(Number.isFinite(s))return s<=0?"off":s}i(l,"d"),f(l,"S"),u(l,"envPerSec");export function createEventFloodGuard(t){const s=t?.envOverride===!1?void 0:l();if(s==="off")return{admit:u(()=>({ok:!0,suppressed:0}),"admit")};const c=s??t?.perSec??5,d=Math.max(1,t?.burst??Math.max(30,c*4)),p=t?.maxKeys??2048,n=new Map,v=u(o=>{for(const[r,e]of n)o-e.lastSeenAt>6e4&&n.delete(r);if(n.size>p){const r=[...n.entries()].sort((e,a)=>e[1].lastSeenAt-a[1].lastSeenAt);for(let e=0;e<r.length>>1;e++)n.delete(r[e][0])}},"evictStale");return{admit(o){const r=Date.now();let e=n.get(o);e||(n.size>=p&&v(r),e={tokens:d,lastRefillAt:r,suppressed:0,lastSeenAt:r},n.set(o,e)),e.lastSeenAt=r;const a=r-e.lastRefillAt;if(a>0&&(e.tokens=Math.min(d,e.tokens+a/1e3*c),e.lastRefillAt=r),e.tokens>=1){e.tokens-=1;const m=e.suppressed;return e.suppressed=0,{ok:!0,suppressed:m}}return e.suppressed+=1,{ok:!1,suppressed:0}}}}i(createEventFloodGuard,"createEventFloodGuard"),f(createEventFloodGuard,"createEventFloodGuard"),u(createEventFloodGuard,"createEventFloodGuard");
@@ -0,0 +1,238 @@
1
+ import type { DesignConcern, DesignStage, DesignType } from './goal-design.js';
2
+ /**
3
+ * A finished goal's follow-ups (Suggestions › Follow-ups, 2026-11-10): what it left — open tasks under it or found by its
4
+ * QA run, its next list, the follow-up work its retrospective named — collected by code with no model once its
5
+ * retrospective ended (or at the person's «Collect»), then organized into proposed goals by one Claude call the person
6
+ * approves. Nothing becomes a goal, and no task moves, until the person makes a proposal a goal or combines it.
7
+ */
8
+ /** Where a follow-up came from: an open task the goal left (`task`), its next list (`next`), its retrospective (`retro`). */
9
+ export type DashFollowUpSource = 'task' | 'next' | 'retro';
10
+ export interface DashFollowUpItem {
11
+ /** Stable within its goal: `t:<taskId>`, `n:<next item id>`, `r:<12 hex of its title>`. */
12
+ id: string;
13
+ source: DashFollowUpSource;
14
+ /** The same work named by another source too, folded into this one (de-duplicated). */
15
+ also?: DashFollowUpSource[];
16
+ title: string;
17
+ why?: string;
18
+ /** A task: the task, its kind, role and paths. */
19
+ taskId?: string;
20
+ kind?: string;
21
+ role?: string;
22
+ paths?: string[];
23
+ /** A parentless task the goal's QA run found (the board's «found by»): that run's title. */
24
+ foundBy?: string;
25
+ /** A next item: who put it there, and the task it was moved from («moved to next»). */
26
+ by?: string;
27
+ from?: string;
28
+ /** A retrospective's follow-up: the task ids it rests on. */
29
+ evidence?: string[];
30
+ /** Read live — a task's state now. */
31
+ state?: string;
32
+ /** Read live — a task that completed or was cancelled since: no longer a follow-up. */
33
+ closed?: boolean;
34
+ /** Read live — marked reviewed: its proposal dismissed, or the person dropped it as stale. */
35
+ reviewed?: {
36
+ at: number;
37
+ why: string;
38
+ proposal?: string;
39
+ };
40
+ /** Read live — the open proposal that covers it. */
41
+ proposal?: string;
42
+ /** Read live — the goal it went into. */
43
+ goal?: {
44
+ id: string;
45
+ title: string;
46
+ };
47
+ }
48
+ /** One finished goal's follow-ups as collected, with what became of them (read live). */
49
+ export interface DashFollowUpGoal {
50
+ goalId: string;
51
+ title: string;
52
+ /** The goal now: completed or cancelled, its outcome. */
53
+ state?: string;
54
+ outcome?: string;
55
+ finishedAt?: number;
56
+ collectedAt: number;
57
+ /** After its retrospective ended (`retro`), or the person's «Collect» (`person`). */
58
+ by: 'retro' | 'person';
59
+ /** Its retrospective when collected: its follow-ups were read from a done one. */
60
+ retro?: 'done' | 'failed' | 'none';
61
+ items: DashFollowUpItem[];
62
+ /** Items still to decide: open, not reviewed, in no goal and no open proposal. */
63
+ unseen: number;
64
+ /** What organizing it may cost, estimated (no model call): Claude groups its items into proposed goals. */
65
+ organizeUsd?: number;
66
+ /** Organized: the run, what it cost, the proposals it made. */
67
+ organized?: {
68
+ runId: string;
69
+ at: number;
70
+ costUsd: number;
71
+ proposals: string[];
72
+ };
73
+ /** A run organizing it now. */
74
+ organizing?: {
75
+ runId: string;
76
+ since: number;
77
+ };
78
+ }
79
+ export type DashFollowUpProposalState = 'open' | 'goal' | 'dismissed' | 'combined';
80
+ /** A goal Claude proposes from follow-ups — or, from «Reorganize all», from follow-ups and review suggestions together. */
81
+ export interface DashFollowUpProposal {
82
+ /** `fp-` and 10 hex. */
83
+ id: string;
84
+ from: 'organize' | 'reorganize';
85
+ runId: string;
86
+ at: number;
87
+ title: string;
88
+ why: string;
89
+ priority: 'high' | 'medium' | 'low';
90
+ size: 'S' | 'M' | 'L';
91
+ type: DesignType;
92
+ concerns: DesignConcern[];
93
+ /** The draft design in the design-first format (Markdown, front matter to brief). */
94
+ design: string;
95
+ /**
96
+ * LensMCP's check of the draft (the design check every design passes). No problem and no question: «Make it a goal»
97
+ * opens the goal at once, approved by the click. Otherwise «Make it a goal (design first)»: it waits for approval.
98
+ */
99
+ check: {
100
+ problems: string[];
101
+ warnings: string[];
102
+ questions: number;
103
+ };
104
+ /** The follow-up items it covers, each with its finished goal. */
105
+ items: Array<{
106
+ goalId: string;
107
+ itemId: string;
108
+ }>;
109
+ /** The review suggestions it covers (`sg-…`, Reorganize all). */
110
+ suggestions?: string[];
111
+ /** Open proposals it replaces (Reorganize all): made a goal, they read «combined». */
112
+ replaces?: string[];
113
+ /** The finished goals its items come from, by title. */
114
+ goals: Array<{
115
+ id: string;
116
+ title: string;
117
+ }>;
118
+ /** Clearly the same work as an open proposal or a live goal — said rather than duplicated. */
119
+ sameAs?: {
120
+ kind: 'proposal' | 'goal';
121
+ id: string;
122
+ title: string;
123
+ why: string;
124
+ };
125
+ state: DashFollowUpProposalState;
126
+ stateAt?: number;
127
+ /** Why it was dismissed, or the goal's words. */
128
+ note?: string;
129
+ /** Made a goal, or combined into one: the goal now, the tasks moved under it, the tasks made for items that were none, the moves refused. */
130
+ goal?: {
131
+ id: string;
132
+ title: string;
133
+ state?: string;
134
+ stage?: DesignStage;
135
+ moved: string[];
136
+ created: string[];
137
+ refused: Array<{
138
+ taskId: string;
139
+ title: string;
140
+ why: string;
141
+ }>;
142
+ };
143
+ }
144
+ /** One approved run's result: its proposals, what it would drop as stale (with why), and what it read. */
145
+ export interface DashFollowUpPlan {
146
+ runId: string;
147
+ kind: 'organize' | 'reorganize';
148
+ at: number;
149
+ costUsd: number;
150
+ model: string;
151
+ /** The finished goals it organized (Organize) or read items of (Reorganize all). */
152
+ goals: string[];
153
+ proposals: string[];
154
+ stale: Array<{
155
+ goalId?: string;
156
+ itemId?: string;
157
+ suggestion?: string;
158
+ proposal?: string;
159
+ title: string;
160
+ why: string;
161
+ reviewed?: boolean;
162
+ }>;
163
+ read: {
164
+ items: number;
165
+ suggestions: number;
166
+ proposals: number;
167
+ goals: number;
168
+ };
169
+ /** What was not read, to keep the message bounded — «N more not read» and how they were chosen. */
170
+ notRead?: string[];
171
+ /** What LensMCP dropped from the answer, and why. */
172
+ dropped?: string[];
173
+ }
174
+ export interface DashFollowUpRun {
175
+ runId: string;
176
+ kind: 'organize' | 'reorganize';
177
+ status: 'queued' | 'running' | 'done' | 'failed';
178
+ step: string;
179
+ startedAt: number;
180
+ finishedAt?: number;
181
+ costUsd: number;
182
+ error?: string;
183
+ goals: string[];
184
+ proposals?: string[];
185
+ }
186
+ /** The counts the sidebar, the Suggestions tab and the Team page show. */
187
+ export interface DashFollowUpCounts {
188
+ /** Follow-up items still to decide (open, not reviewed, in no goal) across collected goals. */
189
+ unseen: number;
190
+ /** Collected goals with items to decide and no proposal yet: ready to organize. */
191
+ ready: number;
192
+ /** Open proposals. */
193
+ open: number;
194
+ /** Finished goals not collected yet («Collect all»). */
195
+ uncollected: number;
196
+ }
197
+ /** `GET /api/team/follow-ups`. */
198
+ export interface DashFollowUps {
199
+ goals: DashFollowUpGoal[];
200
+ proposals: DashFollowUpProposal[];
201
+ /** Newest first, at most 10. */
202
+ plans: DashFollowUpPlan[];
203
+ counts: DashFollowUpCounts;
204
+ /** What «Organize all» would organize now, and may cost — no model call. */
205
+ organizeAll?: {
206
+ goals: number;
207
+ items: number;
208
+ estimateUsd?: number;
209
+ };
210
+ /** Runs organizing or reorganizing now. */
211
+ runs: DashFollowUpRun[];
212
+ /** Today's dashboard (`click`) allowance: these runs are the person's, approved one by one. */
213
+ allowance: {
214
+ capUsd: number;
215
+ spentUsd: number;
216
+ leftUsd: number;
217
+ };
218
+ }
219
+ /** Organize / Reorganize all before it spends: what it reads, what it leaves out, what it may cost. */
220
+ export interface DashFollowUpEstimate {
221
+ kind: 'organize' | 'reorganize';
222
+ goals: string[];
223
+ items: number;
224
+ suggestions: number;
225
+ proposals: number;
226
+ notRead?: string[];
227
+ model: string;
228
+ inputTokens: number;
229
+ estimateUsd?: number;
230
+ maxUsd: number;
231
+ allowance: {
232
+ capUsd: number;
233
+ spentUsd: number;
234
+ leftUsd: number;
235
+ };
236
+ ready: boolean;
237
+ why?: string;
238
+ }
@@ -0,0 +1 @@
1
+ "use strict";export{};
@@ -55,6 +55,39 @@ export interface DashDesignFigure {
55
55
  bytes: number;
56
56
  sha256: string;
57
57
  }
58
+ /**
59
+ * What the person decides on, read from a version when it is handed in: the budget its Brief asks for and two lines of
60
+ * its Summary. The Inbox shows it on the list and above the document: a design runs to thousands of words, and the
61
+ * person approves from the first screen.
62
+ */
63
+ export interface DashDesignDecision {
64
+ /** The Brief's budget: its packages («builds»), its working hours and its spend in dollars. */
65
+ builds?: number;
66
+ hours?: number;
67
+ spendUsd?: number;
68
+ /** The Summary's «Risk:» line: the worst it can do, and its undo. */
69
+ risk?: string;
70
+ /** The Summary's «Not proved here:» line: what approval accepts unproved, and who proves it later. */
71
+ unproved?: string;
72
+ }
73
+ /**
74
+ * Who wrote a version, as far as its hand-in could tell. The overseer has one session in a repository, and every hand-in
75
+ * made as the overseer carries its name: a design launch's, and any other session's that ran the same command.
76
+ * launch one of the overseer's own launches — `purpose` says which: a design launch writes designs
77
+ * session another agent session handed it in as the overseer: its client, and its role and name on the team's board
78
+ * when the board holds it
79
+ * terminal handed in as the overseer from a shell no agent runs
80
+ * person the person's own hand-in: Inbox › Designs, or their terminal
81
+ * lensmcp LensMCP's own run (a goal made from suggestions or follow-ups)
82
+ */
83
+ export interface DashDesignWriter {
84
+ kind: 'launch' | 'session' | 'terminal' | 'person' | 'lensmcp';
85
+ launchId?: string;
86
+ purpose?: 'round' | 'design' | 'inbox';
87
+ client?: 'claude' | 'codex';
88
+ role?: string;
89
+ name?: string;
90
+ }
58
91
  /** One version of a design: what it was, who wrote it, its questions, and what LensMCP's check warned about. */
59
92
  export interface DashDesignVersion {
60
93
  n: number;
@@ -74,7 +107,21 @@ export interface DashDesignVersion {
74
107
  amendment?: boolean;
75
108
  /** What changed since the previous version, in the author's words. */
76
109
  changes?: string;
110
+ /** What the person decides on. Absent on a version stored before it was kept: read from the version's file instead. */
111
+ decision?: DashDesignDecision;
112
+ /** Who wrote it. Absent on a version stored before it was recorded: {@link designWriter} reads what `by` alone says. */
113
+ writer?: DashDesignWriter;
77
114
  }
115
+ /**
116
+ * Who wrote a version: what its hand-in recorded, else what `by` alone says — the person (`user`) and LensMCP's own run
117
+ * (`lensmcp`) were always told apart. Undefined: handed in as the overseer before the hand-in recorded who it was.
118
+ */
119
+ export declare function designWriter(v: Pick<DashDesignVersion, 'by' | 'byName' | 'writer'>): DashDesignWriter | undefined;
120
+ /**
121
+ * {@link designWriter} in words, for a page and a terminal alike: «written by a design launch on Claude Code», «handed
122
+ * in by a Codex session with no role on this team», «written by the person».
123
+ */
124
+ export declare function designWriterText(v: Pick<DashDesignVersion, 'by' | 'byName' | 'writer'>): string;
78
125
  /** The person's answer to one question: an option, words, or both. Unanswered questions take the recommended option. */
79
126
  export interface DashDesignAnswer {
80
127
  id: string;
@@ -147,6 +194,8 @@ export interface DashDesignBrief {
147
194
  amendment?: boolean;
148
195
  request: DashDesignRequest;
149
196
  updatedAt: number;
197
+ /** What the person decides on in the newest version: its budget, and its Summary's «Risk:» and «Not proved here:». */
198
+ decision?: DashDesignDecision;
150
199
  }
151
200
  export interface DashDesignsAnswer {
152
201
  designs: DashDesignBrief[];
@@ -172,6 +221,8 @@ export interface DashDesignAnswerOne {
172
221
  markdown?: string;
173
222
  /** The previous version's Markdown, for the page's diff. */
174
223
  previous?: string;
224
+ /** What the person decides on in the version shown: kept with it, else read from its Markdown. */
225
+ decision?: DashDesignDecision;
175
226
  }
176
227
  /** The template a person (or the overseer) fills in, for a type and its concerns. */
177
228
  export interface DashDesignTemplate {
@@ -1 +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"];
1
+ "use strict";var o=Object.defineProperty;var t=(n,e)=>o(n,"name",{value:e,configurable:!0});var s=Object.defineProperty,a=t((n,e)=>s(n,"name",{value:e,configurable:!0}),"a"),l=Object.defineProperty,i=a((n,e)=>l(n,"name",{value:e,configurable:!0}),"a");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"];export function designWriter(n){if(n.writer)return n.writer;if(n.by==="user")return{kind:"person"};if(n.by==="lensmcp")return{kind:"lensmcp",...n.byName?{name:n.byName}:{}}}t(designWriter,"designWriter"),a(designWriter,"designWriter"),i(designWriter,"designWriter");const c={claude:"Claude Code",codex:"Codex"};export function designWriterText(n){const e=designWriter(n);if(!e)return"who handed it in was not recorded";const r=e.client?c[e.client]:void 0;switch(e.kind){case"person":return"written by the person";case"lensmcp":return"written by LensMCP's own run";case"terminal":return"handed in from a terminal, as the overseer";case"session":return`handed in by ${r?`a ${r}`:"an agent's"} session${e.role?`, the team's ${e.role}`:" with no role on this team"}`;case"launch":return e.purpose==="design"?`written by a design launch${r?` on ${r}`:""}`:`handed in by the overseer's ${e.purpose==="inbox"?"inbox launch":e.purpose==="round"?"round":"launch"}${r?` on ${r}`:""}`}}t(designWriterText,"designWriterText"),a(designWriterText,"designWriterText"),i(designWriterText,"designWriterText");
@@ -1,3 +1,4 @@
1
+ import type { DashRoleFidelity } from './role-fidelity.js';
1
2
  import type { DashTeamKind, DashTeamOutcome, DashTeamReviewFlow, DashTeamReviewReviews, DashTeamReviewWork, DashTeamTaskState } from './team.js';
2
3
  /**
3
4
  * A goal's outcome row (planning/team/18 RT-D16): its run's outcomes in numbers, written when its archive is, or by the
@@ -27,11 +28,15 @@ export interface DashGoalOutcome {
27
28
  afterApproval: DashGoalOutcomeContradiction[];
28
29
  /** Per check: seeded, its verdicts, caught later (check-counts.ts), without the review ids. */
29
30
  checks: DashGoalOutcomeCheck[];
31
+ /** `notRun`: runs closed «not run — the person's decision» (issues/closed/overseer-78) — counted in `runs`, never passed. */
30
32
  qa: {
31
33
  runs: number;
32
34
  passed: number;
33
35
  failed: number;
36
+ notRun?: number;
34
37
  };
38
+ /** Test authors' tasks closed «not run — the person's decision» (overseer-78): tests nobody wrote, by their decision. */
39
+ testsNotRun?: number;
35
40
  /** Per kind of task: how many, ms waited from created to first claim, ms worked from first claim to closed. */
36
41
  time: Partial<Record<DashTeamKind, {
37
42
  tasks: number;
@@ -69,9 +74,15 @@ export interface DashGoalOutcome {
69
74
  lessons?: DashGoalOutcomeLesson[];
70
75
  /**
71
76
  * Transcript mistakes LensMCP's recipes counted (planning/team/18 gate 7) — kept by the goal's retrospective, which
72
- * reads the transcripts; absent on a row no retrospective read.
77
+ * reads the transcripts; absent on a row no retrospective read. A row written since planning/team/26 R7 keeps the
78
+ * same counts in `roles.recipes` instead.
73
79
  */
74
80
  transcripts?: DashGoalTranscripts;
81
+ /**
82
+ * Whether the goal's agents did what their roles say (planning/team/26 R7), measured from their transcripts when the
83
+ * goal was archived, or later on demand. Absent on a row written before it, until measured: «not measured».
84
+ */
85
+ roles?: DashRoleFidelity;
75
86
  /** Items left out past a cap — the row counts what it read. */
76
87
  truncated?: {
77
88
  tasks?: number;
@@ -36,6 +36,16 @@ export interface DashGoalRetro {
36
36
  findings?: string[];
37
37
  merged?: string[];
38
38
  dropped?: string[];
39
+ /**
40
+ * Work in the project's own code the goal left undone or found, as the retrospective named it — not a team-file patch
41
+ * (those are findings) and not a LensMCP issue: at most 10, collected with the goal's follow-ups (Suggestions › Follow-ups).
42
+ */
43
+ followUps?: Array<{
44
+ title: string;
45
+ why: string;
46
+ evidence?: string[];
47
+ paths?: string[];
48
+ }>;
39
49
  /** The earlier proposals it graded before proposing (RT-D16). */
40
50
  graded?: Array<{
41
51
  id: string;
@@ -63,3 +73,14 @@ export interface DashGoalRetroAnswer {
63
73
  spentTodayUsd: number;
64
74
  };
65
75
  }
76
+ /**
77
+ * What a retrospective did with the queue behind the repository's ten open proposals (planning/team/26): a proposal
78
+ * that finds the ten places taken waits there — at most thirty, the one that came back most often first — and is
79
+ * dropped no more.
80
+ */
81
+ export interface DashGoalRetro {
82
+ /** This goal's proposals that wait, each in words: how often it has come back, and when it becomes a proposal. */
83
+ queued?: string[];
84
+ /** Findings made from the queue at this look, once a place was free. */
85
+ promoted?: string[];
86
+ }