@proletariat/cli 0.3.110 → 0.3.111

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 (39) hide show
  1. package/dist/commands/orchestrator/attach.d.ts +2 -0
  2. package/dist/commands/orchestrator/attach.js +80 -118
  3. package/dist/commands/orchestrator/attach.js.map +1 -1
  4. package/dist/commands/orchestrator/start.js +21 -0
  5. package/dist/commands/orchestrator/start.js.map +1 -1
  6. package/dist/commands/orchestrator/status.d.ts +3 -0
  7. package/dist/commands/orchestrator/status.js +104 -130
  8. package/dist/commands/orchestrator/status.js.map +1 -1
  9. package/dist/commands/orchestrator/stop.d.ts +2 -0
  10. package/dist/commands/orchestrator/stop.js +105 -107
  11. package/dist/commands/orchestrator/stop.js.map +1 -1
  12. package/dist/commands/session/attach.d.ts +2 -6
  13. package/dist/commands/session/attach.js +68 -97
  14. package/dist/commands/session/attach.js.map +1 -1
  15. package/dist/commands/session/list.d.ts +4 -1
  16. package/dist/commands/session/list.js +160 -326
  17. package/dist/commands/session/list.js.map +1 -1
  18. package/dist/commands/work/start.js +104 -49
  19. package/dist/commands/work/start.js.map +1 -1
  20. package/dist/lib/execution/session-utils.d.ts +4 -1
  21. package/dist/lib/execution/session-utils.js +3 -0
  22. package/dist/lib/execution/session-utils.js.map +1 -1
  23. package/dist/lib/machine-db-mirror.d.ts +64 -0
  24. package/dist/lib/machine-db-mirror.js +82 -0
  25. package/dist/lib/machine-db-mirror.js.map +1 -0
  26. package/dist/lib/machine-db.d.ts +11 -0
  27. package/dist/lib/machine-db.js +17 -0
  28. package/dist/lib/machine-db.js.map +1 -1
  29. package/dist/lib/orchestrate/prompt-chain.d.ts +19 -4
  30. package/dist/lib/orchestrate/prompt-chain.js +19 -4
  31. package/dist/lib/orchestrate/prompt-chain.js.map +1 -1
  32. package/dist/lib/session/renderer.d.ts +121 -0
  33. package/dist/lib/session/renderer.js +547 -0
  34. package/dist/lib/session/renderer.js.map +1 -0
  35. package/dist/lib/update-check.d.ts +64 -7
  36. package/dist/lib/update-check.js +164 -20
  37. package/dist/lib/update-check.js.map +1 -1
  38. package/oclif.manifest.json +1194 -1083
  39. package/package.json +1 -1
@@ -1,30 +1,42 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import { styles } from '../../lib/styles.js';
3
- import { getWorkspaceInfo } from '../../lib/agents/commands.js';
4
- import { openWorkspaceDatabase } from '../../lib/database/index.js';
5
- import { ExecutionStorage } from '../../lib/execution/index.js';
6
- import { parseSessionName, getHostTmuxSessionNames, getContainerTmuxSessionMap, flattenContainerSessions, findContainerSessionsByPrefix, discoverSessionId, isContainerEnvironment, isSessionAlive, checkContainerLiveness, } from '../../lib/execution/session-utils.js';
7
3
  import { PromptCommand } from '../../lib/prompt-command.js';
8
4
  import { machineOutputFlags } from '../../lib/pmo/index.js';
9
5
  import { shouldOutputJson } from '../../lib/prompt-json.js';
10
6
  import { visualPadEnd } from '../../lib/string-utils.js';
11
- import { MachineDB } from '../../lib/machine-db.js';
7
+ import { collectAllSessions, groupSessionsByHQ, bucketElsewhereByHq, formatRelativeAge, tildifyPath, } from '../../lib/session/renderer.js';
8
+ import { findHQRoot } from '../../lib/workspace.js';
12
9
  export default class SessionList extends PromptCommand {
13
- static description = 'List active agent sessions (DB-first: shows tracked executions with runtime liveness)';
10
+ static description = 'List active agent sessions across the entire machine, grouped by current HQ vs other locations.';
14
11
  static examples = [
15
12
  '<%= config.bin %> <%= command.id %>',
13
+ '<%= config.bin %> <%= command.id %> --here',
14
+ '<%= config.bin %> <%= command.id %> --hq ~/Projects/backend-hq',
15
+ '<%= config.bin %> <%= command.id %> --role orchestrator',
16
16
  '<%= config.bin %> <%= command.id %> --all',
17
- '<%= config.bin %> <%= command.id %> --orphans',
18
17
  ];
19
18
  static flags = {
20
19
  ...machineOutputFlags,
20
+ here: Flags.boolean({
21
+ description: 'Filter to sessions in the current HQ only',
22
+ default: false,
23
+ exclusive: ['hq'],
24
+ }),
25
+ hq: Flags.string({
26
+ description: 'Filter to sessions in a specific HQ path',
27
+ exclusive: ['here'],
28
+ }),
29
+ role: Flags.string({
30
+ description: 'Filter by session role',
31
+ options: ['orchestrator', 'worker', 'headless'],
32
+ }),
21
33
  all: Flags.boolean({
22
34
  char: 'a',
23
- description: 'Show all sessions including stale DB records (dead runtime)',
35
+ description: 'Include stopped/completed sessions (default excludes them)',
24
36
  default: false,
25
37
  }),
26
- orphans: Flags.boolean({
27
- description: 'Also show orphan tmux sessions not tracked in the DB (garbage to prune)',
38
+ grouped: Flags.boolean({
39
+ description: 'In --json mode, emit the grouped { sessions, grouped } object instead of the flat array',
28
40
  default: false,
29
41
  }),
30
42
  };
@@ -34,334 +46,156 @@ export default class SessionList extends PromptCommand {
34
46
  async run() {
35
47
  const { flags } = await this.parse(SessionList);
36
48
  const jsonMode = shouldOutputJson(flags);
37
- // Get workspace info for execution records
38
- let executionStorage = null;
39
- let db = null;
40
- let hasWorkspace = true;
41
- try {
42
- const workspaceInfo = getWorkspaceInfo();
43
- db = openWorkspaceDatabase(workspaceInfo.path);
44
- executionStorage = new ExecutionStorage(db);
45
- }
46
- catch {
47
- // Not in a workspace, but we can still discover tmux sessions
48
- hasWorkspace = false;
49
- }
50
- // =========================================================================
51
- // Machine DB: cross-repo execution tracking (works from anywhere)
52
- // =========================================================================
53
- let machineDb = null;
54
- try {
55
- machineDb = new MachineDB();
56
- }
57
- catch {
58
- // Machine DB not available — non-fatal
59
- }
60
- try {
61
- // =========================================================================
62
- // DB-first: Query all executions from the database (source of truth)
63
- // =========================================================================
64
- const runningExecutions = executionStorage?.listExecutions({ status: 'running' }) || [];
65
- const startingExecutions = executionStorage?.listExecutions({ status: 'starting' }) || [];
66
- const activeExecutions = [...runningExecutions, ...startingExecutions];
67
- // Refresh execution state so dead sessions aren't reported as running.
68
- executionStorage?.cleanupStaleExecutions();
69
- // Also pull ticketless executions from machine DB
70
- const machineActiveExecutions = machineDb?.getActiveExecutions() || [];
71
- // Track machine execution IDs already covered by workspace DB to avoid duplicates
72
- const workspaceSessionIds = new Set(activeExecutions.map(e => e.sessionId).filter(Boolean));
73
- // Get tmux sessions for liveness verification
74
- const hostTmuxSessions = getHostTmuxSessionNames();
75
- const containerTmuxSessions = getContainerTmuxSessionMap();
76
- // Track which tmux sessions we've matched to DB records (for orphan detection)
77
- const matchedHostSessions = new Set();
78
- const matchedContainerSessions = new Set();
79
- // Build verified session list from DB records
80
- const sessions = [];
81
- for (const exec of activeExecutions) {
82
- const isContainer = isContainerEnvironment(exec.environment);
83
- let exists = false;
84
- let containerId;
85
- // Use shared discoverSessionId for NULL sessionId cases (same path as poke)
86
- let actualSessionId = discoverSessionId(exec, hostTmuxSessions, containerTmuxSessions) || exec.sessionId;
87
- if (isContainer && exec.containerId) {
88
- // =====================================================================
89
- // Container-based execution: check Docker container liveness first,
90
- // then verify tmux session inside the container
91
- // =====================================================================
92
- containerId = exec.containerId;
93
- const containerStatus = checkContainerLiveness(exec.containerId);
94
- if (containerStatus === 'running') {
95
- if (actualSessionId) {
96
- // Verify the discovered/known session is actually alive
97
- const containerSessions = findContainerSessionsByPrefix(containerTmuxSessions, exec.containerId);
98
- exists = containerSessions.includes(actualSessionId);
99
- }
100
- // Even if tmux session isn't found, the container is running —
101
- // the agent may be alive without a tmux session (direct mode)
102
- if (!exists && containerStatus === 'running') {
103
- exists = true;
104
- actualSessionId = actualSessionId || `container:${exec.containerId.substring(0, 12)}`;
105
- }
106
- }
107
- // If container is not running, exists remains false (stale)
108
- }
109
- else {
110
- // =====================================================================
111
- // Host/sandbox execution: verify tmux session exists on host
112
- // =====================================================================
113
- if (actualSessionId) {
114
- exists = hostTmuxSessions.includes(actualSessionId);
115
- }
116
- }
117
- // Track matched sessions to detect orphans later
118
- if (exists && actualSessionId) {
119
- if (isContainer && containerId) {
120
- matchedContainerSessions.add(`${containerId}:${actualSessionId}`);
121
- }
122
- else {
123
- matchedHostSessions.add(actualSessionId);
124
- }
125
- }
126
- // Skip entries with no session ID at all (truly has no session)
127
- if (!actualSessionId)
128
- continue;
129
- // Only include active sessions by default.
130
- // Use --all to include stale DB records (exists=false).
131
- if (exists || flags.all) {
132
- sessions.push({
133
- sessionId: actualSessionId,
134
- ticketId: exec.ticketId,
135
- agentName: exec.agentName,
136
- status: exists ? exec.status : 'stale',
137
- environment: isContainer ? 'container' : 'host',
138
- containerId,
139
- exists,
140
- source: 'db',
141
- lastHeartbeat: exec.lastHeartbeat,
142
- lifecycleState: exec.lifecycleState,
143
- });
144
- }
145
- }
146
- // PRLT-1077: Self-healing recovery for background-mode spawns.
147
- // Uses shared isSessionAlive() — same check as session poke's recovery path.
148
- if (executionStorage) {
149
- const stoppedExecutions = executionStorage.listExecutions({ status: 'stopped' });
150
- for (const exec of stoppedExecutions) {
151
- const isContainer = isContainerEnvironment(exec.environment);
152
- if (!exec.sessionId)
153
- continue;
154
- const containerId = isContainer ? exec.containerId : undefined;
155
- if (isSessionAlive(exec)) {
156
- // Recover: update status back to 'running'
157
- executionStorage.updateStatus(exec.id, 'running');
158
- // Track as matched so it's not reported as orphan
159
- if (isContainer && containerId) {
160
- matchedContainerSessions.add(`${containerId}:${exec.sessionId}`);
161
- }
162
- else {
163
- matchedHostSessions.add(exec.sessionId);
164
- }
165
- sessions.push({
166
- sessionId: exec.sessionId,
167
- ticketId: exec.ticketId,
168
- agentName: exec.agentName,
169
- status: 'running',
170
- environment: isContainer ? 'container' : 'host',
171
- containerId,
172
- exists: true,
173
- source: 'db',
174
- });
175
- }
176
- }
177
- }
178
- // =========================================================================
179
- // Machine DB: Add ticketless executions from machine.db
180
- // These are cross-repo and work without a workspace.
181
- // =========================================================================
182
- for (const mExec of machineActiveExecutions) {
183
- // Skip if already covered by workspace DB (dedupe by session ID)
184
- if (mExec.sessionId && workspaceSessionIds.has(mExec.sessionId))
185
- continue;
186
- const isContainer = mExec.environment === 'docker' || mExec.environment === 'devcontainer';
187
- let exists = false;
188
- let actualSessionId = mExec.sessionId;
189
- if (isContainer && mExec.containerId) {
190
- const containerStatus = checkContainerLiveness(mExec.containerId);
191
- if (containerStatus === 'running') {
192
- if (mExec.sessionId) {
193
- const containerSessions = findContainerSessionsByPrefix(containerTmuxSessions, mExec.containerId);
194
- exists = containerSessions.includes(mExec.sessionId);
195
- }
196
- if (!exists) {
197
- exists = true;
198
- actualSessionId = actualSessionId || `container:${mExec.containerId.substring(0, 12)}`;
199
- }
200
- }
201
- }
202
- else if (mExec.sessionId) {
203
- exists = hostTmuxSessions.includes(mExec.sessionId);
204
- }
205
- if (exists && actualSessionId) {
206
- if (isContainer && mExec.containerId) {
207
- matchedContainerSessions.add(`${mExec.containerId}:${actualSessionId}`);
49
+ // Resolve HQ filter
50
+ let hqPathFilter;
51
+ if (flags.here) {
52
+ const cwdHq = findHQRoot(process.cwd());
53
+ if (!cwdHq) {
54
+ if (jsonMode) {
55
+ // Backward-compat: emit a flat (empty) array unless --grouped was requested.
56
+ if (flags.grouped) {
57
+ this.log(JSON.stringify({ sessions: [], grouped: { current_hq: null, here: [], elsewhere: [] } }, null, 2));
208
58
  }
209
59
  else {
210
- matchedHostSessions.add(actualSessionId);
60
+ this.log('[]');
211
61
  }
62
+ return;
212
63
  }
213
- if (!actualSessionId)
214
- continue;
215
- if (exists || flags.all) {
216
- sessions.push({
217
- sessionId: actualSessionId,
218
- ticketId: mExec.ticketId || mExec.id,
219
- agentName: mExec.agentName,
220
- status: exists ? mExec.status : 'stale',
221
- environment: isContainer ? 'container' : 'host',
222
- containerId: mExec.containerId,
223
- exists,
224
- source: 'db',
225
- });
226
- }
64
+ this.log('');
65
+ this.log(styles.warning('--here requires being inside an HQ workspace.'));
66
+ this.log('');
67
+ return;
227
68
  }
228
- // =========================================================================
229
- // Orphan discovery: only shown with --orphans flag
230
- // Orphan = tmux session matching prlt naming pattern but NOT tracked in DB
231
- // These are garbage to prune, not first-class sessions.
232
- // =========================================================================
233
- if (flags.orphans) {
234
- // Flatten all container sessions for orphan detection
235
- const allContainerSessions = flattenContainerSessions(containerTmuxSessions);
236
- // Host orphan sessions
237
- for (const sessionName of hostTmuxSessions) {
238
- if (matchedHostSessions.has(sessionName))
239
- continue;
240
- const parsed = parseSessionName(sessionName);
241
- if (parsed) {
242
- sessions.push({
243
- sessionId: sessionName,
244
- ticketId: parsed.ticketId,
245
- agentName: parsed.agentName,
246
- status: 'orphan',
247
- environment: 'host',
248
- exists: true,
249
- source: 'discovered',
250
- });
251
- }
252
- }
253
- // Container orphan sessions
254
- for (const { sessionName, containerId } of allContainerSessions) {
255
- if (matchedContainerSessions.has(`${containerId}:${sessionName}`))
256
- continue;
257
- const parsed = parseSessionName(sessionName);
258
- if (parsed) {
259
- sessions.push({
260
- sessionId: sessionName,
261
- ticketId: parsed.ticketId,
262
- agentName: parsed.agentName,
263
- status: 'orphan',
264
- environment: 'container',
265
- containerId,
266
- exists: true,
267
- source: 'discovered',
268
- });
269
- }
270
- }
69
+ hqPathFilter = cwdHq;
70
+ }
71
+ else if (flags.hq) {
72
+ hqPathFilter = flags.hq;
73
+ }
74
+ // Always query machine-wide; filters are applied inside collectAllSessions.
75
+ const sessions = collectAllSessions({
76
+ hqPathFilter,
77
+ roleFilter: flags.role,
78
+ includeAll: flags.all,
79
+ });
80
+ const grouped = groupSessionsByHQ(sessions);
81
+ if (jsonMode) {
82
+ // Default shape is a flat array for backward compatibility with
83
+ // existing agents and e2e tests. Pass --grouped to get the new
84
+ // { sessions, grouped: { current_hq, here, elsewhere } } shape.
85
+ if (flags.grouped) {
86
+ this.log(JSON.stringify({
87
+ sessions: sessions.map(toJsonSession),
88
+ grouped: {
89
+ current_hq: grouped.currentHq ? tildifyPath(grouped.currentHq) : null,
90
+ here: grouped.here.map(toJsonSession),
91
+ elsewhere: grouped.elsewhere.map(toJsonSession),
92
+ },
93
+ }, null, 2));
271
94
  }
272
- if (jsonMode) {
273
- this.log(JSON.stringify(sessions, null, 2));
274
- return;
95
+ else {
96
+ this.log(JSON.stringify(sessions.map(toJsonSession), null, 2));
275
97
  }
276
- if (sessions.length > 0) {
277
- this.log('');
278
- this.log(styles.header('Active Sessions'));
279
- this.log('='.repeat(90));
280
- this.log(styles.muted(' ' +
281
- visualPadEnd('Session', 34) +
282
- visualPadEnd('Ticket', 12) +
283
- visualPadEnd('Agent', 18) +
284
- visualPadEnd('Type', 15) +
285
- 'Status'));
286
- this.log(' ' + '-'.repeat(88));
287
- for (const session of sessions) {
288
- const typeIcon = session.environment === 'container' ? 'container' : 'host';
289
- const statusColor = session.status === 'running' ? styles.success :
290
- session.status === 'starting' ? styles.warning :
291
- session.status === 'stale' ? styles.error :
292
- session.status === 'orphan' ? styles.warning : styles.muted;
293
- // For orphan sessions, append source indicator
294
- // For sessions with died lifecycle state, append warning
295
- let statusText = session.source === 'discovered' ? `${session.status}*` : session.status;
296
- if (session.lifecycleState === 'died') {
297
- statusText = 'died';
298
- }
299
- // Truncate long session names to fit column
300
- const displaySession = session.sessionId.length > 32
301
- ? session.sessionId.substring(0, 29) + '...'
302
- : session.sessionId;
303
- this.log(' ' +
304
- visualPadEnd(displaySession, 34) +
305
- visualPadEnd(session.ticketId, 12) +
306
- visualPadEnd(session.agentName, 18) +
307
- visualPadEnd(typeIcon, 15) +
308
- statusColor(statusText));
309
- }
310
- this.log('');
311
- this.log('='.repeat(90));
312
- // Show attach command example
313
- const firstSession = sessions.find(s => s.exists);
314
- if (firstSession) {
315
- this.log(styles.muted('\nCommands:'));
316
- this.log(styles.muted(` prlt session attach ${firstSession.sessionId} Attach to session`));
317
- this.log('');
318
- }
319
- // Show stale sessions warning
320
- const staleSessions = sessions.filter(s => !s.exists);
321
- if (staleSessions.length > 0) {
322
- this.log(styles.warning(`\n ${staleSessions.length} stale session(s) in DB without live runtime.`));
323
- this.log(styles.muted(' Run `prlt work stop <work-id>` to clean up.'));
324
- this.log('');
325
- }
326
- // Show died/unresponsive sessions warning
327
- const diedSessions = sessions.filter(s => s.lifecycleState === 'died');
328
- if (diedSessions.length > 0) {
329
- this.log(styles.error(`\n ${diedSessions.length} agent(s) detected as unresponsive (heartbeat timeout).`));
330
- this.log(styles.muted(' These agents were auto-terminated. Run `prlt session watch --once` for details.'));
331
- this.log('');
332
- }
333
- // Show orphan sessions note (only visible with --orphans flag)
334
- const orphanSessions = sessions.filter(s => s.source === 'discovered');
335
- if (orphanSessions.length > 0) {
336
- this.log(styles.muted(`\n ${orphanSessions.length} orphan session(s) found (marked with *).`));
337
- this.log(styles.muted(' These are NOT tracked in the DB. Run `prlt session prune` to clean up.'));
338
- this.log('');
339
- }
98
+ return;
99
+ }
100
+ if (sessions.length === 0) {
101
+ this.log('');
102
+ this.log(styles.muted('No active sessions found on this machine.'));
103
+ this.log('');
104
+ this.log(styles.muted('Start work with: prlt work start <ticket-id>'));
105
+ this.log(styles.muted('Or ticketless: prlt work run --prompt "your task"'));
106
+ this.log('');
107
+ return;
108
+ }
109
+ this.log('');
110
+ // Render "Current HQ" section
111
+ if (grouped.currentHq) {
112
+ const label = `Current HQ: ${tildifyPath(grouped.currentHq)} (${grouped.here.length} session${grouped.here.length === 1 ? '' : 's'})`;
113
+ this.log(styles.header(label));
114
+ if (grouped.here.length === 0) {
115
+ this.log(styles.muted(' (none)'));
340
116
  }
341
117
  else {
342
- this.log('');
343
- if (!hasWorkspace) {
344
- this.log(styles.muted('No active sessions found.'));
345
- this.log('');
346
- this.log(styles.muted('Start ticketless work: prlt work run --prompt "your task"'));
347
- this.log(styles.muted('Start ticketed work: prlt work start <ticket-id> (requires HQ workspace)'));
348
- }
349
- else {
350
- this.log(styles.muted('No active sessions found.'));
351
- this.log('');
352
- this.log(styles.muted('Start work with: prlt work start <ticket-id>'));
353
- this.log(styles.muted('Or ticketless: prlt work run --prompt "your task"'));
354
- if (!flags.orphans) {
355
- this.log(styles.muted('Use --orphans to check for untracked tmux sessions.'));
356
- }
357
- }
358
- this.log('');
118
+ renderSessionRows(this.log.bind(this), grouped.here);
119
+ }
120
+ this.log('');
121
+ }
122
+ // Render "Other locations" section
123
+ if (grouped.elsewhere.length > 0) {
124
+ this.log(styles.muted(`Other locations (${grouped.elsewhere.length} session${grouped.elsewhere.length === 1 ? '' : 's'})`));
125
+ const buckets = bucketElsewhereByHq(grouped.elsewhere);
126
+ for (const bucket of buckets) {
127
+ const hqLabel = bucket.hqPath ? tildifyPath(bucket.hqPath) : '(no HQ)';
128
+ this.log(styles.muted(` ${bucket.hqName} ${hqLabel}`));
129
+ renderSessionRows(this.log.bind(this), bucket.sessions, /* dim */ true);
359
130
  }
131
+ this.log('');
360
132
  }
361
- finally {
362
- db?.close();
363
- machineDb?.close();
133
+ // Stale + died warnings (across all sessions)
134
+ const stale = sessions.filter(s => !s.exists);
135
+ if (stale.length > 0) {
136
+ this.log(styles.warning(` ${stale.length} stale session(s) in DB without live runtime.`));
137
+ this.log(styles.muted(' Run `prlt work stop <work-id>` to clean up.'));
138
+ this.log('');
139
+ }
140
+ const died = sessions.filter(s => s.lifecycleState === 'died');
141
+ if (died.length > 0) {
142
+ this.log(styles.error(` ${died.length} agent(s) detected as unresponsive (heartbeat timeout).`));
143
+ this.log(styles.muted(' These agents were auto-terminated. Run `prlt session watch --once` for details.'));
144
+ this.log('');
364
145
  }
365
146
  }
366
147
  }
148
+ function toJsonSession(s) {
149
+ return {
150
+ id: s.id,
151
+ sessionId: s.sessionId,
152
+ ticketId: s.ticketId,
153
+ agentName: s.agentName,
154
+ role: s.role,
155
+ status: s.status,
156
+ environment: s.environment,
157
+ containerId: s.containerId ?? null,
158
+ exists: s.exists,
159
+ source: s.source,
160
+ hqPath: s.hqPath ?? null,
161
+ hqName: s.hqName ?? null,
162
+ repoPath: s.repoPath ?? null,
163
+ startedAt: s.startedAt?.toISOString() ?? null,
164
+ lastHeartbeat: s.lastHeartbeat?.toISOString() ?? null,
165
+ lifecycleState: s.lifecycleState ?? null,
166
+ };
167
+ }
168
+ function renderSessionRows(log, sessions, dim = false) {
169
+ for (const s of sessions) {
170
+ const statusColor = s.status === 'running' || s.status === 'starting'
171
+ ? styles.success
172
+ : s.status === 'idle'
173
+ ? styles.warning
174
+ : s.status === 'stale' || s.status === 'died' || s.status === 'failed'
175
+ ? styles.error
176
+ : styles.muted;
177
+ const displayName = truncateName(s.agentName, 16);
178
+ const ticket = truncateName(s.ticketId, 14);
179
+ const age = formatRelativeAge(s.startedAt);
180
+ const row = ' ○ ' +
181
+ visualPadEnd(displayName, 18) +
182
+ visualPadEnd(ticket, 16) +
183
+ visualPadEnd(statusColor(s.status), 20) +
184
+ styles.muted(age);
185
+ log(dim ? styles.muted(stripColor(row)) : row);
186
+ }
187
+ }
188
+ function truncateName(name, max) {
189
+ if (!name)
190
+ return '';
191
+ if (name.length <= max)
192
+ return name;
193
+ return name.slice(0, max - 1) + '…';
194
+ }
195
+ // chalk strings already include ANSI codes; for the dim "elsewhere" rendering
196
+ // we render the row text without inner colors so the dim style applies cleanly.
197
+ function stripColor(s) {
198
+ // eslint-disable-next-line no-control-regex
199
+ return s.replace(/\x1B\[[0-9;]*m/g, '');
200
+ }
367
201
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/session/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,sBAAsB,GACvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;A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