@lensmcp/protocol-types 1.26.36 → 1.26.37

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.
@@ -1,4 +1,5 @@
1
1
  import type { DashTeamKind } from './team.js';
2
+ import type { TeamManagerSeats, TeamRunHistory } from './team-decide.js';
2
3
  /**
3
4
  * Team design (planning/team/01-team-design.md): LensMCP reads a project — a dossier it builds itself, then Claude's
4
5
  * own research with the code tools — and proposes the team that should work on it: the project as understood, its
@@ -53,8 +54,11 @@ export interface TeamDesignRole {
53
54
  creates: DashTeamKind[] | 'any';
54
55
  wip: number;
55
56
  worktree: 'own' | 'shared' | 'any';
56
- /** How many agents to run in it, and whether to start them now or once the work is there. */
57
- agents: number;
57
+ /**
58
+ * How many agents to run in it, and whether to start them now or once the work is there. None for the role that runs
59
+ * goals (the manager): one per running goal — a design never caps it (issues/closed/foodguard-336).
60
+ */
61
+ agents?: number;
58
62
  start: 'now' | 'later';
59
63
  /** Its rules, as tagged sections (`<rules id note>…</rules>`). */
60
64
  rules: string;
@@ -113,6 +117,18 @@ export interface TeamDesignFirstGoal {
113
117
  title: string;
114
118
  description: string;
115
119
  priority: number;
120
+ /**
121
+ * How long it takes a manager's team of agents, in agent hours (issues/closed/foodguard-335): accepted, the goal goes
122
+ * on the roadmap with it as a rough estimate (`design`) until the planner's. `rough`: the model gave none and LensMCP
123
+ * made it from the tasks (1.5 h each).
124
+ */
125
+ estimate?: {
126
+ low: number;
127
+ likely: number;
128
+ high: number;
129
+ why?: string;
130
+ rough?: true;
131
+ };
116
132
  tasks: Array<{
117
133
  kind: DashTeamKind;
118
134
  role?: string;
@@ -227,12 +243,24 @@ export interface DashTeamDesignRun {
227
243
  error?: string;
228
244
  refused?: 'no-key' | 'over-daily-cap' | 'no-room';
229
245
  design?: TeamDesign;
230
- /** The design was accepted (when, and what it wrote). */
246
+ /** The design was accepted (when, and what it wrote) — the newest accept's time, every accept's files and goals. */
231
247
  accepted?: {
232
248
  at: number;
233
249
  files: string[];
234
250
  goals: string[];
235
251
  };
252
+ /**
253
+ * Each part the person decided (issues/closed/hub-09, team-decide.ts `designPartKeys`): `role:<id>`, `off:<id>`,
254
+ * `flow`, `brief`, `goal:<index>` — accepted (written, or put on the board) or rejected, and when. A part with no
255
+ * verdict is still to decide, so a design accepted in part stays open for the rest. A design accepted before the parts
256
+ * were kept (`accepted` and no `parts`) was decided whole.
257
+ */
258
+ parts?: Record<string, {
259
+ is: 'accepted' | 'rejected';
260
+ at: number;
261
+ }>;
262
+ /** On a light run (the History): what it proposed and what became of it — team-decide.ts `designHistory`, `tuneHistory`. */
263
+ history?: TeamRunHistory;
236
264
  /**
237
265
  * A done design not accepted yet, against the team as it is NOW (planning/team/27): per role what accepting it would
238
266
  * change in that role's file, and what it would undo. Worked out on every read with no model; never kept.
@@ -395,6 +423,11 @@ export interface DashTeamDesignState {
395
423
  roles: number;
396
424
  tuned: number;
397
425
  };
426
+ /**
427
+ * The roles that run goals and the goals at once (issues/closed/foodguard-336): a change that sets such a role's
428
+ * `agents` below them waits under «Needs a look» (team-decide.ts). Unreadable: not said, and nothing is held for it.
429
+ */
430
+ seats?: TeamManagerSeats;
398
431
  /**
399
432
  * What a design started now may spend and research (planning/team/08 TH-D1): Settings › Features «Team design
400
433
  * ceiling» ($50 unless set), and the tool calls that buys — its own, apart from the click and agent allowances.
@@ -442,9 +475,10 @@ export type TeamCheckupGroup = (typeof TEAM_CHECKUP_GROUPS)[number];
442
475
  * What an item says, by group:
443
476
  * - drift — `base-moved`: the library role a role file builds on changed since the file was written against it;
444
477
  * `base-unrecorded`: the file does not say which version of its base it was written against;
445
- * - lint — the team lint's kinds (libs/storage team-lint.ts): `dangling-role`, `dangling-tool`, `dangling-skill`,
446
- * `old-flow`, `duplicate-of-base`, `filler-reason`, `cap-mismatch`, `copied`, `check-unread`, `failed-twice`,
447
- * `lesson-stale`;
478
+ * - lint — `manager-seats`: the role that runs goals takes fewer agents than the goals that run at once, so a goal past
479
+ * them has no manager (issues/closed/foodguard-336); and the team lint's kinds (libs/storage team-lint.ts):
480
+ * `dangling-role`, `dangling-tool`, `dangling-skill`, `old-flow`, `duplicate-of-base`, `filler-reason`,
481
+ * `cap-mismatch`, `copied`, `check-unread`, `failed-twice`, `lesson-stale`;
448
482
  * - skills — `skills-unheld`: project skills no role holds; `role-without-skills`: a role whose kind of work has
449
483
  * project skills and holds none — a finding with the names that match, never a patch: names are not the skills'
450
484
  * descriptions, and «Tune the team» reads those (planning/team/27 F2);
@@ -452,7 +486,7 @@ export type TeamCheckupGroup = (typeof TEAM_CHECKUP_GROUPS)[number];
452
486
  * a role file's rules past the length a join carries well; `past-cut`, `long-craft`: text a join cuts or carries long;
453
487
  * - proposals — `open-proposal`: a retrospective's or the overseer's open proposal about the team's files.
454
488
  */
455
- export declare const TEAM_CHECKUP_KINDS: readonly ["base-moved", "base-unrecorded", "dangling-role", "dangling-tool", "dangling-skill", "old-flow", "duplicate-of-base", "filler-reason", "cap-mismatch", "copied", "check-unread", "failed-twice", "lesson-stale", "skills-unheld", "role-without-skills", "heavy-instructions", "heavy-rules", "past-cut", "long-craft", "open-proposal"];
489
+ export declare const TEAM_CHECKUP_KINDS: readonly ["base-moved", "base-unrecorded", "manager-seats", "dangling-role", "dangling-tool", "dangling-skill", "old-flow", "duplicate-of-base", "filler-reason", "cap-mismatch", "copied", "check-unread", "failed-twice", "lesson-stale", "skills-unheld", "role-without-skills", "heavy-instructions", "heavy-rules", "past-cut", "long-craft", "open-proposal"];
456
490
  export type TeamCheckupKind = (typeof TEAM_CHECKUP_KINDS)[number];
457
491
  /** One line of a team file changed: replaced, removed, or a new line put after it. `old` is the whole line as it is now. */
458
492
  export interface TeamCheckupEdit {
@@ -649,6 +683,8 @@ export interface DashTeamDesignState {
649
683
  latest?: DashTeamDesignRun;
650
684
  /** The newest finished tune, when the newest run is another. */
651
685
  done?: DashTeamDesignRun;
686
+ /** Every tune run, newest first, at most 20 — light, each with its `history` (the page's History). */
687
+ runs?: DashTeamDesignRun[];
652
688
  /** Settings › Design «Team tune ceiling» ($10 unless set), held to what the day's design allowance has left. */
653
689
  ceiling: {
654
690
  usd: number;
@@ -1 +1 @@
1
- "use strict";export const TEAM_DESIGN_VERSION=1,TEAM_CHECKUP_GROUPS=["drift","lint","skills","weight","proposals"],TEAM_CHECKUP_KINDS=["base-moved","base-unrecorded","dangling-role","dangling-tool","dangling-skill","old-flow","duplicate-of-base","filler-reason","cap-mismatch","copied","check-unread","failed-twice","lesson-stale","skills-unheld","role-without-skills","heavy-instructions","heavy-rules","past-cut","long-craft","open-proposal"];
1
+ "use strict";export const TEAM_DESIGN_VERSION=1,TEAM_CHECKUP_GROUPS=["drift","lint","skills","weight","proposals"],TEAM_CHECKUP_KINDS=["base-moved","base-unrecorded","manager-seats","dangling-role","dangling-tool","dangling-skill","old-flow","duplicate-of-base","filler-reason","cap-mismatch","copied","check-unread","failed-twice","lesson-stale","skills-unheld","role-without-skills","heavy-instructions","heavy-rules","past-cut","long-craft","open-proposal"];
@@ -62,6 +62,8 @@ export interface DashTeamTemplateMember {
62
62
  member: string;
63
63
  title: string;
64
64
  agents: number;
65
+ /** It runs goals (the manager): its file sets no `agents` — one per running goal (issues/closed/foodguard-336). */
66
+ perGoal?: true;
65
67
  start?: 'now' | 'later';
66
68
  }
67
69
  /**
@@ -44,10 +44,18 @@ export interface GoalSchedule {
44
44
  /** Who set `estimate`/`remaining`, when and why (RM-D2: agent hours, kept as minutes in the ranges above). */
45
45
  estimateSource?: EstimateSource;
46
46
  }
47
- /** Where a goal's estimate came from: the person's numbers, an accepted planner proposal, or a user-directed agent edit. */
47
+ /**
48
+ * Where a goal's estimate came from: the person's numbers (`user`), an accepted planner proposal (`planner`), a
49
+ * user-directed agent edit (`agent`) — or LensMCP's own, for a goal that had none (issues/closed/foodguard-335): the
50
+ * planner's estimate it applied itself (`lensmcp`), or a rough one from the goal's design — its budget's hours, its
51
+ * plan's minutes, or the team design that proposed it — until the planner's (`design`). LensMCP replaces only its own;
52
+ * a proposal that would change anyone else's waits for the person (RM-D5).
53
+ */
48
54
  export interface EstimateSource {
49
- by: 'user' | 'planner' | 'agent';
55
+ by: 'user' | 'planner' | 'agent' | 'lensmcp' | 'design';
50
56
  at: number;
57
+ /** LensMCP's own (`lensmcp`, `design`): the version of the goal's design it was made for — 0 before the first. */
58
+ version?: number;
51
59
  /** The planner proposal the estimate was accepted from. */
52
60
  proposalId?: string;
53
61
  confidence?: 'low' | 'medium' | 'high';
@@ -200,6 +208,8 @@ export interface RoadmapGoal {
200
208
  * took. After a squash the tip is not on main, so this commit is the goal's output there.
201
209
  */
202
210
  integration?: import('./team.js').DashTeamGoalIntegration;
211
+ /** How many versions of its design were handed in (0: none yet) — what LensMCP's own estimate was made for (foodguard-335). */
212
+ designVersion?: number;
203
213
  }
204
214
  export interface RoadmapAnswer {
205
215
  now: number;
@@ -272,6 +282,11 @@ export interface PlannerGoalProposal {
272
282
  }>;
273
283
  /** Design prerequisite keys it could not match to a goal. */
274
284
  unmapped?: string[];
285
+ /**
286
+ * When LensMCP applied this estimate (and label) itself (issues/closed/foodguard-335): the goal had none, or only
287
+ * LensMCP's own. Its links still wait for the person; with none, the goal is `accepted`.
288
+ */
289
+ applied?: number;
275
290
  state: 'proposed' | 'accepted' | 'skipped';
276
291
  }
277
292
  export interface PlannerProposal {
@@ -279,6 +294,8 @@ export interface PlannerProposal {
279
294
  at: number;
280
295
  /** `all` = Plan all (a click), `goal` = one goal on design approval, `remaining` = a running goal past its high. */
281
296
  kind: 'all' | 'goal' | 'remaining';
297
+ /** Who started it: the person (`click`), or the planner's own look (`auto`: a goal with no estimate, foodguard-335). */
298
+ trigger?: 'click' | 'auto';
282
299
  state: 'running' | 'ready' | 'failed' | 'decided';
283
300
  model?: string;
284
301
  costUsd?: number;
@@ -309,12 +326,37 @@ export interface RoadmapPlannerState {
309
326
  dailyUsd: number;
310
327
  /** Goals live and not estimated (what Plan all would plan). */
311
328
  unplanned: number;
329
+ /** LensMCP's automatic estimates (issues/closed/foodguard-335): what waits for one, and why none runs now. */
330
+ auto?: PlannerAutoState;
312
331
  /** When «next week» starts (RM-D9: Settings `roadmapWeekStart` + `roadmapDayStart`, the machine's time zone), UTC ms. */
313
332
  nextWeekAt: number;
314
333
  /** Tomorrow at the day's start hour, UTC ms. */
315
334
  tomorrowAt: number;
316
335
  proposals: PlannerProposal[];
317
336
  }
337
+ /**
338
+ * LensMCP's automatic estimates (issues/closed/foodguard-335): every live goal with no estimate — or only LensMCP's own,
339
+ * made for an older version of its design — gets the planner's, one call per goal and version on the `auto` trigger,
340
+ * within the planner's daily allowance, at most one a minute, with a backoff after a failure.
341
+ */
342
+ export interface PlannerAutoState {
343
+ /** Why no automatic estimate is made now, in words — absent while they run. */
344
+ paused?: string;
345
+ /** What stops them: the planner off, no key, today's allowance spent, a backoff after a failure, the team off here. */
346
+ pausedBy?: 'off' | 'key' | 'spent' | 'backoff' | 'disabled';
347
+ /** The goals waiting for one, first first. */
348
+ queued: string[];
349
+ /** The one being estimated now. */
350
+ running?: string;
351
+ /** After a failed call, none starts before this. */
352
+ backoffUntil?: number;
353
+ /** The last failure, in words. */
354
+ lastError?: string;
355
+ /** Goals LensMCP gave up on for the version they are at (three failed calls): Plan it tries again. */
356
+ gaveUp?: string[];
357
+ /** When the planner first queued every live goal with no estimate (once, on the first look after the upgrade). */
358
+ backfilledAt?: number;
359
+ }
318
360
  /**
319
361
  * POST /api/team/roadmap/ask `{ text, revision }`: Claude reads the sentence into operations; LensMCP previews them at
320
362
  * the given revision. Nothing is applied — the page sends `ops` back as `{ action: 'ops', preview: false }`.
package/lib/team.d.ts CHANGED
@@ -451,7 +451,7 @@ export interface DashTeamLimitsChange {
451
451
  session?: string;
452
452
  name?: string;
453
453
  why?: string;
454
- /** `goalsMax`, `share`, `capacity.<key>`, `ceilings.<key>`; `null`: none — no cap; `cleared`: back to the files or the default. */
454
+ /** `goalsMax`, `share`, `qaRuns`, `capacity.<key>`, `ceilings.<key>`; `null`: none — no cap; `cleared`: back to the files or the default. */
455
455
  changes: Array<{
456
456
  key: string;
457
457
  from: number | null;
@@ -479,6 +479,10 @@ export interface DashTeamLimits {
479
479
  share: DashTeamLimitValue & {
480
480
  value: number;
481
481
  };
482
+ /** Goal QA runs at once in the repository — flow.json `caps.qa`, set live here (issues/closed/foodguard-326). None: an older dashboard. */
483
+ qaRuns?: DashTeamLimitValue & {
484
+ value: number;
485
+ };
482
486
  rows: DashTeamLimitRow[];
483
487
  power?: DashTeamGoalPower;
484
488
  /** The goals running now, the oldest first. */
@@ -506,6 +510,10 @@ export interface DashTeamLimits {
506
510
  min: number;
507
511
  max: number;
508
512
  };
513
+ qaRuns?: {
514
+ min: number;
515
+ max: number;
516
+ };
509
517
  shares: number[];
510
518
  most: number;
511
519
  };
@@ -520,6 +528,7 @@ export interface DashTeamLimits {
520
528
  export interface DashTeamLimitsPatch {
521
529
  goalsMax?: number | null;
522
530
  share?: number | null;
531
+ qaRuns?: number | null;
523
532
  capacity?: Record<string, number | null>;
524
533
  ceilings?: Record<string, number | null>;
525
534
  }
@@ -1484,6 +1493,24 @@ export interface DashTeamLaunchKit {
1484
1493
  why: string;
1485
1494
  lists: number;
1486
1495
  }>;
1496
+ /**
1497
+ * What the client listed at its first request (issues/closed/foodguard-329), read once from the opening `system/init`
1498
+ * of its stream: how many skills, and the plugins that listed skills though the launch switched them off (`back`) or
1499
+ * never named them (`stray`), each with how many. `miss`: why that is not the listing the launch made — absent when it is.
1500
+ */
1501
+ seen?: {
1502
+ at: number;
1503
+ skills: number;
1504
+ back: Array<{
1505
+ plugin: string;
1506
+ skills: number;
1507
+ }>;
1508
+ stray: Array<{
1509
+ plugin: string;
1510
+ skills: number;
1511
+ }>;
1512
+ miss?: string;
1513
+ };
1487
1514
  };
1488
1515
  }
1489
1516
  export interface DashTeamLaunch {
@@ -1606,6 +1633,12 @@ export interface DashTeamManagerSignIns {
1606
1633
  client?: DashTeamLaunchClient;
1607
1634
  /** The goal's own account (`lensmcp agent task <goal> --account`): Auto takes it, and it alone. */
1608
1635
  goalAccount?: string;
1636
+ /**
1637
+ * Why a start would be refused now, before anything starts (issues/closed/foodguard-336) — the manager role's seats
1638
+ * full among the reasons: «The manager role takes 1 agent at once and G-182's manager holds it. Raise manager agents
1639
+ * to 3 in Team › Roles, or wait for G-182». Absent: it may start.
1640
+ */
1641
+ refused?: string;
1609
1642
  clients: Array<{
1610
1643
  client: DashTeamLaunchClient;
1611
1644
  /** The sign-in Auto takes now — its account id, `null` its own sign-in; absent: none is ready. */
@@ -1969,6 +2002,16 @@ export type DashTeamQuestionState = 'manager' | 'person' | 'answered' | 'withdra
1969
2002
  export interface DashTeamQuestionOption {
1970
2003
  label: string;
1971
2004
  detail?: string;
2005
+ /** The team limits it sets when the person picks it (issues/closed/foodguard-326) — LensMCP applies them as the person's change. */
2006
+ limits?: DashTeamLimitsPatch;
2007
+ /** The runs of a goal's QA task it waives as environment failures when the person picks it (foodguard-326), and why. */
2008
+ waive?: {
2009
+ taskId: string;
2010
+ runs: string[];
2011
+ why: string;
2012
+ };
2013
+ /** LensMCP's words for what picking it does: «LensMCP sets goal QA runs at once 1 → 2 …», «LensMCP records the person's waiver of wa_… …». */
2014
+ applies?: string;
1972
2015
  }
1973
2016
  /** Who answered: the manager it went to, the person (the dashboard's Inbox, the CLI), or the person's delegate — their inbox session. */
1974
2017
  export interface DashTeamQuestionAnswer {
@@ -1980,6 +2023,16 @@ export interface DashTeamQuestionAnswer {
1980
2023
  byName?: string;
1981
2024
  as: 'manager' | 'person' | 'delegate';
1982
2025
  at: number;
2026
+ /** What came of the picked option's limits change: applied by the person's pick, or not (a delegate's pick changes none). */
2027
+ limits?: {
2028
+ applied: boolean;
2029
+ text: string;
2030
+ };
2031
+ /** What came of the picked option's waiver: recorded on its QA task by the person's pick, or not. */
2032
+ waiver?: {
2033
+ applied: boolean;
2034
+ text: string;
2035
+ };
1983
2036
  }
1984
2037
  /**
1985
2038
  * One agent's question (agent_ask, the store's `CoordinationQuestion`): its asker, the task and goal it is about, the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/protocol-types",
3
- "version": "1.26.36",
3
+ "version": "1.26.37",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",