agent-tempo 1.7.0 → 2.0.0-beta.2

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 (171) hide show
  1. package/CLAUDE.md +10 -13
  2. package/README.md +21 -15
  3. package/dashboard/dist/assets/index-BbR7zIdK.js.map +1 -1
  4. package/dashboard/package.json +1 -1
  5. package/dist/activities/hard-terminate.d.ts +2 -2
  6. package/dist/activities/hard-terminate.js +3 -9
  7. package/dist/activities/maestro.d.ts +8 -13
  8. package/dist/activities/maestro.js +3 -10
  9. package/dist/activities/outbox.js +16 -2
  10. package/dist/activities/resolve.d.ts +18 -7
  11. package/dist/activities/resolve.js +58 -46
  12. package/dist/adapters/base.js +3 -0
  13. package/dist/adapters/claude-code/adapter.js +7 -0
  14. package/dist/cli/command-center-command.js +15 -1
  15. package/dist/cli/commands.d.ts +8 -0
  16. package/dist/cli/commands.js +79 -11
  17. package/dist/cli/daemon-command.js +19 -33
  18. package/dist/cli/help-text.js +9 -7
  19. package/dist/cli/home-command.d.ts +26 -0
  20. package/dist/cli/home-command.js +156 -0
  21. package/dist/cli/removed-verbs.d.ts +0 -4
  22. package/dist/cli/removed-verbs.js +23 -12
  23. package/dist/cli/sa-preflight.d.ts +0 -14
  24. package/dist/cli/sa-preflight.js +1 -17
  25. package/dist/cli/startup.d.ts +1 -10
  26. package/dist/cli/startup.js +0 -40
  27. package/dist/cli.js +34 -80
  28. package/dist/client/core.js +13 -15
  29. package/dist/client/index.d.ts +2 -1
  30. package/dist/client/interface.d.ts +5 -14
  31. package/dist/client/with-spawn.d.ts +9 -4
  32. package/dist/client/with-spawn.js +7 -10
  33. package/dist/config.d.ts +14 -13
  34. package/dist/config.js +14 -0
  35. package/dist/constants.d.ts +50 -0
  36. package/dist/constants.js +60 -1
  37. package/dist/daemon.js +81 -0
  38. package/dist/http/auth.d.ts +3 -21
  39. package/dist/http/auth.js +10 -31
  40. package/dist/http/event-types.d.ts +38 -4
  41. package/dist/http/orphans.d.ts +3 -3
  42. package/dist/http/orphans.js +3 -3
  43. package/dist/http/server.d.ts +0 -5
  44. package/dist/http/server.js +79 -29
  45. package/dist/http/snapshot.js +3 -0
  46. package/dist/http/writes.d.ts +1 -1
  47. package/dist/http/writes.js +25 -2
  48. package/dist/observability/nondeterminism-alarm.d.ts +113 -0
  49. package/dist/observability/nondeterminism-alarm.js +162 -0
  50. package/dist/palette/index.d.ts +6 -7
  51. package/dist/palette/index.js +6 -7
  52. package/dist/pi/mission-control/actions.d.ts +67 -1
  53. package/dist/pi/mission-control/actions.js +61 -0
  54. package/dist/pi/mission-control/extension.d.ts +77 -0
  55. package/dist/pi/mission-control/extension.js +171 -0
  56. package/dist/pi/workflow-client.d.ts +14 -16
  57. package/dist/pi/workflow-client.js +18 -44
  58. package/dist/server-tools.js +30 -29
  59. package/dist/server.js +42 -0
  60. package/dist/tools/action-guard.d.ts +23 -0
  61. package/dist/tools/action-guard.js +33 -0
  62. package/dist/tools/coat-check.d.ts +20 -0
  63. package/dist/tools/coat-check.js +129 -0
  64. package/dist/tools/gate.d.ts +13 -0
  65. package/dist/tools/gate.js +88 -0
  66. package/dist/tools/schedule.d.ts +18 -0
  67. package/dist/tools/schedule.js +93 -1
  68. package/dist/tools/stage.d.ts +17 -0
  69. package/dist/tools/stage.js +85 -1
  70. package/dist/tools/state.d.ts +14 -0
  71. package/dist/tools/state.js +95 -0
  72. package/dist/types.d.ts +54 -7
  73. package/dist/upgrade/boot-guard.d.ts +95 -0
  74. package/dist/upgrade/boot-guard.js +88 -0
  75. package/dist/upgrade/from-upgrade.d.ts +95 -0
  76. package/dist/upgrade/from-upgrade.js +330 -0
  77. package/dist/upgrade/phase-engine.js +4 -1
  78. package/dist/utils/duration.d.ts +3 -6
  79. package/dist/utils/duration.js +3 -6
  80. package/dist/utils/format-hosts.d.ts +1 -1
  81. package/dist/utils/format-hosts.js +0 -2
  82. package/dist/utils/grpc-shutdown-guard.js +0 -4
  83. package/dist/utils/hosts.d.ts +4 -10
  84. package/dist/utils/hosts.js +12 -28
  85. package/dist/utils/orphan-guard.d.ts +37 -0
  86. package/dist/utils/orphan-guard.js +26 -0
  87. package/dist/utils/search-attributes.d.ts +28 -18
  88. package/dist/utils/search-attributes.js +48 -18
  89. package/dist/utils/visibility-deadline.d.ts +16 -0
  90. package/dist/utils/visibility-deadline.js +16 -0
  91. package/dist/workflows/maestro-signals.d.ts +0 -13
  92. package/dist/workflows/maestro-signals.js +6 -14
  93. package/dist/workflows/maestro.js +27 -32
  94. package/dist/workflows/scheduler.js +7 -1
  95. package/dist/workflows/session.js +237 -153
  96. package/dist/workflows/signals.d.ts +9 -1
  97. package/dist/workflows/signals.js +8 -6
  98. package/package.json +1 -6
  99. package/workflow-bundle.js +478 -225
  100. package/dist/cli/legacy-migration.d.ts +0 -35
  101. package/dist/cli/legacy-migration.js +0 -341
  102. package/dist/client/ensure-conductor-spawned.d.ts +0 -35
  103. package/dist/client/ensure-conductor-spawned.js +0 -48
  104. package/dist/tui/App.d.ts +0 -85
  105. package/dist/tui/App.js +0 -1791
  106. package/dist/tui/bootstrap-types.d.ts +0 -46
  107. package/dist/tui/bootstrap-types.js +0 -7
  108. package/dist/tui/commands.d.ts +0 -71
  109. package/dist/tui/commands.js +0 -1375
  110. package/dist/tui/components/ChatView.d.ts +0 -35
  111. package/dist/tui/components/ChatView.js +0 -54
  112. package/dist/tui/components/CommandPalette.d.ts +0 -21
  113. package/dist/tui/components/CommandPalette.js +0 -67
  114. package/dist/tui/components/ConversationStream.d.ts +0 -114
  115. package/dist/tui/components/ConversationStream.js +0 -307
  116. package/dist/tui/components/CreateEnsembleWizard.d.ts +0 -19
  117. package/dist/tui/components/CreateEnsembleWizard.js +0 -223
  118. package/dist/tui/components/DestroyConfirmModal.d.ts +0 -17
  119. package/dist/tui/components/DestroyConfirmModal.js +0 -62
  120. package/dist/tui/components/ErrorView.d.ts +0 -31
  121. package/dist/tui/components/ErrorView.js +0 -129
  122. package/dist/tui/components/HomeView.d.ts +0 -54
  123. package/dist/tui/components/HomeView.js +0 -306
  124. package/dist/tui/components/LoadLineupModal.d.ts +0 -18
  125. package/dist/tui/components/LoadLineupModal.js +0 -79
  126. package/dist/tui/components/MainView.d.ts +0 -21
  127. package/dist/tui/components/MainView.js +0 -107
  128. package/dist/tui/components/NewEnsembleModal.d.ts +0 -9
  129. package/dist/tui/components/NewEnsembleModal.js +0 -73
  130. package/dist/tui/components/Picker.d.ts +0 -23
  131. package/dist/tui/components/Picker.js +0 -70
  132. package/dist/tui/components/PlayerDetailView.d.ts +0 -26
  133. package/dist/tui/components/PlayerDetailView.js +0 -118
  134. package/dist/tui/components/PromptArea.d.ts +0 -50
  135. package/dist/tui/components/PromptArea.js +0 -303
  136. package/dist/tui/components/RecruitWizard.d.ts +0 -17
  137. package/dist/tui/components/RecruitWizard.js +0 -221
  138. package/dist/tui/components/RestoreConfirmModal.d.ts +0 -18
  139. package/dist/tui/components/RestoreConfirmModal.js +0 -71
  140. package/dist/tui/components/ScheduleWizard.d.ts +0 -19
  141. package/dist/tui/components/ScheduleWizard.js +0 -259
  142. package/dist/tui/components/Splash.d.ts +0 -23
  143. package/dist/tui/components/Splash.js +0 -221
  144. package/dist/tui/components/StatusBar.d.ts +0 -48
  145. package/dist/tui/components/StatusBar.js +0 -128
  146. package/dist/tui/components/StatusOverlay.d.ts +0 -15
  147. package/dist/tui/components/StatusOverlay.js +0 -76
  148. package/dist/tui/components/TitleBar.d.ts +0 -10
  149. package/dist/tui/components/TitleBar.js +0 -21
  150. package/dist/tui/index.d.ts +0 -15
  151. package/dist/tui/index.js +0 -162
  152. package/dist/tui/ink-context.d.ts +0 -18
  153. package/dist/tui/ink-context.js +0 -59
  154. package/dist/tui/ink-loader.d.ts +0 -26
  155. package/dist/tui/ink-loader.js +0 -42
  156. package/dist/tui/removed-commands.d.ts +0 -9
  157. package/dist/tui/removed-commands.js +0 -22
  158. package/dist/tui/sse-handler.d.ts +0 -52
  159. package/dist/tui/sse-handler.js +0 -157
  160. package/dist/tui/store.d.ts +0 -598
  161. package/dist/tui/store.js +0 -753
  162. package/dist/tui/utils/format.d.ts +0 -56
  163. package/dist/tui/utils/format.js +0 -155
  164. package/dist/tui/utils/fullscreen.d.ts +0 -23
  165. package/dist/tui/utils/fullscreen.js +0 -71
  166. package/dist/tui/utils/history.d.ts +0 -10
  167. package/dist/tui/utils/history.js +0 -85
  168. package/dist/tui/utils/platform.d.ts +0 -45
  169. package/dist/tui/utils/platform.js +0 -258
  170. package/dist/tui/utils/theme.d.ts +0 -21
  171. package/dist/tui/utils/theme.js +0 -24
@@ -1,258 +0,0 @@
1
- "use strict";
2
- /**
3
- * Platform detection utilities for the TUI.
4
- * Determines Unicode support, SSH sessions, and terminal capabilities.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.MIN_ROWS = exports.MIN_COLUMNS = void 0;
8
- exports.supportsUnicode = supportsUnicode;
9
- exports.isSSH = isSSH;
10
- exports.getTerminalSize = getTerminalSize;
11
- exports.isTerminalLargeEnough = isTerminalLargeEnough;
12
- exports.statusIcons = statusIcons;
13
- exports.metronomeBrailleFrames = metronomeBrailleFrames;
14
- /** Whether the terminal supports Unicode box-drawing and status icons. */
15
- function supportsUnicode() {
16
- // Windows Terminal and modern terminals support Unicode
17
- if (process.env.WT_SESSION)
18
- return true;
19
- // SSH sessions may have limited support
20
- if (isSSH())
21
- return false;
22
- // Check LANG/LC_ALL for UTF-8
23
- const lang = process.env.LANG || process.env.LC_ALL || '';
24
- if (/utf-?8/i.test(lang))
25
- return true;
26
- // macOS default terminal supports Unicode
27
- if (process.platform === 'darwin')
28
- return true;
29
- // Default: assume Unicode on modern systems
30
- return process.platform !== 'win32' || !!process.env.WT_SESSION;
31
- }
32
- /** Whether we're running inside an SSH session. */
33
- function isSSH() {
34
- return !!(process.env.SSH_CLIENT || process.env.SSH_TTY || process.env.SSH_CONNECTION);
35
- }
36
- /** Get terminal dimensions, with minimum fallback. */
37
- function getTerminalSize() {
38
- const columns = process.stdout.columns || 80;
39
- const rows = process.stdout.rows || 24;
40
- return { columns, rows };
41
- }
42
- /** Minimum terminal size for the TUI. */
43
- exports.MIN_COLUMNS = 80;
44
- exports.MIN_ROWS = 24;
45
- /** Check if terminal meets minimum size requirements. */
46
- function isTerminalLargeEnough() {
47
- const { columns, rows } = getTerminalSize();
48
- return columns >= exports.MIN_COLUMNS && rows >= exports.MIN_ROWS;
49
- }
50
- /** Status icons — Unicode by default, ASCII fallback. */
51
- function statusIcons(unicode = supportsUnicode()) {
52
- if (unicode) {
53
- return {
54
- active: '\u25CF', // ●
55
- stale: '\u25CB', // ○
56
- pending: '\u25D4', // ◔
57
- blocked: '\u25D0', // ◐
58
- terminated: '\u2715', // ✕
59
- conductor: '\u2605', // ★
60
- player: '\u2022', // •
61
- arrow: '\u2192', // →
62
- check: '\u2714', // ✔
63
- cross: '\u2718', // ✘
64
- ellipsis: '\u2026', // …
65
- };
66
- }
67
- return {
68
- active: '*',
69
- stale: 'o',
70
- pending: '~',
71
- blocked: '!',
72
- terminated: 'x',
73
- conductor: '#',
74
- player: '-',
75
- arrow: '->',
76
- check: '+',
77
- cross: 'x',
78
- ellipsis: '...',
79
- };
80
- }
81
- // ── Pixel Art Metronome ──
82
- // ── Braille Rendering ──
83
- /**
84
- * Braille dot matrix bit positions.
85
- * Each character = 2 cols × 4 rows of dots.
86
- * Bit layout: col0=[0,1,2,6], col1=[3,4,5,7]
87
- */
88
- const BRAILLE_BASE = 0x2800;
89
- const BRAILLE_DOTS = [
90
- [0, 0], // bit 0: row 0, col 0
91
- [1, 0], // bit 1: row 1, col 0
92
- [2, 0], // bit 2: row 2, col 0
93
- [0, 1], // bit 3: row 0, col 1
94
- [1, 1], // bit 4: row 1, col 1
95
- [2, 1], // bit 5: row 2, col 1
96
- [3, 0], // bit 6: row 3, col 0
97
- [3, 1], // bit 7: row 3, col 1
98
- ];
99
- /**
100
- * Braille dot canvas — plot dots at high resolution, encode to braille characters.
101
- * Each character cell = 2 dots wide × 4 dots tall.
102
- */
103
- class BrailleCanvas {
104
- /** Dot grid: dotRows × dotCols, each cell stores a color tag or 0 (empty). */
105
- dots;
106
- /** Character grid dimensions. */
107
- charCols;
108
- charRows;
109
- /** Dot grid dimensions. */
110
- dotCols;
111
- dotRows;
112
- /** Color tags: 1 = triangle (cream), 2 = arm/pivot (terracotta). */
113
- static TRIANGLE = 1;
114
- static ARM = 2;
115
- constructor(charCols, charRows) {
116
- this.charCols = charCols;
117
- this.charRows = charRows;
118
- this.dotCols = charCols * 2;
119
- this.dotRows = charRows * 4;
120
- this.dots = Array.from({ length: this.dotRows }, () => Array(this.dotCols).fill(0));
121
- }
122
- /** Set a dot at (x, y) in dot coordinates. */
123
- set(x, y, color) {
124
- if (x >= 0 && x < this.dotCols && y >= 0 && y < this.dotRows) {
125
- this.dots[y][x] = color;
126
- }
127
- }
128
- /** Draw a line using Bresenham's algorithm. */
129
- line(x0, y0, x1, y1, color) {
130
- const dx = Math.abs(x1 - x0);
131
- const dy = Math.abs(y1 - y0);
132
- const sx = x0 < x1 ? 1 : -1;
133
- const sy = y0 < y1 ? 1 : -1;
134
- let err = dx - dy;
135
- let cx = x0, cy = y0;
136
- while (true) {
137
- this.set(cx, cy, color);
138
- if (cx === x1 && cy === y1)
139
- break;
140
- const e2 = 2 * err;
141
- if (e2 > -dy) {
142
- err -= dy;
143
- cx += sx;
144
- }
145
- if (e2 < dx) {
146
- err += dx;
147
- cy += sy;
148
- }
149
- }
150
- }
151
- /** Draw a filled circle. */
152
- circle(cx, cy, r, color) {
153
- for (let y = cy - r; y <= cy + r; y++) {
154
- for (let x = cx - r; x <= cx + r; x++) {
155
- if ((x - cx) * (x - cx) + (y - cy) * (y - cy) <= r * r) {
156
- this.set(x, y, color);
157
- }
158
- }
159
- }
160
- }
161
- /**
162
- * Encode the canvas to braille character lines with color segments.
163
- * For cells with mixed colors (triangle + arm overlap), arm wins (accent).
164
- */
165
- render() {
166
- const COLORS = {
167
- [BrailleCanvas.TRIANGLE]: '#FAF3EE',
168
- [BrailleCanvas.ARM]: '#E07A5F',
169
- };
170
- const lines = [];
171
- for (let cr = 0; cr < this.charRows; cr++) {
172
- const segments = [];
173
- let buf = '';
174
- let bufColor = '';
175
- for (let cc = 0; cc < this.charCols; cc++) {
176
- let code = BRAILLE_BASE;
177
- let cellColor = 0; // dominant color in this cell
178
- for (let bit = 0; bit < 8; bit++) {
179
- const [dr, dc] = BRAILLE_DOTS[bit];
180
- const dotY = cr * 4 + dr;
181
- const dotX = cc * 2 + dc;
182
- const val = this.dots[dotY]?.[dotX] || 0;
183
- if (val) {
184
- code |= (1 << bit);
185
- // Arm/pivot wins over triangle for color priority
186
- if (val === BrailleCanvas.ARM || cellColor === 0) {
187
- cellColor = val;
188
- }
189
- }
190
- }
191
- const char = code === BRAILLE_BASE ? ' ' : String.fromCharCode(code);
192
- const color = cellColor ? (COLORS[cellColor] || '') : '';
193
- if (color === bufColor) {
194
- buf += char;
195
- }
196
- else {
197
- if (buf)
198
- segments.push({ char: buf, color: bufColor });
199
- buf = char;
200
- bufColor = color;
201
- }
202
- }
203
- if (buf)
204
- segments.push({ char: buf, color: bufColor });
205
- lines.push(segments);
206
- }
207
- return lines;
208
- }
209
- }
210
- /**
211
- * Braille metronome — 3 frames (left, center, right).
212
- * Renders at 60×48 dot resolution (30 cols × 12 rows of braille characters).
213
- * Thin hairline triangle outline with thin pendulum arm and small pivot dot.
214
- */
215
- function metronomeBrailleFrames() {
216
- // ASCII fallback for terminals without Unicode support
217
- if (!supportsUnicode()) {
218
- const asciiFrame = [
219
- [{ char: ' agent-tempo', color: 'cyan' }],
220
- ];
221
- return [asciiFrame, asciiFrame, asciiFrame];
222
- }
223
- const COLS = 30;
224
- const ROWS = 12;
225
- // SVG: viewport 64×64, triangle apex(32,8)→bl(14,54)→br(50,54), pivot(32,46)
226
- // Dot resolution: 60×48
227
- // Scale: x * 60/64 ≈ x * 0.9375, y * 48/64 = y * 0.75
228
- const apex = { x: 30, y: 6 };
229
- const bl = { x: 13, y: 40 };
230
- const br = { x: 47, y: 40 };
231
- const pivot = { x: 30, y: 34 };
232
- // Pendulum tips — extend above apex
233
- const tips = [
234
- { x: 18, y: 1 }, // left
235
- { x: 30, y: 1 }, // center
236
- { x: 42, y: 1 }, // right
237
- ];
238
- function buildFrame(tipIdx) {
239
- const canvas = new BrailleCanvas(COLS, ROWS);
240
- const T = BrailleCanvas.TRIANGLE;
241
- const A = BrailleCanvas.ARM;
242
- // Draw triangle outline (thin hairlines)
243
- canvas.line(apex.x, apex.y, bl.x, bl.y, T);
244
- canvas.line(apex.x, apex.y, br.x, br.y, T);
245
- canvas.line(bl.x, bl.y, br.x, br.y, T);
246
- // Draw pendulum arm (thin line, draws over triangle where they cross)
247
- const tip = tips[tipIdx];
248
- canvas.line(pivot.x, pivot.y, tip.x, tip.y, A);
249
- // Draw pivot dot
250
- canvas.circle(pivot.x, pivot.y, 2, A);
251
- return canvas.render();
252
- }
253
- return [
254
- buildFrame(0), // left
255
- buildFrame(1), // center
256
- buildFrame(2), // right
257
- ];
258
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * TUI color theme constants.
3
- * Used by all TUI components for consistent styling.
4
- * Respects NO_COLOR (https://no-color.org/) — all colors become undefined.
5
- */
6
- declare const COLORS: {
7
- bg: string;
8
- bgTitle: string;
9
- border: string;
10
- muted: string;
11
- dim: string;
12
- text: string;
13
- textMuted: string;
14
- accent: string;
15
- success: string;
16
- warning: string;
17
- error: string;
18
- inputBg: string;
19
- };
20
- export declare const THEME: typeof COLORS;
21
- export {};
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /**
3
- * TUI color theme constants.
4
- * Used by all TUI components for consistent styling.
5
- * Respects NO_COLOR (https://no-color.org/) — all colors become undefined.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.THEME = void 0;
9
- const COLORS = {
10
- bg: '#0A0E12',
11
- bgTitle: '#141820',
12
- border: '#2A3140',
13
- muted: '#3D4555',
14
- dim: '#6B7280',
15
- text: '#FAF3EE',
16
- textMuted: '#9CA3AF',
17
- accent: '#E07A5F', // terracotta
18
- success: '#81C784',
19
- warning: '#F2CC8F',
20
- error: '#EF5350',
21
- inputBg: '#1A1F28',
22
- };
23
- const MONO = Object.fromEntries(Object.keys(COLORS).map(k => [k, undefined]));
24
- exports.THEME = process.env.NO_COLOR ? MONO : COLORS;