@evref-bl/dev-nexus 0.1.0-alpha.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.
- package/README.md +677 -0
- package/dist/browserOpener.d.ts +9 -0
- package/dist/browserOpener.js +47 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +2374 -0
- package/dist/gitWorktreeService.d.ts +57 -0
- package/dist/gitWorktreeService.js +157 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +47 -0
- package/dist/nexusAgentMcpConfig.d.ts +30 -0
- package/dist/nexusAgentMcpConfig.js +228 -0
- package/dist/nexusAutomation.d.ts +103 -0
- package/dist/nexusAutomation.js +390 -0
- package/dist/nexusAutomationAgentLaunch.d.ts +148 -0
- package/dist/nexusAutomationAgentLaunch.js +855 -0
- package/dist/nexusAutomationAgentProfile.d.ts +39 -0
- package/dist/nexusAutomationAgentProfile.js +103 -0
- package/dist/nexusAutomationAgentSurface.d.ts +62 -0
- package/dist/nexusAutomationAgentSurface.js +90 -0
- package/dist/nexusAutomationCommandExecutor.d.ts +29 -0
- package/dist/nexusAutomationCommandExecutor.js +251 -0
- package/dist/nexusAutomationConfig.d.ts +114 -0
- package/dist/nexusAutomationConfig.js +547 -0
- package/dist/nexusAutomationEnqueue.d.ts +37 -0
- package/dist/nexusAutomationEnqueue.js +128 -0
- package/dist/nexusAutomationRunOnce.d.ts +91 -0
- package/dist/nexusAutomationRunOnce.js +586 -0
- package/dist/nexusAutomationScheduler.d.ts +50 -0
- package/dist/nexusAutomationScheduler.js +196 -0
- package/dist/nexusAutomationStatus.d.ts +55 -0
- package/dist/nexusAutomationStatus.js +462 -0
- package/dist/nexusAutomationTarget.d.ts +19 -0
- package/dist/nexusAutomationTarget.js +33 -0
- package/dist/nexusAutomationTargetCycle.d.ts +90 -0
- package/dist/nexusAutomationTargetCycle.js +282 -0
- package/dist/nexusAutomationTargetReport.d.ts +136 -0
- package/dist/nexusAutomationTargetReport.js +504 -0
- package/dist/nexusAutomationWorktreeSetup.d.ts +89 -0
- package/dist/nexusAutomationWorktreeSetup.js +661 -0
- package/dist/nexusCoordination.d.ts +198 -0
- package/dist/nexusCoordination.js +1018 -0
- package/dist/nexusExtension.d.ts +31 -0
- package/dist/nexusExtension.js +1 -0
- package/dist/nexusHomeConfig.d.ts +38 -0
- package/dist/nexusHomeConfig.js +133 -0
- package/dist/nexusMcpServer.d.ts +31 -0
- package/dist/nexusMcpServer.js +1036 -0
- package/dist/nexusPluginCapabilities.d.ts +197 -0
- package/dist/nexusPluginCapabilities.js +201 -0
- package/dist/nexusProjectConfig.d.ts +95 -0
- package/dist/nexusProjectConfig.js +880 -0
- package/dist/nexusProjectHomeService.d.ts +121 -0
- package/dist/nexusProjectHomeService.js +171 -0
- package/dist/nexusProjectLifecycle.d.ts +62 -0
- package/dist/nexusProjectLifecycle.js +205 -0
- package/dist/nexusProjectOperations.d.ts +101 -0
- package/dist/nexusProjectOperations.js +296 -0
- package/dist/nexusProjectRegistry.d.ts +42 -0
- package/dist/nexusProjectRegistry.js +91 -0
- package/dist/nexusProjectScaffold.d.ts +25 -0
- package/dist/nexusProjectScaffold.js +61 -0
- package/dist/nexusProjectTemplate.d.ts +34 -0
- package/dist/nexusProjectTemplate.js +354 -0
- package/dist/nexusSkills.d.ts +134 -0
- package/dist/nexusSkills.js +647 -0
- package/dist/nexusWorkerContextBundle.d.ts +142 -0
- package/dist/nexusWorkerContextBundle.js +375 -0
- package/dist/processSupervisor.d.ts +89 -0
- package/dist/processSupervisor.js +440 -0
- package/dist/vibeKanbanApi.d.ts +11 -0
- package/dist/vibeKanbanApi.js +14 -0
- package/dist/vibeKanbanAuth.d.ts +25 -0
- package/dist/vibeKanbanAuth.js +101 -0
- package/dist/vibeKanbanBoardAdapter.d.ts +36 -0
- package/dist/vibeKanbanBoardAdapter.js +196 -0
- package/dist/vibeKanbanMcpConfig.d.ts +36 -0
- package/dist/vibeKanbanMcpConfig.js +191 -0
- package/dist/vibeKanbanProjectAdapter.d.ts +39 -0
- package/dist/vibeKanbanProjectAdapter.js +113 -0
- package/dist/vibeKanbanWorkspaceSetup.d.ts +1 -0
- package/dist/vibeKanbanWorkspaceSetup.js +96 -0
- package/dist/workItemService.d.ts +60 -0
- package/dist/workItemService.js +163 -0
- package/dist/workTrackingGitHubProvider.d.ts +71 -0
- package/dist/workTrackingGitHubProvider.js +663 -0
- package/dist/workTrackingGitLabProvider.d.ts +62 -0
- package/dist/workTrackingGitLabProvider.js +523 -0
- package/dist/workTrackingJiraProvider.d.ts +67 -0
- package/dist/workTrackingJiraProvider.js +652 -0
- package/dist/workTrackingLocalProvider.d.ts +49 -0
- package/dist/workTrackingLocalProvider.js +463 -0
- package/dist/workTrackingProviderService.d.ts +21 -0
- package/dist/workTrackingProviderService.js +117 -0
- package/dist/workTrackingTypes.d.ts +202 -0
- package/dist/workTrackingTypes.js +1 -0
- package/dist/workTrackingVibeProvider.d.ts +35 -0
- package/dist/workTrackingVibeProvider.js +119 -0
- package/dist/worktreeExecutionMetadata.d.ts +76 -0
- package/dist/worktreeExecutionMetadata.js +239 -0
- package/package.json +37 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export const maxNexusAutomationTargetCycleNoteLength = 1000;
|
|
4
|
+
export class NexusAutomationTargetCycleError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = "NexusAutomationTargetCycleError";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export function nexusAutomationTargetCycleLedgerPath(projectRoot, config) {
|
|
11
|
+
return resolveProjectRelativePath(projectRoot, config.target.cycleLedgerPath, "automation.target.cycleLedgerPath");
|
|
12
|
+
}
|
|
13
|
+
export function emptyNexusAutomationTargetCycleLedger() {
|
|
14
|
+
return {
|
|
15
|
+
version: 1,
|
|
16
|
+
cycles: [],
|
|
17
|
+
updatedAt: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function readNexusAutomationTargetCycleLedger(projectRoot, config) {
|
|
21
|
+
const ledgerPath = nexusAutomationTargetCycleLedgerPath(projectRoot, config);
|
|
22
|
+
if (!fs.existsSync(ledgerPath)) {
|
|
23
|
+
return emptyNexusAutomationTargetCycleLedger();
|
|
24
|
+
}
|
|
25
|
+
return normalizeNexusAutomationTargetCycleLedger(JSON.parse(fs.readFileSync(ledgerPath, "utf8").replace(/^\uFEFF/, "")));
|
|
26
|
+
}
|
|
27
|
+
export function writeNexusAutomationTargetCycleLedger(projectRoot, config, ledger) {
|
|
28
|
+
const ledgerPath = nexusAutomationTargetCycleLedgerPath(projectRoot, config);
|
|
29
|
+
const normalized = normalizeNexusAutomationTargetCycleLedger(ledger);
|
|
30
|
+
fs.mkdirSync(path.dirname(ledgerPath), { recursive: true });
|
|
31
|
+
fs.writeFileSync(ledgerPath, `${JSON.stringify(normalized, null, 2)}\n`, "utf8");
|
|
32
|
+
return ledgerPath;
|
|
33
|
+
}
|
|
34
|
+
export function appendNexusAutomationTargetCycleRecord(options) {
|
|
35
|
+
const recordedAt = isoString(options.now ?? new Date());
|
|
36
|
+
const record = normalizeTargetCycleRecordInput(options.record, recordedAt);
|
|
37
|
+
const existing = readNexusAutomationTargetCycleLedger(options.projectRoot, options.config);
|
|
38
|
+
const cycles = [...existing.cycles, record].slice(-options.config.ledger.retention);
|
|
39
|
+
const ledger = {
|
|
40
|
+
version: 1,
|
|
41
|
+
cycles,
|
|
42
|
+
updatedAt: recordedAt,
|
|
43
|
+
};
|
|
44
|
+
writeNexusAutomationTargetCycleLedger(options.projectRoot, options.config, ledger);
|
|
45
|
+
return ledger;
|
|
46
|
+
}
|
|
47
|
+
export function summarizeNexusAutomationTargetCycles(options) {
|
|
48
|
+
const ledgerPath = nexusAutomationTargetCycleLedgerPath(options.projectRoot, options.config);
|
|
49
|
+
const ledger = readNexusAutomationTargetCycleLedger(options.projectRoot, options.config);
|
|
50
|
+
return {
|
|
51
|
+
ledgerPath,
|
|
52
|
+
cycleCount: ledger.cycles.length,
|
|
53
|
+
activeCycleCount: ledger.cycles.filter(isActiveCycle).length,
|
|
54
|
+
completedCycleCount: ledger.cycles.filter((cycle) => cycle.status === "completed").length,
|
|
55
|
+
blockedCycleCount: ledger.cycles.filter((cycle) => cycle.status === "blocked").length,
|
|
56
|
+
failedCycleCount: ledger.cycles.filter((cycle) => cycle.status === "failed")
|
|
57
|
+
.length,
|
|
58
|
+
skippedCycleCount: ledger.cycles.filter((cycle) => cycle.status === "skipped").length,
|
|
59
|
+
lastCycle: ledger.cycles.at(-1) ?? null,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export function normalizeNexusAutomationTargetCycleLedger(value) {
|
|
63
|
+
if (value === undefined || value === null) {
|
|
64
|
+
return emptyNexusAutomationTargetCycleLedger();
|
|
65
|
+
}
|
|
66
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
67
|
+
throw new NexusAutomationTargetCycleError("target cycle ledger must be an object");
|
|
68
|
+
}
|
|
69
|
+
const record = value;
|
|
70
|
+
if (record.version !== 1) {
|
|
71
|
+
throw new NexusAutomationTargetCycleError("target cycle ledger.version must be 1");
|
|
72
|
+
}
|
|
73
|
+
if (!Array.isArray(record.cycles)) {
|
|
74
|
+
throw new NexusAutomationTargetCycleError("target cycle ledger.cycles must be an array");
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
version: 1,
|
|
78
|
+
cycles: record.cycles.map(normalizeTargetCycleRecord),
|
|
79
|
+
updatedAt: optionalIsoString(record.updatedAt, "target cycle ledger.updatedAt"),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export function generateNexusAutomationTargetCycleId(now = new Date()) {
|
|
83
|
+
const timestamp = isoString(now)
|
|
84
|
+
.replaceAll("-", "")
|
|
85
|
+
.replaceAll(":", "")
|
|
86
|
+
.replace(".", "-");
|
|
87
|
+
const suffix = Math.random().toString(36).slice(2, 8);
|
|
88
|
+
return `target-cycle-${timestamp}-${suffix}`;
|
|
89
|
+
}
|
|
90
|
+
function normalizeTargetCycleRecordInput(input, recordedAt) {
|
|
91
|
+
const status = normalizeCycleStatus(input.status, "target cycle.status");
|
|
92
|
+
return normalizeTargetCycleRecord({
|
|
93
|
+
...input,
|
|
94
|
+
id: input.id ?? generateNexusAutomationTargetCycleId(recordedAt),
|
|
95
|
+
targetId: input.targetId ?? null,
|
|
96
|
+
runId: input.runId ?? null,
|
|
97
|
+
startedAt: input.startedAt ?? recordedAt,
|
|
98
|
+
finishedAt: input.finishedAt === undefined
|
|
99
|
+
? defaultFinishedAt(status, recordedAt)
|
|
100
|
+
: input.finishedAt,
|
|
101
|
+
objective: input.objective ?? null,
|
|
102
|
+
summary: input.summary ?? null,
|
|
103
|
+
eligibleWorkItemCount: input.eligibleWorkItemCount ?? null,
|
|
104
|
+
workItems: input.workItems ?? [],
|
|
105
|
+
blockers: input.blockers ?? [],
|
|
106
|
+
notes: input.notes ?? [],
|
|
107
|
+
nextCycleNotBefore: input.nextCycleNotBefore ?? null,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function normalizeTargetCycleRecord(value) {
|
|
111
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
112
|
+
throw new NexusAutomationTargetCycleError("target cycle record must be an object");
|
|
113
|
+
}
|
|
114
|
+
const record = value;
|
|
115
|
+
return {
|
|
116
|
+
id: requiredNonEmptyString(record.id, "target cycle.id"),
|
|
117
|
+
projectId: requiredNonEmptyString(record.projectId, "target cycle.projectId"),
|
|
118
|
+
targetId: optionalNullableString(record.targetId) ?? null,
|
|
119
|
+
runId: optionalNullableString(record.runId) ?? null,
|
|
120
|
+
status: normalizeCycleStatus(record.status, "target cycle.status"),
|
|
121
|
+
startedAt: requiredIsoString(record.startedAt, "target cycle.startedAt"),
|
|
122
|
+
finishedAt: optionalIsoString(record.finishedAt, "target cycle.finishedAt"),
|
|
123
|
+
objective: optionalNullableString(record.objective) ?? null,
|
|
124
|
+
summary: optionalNullableString(record.summary) ?? null,
|
|
125
|
+
eligibleWorkItemCount: optionalNullableNonNegativeInteger(record.eligibleWorkItemCount, "target cycle.eligibleWorkItemCount"),
|
|
126
|
+
workItems: normalizeWorkItems(record.workItems),
|
|
127
|
+
blockers: normalizeStringArray(record.blockers, "target cycle.blockers"),
|
|
128
|
+
notes: normalizeStringArray(record.notes, "target cycle.notes", maxNexusAutomationTargetCycleNoteLength),
|
|
129
|
+
nextCycleNotBefore: optionalIsoString(record.nextCycleNotBefore, "target cycle.nextCycleNotBefore"),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function normalizeWorkItems(value) {
|
|
133
|
+
if (value === undefined || value === null) {
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
if (!Array.isArray(value)) {
|
|
137
|
+
throw new NexusAutomationTargetCycleError("target cycle.workItems must be an array");
|
|
138
|
+
}
|
|
139
|
+
return value.map((item, index) => normalizeWorkItem(item, index));
|
|
140
|
+
}
|
|
141
|
+
function normalizeWorkItem(value, index) {
|
|
142
|
+
const pathName = `target cycle.workItems[${index}]`;
|
|
143
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
144
|
+
throw new NexusAutomationTargetCycleError(`${pathName} must be an object`);
|
|
145
|
+
}
|
|
146
|
+
const record = value;
|
|
147
|
+
return {
|
|
148
|
+
componentId: optionalNullableString(record.componentId) ?? null,
|
|
149
|
+
id: requiredNonEmptyString(record.id, `${pathName}.id`),
|
|
150
|
+
title: optionalNullableString(record.title) ?? null,
|
|
151
|
+
status: optionalWorkStatus(record.status, `${pathName}.status`),
|
|
152
|
+
cycleStatus: optionalCycleWorkItemStatus(record.cycleStatus, `${pathName}.cycleStatus`),
|
|
153
|
+
agentProfileId: optionalNullableString(record.agentProfileId) ?? null,
|
|
154
|
+
notes: boundedOptionalNullableString(record.notes, `${pathName}.notes`, maxNexusAutomationTargetCycleNoteLength) ?? null,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function isActiveCycle(cycle) {
|
|
158
|
+
return cycle.status === "started" || cycle.status === "dispatched";
|
|
159
|
+
}
|
|
160
|
+
function defaultFinishedAt(status, recordedAt) {
|
|
161
|
+
return status === "started" || status === "dispatched" ? null : recordedAt;
|
|
162
|
+
}
|
|
163
|
+
function resolveProjectRelativePath(projectRoot, configuredPath, fieldName) {
|
|
164
|
+
const root = path.resolve(projectRoot);
|
|
165
|
+
const target = path.resolve(root, configuredPath);
|
|
166
|
+
const relative = path.relative(root, target);
|
|
167
|
+
if (relative.startsWith("..") || path.isAbsolute(relative)) {
|
|
168
|
+
throw new NexusAutomationTargetCycleError(`${fieldName} must resolve inside the project root: ${target}`);
|
|
169
|
+
}
|
|
170
|
+
return target;
|
|
171
|
+
}
|
|
172
|
+
function normalizeCycleStatus(value, name) {
|
|
173
|
+
if (value === "started" ||
|
|
174
|
+
value === "dispatched" ||
|
|
175
|
+
value === "completed" ||
|
|
176
|
+
value === "blocked" ||
|
|
177
|
+
value === "failed" ||
|
|
178
|
+
value === "skipped") {
|
|
179
|
+
return value;
|
|
180
|
+
}
|
|
181
|
+
throw new NexusAutomationTargetCycleError(`${name} must be started, dispatched, completed, blocked, failed, or skipped`);
|
|
182
|
+
}
|
|
183
|
+
function optionalCycleWorkItemStatus(value, name) {
|
|
184
|
+
if (value === undefined || value === null) {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
if (value === "eligible" ||
|
|
188
|
+
value === "selected" ||
|
|
189
|
+
value === "dispatched" ||
|
|
190
|
+
value === "in_progress" ||
|
|
191
|
+
value === "completed" ||
|
|
192
|
+
value === "blocked" ||
|
|
193
|
+
value === "skipped") {
|
|
194
|
+
return value;
|
|
195
|
+
}
|
|
196
|
+
throw new NexusAutomationTargetCycleError(`${name} must be eligible, selected, dispatched, in_progress, completed, blocked, or skipped`);
|
|
197
|
+
}
|
|
198
|
+
function optionalWorkStatus(value, name) {
|
|
199
|
+
if (value === undefined || value === null) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
if (value === "todo" ||
|
|
203
|
+
value === "ready" ||
|
|
204
|
+
value === "in_progress" ||
|
|
205
|
+
value === "blocked" ||
|
|
206
|
+
value === "done" ||
|
|
207
|
+
value === "wont_do") {
|
|
208
|
+
return value;
|
|
209
|
+
}
|
|
210
|
+
throw new NexusAutomationTargetCycleError(`${name} must be todo, ready, in_progress, blocked, done, or wont_do`);
|
|
211
|
+
}
|
|
212
|
+
function normalizeStringArray(value, name, maxLength) {
|
|
213
|
+
if (value === undefined || value === null) {
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
if (!Array.isArray(value)) {
|
|
217
|
+
throw new NexusAutomationTargetCycleError(`${name} must be an array`);
|
|
218
|
+
}
|
|
219
|
+
return value.map((item, index) => {
|
|
220
|
+
const stringValue = requiredNonEmptyString(item, `${name}[${index}]`);
|
|
221
|
+
if (maxLength !== undefined && stringValue.length > maxLength) {
|
|
222
|
+
throw new NexusAutomationTargetCycleError(`${name}[${index}] must be at most ${maxLength} characters`);
|
|
223
|
+
}
|
|
224
|
+
return stringValue;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function optionalNullableNonNegativeInteger(value, name) {
|
|
228
|
+
if (value === undefined || value === null) {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
|
|
232
|
+
throw new NexusAutomationTargetCycleError(`${name} must be a non-negative integer or null`);
|
|
233
|
+
}
|
|
234
|
+
return value;
|
|
235
|
+
}
|
|
236
|
+
function optionalIsoString(value, name) {
|
|
237
|
+
const stringValue = optionalNullableString(value);
|
|
238
|
+
if (stringValue === undefined || stringValue === null) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
return requiredIsoString(stringValue, name);
|
|
242
|
+
}
|
|
243
|
+
function requiredIsoString(value, name) {
|
|
244
|
+
const stringValue = requiredNonEmptyString(value, name);
|
|
245
|
+
dateFrom(stringValue, name);
|
|
246
|
+
return stringValue;
|
|
247
|
+
}
|
|
248
|
+
function isoString(value) {
|
|
249
|
+
return dateFrom(value, "date").toISOString();
|
|
250
|
+
}
|
|
251
|
+
function dateFrom(value, name) {
|
|
252
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
253
|
+
if (Number.isNaN(date.getTime())) {
|
|
254
|
+
throw new NexusAutomationTargetCycleError(`${name} must be a valid date`);
|
|
255
|
+
}
|
|
256
|
+
return date;
|
|
257
|
+
}
|
|
258
|
+
function boundedOptionalNullableString(value, name, maxLength) {
|
|
259
|
+
const stringValue = optionalNullableString(value, name);
|
|
260
|
+
if (stringValue === undefined || stringValue === null) {
|
|
261
|
+
return stringValue;
|
|
262
|
+
}
|
|
263
|
+
if (stringValue.length > maxLength) {
|
|
264
|
+
throw new NexusAutomationTargetCycleError(`${name} must be at most ${maxLength} characters`);
|
|
265
|
+
}
|
|
266
|
+
return stringValue;
|
|
267
|
+
}
|
|
268
|
+
function optionalNullableString(value, name = "value") {
|
|
269
|
+
if (value === undefined) {
|
|
270
|
+
return undefined;
|
|
271
|
+
}
|
|
272
|
+
if (value === null) {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
return requiredNonEmptyString(value, name);
|
|
276
|
+
}
|
|
277
|
+
function requiredNonEmptyString(value, name) {
|
|
278
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
279
|
+
throw new NexusAutomationTargetCycleError(`${name} must be a non-empty string`);
|
|
280
|
+
}
|
|
281
|
+
return value.trim();
|
|
282
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { type NexusAutomationRunRecord, type NexusAutomationRunStatus } from "./nexusAutomation.js";
|
|
2
|
+
import { type ResolvedNexusProjectComponent } from "./nexusProjectLifecycle.js";
|
|
3
|
+
import { type NexusAutomationTargetContext } from "./nexusAutomationTarget.js";
|
|
4
|
+
import { type NexusAutomationTargetCycleSummary, type NexusAutomationTargetCycleWorkItemStatus } from "./nexusAutomationTargetCycle.js";
|
|
5
|
+
import type { WorkStatus } from "./workTrackingTypes.js";
|
|
6
|
+
import type { WorktreePublicationDecision, WorktreeVerificationRecord } from "./worktreeExecutionMetadata.js";
|
|
7
|
+
export type NexusAutomationTargetReportStatus = "not_started" | "active" | "completed" | "blocked" | "failed" | "skipped";
|
|
8
|
+
export type NexusAutomationTargetReportRelaunchDecisionType = "relaunch" | "stop" | "wait" | "report_blocked" | "report_failed" | "not_ready";
|
|
9
|
+
export interface BuildNexusAutomationTargetReportOptions {
|
|
10
|
+
projectRoot: string;
|
|
11
|
+
now?: Date | string;
|
|
12
|
+
}
|
|
13
|
+
export interface NexusAutomationTargetReportRunSummary {
|
|
14
|
+
runCount: number;
|
|
15
|
+
completedRunCount: number;
|
|
16
|
+
blockedRunCount: number;
|
|
17
|
+
failedRunCount: number;
|
|
18
|
+
skippedRunCount: number;
|
|
19
|
+
lastRun: NexusAutomationRunRecord | null;
|
|
20
|
+
}
|
|
21
|
+
export interface NexusAutomationTargetReportWorkItemSummary {
|
|
22
|
+
totalReferences: number;
|
|
23
|
+
uniqueReferences: NexusAutomationTargetReportWorkItemReference[];
|
|
24
|
+
byComponent: NexusAutomationTargetReportComponentWorkItemSummary[];
|
|
25
|
+
byCycleStatus: Record<NexusAutomationTargetCycleWorkItemStatus, number>;
|
|
26
|
+
progress: NexusAutomationTargetReportWorkItemProgressSummary;
|
|
27
|
+
}
|
|
28
|
+
export interface NexusAutomationTargetReportWorkItemReference {
|
|
29
|
+
componentId: string | null;
|
|
30
|
+
id: string;
|
|
31
|
+
title: string | null;
|
|
32
|
+
status: WorkStatus | null;
|
|
33
|
+
latestCycleStatus: NexusAutomationTargetCycleWorkItemStatus | null;
|
|
34
|
+
latestCycleId: string;
|
|
35
|
+
agentProfileId: string | null;
|
|
36
|
+
notes: string | null;
|
|
37
|
+
}
|
|
38
|
+
export interface NexusAutomationTargetReportComponentWorkItemSummary {
|
|
39
|
+
componentId: string | null;
|
|
40
|
+
totalReferences: number;
|
|
41
|
+
uniqueWorkItemCount: number;
|
|
42
|
+
}
|
|
43
|
+
export interface NexusAutomationTargetReportWorkItemProgressSummary {
|
|
44
|
+
readyEligibleWork: NexusAutomationTargetReportWorkItemReference[];
|
|
45
|
+
selectedWork: NexusAutomationTargetReportWorkItemReference[];
|
|
46
|
+
blockedHitlWork: NexusAutomationTargetReportWorkItemReference[];
|
|
47
|
+
completedWork: NexusAutomationTargetReportWorkItemReference[];
|
|
48
|
+
skippedWork: NexusAutomationTargetReportWorkItemReference[];
|
|
49
|
+
}
|
|
50
|
+
export type NexusAutomationTargetReportActiveBlockerSource = "cycle" | "work_item" | "run";
|
|
51
|
+
export interface NexusAutomationTargetReportActiveBlocker {
|
|
52
|
+
source: NexusAutomationTargetReportActiveBlockerSource;
|
|
53
|
+
componentId: string | null;
|
|
54
|
+
cycleId: string | null;
|
|
55
|
+
runId: string | null;
|
|
56
|
+
workItemId: string | null;
|
|
57
|
+
workItemTitle: string | null;
|
|
58
|
+
message: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface NexusAutomationTargetReportExecutionRunSummary {
|
|
61
|
+
runId: string;
|
|
62
|
+
componentId: string | null;
|
|
63
|
+
status: NexusAutomationRunStatus;
|
|
64
|
+
workItemId: string | null;
|
|
65
|
+
workItemTitle: string | null;
|
|
66
|
+
workItemStatus: WorkStatus | null;
|
|
67
|
+
commitIds: string[];
|
|
68
|
+
summary: string | null;
|
|
69
|
+
error: string | null;
|
|
70
|
+
}
|
|
71
|
+
export interface NexusAutomationTargetReportVerificationSummary extends WorktreeVerificationRecord {
|
|
72
|
+
runId: string;
|
|
73
|
+
componentId: string | null;
|
|
74
|
+
workItemId: string | null;
|
|
75
|
+
workItemTitle: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface NexusAutomationTargetReportPublicationDecisionSummary extends WorktreePublicationDecision {
|
|
78
|
+
runId: string;
|
|
79
|
+
componentId: string | null;
|
|
80
|
+
workItemId: string | null;
|
|
81
|
+
workItemTitle: string | null;
|
|
82
|
+
}
|
|
83
|
+
export interface NexusAutomationTargetReportExecutionSummary {
|
|
84
|
+
runCount: number;
|
|
85
|
+
commitIds: string[];
|
|
86
|
+
verification: NexusAutomationTargetReportVerificationSummary[];
|
|
87
|
+
publicationDecisions: NexusAutomationTargetReportPublicationDecisionSummary[];
|
|
88
|
+
runs: NexusAutomationTargetReportExecutionRunSummary[];
|
|
89
|
+
}
|
|
90
|
+
export interface NexusAutomationTargetReportComponentProgressSummary {
|
|
91
|
+
componentId: string | null;
|
|
92
|
+
componentName: string | null;
|
|
93
|
+
role: ResolvedNexusProjectComponent["role"] | null;
|
|
94
|
+
sourceRoot: string | null;
|
|
95
|
+
workTrackingProvider: string | null;
|
|
96
|
+
workItemCount: number;
|
|
97
|
+
workItems: NexusAutomationTargetReportWorkItemProgressSummary;
|
|
98
|
+
activeBlockers: NexusAutomationTargetReportActiveBlocker[];
|
|
99
|
+
commitIds: string[];
|
|
100
|
+
verification: NexusAutomationTargetReportVerificationSummary[];
|
|
101
|
+
publicationDecisions: NexusAutomationTargetReportPublicationDecisionSummary[];
|
|
102
|
+
runs: NexusAutomationTargetReportExecutionRunSummary[];
|
|
103
|
+
}
|
|
104
|
+
export interface NexusAutomationTargetReportRelaunchDecision {
|
|
105
|
+
type: NexusAutomationTargetReportRelaunchDecisionType;
|
|
106
|
+
reason: string;
|
|
107
|
+
eligibleWorkItemCount: number | null;
|
|
108
|
+
latestCycleId: string | null;
|
|
109
|
+
latestRunId: string | null;
|
|
110
|
+
}
|
|
111
|
+
export interface NexusAutomationTargetReport {
|
|
112
|
+
version: 1;
|
|
113
|
+
generatedAt: string;
|
|
114
|
+
projectRoot: string;
|
|
115
|
+
project: {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
componentCount: number;
|
|
119
|
+
};
|
|
120
|
+
target: NexusAutomationTargetContext | null;
|
|
121
|
+
status: NexusAutomationTargetReportStatus;
|
|
122
|
+
statusReason: string;
|
|
123
|
+
cycleSummary: NexusAutomationTargetCycleSummary | null;
|
|
124
|
+
runSummary: NexusAutomationTargetReportRunSummary | null;
|
|
125
|
+
workItemSummary: NexusAutomationTargetReportWorkItemSummary | null;
|
|
126
|
+
executionSummary: NexusAutomationTargetReportExecutionSummary | null;
|
|
127
|
+
componentProgress: NexusAutomationTargetReportComponentProgressSummary[];
|
|
128
|
+
relaunchDecision: NexusAutomationTargetReportRelaunchDecision;
|
|
129
|
+
activeBlockers: NexusAutomationTargetReportActiveBlocker[];
|
|
130
|
+
blockers: string[];
|
|
131
|
+
notes: string[];
|
|
132
|
+
}
|
|
133
|
+
export declare class NexusAutomationTargetReportError extends Error {
|
|
134
|
+
constructor(message: string);
|
|
135
|
+
}
|
|
136
|
+
export declare function buildNexusAutomationTargetReport(options: BuildNexusAutomationTargetReportOptions): NexusAutomationTargetReport;
|