chief-helm 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +220 -0
- package/dist/commands/config.d.ts +26 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +111 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/inputs.d.ts +21 -0
- package/dist/commands/inputs.d.ts.map +1 -0
- package/dist/commands/inputs.js +158 -0
- package/dist/commands/inputs.js.map +1 -0
- package/dist/commands/push.d.ts +21 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +51 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/secrets.d.ts +21 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +110 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/setup.d.ts +24 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +421 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/status.d.ts +20 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +184 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +19 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +47 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/core/config.d.ts +74 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +182 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/git.d.ts +73 -0
- package/dist/core/git.d.ts.map +1 -0
- package/dist/core/git.js +188 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/inputs.d.ts +40 -0
- package/dist/core/inputs.d.ts.map +1 -0
- package/dist/core/inputs.js +360 -0
- package/dist/core/inputs.js.map +1 -0
- package/dist/core/repo.d.ts +71 -0
- package/dist/core/repo.d.ts.map +1 -0
- package/dist/core/repo.js +152 -0
- package/dist/core/repo.js.map +1 -0
- package/dist/core/secrets.d.ts +79 -0
- package/dist/core/secrets.d.ts.map +1 -0
- package/dist/core/secrets.js +168 -0
- package/dist/core/secrets.js.map +1 -0
- package/dist/core/state.d.ts +46 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +119 -0
- package/dist/core/state.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +163 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +210 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/components/Header.d.ts +32 -0
- package/dist/ui/components/Header.d.ts.map +1 -0
- package/dist/ui/components/Header.js +15 -0
- package/dist/ui/components/Header.js.map +1 -0
- package/dist/ui/components/Panel.d.ts +30 -0
- package/dist/ui/components/Panel.d.ts.map +1 -0
- package/dist/ui/components/Panel.js +15 -0
- package/dist/ui/components/Panel.js.map +1 -0
- package/dist/ui/components/StatusRow.d.ts +39 -0
- package/dist/ui/components/StatusRow.d.ts.map +1 -0
- package/dist/ui/components/StatusRow.js +27 -0
- package/dist/ui/components/StatusRow.js.map +1 -0
- package/dist/ui/theme.d.ts +60 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +60 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/utils/errors.d.ts +50 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +63 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/format.d.ts +66 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +107 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/logger.d.ts +35 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +71 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file CHIEF visual design system.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for all colours and status symbols used
|
|
5
|
+
* across HELM terminal output and Ink components. All values are
|
|
6
|
+
* hex strings compatible with chalk's hex() API and Ink's color prop.
|
|
7
|
+
*
|
|
8
|
+
* Defined in PRD Section 12.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Colour palette for the CHIEF design system.
|
|
12
|
+
*
|
|
13
|
+
* Semantic names (dispatch, prep, yours, skip) correspond to the four
|
|
14
|
+
* classification states. Utility names (border, text, muted, success,
|
|
15
|
+
* warning, error, accent) are used for structural chrome.
|
|
16
|
+
*/
|
|
17
|
+
export declare const theme: {
|
|
18
|
+
/** Classification: AI can handle fully. */
|
|
19
|
+
readonly dispatch: "#22c55e";
|
|
20
|
+
/** Classification: AI gets 80% there, human finishes. */
|
|
21
|
+
readonly prep: "#eab308";
|
|
22
|
+
/** Classification: Requires human judgment. */
|
|
23
|
+
readonly yours: "#ef4444";
|
|
24
|
+
/** Classification: Not actionable today. */
|
|
25
|
+
readonly skip: "#6b7280";
|
|
26
|
+
/** Panel and row border lines. */
|
|
27
|
+
readonly border: "#334155";
|
|
28
|
+
/** Primary text on dark background. */
|
|
29
|
+
readonly text: "#f1f5f9";
|
|
30
|
+
/** Secondary/subdued text. */
|
|
31
|
+
readonly muted: "#94a3b8";
|
|
32
|
+
/** Positive outcome indicator. */
|
|
33
|
+
readonly success: "#22c55e";
|
|
34
|
+
/** Non-blocking issue indicator. */
|
|
35
|
+
readonly warning: "#f59e0b";
|
|
36
|
+
/** Blocking failure indicator. */
|
|
37
|
+
readonly error: "#ef4444";
|
|
38
|
+
/** Highlight / interactive accent. */
|
|
39
|
+
readonly accent: "#6366f1";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Unicode status symbols used in all HELM output.
|
|
43
|
+
* Consistent placement: symbol always precedes the label it qualifies.
|
|
44
|
+
*/
|
|
45
|
+
export declare const symbol: {
|
|
46
|
+
readonly success: "✓";
|
|
47
|
+
readonly error: "✗";
|
|
48
|
+
readonly warning: "⚠";
|
|
49
|
+
readonly disabled: "○";
|
|
50
|
+
readonly bullet: "·";
|
|
51
|
+
readonly arrow: "→";
|
|
52
|
+
readonly info: "ℹ";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Header format string template.
|
|
56
|
+
* Usage: replace [SCREEN], [USERNAME], [CONTEXT] at render time.
|
|
57
|
+
* Context segment is optional — omit trailing " · [CONTEXT]" when absent.
|
|
58
|
+
*/
|
|
59
|
+
export declare const HEADER_FORMAT = "CHIEF \u00B7 [SCREEN] \u00B7 [USERNAME] \u00B7 [CONTEXT]";
|
|
60
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;IAChB,2CAA2C;;IAE3C,yDAAyD;;IAEzD,+CAA+C;;IAE/C,4CAA4C;;IAG5C,kCAAkC;;IAElC,uCAAuC;;IAEvC,8BAA8B;;IAG9B,kCAAkC;;IAElC,oCAAoC;;IAEpC,kCAAkC;;IAElC,sCAAsC;;CAE9B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;CAQT,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa,mEAAoD,CAAC"}
|
package/dist/ui/theme.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file CHIEF visual design system.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for all colours and status symbols used
|
|
5
|
+
* across HELM terminal output and Ink components. All values are
|
|
6
|
+
* hex strings compatible with chalk's hex() API and Ink's color prop.
|
|
7
|
+
*
|
|
8
|
+
* Defined in PRD Section 12.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Colour palette for the CHIEF design system.
|
|
12
|
+
*
|
|
13
|
+
* Semantic names (dispatch, prep, yours, skip) correspond to the four
|
|
14
|
+
* classification states. Utility names (border, text, muted, success,
|
|
15
|
+
* warning, error, accent) are used for structural chrome.
|
|
16
|
+
*/
|
|
17
|
+
export const theme = {
|
|
18
|
+
/** Classification: AI can handle fully. */
|
|
19
|
+
dispatch: "#22c55e",
|
|
20
|
+
/** Classification: AI gets 80% there, human finishes. */
|
|
21
|
+
prep: "#eab308",
|
|
22
|
+
/** Classification: Requires human judgment. */
|
|
23
|
+
yours: "#ef4444",
|
|
24
|
+
/** Classification: Not actionable today. */
|
|
25
|
+
skip: "#6b7280",
|
|
26
|
+
/** Panel and row border lines. */
|
|
27
|
+
border: "#334155",
|
|
28
|
+
/** Primary text on dark background. */
|
|
29
|
+
text: "#f1f5f9",
|
|
30
|
+
/** Secondary/subdued text. */
|
|
31
|
+
muted: "#94a3b8",
|
|
32
|
+
/** Positive outcome indicator. */
|
|
33
|
+
success: "#22c55e",
|
|
34
|
+
/** Non-blocking issue indicator. */
|
|
35
|
+
warning: "#f59e0b",
|
|
36
|
+
/** Blocking failure indicator. */
|
|
37
|
+
error: "#ef4444",
|
|
38
|
+
/** Highlight / interactive accent. */
|
|
39
|
+
accent: "#6366f1",
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Unicode status symbols used in all HELM output.
|
|
43
|
+
* Consistent placement: symbol always precedes the label it qualifies.
|
|
44
|
+
*/
|
|
45
|
+
export const symbol = {
|
|
46
|
+
success: "✓",
|
|
47
|
+
error: "✗",
|
|
48
|
+
warning: "⚠",
|
|
49
|
+
disabled: "○",
|
|
50
|
+
bullet: "·",
|
|
51
|
+
arrow: "→",
|
|
52
|
+
info: "ℹ",
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Header format string template.
|
|
56
|
+
* Usage: replace [SCREEN], [USERNAME], [CONTEXT] at render time.
|
|
57
|
+
* Context segment is optional — omit trailing " · [CONTEXT]" when absent.
|
|
58
|
+
*/
|
|
59
|
+
export const HEADER_FORMAT = "CHIEF · [SCREEN] · [USERNAME] · [CONTEXT]";
|
|
60
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,2CAA2C;IAC3C,QAAQ,EAAE,SAAS;IACnB,yDAAyD;IACzD,IAAI,EAAE,SAAS;IACf,+CAA+C;IAC/C,KAAK,EAAE,SAAS;IAChB,4CAA4C;IAC5C,IAAI,EAAE,SAAS;IAEf,kCAAkC;IAClC,MAAM,EAAE,SAAS;IACjB,uCAAuC;IACvC,IAAI,EAAE,SAAS;IACf,8BAA8B;IAC9B,KAAK,EAAE,SAAS;IAEhB,kCAAkC;IAClC,OAAO,EAAE,SAAS;IAClB,oCAAoC;IACpC,OAAO,EAAE,SAAS;IAClB,kCAAkC;IAClC,KAAK,EAAE,SAAS;IAChB,sCAAsC;IACtC,MAAM,EAAE,SAAS;CACT,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;CACD,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,iDAAiD,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Typed error handling for HELM.
|
|
3
|
+
*
|
|
4
|
+
* Every user-facing failure is a HelmError with two required fields:
|
|
5
|
+
* a description of what went wrong and a specific actionable fix.
|
|
6
|
+
* This enforces the PRD requirement that every error surfaces with
|
|
7
|
+
* a clear message and a concrete next step.
|
|
8
|
+
*
|
|
9
|
+
* Unexpected errors (bugs, unhandled rejections) are caught at the
|
|
10
|
+
* top-level handler in index.ts and formatted separately.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* All intentional HELM failures. Thrown when a known failure condition
|
|
14
|
+
* is encountered (missing config, bad credentials, git conflicts, etc.).
|
|
15
|
+
*
|
|
16
|
+
* The `fix` field is mandatory — HELM never shows an error without
|
|
17
|
+
* telling the user exactly what to do next.
|
|
18
|
+
*/
|
|
19
|
+
export declare class HelmError extends Error {
|
|
20
|
+
/** The specific remediation instruction to show the user. */
|
|
21
|
+
readonly fix: string;
|
|
22
|
+
constructor(what: string, fix: string);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Formats a HelmError into the CHIEF visual design error format:
|
|
26
|
+
* ```
|
|
27
|
+
* ✗ Error: [what]
|
|
28
|
+
* → [fix]
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* Output is plain text. Callers apply chalk colouring if needed.
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatHelmError(error: HelmError): string;
|
|
34
|
+
/**
|
|
35
|
+
* Formats an unexpected (non-HelmError) exception for display.
|
|
36
|
+
* Used by the top-level error handler in index.ts.
|
|
37
|
+
*
|
|
38
|
+
* The error message is surfaced as-is. No fix suggestion is provided
|
|
39
|
+
* because the cause is not a known application state.
|
|
40
|
+
*/
|
|
41
|
+
export declare function formatUnexpectedError(error: unknown): string;
|
|
42
|
+
/**
|
|
43
|
+
* Asserts that a value is not null or undefined at a known-safe
|
|
44
|
+
* location, throwing HelmError with the provided context if it is.
|
|
45
|
+
*
|
|
46
|
+
* Use this instead of non-null assertions (!) to keep error messages
|
|
47
|
+
* actionable rather than crashing silently.
|
|
48
|
+
*/
|
|
49
|
+
export declare function assertDefined<T>(value: T | null | undefined, what: string, fix: string): asserts value is T;
|
|
50
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAClC,6DAA6D;IAC7D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAET,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAKtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAI5D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,KAAK,IAAI,CAAC,CAIpB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Typed error handling for HELM.
|
|
3
|
+
*
|
|
4
|
+
* Every user-facing failure is a HelmError with two required fields:
|
|
5
|
+
* a description of what went wrong and a specific actionable fix.
|
|
6
|
+
* This enforces the PRD requirement that every error surfaces with
|
|
7
|
+
* a clear message and a concrete next step.
|
|
8
|
+
*
|
|
9
|
+
* Unexpected errors (bugs, unhandled rejections) are caught at the
|
|
10
|
+
* top-level handler in index.ts and formatted separately.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* All intentional HELM failures. Thrown when a known failure condition
|
|
14
|
+
* is encountered (missing config, bad credentials, git conflicts, etc.).
|
|
15
|
+
*
|
|
16
|
+
* The `fix` field is mandatory — HELM never shows an error without
|
|
17
|
+
* telling the user exactly what to do next.
|
|
18
|
+
*/
|
|
19
|
+
export class HelmError extends Error {
|
|
20
|
+
/** The specific remediation instruction to show the user. */
|
|
21
|
+
fix;
|
|
22
|
+
constructor(what, fix) {
|
|
23
|
+
super(what);
|
|
24
|
+
this.name = "HelmError";
|
|
25
|
+
this.fix = fix;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Formats a HelmError into the CHIEF visual design error format:
|
|
30
|
+
* ```
|
|
31
|
+
* ✗ Error: [what]
|
|
32
|
+
* → [fix]
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Output is plain text. Callers apply chalk colouring if needed.
|
|
36
|
+
*/
|
|
37
|
+
export function formatHelmError(error) {
|
|
38
|
+
return `✗ Error: ${error.message}\n → ${error.fix}`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Formats an unexpected (non-HelmError) exception for display.
|
|
42
|
+
* Used by the top-level error handler in index.ts.
|
|
43
|
+
*
|
|
44
|
+
* The error message is surfaced as-is. No fix suggestion is provided
|
|
45
|
+
* because the cause is not a known application state.
|
|
46
|
+
*/
|
|
47
|
+
export function formatUnexpectedError(error) {
|
|
48
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
49
|
+
return `✗ Unexpected error: ${message}\n → This is a bug. Please report it at https://github.com/[owner]/chief/issues`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Asserts that a value is not null or undefined at a known-safe
|
|
53
|
+
* location, throwing HelmError with the provided context if it is.
|
|
54
|
+
*
|
|
55
|
+
* Use this instead of non-null assertions (!) to keep error messages
|
|
56
|
+
* actionable rather than crashing silently.
|
|
57
|
+
*/
|
|
58
|
+
export function assertDefined(value, what, fix) {
|
|
59
|
+
if (value === null || value === undefined) {
|
|
60
|
+
throw new HelmError(what, fix);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAClC,6DAA6D;IACpD,GAAG,CAAS;IAErB,YAAY,IAAY,EAAE,GAAW;QACnC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,KAAgB;IAC9C,OAAO,YAAY,KAAK,CAAC,OAAO,SAAS,KAAK,CAAC,GAAG,EAAE,CAAC;AACvD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzD,OAAO,uBAAuB,OAAO,kFAAkF,CAAC;AAC1H,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,KAA2B,EAC3B,IAAY,EACZ,GAAW;IAEX,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Terminal output formatting utilities.
|
|
3
|
+
*
|
|
4
|
+
* Covers date/time display, string padding, and the box-drawing
|
|
5
|
+
* primitives used to render the CHIEF bordered panels (helm status,
|
|
6
|
+
* helm sync output). All box-drawing functions accept chalk-coloured
|
|
7
|
+
* strings and use visible-length calculation to ignore ANSI escape codes
|
|
8
|
+
* when computing padding.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Returns the printable character count of a string, ignoring any
|
|
12
|
+
* embedded ANSI escape sequences. Required for correct padding when
|
|
13
|
+
* chalk-coloured content is placed inside fixed-width box rows.
|
|
14
|
+
*/
|
|
15
|
+
export declare function visibleLength(str: string): number;
|
|
16
|
+
/**
|
|
17
|
+
* Width of the horizontal rule (═ characters) between the two corner
|
|
18
|
+
* glyphs. All box-drawing functions share this constant so panels
|
|
19
|
+
* remain consistent across commands.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BOX_RULE_WIDTH = 60;
|
|
22
|
+
/** Renders the top border of a CHIEF panel: ╔══...══╗ */
|
|
23
|
+
export declare function boxTop(): string;
|
|
24
|
+
/** Renders an internal section divider: ╠══...══╣ */
|
|
25
|
+
export declare function boxDivider(): string;
|
|
26
|
+
/** Renders the bottom border of a CHIEF panel: ╚══...══╝ */
|
|
27
|
+
export declare function boxBottom(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Renders a single content row inside a CHIEF panel.
|
|
30
|
+
*
|
|
31
|
+
* The content string may contain chalk ANSI codes. Padding is calculated
|
|
32
|
+
* using visibleLength so the right border aligns correctly regardless of
|
|
33
|
+
* colour codes embedded in the content.
|
|
34
|
+
*
|
|
35
|
+
* @param content - The text to display, optionally chalk-coloured.
|
|
36
|
+
* @param indent - Leading spaces inside the left border. Defaults to 2.
|
|
37
|
+
*/
|
|
38
|
+
export declare function boxRow(content: string, indent?: number): string;
|
|
39
|
+
/** Renders an empty row (blank line inside the panel). */
|
|
40
|
+
export declare function boxEmpty(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Formats a Date into the header display string used in CHIEF panels:
|
|
43
|
+
* "Saturday March 7"
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatHeaderDate(date: Date): string;
|
|
46
|
+
/**
|
|
47
|
+
* Formats an ISO timestamp into a concise human-readable label
|
|
48
|
+
* suitable for the LAST RUNS section of helm status.
|
|
49
|
+
*
|
|
50
|
+
* - Same calendar day → "today H:mm a"
|
|
51
|
+
* - Previous calendar day → "yesterday"
|
|
52
|
+
* - Older → "N days ago"
|
|
53
|
+
* - Empty/missing → "never"
|
|
54
|
+
*/
|
|
55
|
+
export declare function formatLastRun(isoTimestamp: string | undefined): string;
|
|
56
|
+
/**
|
|
57
|
+
* Left-pads a string to a target visible width.
|
|
58
|
+
* Safe for chalk-coloured strings.
|
|
59
|
+
*/
|
|
60
|
+
export declare function padEnd(str: string, targetWidth: number): string;
|
|
61
|
+
/**
|
|
62
|
+
* Truncates a string to a maximum visible width, appending "…" if
|
|
63
|
+
* truncation occurred. Safe for plain strings only (no ANSI codes).
|
|
64
|
+
*/
|
|
65
|
+
export declare function truncate(str: string, maxWidth: number): string;
|
|
66
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAID;;;;GAIG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC,yDAAyD;AACzD,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAI1D;AAED,0DAA0D;AAC1D,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAID;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAOtE;AAID;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9D"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Terminal output formatting utilities.
|
|
3
|
+
*
|
|
4
|
+
* Covers date/time display, string padding, and the box-drawing
|
|
5
|
+
* primitives used to render the CHIEF bordered panels (helm status,
|
|
6
|
+
* helm sync output). All box-drawing functions accept chalk-coloured
|
|
7
|
+
* strings and use visible-length calculation to ignore ANSI escape codes
|
|
8
|
+
* when computing padding.
|
|
9
|
+
*/
|
|
10
|
+
import { format, formatDistanceToNow, isToday, isYesterday } from "date-fns";
|
|
11
|
+
// ─── ANSI / Visible Length ────────────────────────────────────────────────────
|
|
12
|
+
/** Regex that matches all ANSI CSI escape sequences (colour, style, etc.). */
|
|
13
|
+
const ANSI_ESCAPE_RE = /\x1B\[[0-9;]*m/g;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the printable character count of a string, ignoring any
|
|
16
|
+
* embedded ANSI escape sequences. Required for correct padding when
|
|
17
|
+
* chalk-coloured content is placed inside fixed-width box rows.
|
|
18
|
+
*/
|
|
19
|
+
export function visibleLength(str) {
|
|
20
|
+
return str.replace(ANSI_ESCAPE_RE, "").length;
|
|
21
|
+
}
|
|
22
|
+
// ─── Box Drawing ─────────────────────────────────────────────────────────────
|
|
23
|
+
/**
|
|
24
|
+
* Width of the horizontal rule (═ characters) between the two corner
|
|
25
|
+
* glyphs. All box-drawing functions share this constant so panels
|
|
26
|
+
* remain consistent across commands.
|
|
27
|
+
*/
|
|
28
|
+
export const BOX_RULE_WIDTH = 60;
|
|
29
|
+
/** Renders the top border of a CHIEF panel: ╔══...══╗ */
|
|
30
|
+
export function boxTop() {
|
|
31
|
+
return `╔${"═".repeat(BOX_RULE_WIDTH)}╗`;
|
|
32
|
+
}
|
|
33
|
+
/** Renders an internal section divider: ╠══...══╣ */
|
|
34
|
+
export function boxDivider() {
|
|
35
|
+
return `╠${"═".repeat(BOX_RULE_WIDTH)}╣`;
|
|
36
|
+
}
|
|
37
|
+
/** Renders the bottom border of a CHIEF panel: ╚══...══╝ */
|
|
38
|
+
export function boxBottom() {
|
|
39
|
+
return `╚${"═".repeat(BOX_RULE_WIDTH)}╝`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Renders a single content row inside a CHIEF panel.
|
|
43
|
+
*
|
|
44
|
+
* The content string may contain chalk ANSI codes. Padding is calculated
|
|
45
|
+
* using visibleLength so the right border aligns correctly regardless of
|
|
46
|
+
* colour codes embedded in the content.
|
|
47
|
+
*
|
|
48
|
+
* @param content - The text to display, optionally chalk-coloured.
|
|
49
|
+
* @param indent - Leading spaces inside the left border. Defaults to 2.
|
|
50
|
+
*/
|
|
51
|
+
export function boxRow(content, indent = 2) {
|
|
52
|
+
const inner = `${" ".repeat(indent)}${content}`;
|
|
53
|
+
const pad = BOX_RULE_WIDTH - visibleLength(inner);
|
|
54
|
+
return `║${inner}${" ".repeat(Math.max(0, pad))}║`;
|
|
55
|
+
}
|
|
56
|
+
/** Renders an empty row (blank line inside the panel). */
|
|
57
|
+
export function boxEmpty() {
|
|
58
|
+
return boxRow("");
|
|
59
|
+
}
|
|
60
|
+
// ─── Date / Time ─────────────────────────────────────────────────────────────
|
|
61
|
+
/**
|
|
62
|
+
* Formats a Date into the header display string used in CHIEF panels:
|
|
63
|
+
* "Saturday March 7"
|
|
64
|
+
*/
|
|
65
|
+
export function formatHeaderDate(date) {
|
|
66
|
+
return format(date, "EEEE MMMM d");
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Formats an ISO timestamp into a concise human-readable label
|
|
70
|
+
* suitable for the LAST RUNS section of helm status.
|
|
71
|
+
*
|
|
72
|
+
* - Same calendar day → "today H:mm a"
|
|
73
|
+
* - Previous calendar day → "yesterday"
|
|
74
|
+
* - Older → "N days ago"
|
|
75
|
+
* - Empty/missing → "never"
|
|
76
|
+
*/
|
|
77
|
+
export function formatLastRun(isoTimestamp) {
|
|
78
|
+
if (!isoTimestamp)
|
|
79
|
+
return "never";
|
|
80
|
+
const date = new Date(isoTimestamp);
|
|
81
|
+
if (isNaN(date.getTime()))
|
|
82
|
+
return "never";
|
|
83
|
+
if (isToday(date))
|
|
84
|
+
return `today ${format(date, "h:mm a")}`;
|
|
85
|
+
if (isYesterday(date))
|
|
86
|
+
return "yesterday";
|
|
87
|
+
return formatDistanceToNow(date, { addSuffix: true });
|
|
88
|
+
}
|
|
89
|
+
// ─── String Helpers ───────────────────────────────────────────────────────────
|
|
90
|
+
/**
|
|
91
|
+
* Left-pads a string to a target visible width.
|
|
92
|
+
* Safe for chalk-coloured strings.
|
|
93
|
+
*/
|
|
94
|
+
export function padEnd(str, targetWidth) {
|
|
95
|
+
const pad = targetWidth - visibleLength(str);
|
|
96
|
+
return pad > 0 ? `${str}${" ".repeat(pad)}` : str;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Truncates a string to a maximum visible width, appending "…" if
|
|
100
|
+
* truncation occurred. Safe for plain strings only (no ANSI codes).
|
|
101
|
+
*/
|
|
102
|
+
export function truncate(str, maxWidth) {
|
|
103
|
+
if (str.length <= maxWidth)
|
|
104
|
+
return str;
|
|
105
|
+
return `${str.slice(0, maxWidth - 1)}…`;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Structured logger for HELM.
|
|
3
|
+
*
|
|
4
|
+
* Wraps console output with log levels and prefixes. The logger is
|
|
5
|
+
* intentionally simple — HELM is a CLI tool, not a long-running service.
|
|
6
|
+
* Its primary purpose is to provide a single interception point so that:
|
|
7
|
+
*
|
|
8
|
+
* 1. Debug output can be suppressed in normal use.
|
|
9
|
+
* 2. Secret values are never accidentally surfaced (secret-aware code
|
|
10
|
+
* must never pass secret values to any logger method).
|
|
11
|
+
* 3. Log output format is consistent across all commands.
|
|
12
|
+
*
|
|
13
|
+
* Log level is controlled by the HELM_LOG environment variable:
|
|
14
|
+
* - "debug" → all output
|
|
15
|
+
* - "info" → info, warn, error (default)
|
|
16
|
+
* - "error" → errors only
|
|
17
|
+
* - "silent" → no output (useful in tests)
|
|
18
|
+
*/
|
|
19
|
+
/** Emits a debug-level message. Suppressed unless HELM_LOG=debug. */
|
|
20
|
+
export declare function debug(message: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Emits an informational message to stderr.
|
|
23
|
+
* Do not use for user-facing panel output — use console.log directly
|
|
24
|
+
* with chalk formatting for those.
|
|
25
|
+
*/
|
|
26
|
+
export declare function info(message: string): void;
|
|
27
|
+
/** Emits a warning to stderr. */
|
|
28
|
+
export declare function warn(message: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Emits an error message to stderr.
|
|
31
|
+
* For HelmErrors, use formatHelmError() and print via console.error
|
|
32
|
+
* in the top-level handler — not this function.
|
|
33
|
+
*/
|
|
34
|
+
export declare function error(message: string): void;
|
|
35
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA4BH,qEAAqE;AACrE,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI3C;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI1C;AAED,iCAAiC;AACjC,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI1C;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI3C"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Structured logger for HELM.
|
|
3
|
+
*
|
|
4
|
+
* Wraps console output with log levels and prefixes. The logger is
|
|
5
|
+
* intentionally simple — HELM is a CLI tool, not a long-running service.
|
|
6
|
+
* Its primary purpose is to provide a single interception point so that:
|
|
7
|
+
*
|
|
8
|
+
* 1. Debug output can be suppressed in normal use.
|
|
9
|
+
* 2. Secret values are never accidentally surfaced (secret-aware code
|
|
10
|
+
* must never pass secret values to any logger method).
|
|
11
|
+
* 3. Log output format is consistent across all commands.
|
|
12
|
+
*
|
|
13
|
+
* Log level is controlled by the HELM_LOG environment variable:
|
|
14
|
+
* - "debug" → all output
|
|
15
|
+
* - "info" → info, warn, error (default)
|
|
16
|
+
* - "error" → errors only
|
|
17
|
+
* - "silent" → no output (useful in tests)
|
|
18
|
+
*/
|
|
19
|
+
/** Ordered log levels — higher index means less verbose. */
|
|
20
|
+
const LEVELS = ["debug", "info", "warn", "error", "silent"];
|
|
21
|
+
function resolveLevel() {
|
|
22
|
+
const raw = process.env["HELM_LOG"]?.toLowerCase();
|
|
23
|
+
if (raw && LEVELS.includes(raw)) {
|
|
24
|
+
return raw;
|
|
25
|
+
}
|
|
26
|
+
return "info";
|
|
27
|
+
}
|
|
28
|
+
function levelIndex(level) {
|
|
29
|
+
return LEVELS.indexOf(level);
|
|
30
|
+
}
|
|
31
|
+
const activeLevel = resolveLevel();
|
|
32
|
+
/**
|
|
33
|
+
* Returns true if the given level should produce output given the
|
|
34
|
+
* currently configured log level.
|
|
35
|
+
*/
|
|
36
|
+
function isEnabled(level) {
|
|
37
|
+
return levelIndex(level) >= levelIndex(activeLevel);
|
|
38
|
+
}
|
|
39
|
+
/** Emits a debug-level message. Suppressed unless HELM_LOG=debug. */
|
|
40
|
+
export function debug(message) {
|
|
41
|
+
if (isEnabled("debug")) {
|
|
42
|
+
process.stderr.write(`[debug] ${message}\n`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Emits an informational message to stderr.
|
|
47
|
+
* Do not use for user-facing panel output — use console.log directly
|
|
48
|
+
* with chalk formatting for those.
|
|
49
|
+
*/
|
|
50
|
+
export function info(message) {
|
|
51
|
+
if (isEnabled("info")) {
|
|
52
|
+
process.stderr.write(`[info] ${message}\n`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Emits a warning to stderr. */
|
|
56
|
+
export function warn(message) {
|
|
57
|
+
if (isEnabled("warn")) {
|
|
58
|
+
process.stderr.write(`[warn] ${message}\n`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Emits an error message to stderr.
|
|
63
|
+
* For HelmErrors, use formatHelmError() and print via console.error
|
|
64
|
+
* in the top-level handler — not this function.
|
|
65
|
+
*/
|
|
66
|
+
export function error(message) {
|
|
67
|
+
if (isEnabled("error")) {
|
|
68
|
+
process.stderr.write(`[error] ${message}\n`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,4DAA4D;AAC5D,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAGrE,SAAS,YAAY;IACnB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IACnD,IAAI,GAAG,IAAK,MAA4B,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,OAAO,GAAe,CAAC;IACzB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,UAAU,CAAC,KAAe;IACjC,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,WAAW,GAAa,YAAY,EAAE,CAAC;AAE7C;;;GAGG;AACH,SAAS,SAAS,CAAC,KAAe;IAChC,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;AACtD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,KAAK,CAAC,OAAe;IACnC,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,OAAO,IAAI,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,OAAO,IAAI,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,OAAO,IAAI,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,OAAe;IACnC,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,OAAO,IAAI,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "chief-helm",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "CLI for CHIEF — Personal AI Operations System",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"helm": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20.0.0"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc --project tsconfig.json",
|
|
22
|
+
"dev": "tsx src/index.ts",
|
|
23
|
+
"prepublishOnly": "npm run build",
|
|
24
|
+
"format": "prettier --write src/**/*.{ts,tsx}"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@inkjs/ui": "^2.0.0",
|
|
28
|
+
"boxen": "^8.0.1",
|
|
29
|
+
"chalk": "^5.3.0",
|
|
30
|
+
"commander": "^12.1.0",
|
|
31
|
+
"conf": "^13.0.1",
|
|
32
|
+
"date-fns": "^3.6.0",
|
|
33
|
+
"execa": "^9.3.0",
|
|
34
|
+
"gray-matter": "^4.0.3",
|
|
35
|
+
"ink": "^5.1.4",
|
|
36
|
+
"inquirer": "^13.3.0",
|
|
37
|
+
"js-yaml": "^4.1.0",
|
|
38
|
+
"keytar": "^7.9.0",
|
|
39
|
+
"open": "^10.1.0",
|
|
40
|
+
"ora": "^8.0.1",
|
|
41
|
+
"react": "^18.3.1",
|
|
42
|
+
"simple-git": "^3.24.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/js-yaml": "^4.0.9",
|
|
46
|
+
"@types/node": "^20.14.0",
|
|
47
|
+
"@types/react": "^18.3.3",
|
|
48
|
+
"prettier": "^3.3.3",
|
|
49
|
+
"tsx": "^4.16.2",
|
|
50
|
+
"typescript": "^5.5.4",
|
|
51
|
+
"vitest": "^2.0.5"
|
|
52
|
+
}
|
|
53
|
+
}
|