jumbo-cli 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/presentation/cli/animations/BrailleSpinner.d.ts +31 -0
- package/dist/presentation/cli/animations/BrailleSpinner.d.ts.map +1 -0
- package/dist/presentation/cli/animations/BrailleSpinner.js +67 -0
- package/dist/presentation/cli/animations/BrailleSpinner.js.map +1 -0
- package/dist/presentation/cli/animations/GlimmerEffect.d.ts +32 -0
- package/dist/presentation/cli/animations/GlimmerEffect.d.ts.map +1 -0
- package/dist/presentation/cli/animations/GlimmerEffect.js +55 -0
- package/dist/presentation/cli/animations/GlimmerEffect.js.map +1 -0
- package/dist/presentation/cli/animations/GradientPalette.d.ts +36 -0
- package/dist/presentation/cli/animations/GradientPalette.d.ts.map +1 -0
- package/dist/presentation/cli/animations/GradientPalette.js +133 -0
- package/dist/presentation/cli/animations/GradientPalette.js.map +1 -0
- package/dist/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.d.ts +1 -1
- package/dist/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.js +11 -6
- package/dist/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/approve/goal.approve.d.ts +1 -0
- package/dist/presentation/cli/commands/goals/approve/goal.approve.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/approve/goal.approve.js +6 -4
- package/dist/presentation/cli/commands/goals/approve/goal.approve.js.map +1 -1
- package/dist/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.d.ts +1 -1
- package/dist/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.js +9 -5
- package/dist/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/close/goal.close.d.ts +1 -0
- package/dist/presentation/cli/commands/goals/close/goal.close.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/close/goal.close.js +6 -4
- package/dist/presentation/cli/commands/goals/close/goal.close.js.map +1 -1
- package/dist/presentation/cli/commands/goals/commit/GoalCommitOutputBuilder.d.ts +1 -1
- package/dist/presentation/cli/commands/goals/commit/GoalCommitOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/commit/GoalCommitOutputBuilder.js +9 -3
- package/dist/presentation/cli/commands/goals/commit/GoalCommitOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/commit/goal.commit.d.ts +1 -0
- package/dist/presentation/cli/commands/goals/commit/goal.commit.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/commit/goal.commit.js +3 -2
- package/dist/presentation/cli/commands/goals/commit/goal.commit.js.map +1 -1
- package/dist/presentation/cli/commands/goals/reject/GoalRejectOutputBuilder.d.ts +1 -1
- package/dist/presentation/cli/commands/goals/reject/GoalRejectOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/reject/GoalRejectOutputBuilder.js +12 -4
- package/dist/presentation/cli/commands/goals/reject/GoalRejectOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/reject/goal.reject.d.ts +1 -0
- package/dist/presentation/cli/commands/goals/reject/goal.reject.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/reject/goal.reject.js +3 -2
- package/dist/presentation/cli/commands/goals/reject/goal.reject.js.map +1 -1
- package/dist/presentation/cli/commands/goals/submit/GoalSubmitOutputBuilder.d.ts +1 -1
- package/dist/presentation/cli/commands/goals/submit/GoalSubmitOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/submit/GoalSubmitOutputBuilder.js +15 -6
- package/dist/presentation/cli/commands/goals/submit/GoalSubmitOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/submit/goal.submit.d.ts +1 -0
- package/dist/presentation/cli/commands/goals/submit/goal.submit.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/submit/goal.submit.js +3 -2
- package/dist/presentation/cli/commands/goals/submit/goal.submit.js.map +1 -1
- package/dist/presentation/cli/commands/registry/CommandMetadata.d.ts +5 -0
- package/dist/presentation/cli/commands/registry/CommandMetadata.d.ts.map +1 -1
- package/dist/presentation/cli/commands/registry/CommandMetadata.js +9 -0
- package/dist/presentation/cli/commands/registry/CommandMetadata.js.map +1 -1
- package/dist/presentation/cli/commands/registry/generated-commands.d.ts.map +1 -1
- package/dist/presentation/cli/commands/registry/generated-commands.js +6 -0
- package/dist/presentation/cli/commands/registry/generated-commands.js.map +1 -1
- package/dist/presentation/cli/commands/work/refine/RefineryDisplay.d.ts +45 -0
- package/dist/presentation/cli/commands/work/refine/RefineryDisplay.d.ts.map +1 -0
- package/dist/presentation/cli/commands/work/refine/RefineryDisplay.js +100 -0
- package/dist/presentation/cli/commands/work/refine/RefineryDisplay.js.map +1 -0
- package/dist/presentation/cli/commands/work/refine/work.refine.d.ts +20 -0
- package/dist/presentation/cli/commands/work/refine/work.refine.d.ts.map +1 -0
- package/dist/presentation/cli/commands/work/refine/work.refine.js +181 -0
- package/dist/presentation/cli/commands/work/refine/work.refine.js.map +1 -0
- package/dist/presentation/cli/rendering/StyleConfig.d.ts +11 -0
- package/dist/presentation/cli/rendering/StyleConfig.d.ts.map +1 -1
- package/dist/presentation/cli/rendering/StyleConfig.js +12 -1
- package/dist/presentation/cli/rendering/StyleConfig.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Braille Spinner
|
|
3
|
+
*
|
|
4
|
+
* Single-character braille spinner that cycles through the letters of a word,
|
|
5
|
+
* displayed alongside the latin text with a continuous gradient shimmer.
|
|
6
|
+
*/
|
|
7
|
+
/** Mapping of latin letters to braille equivalents */
|
|
8
|
+
export declare const BRAILLE_MAP: Record<string, string>;
|
|
9
|
+
export interface BrailleSpinnerConfig {
|
|
10
|
+
/** The word to spell in braille and display as latin text */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Frames to hold each braille letter (default 8) */
|
|
13
|
+
frameHold?: number;
|
|
14
|
+
/** Timer interval in ms (default 100) */
|
|
15
|
+
intervalMs?: number;
|
|
16
|
+
/** Write function (default: process.stderr.write) */
|
|
17
|
+
write?: (s: string) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Start a braille spinner animation.
|
|
21
|
+
*
|
|
22
|
+
* Displays: `⠺ Waiting...` where the braille character cycles through
|
|
23
|
+
* each letter of the word, and the entire line shimmers through the
|
|
24
|
+
* gradient spectrum with per-character color offsets.
|
|
25
|
+
*
|
|
26
|
+
* Returns a handle with `stop()` to clear the animation and restore cursor.
|
|
27
|
+
*/
|
|
28
|
+
export declare function startBrailleSpinner(config: BrailleSpinnerConfig): {
|
|
29
|
+
stop: () => void;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=BrailleSpinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrailleSpinner.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/animations/BrailleSpinner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,sDAAsD;AACtD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK9C,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CA+CtF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Braille Spinner
|
|
4
|
+
*
|
|
5
|
+
* Single-character braille spinner that cycles through the letters of a word,
|
|
6
|
+
* displayed alongside the latin text with a continuous gradient shimmer.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.BRAILLE_MAP = void 0;
|
|
10
|
+
exports.startBrailleSpinner = startBrailleSpinner;
|
|
11
|
+
const GradientPalette_js_1 = require("./GradientPalette.js");
|
|
12
|
+
const RESET = "\x1b[0m";
|
|
13
|
+
const HIDE_CURSOR = "\x1b[?25l";
|
|
14
|
+
const SHOW_CURSOR = "\x1b[?25h";
|
|
15
|
+
/** Mapping of latin letters to braille equivalents */
|
|
16
|
+
exports.BRAILLE_MAP = {
|
|
17
|
+
a: "⠁", b: "⠃", c: "⠉", d: "⠙", e: "⠑", f: "⠋", g: "⠛", h: "⠓",
|
|
18
|
+
i: "⠊", j: "⠚", k: "⠅", l: "⠇", m: "⠍", n: "⠝", o: "⠕", p: "⠏",
|
|
19
|
+
q: "⠟", r: "⠗", s: "⠎", t: "⠞", u: "⠥", v: "⠧", w: "⠺", x: "⠭",
|
|
20
|
+
y: "⠽", z: "⠵", " ": "⠀",
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Start a braille spinner animation.
|
|
24
|
+
*
|
|
25
|
+
* Displays: `⠺ Waiting...` where the braille character cycles through
|
|
26
|
+
* each letter of the word, and the entire line shimmers through the
|
|
27
|
+
* gradient spectrum with per-character color offsets.
|
|
28
|
+
*
|
|
29
|
+
* Returns a handle with `stop()` to clear the animation and restore cursor.
|
|
30
|
+
*/
|
|
31
|
+
function startBrailleSpinner(config) {
|
|
32
|
+
const { label, frameHold = 8, intervalMs = 100, write = (s) => process.stderr.write(s), } = config;
|
|
33
|
+
const brailleSeq = label
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
.split("")
|
|
36
|
+
.map((ch) => exports.BRAILLE_MAP[ch] ?? "⠿");
|
|
37
|
+
const capitalLabel = label.charAt(0).toUpperCase() + label.slice(1);
|
|
38
|
+
const totalSteps = brailleSeq.length * frameHold;
|
|
39
|
+
// Non-TTY fallback
|
|
40
|
+
if (!process.stderr.isTTY) {
|
|
41
|
+
write(` ${capitalLabel}...\n`);
|
|
42
|
+
return { stop() { } };
|
|
43
|
+
}
|
|
44
|
+
let frame = 0;
|
|
45
|
+
write(HIDE_CURSOR);
|
|
46
|
+
const timer = setInterval(() => {
|
|
47
|
+
const step = frame % totalSteps;
|
|
48
|
+
const charIndex = Math.floor(step / frameHold) % brailleSeq.length;
|
|
49
|
+
const text = `${brailleSeq[charIndex]} ${capitalLabel}...`;
|
|
50
|
+
let rendered = " ";
|
|
51
|
+
for (let i = 0; i < text.length; i++) {
|
|
52
|
+
const [r, g, b] = (0, GradientPalette_js_1.getSmoothedColor)(frame * 3 - i * 8);
|
|
53
|
+
rendered += `${(0, GradientPalette_js_1.rgb)(r, g, b)}${text[i]}`;
|
|
54
|
+
}
|
|
55
|
+
rendered += RESET;
|
|
56
|
+
write(`\r${rendered} `);
|
|
57
|
+
frame++;
|
|
58
|
+
}, intervalMs);
|
|
59
|
+
return {
|
|
60
|
+
stop() {
|
|
61
|
+
clearInterval(timer);
|
|
62
|
+
write(SHOW_CURSOR);
|
|
63
|
+
write(`\r\x1b[2K`);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=BrailleSpinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrailleSpinner.js","sourceRoot":"","sources":["../../../../src/presentation/cli/animations/BrailleSpinner.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAqCH,kDA+CC;AAlFD,6DAAiG;AAGjG,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,WAAW,GAAG,WAAW,CAAC;AAChC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AC,KAAK,CAAC,CAAC;YACrB,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,KAAK,CAAC,WAAW,CAAC,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glimmer Effect
|
|
3
|
+
*
|
|
4
|
+
* Sweep-highlight animation for text: displays text in a base color,
|
|
5
|
+
* sweeps a bright highlight across it, then flashes and settles.
|
|
6
|
+
*/
|
|
7
|
+
export interface GlimmerConfig {
|
|
8
|
+
/** ANSI escape for the base text color */
|
|
9
|
+
baseColor: string;
|
|
10
|
+
/** ANSI escape for the sweep highlight color */
|
|
11
|
+
highlightColor: string;
|
|
12
|
+
/** Number of characters in the highlight band (default 3) */
|
|
13
|
+
sweepWidth?: number;
|
|
14
|
+
/** Milliseconds per sweep step (default 40) */
|
|
15
|
+
sweepMs?: number;
|
|
16
|
+
/** Milliseconds to hold the flash (default 100) */
|
|
17
|
+
flashMs?: number;
|
|
18
|
+
/** Milliseconds to hold before sweep starts (default 200) */
|
|
19
|
+
settleMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Play a glimmer animation on a text string.
|
|
23
|
+
*
|
|
24
|
+
* 1. Show text in base color
|
|
25
|
+
* 2. Sweep a bright highlight left → right
|
|
26
|
+
* 3. Flash the full text bright
|
|
27
|
+
* 4. Settle back to base color
|
|
28
|
+
*
|
|
29
|
+
* Degrades to a single print in non-TTY mode.
|
|
30
|
+
*/
|
|
31
|
+
export declare function playGlimmer(text: string, padding: string, config: GlimmerConfig, write?: (s: string) => void): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=GlimmerEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlimmerEffect.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/animations/GlimmerEffect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,aAAa,EACrB,KAAK,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAqC,GAC1D,OAAO,CAAC,IAAI,CAAC,CAwCf"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Glimmer Effect
|
|
4
|
+
*
|
|
5
|
+
* Sweep-highlight animation for text: displays text in a base color,
|
|
6
|
+
* sweeps a bright highlight across it, then flashes and settles.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.playGlimmer = playGlimmer;
|
|
10
|
+
const RESET = "\x1b[0m";
|
|
11
|
+
const BOLD = "\x1b[1m";
|
|
12
|
+
function sleep(ms) {
|
|
13
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Play a glimmer animation on a text string.
|
|
17
|
+
*
|
|
18
|
+
* 1. Show text in base color
|
|
19
|
+
* 2. Sweep a bright highlight left → right
|
|
20
|
+
* 3. Flash the full text bright
|
|
21
|
+
* 4. Settle back to base color
|
|
22
|
+
*
|
|
23
|
+
* Degrades to a single print in non-TTY mode.
|
|
24
|
+
*/
|
|
25
|
+
async function playGlimmer(text, padding, config, write = (s) => process.stderr.write(s)) {
|
|
26
|
+
const { baseColor, highlightColor, sweepWidth = 3, sweepMs = 40, flashMs = 100, settleMs = 200, } = config;
|
|
27
|
+
// Non-TTY fallback
|
|
28
|
+
if (!process.stderr.isTTY) {
|
|
29
|
+
write(`${padding}${text}\n`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// Show full text in base color
|
|
33
|
+
write(`\r${padding}${BOLD}${baseColor}${text}${RESET}`);
|
|
34
|
+
await sleep(settleMs);
|
|
35
|
+
// Sweep highlight across
|
|
36
|
+
for (let pos = -sweepWidth; pos <= text.length; pos++) {
|
|
37
|
+
let rendered = padding;
|
|
38
|
+
for (let i = 0; i < text.length; i++) {
|
|
39
|
+
if (i >= pos && i < pos + sweepWidth) {
|
|
40
|
+
rendered += `${BOLD}${highlightColor}${text[i]}`;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
rendered += `${BOLD}${baseColor}${text[i]}`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
write(`\r${rendered}${RESET}`);
|
|
47
|
+
await sleep(sweepMs);
|
|
48
|
+
}
|
|
49
|
+
// Flash pop
|
|
50
|
+
write(`\r${padding}${BOLD}${highlightColor}${text}${RESET}`);
|
|
51
|
+
await sleep(flashMs);
|
|
52
|
+
// Settle back to base
|
|
53
|
+
write(`\r${padding}${BOLD}${baseColor}${text}${RESET}`);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=GlimmerEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlimmerEffect.js","sourceRoot":"","sources":["../../../../src/presentation/cli/animations/GlimmerEffect.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAkCH,kCA6CC;AA7ED,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,IAAI,GAAG,SAAS,CAAC;AAiBvB,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EA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ACH,CAAC;QACD,KAAK,CAAC,KAAK,QAAQ,GAAG,KAAK,EAAE,CAAC,CAAC;QAC/B,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,YAAY;IACZ,KAAK,CAAC,KAAK,OAAO,GAAG,IAAI,GAAG,cAAc,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC;IAC7D,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IAErB,sBAAsB;IACtB,KAAK,CAAC,KAAK,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gradient Palette
|
|
3
|
+
*
|
|
4
|
+
* Shared color gradient definitions and interpolation utilities for
|
|
5
|
+
* interactive CLI animations. Uses raw ANSI escapes (no chalk) for
|
|
6
|
+
* performance in tight animation loops.
|
|
7
|
+
*/
|
|
8
|
+
export type RGB = [number, number, number];
|
|
9
|
+
/** ANSI true-color foreground escape */
|
|
10
|
+
export declare function rgb(r: number, g: number, b: number): string;
|
|
11
|
+
/** Linear interpolation between two RGB tuples */
|
|
12
|
+
export declare function lerpColor(a: RGB, b: RGB, t: number): RGB;
|
|
13
|
+
/** Build a gradient array of `steps` colors between two RGB endpoints */
|
|
14
|
+
export declare function buildGradient(from: RGB, to: RGB, steps?: number): RGB[];
|
|
15
|
+
/**
|
|
16
|
+
* 10 gradient palettes cycling through the color spectrum.
|
|
17
|
+
* Each gradient has 10 color stops.
|
|
18
|
+
*/
|
|
19
|
+
export declare const GRADIENTS: RGB[][];
|
|
20
|
+
/** All gradient colors flattened into one continuous sequence */
|
|
21
|
+
export declare const SPINNER_COLORS: RGB[];
|
|
22
|
+
/** Total frames for one full slow cycle through the spectrum */
|
|
23
|
+
export declare const COLOR_CYCLE_FRAMES: number;
|
|
24
|
+
/**
|
|
25
|
+
* Get a smoothly interpolated color at a given frame position.
|
|
26
|
+
* Handles negative frames and wraps around the full spectrum.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getSmoothedColor(frame: number): RGB;
|
|
29
|
+
/**
|
|
30
|
+
* Grow/shrink bar animation cycling through all 10 gradients.
|
|
31
|
+
* Alternates direction each cycle.
|
|
32
|
+
*/
|
|
33
|
+
export declare function startBarAnimation(label: string, write?: (s: string) => void): {
|
|
34
|
+
stop: () => void;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=GradientPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientPalette.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/animations/GradientPalette.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAO3C,wCAAwC;AACxC,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,kDAAkD;AAClD,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,CAMxD;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,SAAK,GAAG,GAAG,EAAE,CAOnE;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,GAAG,EAAE,EAW5B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,GAAG,EAAqB,CAAC;AAEtD,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,QAA4B,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAUnD;AAMD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAqC,GAC1D;IAAE,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CAoDtB"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Gradient Palette
|
|
4
|
+
*
|
|
5
|
+
* Shared color gradient definitions and interpolation utilities for
|
|
6
|
+
* interactive CLI animations. Uses raw ANSI escapes (no chalk) for
|
|
7
|
+
* performance in tight animation loops.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.COLOR_CYCLE_FRAMES = exports.SPINNER_COLORS = exports.GRADIENTS = void 0;
|
|
11
|
+
exports.rgb = rgb;
|
|
12
|
+
exports.lerpColor = lerpColor;
|
|
13
|
+
exports.buildGradient = buildGradient;
|
|
14
|
+
exports.getSmoothedColor = getSmoothedColor;
|
|
15
|
+
exports.startBarAnimation = startBarAnimation;
|
|
16
|
+
const RESET = "\x1b[0m";
|
|
17
|
+
const DIM = "\x1b[2m";
|
|
18
|
+
const HIDE_CURSOR = "\x1b[?25l";
|
|
19
|
+
const SHOW_CURSOR = "\x1b[?25h";
|
|
20
|
+
/** ANSI true-color foreground escape */
|
|
21
|
+
function rgb(r, g, b) {
|
|
22
|
+
return `\x1b[38;2;${r};${g};${b}m`;
|
|
23
|
+
}
|
|
24
|
+
/** Linear interpolation between two RGB tuples */
|
|
25
|
+
function lerpColor(a, b, t) {
|
|
26
|
+
return [
|
|
27
|
+
Math.round(a[0] + (b[0] - a[0]) * t),
|
|
28
|
+
Math.round(a[1] + (b[1] - a[1]) * t),
|
|
29
|
+
Math.round(a[2] + (b[2] - a[2]) * t),
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
/** Build a gradient array of `steps` colors between two RGB endpoints */
|
|
33
|
+
function buildGradient(from, to, steps = 10) {
|
|
34
|
+
const g = [];
|
|
35
|
+
for (let i = 0; i < steps; i++) {
|
|
36
|
+
const t = i / (steps - 1);
|
|
37
|
+
g.push(lerpColor(from, to, t));
|
|
38
|
+
}
|
|
39
|
+
return g;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 10 gradient palettes cycling through the color spectrum.
|
|
43
|
+
* Each gradient has 10 color stops.
|
|
44
|
+
*/
|
|
45
|
+
exports.GRADIENTS = [
|
|
46
|
+
buildGradient([255, 182, 193], [150, 0, 0]), // 1 red: light pink → dark maroon
|
|
47
|
+
buildGradient([200, 100, 0], [255, 200, 140]), // 2 orange: deep orange → light peach
|
|
48
|
+
buildGradient([255, 255, 180], [200, 180, 0]), // 3 yellow: light yellow → golden
|
|
49
|
+
buildGradient([100, 140, 0], [240, 255, 180]), // 4 yellow-green: olive → light lime
|
|
50
|
+
buildGradient([200, 255, 200], [0, 80, 0]), // 5 green: light mint → dark green
|
|
51
|
+
buildGradient([30, 80, 160], [140, 200, 255]), // 6 jumbo blue: dark → light
|
|
52
|
+
buildGradient([200, 200, 255], [0, 0, 80]), // 7 blue: light lavender → dark navy
|
|
53
|
+
buildGradient([100, 60, 120], [220, 200, 230]), // 8 purple/mauve: dark → light lavender
|
|
54
|
+
buildGradient([255, 180, 255], [50, 0, 80]), // 9 purple: light pink → dark indigo
|
|
55
|
+
buildGradient([100, 0, 50], [255, 200, 230]), // 10 magenta: dark wine → light pink
|
|
56
|
+
];
|
|
57
|
+
/** All gradient colors flattened into one continuous sequence */
|
|
58
|
+
exports.SPINNER_COLORS = exports.GRADIENTS.flat();
|
|
59
|
+
/** Total frames for one full slow cycle through the spectrum */
|
|
60
|
+
exports.COLOR_CYCLE_FRAMES = exports.SPINNER_COLORS.length * 6;
|
|
61
|
+
/**
|
|
62
|
+
* Get a smoothly interpolated color at a given frame position.
|
|
63
|
+
* Handles negative frames and wraps around the full spectrum.
|
|
64
|
+
*/
|
|
65
|
+
function getSmoothedColor(frame) {
|
|
66
|
+
const progress = (((frame % exports.COLOR_CYCLE_FRAMES) + exports.COLOR_CYCLE_FRAMES) % exports.COLOR_CYCLE_FRAMES) /
|
|
67
|
+
exports.COLOR_CYCLE_FRAMES;
|
|
68
|
+
const pos = progress * exports.SPINNER_COLORS.length;
|
|
69
|
+
const idx = Math.floor(pos);
|
|
70
|
+
const t = pos - idx;
|
|
71
|
+
const a = exports.SPINNER_COLORS[idx % exports.SPINNER_COLORS.length];
|
|
72
|
+
const b = exports.SPINNER_COLORS[(idx + 1) % exports.SPINNER_COLORS.length];
|
|
73
|
+
return lerpColor(a, b, t);
|
|
74
|
+
}
|
|
75
|
+
// --- Bar animation (preserved, currently unused) ---
|
|
76
|
+
const BAR_WIDTH = 10;
|
|
77
|
+
/**
|
|
78
|
+
* Grow/shrink bar animation cycling through all 10 gradients.
|
|
79
|
+
* Alternates direction each cycle.
|
|
80
|
+
*/
|
|
81
|
+
function startBarAnimation(label, write = (s) => process.stderr.write(s)) {
|
|
82
|
+
let frame = 0;
|
|
83
|
+
const cycleFrames = BAR_WIDTH * 2;
|
|
84
|
+
write(HIDE_CURSOR);
|
|
85
|
+
const timer = setInterval(() => {
|
|
86
|
+
const cycle = Math.floor(frame / cycleFrames) % exports.GRADIENTS.length;
|
|
87
|
+
const gradient = exports.GRADIENTS[cycle];
|
|
88
|
+
const phase = frame % cycleFrames;
|
|
89
|
+
let start;
|
|
90
|
+
let end;
|
|
91
|
+
const reverse = cycle % 2 === 1;
|
|
92
|
+
if (phase < BAR_WIDTH) {
|
|
93
|
+
if (reverse) {
|
|
94
|
+
start = BAR_WIDTH - phase - 1;
|
|
95
|
+
end = BAR_WIDTH;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
start = 0;
|
|
99
|
+
end = phase + 1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
if (reverse) {
|
|
104
|
+
start = 0;
|
|
105
|
+
end = BAR_WIDTH - (phase - BAR_WIDTH) - 1;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
start = phase - BAR_WIDTH + 1;
|
|
109
|
+
end = BAR_WIDTH;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const track = [];
|
|
113
|
+
for (let i = 0; i < BAR_WIDTH; i++) {
|
|
114
|
+
if (i >= start && i < end) {
|
|
115
|
+
const [r, g, b] = gradient[i];
|
|
116
|
+
track.push(`${rgb(r, g, b)}▃${RESET}`);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
track.push(" ");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
write(`\r ${DIM}${label}${RESET} ${track.join("")} `);
|
|
123
|
+
frame++;
|
|
124
|
+
}, 120);
|
|
125
|
+
return {
|
|
126
|
+
stop() {
|
|
127
|
+
clearInterval(timer);
|
|
128
|
+
write(SHOW_CURSOR);
|
|
129
|
+
write(`\r\x1b[2K`);
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=GradientPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientPalette.js","sourceRoot":"","sources":["../../../../src/presentation/cli/animations/GradientPalette.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAUH,kBAEC;AAGD,8BAMC;AAGD,sCAOC;AA6BD,4CAUC;AAUD,8CAuDC;AAnID,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,GAAG,GAAG,SAAS,CAAC;AACtB,MAAM,WAAW,GAAG,WAAW,CAAC;AAChC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEhC,wCAAwC;AACxC,SAAgB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IACjD,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACrC,CAAC;AAED,kDAAkD;AAClD,SAAgB,SAAS,CAAC,CAAM,EAAE,CAAM,EAAE,CAAS;IACjD,OAAO;QACL,IAAI,CAAC,KAAK,CAAC,CAAC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CAAC;YACrB,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,KAAK,CAAC,WAAW,CAAC,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare class GoalApproveOutputBuilder {
|
|
|
14
14
|
* Build output for successful goal approval.
|
|
15
15
|
* Renders approval result with next steps.
|
|
16
16
|
*/
|
|
17
|
-
buildSuccess(response: QualifyGoalResponse): TerminalOutput;
|
|
17
|
+
buildSuccess(response: QualifyGoalResponse, continueFlag?: boolean): TerminalOutput;
|
|
18
18
|
/**
|
|
19
19
|
* Build output for goal approval failure.
|
|
20
20
|
* Renders error message when goal approval fails.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoalApproveOutputBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAE9G;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,OAAO,CAAwB;;IAMvC;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,mBAAmB,GAAG,cAAc;
|
|
1
|
+
{"version":3,"file":"GoalApproveOutputBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAE9G;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,OAAO,CAAwB;;IAMvC;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,mBAAmB,EAAE,YAAY,GAAE,OAAe,GAAG,cAAc;IAqC1F;;;OAGG;IACH,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,cAAc;CAQzD"}
|
|
@@ -17,9 +17,8 @@ class GoalApproveOutputBuilder {
|
|
|
17
17
|
* Build output for successful goal approval.
|
|
18
18
|
* Renders approval result with next steps.
|
|
19
19
|
*/
|
|
20
|
-
buildSuccess(response) {
|
|
20
|
+
buildSuccess(response, continueFlag = false) {
|
|
21
21
|
this.builder.reset();
|
|
22
|
-
// Header and success message
|
|
23
22
|
this.builder.addPrompt("# Goal Approved\n" +
|
|
24
23
|
`Goal ID: ${response.goalId}\n` +
|
|
25
24
|
`Objective: ${response.objective}\n` +
|
|
@@ -28,10 +27,16 @@ class GoalApproveOutputBuilder {
|
|
|
28
27
|
"## QA Review Passed\n" +
|
|
29
28
|
"The goal has been approved and is ready for codification.\n" +
|
|
30
29
|
"---");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
30
|
+
let nextSteps;
|
|
31
|
+
if (continueFlag) {
|
|
32
|
+
nextSteps = "## Next Steps\n" +
|
|
33
|
+
"Codify the goal:\n" +
|
|
34
|
+
` Run: jumbo goal codify --id ${response.goalId}`;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
nextSteps = "## [Next Phase] Codification\n" +
|
|
38
|
+
`To codify the goal: jumbo goal codify --id ${response.goalId}`;
|
|
39
|
+
}
|
|
35
40
|
if (response.nextGoalId) {
|
|
36
41
|
nextSteps += "\n\nAfter closing, the next goal in the queue is:\n" +
|
|
37
42
|
` Goal ID: ${response.nextGoalId}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoalApproveOutputBuilder.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.ts"],"names":[],"mappings":";;;AAAA,uFAAiF;AAIjF;;;;;;GAMG;AACH,MAAa,wBAAwB;IAGnC;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,gDAAqB,EAAE,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,QAA6B;
|
|
1
|
+
{"version":3,"file":"GoalApproveOutputBuilder.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/GoalApproveOutputBuilder.ts"],"names":[],"mappings":";;;AAAA,uFAAiF;AAIjF;;;;;;GAMG;AACH,MAAa,wBAAwB;IAGnC;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,gDAAqB,EAAE,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,QAA6B,EAAE,eAAwB,KAAK;QACvE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAErB,IAAI,CAAC,OAAO,CAAC,SAAS,CACpB,mBAAmB;YACnB,YAAY,QAAQ,CAAC,MAAM,IAAI;YAC/B,cAAc,QAAQ,CAAC,SAAS,IAAI;YACpC,WAAW,QAAQ,CAAC,MAAM,IAAI;YAC9B,SAAS;YACT,uBAAuB;YACvB,6DAA6D;YAC7D,KAAK,CACN,CAAC;QAEF,IAAI,SAAiB,CAAC;QAEtB,IAAI,YAAY,EAAE,CAAC;YACjB,SAAS,GAAG,iBAAiB;gBACjB,oBAAoB;gBACpB,iCAAiC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACjE,CAAC;aAAM,CAAC;YACN,SAAS,GAAG,gCAAgC;gBAChC,8CAA8C,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC9E,CAAC;QAED,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;YACxB,SAAS,IAAI,qDAAqD;gBACrD,cAAc,QAAQ,CAAC,UAAU,EAAE,CAAC;QACnD,CAAC;QAED,SAAS,IAAI,SAAS,CAAC;QAEvB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAElC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,iBAAiB,CAAC,KAAqB;QACrC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACnB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;SACxD,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AA5DD,4DA4DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal.approve.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/goal.approve.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"goal.approve.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/goal.approve.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAmB,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAIjG;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,eAiBtB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAC3C,SAAS,EAAE,qBAAqB,iBAqBjC"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.metadata = void 0;
|
|
13
13
|
exports.goalApprove = goalApprove;
|
|
14
|
+
const CommandMetadata_js_1 = require("../../registry/CommandMetadata.js");
|
|
14
15
|
const Renderer_js_1 = require("../../../rendering/Renderer.js");
|
|
15
16
|
const GoalApproveOutputBuilder_js_1 = require("./GoalApproveOutputBuilder.js");
|
|
16
17
|
/**
|
|
@@ -25,7 +26,7 @@ exports.metadata = {
|
|
|
25
26
|
description: "ID of the goal to approve"
|
|
26
27
|
}
|
|
27
28
|
],
|
|
28
|
-
options: [],
|
|
29
|
+
options: [CommandMetadata_js_1.CONTINUE_OPTION],
|
|
29
30
|
examples: [
|
|
30
31
|
{
|
|
31
32
|
command: "jumbo goal approve --id goal_abc123",
|
|
@@ -40,18 +41,19 @@ exports.metadata = {
|
|
|
40
41
|
*/
|
|
41
42
|
async function goalApprove(options, container) {
|
|
42
43
|
const renderer = Renderer_js_1.Renderer.getInstance();
|
|
44
|
+
const outputBuilder = new GoalApproveOutputBuilder_js_1.GoalApproveOutputBuilder();
|
|
43
45
|
try {
|
|
44
46
|
// 1. Execute via controller (delegates to same QualifyGoalController)
|
|
45
47
|
const response = await container.qualifyGoalController.handle({
|
|
46
48
|
goalId: options.id,
|
|
47
49
|
});
|
|
48
50
|
// 2. Build and render output using builder pattern
|
|
49
|
-
const
|
|
50
|
-
const output = outputBuilder.buildSuccess(response);
|
|
51
|
+
const output = outputBuilder.buildSuccess(response, options.continue === true);
|
|
51
52
|
renderer.info(output.toHumanReadable());
|
|
52
53
|
}
|
|
53
54
|
catch (error) {
|
|
54
|
-
|
|
55
|
+
const errorOutput = outputBuilder.buildFailureError(error instanceof Error ? error : String(error));
|
|
56
|
+
renderer.error(errorOutput.toHumanReadable());
|
|
55
57
|
process.exit(1);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal.approve.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/goal.approve.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAiCH,
|
|
1
|
+
{"version":3,"file":"goal.approve.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/approve/goal.approve.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAiCH,kCAuBC;AAtDD,0EAAq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B,CAAC;AACH,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare class GoalCloseOutputBuilder {
|
|
|
14
14
|
* Build output for successful goal close.
|
|
15
15
|
* Renders close confirmation and optional next goal information.
|
|
16
16
|
*/
|
|
17
|
-
buildSuccess(response: CloseGoalResponse): TerminalOutput;
|
|
17
|
+
buildSuccess(response: CloseGoalResponse, continueFlag?: boolean): TerminalOutput;
|
|
18
18
|
/**
|
|
19
19
|
* Build output for goal close failure.
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoalCloseOutputBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qEAAqE,CAAC;AAExG;;;;;;GAMG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,OAAO,CAAwB;;IAMvC;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,iBAAiB,GAAG,cAAc;
|
|
1
|
+
{"version":3,"file":"GoalCloseOutputBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qEAAqE,CAAC;AAExG;;;;;;GAMG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,OAAO,CAAwB;;IAMvC;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,iBAAiB,EAAE,YAAY,GAAE,OAAe,GAAG,cAAc;IAmCxF;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,cAAc;CAQzD"}
|
|
@@ -17,15 +17,13 @@ class GoalCloseOutputBuilder {
|
|
|
17
17
|
* Build output for successful goal close.
|
|
18
18
|
* Renders close confirmation and optional next goal information.
|
|
19
19
|
*/
|
|
20
|
-
buildSuccess(response) {
|
|
20
|
+
buildSuccess(response, continueFlag = false) {
|
|
21
21
|
this.builder.reset();
|
|
22
|
-
// Header
|
|
23
22
|
this.builder.addPrompt("# Goal Closed\n" +
|
|
24
23
|
`Goal ID: ${response.goalId}\n` +
|
|
25
24
|
`Objective: ${response.objective}\n` +
|
|
26
25
|
`Status: ${response.status}\n` +
|
|
27
26
|
"---");
|
|
28
|
-
// Next goal in chain (if exists)
|
|
29
27
|
if (response.nextGoal) {
|
|
30
28
|
this.builder.addPrompt("## Next goal in chain:");
|
|
31
29
|
this.builder.addData({
|
|
@@ -33,8 +31,14 @@ class GoalCloseOutputBuilder {
|
|
|
33
31
|
objective: response.nextGoal.objective,
|
|
34
32
|
status: response.nextGoal.status,
|
|
35
33
|
});
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
if (continueFlag) {
|
|
35
|
+
this.builder.addPrompt("Start the next goal immediately. Run:\n" +
|
|
36
|
+
` jumbo goal start --id ${response.nextGoal.goalId}`);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.builder.addPrompt("[Next Phase] Implementation\n" +
|
|
40
|
+
`To start the next goal: jumbo goal start --id ${response.nextGoal.goalId}`);
|
|
41
|
+
}
|
|
38
42
|
}
|
|
39
43
|
return this.builder.build();
|
|
40
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoalCloseOutputBuilder.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/close/GoalCloseOutputBuilder.ts"],"names":[],"mappings":";;;AAAA,uFAAiF;AAIjF;;;;;;GAMG;AACH,MAAa,sBAAsB;IAGjC;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,gDAAqB,EAAE,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,QAA2B;
|
|
1
|
+
{"version":3,"file":"GoalCloseOutput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BAAiB,CAAC,KAAqB;QACrC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACnB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;SACxD,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAzDD,wDAyDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal.close.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/close/goal.close.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"goal.close.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/goals/close/goal.close.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAmB,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAIjG;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,eAiBtB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAC3C,SAAS,EAAE,qBAAqB,iBAqBjC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.metadata = void 0;
|
|
10
10
|
exports.goalClose = goalClose;
|
|
11
|
+
const CommandMetadata_js_1 = require("../../registry/CommandMetadata.js");
|
|
11
12
|
const Renderer_js_1 = require("../../../rendering/Renderer.js");
|
|
12
13
|
const GoalCloseOutputBuilder_js_1 = require("./GoalCloseOutputBuilder.js");
|
|
13
14
|
/**
|
|
@@ -22,7 +23,7 @@ exports.metadata = {
|
|
|
22
23
|
description: "ID of the goal to close"
|
|
23
24
|
}
|
|
24
25
|
],
|
|
25
|
-
options: [],
|
|
26
|
+
options: [CommandMetadata_js_1.CONTINUE_OPTION],
|
|
26
27
|
examples: [
|
|
27
28
|
{
|
|
28
29
|
command: "jumbo goal close --id goal_abc123",
|
|
@@ -37,18 +38,19 @@ exports.metadata = {
|
|
|
37
38
|
*/
|
|
38
39
|
async function goalClose(options, container) {
|
|
39
40
|
const renderer = Renderer_js_1.Renderer.getInstance();
|
|
41
|
+
const outputBuilder = new GoalCloseOutputBuilder_js_1.GoalCloseOutputBuilder();
|
|
40
42
|
try {
|
|
41
43
|
// 1. Execute via controller
|
|
42
44
|
const response = await container.closeGoalController.handle({
|
|
43
45
|
goalId: options.id,
|
|
44
46
|
});
|
|
45
47
|
// 2. Build and render output using builder pattern
|
|
46
|
-
const
|
|
47
|
-
const output = outputBuilder.buildSuccess(response);
|
|
48
|
+
const output = outputBuilder.buildSuccess(response, options.continue === true);
|
|
48
49
|
renderer.info(output.toHumanReadable());
|
|
49
50
|
}
|
|
50
51
|
catch (error) {
|
|
51
|
-
|
|
52
|
+
const errorOutput = outputBuilder.buildFailureError(error instanceof Error ? error : String(error));
|
|
53
|
+
renderer.error(errorOutput.toHumanReadable());
|
|
52
54
|
process.exit(1);
|
|
53
55
|
}
|
|
54
56
|
}
|