@lensmcp/protocol-types 1.25.32 → 1.25.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/team.d.ts ADDED
@@ -0,0 +1,209 @@
1
+ /**
2
+ * The Team page (servers/lensmcp-mcp/src/dashboard/team.ts): the repository's agent team as its coordination store
3
+ * holds it — the agents in their roles, the tasks they take and hand on, each task's work log — and what the person at
4
+ * the machine changes there. The shapes are the store's (libs/storage coordination), cut to what the page shows: a
5
+ * task's whole log comes with the task alone (`/api/team/task`), the board carries its newest lines.
6
+ */
7
+ /**
8
+ * What kind of work a task is: it names the role that takes it. `goal`: what a manager breaks into the others' tasks;
9
+ * `marketing`: telling people about the product (launch posts, release notes, landing and store copy).
10
+ */
11
+ export declare const DASH_TEAM_KINDS: readonly ["goal", "build", "bug", "review", "test", "docs", "marketing", "research", "chore"];
12
+ export type DashTeamKind = (typeof DASH_TEAM_KINDS)[number];
13
+ export type DashTeamTaskState = 'open' | 'claimed' | 'recovery' | 'completed' | 'cancelled';
14
+ export type DashTeamOutcome = 'done' | 'approved' | 'changes-requested' | 'passed' | 'failed' | 'wontfix';
15
+ /** What a task points at in the lens or the repository. */
16
+ export declare const DASH_TEAM_LINK_KINDS: readonly ["task", "flow", "error", "suggestion", "ai-call", "review", "page", "route", "commit", "branch", "worktree", "file"];
17
+ export interface DashTeamLink {
18
+ kind: (typeof DASH_TEAM_LINK_KINDS)[number];
19
+ id: string;
20
+ label?: string;
21
+ }
22
+ /** One line of a task's work log. `by`: a session id, `user` (the person at the machine) or `lensmcp` (the team flow, the store). */
23
+ export interface DashTeamLogLine {
24
+ at: number;
25
+ by: string;
26
+ kind: 'progress' | 'decision' | 'blocker' | 'handoff' | 'note' | 'state';
27
+ text: string;
28
+ }
29
+ export interface DashTeamTask {
30
+ id: string;
31
+ title: string;
32
+ /** Whole on `/api/team/task`; its first lines on the board. */
33
+ description: string;
34
+ kind?: DashTeamKind;
35
+ /** The role that may claim it; none: any agent. */
36
+ role?: string;
37
+ /** 0 (drop everything) … 3 (when there is time). */
38
+ priority: number;
39
+ parentId?: string;
40
+ blockedBy?: string[];
41
+ /** Of `blockedBy`, the tasks not completed or cancelled yet — an open task with any is blocked. */
42
+ blockedOn?: string[];
43
+ links?: DashTeamLink[];
44
+ /** The whole log on `/api/team/task`; its newest lines on the board. */
45
+ log: DashTeamLogLine[];
46
+ /** Every line it ever had, those no longer kept counted. */
47
+ logCount: number;
48
+ state: DashTeamTaskState;
49
+ outcome?: DashTeamOutcome;
50
+ /** The session holding it. */
51
+ owner?: string;
52
+ /** The session that must take it. */
53
+ to?: string;
54
+ /** A session id, `user` — the person's tasks (the Team page, an accepted team design) — or `lensmcp`: the team flow's hand-offs, the operator CLI's. */
55
+ creator: string;
56
+ origin: 'agent' | 'lensmcp';
57
+ worktreeId?: string;
58
+ ownerWorktreeId?: string;
59
+ createdAt: number;
60
+ updatedAt: number;
61
+ leaseUntil?: number;
62
+ checkpoint?: string;
63
+ /** What its owner said changed and how to check it, on completion (cut on the board). */
64
+ result?: string;
65
+ evidence?: string[];
66
+ completedHead?: string | null;
67
+ paths?: string[];
68
+ tags?: string[];
69
+ }
70
+ /** A task named in another's chain: its parent, its children, a blocker. */
71
+ export interface DashTeamTaskRef {
72
+ id: string;
73
+ title: string;
74
+ kind?: DashTeamKind;
75
+ role?: string;
76
+ state: DashTeamTaskState;
77
+ outcome?: DashTeamOutcome;
78
+ owner?: string;
79
+ }
80
+ /** A task under another, and the tasks under it — the hand-off chain is a child of the task it came from. */
81
+ export interface DashTeamTreeNode extends DashTeamTaskRef {
82
+ children: DashTeamTreeNode[];
83
+ }
84
+ /** One coordination session: an agent on the team (a role), or one outside it (no role). */
85
+ export interface DashTeamSession {
86
+ id: string;
87
+ client: string;
88
+ name?: string;
89
+ role?: string;
90
+ /** Who it reports to: `user`, or a session id. */
91
+ manager?: string;
92
+ /** Waiting for work (agent_wait). */
93
+ listening?: boolean;
94
+ objective?: string;
95
+ step?: string;
96
+ /** `stale`: active, but not heard from within its lease. */
97
+ presence: 'active' | 'stale' | 'closed';
98
+ worktreeId: string;
99
+ createdAt: number;
100
+ lastSeenAt: number;
101
+ expiresAt: number;
102
+ }
103
+ /** A checkout of the repository, as an agent's lens last saw it. */
104
+ export interface DashTeamWorktree {
105
+ id: string;
106
+ root: string;
107
+ branch: string | null;
108
+ head: string | null;
109
+ observedAt: number;
110
+ /** Files changed in it, then. */
111
+ changed: number;
112
+ truncated: boolean;
113
+ error?: string;
114
+ }
115
+ /** One role: its active agents (and how many wait for work), its tasks by state. */
116
+ export interface DashTeamRole {
117
+ role: string;
118
+ title: string;
119
+ /** One line: what the role is for. */
120
+ summary: string;
121
+ /** The kinds of task it takes — a task of one goes to it unless the task names another role. */
122
+ takes: DashTeamKind[];
123
+ agents: number;
124
+ listening: number;
125
+ /** The most agents it takes at once (its role file's `agents`): agent_join refuses one more. None: no limit. */
126
+ cap?: number;
127
+ /** Claimable now (blocked ones not counted). */
128
+ open: number;
129
+ claimed: number;
130
+ blocked: number;
131
+ recovery: number;
132
+ }
133
+ /** A message to everyone, or a note — the board's newest. */
134
+ export interface DashTeamNote {
135
+ id: string;
136
+ seq: number;
137
+ sender: string;
138
+ origin: 'agent' | 'lensmcp';
139
+ to?: string;
140
+ kind: 'message' | 'note';
141
+ body: string;
142
+ createdAt: number;
143
+ }
144
+ /** `GET /api/team/board` — `{ same: true, rev }` when `?rev=` is still current. */
145
+ export interface DashTeamBoard {
146
+ repoId: string;
147
+ /** The checkout this dashboard serves. */
148
+ currentWorktreeId: string;
149
+ /** Changes when anything on the board does: a task, a session, an agent going quiet. */
150
+ rev: string;
151
+ /** The store's event sequence. */
152
+ revision: number;
153
+ observedAt: number;
154
+ sessions: DashTeamSession[];
155
+ worktrees: DashTeamWorktree[];
156
+ /** Live tasks first, then finished ones, newest first. */
157
+ tasks: DashTeamTask[];
158
+ notes: DashTeamNote[];
159
+ roles: DashTeamRole[];
160
+ /** More sessions or tasks than the board carries. */
161
+ truncated: boolean;
162
+ }
163
+ export type DashTeamBoardAnswer = DashTeamBoard | {
164
+ same: true;
165
+ rev: string;
166
+ };
167
+ /** `GET /api/team/task?id=` — the task whole, the chain above it (root first), the tasks under it, its blockers. */
168
+ export interface DashTeamTaskWhole {
169
+ task: DashTeamTask;
170
+ ancestors: DashTeamTaskRef[];
171
+ tree: DashTeamTreeNode[];
172
+ /** More tasks under it than the answer carries. */
173
+ treeTruncated?: boolean;
174
+ blockers: DashTeamTaskRef[];
175
+ }
176
+ /** `POST /api/team/task` — a task from the person at the machine. `requestId`: one per submit; a retry sends it again. */
177
+ export interface DashTeamNewTask {
178
+ requestId: string;
179
+ title: string;
180
+ description: string;
181
+ kind?: DashTeamKind;
182
+ role?: string;
183
+ priority?: number;
184
+ parentId?: string;
185
+ to?: string;
186
+ blockedBy?: string[];
187
+ links?: DashTeamLink[];
188
+ }
189
+ /** `POST /api/team/task/operate` — the person changes a task; each change is a line in its log, by `user`. */
190
+ export interface DashTeamOperate {
191
+ requestId: string;
192
+ taskId: string;
193
+ priority?: number;
194
+ /** A session id, or null: anyone in its role. */
195
+ to?: string | null;
196
+ role?: string;
197
+ /** Take a held (or abandoned) task back, with why. */
198
+ release?: string;
199
+ /** Cancel it, with why. */
200
+ cancel?: string;
201
+ note?: string;
202
+ }
203
+ /** `POST /api/team/message` — to one agent, or to everyone (no `to`). */
204
+ export interface DashTeamMessage {
205
+ requestId: string;
206
+ body: string;
207
+ kind: 'message' | 'note';
208
+ to?: string;
209
+ }
package/lib/team.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";export const DASH_TEAM_KINDS=["goal","build","bug","review","test","docs","marketing","research","chore"],DASH_TEAM_LINK_KINDS=["task","flow","error","suggestion","ai-call","review","page","route","commit","branch","worktree","file"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/protocol-types",
3
- "version": "1.25.32",
3
+ "version": "1.25.34",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",