@lensmcp/protocol-types 1.25.54 → 1.25.56
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 +4 -0
- package/index.js +1 -1
- package/lib/dashboard.d.ts +42 -5
- package/lib/dashboard.js +1 -1
- package/lib/overseer-rounds.d.ts +13 -0
- package/lib/proof.d.ts +30 -0
- package/lib/proof.js +1 -0
- package/lib/task-timing.d.ts +20 -0
- package/lib/task-timing.js +1 -0
- package/lib/team-delivery.d.ts +124 -0
- package/lib/team-delivery.js +1 -0
- package/lib/team-roadmap.d.ts +91 -0
- package/lib/team-roadmap.js +1 -0
- package/lib/team.d.ts +229 -3
- package/lib/workspace-actions.d.ts +49 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -41,3 +41,7 @@ export * from './lib/overseer-findings.js';
|
|
|
41
41
|
export * from './lib/overseer-rounds.js';
|
|
42
42
|
export * from './lib/goal-design.js';
|
|
43
43
|
export * from './lib/overseer-messages.js';
|
|
44
|
+
export * from './lib/team-roadmap.js';
|
|
45
|
+
export type { TaskTimePhase, TaskAttempt, TaskTiming } from './lib/task-timing.js';
|
|
46
|
+
export type { ProofFingerprint, ProofEvidence, RuntimeProofIdentity } from './lib/proof.js';
|
|
47
|
+
export type { GoalAdmission, GoalDeliveryPolicy, DeliveryProofRequirement, PackageContract, PackagePublication, PackageCandidate, DeliveryFailureKind, DeliveryFinding, PackageDelivery, DeliveryAssignment, PackageDeliverySummary } from './lib/team-delivery.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/log-query.js";export*from"./lib/error-dismissal.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-origins.js";export*from"./lib/ai-playground.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/team.js";export*from"./lib/team-review-changes.js";export*from"./lib/goal-outcome.js";export*from"./lib/goal-retro.js";export*from"./lib/team-design.js";export*from"./lib/team-library.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";
|
|
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/log-query.js";export*from"./lib/error-dismissal.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-origins.js";export*from"./lib/ai-playground.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/team.js";export*from"./lib/team-review-changes.js";export*from"./lib/goal-outcome.js";export*from"./lib/goal-retro.js";export*from"./lib/team-design.js";export*from"./lib/team-library.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";
|
package/lib/dashboard.d.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type { HttpExchange } from './http-exchange.js';
|
|
14
14
|
import type { DashTeamDesignRun, TeamDesign } from './team-design.js';
|
|
15
15
|
import type { PageVisitNavType, PageVisitRaw, PageVisitReadyBy, PageVisitRequest, PageVisitVitals } from './page-visit.js';
|
|
16
|
+
import type { WorktreeRunOutcome } from './workspace-actions.js';
|
|
16
17
|
/** Bumped only on a breaking change to the stream framing itself. */
|
|
17
18
|
export declare const DASHBOARD_PROTOCOL = 1;
|
|
18
19
|
/** The swimlane a flow event belongs to (mirrors `FlowArea` in `@lensmcp/core`'s flow-shape). */
|
|
@@ -74,7 +75,8 @@ export interface DashSession {
|
|
|
74
75
|
eventCount: number;
|
|
75
76
|
setupIssues: DashSetupIssue[];
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
/** `parked`: the checkout is a parked on-demand worktree (planning/team/21) — nothing of it runs until it is run. */
|
|
79
|
+
export type DashServiceState = 'up' | 'starting' | 'idle' | 'down' | 'wedged' | 'crash-looping' | 'unknown' | 'parked';
|
|
78
80
|
/** Aggregates over a sliding window (see `DashKpis.windowSec`). `null` = no samples. */
|
|
79
81
|
export interface DashWindowStats {
|
|
80
82
|
count: number;
|
|
@@ -276,12 +278,17 @@ export interface DashCluster {
|
|
|
276
278
|
* — left out of `worktrees`: `lensmcp instance prune` forgets them and drops the data the lens made for them.
|
|
277
279
|
*/
|
|
278
280
|
worktreesGone?: number;
|
|
279
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* Set when THIS dashboard is a worktree instance's: whose worktree it is. `parked`: an on-demand worktree that is parked
|
|
283
|
+
* — nothing of it runs and its pages show what its last run recorded; it runs from the main checkout's Cluster ›
|
|
284
|
+
* Worktrees (`baseDashboard`) or `lensmcp instance run <name>`.
|
|
285
|
+
*/
|
|
280
286
|
instance?: {
|
|
281
287
|
name: string;
|
|
282
288
|
baseKey: string;
|
|
283
289
|
apex: string;
|
|
284
290
|
baseDashboard: string;
|
|
291
|
+
parked?: true;
|
|
285
292
|
};
|
|
286
293
|
}
|
|
287
294
|
/** One worktree instance of the project (a git worktree served beside the main checkout under its own hosts). */
|
|
@@ -299,7 +306,10 @@ export interface DashWorktree {
|
|
|
299
306
|
* Neither stopped nor offline; `lensmcp instance start --name=<name>` serves it on its own. Absent once started.
|
|
300
307
|
*/
|
|
301
308
|
checkoutOnly?: boolean;
|
|
302
|
-
/**
|
|
309
|
+
/**
|
|
310
|
+
* Its dashboard's path under the lens host (`/foodguard-gate1`); a checkout only's is the main checkout's. A parked
|
|
311
|
+
* on-demand worktree's opens too: the gateway keeps its dashboard while nothing else of it runs.
|
|
312
|
+
*/
|
|
303
313
|
dashboard: string;
|
|
304
314
|
/** The checkout, shortened for display (`~/…/fg/gate1`). */
|
|
305
315
|
root: string;
|
|
@@ -307,6 +317,11 @@ export interface DashWorktree {
|
|
|
307
317
|
branch?: string;
|
|
308
318
|
/** The data the lens made for it (resource names from `nx.json` → `lensmcp.instances`), when on record. */
|
|
309
319
|
data?: string[];
|
|
320
|
+
/**
|
|
321
|
+
* On demand (planning/team/21): its data is there, and it runs only between a Run and its park — not `live`, it is
|
|
322
|
+
* parked, not stopped.
|
|
323
|
+
*/
|
|
324
|
+
onDemand?: boolean;
|
|
310
325
|
updatedAt?: string;
|
|
311
326
|
}
|
|
312
327
|
/** Worktree management always runs on the main checkout's dashboard. */
|
|
@@ -318,9 +333,20 @@ export interface DashWorktreeManagement {
|
|
|
318
333
|
key: string;
|
|
319
334
|
name: string;
|
|
320
335
|
root: string;
|
|
336
|
+
/**
|
|
337
|
+
* running, starting, parked (on demand, data ready, nothing runs), stopped, failed, folder-gone, or the step a
|
|
338
|
+
* create is at (creating, provisioning, registering, preparing).
|
|
339
|
+
*/
|
|
321
340
|
state: string;
|
|
322
341
|
/** Never started, its sessions on main's lens (`DashWorktree.checkoutOnly`): its `state` reads `stopped`. */
|
|
323
342
|
checkoutOnly?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* What it runs (planning/team/21): `on-demand` — only between a Run and its park; `always` — whenever it is
|
|
345
|
+
* registered; `none` — a checkout only. Absent from an older server.
|
|
346
|
+
*/
|
|
347
|
+
services?: 'on-demand' | 'always' | 'none';
|
|
348
|
+
/** A running on-demand worktree: when it parks unless something uses it (epoch ms). */
|
|
349
|
+
parkAt?: number;
|
|
324
350
|
branch?: string;
|
|
325
351
|
createdByLens: boolean;
|
|
326
352
|
data: string[];
|
|
@@ -379,7 +405,7 @@ export interface DashWorktreeRemoval {
|
|
|
379
405
|
export interface DashWorktreeAction {
|
|
380
406
|
id: string;
|
|
381
407
|
key: string;
|
|
382
|
-
action: 'stop' | 'remove';
|
|
408
|
+
action: 'stop' | 'remove' | 'run' | 'park';
|
|
383
409
|
state: 'running' | 'succeeded' | 'failed';
|
|
384
410
|
stage: string;
|
|
385
411
|
startedAt: number;
|
|
@@ -389,6 +415,10 @@ export interface DashWorktreeAction {
|
|
|
389
415
|
remainingData?: string[];
|
|
390
416
|
remainingDataOmitted?: number;
|
|
391
417
|
branch?: string;
|
|
418
|
+
/** A run (planning/team/21): how it came out, per service — once it has. */
|
|
419
|
+
run?: WorktreeRunOutcome;
|
|
420
|
+
/** A park: false when it was parked already. */
|
|
421
|
+
parked?: boolean;
|
|
392
422
|
}
|
|
393
423
|
export interface DashKpis {
|
|
394
424
|
at: number;
|
|
@@ -939,6 +969,13 @@ export type DashStreamEvent = {
|
|
|
939
969
|
type: 'summary';
|
|
940
970
|
data: DashSummary;
|
|
941
971
|
}
|
|
972
|
+
/** Small invalidation frame; the roadmap is fetched only after a relevant change. */
|
|
973
|
+
| {
|
|
974
|
+
type: 'roadmap-revision';
|
|
975
|
+
data: {
|
|
976
|
+
stamp: string;
|
|
977
|
+
};
|
|
978
|
+
}
|
|
942
979
|
/** Every 15 s on every connection — what tells a tab its stream is alive when its page's frames are quiet. */
|
|
943
980
|
| {
|
|
944
981
|
type: 'ping';
|
|
@@ -950,7 +987,7 @@ export type DashStreamEventType = DashStreamEvent['type'];
|
|
|
950
987
|
* `ping` go to every tab, `summary` too (asked or not); `logs-resync` goes with `logs`, and the log backlog is sent
|
|
951
988
|
* only to a tab that asks for `logs`. A tab that sends no `topics` gets every frame (a UI from before topics).
|
|
952
989
|
*/
|
|
953
|
-
export type DashStreamTopic = 'summary' | 'session' | 'cluster' | 'kpis' | 'flows' | 'flow-rev' | 'logs' | 'diagnostics' | 'errors';
|
|
990
|
+
export type DashStreamTopic = 'summary' | 'session' | 'cluster' | 'kpis' | 'flows' | 'flow-rev' | 'logs' | 'diagnostics' | 'errors' | 'roadmap-revision';
|
|
954
991
|
export declare const DASH_STREAM_TOPICS: readonly DashStreamTopic[];
|
|
955
992
|
/**
|
|
956
993
|
* The shell's numbers — the sidebar's badges, the top bar's counters, the scope card — for a tab whose page does not
|
package/lib/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const DASHBOARD_PROTOCOL=1,DASH_PERF_KINDS=["n-plus-one","db-in-loop","render-storm","slow-path","slow-route","slow-query","missing-index","leak","egress-slow","duplicate-requests","perf-rule","db-connection","other"],DASH_STREAM_TOPICS=["summary","session","cluster","kpis","flows","flow-rev","logs","diagnostics","errors"],DASH_AI_TRIGGERS=["auto","click","agent"];
|
|
1
|
+
"use strict";export const DASHBOARD_PROTOCOL=1,DASH_PERF_KINDS=["n-plus-one","db-in-loop","render-storm","slow-path","slow-route","slow-query","missing-index","leak","egress-slow","duplicate-requests","perf-rule","db-connection","other"],DASH_STREAM_TOPICS=["summary","session","cluster","kpis","flows","flow-rev","logs","diagnostics","errors","roadmap-revision"],DASH_AI_TRIGGERS=["auto","click","agent"];
|
package/lib/overseer-rounds.d.ts
CHANGED
|
@@ -135,6 +135,19 @@ export interface DashOverseerDigest {
|
|
|
135
135
|
reason?: DashOverseerRoundReason;
|
|
136
136
|
/** Markdown. */
|
|
137
137
|
body: string;
|
|
138
|
+
/**
|
|
139
|
+
* A notice of one of the overseer's changes to a team's limits (planning/team/22 GP-D2): the change to undo in one
|
|
140
|
+
* click — `POST /api/team/limits { undo: at }` on that repository's dashboard. The route reads it off the notice's last
|
|
141
|
+
* line; absent on every other digest, and from an older server.
|
|
142
|
+
*/
|
|
143
|
+
undo?: DashOverseerDigestUndo;
|
|
144
|
+
}
|
|
145
|
+
/** The change a limits notice tells of: its repository (the coordination store's id, and its name) and its `at`. */
|
|
146
|
+
export interface DashOverseerDigestUndo {
|
|
147
|
+
kind: 'limits';
|
|
148
|
+
repoId: string;
|
|
149
|
+
repository: string;
|
|
150
|
+
at: number;
|
|
138
151
|
}
|
|
139
152
|
/** `GET /api/overseer/digests` — newest first. */
|
|
140
153
|
export interface DashOverseerDigests {
|
package/lib/proof.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Gateway identity and hashes, never database URLs, credentials or environment values. */
|
|
2
|
+
export interface RuntimeProofIdentity {
|
|
3
|
+
workspaceKey: string;
|
|
4
|
+
name: string;
|
|
5
|
+
candidate: string;
|
|
6
|
+
environmentKeys: string[];
|
|
7
|
+
environmentHash: string;
|
|
8
|
+
configurationHash: string;
|
|
9
|
+
}
|
|
10
|
+
/** Identity of a proof's source and declared execution inputs. Secret values are never retained. */
|
|
11
|
+
export interface ProofFingerprint {
|
|
12
|
+
version: 1;
|
|
13
|
+
key: string;
|
|
14
|
+
candidate: string;
|
|
15
|
+
tree: string;
|
|
16
|
+
repository: string;
|
|
17
|
+
workingDirectory: string;
|
|
18
|
+
invocationHash: string;
|
|
19
|
+
environmentHash: string;
|
|
20
|
+
runtime: string;
|
|
21
|
+
runnerHash: string;
|
|
22
|
+
files: Record<string, string>;
|
|
23
|
+
runtimeBinding?: RuntimeProofIdentity;
|
|
24
|
+
}
|
|
25
|
+
export interface ProofEvidence {
|
|
26
|
+
fingerprint?: ProofFingerprint;
|
|
27
|
+
eligible: boolean;
|
|
28
|
+
reason?: string;
|
|
29
|
+
verifiedAt?: number;
|
|
30
|
+
}
|
package/lib/proof.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Observed task states, not estimates of model thinking time or CPU usage. */
|
|
2
|
+
export type TaskTimePhase = 'ready' | 'owned' | 'executionQueue' | 'execution' | 'decision' | 'blocked' | 'recovery' | 'ended';
|
|
3
|
+
export interface TaskAttempt {
|
|
4
|
+
generation: number;
|
|
5
|
+
owner: string;
|
|
6
|
+
startedAt: number;
|
|
7
|
+
endedAt?: number;
|
|
8
|
+
outcome?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TaskTiming {
|
|
11
|
+
/** First instrumentation observation; earlier history is deliberately not reconstructed. */
|
|
12
|
+
observedAt: number;
|
|
13
|
+
at: number;
|
|
14
|
+
phase: TaskTimePhase;
|
|
15
|
+
/** Claimed states are only vouched for through this lease. */
|
|
16
|
+
until?: number;
|
|
17
|
+
endedAt?: number;
|
|
18
|
+
milliseconds: Partial<Record<TaskTimePhase, number>>;
|
|
19
|
+
attempts: TaskAttempt[];
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { DeliveryProfile } from './team-roadmap.js';
|
|
2
|
+
import type { ProofEvidence } from './proof.js';
|
|
3
|
+
import type { CandidateRuntimeRequirement } from './workspace-actions.js';
|
|
4
|
+
/** A deliberate stop in admission; a draining goal retains capacity until held work and jobs settle. */
|
|
5
|
+
export interface GoalAdmission {
|
|
6
|
+
mode: 'draining' | 'paused';
|
|
7
|
+
at: number;
|
|
8
|
+
by: string;
|
|
9
|
+
reason: string;
|
|
10
|
+
}
|
|
11
|
+
/** Pinned by the approved design. Absence preserves the legacy hand-off engine. */
|
|
12
|
+
export interface GoalDeliveryPolicy {
|
|
13
|
+
version: 1;
|
|
14
|
+
profile: DeliveryProfile;
|
|
15
|
+
}
|
|
16
|
+
export interface DeliveryProofRequirement {
|
|
17
|
+
id: string;
|
|
18
|
+
action: 'test' | 'typecheck' | 'lint' | 'build' | 'e2e' | 'verify';
|
|
19
|
+
project: string;
|
|
20
|
+
target?: string;
|
|
21
|
+
files?: string[];
|
|
22
|
+
related?: string[];
|
|
23
|
+
proofFiles?: string[];
|
|
24
|
+
candidateRuntime?: CandidateRuntimeRequirement;
|
|
25
|
+
}
|
|
26
|
+
/** Scope, ownership and proof declared together before independent writers start. */
|
|
27
|
+
export interface PackageContract {
|
|
28
|
+
acceptance: string[];
|
|
29
|
+
testPaths: string[];
|
|
30
|
+
proofs: DeliveryProofRequirement[];
|
|
31
|
+
/** Additional reviews; the normal reviewer and goal-mandated specialists are never removed. */
|
|
32
|
+
reviewRoles?: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface PackagePublication {
|
|
35
|
+
sha: string;
|
|
36
|
+
base: string;
|
|
37
|
+
paths: string[];
|
|
38
|
+
by: string;
|
|
39
|
+
taskId: string;
|
|
40
|
+
at: number;
|
|
41
|
+
}
|
|
42
|
+
export interface PackageCandidate {
|
|
43
|
+
sha: string;
|
|
44
|
+
base: string;
|
|
45
|
+
inputs: string[];
|
|
46
|
+
ref: string;
|
|
47
|
+
root: string;
|
|
48
|
+
worktreeId: string;
|
|
49
|
+
at: number;
|
|
50
|
+
proofs: Array<{
|
|
51
|
+
requirementId: string;
|
|
52
|
+
runId: string;
|
|
53
|
+
state: 'queued' | 'passed' | 'failed' | 'invalid';
|
|
54
|
+
reservedAt?: number;
|
|
55
|
+
supersededAt?: number;
|
|
56
|
+
evidence?: ProofEvidence;
|
|
57
|
+
reason?: string;
|
|
58
|
+
}>;
|
|
59
|
+
reviews: Array<{
|
|
60
|
+
role: string;
|
|
61
|
+
taskId: string;
|
|
62
|
+
state: 'pending' | 'approved' | 'changes-requested';
|
|
63
|
+
by?: string;
|
|
64
|
+
}>;
|
|
65
|
+
supersededAt?: number;
|
|
66
|
+
integratedAt?: number;
|
|
67
|
+
/** Reserved native integration, preventing publication while the Git CAS is in flight. */
|
|
68
|
+
integratingAt?: number;
|
|
69
|
+
}
|
|
70
|
+
export type DeliveryFailureKind = 'product' | 'test' | 'environment' | 'stale';
|
|
71
|
+
export interface DeliveryFinding {
|
|
72
|
+
id: string;
|
|
73
|
+
candidate: string;
|
|
74
|
+
source: string;
|
|
75
|
+
summary: string;
|
|
76
|
+
kind?: DeliveryFailureKind;
|
|
77
|
+
owner?: string;
|
|
78
|
+
repairTask?: string;
|
|
79
|
+
resolvedAt?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface PackageDelivery {
|
|
82
|
+
version: 1;
|
|
83
|
+
contract: PackageContract;
|
|
84
|
+
/** Resolved normal/specialist roles, pinned when the package is declared. */
|
|
85
|
+
reviewRoles: string[];
|
|
86
|
+
testTaskId?: string;
|
|
87
|
+
base: string;
|
|
88
|
+
writersStarted?: boolean;
|
|
89
|
+
implementation?: PackagePublication;
|
|
90
|
+
tests?: PackagePublication;
|
|
91
|
+
candidates: PackageCandidate[];
|
|
92
|
+
current?: string;
|
|
93
|
+
findings: DeliveryFinding[];
|
|
94
|
+
/** One failed repaired revision counts once, even when several checks fail concurrently. */
|
|
95
|
+
failedRepairs: string[];
|
|
96
|
+
diagnosis?: {
|
|
97
|
+
at: number;
|
|
98
|
+
by: string;
|
|
99
|
+
after: string[];
|
|
100
|
+
text: string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface DeliveryAssignment {
|
|
104
|
+
packageId: string;
|
|
105
|
+
stage: 'implementation' | 'test-author' | 'preliminary-review' | 'final-review' | 'repair';
|
|
106
|
+
candidate?: string;
|
|
107
|
+
failureKind?: DeliveryFailureKind;
|
|
108
|
+
writer?: 'implementation' | 'tests';
|
|
109
|
+
}
|
|
110
|
+
/** Bounded list/read summary; revision history and fingerprints stay behind the package/job handles. */
|
|
111
|
+
export interface PackageDeliverySummary {
|
|
112
|
+
state: 'building' | 'authoring-tests' | 'preparing' | 'verifying' | 'needs-repair' | 'ready' | 'integrating' | 'integrated';
|
|
113
|
+
candidate?: string;
|
|
114
|
+
proofs: {
|
|
115
|
+
passed: number;
|
|
116
|
+
required: number;
|
|
117
|
+
};
|
|
118
|
+
reviews: {
|
|
119
|
+
approved: number;
|
|
120
|
+
required: number;
|
|
121
|
+
};
|
|
122
|
+
unresolvedFindings: number;
|
|
123
|
+
revisions: number;
|
|
124
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/** Forward delivery planning. Times are UTC milliseconds; estimates are continuous agent-work minutes. */
|
|
2
|
+
export type DeliveryProfile = 'compact' | 'feature' | 'high-risk';
|
|
3
|
+
export interface DurationRange {
|
|
4
|
+
low: number;
|
|
5
|
+
working: number;
|
|
6
|
+
high: number;
|
|
7
|
+
}
|
|
8
|
+
export interface DeliveryResources {
|
|
9
|
+
writers: number;
|
|
10
|
+
checkers: number;
|
|
11
|
+
heavy: number;
|
|
12
|
+
light: number;
|
|
13
|
+
}
|
|
14
|
+
export interface GoalDependency {
|
|
15
|
+
goalId: string;
|
|
16
|
+
output: string;
|
|
17
|
+
revision?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GoalSchedule {
|
|
20
|
+
goalId: string;
|
|
21
|
+
epicId?: string;
|
|
22
|
+
profile: DeliveryProfile;
|
|
23
|
+
dependencies: GoalDependency[];
|
|
24
|
+
estimate?: DurationRange;
|
|
25
|
+
remaining?: DurationRange;
|
|
26
|
+
priority: number;
|
|
27
|
+
notBefore?: number;
|
|
28
|
+
/** Unknown human decision duration is an explicit blocker, never guessed. */
|
|
29
|
+
humanWait?: boolean;
|
|
30
|
+
resources: DeliveryResources;
|
|
31
|
+
baseline?: {
|
|
32
|
+
start: number;
|
|
33
|
+
finish: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface DeliveryEpic {
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
description: string;
|
|
40
|
+
createdAt: number;
|
|
41
|
+
}
|
|
42
|
+
export interface AcceptedGoalOutput {
|
|
43
|
+
goalId: string;
|
|
44
|
+
output: string;
|
|
45
|
+
revision: string;
|
|
46
|
+
integratedAt: number;
|
|
47
|
+
}
|
|
48
|
+
export interface DeliveryAudit {
|
|
49
|
+
at: number;
|
|
50
|
+
by: string;
|
|
51
|
+
action: string;
|
|
52
|
+
reason: string;
|
|
53
|
+
goalId?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface DeliveryState {
|
|
56
|
+
version: 1;
|
|
57
|
+
revision: number;
|
|
58
|
+
epics: DeliveryEpic[];
|
|
59
|
+
schedules: GoalSchedule[];
|
|
60
|
+
outputs: AcceptedGoalOutput[];
|
|
61
|
+
audit: DeliveryAudit[];
|
|
62
|
+
}
|
|
63
|
+
export interface RoadmapGoal {
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
state: string;
|
|
67
|
+
createdAt: number;
|
|
68
|
+
startedAt?: number;
|
|
69
|
+
completedAt?: number;
|
|
70
|
+
admission?: import('./team-delivery.js').GoalAdmission;
|
|
71
|
+
schedule?: GoalSchedule;
|
|
72
|
+
forecast?: {
|
|
73
|
+
start: DurationRange;
|
|
74
|
+
finish: DurationRange;
|
|
75
|
+
};
|
|
76
|
+
blockers: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface RoadmapAnswer {
|
|
79
|
+
now: number;
|
|
80
|
+
revision: number;
|
|
81
|
+
calendar: 'continuous';
|
|
82
|
+
/** Preview/apply changes compared at the same instant, excluding clock drift. */
|
|
83
|
+
impact?: string[];
|
|
84
|
+
limits: DeliveryResources & {
|
|
85
|
+
goals: number;
|
|
86
|
+
};
|
|
87
|
+
epics: DeliveryEpic[];
|
|
88
|
+
goals: RoadmapGoal[];
|
|
89
|
+
outputs: AcceptedGoalOutput[];
|
|
90
|
+
audit: DeliveryAudit[];
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{};
|
package/lib/team.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DashTeamTaskDesign } from './goal-design.js';
|
|
2
|
+
import type { TaskTiming } from './task-timing.js';
|
|
3
|
+
import type { GoalAdmission, PackageDeliverySummary } from './team-delivery.js';
|
|
2
4
|
/**
|
|
3
5
|
* The Team page (servers/lensmcp-mcp/src/dashboard/team.ts): the repository's agent team as its coordination store
|
|
4
6
|
* holds it — the agents in their roles, the tasks they take and hand on, each task's work log — and what the person at
|
|
@@ -29,6 +31,9 @@ export interface DashTeamLogLine {
|
|
|
29
31
|
text: string;
|
|
30
32
|
}
|
|
31
33
|
export interface DashTeamTask {
|
|
34
|
+
delivery?: PackageDeliverySummary;
|
|
35
|
+
admission?: GoalAdmission;
|
|
36
|
+
timing?: TaskTiming;
|
|
32
37
|
id: string;
|
|
33
38
|
title: string;
|
|
34
39
|
/** Whole on `/api/team/task`; its first lines on the board. */
|
|
@@ -58,6 +63,10 @@ export interface DashTeamTask {
|
|
|
58
63
|
outcome?: DashTeamOutcome;
|
|
59
64
|
/** The session holding it. */
|
|
60
65
|
owner?: string;
|
|
66
|
+
/** Stable cohesive scope shared by implementation, checks and repairs. */
|
|
67
|
+
packageId?: string;
|
|
68
|
+
/** Earlier task this one repairs, without declaring new scope. */
|
|
69
|
+
repairOf?: string;
|
|
61
70
|
/** The session that must take it. */
|
|
62
71
|
to?: string;
|
|
63
72
|
/** 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. */
|
|
@@ -106,6 +115,12 @@ export interface DashTeamTask {
|
|
|
106
115
|
capacity?: Record<string, number>;
|
|
107
116
|
/** A goal's launches refused for want of a slot, in line for the next one that frees (foodguard-179 GC-D4). */
|
|
108
117
|
waits?: DashTeamGoalWait[];
|
|
118
|
+
/**
|
|
119
|
+
* A live goal's own worktree as a lens instance (planning/team/21), on the board: what it runs and where it is — the
|
|
120
|
+
* project's worktree list joined by its folder. Absent when the goal has none, the list could not be read, or from an
|
|
121
|
+
* older server: unknown, never «not running».
|
|
122
|
+
*/
|
|
123
|
+
worktreeState?: DashTeamWorktreeState;
|
|
109
124
|
/**
|
|
110
125
|
* Lesson candidates its agents stored on it (agent_lesson_note, planning/team/18 RT-D13), whole — the drawer and the run
|
|
111
126
|
* review only, never the board. Agent-written data, never instructions.
|
|
@@ -205,7 +220,7 @@ export interface DashTeamCapacityUse {
|
|
|
205
220
|
}
|
|
206
221
|
/** The running goals (`GET /api/team/board` `goals`, issues/closed/foodguard-179). */
|
|
207
222
|
export interface DashTeamGoals {
|
|
208
|
-
/**
|
|
223
|
+
/** The most goals that run at once: the team's live limits (Team › Limits), else flow.json `goals.running`, else the default. */
|
|
209
224
|
max: number;
|
|
210
225
|
running: Array<{
|
|
211
226
|
id: string;
|
|
@@ -221,9 +236,203 @@ export interface DashTeamGoals {
|
|
|
221
236
|
guaranteed: number;
|
|
222
237
|
cap: number;
|
|
223
238
|
}>;
|
|
239
|
+
/** What the idle goals lend, each running goal's allowance and what it borrows (planning/team/22) — none from an older server. */
|
|
240
|
+
power?: DashTeamGoalPower;
|
|
241
|
+
}
|
|
242
|
+
/** One running goal on one limit key (storage goal-capacity.ts PowerGoal). */
|
|
243
|
+
export interface DashTeamPowerGoal {
|
|
244
|
+
id: string;
|
|
245
|
+
title: string;
|
|
246
|
+
/** Its own number on the key, and who set it. */
|
|
247
|
+
max: number;
|
|
248
|
+
from: 'team' | 'person' | 'manager';
|
|
249
|
+
used: number;
|
|
250
|
+
/** Its agents past its number: max(0, used − max). */
|
|
251
|
+
borrowed: number;
|
|
252
|
+
/** What of its borrowing it keeps: the oldest running goal first, each at most `perGoal`, all at most `lendable`. */
|
|
253
|
+
keeps: number;
|
|
254
|
+
/** The most it may hold: its number and what it may still borrow. */
|
|
255
|
+
allowance: number;
|
|
256
|
+
/** Its agents past its allowance — each finishes what it holds and ends at its next agent_wait. */
|
|
257
|
+
givesBack: number;
|
|
258
|
+
}
|
|
259
|
+
/** One limit key — a role or a kind — as the idle goals lend it (storage goal-capacity.ts PowerKey). */
|
|
260
|
+
export interface DashTeamPowerKey {
|
|
261
|
+
key: string;
|
|
262
|
+
kind?: boolean;
|
|
263
|
+
/** The team's number for one goal. */
|
|
264
|
+
unit: number;
|
|
265
|
+
/** M × unit: the most of it the limits allow at once, before the ceilings. */
|
|
266
|
+
power: number;
|
|
267
|
+
/** floor((M − r) × share) × unit: what the idle goals lend. */
|
|
268
|
+
lendable: number;
|
|
269
|
+
/** (M − r) × unit − lendable: kept for the goals claimed next. */
|
|
270
|
+
reserve: number;
|
|
271
|
+
/** ceil(lendable / r): the most one running goal borrows. */
|
|
272
|
+
perGoal: number;
|
|
273
|
+
/** What the running goals borrow on it now, together. */
|
|
274
|
+
lent: number;
|
|
275
|
+
goals: DashTeamPowerGoal[];
|
|
276
|
+
/** Its cross-goal ceiling — a role's agents, a kind's cap — when there is one (planning/team/22 P1b). */
|
|
277
|
+
ceiling?: number;
|
|
278
|
+
/** A ceiling holds what is lent below the share's: its own, or its kind's cap (`ceilingOf`). */
|
|
279
|
+
ceilingHolds?: boolean;
|
|
280
|
+
/** The kind's cap, not the role's own ceiling, is what holds it (P1c). */
|
|
281
|
+
ceilingOf?: 'writers' | 'checkers';
|
|
282
|
+
/** A role's kind's cap over it (P1c): the cap, one goal's guaranteed of the kind, the most the kind's roles lend together, what they borrow now. */
|
|
283
|
+
kindCap?: {
|
|
284
|
+
kind: 'writers' | 'checkers';
|
|
285
|
+
cap: number;
|
|
286
|
+
unit: number;
|
|
287
|
+
room: number;
|
|
288
|
+
lent: number;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
/** The goals' power on every key the team numbers (planning/team/22): M, the goals running, the share lent. */
|
|
292
|
+
export interface DashTeamGoalPower {
|
|
293
|
+
goalsMax: number;
|
|
294
|
+
running: number;
|
|
295
|
+
share: number;
|
|
296
|
+
keys: DashTeamPowerKey[];
|
|
297
|
+
}
|
|
298
|
+
/** Where a limit in force comes from: set live (Team › Limits, the overseer), the team's files, LensMCP's default — `none`: no number, no cap. */
|
|
299
|
+
export type DashTeamLimitSource = 'live' | 'file' | 'default' | 'none';
|
|
300
|
+
/** A limit in force: its value (`null`: none — no cap), where it comes from, and what a reset gives back (the files' or the default). */
|
|
301
|
+
export interface DashTeamLimitValue {
|
|
302
|
+
value: number | null;
|
|
303
|
+
from: DashTeamLimitSource;
|
|
304
|
+
/** The value without the live limits: what clearing it leaves — `null`: none. */
|
|
305
|
+
reset: number | null;
|
|
306
|
+
/** Where that comes from: the files (`file`), LensMCP (`default`), or nothing (`none`). */
|
|
307
|
+
resetFrom: 'file' | 'default' | 'none';
|
|
308
|
+
}
|
|
309
|
+
/** One row of Team › Limits: a kind of role (writers, checkers), a role, or `research` — the goal's claimed research tasks. */
|
|
310
|
+
export interface DashTeamLimitRow {
|
|
311
|
+
key: string;
|
|
312
|
+
title: string;
|
|
313
|
+
/** writers or checkers: the roles of that kind together. */
|
|
314
|
+
kind?: boolean;
|
|
315
|
+
/** The kind a role counts in — none for the lead (a manager) and research. */
|
|
316
|
+
of?: 'writers' | 'checkers';
|
|
317
|
+
/** A manager: it runs a goal and is not counted in one — only its ceiling holds it. */
|
|
318
|
+
lead?: boolean;
|
|
319
|
+
/** Each goal's number (capacity.<key>) — `null`: none named; then `within` (its kind's number holds it) or `one` (a role that takes work gets one). */
|
|
320
|
+
perGoal: DashTeamLimitValue;
|
|
321
|
+
within?: 'writers' | 'checkers';
|
|
322
|
+
one?: boolean;
|
|
323
|
+
/** The most at once across every goal (ceilings.<key>: a role's agents, caps.writers / caps.checkers) — none for research. */
|
|
324
|
+
ceiling?: DashTeamLimitValue;
|
|
325
|
+
/** How the idle goals lend it — none when no number holds a goal to it. */
|
|
326
|
+
power?: DashTeamPowerKey;
|
|
327
|
+
/** The most at once the limits allow: M × unit, bounded by its ceiling (and its kind's). */
|
|
328
|
+
most?: number;
|
|
329
|
+
/** `most` is the ceiling's, below M × unit. */
|
|
330
|
+
bounded?: boolean;
|
|
331
|
+
/** The ceiling that holds `most` below M × unit: the row's own (a role's agents, a kind's cap) or its kind's cap. */
|
|
332
|
+
holds?: {
|
|
333
|
+
by: 'own' | 'writers' | 'checkers';
|
|
334
|
+
cap: number;
|
|
335
|
+
};
|
|
336
|
+
/** The ceiling that holds what is lent below the share's — the next goal's slot kept under it (P1b, P1c). */
|
|
337
|
+
lendHeld?: {
|
|
338
|
+
by: 'own' | 'writers' | 'checkers';
|
|
339
|
+
cap: number;
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
/** One change in the limits' log: who (the person, the overseer's session), when, why, and each key from → to as it was in force. */
|
|
343
|
+
export interface DashTeamLimitsChange {
|
|
344
|
+
at: number;
|
|
345
|
+
by: 'user' | 'overseer';
|
|
346
|
+
session?: string;
|
|
347
|
+
name?: string;
|
|
348
|
+
why?: string;
|
|
349
|
+
/** `goalsMax`, `share`, `capacity.<key>`, `ceilings.<key>`; `null`: none — no cap; `cleared`: back to the files or the default. */
|
|
350
|
+
changes: Array<{
|
|
351
|
+
key: string;
|
|
352
|
+
from: number | null;
|
|
353
|
+
to: number | null;
|
|
354
|
+
cleared?: boolean;
|
|
355
|
+
wasLive?: boolean;
|
|
356
|
+
}>;
|
|
357
|
+
}
|
|
358
|
+
/** A kind of agent the limits allow more of at once than this machine launches (Settings › Agents & launches). */
|
|
359
|
+
export interface DashTeamLimitsMachineWarning {
|
|
360
|
+
kind: 'writers' | 'checkers';
|
|
361
|
+
allowed: number;
|
|
362
|
+
launches: number;
|
|
363
|
+
text: string;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* `GET /api/team/limits` (planning/team/22 P4): the team's limits in force with where each comes from — M, the share
|
|
367
|
+
* lent, each role's and kind's number per goal and across goals — the goals' power on each, the machine's launch limits
|
|
368
|
+
* beside them, and the newest changes, newest first.
|
|
369
|
+
*/
|
|
370
|
+
export interface DashTeamLimits {
|
|
371
|
+
goalsMax: DashTeamLimitValue & {
|
|
372
|
+
value: number;
|
|
373
|
+
};
|
|
374
|
+
share: DashTeamLimitValue & {
|
|
375
|
+
value: number;
|
|
376
|
+
};
|
|
377
|
+
rows: DashTeamLimitRow[];
|
|
378
|
+
power?: DashTeamGoalPower;
|
|
379
|
+
/** The goals running now, the oldest first. */
|
|
380
|
+
running: Array<{
|
|
381
|
+
id: string;
|
|
382
|
+
title: string;
|
|
383
|
+
}>;
|
|
384
|
+
/** Settings › Agents & launches: whether managers launch agents, and the most writers (with managers) and checkers launched at once. */
|
|
385
|
+
machine: {
|
|
386
|
+
launch: 'on' | 'off';
|
|
387
|
+
launchMax: number;
|
|
388
|
+
checkersMax: number;
|
|
389
|
+
warnings: DashTeamLimitsMachineWarning[];
|
|
390
|
+
};
|
|
391
|
+
/** Newest first. */
|
|
392
|
+
changes: DashTeamLimitsChange[];
|
|
393
|
+
/** The live row's last change, when there is one. */
|
|
394
|
+
live?: {
|
|
395
|
+
updatedAt: number;
|
|
396
|
+
by: 'user' | 'overseer';
|
|
397
|
+
why?: string;
|
|
398
|
+
};
|
|
399
|
+
bounds: {
|
|
400
|
+
goalsMax: {
|
|
401
|
+
min: number;
|
|
402
|
+
max: number;
|
|
403
|
+
};
|
|
404
|
+
shares: number[];
|
|
405
|
+
most: number;
|
|
406
|
+
};
|
|
407
|
+
/** Where the files' limits are: flow.json, the role files. */
|
|
408
|
+
files: {
|
|
409
|
+
flow: string;
|
|
410
|
+
roles: string;
|
|
411
|
+
};
|
|
412
|
+
observedAt: number;
|
|
413
|
+
}
|
|
414
|
+
/** `POST /api/team/limits` — a patch (a number sets a key live, `null` gives it back to the files), or the undo of one change by its `at`. */
|
|
415
|
+
export interface DashTeamLimitsPatch {
|
|
416
|
+
goalsMax?: number | null;
|
|
417
|
+
share?: number | null;
|
|
418
|
+
capacity?: Record<string, number | null>;
|
|
419
|
+
ceilings?: Record<string, number | null>;
|
|
420
|
+
}
|
|
421
|
+
export interface DashTeamLimitsAnswer {
|
|
422
|
+
limits: DashTeamLimits;
|
|
423
|
+
/** The change logged — none when it changed nothing (or an undo found it undone already). */
|
|
424
|
+
change?: DashTeamLimitsChange;
|
|
425
|
+
/** An undo: the keys changed again since, left as they are. */
|
|
426
|
+
skipped?: string[];
|
|
224
427
|
}
|
|
225
428
|
/** A goal's plan as it stands (planning/team/16 GS-D1). */
|
|
226
429
|
export interface DashTeamGoalPlan {
|
|
430
|
+
/** Absent on legacy goals, which retain their accepted elapsed deadline. */
|
|
431
|
+
timePolicy?: 'forecast' | 'deadline';
|
|
432
|
+
forecastAt?: number;
|
|
433
|
+
forecastCheckpointAt?: number;
|
|
434
|
+
/** Pinned budget contract; absent means the legacy task count. */
|
|
435
|
+
units?: 'tasks' | 'packages';
|
|
227
436
|
/** The tasks of work its agents may make under it — the flow's tests, reviews and rework not counted. */
|
|
228
437
|
builds: number;
|
|
229
438
|
hours: number;
|
|
@@ -374,7 +583,7 @@ export interface DashTeamHost {
|
|
|
374
583
|
rssMb?: number;
|
|
375
584
|
}
|
|
376
585
|
/** Why a session ended: closed by itself or the person, its CLI's SessionEnd, a subagent that stopped, its host process gone, a join never used, quiet past the lease with no host to vouch for it. */
|
|
377
|
-
export type DashTeamClosedReason = 'closed' | 'session-end' | 'stopped' | 'host-gone' | 'unused' | 'lost';
|
|
586
|
+
export type DashTeamClosedReason = 'closed' | 'session-end' | 'stopped' | 'host-gone' | 'unused' | 'lost' | 'suspended';
|
|
378
587
|
/** One coordination session: an agent on the team (a role), or one outside it (no role). */
|
|
379
588
|
export interface DashTeamSession {
|
|
380
589
|
id: string;
|
|
@@ -407,6 +616,16 @@ export interface DashTeamSession {
|
|
|
407
616
|
/** Direct messages to it it has not read — an agent reads its messages with agent_sync. None: it read them all. */
|
|
408
617
|
unread?: number;
|
|
409
618
|
}
|
|
619
|
+
/**
|
|
620
|
+
* A goal's worktree as its lens instance (planning/team/21), as Cluster › Worktrees lists it: `services` — `on-demand`
|
|
621
|
+
* (runs only between a run and its park), `always`, `none` (a checkout only); `state` — parked, starting, running,
|
|
622
|
+
* stopped, failed, folder-gone, or the step a create is at; `parkAt` — running on demand, when it parks unless used.
|
|
623
|
+
*/
|
|
624
|
+
export interface DashTeamWorktreeState {
|
|
625
|
+
services: 'on-demand' | 'always' | 'none';
|
|
626
|
+
state: string;
|
|
627
|
+
parkAt?: number;
|
|
628
|
+
}
|
|
410
629
|
/** A checkout of the repository, as an agent's lens last saw it. */
|
|
411
630
|
export interface DashTeamWorktree {
|
|
412
631
|
id: string;
|
|
@@ -777,7 +996,8 @@ export interface DashTeamReviewAgent {
|
|
|
777
996
|
outcomes: Partial<Record<DashTeamOutcome, number>>;
|
|
778
997
|
/** Its own transcript, folded — `tail` left out (the zip has its lines in the window). */
|
|
779
998
|
transcript?: Omit<DashTeamAgentDetail, 'tail'>;
|
|
780
|
-
/**
|
|
999
|
+
/** Usage during recorded task holds, deduplicated by transcript. No hold means unattributed; not zero usage. */
|
|
1000
|
+
usageAttribution?: 'task-holds' | 'unattributed' | 'shared-transcript';
|
|
781
1001
|
usage?: DashTeamAgentUsage;
|
|
782
1002
|
}
|
|
783
1003
|
/** One thing that happened, in time order. */
|
|
@@ -856,6 +1076,10 @@ export interface DashTeamReviewMetrics {
|
|
|
856
1076
|
}
|
|
857
1077
|
/** A run's model usage: per client, and both clients' normalized fields summed — never one client's meaning added to another's. */
|
|
858
1078
|
export interface DashTeamReviewUsage {
|
|
1079
|
+
/** Older exports may use the whole window; new reports count only recorded task holds. */
|
|
1080
|
+
attribution?: 'task-holds';
|
|
1081
|
+
/** Linked transcripts with no recorded hold for this goal; their tokens are not charged to it. */
|
|
1082
|
+
unattributedTranscripts?: number;
|
|
859
1083
|
codex?: DashTeamAgentUsage & {
|
|
860
1084
|
agents: number;
|
|
861
1085
|
};
|
|
@@ -967,6 +1191,8 @@ export interface DashTeamLaunch {
|
|
|
967
1191
|
/** Its coordination session once it joined (its hooks name the launch), and its client's thread or session id. */
|
|
968
1192
|
sessionId?: string;
|
|
969
1193
|
threadId?: string;
|
|
1194
|
+
/** Original launch whose native conversation this launch resumes. */
|
|
1195
|
+
resumedFrom?: string;
|
|
970
1196
|
/** The newest lines of its output, readable — what it said before it joined, or why it ended. */
|
|
971
1197
|
tail?: string[];
|
|
972
1198
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type WorkspaceActionKind = 'start' | 'stop' | 'restart' | 'migrate' | 'test' | 'e2e' | 'typecheck' | 'lint' | 'build' | 'verify' | 'benchmark' | 'capture' | 'worktree-stop' | 'worktree-remove';
|
|
1
|
+
export type WorkspaceActionKind = 'start' | 'stop' | 'restart' | 'migrate' | 'test' | 'e2e' | 'typecheck' | 'lint' | 'build' | 'verify' | 'benchmark' | 'capture' | 'worktree-stop' | 'worktree-remove' | 'worktree-run' | 'worktree-park';
|
|
2
2
|
export type WorkspaceActionState = 'queued' | 'running' | 'passed' | 'failed' | 'errored' | 'cancelled' | 'timeout';
|
|
3
3
|
/**
|
|
4
4
|
* The machine queue's lane (issues/closed/foodguard-189): `heavy` runs one at a time on the machine — a whole test target,
|
|
@@ -6,7 +6,17 @@ export type WorkspaceActionState = 'queued' | 'running' | 'passed' | 'failed' |
|
|
|
6
6
|
* typecheck, a lint, a build.
|
|
7
7
|
*/
|
|
8
8
|
export type WorkspaceActionLane = 'light' | 'heavy';
|
|
9
|
+
/** An isolated candidate runtime; services and preparation are pinned in the package contract. */
|
|
10
|
+
export interface CandidateRuntimeRequirement {
|
|
11
|
+
services: string[];
|
|
12
|
+
requiredModules?: string[];
|
|
13
|
+
}
|
|
9
14
|
export interface WorkspaceActionInput {
|
|
15
|
+
candidateRuntime?: CandidateRuntimeRequirement;
|
|
16
|
+
/** When supplied, refuse a different/dirty candidate rather than silently testing the latest checkout. */
|
|
17
|
+
candidate?: string;
|
|
18
|
+
/** Additional ignored fixtures/configuration to fingerprint; tracked inputs already belong to the candidate tree. */
|
|
19
|
+
proofFiles?: string[];
|
|
10
20
|
action: WorkspaceActionKind;
|
|
11
21
|
/** The Nx project — absent only for a run over `affected` projects. */
|
|
12
22
|
project?: string;
|
|
@@ -163,6 +173,8 @@ export interface WorkspaceActionCounts {
|
|
|
163
173
|
total: number;
|
|
164
174
|
}
|
|
165
175
|
export interface WorkspaceActionStep {
|
|
176
|
+
/** The actual executable and arguments; environment values remain private. */
|
|
177
|
+
command?: string[];
|
|
166
178
|
id: string;
|
|
167
179
|
/** The project it ran — a run over several projects (`affected`) has one step each. */
|
|
168
180
|
project?: string;
|
|
@@ -185,12 +197,15 @@ export interface WorkspaceActionStep {
|
|
|
185
197
|
pending: number | null;
|
|
186
198
|
failed?: string;
|
|
187
199
|
};
|
|
200
|
+
/** `run`: how a worktree run came out (planning/team/21); `parked`: a park, false when it was parked already. */
|
|
188
201
|
worktree?: {
|
|
189
202
|
key: string;
|
|
190
203
|
directoryExists: boolean;
|
|
191
204
|
remainingData?: string[];
|
|
192
205
|
omittedData?: number;
|
|
193
206
|
branch?: string;
|
|
207
|
+
run?: WorktreeRunOutcome;
|
|
208
|
+
parked?: boolean;
|
|
194
209
|
};
|
|
195
210
|
/** `env`: a restart of a worktree instance's service — which instance variables its new tree was given, read again
|
|
196
211
|
* from the instance's files: a print of them all, the print before, and the names that changed. Never a value. */
|
|
@@ -221,7 +236,39 @@ export interface WorkspaceActionStep {
|
|
|
221
236
|
attachments?: string;
|
|
222
237
|
};
|
|
223
238
|
}
|
|
239
|
+
/** One service of a worktree run: up (started, or up already), still on its way, or why not. */
|
|
240
|
+
export interface WorktreeRunService {
|
|
241
|
+
project: string;
|
|
242
|
+
outcome: 'up' | 'starting' | 'queued' | 'failed' | 'deferred' | 'skipped';
|
|
243
|
+
/** Why it was deferred (the free-memory floor), skipped or failed, as the gateway put it. */
|
|
244
|
+
reason?: string;
|
|
245
|
+
/** For one that failed: the last lines of its build or boot error. */
|
|
246
|
+
error?: string;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* How a worktree run came out (`lensmcp instance run --json`, planning/team/21): `running` — what it targeted settled with
|
|
250
|
+
* something up; `starting` — some still on their way when the run stopped waiting; `failed` — nothing came up, or a step
|
|
251
|
+
* before the services failed (`step`); `refused` — the machine runs its most worktrees at once (`holders`).
|
|
252
|
+
*/
|
|
253
|
+
export interface WorktreeRunOutcome {
|
|
254
|
+
state: 'running' | 'starting' | 'failed' | 'refused';
|
|
255
|
+
/** Every service was asked for, not only its always-warm ones. */
|
|
256
|
+
all?: boolean;
|
|
257
|
+
/** When it parks unless something uses it (epoch ms). */
|
|
258
|
+
parkAt?: number;
|
|
259
|
+
services: WorktreeRunService[];
|
|
260
|
+
/** The step that failed before its services: checkout, provision, prepare, migrate, register, services. */
|
|
261
|
+
step?: string;
|
|
262
|
+
/** A full machine (`LENSMCP_WORKTREE_RUN_MAX`): the worktrees holding its run slots, and when each parks. */
|
|
263
|
+
holders?: Array<{
|
|
264
|
+
key: string;
|
|
265
|
+
name: string;
|
|
266
|
+
parkAt?: number;
|
|
267
|
+
}>;
|
|
268
|
+
}
|
|
224
269
|
export interface WorkspaceActionRun {
|
|
270
|
+
/** Command success and reusable candidate proof are separate verdicts. */
|
|
271
|
+
proof?: ProofEvidence;
|
|
225
272
|
runId: string;
|
|
226
273
|
scope: {
|
|
227
274
|
workspace: string;
|
|
@@ -261,3 +308,4 @@ export interface WorkspaceActionQueue {
|
|
|
261
308
|
why?: string;
|
|
262
309
|
waitedMs?: number;
|
|
263
310
|
}
|
|
311
|
+
import type { ProofEvidence } from './proof.js';
|