@ghl-ai/aw 0.1.36-beta.35 → 0.1.36-beta.36

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.
Files changed (2) hide show
  1. package/fmt.mjs +44 -1
  2. package/package.json +1 -1
package/fmt.mjs CHANGED
@@ -46,10 +46,53 @@ export function banner(text, opts = {}) {
46
46
 
47
47
  export const intro = (msg) => p.intro(chalk.bgHex('#FF6B35').black(` ⟁ ${msg} `));
48
48
  export const outro = (msg) => p.outro(chalk.green(msg));
49
- export const spinner = () => p.spinner();
50
49
  export const select = p.select;
51
50
  export const isCancel = p.isCancel;
52
51
 
52
+ /**
53
+ * Custom ⟁ spinner — rotating triangle frames in brand orange.
54
+ * Falls back to clack's default spinner in non-TTY (CI / piped output).
55
+ */
56
+ export function spinner() {
57
+ if (!process.stdout.isTTY) return p.spinner();
58
+
59
+ // 8-frame clockwise rotation: cardinal + corner triangles
60
+ const FRAMES = ['▲', '◹', '▶', '◿', '▼', '◺', '◀', '◸']
61
+ .map(c => chalk.hex('#FF6B35')(c));
62
+ const INTERVAL = 80;
63
+
64
+ let frameIdx = 0;
65
+ let timer = null;
66
+ let msg = '';
67
+
68
+ const render = (sym) => {
69
+ process.stdout.write(`\r\x1b[K${sym} ${msg}`);
70
+ };
71
+
72
+ return {
73
+ start(message = '') {
74
+ msg = (message ?? '').replace(/\.+$/, '');
75
+ process.stdout.write(chalk.gray('│') + '\n');
76
+ render(FRAMES[0]);
77
+ timer = setInterval(() => {
78
+ frameIdx = (frameIdx + 1) % FRAMES.length;
79
+ render(FRAMES[frameIdx]);
80
+ }, INTERVAL);
81
+ },
82
+ message(message = '') {
83
+ msg = (message ?? msg).replace(/\.+$/, '');
84
+ render(FRAMES[frameIdx]);
85
+ },
86
+ stop(message = '', code = 0) {
87
+ clearInterval(timer);
88
+ timer = null;
89
+ msg = message ?? msg;
90
+ const sym = code === 0 ? chalk.green('◇') : chalk.red('■');
91
+ process.stdout.write(`\r\x1b[K${sym} ${msg}\n`);
92
+ },
93
+ };
94
+ }
95
+
53
96
  export function cancel(msg) {
54
97
  p.cancel(msg);
55
98
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.36-beta.35",
3
+ "version": "0.1.36-beta.36",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",