@cleocode/cleo 2026.5.74 → 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 +854 -196
- package/dist/cli/index.js.map +3 -3
- package/package.json +10 -10
package/dist/cli/index.js
CHANGED
|
@@ -2779,6 +2779,171 @@ var init_src2 = __esm({
|
|
|
2779
2779
|
}
|
|
2780
2780
|
});
|
|
2781
2781
|
|
|
2782
|
+
// packages/cleo/src/cli/renderers/colors.ts
|
|
2783
|
+
function ansi(code) {
|
|
2784
|
+
return colorsEnabled ? code : "";
|
|
2785
|
+
}
|
|
2786
|
+
function statusSymbol(status) {
|
|
2787
|
+
const map2 = unicodeEnabled ? TASK_STATUS_SYMBOLS_UNICODE : TASK_STATUS_SYMBOLS_ASCII;
|
|
2788
|
+
return map2[status] ?? "?";
|
|
2789
|
+
}
|
|
2790
|
+
function statusColor(status) {
|
|
2791
|
+
switch (status) {
|
|
2792
|
+
case "pending":
|
|
2793
|
+
return CYAN;
|
|
2794
|
+
case "active":
|
|
2795
|
+
return GREEN;
|
|
2796
|
+
case "blocked":
|
|
2797
|
+
return RED;
|
|
2798
|
+
case "done":
|
|
2799
|
+
return DIM;
|
|
2800
|
+
case "cancelled":
|
|
2801
|
+
return DIM;
|
|
2802
|
+
case "archived":
|
|
2803
|
+
return DIM;
|
|
2804
|
+
default:
|
|
2805
|
+
return "";
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
function prioritySymbol(priority) {
|
|
2809
|
+
if (unicodeEnabled) {
|
|
2810
|
+
switch (priority) {
|
|
2811
|
+
case "critical":
|
|
2812
|
+
return "\u{1F534}";
|
|
2813
|
+
// red circle emoji
|
|
2814
|
+
case "high":
|
|
2815
|
+
return "\u{1F7E1}";
|
|
2816
|
+
// yellow circle emoji
|
|
2817
|
+
case "medium":
|
|
2818
|
+
return "\u{1F535}";
|
|
2819
|
+
// blue circle emoji
|
|
2820
|
+
case "low":
|
|
2821
|
+
return "\u26AA";
|
|
2822
|
+
// white circle emoji
|
|
2823
|
+
default:
|
|
2824
|
+
return "";
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
switch (priority) {
|
|
2828
|
+
case "critical":
|
|
2829
|
+
return "!";
|
|
2830
|
+
case "high":
|
|
2831
|
+
return "H";
|
|
2832
|
+
case "medium":
|
|
2833
|
+
return "M";
|
|
2834
|
+
case "low":
|
|
2835
|
+
return "L";
|
|
2836
|
+
default:
|
|
2837
|
+
return "";
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
function priorityColor(priority) {
|
|
2841
|
+
switch (priority) {
|
|
2842
|
+
case "critical":
|
|
2843
|
+
return RED;
|
|
2844
|
+
case "high":
|
|
2845
|
+
return YELLOW;
|
|
2846
|
+
case "medium":
|
|
2847
|
+
return BLUE;
|
|
2848
|
+
case "low":
|
|
2849
|
+
return DIM;
|
|
2850
|
+
default:
|
|
2851
|
+
return "";
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
function hRule(width = 65) {
|
|
2855
|
+
return BOX.h.repeat(width);
|
|
2856
|
+
}
|
|
2857
|
+
function shortDate(isoDate) {
|
|
2858
|
+
if (!isoDate) return "";
|
|
2859
|
+
return isoDate.split("T")[0] ?? isoDate;
|
|
2860
|
+
}
|
|
2861
|
+
var colorsEnabled, unicodeEnabled, BOLD, DIM, NC, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, BOX;
|
|
2862
|
+
var init_colors = __esm({
|
|
2863
|
+
"packages/cleo/src/cli/renderers/colors.ts"() {
|
|
2864
|
+
"use strict";
|
|
2865
|
+
init_src2();
|
|
2866
|
+
colorsEnabled = (() => {
|
|
2867
|
+
if (process.env["NO_COLOR"] !== void 0) return false;
|
|
2868
|
+
if (process.env["FORCE_COLOR"] !== void 0) return true;
|
|
2869
|
+
return process.stdout.isTTY === true;
|
|
2870
|
+
})();
|
|
2871
|
+
unicodeEnabled = (() => {
|
|
2872
|
+
const lang = process.env["LANG"] ?? "";
|
|
2873
|
+
if (lang === "C" || lang === "POSIX") return false;
|
|
2874
|
+
return lang.includes("UTF") || process.platform === "darwin";
|
|
2875
|
+
})();
|
|
2876
|
+
BOLD = ansi("\x1B[1m");
|
|
2877
|
+
DIM = ansi("\x1B[2m");
|
|
2878
|
+
NC = ansi("\x1B[0m");
|
|
2879
|
+
RED = ansi("\x1B[0;31m");
|
|
2880
|
+
GREEN = ansi("\x1B[0;32m");
|
|
2881
|
+
YELLOW = ansi("\x1B[1;33m");
|
|
2882
|
+
BLUE = ansi("\x1B[0;34m");
|
|
2883
|
+
MAGENTA = ansi("\x1B[0;35m");
|
|
2884
|
+
CYAN = ansi("\x1B[0;36m");
|
|
2885
|
+
BOX = unicodeEnabled ? {
|
|
2886
|
+
tl: "\u256D",
|
|
2887
|
+
tr: "\u256E",
|
|
2888
|
+
bl: "\u2570",
|
|
2889
|
+
br: "\u256F",
|
|
2890
|
+
h: "\u2500",
|
|
2891
|
+
v: "\u2502",
|
|
2892
|
+
ml: "\u251C",
|
|
2893
|
+
mr: "\u2524"
|
|
2894
|
+
} : { tl: "+", tr: "+", bl: "+", br: "+", h: "-", v: "|", ml: "+", mr: "+" };
|
|
2895
|
+
}
|
|
2896
|
+
});
|
|
2897
|
+
|
|
2898
|
+
// packages/cleo/src/cli/renderers/format-helpers.ts
|
|
2899
|
+
function pagerFooter(input) {
|
|
2900
|
+
const { shown, page } = input;
|
|
2901
|
+
const total = page?.total ?? input.total ?? shown;
|
|
2902
|
+
const filtered = input.filtered;
|
|
2903
|
+
const hasMore = page?.hasMore === true || shown < total;
|
|
2904
|
+
const filterActive = typeof filtered === "number" && filtered !== total;
|
|
2905
|
+
if (!hasMore && !filterActive) return "";
|
|
2906
|
+
const parts = [`${shown} of ${total}`];
|
|
2907
|
+
if (filterActive) parts.push(`${filtered} after filter`);
|
|
2908
|
+
if (typeof page?.offset === "number") parts.push(`offset ${page.offset}`);
|
|
2909
|
+
if (typeof page?.limit === "number") parts.push(`--limit ${page.limit}`);
|
|
2910
|
+
if (hasMore) parts.push("--json for full set");
|
|
2911
|
+
return `${DIM}\u2500\u2500\u2500 ${parts.join(" \xB7 ")} \u2500\u2500\u2500${NC}`;
|
|
2912
|
+
}
|
|
2913
|
+
function metaFooter(meta) {
|
|
2914
|
+
if (!meta || typeof meta !== "object") return "";
|
|
2915
|
+
const lines = [];
|
|
2916
|
+
const deprecated = meta["deprecated"];
|
|
2917
|
+
if (deprecated && typeof deprecated === "object") {
|
|
2918
|
+
const since = deprecated.since ? ` since ${deprecated.since}` : "";
|
|
2919
|
+
const removeIn = deprecated.removeIn ? ` \xB7 removed in ${deprecated.removeIn}` : "";
|
|
2920
|
+
const replacement = deprecated.replacement ? ` \xB7 use \`${deprecated.replacement}\`` : "";
|
|
2921
|
+
lines.push(`${DIM}deprecated${since}${removeIn}${replacement}${NC}`);
|
|
2922
|
+
}
|
|
2923
|
+
const nexus = meta["_nexus"];
|
|
2924
|
+
const duration = meta["duration_ms"];
|
|
2925
|
+
const chips = [];
|
|
2926
|
+
if (nexus && typeof nexus === "object") {
|
|
2927
|
+
if (typeof nexus["scope"] === "string") chips.push(`scope=${nexus["scope"]}`);
|
|
2928
|
+
if (typeof nexus["projectName"] === "string") {
|
|
2929
|
+
chips.push(`project=${nexus["projectName"]}`);
|
|
2930
|
+
} else if (typeof nexus["projectId"] === "string") {
|
|
2931
|
+
const pid = String(nexus["projectId"]);
|
|
2932
|
+
chips.push(`project=${pid.length > 16 ? `${pid.slice(0, 13)}\u2026` : pid}`);
|
|
2933
|
+
}
|
|
2934
|
+
if (nexus["indexFreshness"] === "stale") chips.push(`${DIM}index=stale${NC}`);
|
|
2935
|
+
}
|
|
2936
|
+
if (typeof duration === "number" && duration > 0) chips.push(`${duration} ms`);
|
|
2937
|
+
if (chips.length > 0) lines.push(`${DIM}[${chips.join(" \xB7 ")}]${NC}`);
|
|
2938
|
+
return lines.join("\n");
|
|
2939
|
+
}
|
|
2940
|
+
var init_format_helpers = __esm({
|
|
2941
|
+
"packages/cleo/src/cli/renderers/format-helpers.ts"() {
|
|
2942
|
+
"use strict";
|
|
2943
|
+
init_colors();
|
|
2944
|
+
}
|
|
2945
|
+
});
|
|
2946
|
+
|
|
2782
2947
|
// packages/cleo/src/cli/renderers/lafs-validator.ts
|
|
2783
2948
|
function validateLafsShape(envelope) {
|
|
2784
2949
|
const report = {
|
|
@@ -2986,122 +3151,6 @@ var init_tree_context = __esm({
|
|
|
2986
3151
|
}
|
|
2987
3152
|
});
|
|
2988
3153
|
|
|
2989
|
-
// packages/cleo/src/cli/renderers/colors.ts
|
|
2990
|
-
function ansi(code) {
|
|
2991
|
-
return colorsEnabled ? code : "";
|
|
2992
|
-
}
|
|
2993
|
-
function statusSymbol(status) {
|
|
2994
|
-
const map2 = unicodeEnabled ? TASK_STATUS_SYMBOLS_UNICODE : TASK_STATUS_SYMBOLS_ASCII;
|
|
2995
|
-
return map2[status] ?? "?";
|
|
2996
|
-
}
|
|
2997
|
-
function statusColor(status) {
|
|
2998
|
-
switch (status) {
|
|
2999
|
-
case "pending":
|
|
3000
|
-
return CYAN;
|
|
3001
|
-
case "active":
|
|
3002
|
-
return GREEN;
|
|
3003
|
-
case "blocked":
|
|
3004
|
-
return RED;
|
|
3005
|
-
case "done":
|
|
3006
|
-
return DIM;
|
|
3007
|
-
case "cancelled":
|
|
3008
|
-
return DIM;
|
|
3009
|
-
case "archived":
|
|
3010
|
-
return DIM;
|
|
3011
|
-
default:
|
|
3012
|
-
return "";
|
|
3013
|
-
}
|
|
3014
|
-
}
|
|
3015
|
-
function prioritySymbol(priority) {
|
|
3016
|
-
if (unicodeEnabled) {
|
|
3017
|
-
switch (priority) {
|
|
3018
|
-
case "critical":
|
|
3019
|
-
return "\u{1F534}";
|
|
3020
|
-
// red circle emoji
|
|
3021
|
-
case "high":
|
|
3022
|
-
return "\u{1F7E1}";
|
|
3023
|
-
// yellow circle emoji
|
|
3024
|
-
case "medium":
|
|
3025
|
-
return "\u{1F535}";
|
|
3026
|
-
// blue circle emoji
|
|
3027
|
-
case "low":
|
|
3028
|
-
return "\u26AA";
|
|
3029
|
-
// white circle emoji
|
|
3030
|
-
default:
|
|
3031
|
-
return "";
|
|
3032
|
-
}
|
|
3033
|
-
}
|
|
3034
|
-
switch (priority) {
|
|
3035
|
-
case "critical":
|
|
3036
|
-
return "!";
|
|
3037
|
-
case "high":
|
|
3038
|
-
return "H";
|
|
3039
|
-
case "medium":
|
|
3040
|
-
return "M";
|
|
3041
|
-
case "low":
|
|
3042
|
-
return "L";
|
|
3043
|
-
default:
|
|
3044
|
-
return "";
|
|
3045
|
-
}
|
|
3046
|
-
}
|
|
3047
|
-
function priorityColor(priority) {
|
|
3048
|
-
switch (priority) {
|
|
3049
|
-
case "critical":
|
|
3050
|
-
return RED;
|
|
3051
|
-
case "high":
|
|
3052
|
-
return YELLOW;
|
|
3053
|
-
case "medium":
|
|
3054
|
-
return BLUE;
|
|
3055
|
-
case "low":
|
|
3056
|
-
return DIM;
|
|
3057
|
-
default:
|
|
3058
|
-
return "";
|
|
3059
|
-
}
|
|
3060
|
-
}
|
|
3061
|
-
function hRule(width = 65) {
|
|
3062
|
-
return BOX.h.repeat(width);
|
|
3063
|
-
}
|
|
3064
|
-
function shortDate(isoDate) {
|
|
3065
|
-
if (!isoDate) return "";
|
|
3066
|
-
return isoDate.split("T")[0] ?? isoDate;
|
|
3067
|
-
}
|
|
3068
|
-
var colorsEnabled, unicodeEnabled, BOLD, DIM, NC, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, BOX;
|
|
3069
|
-
var init_colors = __esm({
|
|
3070
|
-
"packages/cleo/src/cli/renderers/colors.ts"() {
|
|
3071
|
-
"use strict";
|
|
3072
|
-
init_src2();
|
|
3073
|
-
colorsEnabled = (() => {
|
|
3074
|
-
if (process.env["NO_COLOR"] !== void 0) return false;
|
|
3075
|
-
if (process.env["FORCE_COLOR"] !== void 0) return true;
|
|
3076
|
-
return process.stdout.isTTY === true;
|
|
3077
|
-
})();
|
|
3078
|
-
unicodeEnabled = (() => {
|
|
3079
|
-
const lang = process.env["LANG"] ?? "";
|
|
3080
|
-
if (lang === "C" || lang === "POSIX") return false;
|
|
3081
|
-
return lang.includes("UTF") || process.platform === "darwin";
|
|
3082
|
-
})();
|
|
3083
|
-
BOLD = ansi("\x1B[1m");
|
|
3084
|
-
DIM = ansi("\x1B[2m");
|
|
3085
|
-
NC = ansi("\x1B[0m");
|
|
3086
|
-
RED = ansi("\x1B[0;31m");
|
|
3087
|
-
GREEN = ansi("\x1B[0;32m");
|
|
3088
|
-
YELLOW = ansi("\x1B[1;33m");
|
|
3089
|
-
BLUE = ansi("\x1B[0;34m");
|
|
3090
|
-
MAGENTA = ansi("\x1B[0;35m");
|
|
3091
|
-
CYAN = ansi("\x1B[0;36m");
|
|
3092
|
-
BOX = unicodeEnabled ? {
|
|
3093
|
-
tl: "\u256D",
|
|
3094
|
-
tr: "\u256E",
|
|
3095
|
-
bl: "\u2570",
|
|
3096
|
-
br: "\u256F",
|
|
3097
|
-
h: "\u2500",
|
|
3098
|
-
v: "\u2502",
|
|
3099
|
-
ml: "\u251C",
|
|
3100
|
-
mr: "\u2524"
|
|
3101
|
-
} : { tl: "+", tr: "+", bl: "+", br: "+", h: "-", v: "|", ml: "+", mr: "+" };
|
|
3102
|
-
}
|
|
3103
|
-
});
|
|
3104
|
-
|
|
3105
3154
|
// packages/cleo/src/cli/renderers/system.ts
|
|
3106
3155
|
import { formatTree, formatWaves } from "@cleocode/core/formatters";
|
|
3107
3156
|
function cliColorize(text, style) {
|
|
@@ -3129,25 +3178,39 @@ function cliColorize(text, style) {
|
|
|
3129
3178
|
}
|
|
3130
3179
|
}
|
|
3131
3180
|
function renderDoctor(data, quiet) {
|
|
3132
|
-
const
|
|
3133
|
-
const
|
|
3134
|
-
const
|
|
3181
|
+
const overall = data["overall"] ?? "unknown";
|
|
3182
|
+
const version = data["version"];
|
|
3183
|
+
const installation = data["installation"];
|
|
3135
3184
|
const checks = data["checks"];
|
|
3136
3185
|
if (quiet) {
|
|
3137
|
-
return
|
|
3186
|
+
return overall;
|
|
3138
3187
|
}
|
|
3139
3188
|
const lines = [];
|
|
3140
|
-
const
|
|
3141
|
-
lines.push(`System Status: ${
|
|
3142
|
-
if (
|
|
3143
|
-
if (
|
|
3144
|
-
|
|
3145
|
-
|
|
3189
|
+
const statusBadge = overall === "pass" ? `${GREEN}${BOLD}HEALTHY${NC}` : overall === "warning" ? `${YELLOW}${BOLD}DEGRADED${NC}` : overall === "fail" ? `${RED}${BOLD}UNHEALTHY${NC}` : `${DIM}${overall.toUpperCase()}${NC}`;
|
|
3190
|
+
lines.push(`System Status: ${statusBadge}`);
|
|
3191
|
+
if (version) lines.push(` ${DIM}Version:${NC} ${version}`);
|
|
3192
|
+
if (installation) lines.push(` ${DIM}Installation:${NC} ${installation}`);
|
|
3193
|
+
if (checks && checks.length > 0) {
|
|
3194
|
+
let passCount = 0;
|
|
3195
|
+
let warnCount = 0;
|
|
3196
|
+
let failCount = 0;
|
|
3197
|
+
for (const c of checks) {
|
|
3198
|
+
const s = c["status"];
|
|
3199
|
+
if (s === "pass") passCount++;
|
|
3200
|
+
else if (s === "warn" || s === "warning") warnCount++;
|
|
3201
|
+
else failCount++;
|
|
3202
|
+
}
|
|
3203
|
+
lines.push(
|
|
3204
|
+
` ${DIM}Checks:${NC} ${GREEN}${passCount} pass${NC} \xB7 ${YELLOW}${warnCount} warn${NC} \xB7 ${RED}${failCount} fail${NC}`
|
|
3205
|
+
);
|
|
3206
|
+
lines.push("");
|
|
3146
3207
|
for (const check of checks) {
|
|
3147
3208
|
const status = check["status"];
|
|
3209
|
+
const name = check["name"];
|
|
3148
3210
|
const message = check["message"];
|
|
3149
|
-
const icon = status === "
|
|
3150
|
-
|
|
3211
|
+
const icon = status === "pass" ? `${GREEN}\u2713${NC}` : status === "warn" || status === "warning" ? `${YELLOW}\u26A0${NC}` : `${RED}\u2717${NC}`;
|
|
3212
|
+
const label = name ? `${BOLD}${name}${NC}` : "";
|
|
3213
|
+
lines.push(` ${icon} ${label}${label && message ? ` \u2014 ${message}` : message}`);
|
|
3151
3214
|
}
|
|
3152
3215
|
}
|
|
3153
3216
|
return lines.join("\n");
|
|
@@ -3208,25 +3271,53 @@ function renderNext(data, quiet) {
|
|
|
3208
3271
|
return "No suggestions available.";
|
|
3209
3272
|
}
|
|
3210
3273
|
function renderBlockers(data, quiet) {
|
|
3211
|
-
const
|
|
3212
|
-
const
|
|
3213
|
-
const
|
|
3214
|
-
|
|
3215
|
-
|
|
3274
|
+
const blockedTasks = data["blockedTasks"] ?? data["blockers"] ?? data["tasks"];
|
|
3275
|
+
const criticalBlockers = data["criticalBlockers"];
|
|
3276
|
+
const summary = data["summary"];
|
|
3277
|
+
const total = data["total"];
|
|
3278
|
+
const limit = data["limit"];
|
|
3279
|
+
if (!blockedTasks || blockedTasks.length === 0) {
|
|
3280
|
+
return quiet ? "" : summary ?? "No blocked tasks.";
|
|
3216
3281
|
}
|
|
3217
3282
|
if (quiet) {
|
|
3218
|
-
return
|
|
3283
|
+
return blockedTasks.map((b) => String(b["id"])).join("\n");
|
|
3219
3284
|
}
|
|
3220
3285
|
const lines = [];
|
|
3221
|
-
|
|
3286
|
+
const shown = blockedTasks.length;
|
|
3287
|
+
const totalLabel = typeof total === "number" && total !== shown ? ` of ${total}` : "";
|
|
3288
|
+
lines.push(`${RED}${BOLD}Blocked Tasks (${shown}${totalLabel})${NC}`);
|
|
3289
|
+
if (summary && summary !== `${shown} blocked task(s)`) {
|
|
3290
|
+
lines.push(`${DIM}${summary}${NC}`);
|
|
3291
|
+
}
|
|
3222
3292
|
lines.push("");
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
const
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3293
|
+
if (criticalBlockers && criticalBlockers.length > 0) {
|
|
3294
|
+
lines.push(`${RED}${BOLD}Critical Blockers (${criticalBlockers.length})${NC}`);
|
|
3295
|
+
for (const cb of criticalBlockers) {
|
|
3296
|
+
const id = String(cb["id"] ?? cb["taskId"] ?? "");
|
|
3297
|
+
const title = String(cb["title"] ?? "");
|
|
3298
|
+
const blocks = cb["blocks"];
|
|
3299
|
+
lines.push(` ${RED}\u2297${NC} ${BOLD}${id}${NC} ${title}`);
|
|
3300
|
+
if (blocks && blocks.length > 0) {
|
|
3301
|
+
lines.push(` ${DIM}Blocks: ${blocks.join(", ")}${NC}`);
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
lines.push("");
|
|
3305
|
+
}
|
|
3306
|
+
for (const item of blockedTasks) {
|
|
3307
|
+
const id = String(item["id"]);
|
|
3308
|
+
const title = String(item["title"] ?? "");
|
|
3309
|
+
const priority = item["priority"];
|
|
3310
|
+
const blockedBy = item["blockedBy"];
|
|
3311
|
+
const blockedByStr = Array.isArray(blockedBy) ? blockedBy.join(", ") : blockedBy ?? "";
|
|
3312
|
+
const pBadge = priority ? `${priorityColor(priority)}[${priority}]${NC} ` : "";
|
|
3313
|
+
lines.push(` ${RED}\u2297${NC} ${BOLD}${id}${NC} ${pBadge}${title}`);
|
|
3314
|
+
if (blockedByStr) lines.push(` ${DIM}Blocked by: ${blockedByStr}${NC}`);
|
|
3315
|
+
}
|
|
3316
|
+
if (typeof limit === "number" && typeof total === "number" && total > shown) {
|
|
3317
|
+
lines.push("");
|
|
3318
|
+
lines.push(
|
|
3319
|
+
`${DIM}\u2500\u2500\u2500 ${shown} of ${total} (--limit ${limit}, --json for full set) \u2500\u2500\u2500${NC}`
|
|
3320
|
+
);
|
|
3230
3321
|
}
|
|
3231
3322
|
return lines.join("\n");
|
|
3232
3323
|
}
|
|
@@ -4895,6 +4986,13 @@ import { applyFieldFilter, extractFieldFromResult } from "@cleocode/lafs";
|
|
|
4895
4986
|
function generateRequestId() {
|
|
4896
4987
|
return randomUUID();
|
|
4897
4988
|
}
|
|
4989
|
+
function pickDecoratorMetaExtensionsLocal(responseMeta) {
|
|
4990
|
+
if (!responseMeta) return {};
|
|
4991
|
+
const out = {};
|
|
4992
|
+
if (responseMeta["_nexus"] !== void 0) out["_nexus"] = responseMeta["_nexus"];
|
|
4993
|
+
if (responseMeta["deprecated"] !== void 0) out["deprecated"] = responseMeta["deprecated"];
|
|
4994
|
+
return out;
|
|
4995
|
+
}
|
|
4898
4996
|
function cliOutput(data, opts) {
|
|
4899
4997
|
const ctx = getFormatContext();
|
|
4900
4998
|
const fieldCtx = getFieldContext();
|
|
@@ -4927,6 +5025,28 @@ function cliOutput(data, opts) {
|
|
|
4927
5025
|
if (text) {
|
|
4928
5026
|
process.stdout.write(text + "\n");
|
|
4929
5027
|
}
|
|
5028
|
+
if (!ctx.quiet) {
|
|
5029
|
+
const pagerData = data;
|
|
5030
|
+
const pagerArrays = pagerData && typeof pagerData === "object" ? Object.values(pagerData).filter((v) => Array.isArray(v)) : [];
|
|
5031
|
+
const shown = pagerArrays.reduce((max, arr) => Math.max(max, arr.length), 0);
|
|
5032
|
+
if (shown > 0 && opts.page) {
|
|
5033
|
+
const pager = pagerFooter({
|
|
5034
|
+
shown,
|
|
5035
|
+
page: opts.page,
|
|
5036
|
+
total: pagerData?.["total"],
|
|
5037
|
+
filtered: pagerData?.["filtered"]
|
|
5038
|
+
});
|
|
5039
|
+
if (pager) process.stdout.write(`${pager}
|
|
5040
|
+
`);
|
|
5041
|
+
}
|
|
5042
|
+
const combinedMeta = {
|
|
5043
|
+
...opts.responseMeta ?? {},
|
|
5044
|
+
...opts.extensions ?? {}
|
|
5045
|
+
};
|
|
5046
|
+
const footer = metaFooter(combinedMeta);
|
|
5047
|
+
if (footer) process.stdout.write(`${footer}
|
|
5048
|
+
`);
|
|
5049
|
+
}
|
|
4930
5050
|
return;
|
|
4931
5051
|
}
|
|
4932
5052
|
if (fieldCtx.field) {
|
|
@@ -4972,7 +5092,9 @@ function cliOutput(data, opts) {
|
|
|
4972
5092
|
const formatOpts = {};
|
|
4973
5093
|
if (opts.operation) formatOpts.operation = opts.operation;
|
|
4974
5094
|
if (opts.page) formatOpts.page = opts.page;
|
|
4975
|
-
|
|
5095
|
+
const decoratorExt = pickDecoratorMetaExtensionsLocal(opts.responseMeta);
|
|
5096
|
+
const mergedExt = opts.extensions || Object.keys(decoratorExt).length > 0 ? { ...decoratorExt, ...opts.extensions ?? {} } : void 0;
|
|
5097
|
+
if (mergedExt) formatOpts.extensions = mergedExt;
|
|
4976
5098
|
if (fieldCtx.mvi) formatOpts.mvi = fieldCtx.mvi;
|
|
4977
5099
|
const envelopeString = formatSuccess(
|
|
4978
5100
|
filteredData,
|
|
@@ -5060,6 +5182,7 @@ var init_renderers = __esm({
|
|
|
5060
5182
|
"use strict";
|
|
5061
5183
|
init_field_context();
|
|
5062
5184
|
init_format_context();
|
|
5185
|
+
init_format_helpers();
|
|
5063
5186
|
init_lafs_validator();
|
|
5064
5187
|
init_normalizer();
|
|
5065
5188
|
init_system2();
|
|
@@ -7248,6 +7371,115 @@ var init_registry = __esm({
|
|
|
7248
7371
|
}
|
|
7249
7372
|
]
|
|
7250
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
|
+
},
|
|
7251
7483
|
{
|
|
7252
7484
|
gateway: "mutate",
|
|
7253
7485
|
domain: "tasks",
|
|
@@ -12489,6 +12721,7 @@ __export(engine_exports, {
|
|
|
12489
12721
|
lifecycleSkip: () => lifecycleSkip,
|
|
12490
12722
|
lifecycleStatus: () => lifecycleStatus,
|
|
12491
12723
|
loadActiveReleaseHandle: () => loadActiveReleaseHandle,
|
|
12724
|
+
makeAdr061GateRunner: () => makeAdr061GateRunner,
|
|
12492
12725
|
mapCodebase: () => mapCodebase,
|
|
12493
12726
|
memoryBrainStats: () => memoryBrainStats,
|
|
12494
12727
|
memoryContradictions: () => memoryContradictions,
|
|
@@ -12719,6 +12952,7 @@ import {
|
|
|
12719
12952
|
lifecycleSkip,
|
|
12720
12953
|
lifecycleStatus,
|
|
12721
12954
|
loadActiveReleaseHandle,
|
|
12955
|
+
makeAdr061GateRunner,
|
|
12722
12956
|
mapCodebase,
|
|
12723
12957
|
memoryBrainStats,
|
|
12724
12958
|
memoryContradictions,
|
|
@@ -18560,6 +18794,30 @@ function stampNexusMeta(response, operation, params, isTopLevel = true) {
|
|
|
18560
18794
|
}
|
|
18561
18795
|
};
|
|
18562
18796
|
}
|
|
18797
|
+
function pickDecoratorMetaExtensions(responseMeta) {
|
|
18798
|
+
if (!responseMeta) return {};
|
|
18799
|
+
const out = {};
|
|
18800
|
+
if (responseMeta["_nexus"] !== void 0) out["_nexus"] = responseMeta["_nexus"];
|
|
18801
|
+
if (responseMeta["deprecated"] !== void 0) out["deprecated"] = responseMeta["deprecated"];
|
|
18802
|
+
return out;
|
|
18803
|
+
}
|
|
18804
|
+
function buildNexusMetaExtensions(operation, params = {}) {
|
|
18805
|
+
const synthetic = {
|
|
18806
|
+
success: true,
|
|
18807
|
+
data: void 0,
|
|
18808
|
+
meta: {
|
|
18809
|
+
gateway: "query",
|
|
18810
|
+
domain: "nexus",
|
|
18811
|
+
operation,
|
|
18812
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
18813
|
+
duration_ms: 0,
|
|
18814
|
+
source: "cli",
|
|
18815
|
+
requestId: ""
|
|
18816
|
+
}
|
|
18817
|
+
};
|
|
18818
|
+
const stamped = stampNexusMeta(synthetic, operation, params);
|
|
18819
|
+
return pickDecoratorMetaExtensions(stamped.meta);
|
|
18820
|
+
}
|
|
18563
18821
|
var init_nexus_decorator = __esm({
|
|
18564
18822
|
"packages/cleo/src/dispatch/nexus-decorator.ts"() {
|
|
18565
18823
|
"use strict";
|
|
@@ -26936,8 +27194,11 @@ var init_release2 = __esm({
|
|
|
26936
27194
|
}
|
|
26937
27195
|
// release.verify — Step 2 of 4: run gates + audit child tasks (T1597 / ADR-063)
|
|
26938
27196
|
case "verify": {
|
|
26939
|
-
const
|
|
26940
|
-
const
|
|
27197
|
+
const projectRoot = getProjectRoot11();
|
|
27198
|
+
const handle = loadActiveReleaseHandle(projectRoot);
|
|
27199
|
+
const result = await releaseVerify(handle, {
|
|
27200
|
+
runGate: makeAdr061GateRunner(projectRoot)
|
|
27201
|
+
});
|
|
26941
27202
|
return {
|
|
26942
27203
|
success: true,
|
|
26943
27204
|
data: result,
|
|
@@ -27960,6 +28221,139 @@ var init_sticky2 = __esm({
|
|
|
27960
28221
|
|
|
27961
28222
|
// packages/cleo/src/dispatch/domains/tasks.ts
|
|
27962
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
|
+
}
|
|
27963
28357
|
var _tasksTypedHandler, QUERY_OPS10, MUTATE_OPS10, TasksHandler;
|
|
27964
28358
|
var init_tasks3 = __esm({
|
|
27965
28359
|
"packages/cleo/src/dispatch/domains/tasks.ts"() {
|
|
@@ -28365,7 +28759,11 @@ var init_tasks3 = __esm({
|
|
|
28365
28759
|
"history",
|
|
28366
28760
|
"current",
|
|
28367
28761
|
"label.list",
|
|
28368
|
-
"sync.links"
|
|
28762
|
+
"sync.links",
|
|
28763
|
+
// Saga sub-domain (ADR-073)
|
|
28764
|
+
"saga.list",
|
|
28765
|
+
"saga.members",
|
|
28766
|
+
"saga.rollup"
|
|
28369
28767
|
]);
|
|
28370
28768
|
MUTATE_OPS10 = /* @__PURE__ */ new Set([
|
|
28371
28769
|
"add",
|
|
@@ -28384,7 +28782,10 @@ var init_tasks3 = __esm({
|
|
|
28384
28782
|
"sync.reconcile",
|
|
28385
28783
|
"sync.links.remove",
|
|
28386
28784
|
"claim",
|
|
28387
|
-
"unclaim"
|
|
28785
|
+
"unclaim",
|
|
28786
|
+
// Saga sub-domain (ADR-073)
|
|
28787
|
+
"saga.create",
|
|
28788
|
+
"saga.add"
|
|
28388
28789
|
]);
|
|
28389
28790
|
TasksHandler = class {
|
|
28390
28791
|
// -----------------------------------------------------------------------
|
|
@@ -28411,6 +28812,26 @@ var init_tasks3 = __esm({
|
|
|
28411
28812
|
startTime
|
|
28412
28813
|
);
|
|
28413
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
|
+
}
|
|
28414
28835
|
try {
|
|
28415
28836
|
const envelope = await typedDispatch(
|
|
28416
28837
|
_tasksTypedHandler,
|
|
@@ -28440,6 +28861,34 @@ var init_tasks3 = __esm({
|
|
|
28440
28861
|
if (!MUTATE_OPS10.has(operation)) {
|
|
28441
28862
|
return unsupportedOp("mutate", "tasks", operation, startTime);
|
|
28442
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
|
+
}
|
|
28443
28892
|
try {
|
|
28444
28893
|
const envelope = await typedDispatch(
|
|
28445
28894
|
_tasksTypedHandler,
|
|
@@ -28479,7 +28928,11 @@ var init_tasks3 = __esm({
|
|
|
28479
28928
|
"history",
|
|
28480
28929
|
"current",
|
|
28481
28930
|
"label.list",
|
|
28482
|
-
"sync.links"
|
|
28931
|
+
"sync.links",
|
|
28932
|
+
// Saga sub-domain (ADR-073)
|
|
28933
|
+
"saga.list",
|
|
28934
|
+
"saga.members",
|
|
28935
|
+
"saga.rollup"
|
|
28483
28936
|
],
|
|
28484
28937
|
mutate: [
|
|
28485
28938
|
"add",
|
|
@@ -28498,7 +28951,10 @@ var init_tasks3 = __esm({
|
|
|
28498
28951
|
"sync.reconcile",
|
|
28499
28952
|
"sync.links.remove",
|
|
28500
28953
|
"claim",
|
|
28501
|
-
"unclaim"
|
|
28954
|
+
"unclaim",
|
|
28955
|
+
// Saga sub-domain (ADR-073)
|
|
28956
|
+
"saga.create",
|
|
28957
|
+
"saga.add"
|
|
28502
28958
|
]
|
|
28503
28959
|
};
|
|
28504
28960
|
}
|
|
@@ -29801,6 +30257,9 @@ async function dispatchFromCli(gateway, domain, operation, params, outputOpts) {
|
|
|
29801
30257
|
if (opts.page === void 0 && response.page !== void 0) {
|
|
29802
30258
|
opts.page = response.page;
|
|
29803
30259
|
}
|
|
30260
|
+
if (opts.responseMeta === void 0) {
|
|
30261
|
+
opts.responseMeta = response.meta;
|
|
30262
|
+
}
|
|
29804
30263
|
cliOutput(response.data, opts);
|
|
29805
30264
|
} else {
|
|
29806
30265
|
const errorCode = response.error?.code ?? "E_GENERAL";
|
|
@@ -47956,6 +48415,7 @@ var init_nexus4 = __esm({
|
|
|
47956
48415
|
"use strict";
|
|
47957
48416
|
init_dist();
|
|
47958
48417
|
init_cli();
|
|
48418
|
+
init_nexus_decorator();
|
|
47959
48419
|
init_format_context();
|
|
47960
48420
|
init_renderers();
|
|
47961
48421
|
initCommand3 = defineCommand({
|
|
@@ -48064,7 +48524,10 @@ var init_nexus4 = __esm({
|
|
|
48064
48524
|
{
|
|
48065
48525
|
command: "nexus-status",
|
|
48066
48526
|
operation: "nexus.status",
|
|
48067
|
-
extensions: {
|
|
48527
|
+
extensions: {
|
|
48528
|
+
duration_ms: durationMs,
|
|
48529
|
+
...buildNexusMetaExtensions("status", { projectId, path: repoPath })
|
|
48530
|
+
}
|
|
48068
48531
|
}
|
|
48069
48532
|
);
|
|
48070
48533
|
} catch (err) {
|
|
@@ -48574,7 +49037,8 @@ var init_nexus4 = __esm({
|
|
|
48574
49037
|
cliOutput(response.data, {
|
|
48575
49038
|
command: "nexus-clusters",
|
|
48576
49039
|
operation: "nexus.clusters",
|
|
48577
|
-
extensions: { duration_ms: durationMs }
|
|
49040
|
+
extensions: { duration_ms: durationMs },
|
|
49041
|
+
responseMeta: response.meta
|
|
48578
49042
|
});
|
|
48579
49043
|
}
|
|
48580
49044
|
});
|
|
@@ -48617,7 +49081,8 @@ var init_nexus4 = __esm({
|
|
|
48617
49081
|
cliOutput(response.data, {
|
|
48618
49082
|
command: "nexus-flows",
|
|
48619
49083
|
operation: "nexus.flows",
|
|
48620
|
-
extensions: { duration_ms: durationMs }
|
|
49084
|
+
extensions: { duration_ms: durationMs },
|
|
49085
|
+
responseMeta: response.meta
|
|
48621
49086
|
});
|
|
48622
49087
|
}
|
|
48623
49088
|
});
|
|
@@ -48679,7 +49144,8 @@ var init_nexus4 = __esm({
|
|
|
48679
49144
|
cliOutput({ ...result, _symbolName: symbolName }, {
|
|
48680
49145
|
command: "nexus-context",
|
|
48681
49146
|
operation: "nexus.context",
|
|
48682
|
-
extensions: { duration_ms: durationMs }
|
|
49147
|
+
extensions: { duration_ms: durationMs },
|
|
49148
|
+
responseMeta: response.meta
|
|
48683
49149
|
});
|
|
48684
49150
|
}
|
|
48685
49151
|
});
|
|
@@ -48716,7 +49182,10 @@ var init_nexus4 = __esm({
|
|
|
48716
49182
|
cliOutput({ ...result, _symbolName: symbolName, _why: whyFlag }, {
|
|
48717
49183
|
command: "nexus-impact",
|
|
48718
49184
|
operation: "nexus.impact",
|
|
48719
|
-
extensions: {
|
|
49185
|
+
extensions: {
|
|
49186
|
+
duration_ms: durationMs,
|
|
49187
|
+
...buildNexusMetaExtensions("impact", { symbol: symbolName, projectId })
|
|
49188
|
+
}
|
|
48720
49189
|
});
|
|
48721
49190
|
} catch (err) {
|
|
48722
49191
|
const code = err instanceof Error && "code" in err ? err.code : void 0;
|
|
@@ -48898,7 +49367,8 @@ var init_nexus4 = __esm({
|
|
|
48898
49367
|
cliOutput(response.data, {
|
|
48899
49368
|
command: "nexus-projects-list",
|
|
48900
49369
|
operation: "nexus.projects.list",
|
|
48901
|
-
extensions: { duration_ms: durationMs }
|
|
49370
|
+
extensions: { duration_ms: durationMs },
|
|
49371
|
+
responseMeta: response.meta
|
|
48902
49372
|
});
|
|
48903
49373
|
}
|
|
48904
49374
|
});
|
|
@@ -48946,7 +49416,8 @@ var init_nexus4 = __esm({
|
|
|
48946
49416
|
cliOutput(response.data, {
|
|
48947
49417
|
command: "nexus-projects-register",
|
|
48948
49418
|
operation: "nexus.projects.register",
|
|
48949
|
-
extensions: { duration_ms: durationMs }
|
|
49419
|
+
extensions: { duration_ms: durationMs },
|
|
49420
|
+
responseMeta: response.meta
|
|
48950
49421
|
});
|
|
48951
49422
|
}
|
|
48952
49423
|
});
|
|
@@ -48989,7 +49460,8 @@ var init_nexus4 = __esm({
|
|
|
48989
49460
|
{
|
|
48990
49461
|
command: "nexus-projects-remove",
|
|
48991
49462
|
operation: "nexus.projects.remove",
|
|
48992
|
-
extensions: { duration_ms: durationMs }
|
|
49463
|
+
extensions: { duration_ms: durationMs },
|
|
49464
|
+
responseMeta: response.meta
|
|
48993
49465
|
}
|
|
48994
49466
|
);
|
|
48995
49467
|
}
|
|
@@ -49054,7 +49526,8 @@ var init_nexus4 = __esm({
|
|
|
49054
49526
|
{
|
|
49055
49527
|
command: "nexus-projects-scan",
|
|
49056
49528
|
operation: "nexus.projects.scan",
|
|
49057
|
-
extensions: { duration_ms: durationMs }
|
|
49529
|
+
extensions: { duration_ms: durationMs },
|
|
49530
|
+
responseMeta: response.meta
|
|
49058
49531
|
}
|
|
49059
49532
|
);
|
|
49060
49533
|
}
|
|
@@ -49149,7 +49622,11 @@ var init_nexus4 = __esm({
|
|
|
49149
49622
|
if (ctx.format !== "json") {
|
|
49150
49623
|
cliOutput(
|
|
49151
49624
|
{ matched: matchCount, totalCount, sample: samplePaths },
|
|
49152
|
-
{
|
|
49625
|
+
{
|
|
49626
|
+
command: "nexus-projects-clean-preview",
|
|
49627
|
+
operation: "nexus.projects.clean",
|
|
49628
|
+
responseMeta: previewResp.meta
|
|
49629
|
+
}
|
|
49153
49630
|
);
|
|
49154
49631
|
}
|
|
49155
49632
|
if (matchCount === 0 || dryRun) {
|
|
@@ -49165,7 +49642,8 @@ var init_nexus4 = __esm({
|
|
|
49165
49642
|
{
|
|
49166
49643
|
command: "nexus-projects-clean",
|
|
49167
49644
|
operation: "nexus.projects.clean",
|
|
49168
|
-
extensions: { duration_ms: durationMs2 }
|
|
49645
|
+
extensions: { duration_ms: durationMs2 },
|
|
49646
|
+
responseMeta: previewResp.meta
|
|
49169
49647
|
}
|
|
49170
49648
|
);
|
|
49171
49649
|
return;
|
|
@@ -49224,7 +49702,8 @@ var init_nexus4 = __esm({
|
|
|
49224
49702
|
{
|
|
49225
49703
|
command: "nexus-projects-clean",
|
|
49226
49704
|
operation: "nexus.projects.clean",
|
|
49227
|
-
extensions: { duration_ms: durationMs }
|
|
49705
|
+
extensions: { duration_ms: durationMs },
|
|
49706
|
+
responseMeta: deleteResp.meta
|
|
49228
49707
|
}
|
|
49229
49708
|
);
|
|
49230
49709
|
} catch (err) {
|
|
@@ -49295,7 +49774,8 @@ var init_nexus4 = __esm({
|
|
|
49295
49774
|
cliOutput(response.data, {
|
|
49296
49775
|
command: "nexus-refresh-bridge",
|
|
49297
49776
|
operation: "nexus.refresh-bridge",
|
|
49298
|
-
extensions: { duration_ms: durationMs }
|
|
49777
|
+
extensions: { duration_ms: durationMs },
|
|
49778
|
+
responseMeta: response.meta
|
|
49299
49779
|
});
|
|
49300
49780
|
}
|
|
49301
49781
|
});
|
|
@@ -49448,7 +49928,8 @@ var init_nexus4 = __esm({
|
|
|
49448
49928
|
cliOutput(response.data, {
|
|
49449
49929
|
command: "nexus-diff",
|
|
49450
49930
|
operation: "nexus.diff",
|
|
49451
|
-
extensions: { duration_ms: durationMs }
|
|
49931
|
+
extensions: { duration_ms: durationMs },
|
|
49932
|
+
responseMeta: response.meta
|
|
49452
49933
|
});
|
|
49453
49934
|
}
|
|
49454
49935
|
});
|
|
@@ -49509,7 +49990,8 @@ var init_nexus4 = __esm({
|
|
|
49509
49990
|
{
|
|
49510
49991
|
command: "nexus-query",
|
|
49511
49992
|
operation: "nexus.query-cte",
|
|
49512
|
-
extensions: { duration_ms: durationMs }
|
|
49993
|
+
extensions: { duration_ms: durationMs },
|
|
49994
|
+
responseMeta: response.meta
|
|
49513
49995
|
}
|
|
49514
49996
|
);
|
|
49515
49997
|
}
|
|
@@ -49558,7 +50040,8 @@ var init_nexus4 = __esm({
|
|
|
49558
50040
|
{
|
|
49559
50041
|
command: "nexus-route-map",
|
|
49560
50042
|
operation: "nexus.route-map",
|
|
49561
|
-
extensions: { duration_ms: durationMs }
|
|
50043
|
+
extensions: { duration_ms: durationMs },
|
|
50044
|
+
responseMeta: response.meta
|
|
49562
50045
|
}
|
|
49563
50046
|
);
|
|
49564
50047
|
}
|
|
@@ -49613,7 +50096,8 @@ var init_nexus4 = __esm({
|
|
|
49613
50096
|
{
|
|
49614
50097
|
command: "nexus-shape-check",
|
|
49615
50098
|
operation: "nexus.shape-check",
|
|
49616
|
-
extensions: { duration_ms: durationMs }
|
|
50099
|
+
extensions: { duration_ms: durationMs },
|
|
50100
|
+
responseMeta: response.meta
|
|
49617
50101
|
}
|
|
49618
50102
|
);
|
|
49619
50103
|
}
|
|
@@ -49655,7 +50139,8 @@ var init_nexus4 = __esm({
|
|
|
49655
50139
|
{
|
|
49656
50140
|
command: "nexus-full-context",
|
|
49657
50141
|
operation: "nexus.full-context",
|
|
49658
|
-
extensions: { duration_ms: durationMs }
|
|
50142
|
+
extensions: { duration_ms: durationMs },
|
|
50143
|
+
responseMeta: response.meta
|
|
49659
50144
|
}
|
|
49660
50145
|
);
|
|
49661
50146
|
}
|
|
@@ -49697,7 +50182,8 @@ var init_nexus4 = __esm({
|
|
|
49697
50182
|
{
|
|
49698
50183
|
command: "nexus-task-footprint",
|
|
49699
50184
|
operation: "nexus.task-footprint",
|
|
49700
|
-
extensions: { duration_ms: durationMs }
|
|
50185
|
+
extensions: { duration_ms: durationMs },
|
|
50186
|
+
responseMeta: response.meta
|
|
49701
50187
|
}
|
|
49702
50188
|
);
|
|
49703
50189
|
}
|
|
@@ -49739,7 +50225,8 @@ var init_nexus4 = __esm({
|
|
|
49739
50225
|
{
|
|
49740
50226
|
command: "nexus-brain-anchors",
|
|
49741
50227
|
operation: "nexus.brain-anchors",
|
|
49742
|
-
extensions: { duration_ms: durationMs }
|
|
50228
|
+
extensions: { duration_ms: durationMs },
|
|
50229
|
+
responseMeta: response.meta
|
|
49743
50230
|
}
|
|
49744
50231
|
);
|
|
49745
50232
|
}
|
|
@@ -49778,7 +50265,12 @@ var init_nexus4 = __esm({
|
|
|
49778
50265
|
const durationMs = Date.now() - startTime;
|
|
49779
50266
|
cliOutput(
|
|
49780
50267
|
{ ...response.data ?? {}, _durationMs: durationMs },
|
|
49781
|
-
{
|
|
50268
|
+
{
|
|
50269
|
+
command: "nexus-why",
|
|
50270
|
+
operation: "nexus.why",
|
|
50271
|
+
extensions: { duration_ms: durationMs },
|
|
50272
|
+
responseMeta: response.meta
|
|
50273
|
+
}
|
|
49782
50274
|
);
|
|
49783
50275
|
}
|
|
49784
50276
|
});
|
|
@@ -49819,7 +50311,8 @@ var init_nexus4 = __esm({
|
|
|
49819
50311
|
{
|
|
49820
50312
|
command: "nexus-impact-full",
|
|
49821
50313
|
operation: "nexus.impact-full",
|
|
49822
|
-
extensions: { duration_ms: durationMs }
|
|
50314
|
+
extensions: { duration_ms: durationMs },
|
|
50315
|
+
responseMeta: response.meta
|
|
49823
50316
|
}
|
|
49824
50317
|
);
|
|
49825
50318
|
}
|
|
@@ -49856,7 +50349,8 @@ var init_nexus4 = __esm({
|
|
|
49856
50349
|
{
|
|
49857
50350
|
command: "nexus-conduit-scan",
|
|
49858
50351
|
operation: "nexus.conduit-scan",
|
|
49859
|
-
extensions: { duration_ms: durationMs }
|
|
50352
|
+
extensions: { duration_ms: durationMs },
|
|
50353
|
+
responseMeta: response.meta
|
|
49860
50354
|
}
|
|
49861
50355
|
);
|
|
49862
50356
|
}
|
|
@@ -49900,7 +50394,8 @@ var init_nexus4 = __esm({
|
|
|
49900
50394
|
{
|
|
49901
50395
|
command: "nexus-task-symbols",
|
|
49902
50396
|
operation: "nexus.task-symbols",
|
|
49903
|
-
extensions: { duration_ms: durationMs }
|
|
50397
|
+
extensions: { duration_ms: durationMs },
|
|
50398
|
+
responseMeta: response.meta
|
|
49904
50399
|
}
|
|
49905
50400
|
);
|
|
49906
50401
|
}
|
|
@@ -49995,7 +50490,8 @@ var init_nexus4 = __esm({
|
|
|
49995
50490
|
{
|
|
49996
50491
|
command: "nexus-contracts-sync",
|
|
49997
50492
|
operation: "nexus.contracts.sync",
|
|
49998
|
-
extensions: { duration_ms: durationMs }
|
|
50493
|
+
extensions: { duration_ms: durationMs },
|
|
50494
|
+
responseMeta: response.meta
|
|
49999
50495
|
}
|
|
50000
50496
|
);
|
|
50001
50497
|
}
|
|
@@ -50049,7 +50545,8 @@ var init_nexus4 = __esm({
|
|
|
50049
50545
|
{
|
|
50050
50546
|
command: "nexus-contracts-show",
|
|
50051
50547
|
operation: "nexus.contracts.show",
|
|
50052
|
-
extensions: { duration_ms: durationMs }
|
|
50548
|
+
extensions: { duration_ms: durationMs },
|
|
50549
|
+
responseMeta: response.meta
|
|
50053
50550
|
}
|
|
50054
50551
|
);
|
|
50055
50552
|
}
|
|
@@ -50096,7 +50593,8 @@ var init_nexus4 = __esm({
|
|
|
50096
50593
|
{
|
|
50097
50594
|
command: "nexus-contracts-link-tasks",
|
|
50098
50595
|
operation: "nexus.contracts.link-tasks",
|
|
50099
|
-
extensions: { duration_ms: durationMs }
|
|
50596
|
+
extensions: { duration_ms: durationMs },
|
|
50597
|
+
responseMeta: response.meta
|
|
50100
50598
|
}
|
|
50101
50599
|
);
|
|
50102
50600
|
}
|
|
@@ -50241,7 +50739,8 @@ var init_nexus4 = __esm({
|
|
|
50241
50739
|
cliOutput(response.data, {
|
|
50242
50740
|
command: "nexus-hot-paths",
|
|
50243
50741
|
operation: "nexus.hot-paths",
|
|
50244
|
-
extensions: { duration_ms: durationMs }
|
|
50742
|
+
extensions: { duration_ms: durationMs },
|
|
50743
|
+
responseMeta: response.meta
|
|
50245
50744
|
});
|
|
50246
50745
|
}
|
|
50247
50746
|
});
|
|
@@ -50281,7 +50780,8 @@ var init_nexus4 = __esm({
|
|
|
50281
50780
|
cliOutput(response.data, {
|
|
50282
50781
|
command: "nexus-hot-nodes",
|
|
50283
50782
|
operation: "nexus.hot-nodes",
|
|
50284
|
-
extensions: { duration_ms: durationMs }
|
|
50783
|
+
extensions: { duration_ms: durationMs },
|
|
50784
|
+
responseMeta: response.meta
|
|
50285
50785
|
});
|
|
50286
50786
|
}
|
|
50287
50787
|
});
|
|
@@ -50321,7 +50821,8 @@ var init_nexus4 = __esm({
|
|
|
50321
50821
|
cliOutput(response.data, {
|
|
50322
50822
|
command: "nexus-cold-symbols",
|
|
50323
50823
|
operation: "nexus.cold-symbols",
|
|
50324
|
-
extensions: { duration_ms: durationMs }
|
|
50824
|
+
extensions: { duration_ms: durationMs },
|
|
50825
|
+
responseMeta: response.meta
|
|
50325
50826
|
});
|
|
50326
50827
|
}
|
|
50327
50828
|
});
|
|
@@ -52900,7 +53401,11 @@ var init_release3 = __esm({
|
|
|
52900
53401
|
verifyCommand2 = defineCommand({
|
|
52901
53402
|
meta: { name: "verify", description: "Verify release gates + child task gate state" },
|
|
52902
53403
|
async run() {
|
|
52903
|
-
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
|
+
});
|
|
52904
53409
|
cliOutput(result, { command: "release", operation: "release.verify" });
|
|
52905
53410
|
if (!result.passed) process.exit(1);
|
|
52906
53411
|
}
|
|
@@ -54592,6 +55097,153 @@ var init_safestop = __esm({
|
|
|
54592
55097
|
}
|
|
54593
55098
|
});
|
|
54594
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
|
+
|
|
54595
55247
|
// packages/cleo/src/cli/commands/schema.ts
|
|
54596
55248
|
var schema_exports = {};
|
|
54597
55249
|
__export(schema_exports, {
|
|
@@ -56000,7 +56652,7 @@ async function promptOwnerAuthPassword(sessionName) {
|
|
|
56000
56652
|
const token = deriveOwnerAuthToken(sessionName, password);
|
|
56001
56653
|
return token;
|
|
56002
56654
|
}
|
|
56003
|
-
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;
|
|
56004
56656
|
var init_session4 = __esm({
|
|
56005
56657
|
"packages/cleo/src/cli/commands/session.ts"() {
|
|
56006
56658
|
"use strict";
|
|
@@ -56266,7 +56918,7 @@ var init_session4 = __esm({
|
|
|
56266
56918
|
);
|
|
56267
56919
|
}
|
|
56268
56920
|
});
|
|
56269
|
-
|
|
56921
|
+
listCommand21 = defineCommand({
|
|
56270
56922
|
meta: { name: "list", description: "List sessions" },
|
|
56271
56923
|
args: {
|
|
56272
56924
|
status: {
|
|
@@ -56531,7 +57183,7 @@ var init_session4 = __esm({
|
|
|
56531
57183
|
status: statusCommand12,
|
|
56532
57184
|
resume: resumeCommand2,
|
|
56533
57185
|
find: findCommand6,
|
|
56534
|
-
list:
|
|
57186
|
+
list: listCommand21,
|
|
56535
57187
|
gc: gcCommand2,
|
|
56536
57188
|
show: showCommand13,
|
|
56537
57189
|
"context-drift": contextDriftCommand,
|
|
@@ -56590,14 +57242,14 @@ var skills_exports = {};
|
|
|
56590
57242
|
__export(skills_exports, {
|
|
56591
57243
|
skillsCommand: () => skillsCommand2
|
|
56592
57244
|
});
|
|
56593
|
-
var
|
|
57245
|
+
var listCommand22, searchCommand4, validateCommand8, infoCommand, installCommand3, uninstallCommand2, enableCommand2, disableCommand2, refreshCommand, dispatchCommand, catalogCommand, precedenceCommand, depsCommand4, spawnProvidersCommand, skillsCommand2;
|
|
56594
57246
|
var init_skills2 = __esm({
|
|
56595
57247
|
"packages/cleo/src/cli/commands/skills.ts"() {
|
|
56596
57248
|
"use strict";
|
|
56597
57249
|
init_dist();
|
|
56598
57250
|
init_cli();
|
|
56599
57251
|
init_subcommand_guard();
|
|
56600
|
-
|
|
57252
|
+
listCommand22 = defineCommand({
|
|
56601
57253
|
meta: { name: "list", description: "List installed skills" },
|
|
56602
57254
|
args: {
|
|
56603
57255
|
global: {
|
|
@@ -56912,7 +57564,7 @@ var init_skills2 = __esm({
|
|
|
56912
57564
|
skillsCommand2 = defineCommand({
|
|
56913
57565
|
meta: { name: "skills", description: "Skill management: list, search, validate, info, install" },
|
|
56914
57566
|
subCommands: {
|
|
56915
|
-
list:
|
|
57567
|
+
list: listCommand22,
|
|
56916
57568
|
search: searchCommand4,
|
|
56917
57569
|
validate: validateCommand8,
|
|
56918
57570
|
info: infoCommand,
|
|
@@ -57156,7 +57808,7 @@ __export(sticky_exports, {
|
|
|
57156
57808
|
stickyCommand: () => stickyCommand
|
|
57157
57809
|
});
|
|
57158
57810
|
import { CleoError as CleoError10 } from "@cleocode/core";
|
|
57159
|
-
var
|
|
57811
|
+
var addCommand10, listCommand23, showCommand15, convertCommand, archiveCommand4, purgeCommand2, stickyCommand;
|
|
57160
57812
|
var init_sticky3 = __esm({
|
|
57161
57813
|
"packages/cleo/src/cli/commands/sticky.ts"() {
|
|
57162
57814
|
"use strict";
|
|
@@ -57164,7 +57816,7 @@ var init_sticky3 = __esm({
|
|
|
57164
57816
|
init_dist();
|
|
57165
57817
|
init_cli();
|
|
57166
57818
|
init_renderers();
|
|
57167
|
-
|
|
57819
|
+
addCommand10 = defineCommand({
|
|
57168
57820
|
meta: { name: "add", description: "Create a new sticky note" },
|
|
57169
57821
|
args: {
|
|
57170
57822
|
content: {
|
|
@@ -57212,7 +57864,7 @@ var init_sticky3 = __esm({
|
|
|
57212
57864
|
}
|
|
57213
57865
|
}
|
|
57214
57866
|
});
|
|
57215
|
-
|
|
57867
|
+
listCommand23 = defineCommand({
|
|
57216
57868
|
meta: { name: "list", description: "List active sticky notes" },
|
|
57217
57869
|
args: {
|
|
57218
57870
|
tag: {
|
|
@@ -57446,10 +58098,10 @@ var init_sticky3 = __esm({
|
|
|
57446
58098
|
description: "Manage sticky notes - quick project-wide ephemeral captures"
|
|
57447
58099
|
},
|
|
57448
58100
|
subCommands: {
|
|
57449
|
-
add:
|
|
57450
|
-
jot:
|
|
57451
|
-
list:
|
|
57452
|
-
ls:
|
|
58101
|
+
add: addCommand10,
|
|
58102
|
+
jot: addCommand10,
|
|
58103
|
+
list: listCommand23,
|
|
58104
|
+
ls: listCommand23,
|
|
57453
58105
|
show: showCommand15,
|
|
57454
58106
|
convert: convertCommand,
|
|
57455
58107
|
archive: archiveCommand4,
|
|
@@ -57870,7 +58522,7 @@ function readPayload(args, textKey, fileKey) {
|
|
|
57870
58522
|
if (file) return readFileSync15(file, "utf-8");
|
|
57871
58523
|
return text;
|
|
57872
58524
|
}
|
|
57873
|
-
var filterArgs, summaryCommand3,
|
|
58525
|
+
var filterArgs, summaryCommand3, listCommand24, showCommand16, deleteCommand3, clearCommand2, estimateCommand, tokenCommand;
|
|
57874
58526
|
var init_token = __esm({
|
|
57875
58527
|
"packages/cleo/src/cli/commands/token.ts"() {
|
|
57876
58528
|
"use strict";
|
|
@@ -57906,7 +58558,7 @@ var init_token = __esm({
|
|
|
57906
58558
|
);
|
|
57907
58559
|
}
|
|
57908
58560
|
});
|
|
57909
|
-
|
|
58561
|
+
listCommand24 = defineCommand({
|
|
57910
58562
|
meta: { name: "list", description: "List recorded token telemetry" },
|
|
57911
58563
|
args: {
|
|
57912
58564
|
...filterArgs,
|
|
@@ -58041,7 +58693,7 @@ var init_token = __esm({
|
|
|
58041
58693
|
},
|
|
58042
58694
|
subCommands: {
|
|
58043
58695
|
summary: summaryCommand3,
|
|
58044
|
-
list:
|
|
58696
|
+
list: listCommand24,
|
|
58045
58697
|
show: showCommand16,
|
|
58046
58698
|
delete: deleteCommand3,
|
|
58047
58699
|
clear: clearCommand2,
|
|
@@ -59978,6 +60630,12 @@ var COMMAND_MANIFEST = [
|
|
|
59978
60630
|
description: "Graceful shutdown for agents approaching context limits",
|
|
59979
60631
|
load: async () => (await Promise.resolve().then(() => (init_safestop(), safestop_exports))).safestopCommand
|
|
59980
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
|
+
},
|
|
59981
60639
|
{
|
|
59982
60640
|
exportName: "schemaCommand",
|
|
59983
60641
|
name: "schema",
|