ralphctl 0.4.3 → 0.4.4
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/dist/{add-MG26JWBP.mjs → add-DVPVHENV.mjs} +7 -7
- package/dist/{add-ZZYL4BSF.mjs → add-YVXM34RP.mjs} +6 -6
- package/dist/{chunk-WOMGKKZY.mjs → chunk-ACRMBVEE.mjs} +319 -15
- package/dist/{chunk-LDSG7G2T.mjs → chunk-BSB4EDGR.mjs} +2 -2
- package/dist/{chunk-RQGD5WS6.mjs → chunk-CBMFRQ4Y.mjs} +3 -3
- package/dist/{chunk-Q4AVHUZL.mjs → chunk-FNAAA32W.mjs} +3 -3
- package/dist/{chunk-EGUFQNRB.mjs → chunk-GQ2WFKBN.mjs} +3 -3
- package/dist/{chunk-LCY32RW4.mjs → chunk-OFILN7QL.mjs} +183 -39
- package/dist/{chunk-MDE6KPJQ.mjs → chunk-OGEXYSFS.mjs} +5 -5
- package/dist/{chunk-TDBEEHTS.mjs → chunk-PYZEQ2VK.mjs} +5 -5
- package/dist/{chunk-57UWLHRH.mjs → chunk-VAZ3LJBI.mjs} +12 -1
- package/dist/{chunk-D2HWXEHH.mjs → chunk-WDMLPXOD.mjs} +2 -2
- package/dist/{chunk-WZTY77GY.mjs → chunk-XN2UIHBY.mjs} +10 -3
- package/dist/{chunk-2FT37OZX.mjs → chunk-ZLWSPLWI.mjs} +53 -7
- package/dist/cli.mjs +19 -17
- package/dist/create-Z635FQKO.mjs +15 -0
- package/dist/{handle-SYVCFI6Y.mjs → handle-23EFF3BE.mjs} +1 -1
- package/dist/{mount-2ANLHHQE.mjs → mount-VEV3TESX.mjs} +1454 -1192
- package/dist/{project-JF47ZWMF.mjs → project-DQHF4ISP.mjs} +3 -3
- package/dist/prompts/sprint-feedback.md +4 -0
- package/dist/prompts/task-evaluation.md +44 -2
- package/dist/prompts/task-execution.md +5 -0
- package/dist/{resolver-PG2DZEBX.mjs → resolver-OVPYVW6Q.mjs} +3 -3
- package/dist/{sprint-54DOSIJK.mjs → sprint-4E26AB5F.mjs} +4 -4
- package/dist/start-2WH4BTDB.mjs +19 -0
- package/package.json +1 -1
- package/dist/create-PQK6KKRD.mjs +0 -15
- package/dist/start-2SZTBKGF.mjs +0 -19
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
addSingleTicketInteractive,
|
|
4
4
|
ticketAddCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OGEXYSFS.mjs";
|
|
6
|
+
import "./chunk-GQ2WFKBN.mjs";
|
|
7
7
|
import "./chunk-CFUVE2BP.mjs";
|
|
8
8
|
import "./chunk-747KW2RW.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-BSB4EDGR.mjs";
|
|
10
|
+
import "./chunk-CBMFRQ4Y.mjs";
|
|
11
|
+
import "./chunk-XN2UIHBY.mjs";
|
|
12
12
|
import "./chunk-IWXBJD2D.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-WDMLPXOD.mjs";
|
|
14
|
+
import "./chunk-VAZ3LJBI.mjs";
|
|
15
15
|
export {
|
|
16
16
|
addSingleTicketInteractive,
|
|
17
17
|
ticketAddCommand
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
addCheckScriptToRepository,
|
|
4
4
|
projectAddCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-PYZEQ2VK.mjs";
|
|
6
|
+
import "./chunk-ZLWSPLWI.mjs";
|
|
7
7
|
import "./chunk-CFUVE2BP.mjs";
|
|
8
8
|
import "./chunk-747KW2RW.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-BSB4EDGR.mjs";
|
|
10
|
+
import "./chunk-XN2UIHBY.mjs";
|
|
11
11
|
import "./chunk-IWXBJD2D.mjs";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-WDMLPXOD.mjs";
|
|
13
|
+
import "./chunk-VAZ3LJBI.mjs";
|
|
14
14
|
export {
|
|
15
15
|
addCheckScriptToRepository,
|
|
16
16
|
projectAddCommand
|
|
@@ -6,14 +6,15 @@ import {
|
|
|
6
6
|
getAllConfigSchemaEntries,
|
|
7
7
|
getConfigDefaultValue,
|
|
8
8
|
parseConfigValue
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PYZEQ2VK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
editorInput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OGEXYSFS.mjs";
|
|
13
13
|
import {
|
|
14
14
|
addTask,
|
|
15
15
|
areAllTasksDone,
|
|
16
16
|
branchExists,
|
|
17
|
+
createExecuteSprintPipeline,
|
|
17
18
|
createIdeatePipeline,
|
|
18
19
|
createPlanPipeline,
|
|
19
20
|
createRefinePipeline,
|
|
@@ -40,14 +41,14 @@ import {
|
|
|
40
41
|
updateTask,
|
|
41
42
|
updateTaskStatus,
|
|
42
43
|
validateImportTasks
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-OFILN7QL.mjs";
|
|
44
45
|
import {
|
|
45
46
|
SignalParser,
|
|
46
47
|
buildTicketRefinePrompt,
|
|
47
48
|
processLifecycleAdapter,
|
|
48
49
|
providerDisplayName,
|
|
49
50
|
resolveProvider
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-ZLWSPLWI.mjs";
|
|
51
52
|
import {
|
|
52
53
|
fetchIssueFromUrl,
|
|
53
54
|
formatIssueContext,
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
removeTicket,
|
|
59
60
|
truncate,
|
|
60
61
|
updateTicket
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-GQ2WFKBN.mjs";
|
|
62
63
|
import {
|
|
63
64
|
EXIT_ERROR,
|
|
64
65
|
exitWithCode
|
|
@@ -76,7 +77,7 @@ import {
|
|
|
76
77
|
removeProject,
|
|
77
78
|
removeProjectRepo,
|
|
78
79
|
resolveRepoPath
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-BSB4EDGR.mjs";
|
|
80
81
|
import {
|
|
81
82
|
activateSprint,
|
|
82
83
|
assertSprintStatus,
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
saveSprint,
|
|
94
95
|
summarizeProgressForContext,
|
|
95
96
|
withFileLock
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-CBMFRQ4Y.mjs";
|
|
97
98
|
import {
|
|
98
99
|
DETAIL_LABEL_WIDTH,
|
|
99
100
|
badge,
|
|
@@ -138,7 +139,7 @@ import {
|
|
|
138
139
|
showWarning,
|
|
139
140
|
success,
|
|
140
141
|
terminalBell
|
|
141
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-XN2UIHBY.mjs";
|
|
142
143
|
import {
|
|
143
144
|
ensureError,
|
|
144
145
|
unwrapOrThrow,
|
|
@@ -168,8 +169,9 @@ import {
|
|
|
168
169
|
getTasksFilePath,
|
|
169
170
|
readValidatedJson,
|
|
170
171
|
validateProjectPath
|
|
171
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-WDMLPXOD.mjs";
|
|
172
173
|
import {
|
|
174
|
+
ExecutionAlreadyRunningError,
|
|
173
175
|
NoCurrentSprintError,
|
|
174
176
|
ProjectNotFoundError,
|
|
175
177
|
SprintNotFoundError,
|
|
@@ -177,12 +179,12 @@ import {
|
|
|
177
179
|
StorageError,
|
|
178
180
|
TaskNotFoundError,
|
|
179
181
|
TicketNotFoundError
|
|
180
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-VAZ3LJBI.mjs";
|
|
181
183
|
|
|
182
184
|
// package.json
|
|
183
185
|
var package_default = {
|
|
184
186
|
name: "ralphctl",
|
|
185
|
-
version: "0.4.
|
|
187
|
+
version: "0.4.4",
|
|
186
188
|
description: "Agent harness for long-running AI coding tasks \u2014 orchestrates Claude Code & GitHub Copilot across repositories",
|
|
187
189
|
homepage: "https://github.com/lukas-grigis/ralphctl",
|
|
188
190
|
type: "module",
|
|
@@ -1241,6 +1243,153 @@ var InkPromptAdapter = class {
|
|
|
1241
1243
|
}
|
|
1242
1244
|
};
|
|
1243
1245
|
|
|
1246
|
+
// src/integration/ui/tui/runtime/event-bus.ts
|
|
1247
|
+
var FRAME_MS2 = 16;
|
|
1248
|
+
var InMemoryLogEventBus = class {
|
|
1249
|
+
listeners = /* @__PURE__ */ new Set();
|
|
1250
|
+
buffer = [];
|
|
1251
|
+
flushTimer = null;
|
|
1252
|
+
emit(event) {
|
|
1253
|
+
this.buffer.push(event);
|
|
1254
|
+
this.scheduleFlush();
|
|
1255
|
+
}
|
|
1256
|
+
subscribe(listener) {
|
|
1257
|
+
this.listeners.add(listener);
|
|
1258
|
+
return () => {
|
|
1259
|
+
this.listeners.delete(listener);
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
dispose() {
|
|
1263
|
+
if (this.flushTimer) {
|
|
1264
|
+
clearTimeout(this.flushTimer);
|
|
1265
|
+
this.flushTimer = null;
|
|
1266
|
+
}
|
|
1267
|
+
this.listeners.clear();
|
|
1268
|
+
this.buffer.length = 0;
|
|
1269
|
+
}
|
|
1270
|
+
/** Force immediate drain. Primarily for tests. */
|
|
1271
|
+
flush() {
|
|
1272
|
+
if (this.flushTimer) {
|
|
1273
|
+
clearTimeout(this.flushTimer);
|
|
1274
|
+
this.flushTimer = null;
|
|
1275
|
+
}
|
|
1276
|
+
this.drain();
|
|
1277
|
+
}
|
|
1278
|
+
scheduleFlush() {
|
|
1279
|
+
if (this.flushTimer !== null) return;
|
|
1280
|
+
const timer = setTimeout(() => {
|
|
1281
|
+
this.flushTimer = null;
|
|
1282
|
+
this.drain();
|
|
1283
|
+
}, FRAME_MS2);
|
|
1284
|
+
timer.unref();
|
|
1285
|
+
this.flushTimer = timer;
|
|
1286
|
+
}
|
|
1287
|
+
drain() {
|
|
1288
|
+
if (this.buffer.length === 0) return;
|
|
1289
|
+
const batch = this.buffer.splice(0, this.buffer.length);
|
|
1290
|
+
for (const listener of this.listeners) {
|
|
1291
|
+
try {
|
|
1292
|
+
listener(batch);
|
|
1293
|
+
} catch {
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
var logEventBus = new InMemoryLogEventBus();
|
|
1299
|
+
|
|
1300
|
+
// src/integration/logging/ink-sink.ts
|
|
1301
|
+
var spinnerId = 0;
|
|
1302
|
+
var InkSink = class _InkSink {
|
|
1303
|
+
constructor(context = {}, bus) {
|
|
1304
|
+
this.context = context;
|
|
1305
|
+
this.bus = bus ?? logEventBus;
|
|
1306
|
+
}
|
|
1307
|
+
context;
|
|
1308
|
+
bus;
|
|
1309
|
+
emit(event) {
|
|
1310
|
+
this.bus.emit(event);
|
|
1311
|
+
}
|
|
1312
|
+
// -- Structured log levels --------------------------------------------------
|
|
1313
|
+
debug(message, context) {
|
|
1314
|
+
this.emit({ kind: "log", level: "debug", message, context: this.merge(context), timestamp: /* @__PURE__ */ new Date() });
|
|
1315
|
+
}
|
|
1316
|
+
info(message, context) {
|
|
1317
|
+
this.emit({ kind: "log", level: "info", message, context: this.merge(context), timestamp: /* @__PURE__ */ new Date() });
|
|
1318
|
+
}
|
|
1319
|
+
warn(message, context) {
|
|
1320
|
+
this.emit({ kind: "log", level: "warn", message, context: this.merge(context), timestamp: /* @__PURE__ */ new Date() });
|
|
1321
|
+
}
|
|
1322
|
+
error(message, context) {
|
|
1323
|
+
this.emit({ kind: "log", level: "error", message, context: this.merge(context), timestamp: /* @__PURE__ */ new Date() });
|
|
1324
|
+
}
|
|
1325
|
+
// -- UI-level output --------------------------------------------------------
|
|
1326
|
+
success(message) {
|
|
1327
|
+
this.emit({ kind: "log", level: "success", message, context: this.context, timestamp: /* @__PURE__ */ new Date() });
|
|
1328
|
+
}
|
|
1329
|
+
warning(message) {
|
|
1330
|
+
this.emit({ kind: "log", level: "warning", message, context: this.context, timestamp: /* @__PURE__ */ new Date() });
|
|
1331
|
+
}
|
|
1332
|
+
tip(message) {
|
|
1333
|
+
this.emit({ kind: "log", level: "tip", message, context: this.context, timestamp: /* @__PURE__ */ new Date() });
|
|
1334
|
+
}
|
|
1335
|
+
// -- Layout -----------------------------------------------------------------
|
|
1336
|
+
header(title, icon) {
|
|
1337
|
+
this.emit({ kind: "header", title, icon, timestamp: /* @__PURE__ */ new Date() });
|
|
1338
|
+
}
|
|
1339
|
+
separator(width = 40) {
|
|
1340
|
+
this.emit({ kind: "separator", width, timestamp: /* @__PURE__ */ new Date() });
|
|
1341
|
+
}
|
|
1342
|
+
field(label, value, _width) {
|
|
1343
|
+
void _width;
|
|
1344
|
+
this.emit({ kind: "field", label, value, timestamp: /* @__PURE__ */ new Date() });
|
|
1345
|
+
}
|
|
1346
|
+
card(title, lines) {
|
|
1347
|
+
this.emit({ kind: "card", title, lines, timestamp: /* @__PURE__ */ new Date() });
|
|
1348
|
+
}
|
|
1349
|
+
newline() {
|
|
1350
|
+
this.emit({ kind: "newline", timestamp: /* @__PURE__ */ new Date() });
|
|
1351
|
+
}
|
|
1352
|
+
dim(message) {
|
|
1353
|
+
this.emit({ kind: "log", level: "dim", message, context: this.context, timestamp: /* @__PURE__ */ new Date() });
|
|
1354
|
+
}
|
|
1355
|
+
item(message) {
|
|
1356
|
+
this.emit({ kind: "log", level: "item", message, context: this.context, timestamp: /* @__PURE__ */ new Date() });
|
|
1357
|
+
}
|
|
1358
|
+
// -- Interactive ------------------------------------------------------------
|
|
1359
|
+
spinner(message) {
|
|
1360
|
+
const id = ++spinnerId;
|
|
1361
|
+
this.emit({ kind: "spinner-start", id, message, timestamp: /* @__PURE__ */ new Date() });
|
|
1362
|
+
return {
|
|
1363
|
+
succeed: (msg) => {
|
|
1364
|
+
this.emit({ kind: "spinner-succeed", id, message: msg, timestamp: /* @__PURE__ */ new Date() });
|
|
1365
|
+
},
|
|
1366
|
+
fail: (msg) => {
|
|
1367
|
+
this.emit({ kind: "spinner-fail", id, message: msg, timestamp: /* @__PURE__ */ new Date() });
|
|
1368
|
+
},
|
|
1369
|
+
stop: () => {
|
|
1370
|
+
this.emit({ kind: "spinner-stop", id, timestamp: /* @__PURE__ */ new Date() });
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
// -- Scoped child -----------------------------------------------------------
|
|
1375
|
+
child(context) {
|
|
1376
|
+
return new _InkSink({ ...this.context, ...context }, this.bus);
|
|
1377
|
+
}
|
|
1378
|
+
// -- Timing -----------------------------------------------------------------
|
|
1379
|
+
time(label) {
|
|
1380
|
+
const start = Date.now();
|
|
1381
|
+
return () => {
|
|
1382
|
+
const ms = Date.now() - start;
|
|
1383
|
+
this.debug(`${label}: ${String(ms)}ms`);
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
// -- Internals --------------------------------------------------------------
|
|
1387
|
+
merge(extra) {
|
|
1388
|
+
if (!extra) return this.context;
|
|
1389
|
+
return { ...this.context, ...extra };
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1244
1393
|
// src/integration/persistence/evaluation.ts
|
|
1245
1394
|
async function writeEvaluation(sprintId, taskId, iteration, status, body) {
|
|
1246
1395
|
const filePath = getEvaluationFilePath(sprintId, taskId);
|
|
@@ -1840,6 +1989,148 @@ var RateLimitCoordinator = class {
|
|
|
1840
1989
|
}
|
|
1841
1990
|
};
|
|
1842
1991
|
|
|
1992
|
+
// src/integration/runtime/execution-registry.ts
|
|
1993
|
+
import { randomUUID } from "crypto";
|
|
1994
|
+
|
|
1995
|
+
// src/integration/runtime/execution-scope.ts
|
|
1996
|
+
function createExecutionScope(baseShared, args) {
|
|
1997
|
+
const scopedLogger = baseShared.logger instanceof InkSink ? new InkSink({ executionId: args.executionId }, args.logEventBus) : baseShared.logger.child({ executionId: args.executionId });
|
|
1998
|
+
return {
|
|
1999
|
+
...baseShared,
|
|
2000
|
+
signalBus: args.signalBus,
|
|
2001
|
+
logger: scopedLogger
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
// src/integration/runtime/execution-registry.ts
|
|
2006
|
+
var InMemoryExecutionRegistry = class {
|
|
2007
|
+
baseShared;
|
|
2008
|
+
runner;
|
|
2009
|
+
generateId;
|
|
2010
|
+
createAbortController;
|
|
2011
|
+
entries = /* @__PURE__ */ new Map();
|
|
2012
|
+
listeners = /* @__PURE__ */ new Set();
|
|
2013
|
+
constructor(options) {
|
|
2014
|
+
this.baseShared = options.baseShared;
|
|
2015
|
+
this.runner = options.runner;
|
|
2016
|
+
this.generateId = options.generateId ?? (() => randomUUID());
|
|
2017
|
+
this.createAbortController = options.createAbortController ?? (() => new AbortController());
|
|
2018
|
+
}
|
|
2019
|
+
async start(params) {
|
|
2020
|
+
const sprint = await this.baseShared.persistence.getSprint(params.sprintId);
|
|
2021
|
+
const project = await this.baseShared.persistence.getProjectById(sprint.projectId);
|
|
2022
|
+
const existing = this.findRunningForProject(project.name);
|
|
2023
|
+
if (existing) {
|
|
2024
|
+
throw new ExecutionAlreadyRunningError(project.name, existing.id);
|
|
2025
|
+
}
|
|
2026
|
+
const executionId = this.generateId();
|
|
2027
|
+
const signalBus = new InMemorySignalBus();
|
|
2028
|
+
const logEventBus2 = new InMemoryLogEventBus();
|
|
2029
|
+
const abortController = this.createAbortController();
|
|
2030
|
+
const scopedShared = createExecutionScope(this.baseShared, {
|
|
2031
|
+
executionId,
|
|
2032
|
+
logEventBus: logEventBus2,
|
|
2033
|
+
signalBus,
|
|
2034
|
+
abortController
|
|
2035
|
+
});
|
|
2036
|
+
const execution = {
|
|
2037
|
+
id: executionId,
|
|
2038
|
+
projectName: project.name,
|
|
2039
|
+
sprintId: sprint.id,
|
|
2040
|
+
sprint,
|
|
2041
|
+
status: "running",
|
|
2042
|
+
startedAt: /* @__PURE__ */ new Date()
|
|
2043
|
+
};
|
|
2044
|
+
const entry = {
|
|
2045
|
+
execution,
|
|
2046
|
+
signalBus,
|
|
2047
|
+
logEventBus: logEventBus2,
|
|
2048
|
+
abortController,
|
|
2049
|
+
// Lazy-initialised below; `runner` needs the entry to exist in the map
|
|
2050
|
+
// before it starts emitting so listeners can observe early signals.
|
|
2051
|
+
pipelinePromise: Promise.resolve()
|
|
2052
|
+
};
|
|
2053
|
+
this.entries.set(executionId, entry);
|
|
2054
|
+
this.notify(execution);
|
|
2055
|
+
entry.pipelinePromise = this.runPipeline(executionId, scopedShared, params, abortController.signal);
|
|
2056
|
+
return execution;
|
|
2057
|
+
}
|
|
2058
|
+
async runPipeline(executionId, scopedShared, params, abortSignal) {
|
|
2059
|
+
try {
|
|
2060
|
+
const summary = await this.runner(scopedShared, {
|
|
2061
|
+
sprintId: params.sprintId,
|
|
2062
|
+
options: params.options,
|
|
2063
|
+
abortSignal
|
|
2064
|
+
});
|
|
2065
|
+
if (abortSignal.aborted) {
|
|
2066
|
+
this.transition(executionId, "cancelled", summary ?? void 0);
|
|
2067
|
+
} else {
|
|
2068
|
+
this.transition(executionId, "completed", summary ?? void 0);
|
|
2069
|
+
}
|
|
2070
|
+
} catch (err) {
|
|
2071
|
+
void err;
|
|
2072
|
+
if (abortSignal.aborted) {
|
|
2073
|
+
this.transition(executionId, "cancelled");
|
|
2074
|
+
} else {
|
|
2075
|
+
this.transition(executionId, "failed");
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
get(id) {
|
|
2080
|
+
return this.entries.get(id)?.execution ?? null;
|
|
2081
|
+
}
|
|
2082
|
+
list() {
|
|
2083
|
+
return Array.from(this.entries.values(), (entry) => entry.execution);
|
|
2084
|
+
}
|
|
2085
|
+
cancel(id) {
|
|
2086
|
+
const entry = this.entries.get(id);
|
|
2087
|
+
if (!entry) return;
|
|
2088
|
+
if (entry.execution.status !== "running") return;
|
|
2089
|
+
entry.abortController.abort();
|
|
2090
|
+
}
|
|
2091
|
+
subscribe(listener) {
|
|
2092
|
+
this.listeners.add(listener);
|
|
2093
|
+
return () => {
|
|
2094
|
+
this.listeners.delete(listener);
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
getSignalBus(id) {
|
|
2098
|
+
return this.entries.get(id)?.signalBus ?? null;
|
|
2099
|
+
}
|
|
2100
|
+
getLogEventBus(id) {
|
|
2101
|
+
return this.entries.get(id)?.logEventBus ?? null;
|
|
2102
|
+
}
|
|
2103
|
+
transition(executionId, status, summary) {
|
|
2104
|
+
const entry = this.entries.get(executionId);
|
|
2105
|
+
if (!entry) return;
|
|
2106
|
+
if (entry.execution.status === status) return;
|
|
2107
|
+
const next = {
|
|
2108
|
+
...entry.execution,
|
|
2109
|
+
status,
|
|
2110
|
+
endedAt: /* @__PURE__ */ new Date(),
|
|
2111
|
+
summary: summary ?? entry.execution.summary
|
|
2112
|
+
};
|
|
2113
|
+
entry.execution = next;
|
|
2114
|
+
this.notify(next);
|
|
2115
|
+
}
|
|
2116
|
+
findRunningForProject(projectName) {
|
|
2117
|
+
for (const entry of this.entries.values()) {
|
|
2118
|
+
if (entry.execution.projectName === projectName && entry.execution.status === "running") {
|
|
2119
|
+
return entry.execution;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
return null;
|
|
2123
|
+
}
|
|
2124
|
+
notify(execution) {
|
|
2125
|
+
for (const listener of this.listeners) {
|
|
2126
|
+
try {
|
|
2127
|
+
listener(execution);
|
|
2128
|
+
} catch {
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
|
|
1843
2134
|
// src/application/shared.ts
|
|
1844
2135
|
function createSharedDeps(overrides = {}) {
|
|
1845
2136
|
const persistence = overrides.persistence ?? new FilePersistenceAdapter();
|
|
@@ -1851,7 +2142,7 @@ function createSharedDeps(overrides = {}) {
|
|
|
1851
2142
|
const signalBus = overrides.signalBus ?? new NoopSignalBus();
|
|
1852
2143
|
const createRateLimitCoordinator = overrides.createRateLimitCoordinator ?? (() => new RateLimitCoordinator());
|
|
1853
2144
|
const processLifecycle = overrides.processLifecycle ?? processLifecycleAdapter;
|
|
1854
|
-
|
|
2145
|
+
const base = {
|
|
1855
2146
|
persistence,
|
|
1856
2147
|
filesystem,
|
|
1857
2148
|
signalParser,
|
|
@@ -1862,6 +2153,17 @@ function createSharedDeps(overrides = {}) {
|
|
|
1862
2153
|
createRateLimitCoordinator,
|
|
1863
2154
|
processLifecycle
|
|
1864
2155
|
};
|
|
2156
|
+
const defaultRunner = async (scopedShared, { sprintId, options, abortSignal }) => {
|
|
2157
|
+
const pipeline = createExecuteSprintPipeline(scopedShared, options);
|
|
2158
|
+
const result = await executePipeline(pipeline, { sprintId, abortSignal });
|
|
2159
|
+
if (!result.ok) {
|
|
2160
|
+
throw result.error;
|
|
2161
|
+
}
|
|
2162
|
+
const summary = result.value.context.executionSummary;
|
|
2163
|
+
return summary ?? null;
|
|
2164
|
+
};
|
|
2165
|
+
base.executionRegistry = overrides.executionRegistry ?? new InMemoryExecutionRegistry({ baseShared: base, runner: defaultRunner });
|
|
2166
|
+
return base;
|
|
1865
2167
|
}
|
|
1866
2168
|
|
|
1867
2169
|
// src/integration/cli/commands/project/list.ts
|
|
@@ -1902,7 +2204,7 @@ async function selectProject(message = "Select project:") {
|
|
|
1902
2204
|
default: true
|
|
1903
2205
|
});
|
|
1904
2206
|
if (create) {
|
|
1905
|
-
const { projectAddCommand } = await import("./add-
|
|
2207
|
+
const { projectAddCommand } = await import("./add-YVXM34RP.mjs");
|
|
1906
2208
|
await projectAddCommand({ interactive: true });
|
|
1907
2209
|
const updated = await listProjects();
|
|
1908
2210
|
if (updated.length === 0) return null;
|
|
@@ -1937,7 +2239,7 @@ async function selectSprint(message = "Select sprint:", filter) {
|
|
|
1937
2239
|
default: true
|
|
1938
2240
|
});
|
|
1939
2241
|
if (create) {
|
|
1940
|
-
const { sprintCreateCommand } = await import("./create-
|
|
2242
|
+
const { sprintCreateCommand } = await import("./create-Z635FQKO.mjs");
|
|
1941
2243
|
await sprintCreateCommand({ interactive: true });
|
|
1942
2244
|
const updated = await listSprints();
|
|
1943
2245
|
const refiltered = filter ? updated.filter((s) => filter.includes(s.status)) : updated;
|
|
@@ -1972,7 +2274,7 @@ async function selectTicket(message = "Select ticket:", filter) {
|
|
|
1972
2274
|
default: true
|
|
1973
2275
|
});
|
|
1974
2276
|
if (create) {
|
|
1975
|
-
const { ticketAddCommand } = await import("./add-
|
|
2277
|
+
const { ticketAddCommand } = await import("./add-DVPVHENV.mjs");
|
|
1976
2278
|
await ticketAddCommand({ interactive: true });
|
|
1977
2279
|
const updated = await listTickets();
|
|
1978
2280
|
const refiltered = filter ? updated.filter(filter) : updated;
|
|
@@ -5224,5 +5526,7 @@ export {
|
|
|
5224
5526
|
PromptHost,
|
|
5225
5527
|
registerExternalHost,
|
|
5226
5528
|
InkPromptAdapter,
|
|
5529
|
+
logEventBus,
|
|
5530
|
+
InkSink,
|
|
5227
5531
|
createSharedDeps
|
|
5228
5532
|
};
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
readValidatedJson,
|
|
9
9
|
validateProjectPath,
|
|
10
10
|
writeValidatedJson
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WDMLPXOD.mjs";
|
|
12
12
|
import {
|
|
13
13
|
ParseError,
|
|
14
14
|
ProjectExistsError,
|
|
15
15
|
ProjectNotFoundError,
|
|
16
16
|
ValidationError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VAZ3LJBI.mjs";
|
|
18
18
|
|
|
19
19
|
// src/integration/persistence/project.ts
|
|
20
20
|
import { basename, resolve } from "path";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getCurrentSprint,
|
|
4
4
|
log
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XN2UIHBY.mjs";
|
|
6
6
|
import {
|
|
7
7
|
SprintSchema,
|
|
8
8
|
TasksSchema,
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
readValidatedJson,
|
|
22
22
|
removeDir,
|
|
23
23
|
writeValidatedJson
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WDMLPXOD.mjs";
|
|
25
25
|
import {
|
|
26
26
|
LockError,
|
|
27
27
|
NoCurrentSprintError,
|
|
28
28
|
SprintNotFoundError,
|
|
29
29
|
SprintStatusError,
|
|
30
30
|
StorageError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VAZ3LJBI.mjs";
|
|
32
32
|
|
|
33
33
|
// src/integration/persistence/progress.ts
|
|
34
34
|
import { execSync } from "child_process";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-747KW2RW.mjs";
|
|
9
9
|
import {
|
|
10
10
|
listProjects
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BSB4EDGR.mjs";
|
|
12
12
|
import {
|
|
13
13
|
createSprint
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CBMFRQ4Y.mjs";
|
|
15
15
|
import {
|
|
16
16
|
emoji,
|
|
17
17
|
field,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
showNextStep,
|
|
23
23
|
showRandomQuote,
|
|
24
24
|
showSuccess
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XN2UIHBY.mjs";
|
|
26
26
|
|
|
27
27
|
// src/integration/cli/commands/sprint/create.ts
|
|
28
28
|
async function sprintCreateCommand(options = {}) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
assertSprintStatus,
|
|
4
4
|
resolveSprintId
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CBMFRQ4Y.mjs";
|
|
6
6
|
import {
|
|
7
7
|
unwrapOrThrow
|
|
8
8
|
} from "./chunk-IWXBJD2D.mjs";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
getSprintFilePath,
|
|
13
13
|
readValidatedJson,
|
|
14
14
|
writeValidatedJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WDMLPXOD.mjs";
|
|
16
16
|
import {
|
|
17
17
|
IssueFetchError,
|
|
18
18
|
TicketNotFoundError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VAZ3LJBI.mjs";
|
|
20
20
|
|
|
21
21
|
// src/domain/strings.ts
|
|
22
22
|
function truncate(str, max) {
|