@lensmcp/protocol-types 1.25.79 → 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 (60) hide show
  1. package/index.d.ts +9 -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 +48 -0
  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/perf-rules.js +1 -1
  42. package/lib/pod-memory.d.ts +2 -0
  43. package/lib/pod-memory.js +1 -1
  44. package/lib/producer-health.js +1 -1
  45. package/lib/resources.d.ts +28 -28
  46. package/lib/role-fidelity.d.ts +210 -0
  47. package/lib/role-fidelity.js +1 -0
  48. package/lib/sources.js +1 -1
  49. package/lib/system-report.js +1 -1
  50. package/lib/team-delivery.d.ts +38 -4
  51. package/lib/team-delivery.js +1 -1
  52. package/lib/team-design.d.ts +224 -0
  53. package/lib/team-design.js +1 -1
  54. package/lib/team-prompts.d.ts +16 -7
  55. package/lib/team-prompts.js +4 -47
  56. package/lib/team-skills.d.ts +355 -0
  57. package/lib/team-skills.js +1 -0
  58. package/lib/team.d.ts +95 -1
  59. package/lib/team.js +1 -1
  60. package/package.json +1 -1
@@ -1,17 +1,26 @@
1
1
  /**
2
2
  * The prompt that starts a goal manager in Claude Code or Codex (FoodGuard, 2026-11-05). The person copies it from the
3
3
  * Team page («Manager prompt», on every tab), or a terminal prints it: `lensmcp agent prompt manager`, as in
4
- * `claude "$(lensmcp agent prompt manager)"`. It holds the loop only — join, pick the next goal in the roadmap's order,
5
- * read its design, design its team, break it down, run it, close it, clear and continue. The repository's own rules
6
- * (its merge, its QA gates, its checks) reach the agent through agent_join: its role's rules and the project brief.
4
+ * `claude "$(lensmcp agent prompt manager)"`.
7
5
  *
8
- * Every tool and resource it names is checked against the agent's (apps/agent/src/tools/manager-prompt.spec.ts), and
9
- * every `lensmcp agent …` command against the CLI's usage (servers/lensmcp-mcp/src/manager-prompt.spec.ts).
6
+ * It holds three things only (planning/team/26 R1, R3): the join, that the role card the join answers is the manager's
7
+ * whole loop, and what stays the person's. The loop itself — take the next goal, enter its worktree, understand it,
8
+ * plan it, staff it, run it, close it, take the next — is the manager role's card (the library's tech-lead). Until
9
+ * 2026-11-11 the loop was written here, in eight steps. But this prompt is a session's first user message, which the
10
+ * first compaction summarises away, and it told a compacted manager to join again «with ifRulesHash», which answers
11
+ * «unchanged» and sends nothing: FoodGuard's managers made 82 % of their requests with no rule of their role in
12
+ * context. The card is in the places a compaction cannot empty: agent_join's answer (whole again after a compaction),
13
+ * a launched manager's system prompt, and the note LensMCP's hook writes after each compaction. The repository's own
14
+ * rules (its merge, its QA gates, its checks) reach the agent through agent_join too: its role's rules and the brief.
15
+ *
16
+ * Every tool it names is checked against the agent's (apps/agent/src/tools/manager-prompt.spec.ts), and every
17
+ * `lensmcp agent …` command it or the manager's role names against the CLI's usage
18
+ * (servers/lensmcp-mcp/src/manager-prompt.spec.ts).
10
19
  */
11
- export declare const MANAGER_PROMPT = "You are this repository's LensMCP goal manager. You run one goal at a time from claim to merge, then take the next one the roadmap offers, until nothing is left you may claim. You never push, deploy, approve a design, accept a goal's output or edit the team's files \u2014 those are the person's.\n\n1. Join\n- agent_join { role: \"manager\", manager: \"user\", listening: true, credential: <the credential your start hook gave you> }. Never print the credential.\n- Follow role.rules for the whole session. Read `project` (the brief) and every section it names as left out before work it is about. Load the skills role.skills names (Claude Code: /lensmcp:team). Keep the rulesHash.\n- After a compacted context: agent_join again with ifRulesHash, then agent_sync { full: true }.\n\n2. Pick the next goal\n- A goal you already hold (claimed, or in recovery) comes first: read its checkpoint and log, then continue it.\n- Else agent_task_list { credential, claimable: true }: goals come in the roadmap's order (Team \u203A Roadmap) \u2014 approved designs whose dependencies are completed and accepted. agent_task_claim the first; keep its claimGeneration.\n- None claimable: agent_wait { timeoutSec: 900 }, then look again. Never claim or create a goal still in design.\n\n3. Read the goal\n- Its whole design: `lensmcp agent design show <goalId>` \u2014 outcome, Done means, the plan with paths and estimates, Not in this goal, budget, the answered questions. Its plan (builds, hours) is the budget LensMCP enforces.\n- Your first commit puts the design in the repository: `lensmcp agent design export <goalId> --to <the file its description names>`.\n- The claim names the goal's worktree when goal worktrees are on: worktree_switch to it and do all the goal's work there (it stays parked until an agent runs it).\n- A question about the design \u2192 agent_ask (its author answers). A change of scope, Done means or plan is an amendment the person approves; keep working on what it does not touch.\n\n4. Design the goal's team\n- Before breaking it down: agent_goal_team { goalId, team: [{ role, rules, model?, effort?, reviews?, max? }] }.\n- Each role the plan needs (team://roles is this team; team://library the roles it could add), with this goal's rules for it: the paths it works in, the Done-means lines it proves, the checks it runs.\n- A high-risk goal staffs a second review role (security-reviewer) with `reviews` over the plan's paths \u2014 LensMCP refuses a high-risk package without one. `max` only lowers a role's capacity.\n- A role the work needs and the team lacks: name the library role to the person; never invent one.\n\n5. Break it down\n- One build task per plan package: kind, role, priority, parentId (the goal), its paths, its Done-means lines, links to its evidence. No two open builds on overlapping paths unless blockedBy orders them.\n- Never create test, review, qa or docs tasks: completing a build hands them off.\n- Work the plan does not hold \u2192 the goal's next list (agent_task_update { taskId: <goal>, action: \"next\", title, result }), never the board.\n\n6. Run it\n- agent_spawn { role, brief, taskId? }: one long-lived agent per role for the goal. A launch refused for want of a slot is queued \u2014 agent_wait, then spawn again; never retry in a loop.\n- Between decisions agent_wait \u2014 never sleep or poll. Read the overview it brings first, then your messages.\n- A package's deliverySummary (in every list, board row and wake) says its state and, while it is verified or repaired, what holds it (blockers); LensMCP's notices carry the same line, and LensMCP itself tells writers of a failed proof and reviewers of a superseded candidate. Act on those \u2014 agent_package context only for the evidence itself \u2014 and message an agent for a decision, never to relay a result.\n- A goal with nothing in hand for 30 minutes while another goal waits to start is paused by LensMCP: complete, merge and ask as before, and resume it (action \"resume-goal\") only when it has work to put in hand again.\n- Answer workers with agent_answer. A decision only the person can make goes through agent_ask, never your client's own prompt. Log each decision on the goal; rework goes back to whoever built it.\n\n7. Close the goal\n- When every package is built, tested and reviewed, LensMCP opens the goal's QA run. Let it run.\n- QA passed (or the person recorded a waiver): in the goal's worktree merge current main into the branch, re-run the goal's checks if main moved, leave the checkout clean.\n- agent_task_update { taskId: <goal>, action: \"merge\" } lands it on main as flow.json sets (e.g. one squash commit titled with the goal). Never merge a goal twice.\n- Complete the goal (action \"complete\") with each Done-means line and how it was verified, the merge commit, the branch tip, and the review, test and QA task ids \u2014 an unproved line is named with its owner instead.\n- LensMCP removes the worktree once the goal completes; if it says the worktree is still there, worktree_remove { name } and keep the branch.\n- Report through LensMCP, never by ending your turn: what finished, what is open and who holds it goes in the goal's completion; each decision only the person can make goes through agent_ask, with your recommendation. LensMCP accepts the goal's output itself when its goal QA passed on main. If it held the output (Team \u203A Roadmap says why: a waiver, a QA that did not pass), name that in the completion \u2014 the goals that need it wait for the person, not for you.\n\n8. Clear and continue\n- Release anything you still hold under the finished goal; its agents close themselves when no work is left for them.\n- A checkpoint of about 2,000 characters: decisions, the next step, open questions.\n- Read and acknowledge your messages, then go back to step 2 in this same turn: a report is not a reason to stop. Only when nothing is claimable and nothing waits for you: agent_session { action: \"close\" }.";
20
+ export declare const MANAGER_PROMPT = "You are this repository's LensMCP goal manager.\n\n1. Call agent_join { role: \"manager\", manager: \"user\", listening: true, credential: <the credential your start hook gave you> }. Never print the credential.\n2. The join answers your role card. It is your whole loop: take the next goal from the board, enter its worktree, understand it, plan it, staff it, run it, close it, take the next. LensMCP gives it to you again whenever your context is compacted. Follow it until nothing is left that you may claim.\n3. Pushing, deploying, approving a design, accepting a goal's output and editing the team's files are the person's.";
12
21
  /** The prompts the Team page and `lensmcp agent prompt <name>` hand out, by name. */
13
22
  export declare const TEAM_PROMPTS: {
14
- readonly manager: "You are this repository's LensMCP goal manager. You run one goal at a time from claim to merge, then take the next one the roadmap offers, until nothing is left you may claim. You never push, deploy, approve a design, accept a goal's output or edit the team's files — those are the person's.\n\n1. Join\n- agent_join { role: \"manager\", manager: \"user\", listening: true, credential: <the credential your start hook gave you> }. Never print the credential.\n- Follow role.rules for the whole session. Read `project` (the brief) and every section it names as left out before work it is about. Load the skills role.skills names (Claude Code: /lensmcp:team). Keep the rulesHash.\n- After a compacted context: agent_join again with ifRulesHash, then agent_sync { full: true }.\n\n2. Pick the next goal\n- A goal you already hold (claimed, or in recovery) comes first: read its checkpoint and log, then continue it.\n- Else agent_task_list { credential, claimable: true }: goals come in the roadmap's order (Team › Roadmap) — approved designs whose dependencies are completed and accepted. agent_task_claim the first; keep its claimGeneration.\n- None claimable: agent_wait { timeoutSec: 900 }, then look again. Never claim or create a goal still in design.\n\n3. Read the goal\n- Its whole design: `lensmcp agent design show <goalId>` — outcome, Done means, the plan with paths and estimates, Not in this goal, budget, the answered questions. Its plan (builds, hours) is the budget LensMCP enforces.\n- Your first commit puts the design in the repository: `lensmcp agent design export <goalId> --to <the file its description names>`.\n- The claim names the goal's worktree when goal worktrees are on: worktree_switch to it and do all the goal's work there (it stays parked until an agent runs it).\n- A question about the design → agent_ask (its author answers). A change of scope, Done means or plan is an amendment the person approves; keep working on what it does not touch.\n\n4. Design the goal's team\n- Before breaking it down: agent_goal_team { goalId, team: [{ role, rules, model?, effort?, reviews?, max? }] }.\n- Each role the plan needs (team://roles is this team; team://library the roles it could add), with this goal's rules for it: the paths it works in, the Done-means lines it proves, the checks it runs.\n- A high-risk goal staffs a second review role (security-reviewer) with `reviews` over the plan's paths — LensMCP refuses a high-risk package without one. `max` only lowers a role's capacity.\n- A role the work needs and the team lacks: name the library role to the person; never invent one.\n\n5. Break it down\n- One build task per plan package: kind, role, priority, parentId (the goal), its paths, its Done-means lines, links to its evidence. No two open builds on overlapping paths unless blockedBy orders them.\n- Never create test, review, qa or docs tasks: completing a build hands them off.\n- Work the plan does not hold → the goal's next list (agent_task_update { taskId: <goal>, action: \"next\", title, result }), never the board.\n\n6. Run it\n- agent_spawn { role, brief, taskId? }: one long-lived agent per role for the goal. A launch refused for want of a slot is queued — agent_wait, then spawn again; never retry in a loop.\n- Between decisions agent_wait — never sleep or poll. Read the overview it brings first, then your messages.\n- A package's deliverySummary (in every list, board row and wake) says its state and, while it is verified or repaired, what holds it (blockers); LensMCP's notices carry the same line, and LensMCP itself tells writers of a failed proof and reviewers of a superseded candidate. Act on those — agent_package context only for the evidence itself — and message an agent for a decision, never to relay a result.\n- A goal with nothing in hand for 30 minutes while another goal waits to start is paused by LensMCP: complete, merge and ask as before, and resume it (action \"resume-goal\") only when it has work to put in hand again.\n- Answer workers with agent_answer. A decision only the person can make goes through agent_ask, never your client's own prompt. Log each decision on the goal; rework goes back to whoever built it.\n\n7. Close the goal\n- When every package is built, tested and reviewed, LensMCP opens the goal's QA run. Let it run.\n- QA passed (or the person recorded a waiver): in the goal's worktree merge current main into the branch, re-run the goal's checks if main moved, leave the checkout clean.\n- agent_task_update { taskId: <goal>, action: \"merge\" } lands it on main as flow.json sets (e.g. one squash commit titled with the goal). Never merge a goal twice.\n- Complete the goal (action \"complete\") with each Done-means line and how it was verified, the merge commit, the branch tip, and the review, test and QA task ids — an unproved line is named with its owner instead.\n- LensMCP removes the worktree once the goal completes; if it says the worktree is still there, worktree_remove { name } and keep the branch.\n- Report through LensMCP, never by ending your turn: what finished, what is open and who holds it goes in the goal's completion; each decision only the person can make goes through agent_ask, with your recommendation. LensMCP accepts the goal's output itself when its goal QA passed on main. If it held the output (Team › Roadmap says why: a waiver, a QA that did not pass), name that in the completion — the goals that need it wait for the person, not for you.\n\n8. Clear and continue\n- Release anything you still hold under the finished goal; its agents close themselves when no work is left for them.\n- A checkpoint of about 2,000 characters: decisions, the next step, open questions.\n- Read and acknowledge your messages, then go back to step 2 in this same turn: a report is not a reason to stop. Only when nothing is claimable and nothing waits for you: agent_session { action: \"close\" }.";
23
+ readonly manager: "You are this repository's LensMCP goal manager.\n\n1. Call agent_join { role: \"manager\", manager: \"user\", listening: true, credential: <the credential your start hook gave you> }. Never print the credential.\n2. The join answers your role card. It is your whole loop: take the next goal from the board, enter its worktree, understand it, plan it, staff it, run it, close it, take the next. LensMCP gives it to you again whenever your context is compacted. Follow it until nothing is left that you may claim.\n3. Pushing, deploying, approving a design, accepting a goal's output and editing the team's files are the person's.";
15
24
  };
16
25
  export type TeamPromptName = keyof typeof TEAM_PROMPTS;
17
26
  export declare const TEAM_PROMPT_NAMES: TeamPromptName[];
@@ -1,48 +1,5 @@
1
- "use strict";export const MANAGER_PROMPT=`You are this repository's LensMCP goal manager. You run one goal at a time from claim to merge, then take the next one the roadmap offers, until nothing is left you may claim. You never push, deploy, approve a design, accept a goal's output or edit the team's files \u2014 those are the person's.
1
+ "use strict";export const MANAGER_PROMPT=`You are this repository's LensMCP goal manager.
2
2
 
3
- 1. Join
4
- - agent_join { role: "manager", manager: "user", listening: true, credential: <the credential your start hook gave you> }. Never print the credential.
5
- - Follow role.rules for the whole session. Read \`project\` (the brief) and every section it names as left out before work it is about. Load the skills role.skills names (Claude Code: /lensmcp:team). Keep the rulesHash.
6
- - After a compacted context: agent_join again with ifRulesHash, then agent_sync { full: true }.
7
-
8
- 2. Pick the next goal
9
- - A goal you already hold (claimed, or in recovery) comes first: read its checkpoint and log, then continue it.
10
- - Else agent_task_list { credential, claimable: true }: goals come in the roadmap's order (Team \u203A Roadmap) \u2014 approved designs whose dependencies are completed and accepted. agent_task_claim the first; keep its claimGeneration.
11
- - None claimable: agent_wait { timeoutSec: 900 }, then look again. Never claim or create a goal still in design.
12
-
13
- 3. Read the goal
14
- - Its whole design: \`lensmcp agent design show <goalId>\` \u2014 outcome, Done means, the plan with paths and estimates, Not in this goal, budget, the answered questions. Its plan (builds, hours) is the budget LensMCP enforces.
15
- - Your first commit puts the design in the repository: \`lensmcp agent design export <goalId> --to <the file its description names>\`.
16
- - The claim names the goal's worktree when goal worktrees are on: worktree_switch to it and do all the goal's work there (it stays parked until an agent runs it).
17
- - A question about the design \u2192 agent_ask (its author answers). A change of scope, Done means or plan is an amendment the person approves; keep working on what it does not touch.
18
-
19
- 4. Design the goal's team
20
- - Before breaking it down: agent_goal_team { goalId, team: [{ role, rules, model?, effort?, reviews?, max? }] }.
21
- - Each role the plan needs (team://roles is this team; team://library the roles it could add), with this goal's rules for it: the paths it works in, the Done-means lines it proves, the checks it runs.
22
- - A high-risk goal staffs a second review role (security-reviewer) with \`reviews\` over the plan's paths \u2014 LensMCP refuses a high-risk package without one. \`max\` only lowers a role's capacity.
23
- - A role the work needs and the team lacks: name the library role to the person; never invent one.
24
-
25
- 5. Break it down
26
- - One build task per plan package: kind, role, priority, parentId (the goal), its paths, its Done-means lines, links to its evidence. No two open builds on overlapping paths unless blockedBy orders them.
27
- - Never create test, review, qa or docs tasks: completing a build hands them off.
28
- - Work the plan does not hold \u2192 the goal's next list (agent_task_update { taskId: <goal>, action: "next", title, result }), never the board.
29
-
30
- 6. Run it
31
- - agent_spawn { role, brief, taskId? }: one long-lived agent per role for the goal. A launch refused for want of a slot is queued \u2014 agent_wait, then spawn again; never retry in a loop.
32
- - Between decisions agent_wait \u2014 never sleep or poll. Read the overview it brings first, then your messages.
33
- - A package's deliverySummary (in every list, board row and wake) says its state and, while it is verified or repaired, what holds it (blockers); LensMCP's notices carry the same line, and LensMCP itself tells writers of a failed proof and reviewers of a superseded candidate. Act on those \u2014 agent_package context only for the evidence itself \u2014 and message an agent for a decision, never to relay a result.
34
- - A goal with nothing in hand for 30 minutes while another goal waits to start is paused by LensMCP: complete, merge and ask as before, and resume it (action "resume-goal") only when it has work to put in hand again.
35
- - Answer workers with agent_answer. A decision only the person can make goes through agent_ask, never your client's own prompt. Log each decision on the goal; rework goes back to whoever built it.
36
-
37
- 7. Close the goal
38
- - When every package is built, tested and reviewed, LensMCP opens the goal's QA run. Let it run.
39
- - QA passed (or the person recorded a waiver): in the goal's worktree merge current main into the branch, re-run the goal's checks if main moved, leave the checkout clean.
40
- - agent_task_update { taskId: <goal>, action: "merge" } lands it on main as flow.json sets (e.g. one squash commit titled with the goal). Never merge a goal twice.
41
- - Complete the goal (action "complete") with each Done-means line and how it was verified, the merge commit, the branch tip, and the review, test and QA task ids \u2014 an unproved line is named with its owner instead.
42
- - LensMCP removes the worktree once the goal completes; if it says the worktree is still there, worktree_remove { name } and keep the branch.
43
- - Report through LensMCP, never by ending your turn: what finished, what is open and who holds it goes in the goal's completion; each decision only the person can make goes through agent_ask, with your recommendation. LensMCP accepts the goal's output itself when its goal QA passed on main. If it held the output (Team \u203A Roadmap says why: a waiver, a QA that did not pass), name that in the completion \u2014 the goals that need it wait for the person, not for you.
44
-
45
- 8. Clear and continue
46
- - Release anything you still hold under the finished goal; its agents close themselves when no work is left for them.
47
- - A checkpoint of about 2,000 characters: decisions, the next step, open questions.
48
- - Read and acknowledge your messages, then go back to step 2 in this same turn: a report is not a reason to stop. Only when nothing is claimable and nothing waits for you: agent_session { action: "close" }.`,TEAM_PROMPTS={manager:MANAGER_PROMPT},TEAM_PROMPT_NAMES=Object.keys(TEAM_PROMPTS);
3
+ 1. Call agent_join { role: "manager", manager: "user", listening: true, credential: <the credential your start hook gave you> }. Never print the credential.
4
+ 2. The join answers your role card. It is your whole loop: take the next goal from the board, enter its worktree, understand it, plan it, staff it, run it, close it, take the next. LensMCP gives it to you again whenever your context is compacted. Follow it until nothing is left that you may claim.
5
+ 3. Pushing, deploying, approving a design, accepting a goal's output and editing the team's files are the person's.`,TEAM_PROMPTS={manager:MANAGER_PROMPT},TEAM_PROMPT_NAMES=Object.keys(TEAM_PROMPTS);
@@ -0,0 +1,355 @@
1
+ /**
2
+ * Team › Skills (planning/team/26-roles-that-hold.md, R4 and R10): the skills a repository's agents may be given, from
3
+ * three layers — LensMCP's library, this machine's, the project's own — and a skill added from the dashboard: one to
4
+ * eight addresses LensMCP fetches and pins, one model run that writes one skill from them, the checks on it, the
5
+ * person's edit and accept, and the roles it is assigned to. These are the shapes the lens server, the dashboard and
6
+ * the CLI share. Nothing here is an agent's to write: an agent proposes a skill, as data, and the person does the rest.
7
+ */
8
+ /** Where a skill comes from: LensMCP's library, this machine's folder, or the project's own. A later layer wins by name. */
9
+ export type DashSkillLayer = 'library' | 'machine' | 'project';
10
+ /** A role a skill is assigned to: always, or when a task's paths match. */
11
+ export interface DashTeamSkillAssignment {
12
+ role: string;
13
+ /** `always`: in the role's `skills:`; `when`: offered when a task's paths match `paths`. */
14
+ how: 'always' | 'when';
15
+ /** `base`: its library role names it; `file`: the repository's role file does. */
16
+ from: 'base' | 'file';
17
+ /** With `when`: the globs. */
18
+ paths?: string[];
19
+ }
20
+ /** One skill of the catalog, in brief. */
21
+ export interface DashTeamSkill {
22
+ name: string;
23
+ layer: DashSkillLayer;
24
+ title: string;
25
+ description: string;
26
+ kind: 'lens' | 'delivery' | 'craft';
27
+ /** The roles its frontmatter names. */
28
+ roles: string[];
29
+ version: number;
30
+ /** One hash of its SKILL.md and every reference. */
31
+ sha: string;
32
+ chars: number;
33
+ lines: number;
34
+ references: Array<{
35
+ file: string;
36
+ chars: number;
37
+ }>;
38
+ /** The repositories its frontmatter says it was adapted from, each at its commit. */
39
+ sources: Array<{
40
+ repo: string;
41
+ path: string;
42
+ licence: string;
43
+ commit: string;
44
+ }>;
45
+ /** Its folder, as a person reads the path; none for the library's. */
46
+ dir?: string;
47
+ /** The layers under it that hold a skill of the same name: this one is served in their place. */
48
+ over: DashSkillLayer[];
49
+ /** What its lint asks a person to look at. */
50
+ warnings: string[];
51
+ /** Written from sources: how many are pinned, when it was accepted, and what it was asked to cover. */
52
+ pinned?: {
53
+ sources: number;
54
+ files: number;
55
+ acceptedAt: number;
56
+ note?: string;
57
+ run?: {
58
+ id: string;
59
+ model?: string;
60
+ };
61
+ };
62
+ /** The team's roles that have it now. */
63
+ assigned: DashTeamSkillAssignment[];
64
+ }
65
+ /** A skill folder that is not served, and every reason why. */
66
+ export interface DashTeamSkillSkipped {
67
+ name: string;
68
+ layer: DashSkillLayer;
69
+ dir: string;
70
+ problems: string[];
71
+ }
72
+ /** One of a role's skills, and the layer it is read from — none: no layer holds it (a skill of the agent's own client). */
73
+ export interface DashTeamRoleSkill {
74
+ name: string;
75
+ how: 'always' | 'when';
76
+ from: 'base' | 'file';
77
+ paths?: string[];
78
+ layer?: DashSkillLayer;
79
+ }
80
+ /** A role of the team with the skills it is given. */
81
+ export interface DashTeamSkillRole {
82
+ id: string;
83
+ title: string;
84
+ base?: string;
85
+ skills: DashTeamRoleSkill[];
86
+ }
87
+ /** A skill an agent asked for: its role, the addresses and why. Data for the person; nothing was fetched or written. */
88
+ export interface DashTeamSkillProposal {
89
+ id: string;
90
+ at: number;
91
+ role: string;
92
+ urls: string[];
93
+ why: string;
94
+ /** The name it suggested. */
95
+ name?: string;
96
+ /** Who proposed it: the agent's session and the role it works in. */
97
+ by: {
98
+ sessionId: string;
99
+ role?: string;
100
+ };
101
+ state: 'open' | 'used' | 'dismissed';
102
+ }
103
+ /** A file LensMCP read from a source: where in the source, its size, the sha256 of the text read. */
104
+ export interface DashTeamSkillFile {
105
+ path: string;
106
+ bytes: number;
107
+ sha256: string;
108
+ }
109
+ /** One source as it was fetched — the page shows this before anything is generated. */
110
+ export interface DashTeamSkillSource {
111
+ url: string;
112
+ kind: 'github' | 'page';
113
+ title: string;
114
+ bytes: number;
115
+ repo?: string;
116
+ path?: string;
117
+ ref?: string;
118
+ /** The commit its files were read at. */
119
+ commit?: string;
120
+ /** The licence found: an SPDX id when recognised, and a plain line — «no licence found» when there is none. */
121
+ licence: {
122
+ spdx?: string;
123
+ file?: string;
124
+ permissive?: boolean;
125
+ line: string;
126
+ };
127
+ files: DashTeamSkillFile[];
128
+ /** What was there and was not read, and why. */
129
+ skipped: string[];
130
+ fetchedAt: number;
131
+ /** How much of its text the run is shown, when it is cut to fit: characters shown of characters read. */
132
+ shown?: {
133
+ chars: number;
134
+ of: number;
135
+ };
136
+ }
137
+ /** What generating would cost, said before the click. */
138
+ export interface DashTeamSkillEstimate {
139
+ /** The model that would answer; none: the key's own. */
140
+ model?: string;
141
+ inputTokens: number;
142
+ maxOutputTokens: number;
143
+ /** A usual run, and the most one may cost with its repair round — absent when the model has no price here. */
144
+ likelyUsd?: number;
145
+ mostUsd?: number;
146
+ /** The most one run may spend, its repair round included. */
147
+ ceilingUsd: number;
148
+ /** The day's allowance for what the person clicks, and what is left of it when known. */
149
+ allowance: {
150
+ usd: number;
151
+ spent?: number;
152
+ left?: number;
153
+ };
154
+ /** A key can pay, and the run fits its ceiling. */
155
+ ready: boolean;
156
+ /** Why not, when it is not ready. */
157
+ why?: string;
158
+ }
159
+ /** The checks on a skill's text: the library's own lint, and what a generated skill must hold beside it. */
160
+ export interface DashTeamSkillLint {
161
+ /** No problem: it may be accepted. */
162
+ ok: boolean;
163
+ problems: string[];
164
+ warnings: string[];
165
+ name?: string;
166
+ title?: string;
167
+ version?: number;
168
+ chars?: number;
169
+ lines?: number;
170
+ }
171
+ /** The skill a run wrote, or the person edited: its text, its references, the checks on it. */
172
+ export interface DashTeamSkillResult {
173
+ /** SKILL.md whole. */
174
+ skill: string;
175
+ references: Array<{
176
+ file: string;
177
+ text: string;
178
+ }>;
179
+ /** What the run says it cut, could not settle, or found in a source that addressed it. */
180
+ notes: string[];
181
+ lint: DashTeamSkillLint;
182
+ /** The first answer failed its checks and the model was asked once to repair it. */
183
+ repaired?: boolean;
184
+ /** The person edited the text since the run. */
185
+ edited?: boolean;
186
+ at: number;
187
+ }
188
+ /** A file of a pinned source against what is there now. */
189
+ export interface DashTeamSkillMoved {
190
+ url: string;
191
+ title: string;
192
+ commit?: {
193
+ was?: string;
194
+ now?: string;
195
+ };
196
+ files: Array<{
197
+ path: string;
198
+ state: 'same' | 'moved' | 'added' | 'removed';
199
+ }>;
200
+ /** It could not be fetched now, and why. */
201
+ problem?: string;
202
+ }
203
+ /** A model run of a draft, as the page follows it. */
204
+ export interface DashTeamSkillRun {
205
+ id: string;
206
+ status: 'queued' | 'running' | 'done' | 'failed';
207
+ step: string;
208
+ steps: string[];
209
+ costUsd: number;
210
+ model?: string;
211
+ error?: string;
212
+ /** Never sent: no key, the day's allowance spent, or no room. */
213
+ refused?: string;
214
+ }
215
+ /**
216
+ * A skill being added: fetched, then generated, then edited, then accepted — one record through all of it, kept on
217
+ * this machine (`.lensmcp/skill-drafts/`) until it is accepted or dropped. Nothing of it is in the team's files.
218
+ */
219
+ export interface DashTeamSkillDraft {
220
+ id: string;
221
+ createdAt: number;
222
+ updatedAt: number;
223
+ /** `fetched`: its sources are read and nothing was generated; then a run's own states. */
224
+ status: 'fetched' | 'queued' | 'running' | 'done' | 'failed';
225
+ /** What the person asked the skill to cover. */
226
+ note: string;
227
+ roles: string[];
228
+ /** The name the person gave it; none: the run names it. */
229
+ name?: string;
230
+ layer: 'project' | 'machine';
231
+ /** A new version of a skill there is: its name, the version it has, the layer it is in. */
232
+ updates?: {
233
+ name: string;
234
+ version: number;
235
+ layer: 'project' | 'machine';
236
+ };
237
+ /** The proposal it was started from. */
238
+ proposalId?: string;
239
+ sources: DashTeamSkillSource[];
240
+ /** The addresses that were not read, and why. */
241
+ problems: Array<{
242
+ url: string;
243
+ problem: string;
244
+ }>;
245
+ estimate: DashTeamSkillEstimate;
246
+ /** The newest run. */
247
+ run?: DashTeamSkillRun;
248
+ /** Every run's cost together. */
249
+ costUsd: number;
250
+ result?: DashTeamSkillResult;
251
+ /** With `updates`: what moved in its sources since they were pinned. */
252
+ moved?: DashTeamSkillMoved[];
253
+ accepted?: {
254
+ at: number;
255
+ layer: 'project' | 'machine';
256
+ dir: string;
257
+ files: string[];
258
+ replaced: boolean;
259
+ };
260
+ }
261
+ /** `GET /api/team/skills`. */
262
+ export interface DashTeamSkills {
263
+ /** The catalog by layer: the library, this machine, the project — each with where it is kept. */
264
+ layers: Array<{
265
+ layer: DashSkillLayer;
266
+ title: string;
267
+ dir?: string;
268
+ skills: DashTeamSkill[];
269
+ }>;
270
+ skipped: DashTeamSkillSkipped[];
271
+ roles: DashTeamSkillRole[];
272
+ proposals: DashTeamSkillProposal[];
273
+ /** The drafts not accepted yet, newest first, without their texts. */
274
+ drafts: DashTeamSkillDraft[];
275
+ /** A key can pay for a run. */
276
+ ready: boolean;
277
+ limits: {
278
+ urls: number;
279
+ fileBytes: number;
280
+ files: number;
281
+ runUsd: number;
282
+ };
283
+ /** Role files keep a skill offered by a task's paths (`skillsWhen`): false while this LensMCP's role files have no such field. */
284
+ whenKept: boolean;
285
+ }
286
+ /** `GET /api/team/skills/skill?name=`: one skill whole. */
287
+ export interface DashTeamSkillWhole extends DashTeamSkill {
288
+ /** SKILL.md whole. */
289
+ text: string;
290
+ referenceFiles: Array<{
291
+ file: string;
292
+ text: string;
293
+ }>;
294
+ /** Its pinned sources, when it was written from some. */
295
+ pins?: DashTeamSkillSource[];
296
+ }
297
+ /** `POST /api/team/skills/fetch`. */
298
+ export interface DashTeamSkillFetch {
299
+ urls: string[];
300
+ /** What it should cover. */
301
+ note?: string;
302
+ roles?: string[];
303
+ name?: string;
304
+ layer?: 'project' | 'machine';
305
+ proposalId?: string;
306
+ }
307
+ /** `POST /api/team/skills/accept` → what was written. */
308
+ export interface DashTeamSkillAccepted {
309
+ name: string;
310
+ version: number;
311
+ layer: 'project' | 'machine';
312
+ dir: string;
313
+ written: string[];
314
+ removed: string[];
315
+ replaced: boolean;
316
+ /** The layers it now stands over, by name. */
317
+ over: DashSkillLayer[];
318
+ draft: DashTeamSkillDraft;
319
+ }
320
+ /**
321
+ * `POST /api/team/skills/assign`: a skill to one or more roles — `when` absent or empty: always (the role's `skills:`);
322
+ * with globs: offered when a task's paths match one (the role's `skillsWhen:`).
323
+ */
324
+ export interface DashTeamSkillAssign {
325
+ skill: string;
326
+ roles: Array<{
327
+ id: string;
328
+ when?: string[];
329
+ }>;
330
+ }
331
+ export interface DashTeamSkillAssigned {
332
+ skill: string;
333
+ roles: Array<{
334
+ id: string;
335
+ how: 'always' | 'when';
336
+ /** The role's file holds it now. */
337
+ done: boolean;
338
+ file?: string;
339
+ /** It was so already: nothing was written. */
340
+ same?: boolean;
341
+ paths?: string[];
342
+ /** Why it is not done. */
343
+ problem?: string;
344
+ }>;
345
+ }
346
+ /** `POST /api/team/skills/check`: a skill's pinned sources fetched again — what moved, and the draft of its next version. */
347
+ export interface DashTeamSkillCheck {
348
+ name: string;
349
+ layer: 'project' | 'machine';
350
+ checkedAt: number;
351
+ changed: boolean;
352
+ sources: DashTeamSkillMoved[];
353
+ /** Kept when something moved: generate and accept it like a new skill. */
354
+ draft?: DashTeamSkillDraft;
355
+ }
@@ -0,0 +1 @@
1
+ "use strict";export{};
package/lib/team.d.ts CHANGED
@@ -30,6 +30,30 @@ export interface DashTeamLogLine {
30
30
  kind: 'progress' | 'decision' | 'blocker' | 'handoff' | 'note' | 'state';
31
31
  text: string;
32
32
  }
33
+ /** The person's completion of a task (overseer-70): on the board and in the drawer as «done by the person · not run by QA». */
34
+ export interface DashTeamPersonDone {
35
+ at: number;
36
+ delegate?: string;
37
+ commit: string;
38
+ why: string;
39
+ proof: 'not-run';
40
+ wasCancelled?: string;
41
+ }
42
+ /** A task closed «not run — the person's decision» (overseer-78): the goal's tests or QA run the person decided not to run. Never passed. */
43
+ export interface DashTeamPersonNotRun {
44
+ what: 'tests' | 'qa';
45
+ why: string;
46
+ delegate?: string;
47
+ at: number;
48
+ }
49
+ /** The QA run that found a top-level task (overseer-72): its title, its level (`main`, `release`; none: a goal's), its goal's title. */
50
+ export interface DashTeamFoundBy {
51
+ runId: string;
52
+ runTitle: string;
53
+ level?: string;
54
+ goalId?: string;
55
+ goalTitle?: string;
56
+ }
33
57
  /** How LensMCP landed a goal on main (storage flow.ts GoalIntegration): its strategy, main's new commit, the tip it took. */
34
58
  export interface DashTeamGoalIntegration {
35
59
  strategy: 'squash' | 'merge' | 'ff';
@@ -94,6 +118,12 @@ export interface DashTeamTask {
94
118
  * to (`sha` — a squash or merge commit, or the branch tip for `ff`), the branch tip it took, when (the drawer).
95
119
  */
96
120
  integration?: DashTeamGoalIntegration;
121
+ /** Marked done by the person (issues/closed/overseer-70): the commit, why, who — its proof not run, never a QA pass. */
122
+ personDone?: DashTeamPersonDone;
123
+ /** Closed «not run — the person's decision» (issues/closed/overseer-78): who, why — never passed, never written. */
124
+ notRun?: DashTeamPersonNotRun;
125
+ /** On the board, a top-level task's: the QA run that found it (issues/closed/overseer-72) — the board groups it under that run. */
126
+ foundBy?: DashTeamFoundBy;
97
127
  paths?: string[];
98
128
  tags?: string[];
99
129
  /** A review's items, whole (the drawer): each point it checks and its verdict (planning/team/06-team-operations.md OP-D3). */
@@ -123,6 +153,12 @@ export interface DashTeamTask {
123
153
  wrapUp?: DashTeamWrapUp;
124
154
  /** A task moved to its goal's next list: the item it became (cancelled, never counted against the plan). */
125
155
  movedToNext?: string;
156
+ /** A finished goal's follow-up the person reviewed and left as it is (Suggestions › Follow-ups): when, why, the proposal dismissed. */
157
+ followUpReviewed?: {
158
+ at: number;
159
+ why: string;
160
+ proposal?: string;
161
+ };
126
162
  /** A goal's own capacity, the person's (issues/closed/foodguard-179): its numbers over the repository's flow.json `goal.capacity`. */
127
163
  capacity?: Record<string, number>;
128
164
  /** A goal's launches refused for want of a slot, in line for the next one that frees (foodguard-179 GC-D4). */
@@ -503,7 +539,7 @@ export interface DashTeamTaskWork {
503
539
  * change completed with no commit or no check, a QA pass naming no run, a claim with no line in ten minutes, a holder
504
540
  * whose process ended. Hints, never verdicts.
505
541
  */
506
- export type DashTeamConductKind = 'checker-edited' | 'whole-suite' | 'outside-paths' | 'no-commit' | 'unchecked' | 'qa-unrun' | 'quiet-claim' | 'host-gone' | 'edited-reserved' | 'check-unproved' | 'over-budget';
542
+ export type DashTeamConductKind = 'checker-edited' | 'whole-suite' | 'outside-paths' | 'no-commit' | 'unchecked' | 'qa-unrun' | 'quiet-claim' | 'host-gone' | 'edited-reserved' | 'check-unproved' | 'over-budget' | 'repeated-refusal';
507
543
  export interface DashTeamFlag {
508
544
  kind: DashTeamConductKind;
509
545
  severity: 'info' | 'warn';
@@ -1117,6 +1153,11 @@ export interface DashTeamReviewMetrics {
1117
1153
  flow?: DashTeamReviewFlow;
1118
1154
  work?: DashTeamReviewWork;
1119
1155
  reviews?: DashTeamReviewReviews;
1156
+ /**
1157
+ * Whether the run's agents did what their roles say (planning/team/26 R7) — measured from their transcripts for the
1158
+ * run's export and its archive, never for the page's read of a review: absent there, and from an older server.
1159
+ */
1160
+ roles?: import('./role-fidelity.js').DashRoleFidelity;
1120
1161
  }
1121
1162
  /**
1122
1163
  * The run's lead time — created to closed (to now while open) — in three parts that add up to it, ms. «Its manager»: the
@@ -1147,6 +1188,8 @@ export interface DashTeamReviewWork {
1147
1188
  cancelled: number;
1148
1189
  /** Tasks not closed yet: work in flight while the run is open, or left open under a closed one. */
1149
1190
  open: number;
1191
+ /** Tasks the person marked done by hand (issues/closed/overseer-70): their proof not run, so never kept. */
1192
+ byPerson?: number;
1150
1193
  }
1151
1194
  /** The run's review tasks against what they reviewed. */
1152
1195
  export interface DashTeamReviewReviews {
@@ -1268,6 +1311,48 @@ export type DashTeamLaunchClient = 'codex' | 'claude';
1268
1311
  */
1269
1312
  export declare function modelClient(model: string | undefined): DashTeamLaunchClient | undefined;
1270
1313
  /** An agent a manager launched (`agent_spawn`): what it runs, where, and how it is doing. */
1314
+ /** A launch's skill kit, as its record keeps it (@lensmcp/storage kits.ts KitRecord). */
1315
+ export interface DashTeamLaunchKit {
1316
+ role: string;
1317
+ /** How what is outside the kit was decided: hidden, unmapped (project skills by name only), names, open. */
1318
+ rule: string;
1319
+ why: string;
1320
+ core: Array<{
1321
+ name: string;
1322
+ sha: string;
1323
+ }>;
1324
+ when: Array<{
1325
+ name: string;
1326
+ from: string;
1327
+ sha?: string;
1328
+ goal?: true;
1329
+ }>;
1330
+ kept: string[];
1331
+ plugins: string[];
1332
+ hidden: number;
1333
+ nameOnly: number;
1334
+ /** Named by the role or the goal, and found in no layer. */
1335
+ unknown: string[];
1336
+ /** Core skills that did not fit the role's system prompt whole — how much of each is there. */
1337
+ cut?: Array<{
1338
+ skill: string;
1339
+ chars: number;
1340
+ kept: number;
1341
+ }>;
1342
+ /** What the launch made the client's listing (overseer-84): skills shown whole and by name, plugins off, plugins kept and why. */
1343
+ listing?: {
1344
+ shown: {
1345
+ whole: number;
1346
+ names: number;
1347
+ };
1348
+ pluginsOff: string[];
1349
+ pluginsKept: Array<{
1350
+ plugin: string;
1351
+ why: string;
1352
+ lists: number;
1353
+ }>;
1354
+ };
1355
+ }
1271
1356
  export interface DashTeamLaunch {
1272
1357
  id: string;
1273
1358
  role: string;
@@ -1283,6 +1368,12 @@ export interface DashTeamLaunch {
1283
1368
  branch?: string;
1284
1369
  /** The MCP servers it was launched with (overseer-58). */
1285
1370
  mcp?: string[];
1371
+ /**
1372
+ * The skill kit it was launched with (planning/team/26 R4) — names and hashes, never text: what is always in its
1373
+ * context (`core`), what its claims offer by a task's paths (`when`), the project's and the person's own skills its
1374
+ * role names (`kept`), and how many others were switched off or left by name only. Absent: launched before kits.
1375
+ */
1376
+ kit?: DashTeamLaunchKit;
1286
1377
  /** It runs in a terminal the dashboard attaches to (its socket; Settings › Run agents in terminals) — absent: headless. */
1287
1378
  terminal?: string;
1288
1379
  /** The account it runs under and that account's name — absent: the client's own sign-in. */
@@ -1575,6 +1666,8 @@ export interface DashTeamHealthGoals {
1575
1666
  pooled: DashTeamHealthGoalsPooled;
1576
1667
  /** The four measures in reading order — flow, work, reviews, manager. */
1577
1668
  measures: DashTeamHealthGoalMeasure[];
1669
+ /** The same goals by role (planning/team/26 R7): each role's measures against its targets — absent from an older server. */
1670
+ roles?: import('./role-fidelity.js').DashTeamHealthRoles;
1578
1671
  }
1579
1672
  export interface DashTeamHealthGoal {
1580
1673
  goalId: string;
@@ -1596,6 +1689,7 @@ export interface DashTeamHealthGoal {
1596
1689
  runs: number;
1597
1690
  passed: number;
1598
1691
  failed: number;
1692
+ notRun?: number;
1599
1693
  };
1600
1694
  }
1601
1695
  export interface DashTeamHealthGoalsPooled {
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,n=r((t,e)=>i(t,"name",{value:e,configurable:!0}),"o");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"),n(modelClient,"modelClient");export const DASH_TEAM_SEARCH_QUESTION_MAX=300;
1
+ "use strict";var i=Object.defineProperty;var r=(t,e)=>i(t,"name",{value:e,configurable:!0});var n=Object.defineProperty,o=r((t,e)=>n(t,"name",{value:e,configurable:!0}),"r"),a=Object.defineProperty,c=o((t,e)=>a(t,"name",{value:e,configurable:!0}),"o");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"),o(modelClient,"modelClient"),c(modelClient,"modelClient");export const DASH_TEAM_SEARCH_QUESTION_MAX=300;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/protocol-types",
3
- "version": "1.25.79",
3
+ "version": "1.26.0",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",