@lensmcp/protocol-types 1.26.32 → 1.26.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/index.d.ts +3 -0
- package/index.js +1 -1
- package/lib/delivery-status.d.ts +197 -0
- package/lib/delivery-status.js +1 -0
- package/lib/goal-number.d.ts +20 -0
- package/lib/goal-number.js +1 -0
- package/lib/peers.d.ts +2 -2
- package/lib/pull-requests.d.ts +161 -0
- package/lib/pull-requests.js +1 -0
- package/lib/team-roadmap.d.ts +2 -0
- package/lib/team.d.ts +64 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -69,6 +69,9 @@ export * from './lib/role-fidelity.js';
|
|
|
69
69
|
export * from './lib/goal-retro.js';
|
|
70
70
|
export * from './lib/follow-ups.js';
|
|
71
71
|
export * from './lib/changes.js';
|
|
72
|
+
export * from './lib/pull-requests.js';
|
|
73
|
+
export * from './lib/goal-number.js';
|
|
74
|
+
export * from './lib/delivery-status.js';
|
|
72
75
|
export * from './lib/main-mirror.js';
|
|
73
76
|
export * from './lib/team-design.js';
|
|
74
77
|
export * from './lib/team-library.js';
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export*from"./lib/schema-version.js";export*from"./lib/source-location.js";export*from"./lib/context.js";export*from"./lib/event.js";export*from"./lib/node.js";export*from"./lib/edge.js";export*from"./lib/attributes.js";export*from"./lib/producer-health.js";export*from"./lib/resources.js";export*from"./lib/tokens.js";export*from"./lib/capture-demand.js";export*from"./lib/bounded-clone.js";export*from"./lib/bounded-map.js";export*from"./lib/flood-guard.js";export*from"./lib/dashboard.js";export*from"./lib/dashboard-path.js";export*from"./lib/lens-hosts.js";export*from"./lib/dashboard-lint.js";export*from"./lib/dashboard-typecheck.js";export*from"./lib/lint-coverage.js";export*from"./lib/lint-ignores.js";export*from"./lib/static-checks.js";export*from"./lib/log-query.js";export*from"./lib/error-dismissal.js";export*from"./lib/expected-failure.js";export*from"./lib/error-verdict.js";export*from"./lib/finding-proof.js";export*from"./lib/error-cause.js";export*from"./lib/metrics-reset.js";export*from"./lib/ai-content.js";export*from"./lib/http-exchange.js";export*from"./lib/ai-call.js";export*from"./lib/ai-call-row.js";export*from"./lib/ai-call-groups.js";export*from"./lib/ai-context.js";export*from"./lib/ai-cache-facts.js";export*from"./lib/ai-cache.js";export*from"./lib/ai-cache-verdict.js";export*from"./lib/ai-together.js";export*from"./lib/ai-origins.js";export*from"./lib/ai-playground.js";export*from"./lib/ai-compare.js";export*from"./lib/pod-memory.js";export*from"./lib/perf-rules.js";export*from"./lib/sources.js";export*from"./lib/page-visit.js";export*from"./lib/replay.js";export*from"./lib/event-loop.js";export*from"./lib/workspace-actions.js";export*from"./lib/docker-jobs.js";export*from"./lib/docker-report.js";export*from"./lib/docker-runs.js";export*from"./lib/docker-errors.js";export*from"./lib/peers.js";export*from"./lib/hosts.js";export*from"./lib/cluster-hosts.js";export*from"./lib/dashboard-updates.js";export*from"./lib/accounts.js";export*from"./lib/account-drain.js";export*from"./lib/host-agents.js";export*from"./lib/remote-instances.js";export*from"./lib/team.js";export*from"./lib/sessions.js";export*from"./lib/conversations.js";export*from"./lib/backlog.js";export*from"./lib/team-review-changes.js";export*from"./lib/goal-outcome.js";export*from"./lib/role-fidelity.js";export*from"./lib/goal-retro.js";export*from"./lib/follow-ups.js";export*from"./lib/changes.js";export*from"./lib/main-mirror.js";export*from"./lib/team-design.js";export*from"./lib/team-library.js";export*from"./lib/team-skills.js";export*from"./lib/system-report.js";export*from"./lib/overseer-findings.js";export*from"./lib/overseer-rounds.js";export*from"./lib/goal-design.js";export*from"./lib/overseer-messages.js";export*from"./lib/team-roadmap.js";export*from"./lib/team-prompts.js";export{PROOF_ACTIONS,NOT_RUN_KINDS}from"./lib/team-delivery.js";export*from"./lib/canvas.js";export*from"./lib/canvas-catalog.js";export*from"./lib/canvas-frame-policy.js";export*from"./lib/canvas-attachments.js";export*from"./lib/canvas-editing.js";export*from"./lib/canvas-chat.js";export*from"./lib/canvas-hub.js";
|
|
1
|
+
"use strict";export*from"./lib/schema-version.js";export*from"./lib/source-location.js";export*from"./lib/context.js";export*from"./lib/event.js";export*from"./lib/node.js";export*from"./lib/edge.js";export*from"./lib/attributes.js";export*from"./lib/producer-health.js";export*from"./lib/resources.js";export*from"./lib/tokens.js";export*from"./lib/capture-demand.js";export*from"./lib/bounded-clone.js";export*from"./lib/bounded-map.js";export*from"./lib/flood-guard.js";export*from"./lib/dashboard.js";export*from"./lib/dashboard-path.js";export*from"./lib/lens-hosts.js";export*from"./lib/dashboard-lint.js";export*from"./lib/dashboard-typecheck.js";export*from"./lib/lint-coverage.js";export*from"./lib/lint-ignores.js";export*from"./lib/static-checks.js";export*from"./lib/log-query.js";export*from"./lib/error-dismissal.js";export*from"./lib/expected-failure.js";export*from"./lib/error-verdict.js";export*from"./lib/finding-proof.js";export*from"./lib/error-cause.js";export*from"./lib/metrics-reset.js";export*from"./lib/ai-content.js";export*from"./lib/http-exchange.js";export*from"./lib/ai-call.js";export*from"./lib/ai-call-row.js";export*from"./lib/ai-call-groups.js";export*from"./lib/ai-context.js";export*from"./lib/ai-cache-facts.js";export*from"./lib/ai-cache.js";export*from"./lib/ai-cache-verdict.js";export*from"./lib/ai-together.js";export*from"./lib/ai-origins.js";export*from"./lib/ai-playground.js";export*from"./lib/ai-compare.js";export*from"./lib/pod-memory.js";export*from"./lib/perf-rules.js";export*from"./lib/sources.js";export*from"./lib/page-visit.js";export*from"./lib/replay.js";export*from"./lib/event-loop.js";export*from"./lib/workspace-actions.js";export*from"./lib/docker-jobs.js";export*from"./lib/docker-report.js";export*from"./lib/docker-runs.js";export*from"./lib/docker-errors.js";export*from"./lib/peers.js";export*from"./lib/hosts.js";export*from"./lib/cluster-hosts.js";export*from"./lib/dashboard-updates.js";export*from"./lib/accounts.js";export*from"./lib/account-drain.js";export*from"./lib/host-agents.js";export*from"./lib/remote-instances.js";export*from"./lib/team.js";export*from"./lib/sessions.js";export*from"./lib/conversations.js";export*from"./lib/backlog.js";export*from"./lib/team-review-changes.js";export*from"./lib/goal-outcome.js";export*from"./lib/role-fidelity.js";export*from"./lib/goal-retro.js";export*from"./lib/follow-ups.js";export*from"./lib/changes.js";export*from"./lib/pull-requests.js";export*from"./lib/goal-number.js";export*from"./lib/delivery-status.js";export*from"./lib/main-mirror.js";export*from"./lib/team-design.js";export*from"./lib/team-library.js";export*from"./lib/team-skills.js";export*from"./lib/system-report.js";export*from"./lib/overseer-findings.js";export*from"./lib/overseer-rounds.js";export*from"./lib/goal-design.js";export*from"./lib/overseer-messages.js";export*from"./lib/team-roadmap.js";export*from"./lib/team-prompts.js";export{PROOF_ACTIONS,NOT_RUN_KINDS}from"./lib/team-delivery.js";export*from"./lib/canvas.js";export*from"./lib/canvas-catalog.js";export*from"./lib/canvas-frame-policy.js";export*from"./lib/canvas-attachments.js";export*from"./lib/canvas-editing.js";export*from"./lib/canvas-chat.js";export*from"./lib/canvas-hub.js";
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import type { DashPrProblemKind } from './pull-requests.js';
|
|
2
|
+
/**
|
|
3
|
+
* Delivery › Status (issues/closed/foodguard-312): the repository's whole delivery at a glance. The owner, 2026-11-25:
|
|
4
|
+
* «along with prs page we need understand how we can display the full status of the system, how much prs, what is need
|
|
5
|
+
* to merge, what which changes still not in local main, i need to update and pull main».
|
|
6
|
+
*
|
|
7
|
+
* One read model (servers/lensmcp-mcp delivery/status.ts `deliveryStatus`), assembled from git, `gh` and the team's
|
|
8
|
+
* store, read-only and cached — `GET /api/team/delivery`.
|
|
9
|
+
*/
|
|
10
|
+
/** One line of «What needs you»: how many, what, and what to do. */
|
|
11
|
+
export interface DashDeliveryNeed {
|
|
12
|
+
key: 'main-behind' | 'main-diverged' | 'main-ahead' | 'main-ci' | 'prs-blocked' | 'prs-ready' | 'retarget' | 'goals-asking' | 'goals-ready' | 'goals-landed' | 'uncommitted' | 'goals-working' | 'goal-prs-closed' | 'goal-prs-failed';
|
|
13
|
+
tone: 'bad' | 'warn' | 'info';
|
|
14
|
+
count: number;
|
|
15
|
+
text: string;
|
|
16
|
+
/** A few names behind the count: the pull requests, the goals. */
|
|
17
|
+
detail?: string;
|
|
18
|
+
/** What to do: a command to run in the main checkout, or a page to open. */
|
|
19
|
+
action: {
|
|
20
|
+
label: string;
|
|
21
|
+
command?: string;
|
|
22
|
+
page?: 'prs' | 'main' | 'changes' | 'inbox' | 'team' | 'pipeline';
|
|
23
|
+
goalId?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export type DashDeliveryLaneId = 'progress' | 'ready' | 'local' | 'pr' | 'merged';
|
|
27
|
+
/** One goal on the pipeline. */
|
|
28
|
+
export interface DashDeliveryChip {
|
|
29
|
+
id: string;
|
|
30
|
+
/** Its number, shown G-44 (issues/closed/foodguard-314). */
|
|
31
|
+
number?: number;
|
|
32
|
+
title: string;
|
|
33
|
+
state: string;
|
|
34
|
+
/** Why it waits, in a few words: «QA runs», «asks you», «ready to land»… */
|
|
35
|
+
why?: string;
|
|
36
|
+
tone?: 'bad' | 'warn' | 'ok';
|
|
37
|
+
/** Its pull request. */
|
|
38
|
+
pr?: {
|
|
39
|
+
number: number;
|
|
40
|
+
state: 'open' | 'draft' | 'merged' | 'closed';
|
|
41
|
+
ready: boolean;
|
|
42
|
+
};
|
|
43
|
+
/** When it last moved: finished, landed, or its newest work. */
|
|
44
|
+
at?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface DashDeliveryLane {
|
|
47
|
+
id: DashDeliveryLaneId;
|
|
48
|
+
label: string;
|
|
49
|
+
count: number;
|
|
50
|
+
/** The first ones, most pressing first; the rest counted in `more`. */
|
|
51
|
+
goals: DashDeliveryChip[];
|
|
52
|
+
more: number;
|
|
53
|
+
}
|
|
54
|
+
export interface DashDeliveryCommit {
|
|
55
|
+
sha: string;
|
|
56
|
+
subject: string;
|
|
57
|
+
at: number;
|
|
58
|
+
/** The goal its message names (`Goal: <id>`). */
|
|
59
|
+
goalId?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface DashDeliveryCiRun {
|
|
62
|
+
workflow: string;
|
|
63
|
+
title: string;
|
|
64
|
+
status: 'queued' | 'running' | 'success' | 'failure' | 'cancelled' | 'skipped' | 'other';
|
|
65
|
+
sha: string;
|
|
66
|
+
at: number;
|
|
67
|
+
url?: string;
|
|
68
|
+
/** It ran on origin/main's newest commit. */
|
|
69
|
+
atHead: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** A LensMCP fetch of origin's main: the person's «Fetch now», or the page's own every five minutes. */
|
|
72
|
+
export interface DashDeliveryFetch {
|
|
73
|
+
/** «Fetch now» may run now — at most once a minute. */
|
|
74
|
+
canNow: boolean;
|
|
75
|
+
nextAt?: number;
|
|
76
|
+
/** The page may fetch by itself (every five minutes while it is open), and why it may or may not. */
|
|
77
|
+
auto: boolean;
|
|
78
|
+
autoWhy: string;
|
|
79
|
+
/** The page's own fetch is due now. */
|
|
80
|
+
autoDue: boolean;
|
|
81
|
+
/** LensMCP's last fetch here. */
|
|
82
|
+
last?: {
|
|
83
|
+
at: number;
|
|
84
|
+
ok: boolean;
|
|
85
|
+
tookMs: number;
|
|
86
|
+
error?: string;
|
|
87
|
+
auto: boolean;
|
|
88
|
+
};
|
|
89
|
+
/** The exact command a fetch runs. */
|
|
90
|
+
command: string;
|
|
91
|
+
}
|
|
92
|
+
export interface DashDeliveryMain {
|
|
93
|
+
root: string;
|
|
94
|
+
branch: string;
|
|
95
|
+
head?: string;
|
|
96
|
+
/** Its remote branch (`origin/main`) — absent: it tracks none. */
|
|
97
|
+
upstream?: string;
|
|
98
|
+
upstreamHead?: string;
|
|
99
|
+
/** Commits of local main origin lacks, and of origin's main that local main lacks. */
|
|
100
|
+
ahead: number;
|
|
101
|
+
behind: number;
|
|
102
|
+
aheadCommits: DashDeliveryCommit[];
|
|
103
|
+
behindCommits: DashDeliveryCommit[];
|
|
104
|
+
/** When the repository last fetched (its FETCH_HEAD), by anyone. */
|
|
105
|
+
fetchedAt?: number;
|
|
106
|
+
/** The commands, in the main checkout: what brings it up to date, what sends its commits. */
|
|
107
|
+
pull?: string;
|
|
108
|
+
push?: string;
|
|
109
|
+
/** The newest CI runs of origin's main (one per workflow). */
|
|
110
|
+
ci: DashDeliveryCiRun[];
|
|
111
|
+
/** Uncommitted files in the main checkout — absent: not read. */
|
|
112
|
+
uncommitted?: {
|
|
113
|
+
files: number;
|
|
114
|
+
paths: string[];
|
|
115
|
+
};
|
|
116
|
+
fetch: DashDeliveryFetch;
|
|
117
|
+
}
|
|
118
|
+
/** A goal's or package's branch with work main does not hold (the overseer's census, foodguard-307). */
|
|
119
|
+
export interface DashDeliveryBranch {
|
|
120
|
+
name: string;
|
|
121
|
+
/** The census's class: `unique` — its work is on no main yet — or not classified yet. */
|
|
122
|
+
class?: string;
|
|
123
|
+
why?: string;
|
|
124
|
+
/** Commits it has that main lacks, and main has that it lacks. */
|
|
125
|
+
ahead?: number;
|
|
126
|
+
behind?: number;
|
|
127
|
+
owner: {
|
|
128
|
+
kind: 'goal' | 'package' | 'lens-worktree' | 'other';
|
|
129
|
+
goalId?: string;
|
|
130
|
+
number?: number;
|
|
131
|
+
title?: string;
|
|
132
|
+
state?: string;
|
|
133
|
+
};
|
|
134
|
+
worktree?: string;
|
|
135
|
+
movedAt?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface DashDeliveryWorktree {
|
|
138
|
+
path: string;
|
|
139
|
+
branch?: string;
|
|
140
|
+
changes: number;
|
|
141
|
+
changed: string[];
|
|
142
|
+
/** When its state was read (the census reads each again after six hours, or when its HEAD moved). */
|
|
143
|
+
readAt?: number;
|
|
144
|
+
owner?: {
|
|
145
|
+
goalId: string;
|
|
146
|
+
number?: number;
|
|
147
|
+
title: string;
|
|
148
|
+
state: string;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export interface DashDeliveryStatus {
|
|
152
|
+
at: number;
|
|
153
|
+
/** «What needs you», most urgent first — none: nothing does. */
|
|
154
|
+
needs: DashDeliveryNeed[];
|
|
155
|
+
/** In progress → ready to land → on local main → in a pull request → merged on origin. */
|
|
156
|
+
lanes: DashDeliveryLane[];
|
|
157
|
+
main: DashDeliveryMain;
|
|
158
|
+
notOnMain: {
|
|
159
|
+
branches: DashDeliveryBranch[];
|
|
160
|
+
worktrees: DashDeliveryWorktree[];
|
|
161
|
+
/** When the census was taken; absent: none yet. */
|
|
162
|
+
censusAt?: number;
|
|
163
|
+
/** Branches still not classified by the census. */
|
|
164
|
+
unclassified: number;
|
|
165
|
+
more: number;
|
|
166
|
+
problem?: string;
|
|
167
|
+
};
|
|
168
|
+
prs: {
|
|
169
|
+
open: number;
|
|
170
|
+
draft: number;
|
|
171
|
+
ready: number;
|
|
172
|
+
blocked: number;
|
|
173
|
+
stacks: number;
|
|
174
|
+
at?: number;
|
|
175
|
+
problem?: {
|
|
176
|
+
kind: DashPrProblemKind;
|
|
177
|
+
text: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
/** `flow.json` `delivery.pullRequests`: whether the team writes on GitHub (the person's `lensmcp agent pr` always may). */
|
|
181
|
+
settings: {
|
|
182
|
+
pullRequests: 'on' | 'off';
|
|
183
|
+
warning?: string;
|
|
184
|
+
};
|
|
185
|
+
/** What could not be read, in words. */
|
|
186
|
+
problems: string[];
|
|
187
|
+
}
|
|
188
|
+
/** `POST /api/team/delivery/fetch`: the person's «Fetch now», or `auto` — the page's own, every five minutes. */
|
|
189
|
+
export interface DashDeliveryFetchRequest {
|
|
190
|
+
auto?: boolean;
|
|
191
|
+
}
|
|
192
|
+
export interface DashDeliveryFetchAnswer {
|
|
193
|
+
ok: boolean;
|
|
194
|
+
tookMs: number;
|
|
195
|
+
error?: string;
|
|
196
|
+
status: DashDeliveryStatus;
|
|
197
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A goal's number (issues/closed/foodguard-314): every goal of a repository's team holds a positive whole number,
|
|
3
|
+
* unique in its coordination store and never given again, said `G-44`. The owner, 2026-11-25: «i also want to have a
|
|
4
|
+
* specific identifier for goals not just the uuid, i want something like G-{X} that like G-44 is specific goal».
|
|
5
|
+
*
|
|
6
|
+
* `G-44`, `G44` and `g-44` name the same goal wherever a goal or task is named by id: the agents' tools, the CLI, the
|
|
7
|
+
* dashboard's URLs and its search. A number a goal held before, that no goal holds now, still names it.
|
|
8
|
+
*/
|
|
9
|
+
/** The most a goal's number is: nine digits. */
|
|
10
|
+
export declare const GOAL_NUMBER_MAX = 999999999;
|
|
11
|
+
/** The number a reference names (`G-44` → 44), or undefined: it is no goal number (a uuid, a prefix, a word). */
|
|
12
|
+
export declare function parseGoalNumber(ref: unknown): number | undefined;
|
|
13
|
+
/** Whether a reference is a goal number (`G-44`), not an id. */
|
|
14
|
+
export declare function isGoalNumberRef(ref: unknown): boolean;
|
|
15
|
+
/** A goal's number as it is shown and said: `G-44`. */
|
|
16
|
+
export declare function formatGoalNumber(n: number): string;
|
|
17
|
+
/** A goal's number when it has one (`G-44`), else undefined — for an answer's `number` beside the goal's id. */
|
|
18
|
+
export declare function goalNumberOf(goal: {
|
|
19
|
+
number?: number | undefined;
|
|
20
|
+
} | undefined): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var o=(e,r)=>u(e,"name",{value:r,configurable:!0});var a=Object.defineProperty,n=o((e,r)=>a(e,"name",{value:r,configurable:!0}),"r");export const GOAL_NUMBER_MAX=999999999;const f=/^\s*g-?0*(\d{1,9})\s*$/i;export function parseGoalNumber(e){if(typeof e!="string")return;const r=f.exec(e);if(!r)return;const t=Number(r[1]);return Number.isSafeInteger(t)&&t>0&&t<=999999999?t:void 0}o(parseGoalNumber,"parseGoalNumber"),n(parseGoalNumber,"parseGoalNumber");export function isGoalNumberRef(e){return parseGoalNumber(e)!==void 0}o(isGoalNumberRef,"isGoalNumberRef"),n(isGoalNumberRef,"isGoalNumberRef");export function formatGoalNumber(e){return`G-${e}`}o(formatGoalNumber,"formatGoalNumber"),n(formatGoalNumber,"formatGoalNumber");export function goalNumberOf(e){const r=e?.number;return typeof r=="number"&&Number.isSafeInteger(r)&&r>0?formatGoalNumber(r):void 0}o(goalNumberOf,"goalNumberOf"),n(goalNumberOf,"goalNumberOf");
|
package/lib/peers.d.ts
CHANGED
|
@@ -1274,9 +1274,9 @@ export declare const MAIN_MIRROR_SCHEMAS: {
|
|
|
1274
1274
|
outcome: z.ZodEnum<{
|
|
1275
1275
|
waiting: "waiting";
|
|
1276
1276
|
refused: "refused";
|
|
1277
|
+
merged: "merged";
|
|
1277
1278
|
current: "current";
|
|
1278
1279
|
"fast-forward": "fast-forward";
|
|
1279
|
-
merged: "merged";
|
|
1280
1280
|
conflicts: "conflicts";
|
|
1281
1281
|
}>;
|
|
1282
1282
|
at: z.ZodNumber;
|
|
@@ -2005,9 +2005,9 @@ export declare const GOAL_PEER_ANSWER_SCHEMAS: {
|
|
|
2005
2005
|
readonly 'goal.update': z.ZodObject<{
|
|
2006
2006
|
outcome: z.ZodEnum<{
|
|
2007
2007
|
refused: "refused";
|
|
2008
|
+
merged: "merged";
|
|
2008
2009
|
current: "current";
|
|
2009
2010
|
asked: "asked";
|
|
2010
|
-
merged: "merged";
|
|
2011
2011
|
conflicts: "conflicts";
|
|
2012
2012
|
}>;
|
|
2013
2013
|
why: z.ZodString;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pull requests and the goals they carry (issues/closed/foodguard-312). The owner, 2026-11-25: «i would like to see the
|
|
3
|
+
* prs also … how it's related to goals so each goal when open pr will add specific tag or something that we can verify
|
|
4
|
+
* that it's connected to specific goal».
|
|
5
|
+
*
|
|
6
|
+
* A pull request names a goal four ways, each a {@link PrProof}:
|
|
7
|
+
*
|
|
8
|
+
* label `goal:<the goal id's first 8 characters>` — what `lensmcp agent pr` and the page's «Tag» add
|
|
9
|
+
* body `<!-- lensmcp-goal: <uuid> -->`, and the visible line `LensMCP goal: <title> (<uuid>)`
|
|
10
|
+
* commit one of its commits is the goal's — its message body says `Goal: <uuid>` (LensMCP's squash or merge commit,
|
|
11
|
+
* apps/agent goal-merge.ts), or it is the goal's landed commit or branch tip
|
|
12
|
+
* branch its head branch is the goal's own (`lensmcp/g-…`) or the one `lensmcp agent pr` pushed (`lensmcp/pr/…`)
|
|
13
|
+
*
|
|
14
|
+
* A label or a body says what someone wrote. A goal is **verified** on a pull request only when the goal's landed
|
|
15
|
+
* commit or its branch tip is among the pull request's commits — the code the goal made is the code under review.
|
|
16
|
+
*/
|
|
17
|
+
export type PrProof = 'label' | 'body' | 'commit' | 'branch';
|
|
18
|
+
/** The proofs in the order the page says them: «label · body · commit · branch». */
|
|
19
|
+
export declare const PR_PROOFS: readonly PrProof[];
|
|
20
|
+
/** GitHub's three states, a draft apart from an open one. */
|
|
21
|
+
export type PrState = 'open' | 'draft' | 'merged' | 'closed';
|
|
22
|
+
/** Its checks as one word: any failing, else any still running, else any passed — `none` when there are none. */
|
|
23
|
+
export type PrChecksState = 'failing' | 'pending' | 'passing' | 'none';
|
|
24
|
+
export interface DashPrChecks {
|
|
25
|
+
state: PrChecksState;
|
|
26
|
+
passed: number;
|
|
27
|
+
failed: number;
|
|
28
|
+
pending: number;
|
|
29
|
+
/** Skipped and neutral: neither passed nor failed. */
|
|
30
|
+
skipped: number;
|
|
31
|
+
total: number;
|
|
32
|
+
/** The names of the failing ones, at most five. */
|
|
33
|
+
failing?: string[];
|
|
34
|
+
}
|
|
35
|
+
/** One goal a pull request carries, with how it is proven. */
|
|
36
|
+
export interface DashPrGoal {
|
|
37
|
+
/**
|
|
38
|
+
* The goal's id: whole when this repository's team knows it, or a body or commit names it whole; the label's eight
|
|
39
|
+
* characters when only a label names a goal the team does not know.
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
/** Its number, shown G-44, when the team knows it (issues/closed/foodguard-314). */
|
|
43
|
+
number?: number;
|
|
44
|
+
/** Its title and state, when the team knows it. */
|
|
45
|
+
title?: string;
|
|
46
|
+
state?: string;
|
|
47
|
+
/** This repository's team holds the goal. */
|
|
48
|
+
known: boolean;
|
|
49
|
+
/** How the pull request names it, in {@link PR_PROOFS} order. */
|
|
50
|
+
proofs: PrProof[];
|
|
51
|
+
/** The goal's landed commit or its branch tip is among the pull request's commits. */
|
|
52
|
+
verified: boolean;
|
|
53
|
+
/** Which commit proved it: the goal's landed commit (squash, merge or fast-forward), or a tip of its branch. */
|
|
54
|
+
verifiedBy?: {
|
|
55
|
+
sha: string;
|
|
56
|
+
what: 'landed' | 'tip';
|
|
57
|
+
};
|
|
58
|
+
/** Labelled and marked in its body — what `lensmcp agent pr` and «Tag» leave. */
|
|
59
|
+
tagged: boolean;
|
|
60
|
+
/** «Tag» adds the label and the marker: a goal the team knows, linked by a commit or its branch, not tagged yet. */
|
|
61
|
+
taggable: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface DashPullRequest {
|
|
64
|
+
number: number;
|
|
65
|
+
title: string;
|
|
66
|
+
url: string;
|
|
67
|
+
state: PrState;
|
|
68
|
+
/** Its head and base branches. */
|
|
69
|
+
head: string;
|
|
70
|
+
base: string;
|
|
71
|
+
/** Who opened it (GitHub login). */
|
|
72
|
+
author?: string;
|
|
73
|
+
createdAt: number;
|
|
74
|
+
mergedAt?: number;
|
|
75
|
+
checks: DashPrChecks;
|
|
76
|
+
labels: string[];
|
|
77
|
+
/** How many commits were read — GitHub's list holds a pull request's first {@link PR_COMMITS_READ}. */
|
|
78
|
+
commits: number;
|
|
79
|
+
/** It may hold more commits than were read: a goal's commit past them is not seen. */
|
|
80
|
+
commitsCut?: true;
|
|
81
|
+
/** The goals it carries — none: «no goal». */
|
|
82
|
+
goals: DashPrGoal[];
|
|
83
|
+
/** GitHub's word on whether it merges cleanly into its base. */
|
|
84
|
+
mergeable?: 'mergeable' | 'conflicting' | 'unknown';
|
|
85
|
+
/** GitHub's merge state, lower-case: `clean`, `unstable` (a check failing), `blocked`, `behind`, `dirty`, `draft`… */
|
|
86
|
+
mergeState?: string;
|
|
87
|
+
/** Its reviews: approved, changes asked for, or a review required and not given. Absent: none asked for. */
|
|
88
|
+
review?: 'approved' | 'changes-requested' | 'required';
|
|
89
|
+
/** Open, not a draft, its checks passed, merging cleanly, approved where a review is required. */
|
|
90
|
+
ready: boolean;
|
|
91
|
+
/** Why an open one is not ready, most pressing first: failing checks named, conflicts, behind its base, draft, reviews. */
|
|
92
|
+
blocked?: string[];
|
|
93
|
+
/** The pull request whose head is its base: it merges after that one (a stack). */
|
|
94
|
+
stackedOn?: number;
|
|
95
|
+
/** Its base was a pull request's head that has merged: retarget it to main. */
|
|
96
|
+
retarget?: string;
|
|
97
|
+
}
|
|
98
|
+
/** Pull requests stacked on one another, in merge order: the first merges into main, each next one into the one before. */
|
|
99
|
+
export interface DashPrStack {
|
|
100
|
+
/** Its first pull request's number, as text. */
|
|
101
|
+
id: string;
|
|
102
|
+
numbers: number[];
|
|
103
|
+
/** Every one of them ready: the stack counts once among «ready to merge». */
|
|
104
|
+
ready: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** Why the pull requests could not be read: no `gh`, `gh` not signed in, no GitHub remote, anything else. */
|
|
107
|
+
export type DashPrProblemKind = 'no-gh' | 'signed-out' | 'no-remote' | 'error';
|
|
108
|
+
export interface DashPullRequestsAnswer {
|
|
109
|
+
/** When GitHub was read — at most once a minute per repository. */
|
|
110
|
+
at: number;
|
|
111
|
+
/** The next read of GitHub, no sooner. */
|
|
112
|
+
nextAt: number;
|
|
113
|
+
/** `owner/name`, from the pull requests' addresses. */
|
|
114
|
+
repo?: string;
|
|
115
|
+
/** Open ones first, then the newest. */
|
|
116
|
+
prs: DashPullRequest[];
|
|
117
|
+
/** The open pull requests stacked on one another (two or more), in merge order. */
|
|
118
|
+
stacks: DashPrStack[];
|
|
119
|
+
/** The newest this many were read. */
|
|
120
|
+
limit: number;
|
|
121
|
+
/** The last read failed: why. With `stale`, the pull requests shown are the last ones read. */
|
|
122
|
+
problem?: {
|
|
123
|
+
kind: DashPrProblemKind;
|
|
124
|
+
text: string;
|
|
125
|
+
};
|
|
126
|
+
stale?: true;
|
|
127
|
+
/** Only the pull requests of this goal (`?goal=`). */
|
|
128
|
+
goal?: string;
|
|
129
|
+
}
|
|
130
|
+
/** `POST /api/team/prs/tag`: label and mark one pull request with one goal — the person's click. */
|
|
131
|
+
export interface DashPrTagRequest {
|
|
132
|
+
number: number;
|
|
133
|
+
goalId: string;
|
|
134
|
+
}
|
|
135
|
+
export interface DashPrTagAnswer {
|
|
136
|
+
pr: DashPullRequest;
|
|
137
|
+
/** What was done, in words: the label made, added, the marker written. */
|
|
138
|
+
did: string[];
|
|
139
|
+
}
|
|
140
|
+
/** A pull request GitHub's list gives with its first this many commits. */
|
|
141
|
+
export declare const PR_COMMITS_READ = 100;
|
|
142
|
+
/**
|
|
143
|
+
* The label a goal's pull request carries: `goal:G-44`, its number (issues/closed/foodguard-314) — or, for a goal with
|
|
144
|
+
* none and for labels made before numbers, `goal:` and the id's first eight characters. Group 1: those eight; group 2: the number.
|
|
145
|
+
*/
|
|
146
|
+
export declare const PR_GOAL_LABEL: RegExp;
|
|
147
|
+
/** The hidden marker in a pull request's body. */
|
|
148
|
+
export declare const PR_GOAL_MARKER: RegExp;
|
|
149
|
+
/** The visible line in a pull request's body. */
|
|
150
|
+
export declare const PR_GOAL_LINE: RegExp;
|
|
151
|
+
/**
|
|
152
|
+
* A goal's line in a commit message body (goal-merge.ts goalMergeMessage): `Goal: <id>`, or with its number first,
|
|
153
|
+
* `Goal: G-44 (<id>)` (issues/closed/foodguard-314). The id is the first group either way.
|
|
154
|
+
*/
|
|
155
|
+
export declare const COMMIT_GOAL_LINE: RegExp;
|
|
156
|
+
/** The label of a goal's pull request: `goal:G-44` when the goal has its number, else `goal:` and the id's first eight. */
|
|
157
|
+
export declare function goalLabel(goalId: string, number?: number): string;
|
|
158
|
+
/** The hidden marker naming the goal in a pull request's body. */
|
|
159
|
+
export declare function goalMarker(goalId: string): string;
|
|
160
|
+
/** The visible line naming the goal in a pull request's body: its number (G-44), its title on one line, its id. */
|
|
161
|
+
export declare function goalLine(title: string, goalId: string, number?: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var o=(e,a)=>n(e,"name",{value:a,configurable:!0});var t=Object.defineProperty,f=o((e,a)=>t(e,"name",{value:a,configurable:!0}),"t");export const PR_PROOFS=["label","body","commit","branch"],PR_COMMITS_READ=100,PR_GOAL_LABEL=/^goal:(?:([0-9a-f]{8})|g-(\d{1,9}))$/i,PR_GOAL_MARKER=/<!--\s*lensmcp-goal:\s*([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\s*-->/gi,PR_GOAL_LINE=/^LensMCP goal: .*\(([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\)\s*$/gim,COMMIT_GOAL_LINE=/^Goal: (?:G-\d{1,9} \()?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\)?\s*$/gim;export function goalLabel(e,a){return a!==void 0&&Number.isSafeInteger(a)&&a>0?`goal:G-${a}`:`goal:${e.slice(0,8).toLowerCase()}`}o(goalLabel,"goalLabel"),f(goalLabel,"goalLabel");export function goalMarker(e){return`<!-- lensmcp-goal: ${e.toLowerCase()} -->`}o(goalMarker,"goalMarker"),f(goalMarker,"goalMarker");export function goalLine(e,a,r){const l=e.replace(/[\u0000-\u001f\u007f-\u009f]+/g," ").replace(/\s+/g," ").trim().slice(0,200)||"a goal";return`LensMCP goal: ${r!==void 0&&Number.isSafeInteger(r)&&r>0?`G-${r} \u2014 `:""}${l} (${a.toLowerCase()})`}o(goalLine,"goalLine"),f(goalLine,"goalLine");
|
package/lib/team-roadmap.d.ts
CHANGED
|
@@ -177,6 +177,8 @@ export interface RoadmapGoal {
|
|
|
177
177
|
title: string;
|
|
178
178
|
state: string;
|
|
179
179
|
createdAt: number;
|
|
180
|
+
/** Its number, shown G-44 (issues/closed/foodguard-314). */
|
|
181
|
+
number?: number;
|
|
180
182
|
startedAt?: number;
|
|
181
183
|
completedAt?: number;
|
|
182
184
|
admission?: import('./team-delivery.js').GoalAdmission;
|
package/lib/team.d.ts
CHANGED
|
@@ -62,12 +62,58 @@ export interface DashTeamGoalIntegration {
|
|
|
62
62
|
sha: string;
|
|
63
63
|
tip: string;
|
|
64
64
|
at: number;
|
|
65
|
+
/** Landed by its pull request's merge on GitHub (issues/closed/foodguard-313): its number — `sha` is the merge commit on origin's main. */
|
|
66
|
+
pr?: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A goal's ONE pull request as the team keeps it (issues/closed/foodguard-313), while `flow.json` `delivery.pullRequests`
|
|
70
|
+
* is "on": what LensMCP's last sync found and did, whether a sync is due, the last failure and until when it backs off,
|
|
71
|
+
* and the landing its manager asked — the board's chip and the drawer's line.
|
|
72
|
+
*/
|
|
73
|
+
export interface DashTeamGoalPr {
|
|
74
|
+
number?: number;
|
|
75
|
+
url?: string;
|
|
76
|
+
/** `open` (ready for review), `draft`, `merged`, `closed` (unmerged). None: no pull request yet. */
|
|
77
|
+
state?: 'open' | 'draft' | 'merged' | 'closed';
|
|
78
|
+
/** What it merges into: main, or the branch of the goal it stacks on. */
|
|
79
|
+
base?: string;
|
|
80
|
+
stackedOn?: {
|
|
81
|
+
goalId: string;
|
|
82
|
+
number: number;
|
|
83
|
+
};
|
|
84
|
+
/** The goal branch's commit last pushed as its head. */
|
|
85
|
+
tip?: string;
|
|
86
|
+
/** When LensMCP last brought it up to date, and last read its state on GitHub. */
|
|
87
|
+
syncedAt?: number;
|
|
88
|
+
checkedAt?: number;
|
|
89
|
+
/** A sync is due: since when, and why. */
|
|
90
|
+
due?: {
|
|
91
|
+
at: number;
|
|
92
|
+
why: string;
|
|
93
|
+
};
|
|
94
|
+
/** The last sync failed: what git or gh said, and when the next try is. */
|
|
95
|
+
error?: {
|
|
96
|
+
at: number;
|
|
97
|
+
text: string;
|
|
98
|
+
until: number;
|
|
99
|
+
};
|
|
100
|
+
/** Its manager asked to land the goal (agent_task_update merge): the pull request is marked ready, the person merges it. */
|
|
101
|
+
landing?: {
|
|
102
|
+
at: number;
|
|
103
|
+
by: string;
|
|
104
|
+
tip?: string;
|
|
105
|
+
};
|
|
106
|
+
mergedAt?: number;
|
|
107
|
+
/** The commit its merge made on origin's main. */
|
|
108
|
+
mergeCommit?: string;
|
|
65
109
|
}
|
|
66
110
|
export interface DashTeamTask {
|
|
67
111
|
delivery?: PackageDeliverySummary;
|
|
68
112
|
admission?: GoalAdmission;
|
|
69
113
|
timing?: TaskTiming;
|
|
70
114
|
id: string;
|
|
115
|
+
/** A goal's number (issues/closed/foodguard-314), shown `G-44` (goal-number.ts formatGoalNumber) — none on other tasks, and from an older server. */
|
|
116
|
+
number?: number;
|
|
71
117
|
title: string;
|
|
72
118
|
/** Whole on `/api/team/task`; its first lines on the board. */
|
|
73
119
|
description: string;
|
|
@@ -122,6 +168,8 @@ export interface DashTeamTask {
|
|
|
122
168
|
* to (`sha` — a squash or merge commit, or the branch tip for `ff`), the branch tip it took, when (the drawer).
|
|
123
169
|
*/
|
|
124
170
|
integration?: DashTeamGoalIntegration;
|
|
171
|
+
/** A goal's ONE pull request as the team keeps it (issues/closed/foodguard-313): on the board and in the drawer. */
|
|
172
|
+
pr?: DashTeamGoalPr;
|
|
125
173
|
/** Marked done by the person (issues/closed/overseer-70): the commit, why, who — its proof not run, never a QA pass. */
|
|
126
174
|
personDone?: DashTeamPersonDone;
|
|
127
175
|
/** Closed «not run — the person's decision» (issues/closed/overseer-78): who, why — never passed, never written. */
|
|
@@ -636,6 +684,8 @@ export interface DashTeamGoalChecks {
|
|
|
636
684
|
/** A task named in another's chain: its parent, its children, a blocker. */
|
|
637
685
|
export interface DashTeamTaskRef {
|
|
638
686
|
id: string;
|
|
687
|
+
/** A goal's number (foodguard-314), shown `G-44`. */
|
|
688
|
+
number?: number;
|
|
639
689
|
title: string;
|
|
640
690
|
kind?: DashTeamKind;
|
|
641
691
|
role?: string;
|
|
@@ -1975,6 +2025,18 @@ export interface DashTeamQuestion {
|
|
|
1975
2025
|
createdAt: number;
|
|
1976
2026
|
updatedAt: number;
|
|
1977
2027
|
}
|
|
2028
|
+
/**
|
|
2029
|
+
* What an answer did for its goal's manager (issues/closed/foodguard-309), beside `POST …/questions/<id>/answer`'s
|
|
2030
|
+
* question: a manager that suspended while the goal waited on the person, or one that ended, is resumed in its own
|
|
2031
|
+
* conversation — or a fresh one starts for a goal in recovery — whatever the overseer's «Managers a day». `text` follows
|
|
2032
|
+
* «Its manager»: «is being resumed — launch …», «is not resumed: launching agents is off …». None: its manager is live and
|
|
2033
|
+
* hears the answer, or the goal does not run.
|
|
2034
|
+
*/
|
|
2035
|
+
export interface DashTeamManagerWake {
|
|
2036
|
+
outcome: 'resumed' | 'started' | 'running' | 'refused' | 'none';
|
|
2037
|
+
text: string;
|
|
2038
|
+
launchId?: string;
|
|
2039
|
+
}
|
|
1978
2040
|
/** `GET /api/team/questions[?state=open|answered|all&all=1&limit=]` — newest first, scoped as the checkout's board. */
|
|
1979
2041
|
export interface DashTeamQuestionsAnswer {
|
|
1980
2042
|
questions: DashTeamQuestion[];
|
|
@@ -1990,6 +2052,8 @@ export interface DashTeamQuestionsAnswer {
|
|
|
1990
2052
|
/** A goal the dashboard's search found (`GET /api/team/search`): enough to name it and open it — on the board, or its design. */
|
|
1991
2053
|
export interface DashTeamSearchGoal {
|
|
1992
2054
|
id: string;
|
|
2055
|
+
/** Its number (foodguard-314), shown `G-44`: «G-44» finds it. */
|
|
2056
|
+
number?: number;
|
|
1993
2057
|
title: string;
|
|
1994
2058
|
state: DashTeamTaskState;
|
|
1995
2059
|
priority: number;
|