@cleocode/cleo 2026.5.75 → 2026.5.76
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/cli/index.js +489 -23
- package/dist/cli/index.js.map +3 -3
- package/package.json +10 -10
package/dist/cli/index.js
CHANGED
|
@@ -7371,6 +7371,115 @@ var init_registry = __esm({
|
|
|
7371
7371
|
}
|
|
7372
7372
|
]
|
|
7373
7373
|
},
|
|
7374
|
+
// === saga sub-domain (ADR-073 — above-epic grouping tier) ===
|
|
7375
|
+
{
|
|
7376
|
+
gateway: "mutate",
|
|
7377
|
+
domain: "tasks",
|
|
7378
|
+
operation: "saga.create",
|
|
7379
|
+
description: "tasks.saga.create (mutate) \u2014 create a labeled top-level Epic as a Saga",
|
|
7380
|
+
tier: 0,
|
|
7381
|
+
idempotent: false,
|
|
7382
|
+
sessionRequired: false,
|
|
7383
|
+
requiredParams: ["title"],
|
|
7384
|
+
params: [
|
|
7385
|
+
{
|
|
7386
|
+
name: "title",
|
|
7387
|
+
type: "string",
|
|
7388
|
+
required: true,
|
|
7389
|
+
description: "Saga title (3\u2013500 characters)",
|
|
7390
|
+
cli: { flag: "title" }
|
|
7391
|
+
},
|
|
7392
|
+
{
|
|
7393
|
+
name: "description",
|
|
7394
|
+
type: "string",
|
|
7395
|
+
required: false,
|
|
7396
|
+
description: "Saga description",
|
|
7397
|
+
cli: { flag: "description", short: "-d" }
|
|
7398
|
+
},
|
|
7399
|
+
{
|
|
7400
|
+
name: "acceptance",
|
|
7401
|
+
type: "array",
|
|
7402
|
+
required: false,
|
|
7403
|
+
description: "Pipe-separated acceptance criteria",
|
|
7404
|
+
cli: { flag: "acceptance" }
|
|
7405
|
+
}
|
|
7406
|
+
]
|
|
7407
|
+
},
|
|
7408
|
+
{
|
|
7409
|
+
gateway: "mutate",
|
|
7410
|
+
domain: "tasks",
|
|
7411
|
+
operation: "saga.add",
|
|
7412
|
+
description: "tasks.saga.add (mutate) \u2014 link an Epic to a Saga via task_relations type=groups",
|
|
7413
|
+
tier: 0,
|
|
7414
|
+
idempotent: false,
|
|
7415
|
+
sessionRequired: false,
|
|
7416
|
+
requiredParams: ["sagaId", "epicId"],
|
|
7417
|
+
params: [
|
|
7418
|
+
{
|
|
7419
|
+
name: "sagaId",
|
|
7420
|
+
type: "string",
|
|
7421
|
+
required: true,
|
|
7422
|
+
description: "Saga task ID (must have label=saga)",
|
|
7423
|
+
cli: { positional: true }
|
|
7424
|
+
},
|
|
7425
|
+
{
|
|
7426
|
+
name: "epicId",
|
|
7427
|
+
type: "string",
|
|
7428
|
+
required: true,
|
|
7429
|
+
description: "Epic task ID to link as member",
|
|
7430
|
+
cli: { positional: true }
|
|
7431
|
+
}
|
|
7432
|
+
]
|
|
7433
|
+
},
|
|
7434
|
+
{
|
|
7435
|
+
gateway: "query",
|
|
7436
|
+
domain: "tasks",
|
|
7437
|
+
operation: "saga.list",
|
|
7438
|
+
description: "tasks.saga.list (query) \u2014 list all Sagas (labeled top-level Epics)",
|
|
7439
|
+
tier: 0,
|
|
7440
|
+
idempotent: true,
|
|
7441
|
+
sessionRequired: false,
|
|
7442
|
+
requiredParams: [],
|
|
7443
|
+
params: []
|
|
7444
|
+
},
|
|
7445
|
+
{
|
|
7446
|
+
gateway: "query",
|
|
7447
|
+
domain: "tasks",
|
|
7448
|
+
operation: "saga.members",
|
|
7449
|
+
description: "tasks.saga.members (query) \u2014 list member Epics linked to a Saga",
|
|
7450
|
+
tier: 0,
|
|
7451
|
+
idempotent: true,
|
|
7452
|
+
sessionRequired: false,
|
|
7453
|
+
requiredParams: ["sagaId"],
|
|
7454
|
+
params: [
|
|
7455
|
+
{
|
|
7456
|
+
name: "sagaId",
|
|
7457
|
+
type: "string",
|
|
7458
|
+
required: true,
|
|
7459
|
+
description: "Saga task ID",
|
|
7460
|
+
cli: { positional: true }
|
|
7461
|
+
}
|
|
7462
|
+
]
|
|
7463
|
+
},
|
|
7464
|
+
{
|
|
7465
|
+
gateway: "query",
|
|
7466
|
+
domain: "tasks",
|
|
7467
|
+
operation: "saga.rollup",
|
|
7468
|
+
description: "tasks.saga.rollup (query) \u2014 aggregate member Epic statuses (total/done/active/blocked/pending + completionPct)",
|
|
7469
|
+
tier: 0,
|
|
7470
|
+
idempotent: true,
|
|
7471
|
+
sessionRequired: false,
|
|
7472
|
+
requiredParams: ["sagaId"],
|
|
7473
|
+
params: [
|
|
7474
|
+
{
|
|
7475
|
+
name: "sagaId",
|
|
7476
|
+
type: "string",
|
|
7477
|
+
required: true,
|
|
7478
|
+
description: "Saga task ID",
|
|
7479
|
+
cli: { positional: true }
|
|
7480
|
+
}
|
|
7481
|
+
]
|
|
7482
|
+
},
|
|
7374
7483
|
{
|
|
7375
7484
|
gateway: "mutate",
|
|
7376
7485
|
domain: "tasks",
|
|
@@ -12612,6 +12721,7 @@ __export(engine_exports, {
|
|
|
12612
12721
|
lifecycleSkip: () => lifecycleSkip,
|
|
12613
12722
|
lifecycleStatus: () => lifecycleStatus,
|
|
12614
12723
|
loadActiveReleaseHandle: () => loadActiveReleaseHandle,
|
|
12724
|
+
makeAdr061GateRunner: () => makeAdr061GateRunner,
|
|
12615
12725
|
mapCodebase: () => mapCodebase,
|
|
12616
12726
|
memoryBrainStats: () => memoryBrainStats,
|
|
12617
12727
|
memoryContradictions: () => memoryContradictions,
|
|
@@ -12842,6 +12952,7 @@ import {
|
|
|
12842
12952
|
lifecycleSkip,
|
|
12843
12953
|
lifecycleStatus,
|
|
12844
12954
|
loadActiveReleaseHandle,
|
|
12955
|
+
makeAdr061GateRunner,
|
|
12845
12956
|
mapCodebase,
|
|
12846
12957
|
memoryBrainStats,
|
|
12847
12958
|
memoryContradictions,
|
|
@@ -27083,8 +27194,11 @@ var init_release2 = __esm({
|
|
|
27083
27194
|
}
|
|
27084
27195
|
// release.verify — Step 2 of 4: run gates + audit child tasks (T1597 / ADR-063)
|
|
27085
27196
|
case "verify": {
|
|
27086
|
-
const
|
|
27087
|
-
const
|
|
27197
|
+
const projectRoot = getProjectRoot11();
|
|
27198
|
+
const handle = loadActiveReleaseHandle(projectRoot);
|
|
27199
|
+
const result = await releaseVerify(handle, {
|
|
27200
|
+
runGate: makeAdr061GateRunner(projectRoot)
|
|
27201
|
+
});
|
|
27088
27202
|
return {
|
|
27089
27203
|
success: true,
|
|
27090
27204
|
data: result,
|
|
@@ -28107,6 +28221,139 @@ var init_sticky2 = __esm({
|
|
|
28107
28221
|
|
|
28108
28222
|
// packages/cleo/src/dispatch/domains/tasks.ts
|
|
28109
28223
|
import { getLogger as getLogger14, getProjectRoot as getProjectRoot15 } from "@cleocode/core";
|
|
28224
|
+
async function sagaCreate(params) {
|
|
28225
|
+
const projectRoot = getProjectRoot15();
|
|
28226
|
+
const title = typeof params.title === "string" ? params.title : "";
|
|
28227
|
+
const description = typeof params.description === "string" ? params.description : void 0;
|
|
28228
|
+
const acceptance = Array.isArray(params.acceptance) ? params.acceptance : void 0;
|
|
28229
|
+
return wrapCoreResult(
|
|
28230
|
+
await addTaskWithSessionScope(projectRoot, {
|
|
28231
|
+
title,
|
|
28232
|
+
description,
|
|
28233
|
+
labels: ["saga"],
|
|
28234
|
+
type: "epic",
|
|
28235
|
+
acceptance
|
|
28236
|
+
}),
|
|
28237
|
+
"saga.create"
|
|
28238
|
+
);
|
|
28239
|
+
}
|
|
28240
|
+
async function sagaAdd(params) {
|
|
28241
|
+
const projectRoot = getProjectRoot15();
|
|
28242
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
28243
|
+
const epicId = typeof params.epicId === "string" ? params.epicId : "";
|
|
28244
|
+
if (!sagaId || !epicId) {
|
|
28245
|
+
return lafsError("E_INVALID_INPUT", "sagaId and epicId are required", "saga.add");
|
|
28246
|
+
}
|
|
28247
|
+
const sagaResult = await taskShow(projectRoot, sagaId);
|
|
28248
|
+
if (!sagaResult.success || !sagaResult.data) {
|
|
28249
|
+
return lafsError("E_NOT_FOUND", `Saga not found: ${sagaId}`, "saga.add");
|
|
28250
|
+
}
|
|
28251
|
+
const sagaTask = sagaResult.data.task;
|
|
28252
|
+
const sagaLabels = sagaTask?.labels ?? [];
|
|
28253
|
+
if (!sagaLabels.includes("saga")) {
|
|
28254
|
+
return lafsError("E_INVALID_INPUT", `Task ${sagaId} does not have label='saga'`, "saga.add");
|
|
28255
|
+
}
|
|
28256
|
+
const epicResult = await taskShow(projectRoot, epicId);
|
|
28257
|
+
if (!epicResult.success || !epicResult.data) {
|
|
28258
|
+
return lafsError("E_NOT_FOUND", `Epic not found: ${epicId}`, "saga.add");
|
|
28259
|
+
}
|
|
28260
|
+
const epicType = epicResult.data.task?.type;
|
|
28261
|
+
if (epicType !== "epic") {
|
|
28262
|
+
return lafsError(
|
|
28263
|
+
"E_INVALID_INPUT",
|
|
28264
|
+
`Task ${epicId} has type='${String(epicType)}', expected type='epic'`,
|
|
28265
|
+
"saga.add"
|
|
28266
|
+
);
|
|
28267
|
+
}
|
|
28268
|
+
const relResult = await taskRelatesAdd(projectRoot, sagaId, epicId, "groups", void 0);
|
|
28269
|
+
if (!relResult.success) {
|
|
28270
|
+
return lafsError(
|
|
28271
|
+
"E_GENERAL",
|
|
28272
|
+
relResult.error?.message ?? "Failed to link Epic to Saga",
|
|
28273
|
+
"saga.add"
|
|
28274
|
+
);
|
|
28275
|
+
}
|
|
28276
|
+
return lafsSuccess({ sagaId, epicId, added: relResult.data?.added ?? true }, "saga.add");
|
|
28277
|
+
}
|
|
28278
|
+
async function sagaList() {
|
|
28279
|
+
const projectRoot = getProjectRoot15();
|
|
28280
|
+
const result = await taskList(projectRoot, { type: "epic", label: "saga" });
|
|
28281
|
+
if (!result.success) {
|
|
28282
|
+
return lafsError("E_GENERAL", result.error?.message ?? "Failed to list Sagas", "saga.list");
|
|
28283
|
+
}
|
|
28284
|
+
const tasks = result.data?.tasks ?? [];
|
|
28285
|
+
const topLevel = tasks.filter((t) => {
|
|
28286
|
+
const parentId = t.parentId;
|
|
28287
|
+
return !parentId;
|
|
28288
|
+
});
|
|
28289
|
+
return lafsSuccess({ sagas: topLevel, total: topLevel.length }, "saga.list");
|
|
28290
|
+
}
|
|
28291
|
+
async function sagaMembers(params) {
|
|
28292
|
+
const projectRoot = getProjectRoot15();
|
|
28293
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
28294
|
+
if (!sagaId) {
|
|
28295
|
+
return lafsError("E_INVALID_INPUT", "sagaId is required", "saga.members");
|
|
28296
|
+
}
|
|
28297
|
+
const result = await taskRelates(projectRoot, sagaId);
|
|
28298
|
+
if (!result.success) {
|
|
28299
|
+
return lafsError(
|
|
28300
|
+
"E_GENERAL",
|
|
28301
|
+
result.error?.message ?? "Failed to list Saga members",
|
|
28302
|
+
"saga.members"
|
|
28303
|
+
);
|
|
28304
|
+
}
|
|
28305
|
+
const relations = result.data?.relations ?? [];
|
|
28306
|
+
const members = relations.filter((r) => r.type === "groups");
|
|
28307
|
+
return lafsSuccess(
|
|
28308
|
+
{
|
|
28309
|
+
sagaId,
|
|
28310
|
+
members: members.map((r) => ({ epicId: r.taskId, type: r.type, reason: r.reason })),
|
|
28311
|
+
total: members.length
|
|
28312
|
+
},
|
|
28313
|
+
"saga.members"
|
|
28314
|
+
);
|
|
28315
|
+
}
|
|
28316
|
+
async function sagaRollup(params) {
|
|
28317
|
+
const projectRoot = getProjectRoot15();
|
|
28318
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
28319
|
+
if (!sagaId) {
|
|
28320
|
+
return lafsError("E_INVALID_INPUT", "sagaId is required", "saga.rollup");
|
|
28321
|
+
}
|
|
28322
|
+
const relResult = await taskRelates(projectRoot, sagaId);
|
|
28323
|
+
if (!relResult.success) {
|
|
28324
|
+
return lafsError(
|
|
28325
|
+
"E_GENERAL",
|
|
28326
|
+
relResult.error?.message ?? "Failed to fetch Saga members for rollup",
|
|
28327
|
+
"saga.rollup"
|
|
28328
|
+
);
|
|
28329
|
+
}
|
|
28330
|
+
const members = (relResult.data?.relations ?? []).filter((r) => r.type === "groups");
|
|
28331
|
+
const total = members.length;
|
|
28332
|
+
if (total === 0) {
|
|
28333
|
+
return lafsSuccess(
|
|
28334
|
+
{ sagaId, total: 0, done: 0, active: 0, blocked: 0, pending: 0, completionPct: 0 },
|
|
28335
|
+
"saga.rollup"
|
|
28336
|
+
);
|
|
28337
|
+
}
|
|
28338
|
+
const shows = await Promise.all(members.map((m) => taskShow(projectRoot, m.taskId)));
|
|
28339
|
+
let done = 0;
|
|
28340
|
+
let active = 0;
|
|
28341
|
+
let blocked = 0;
|
|
28342
|
+
let pending = 0;
|
|
28343
|
+
for (const r of shows) {
|
|
28344
|
+
if (!r.success) continue;
|
|
28345
|
+
const status = r.data?.task?.status ?? "pending";
|
|
28346
|
+
if (status === "done") done++;
|
|
28347
|
+
else if (status === "active") active++;
|
|
28348
|
+
else if (status === "blocked") blocked++;
|
|
28349
|
+
else pending++;
|
|
28350
|
+
}
|
|
28351
|
+
const completionPct = total > 0 ? Math.round(done / total * 100) : 0;
|
|
28352
|
+
return lafsSuccess(
|
|
28353
|
+
{ sagaId, total, done, active, blocked, pending, completionPct },
|
|
28354
|
+
"saga.rollup"
|
|
28355
|
+
);
|
|
28356
|
+
}
|
|
28110
28357
|
var _tasksTypedHandler, QUERY_OPS10, MUTATE_OPS10, TasksHandler;
|
|
28111
28358
|
var init_tasks3 = __esm({
|
|
28112
28359
|
"packages/cleo/src/dispatch/domains/tasks.ts"() {
|
|
@@ -28512,7 +28759,11 @@ var init_tasks3 = __esm({
|
|
|
28512
28759
|
"history",
|
|
28513
28760
|
"current",
|
|
28514
28761
|
"label.list",
|
|
28515
|
-
"sync.links"
|
|
28762
|
+
"sync.links",
|
|
28763
|
+
// Saga sub-domain (ADR-073)
|
|
28764
|
+
"saga.list",
|
|
28765
|
+
"saga.members",
|
|
28766
|
+
"saga.rollup"
|
|
28516
28767
|
]);
|
|
28517
28768
|
MUTATE_OPS10 = /* @__PURE__ */ new Set([
|
|
28518
28769
|
"add",
|
|
@@ -28531,7 +28782,10 @@ var init_tasks3 = __esm({
|
|
|
28531
28782
|
"sync.reconcile",
|
|
28532
28783
|
"sync.links.remove",
|
|
28533
28784
|
"claim",
|
|
28534
|
-
"unclaim"
|
|
28785
|
+
"unclaim",
|
|
28786
|
+
// Saga sub-domain (ADR-073)
|
|
28787
|
+
"saga.create",
|
|
28788
|
+
"saga.add"
|
|
28535
28789
|
]);
|
|
28536
28790
|
TasksHandler = class {
|
|
28537
28791
|
// -----------------------------------------------------------------------
|
|
@@ -28558,6 +28812,26 @@ var init_tasks3 = __esm({
|
|
|
28558
28812
|
startTime
|
|
28559
28813
|
);
|
|
28560
28814
|
}
|
|
28815
|
+
try {
|
|
28816
|
+
if (operation === "saga.list") {
|
|
28817
|
+
const envelope = await sagaList();
|
|
28818
|
+
return wrapResult(envelopeToEngineResult(envelope), "query", "tasks", operation, startTime);
|
|
28819
|
+
}
|
|
28820
|
+
if (operation === "saga.members") {
|
|
28821
|
+
const envelope = await sagaMembers(params ?? {});
|
|
28822
|
+
return wrapResult(envelopeToEngineResult(envelope), "query", "tasks", operation, startTime);
|
|
28823
|
+
}
|
|
28824
|
+
if (operation === "saga.rollup") {
|
|
28825
|
+
const envelope = await sagaRollup(params ?? {});
|
|
28826
|
+
return wrapResult(envelopeToEngineResult(envelope), "query", "tasks", operation, startTime);
|
|
28827
|
+
}
|
|
28828
|
+
} catch (error) {
|
|
28829
|
+
getLogger14("domain:tasks").error(
|
|
28830
|
+
{ gateway: "query", domain: "tasks", operation, err: error },
|
|
28831
|
+
error instanceof Error ? error.message : String(error)
|
|
28832
|
+
);
|
|
28833
|
+
return handleErrorResult("query", "tasks", operation, error, startTime);
|
|
28834
|
+
}
|
|
28561
28835
|
try {
|
|
28562
28836
|
const envelope = await typedDispatch(
|
|
28563
28837
|
_tasksTypedHandler,
|
|
@@ -28587,6 +28861,34 @@ var init_tasks3 = __esm({
|
|
|
28587
28861
|
if (!MUTATE_OPS10.has(operation)) {
|
|
28588
28862
|
return unsupportedOp("mutate", "tasks", operation, startTime);
|
|
28589
28863
|
}
|
|
28864
|
+
try {
|
|
28865
|
+
if (operation === "saga.create") {
|
|
28866
|
+
const envelope = await sagaCreate(params ?? {});
|
|
28867
|
+
return wrapResult(
|
|
28868
|
+
envelopeToEngineResult(envelope),
|
|
28869
|
+
"mutate",
|
|
28870
|
+
"tasks",
|
|
28871
|
+
operation,
|
|
28872
|
+
startTime
|
|
28873
|
+
);
|
|
28874
|
+
}
|
|
28875
|
+
if (operation === "saga.add") {
|
|
28876
|
+
const envelope = await sagaAdd(params ?? {});
|
|
28877
|
+
return wrapResult(
|
|
28878
|
+
envelopeToEngineResult(envelope),
|
|
28879
|
+
"mutate",
|
|
28880
|
+
"tasks",
|
|
28881
|
+
operation,
|
|
28882
|
+
startTime
|
|
28883
|
+
);
|
|
28884
|
+
}
|
|
28885
|
+
} catch (error) {
|
|
28886
|
+
getLogger14("domain:tasks").error(
|
|
28887
|
+
{ gateway: "mutate", domain: "tasks", operation, err: error },
|
|
28888
|
+
error instanceof Error ? error.message : String(error)
|
|
28889
|
+
);
|
|
28890
|
+
return handleErrorResult("mutate", "tasks", operation, error, startTime);
|
|
28891
|
+
}
|
|
28590
28892
|
try {
|
|
28591
28893
|
const envelope = await typedDispatch(
|
|
28592
28894
|
_tasksTypedHandler,
|
|
@@ -28626,7 +28928,11 @@ var init_tasks3 = __esm({
|
|
|
28626
28928
|
"history",
|
|
28627
28929
|
"current",
|
|
28628
28930
|
"label.list",
|
|
28629
|
-
"sync.links"
|
|
28931
|
+
"sync.links",
|
|
28932
|
+
// Saga sub-domain (ADR-073)
|
|
28933
|
+
"saga.list",
|
|
28934
|
+
"saga.members",
|
|
28935
|
+
"saga.rollup"
|
|
28630
28936
|
],
|
|
28631
28937
|
mutate: [
|
|
28632
28938
|
"add",
|
|
@@ -28645,7 +28951,10 @@ var init_tasks3 = __esm({
|
|
|
28645
28951
|
"sync.reconcile",
|
|
28646
28952
|
"sync.links.remove",
|
|
28647
28953
|
"claim",
|
|
28648
|
-
"unclaim"
|
|
28954
|
+
"unclaim",
|
|
28955
|
+
// Saga sub-domain (ADR-073)
|
|
28956
|
+
"saga.create",
|
|
28957
|
+
"saga.add"
|
|
28649
28958
|
]
|
|
28650
28959
|
};
|
|
28651
28960
|
}
|
|
@@ -53092,7 +53401,11 @@ var init_release3 = __esm({
|
|
|
53092
53401
|
verifyCommand2 = defineCommand({
|
|
53093
53402
|
meta: { name: "verify", description: "Verify release gates + child task gate state" },
|
|
53094
53403
|
async run() {
|
|
53095
|
-
const
|
|
53404
|
+
const projectRoot = process.cwd();
|
|
53405
|
+
const handle = release2.loadActiveReleaseHandle(projectRoot);
|
|
53406
|
+
const result = await release2.releaseVerify(handle, {
|
|
53407
|
+
runGate: release2.makeAdr061GateRunner(projectRoot)
|
|
53408
|
+
});
|
|
53096
53409
|
cliOutput(result, { command: "release", operation: "release.verify" });
|
|
53097
53410
|
if (!result.passed) process.exit(1);
|
|
53098
53411
|
}
|
|
@@ -54784,6 +55097,153 @@ var init_safestop = __esm({
|
|
|
54784
55097
|
}
|
|
54785
55098
|
});
|
|
54786
55099
|
|
|
55100
|
+
// packages/cleo/src/cli/commands/saga.ts
|
|
55101
|
+
var saga_exports = {};
|
|
55102
|
+
__export(saga_exports, {
|
|
55103
|
+
sagaCommand: () => sagaCommand
|
|
55104
|
+
});
|
|
55105
|
+
var createCommand3, addCommand9, listCommand20, membersCommand, rollupCommand2, sagaCommand;
|
|
55106
|
+
var init_saga = __esm({
|
|
55107
|
+
"packages/cleo/src/cli/commands/saga.ts"() {
|
|
55108
|
+
"use strict";
|
|
55109
|
+
init_dist();
|
|
55110
|
+
init_cli();
|
|
55111
|
+
init_renderers();
|
|
55112
|
+
createCommand3 = defineCommand({
|
|
55113
|
+
meta: {
|
|
55114
|
+
name: "create",
|
|
55115
|
+
description: "Create a new Saga (labeled top-level Epic with label=saga)"
|
|
55116
|
+
},
|
|
55117
|
+
args: {
|
|
55118
|
+
title: {
|
|
55119
|
+
type: "string",
|
|
55120
|
+
description: "Saga title",
|
|
55121
|
+
required: true
|
|
55122
|
+
},
|
|
55123
|
+
description: {
|
|
55124
|
+
type: "string",
|
|
55125
|
+
description: "Saga description",
|
|
55126
|
+
required: false
|
|
55127
|
+
},
|
|
55128
|
+
acceptance: {
|
|
55129
|
+
type: "string",
|
|
55130
|
+
description: 'Pipe-separated acceptance criteria (e.g. "AC1|AC2")',
|
|
55131
|
+
required: false
|
|
55132
|
+
}
|
|
55133
|
+
},
|
|
55134
|
+
async run({ args }) {
|
|
55135
|
+
await dispatchFromCli(
|
|
55136
|
+
"mutate",
|
|
55137
|
+
"tasks",
|
|
55138
|
+
"saga.create",
|
|
55139
|
+
{
|
|
55140
|
+
title: args.title,
|
|
55141
|
+
description: args.description,
|
|
55142
|
+
acceptance: args.acceptance ? args.acceptance.split("|") : void 0
|
|
55143
|
+
},
|
|
55144
|
+
{ command: "saga", operation: "tasks.saga.create" }
|
|
55145
|
+
);
|
|
55146
|
+
}
|
|
55147
|
+
});
|
|
55148
|
+
addCommand9 = defineCommand({
|
|
55149
|
+
meta: {
|
|
55150
|
+
name: "add",
|
|
55151
|
+
description: "Link a member Epic to a Saga (writes task_relations type=groups)"
|
|
55152
|
+
},
|
|
55153
|
+
args: {
|
|
55154
|
+
sagaId: {
|
|
55155
|
+
type: "positional",
|
|
55156
|
+
description: "Saga task ID (must have label=saga)",
|
|
55157
|
+
required: true
|
|
55158
|
+
},
|
|
55159
|
+
epicId: {
|
|
55160
|
+
type: "positional",
|
|
55161
|
+
description: "Epic task ID to add as a member",
|
|
55162
|
+
required: true
|
|
55163
|
+
}
|
|
55164
|
+
},
|
|
55165
|
+
async run({ args }) {
|
|
55166
|
+
await dispatchFromCli(
|
|
55167
|
+
"mutate",
|
|
55168
|
+
"tasks",
|
|
55169
|
+
"saga.add",
|
|
55170
|
+
{ sagaId: args.sagaId, epicId: args.epicId },
|
|
55171
|
+
{ command: "saga", operation: "tasks.saga.add" }
|
|
55172
|
+
);
|
|
55173
|
+
}
|
|
55174
|
+
});
|
|
55175
|
+
listCommand20 = defineCommand({
|
|
55176
|
+
meta: {
|
|
55177
|
+
name: "list",
|
|
55178
|
+
description: "List all Sagas (labeled top-level Epics)"
|
|
55179
|
+
},
|
|
55180
|
+
async run() {
|
|
55181
|
+
await dispatchFromCli("query", "tasks", "saga.list", {}, { command: "saga" });
|
|
55182
|
+
}
|
|
55183
|
+
});
|
|
55184
|
+
membersCommand = defineCommand({
|
|
55185
|
+
meta: {
|
|
55186
|
+
name: "members",
|
|
55187
|
+
description: "List all member Epics linked to a Saga via type=groups"
|
|
55188
|
+
},
|
|
55189
|
+
args: {
|
|
55190
|
+
sagaId: {
|
|
55191
|
+
type: "positional",
|
|
55192
|
+
description: "Saga task ID",
|
|
55193
|
+
required: true
|
|
55194
|
+
}
|
|
55195
|
+
},
|
|
55196
|
+
async run({ args }) {
|
|
55197
|
+
await dispatchFromCli(
|
|
55198
|
+
"query",
|
|
55199
|
+
"tasks",
|
|
55200
|
+
"saga.members",
|
|
55201
|
+
{ sagaId: args.sagaId },
|
|
55202
|
+
{ command: "saga" }
|
|
55203
|
+
);
|
|
55204
|
+
}
|
|
55205
|
+
});
|
|
55206
|
+
rollupCommand2 = defineCommand({
|
|
55207
|
+
meta: {
|
|
55208
|
+
name: "rollup",
|
|
55209
|
+
description: "Aggregate member Epic statuses: total/done/active/blocked/pending + completionPct"
|
|
55210
|
+
},
|
|
55211
|
+
args: {
|
|
55212
|
+
sagaId: {
|
|
55213
|
+
type: "positional",
|
|
55214
|
+
description: "Saga task ID",
|
|
55215
|
+
required: true
|
|
55216
|
+
}
|
|
55217
|
+
},
|
|
55218
|
+
async run({ args }) {
|
|
55219
|
+
const response = await dispatchRaw("query", "tasks", "saga.rollup", {
|
|
55220
|
+
sagaId: args.sagaId
|
|
55221
|
+
});
|
|
55222
|
+
handleRawError(response, { command: "saga", operation: "tasks.saga.rollup" });
|
|
55223
|
+
cliOutput(response.data ?? {}, { command: "saga", operation: "tasks.saga.rollup" });
|
|
55224
|
+
}
|
|
55225
|
+
});
|
|
55226
|
+
sagaCommand = defineCommand({
|
|
55227
|
+
meta: {
|
|
55228
|
+
name: "saga",
|
|
55229
|
+
description: "Saga management \u2014 above-Epic grouping tier (ADR-073)"
|
|
55230
|
+
},
|
|
55231
|
+
subCommands: {
|
|
55232
|
+
create: createCommand3,
|
|
55233
|
+
add: addCommand9,
|
|
55234
|
+
list: listCommand20,
|
|
55235
|
+
members: membersCommand,
|
|
55236
|
+
rollup: rollupCommand2
|
|
55237
|
+
},
|
|
55238
|
+
async run({ cmd, rawArgs }) {
|
|
55239
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
55240
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
55241
|
+
await showUsage(cmd);
|
|
55242
|
+
}
|
|
55243
|
+
});
|
|
55244
|
+
}
|
|
55245
|
+
});
|
|
55246
|
+
|
|
54787
55247
|
// packages/cleo/src/cli/commands/schema.ts
|
|
54788
55248
|
var schema_exports = {};
|
|
54789
55249
|
__export(schema_exports, {
|
|
@@ -56192,7 +56652,7 @@ async function promptOwnerAuthPassword(sessionName) {
|
|
|
56192
56652
|
const token = deriveOwnerAuthToken(sessionName, password);
|
|
56193
56653
|
return token;
|
|
56194
56654
|
}
|
|
56195
|
-
var startCommand8, endCommand, handoffCommand2, statusCommand12, resumeCommand2, findCommand6,
|
|
56655
|
+
var startCommand8, endCommand, handoffCommand2, statusCommand12, resumeCommand2, findCommand6, listCommand21, gcCommand2, showCommand13, driftCommand, contextDriftCommand, suspendCommand, recordAssumptionCommand, recordDecisionCommand, decisionLogCommand, sessionCommand;
|
|
56196
56656
|
var init_session4 = __esm({
|
|
56197
56657
|
"packages/cleo/src/cli/commands/session.ts"() {
|
|
56198
56658
|
"use strict";
|
|
@@ -56458,7 +56918,7 @@ var init_session4 = __esm({
|
|
|
56458
56918
|
);
|
|
56459
56919
|
}
|
|
56460
56920
|
});
|
|
56461
|
-
|
|
56921
|
+
listCommand21 = defineCommand({
|
|
56462
56922
|
meta: { name: "list", description: "List sessions" },
|
|
56463
56923
|
args: {
|
|
56464
56924
|
status: {
|
|
@@ -56723,7 +57183,7 @@ var init_session4 = __esm({
|
|
|
56723
57183
|
status: statusCommand12,
|
|
56724
57184
|
resume: resumeCommand2,
|
|
56725
57185
|
find: findCommand6,
|
|
56726
|
-
list:
|
|
57186
|
+
list: listCommand21,
|
|
56727
57187
|
gc: gcCommand2,
|
|
56728
57188
|
show: showCommand13,
|
|
56729
57189
|
"context-drift": contextDriftCommand,
|
|
@@ -56782,14 +57242,14 @@ var skills_exports = {};
|
|
|
56782
57242
|
__export(skills_exports, {
|
|
56783
57243
|
skillsCommand: () => skillsCommand2
|
|
56784
57244
|
});
|
|
56785
|
-
var
|
|
57245
|
+
var listCommand22, searchCommand4, validateCommand8, infoCommand, installCommand3, uninstallCommand2, enableCommand2, disableCommand2, refreshCommand, dispatchCommand, catalogCommand, precedenceCommand, depsCommand4, spawnProvidersCommand, skillsCommand2;
|
|
56786
57246
|
var init_skills2 = __esm({
|
|
56787
57247
|
"packages/cleo/src/cli/commands/skills.ts"() {
|
|
56788
57248
|
"use strict";
|
|
56789
57249
|
init_dist();
|
|
56790
57250
|
init_cli();
|
|
56791
57251
|
init_subcommand_guard();
|
|
56792
|
-
|
|
57252
|
+
listCommand22 = defineCommand({
|
|
56793
57253
|
meta: { name: "list", description: "List installed skills" },
|
|
56794
57254
|
args: {
|
|
56795
57255
|
global: {
|
|
@@ -57104,7 +57564,7 @@ var init_skills2 = __esm({
|
|
|
57104
57564
|
skillsCommand2 = defineCommand({
|
|
57105
57565
|
meta: { name: "skills", description: "Skill management: list, search, validate, info, install" },
|
|
57106
57566
|
subCommands: {
|
|
57107
|
-
list:
|
|
57567
|
+
list: listCommand22,
|
|
57108
57568
|
search: searchCommand4,
|
|
57109
57569
|
validate: validateCommand8,
|
|
57110
57570
|
info: infoCommand,
|
|
@@ -57348,7 +57808,7 @@ __export(sticky_exports, {
|
|
|
57348
57808
|
stickyCommand: () => stickyCommand
|
|
57349
57809
|
});
|
|
57350
57810
|
import { CleoError as CleoError10 } from "@cleocode/core";
|
|
57351
|
-
var
|
|
57811
|
+
var addCommand10, listCommand23, showCommand15, convertCommand, archiveCommand4, purgeCommand2, stickyCommand;
|
|
57352
57812
|
var init_sticky3 = __esm({
|
|
57353
57813
|
"packages/cleo/src/cli/commands/sticky.ts"() {
|
|
57354
57814
|
"use strict";
|
|
@@ -57356,7 +57816,7 @@ var init_sticky3 = __esm({
|
|
|
57356
57816
|
init_dist();
|
|
57357
57817
|
init_cli();
|
|
57358
57818
|
init_renderers();
|
|
57359
|
-
|
|
57819
|
+
addCommand10 = defineCommand({
|
|
57360
57820
|
meta: { name: "add", description: "Create a new sticky note" },
|
|
57361
57821
|
args: {
|
|
57362
57822
|
content: {
|
|
@@ -57404,7 +57864,7 @@ var init_sticky3 = __esm({
|
|
|
57404
57864
|
}
|
|
57405
57865
|
}
|
|
57406
57866
|
});
|
|
57407
|
-
|
|
57867
|
+
listCommand23 = defineCommand({
|
|
57408
57868
|
meta: { name: "list", description: "List active sticky notes" },
|
|
57409
57869
|
args: {
|
|
57410
57870
|
tag: {
|
|
@@ -57638,10 +58098,10 @@ var init_sticky3 = __esm({
|
|
|
57638
58098
|
description: "Manage sticky notes - quick project-wide ephemeral captures"
|
|
57639
58099
|
},
|
|
57640
58100
|
subCommands: {
|
|
57641
|
-
add:
|
|
57642
|
-
jot:
|
|
57643
|
-
list:
|
|
57644
|
-
ls:
|
|
58101
|
+
add: addCommand10,
|
|
58102
|
+
jot: addCommand10,
|
|
58103
|
+
list: listCommand23,
|
|
58104
|
+
ls: listCommand23,
|
|
57645
58105
|
show: showCommand15,
|
|
57646
58106
|
convert: convertCommand,
|
|
57647
58107
|
archive: archiveCommand4,
|
|
@@ -58062,7 +58522,7 @@ function readPayload(args, textKey, fileKey) {
|
|
|
58062
58522
|
if (file) return readFileSync15(file, "utf-8");
|
|
58063
58523
|
return text;
|
|
58064
58524
|
}
|
|
58065
|
-
var filterArgs, summaryCommand3,
|
|
58525
|
+
var filterArgs, summaryCommand3, listCommand24, showCommand16, deleteCommand3, clearCommand2, estimateCommand, tokenCommand;
|
|
58066
58526
|
var init_token = __esm({
|
|
58067
58527
|
"packages/cleo/src/cli/commands/token.ts"() {
|
|
58068
58528
|
"use strict";
|
|
@@ -58098,7 +58558,7 @@ var init_token = __esm({
|
|
|
58098
58558
|
);
|
|
58099
58559
|
}
|
|
58100
58560
|
});
|
|
58101
|
-
|
|
58561
|
+
listCommand24 = defineCommand({
|
|
58102
58562
|
meta: { name: "list", description: "List recorded token telemetry" },
|
|
58103
58563
|
args: {
|
|
58104
58564
|
...filterArgs,
|
|
@@ -58233,7 +58693,7 @@ var init_token = __esm({
|
|
|
58233
58693
|
},
|
|
58234
58694
|
subCommands: {
|
|
58235
58695
|
summary: summaryCommand3,
|
|
58236
|
-
list:
|
|
58696
|
+
list: listCommand24,
|
|
58237
58697
|
show: showCommand16,
|
|
58238
58698
|
delete: deleteCommand3,
|
|
58239
58699
|
clear: clearCommand2,
|
|
@@ -60170,6 +60630,12 @@ var COMMAND_MANIFEST = [
|
|
|
60170
60630
|
description: "Graceful shutdown for agents approaching context limits",
|
|
60171
60631
|
load: async () => (await Promise.resolve().then(() => (init_safestop(), safestop_exports))).safestopCommand
|
|
60172
60632
|
},
|
|
60633
|
+
{
|
|
60634
|
+
exportName: "sagaCommand",
|
|
60635
|
+
name: "saga",
|
|
60636
|
+
description: "Saga management \u2014 above-Epic grouping tier (ADR-073)",
|
|
60637
|
+
load: async () => (await Promise.resolve().then(() => (init_saga(), saga_exports))).sagaCommand
|
|
60638
|
+
},
|
|
60173
60639
|
{
|
|
60174
60640
|
exportName: "schemaCommand",
|
|
60175
60641
|
name: "schema",
|