@proletariat/cli 0.3.25 → 0.3.26

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 (69) hide show
  1. package/dist/commands/action/index.js +2 -2
  2. package/dist/commands/agent/auth.js +1 -1
  3. package/dist/commands/agent/cleanup.js +6 -6
  4. package/dist/commands/agent/discover.js +1 -1
  5. package/dist/commands/agent/remove.js +4 -4
  6. package/dist/commands/autocomplete/setup.d.ts +2 -2
  7. package/dist/commands/autocomplete/setup.js +5 -5
  8. package/dist/commands/branch/create.js +31 -30
  9. package/dist/commands/category/create.js +4 -5
  10. package/dist/commands/category/delete.js +2 -3
  11. package/dist/commands/category/rename.js +2 -3
  12. package/dist/commands/claude.d.ts +2 -8
  13. package/dist/commands/claude.js +26 -26
  14. package/dist/commands/commit.d.ts +2 -8
  15. package/dist/commands/commit.js +4 -26
  16. package/dist/commands/config/index.d.ts +2 -10
  17. package/dist/commands/config/index.js +8 -34
  18. package/dist/commands/docker/index.d.ts +2 -2
  19. package/dist/commands/docker/index.js +8 -8
  20. package/dist/commands/epic/delete.js +4 -5
  21. package/dist/commands/feedback/submit.d.ts +2 -2
  22. package/dist/commands/feedback/submit.js +9 -9
  23. package/dist/commands/link/index.js +2 -2
  24. package/dist/commands/pmo/init.d.ts +2 -2
  25. package/dist/commands/pmo/init.js +7 -7
  26. package/dist/commands/project/spec.js +6 -6
  27. package/dist/commands/session/health.d.ts +29 -0
  28. package/dist/commands/session/health.js +495 -0
  29. package/dist/commands/session/index.js +4 -0
  30. package/dist/commands/spec/edit.js +2 -3
  31. package/dist/commands/staff/add.d.ts +2 -2
  32. package/dist/commands/staff/add.js +15 -14
  33. package/dist/commands/staff/index.js +2 -2
  34. package/dist/commands/staff/remove.js +4 -4
  35. package/dist/commands/status/index.js +6 -7
  36. package/dist/commands/template/apply.js +10 -11
  37. package/dist/commands/template/create.js +18 -17
  38. package/dist/commands/template/index.d.ts +2 -2
  39. package/dist/commands/template/index.js +6 -6
  40. package/dist/commands/template/save.js +8 -7
  41. package/dist/commands/template/update.js +6 -7
  42. package/dist/commands/terminal/title.d.ts +2 -26
  43. package/dist/commands/terminal/title.js +4 -33
  44. package/dist/commands/theme/index.d.ts +2 -2
  45. package/dist/commands/theme/index.js +19 -18
  46. package/dist/commands/theme/set.d.ts +2 -2
  47. package/dist/commands/theme/set.js +5 -5
  48. package/dist/commands/ticket/create.js +34 -16
  49. package/dist/commands/ticket/delete.js +15 -13
  50. package/dist/commands/ticket/edit.js +20 -12
  51. package/dist/commands/ticket/epic.js +12 -10
  52. package/dist/commands/ticket/project.js +11 -9
  53. package/dist/commands/ticket/reassign.js +23 -19
  54. package/dist/commands/ticket/spec.js +7 -5
  55. package/dist/commands/ticket/update.js +55 -53
  56. package/dist/commands/whoami.js +1 -0
  57. package/dist/commands/work/ready.js +7 -7
  58. package/dist/commands/work/revise.js +13 -11
  59. package/dist/commands/work/spawn.js +154 -57
  60. package/dist/commands/work/start.d.ts +1 -0
  61. package/dist/commands/work/start.js +295 -173
  62. package/dist/hooks/init.js +4 -0
  63. package/dist/lib/pr/index.d.ts +4 -0
  64. package/dist/lib/pr/index.js +32 -14
  65. package/dist/lib/prompt-command.d.ts +3 -0
  66. package/dist/lib/prompt-json.d.ts +72 -1
  67. package/dist/lib/prompt-json.js +46 -0
  68. package/oclif.manifest.json +1184 -1116
  69. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { Command, Args, Flags } from '@oclif/core';
1
+ import { Args, Flags } from '@oclif/core';
2
2
  import { execSync } from 'node:child_process';
3
- import inquirer from 'inquirer';
3
+ import { PromptCommand } from '../lib/prompt-command.js';
4
4
  import { validateBranchName } from '../lib/branch/index.js';
5
5
  import { styles } from '../lib/styles.js';
6
- import { shouldOutputJson, isAgentMode, outputPromptAsJson, outputErrorAsJson, createMetadata, normalizeChoices, } from '../lib/prompt-json.js';
6
+ import { shouldOutputJson, outputErrorAsJson, createMetadata, } from '../lib/prompt-json.js';
7
7
  /**
8
8
  * Commit message format presets.
9
9
  */
@@ -140,7 +140,7 @@ function branchTypeToCommitType(branchType) {
140
140
  };
141
141
  return mapping[branchType] || branchType;
142
142
  }
143
- export default class Commit extends Command {
143
+ export default class Commit extends PromptCommand {
144
144
  static description = 'Create a commit with ticket ID from branch name';
145
145
  static examples = [
146
146
  '<%= config.bin %> <%= command.id %> # interactive mode',
@@ -197,28 +197,6 @@ export default class Commit extends Command {
197
197
  default: false,
198
198
  }),
199
199
  };
200
- /**
201
- * Prompt wrapper - handles both JSON mode and interactive mode.
202
- * In JSON mode: outputs prompt as JSON and exits.
203
- * In interactive mode: calls inquirer.prompt normally.
204
- */
205
- async prompt(questions, jsonModeConfig) {
206
- if (jsonModeConfig && isAgentMode(jsonModeConfig.flags)) {
207
- const firstQuestion = questions[0];
208
- if (firstQuestion) {
209
- const choices = firstQuestion.choices ? normalizeChoices(firstQuestion.choices) : undefined;
210
- outputPromptAsJson({
211
- type: firstQuestion.type,
212
- name: firstQuestion.name,
213
- message: firstQuestion.message,
214
- choices,
215
- default: firstQuestion.default,
216
- }, createMetadata(jsonModeConfig.commandName, jsonModeConfig.flags));
217
- }
218
- return {};
219
- }
220
- return inquirer.prompt(questions);
221
- }
222
200
  async run() {
223
201
  const { args, flags } = await this.parse(Commit);
224
202
  // Check if JSON output mode is active
@@ -1,5 +1,5 @@
1
- import { Command } from '@oclif/core';
2
- export default class Config extends Command {
1
+ import { PromptCommand } from '../../lib/prompt-command.js';
2
+ export default class Config extends PromptCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static flags: {
@@ -8,14 +8,6 @@ export default class Config extends Command {
8
8
  list: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
9
  setting: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
10
  };
11
- /**
12
- * Prompt wrapper - drop-in replacement for inquirer.prompt
13
- *
14
- * Works in BOTH modes:
15
- * - Interactive mode: calls inquirer.prompt normally (human sees menu)
16
- * - JSON/Agent mode: outputs prompt as structured JSON and exits
17
- */
18
- private promptUser;
19
11
  run(): Promise<void>;
20
12
  /**
21
13
  * Handle a specific setting's sub-prompt
@@ -2,12 +2,12 @@ import { Flags } from '@oclif/core';
2
2
  import * as path from 'node:path';
3
3
  import Database from 'better-sqlite3';
4
4
  import inquirer from 'inquirer';
5
- import { Command } from '@oclif/core';
5
+ import { PromptCommand } from '../../lib/prompt-command.js';
6
6
  import { styles } from '../../lib/styles.js';
7
7
  import { getWorkspaceInfo } from '../../lib/agents/commands.js';
8
8
  import { loadExecutionConfig, saveTerminalApp, saveTerminalOpenInBackground, saveTmuxControlMode, saveShell, } from '../../lib/execution/config.js';
9
- import { shouldOutputJson, isAgentMode, isNonTTY, outputPromptAsJson, outputSuccessAsJson, outputErrorAsJson, createMetadata, normalizeChoices, } from '../../lib/prompt-json.js';
10
- export default class Config extends Command {
9
+ import { shouldOutputJson, isNonTTY, outputSuccessAsJson, outputErrorAsJson, createMetadata, } from '../../lib/prompt-json.js';
10
+ export default class Config extends PromptCommand {
11
11
  static description = 'View and update workspace configuration';
12
12
  static examples = [
13
13
  '<%= config.bin %> <%= command.id %> # Interactive menu',
@@ -37,32 +37,6 @@ export default class Config extends Command {
37
37
  description: 'Navigate to a specific setting prompt (for agent navigation)',
38
38
  }),
39
39
  };
40
- /**
41
- * Prompt wrapper - drop-in replacement for inquirer.prompt
42
- *
43
- * Works in BOTH modes:
44
- * - Interactive mode: calls inquirer.prompt normally (human sees menu)
45
- * - JSON/Agent mode: outputs prompt as structured JSON and exits
46
- */
47
- async promptUser(questions, jsonModeConfig) {
48
- if (jsonModeConfig && isAgentMode(jsonModeConfig.flags)) {
49
- const firstQuestion = questions[0];
50
- if (firstQuestion) {
51
- const choices = firstQuestion.choices
52
- ? normalizeChoices(firstQuestion.choices)
53
- : undefined;
54
- outputPromptAsJson({
55
- type: firstQuestion.type,
56
- name: firstQuestion.name,
57
- message: firstQuestion.message,
58
- choices,
59
- default: firstQuestion.default,
60
- }, createMetadata(jsonModeConfig.commandName, jsonModeConfig.flags));
61
- }
62
- return {};
63
- }
64
- return inquirer.prompt(questions);
65
- }
66
40
  async run() {
67
41
  const { flags } = await this.parse(Config);
68
42
  const jsonMode = shouldOutputJson(flags);
@@ -163,7 +137,7 @@ export default class Config extends Command {
163
137
  { name: `Shell: ${config.shell}`, value: 'shell', command: 'prlt config --setting shell --json' },
164
138
  { name: `Tmux Control Mode (iTerm -CC): ${config.tmux.controlMode}`, value: 'tmux.controlMode', command: 'prlt config --setting tmux.controlMode --json' },
165
139
  ];
166
- const { setting } = await this.promptUser([
140
+ const { setting } = await this.prompt([
167
141
  {
168
142
  type: 'list',
169
143
  name: 'setting',
@@ -209,7 +183,7 @@ export default class Config extends Command {
209
183
  { name: 'Warp', value: 'Warp', command: 'prlt config --set "terminal.app Warp" --json' },
210
184
  { name: 'tmux', value: 'tmux', command: 'prlt config --set "terminal.app tmux" --json' },
211
185
  ];
212
- const { newApp } = await this.promptUser([
186
+ const { newApp } = await this.prompt([
213
187
  {
214
188
  type: 'list',
215
189
  name: 'newApp',
@@ -227,7 +201,7 @@ export default class Config extends Command {
227
201
  { name: 'Yes - Open tabs in background (don\'t steal focus)', value: 'true', command: 'prlt config --set "terminal.openInBackground true" --json' },
228
202
  { name: 'No - Bring terminal to foreground when opening tabs', value: 'false', command: 'prlt config --set "terminal.openInBackground false" --json' },
229
203
  ];
230
- const { openInBg } = await this.promptUser([
204
+ const { openInBg } = await this.prompt([
231
205
  {
232
206
  type: 'list',
233
207
  name: 'openInBg',
@@ -246,7 +220,7 @@ export default class Config extends Command {
246
220
  { name: 'bash', value: 'bash', command: 'prlt config --set "shell bash" --json' },
247
221
  { name: 'fish', value: 'fish', command: 'prlt config --set "shell fish" --json' },
248
222
  ];
249
- const { newShell } = await this.promptUser([
223
+ const { newShell } = await this.prompt([
250
224
  {
251
225
  type: 'list',
252
226
  name: 'newShell',
@@ -264,7 +238,7 @@ export default class Config extends Command {
264
238
  { name: 'Yes - Use tmux -CC for native iTerm integration', value: 'true', command: 'prlt config --set "tmux.controlMode true" --json' },
265
239
  { name: 'No - Standard tmux interface', value: 'false', command: 'prlt config --set "tmux.controlMode false" --json' },
266
240
  ];
267
- const { controlMode } = await this.promptUser([
241
+ const { controlMode } = await this.prompt([
268
242
  {
269
243
  type: 'list',
270
244
  name: 'controlMode',
@@ -1,5 +1,5 @@
1
- import { Command } from '@oclif/core';
2
- export default class Docker extends Command {
1
+ import { PromptCommand } from '../../lib/prompt-command.js';
2
+ export default class Docker extends PromptCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static flags: {
@@ -1,5 +1,5 @@
1
- import { Command } from '@oclif/core';
2
1
  import inquirer from 'inquirer';
2
+ import { PromptCommand } from '../../lib/prompt-command.js';
3
3
  import { execSync } from 'node:child_process';
4
4
  import * as path from 'node:path';
5
5
  import Database from 'better-sqlite3';
@@ -9,7 +9,7 @@ import { ExecutionStorage, ContainerStorage } from '../../lib/execution/storage.
9
9
  import { isDockerRunning } from '../../lib/execution/runners.js';
10
10
  import { FlagResolver, shouldOutputJson } from '../../lib/flags/index.js';
11
11
  import { machineOutputFlags } from '../../lib/pmo/base-command.js';
12
- export default class Docker extends Command {
12
+ export default class Docker extends PromptCommand {
13
13
  static description = 'Manage Docker containers used by agents';
14
14
  static examples = [
15
15
  '<%= config.bin %> <%= command.id %>',
@@ -198,17 +198,17 @@ export default class Docker extends Command {
198
198
  db.close();
199
199
  if (choices.length <= 2) {
200
200
  // Only manual option, just ask for input
201
- const { target } = await inquirer.prompt([
201
+ const { target } = await this.prompt([
202
202
  {
203
203
  type: 'input',
204
204
  name: 'target',
205
205
  message: 'No containers found. Enter container ID:',
206
206
  validate: (input) => input.trim().length > 0 || 'Target is required',
207
207
  },
208
- ]);
208
+ ], null);
209
209
  return target.trim();
210
210
  }
211
- const { target } = await inquirer.prompt([
211
+ const { target } = await this.prompt([
212
212
  {
213
213
  type: 'list',
214
214
  name: 'target',
@@ -216,19 +216,19 @@ export default class Docker extends Command {
216
216
  choices,
217
217
  pageSize: 15,
218
218
  },
219
- ]);
219
+ ], null);
220
220
  if (target === '__cancel__') {
221
221
  return null;
222
222
  }
223
223
  if (target === '__manual__') {
224
- const { manualTarget } = await inquirer.prompt([
224
+ const { manualTarget } = await this.prompt([
225
225
  {
226
226
  type: 'input',
227
227
  name: 'manualTarget',
228
228
  message: 'Enter execution ID (WORK-XXX), agent name, or container ID:',
229
229
  validate: (input) => input.trim().length > 0 || 'Target is required',
230
230
  },
231
- ]);
231
+ ], null);
232
232
  return manualTarget.trim();
233
233
  }
234
234
  return target;
@@ -1,5 +1,4 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
- import inquirer from 'inquirer';
3
2
  import { autoExportToBoard, PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
4
3
  import { styles } from '../../lib/styles.js';
5
4
  import { deleteEpicFile } from '../../lib/pmo/epic-files.js';
@@ -67,12 +66,12 @@ export default class EpicDelete extends PMOCommand {
67
66
  outputPromptAsJson(buildPromptConfig('list', 'id', 'Select epic to delete:', choices), createMetadata('epic delete', flags));
68
67
  return;
69
68
  }
70
- const { selected } = await inquirer.prompt([{
69
+ const { selected } = await this.prompt([{
71
70
  type: 'list',
72
71
  name: 'selected',
73
72
  message: 'Select epic to delete:',
74
73
  choices,
75
- }]);
74
+ }], null);
76
75
  epicId = selected;
77
76
  }
78
77
  // Get the epic to show details
@@ -97,7 +96,7 @@ export default class EpicDelete extends PMOCommand {
97
96
  this.log(` Title: ${epic.title}`);
98
97
  this.log(` Status: ${epic.status}`);
99
98
  this.log(` Tickets: ${tickets.length} (will be unlinked, not deleted)`);
100
- const { confirmed } = await inquirer.prompt([{
99
+ const { confirmed } = await this.prompt([{
101
100
  type: 'list',
102
101
  name: 'confirmed',
103
102
  message: `Delete epic '${epic.title}'?`,
@@ -106,7 +105,7 @@ export default class EpicDelete extends PMOCommand {
106
105
  { name: 'Yes, delete permanently', value: true },
107
106
  ],
108
107
  default: 0,
109
- }]);
108
+ }], null);
110
109
  if (!confirmed) {
111
110
  this.log(styles.muted('Deletion cancelled.'));
112
111
  return;
@@ -1,5 +1,5 @@
1
- import { Command } from '@oclif/core';
2
- export default class FeedbackSubmit extends Command {
1
+ import { PromptCommand } from '../../lib/prompt-command.js';
2
+ export default class FeedbackSubmit extends PromptCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static flags: {
@@ -1,8 +1,8 @@
1
- import { Command, Flags } from '@oclif/core';
1
+ import { Flags } from '@oclif/core';
2
2
  import { execSync } from 'node:child_process';
3
3
  import * as os from 'node:os';
4
- import inquirer from 'inquirer';
5
4
  import chalk from 'chalk';
5
+ import { PromptCommand } from '../../lib/prompt-command.js';
6
6
  import { styles } from '../../lib/styles.js';
7
7
  import { isGHInstalled, isGHAuthenticated } from '../../lib/pr/index.js';
8
8
  import { isMachineOutput, outputSuccessAsJson, outputErrorAsJson, outputPromptAsJson, buildPromptConfig, createMetadata, } from '../../lib/prompt-json.js';
@@ -15,7 +15,7 @@ const CATEGORY_LABELS = {
15
15
  feature: 'enhancement',
16
16
  general: 'feedback',
17
17
  };
18
- export default class FeedbackSubmit extends Command {
18
+ export default class FeedbackSubmit extends PromptCommand {
19
19
  static description = 'Submit feedback, bug reports, or feature requests to GitHub Issues';
20
20
  static examples = [
21
21
  '<%= config.bin %> <%= command.id %>',
@@ -69,12 +69,12 @@ export default class FeedbackSubmit extends Command {
69
69
  outputPromptAsJson(buildPromptConfig('list', 'category', categoryMessage, categoryChoices), createMetadata('feedback submit', flags));
70
70
  return;
71
71
  }
72
- const { selectedCategory } = await inquirer.prompt([{
72
+ const { selectedCategory } = await this.prompt([{
73
73
  type: 'list',
74
74
  name: 'selectedCategory',
75
75
  message: categoryMessage,
76
76
  choices: categoryChoices,
77
- }]);
77
+ }], null);
78
78
  category = selectedCategory;
79
79
  }
80
80
  // Collect title
@@ -85,7 +85,7 @@ export default class FeedbackSubmit extends Command {
85
85
  outputPromptAsJson(buildPromptConfig('input', 'title', titleMessage), createMetadata('feedback submit', { ...flags, category }));
86
86
  return;
87
87
  }
88
- const { inputTitle } = await inquirer.prompt([{
88
+ const { inputTitle } = await this.prompt([{
89
89
  type: 'input',
90
90
  name: 'inputTitle',
91
91
  message: titleMessage,
@@ -98,7 +98,7 @@ export default class FeedbackSubmit extends Command {
98
98
  }
99
99
  return true;
100
100
  },
101
- }]);
101
+ }], null);
102
102
  title = inputTitle;
103
103
  }
104
104
  // Collect body/description
@@ -109,7 +109,7 @@ export default class FeedbackSubmit extends Command {
109
109
  outputPromptAsJson(buildPromptConfig('editor', 'body', bodyMessage), createMetadata('feedback submit', { ...flags, category, title }));
110
110
  return;
111
111
  }
112
- const { inputBody } = await inquirer.prompt([{
112
+ const { inputBody } = await this.prompt([{
113
113
  type: 'editor',
114
114
  name: 'inputBody',
115
115
  message: bodyMessage,
@@ -119,7 +119,7 @@ export default class FeedbackSubmit extends Command {
119
119
  }
120
120
  return true;
121
121
  },
122
- }]);
122
+ }], null);
123
123
  body = inputBody;
124
124
  }
125
125
  // Build diagnostics section
@@ -42,7 +42,7 @@ export default class Link extends PMOCommand {
42
42
  outputPromptAsJson(buildPromptConfig('list', 'action', message, menuChoices), createMetadata('link', flags));
43
43
  return;
44
44
  }
45
- const { selected } = await inquirer.prompt([{
45
+ const { selected } = await this.prompt([{
46
46
  type: 'list',
47
47
  name: 'selected',
48
48
  message,
@@ -51,7 +51,7 @@ export default class Link extends PMOCommand {
51
51
  new inquirer.Separator(),
52
52
  { name: menuChoices[3].name, value: menuChoices[3].value }
53
53
  ]
54
- }]);
54
+ }], null);
55
55
  if (selected === 'cancel') {
56
56
  this.log(styles.muted('\nCancelled.'));
57
57
  return;
@@ -1,5 +1,5 @@
1
- import { Command } from '@oclif/core';
2
- export default class PMOInit extends Command {
1
+ import { PromptCommand } from '../../lib/prompt-command.js';
2
+ export default class PMOInit extends PromptCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static flags: {
@@ -1,9 +1,9 @@
1
- import { Command, Flags } from '@oclif/core';
1
+ import { Flags } from '@oclif/core';
2
2
  import * as fs from 'node:fs';
3
3
  import * as path from 'node:path';
4
4
  import { execSync } from 'node:child_process';
5
5
  import chalk from 'chalk';
6
- import inquirer from 'inquirer';
6
+ import { PromptCommand } from '../../lib/prompt-command.js';
7
7
  import Database from 'better-sqlite3';
8
8
  import { SQLiteStorage, getColumnsForTemplate, createPMO, promptForPMOLocation, promptForBoardTemplate, promptForBoardName, promptForCustomColumns, determinePMOPath, getPickerTemplates, } from '../../lib/pmo/index.js';
9
9
  import { styles } from '../../lib/styles.js';
@@ -11,7 +11,7 @@ import { isGHInstalled, isGHAuthenticated, getGHUsername, isGHTokenInEnv } from
11
11
  import { shouldOutputJson, outputPromptAsJson, createMetadata, buildPromptConfig, } from '../../lib/prompt-json.js';
12
12
  // Build template options dynamically from shared definitions (picker templates + custom)
13
13
  const PICKER_TEMPLATE_IDS = [...getPickerTemplates().map(t => t.id), 'custom'];
14
- export default class PMOInit extends Command {
14
+ export default class PMOInit extends PromptCommand {
15
15
  static description = 'Initialize PMO (Project Management Org) in current directory or HQ';
16
16
  static examples = [
17
17
  '<%= config.bin %> <%= command.id %>',
@@ -268,13 +268,13 @@ export default class PMOInit extends Command {
268
268
  this.log(chalk.gray(` Location: ${pmoPath}`));
269
269
  this.log(chalk.gray(` Projects: ${projectCount}`));
270
270
  this.log(chalk.gray(` Tickets: ${ticketCount}\n`));
271
- const result = await inquirer.prompt([{
271
+ const result = await this.prompt([{
272
272
  type: 'list',
273
273
  name: 'action',
274
274
  message: 'What would you like to do?',
275
275
  choices: actionChoices,
276
276
  default: 'cancel',
277
- }]);
277
+ }], null);
278
278
  action = result.action;
279
279
  }
280
280
  if (action === 'cancel') {
@@ -303,11 +303,11 @@ export default class PMOInit extends Command {
303
303
  this.log(chalk.red(' • All tickets and boards'));
304
304
  this.log(chalk.red(' • All specs and documentation'));
305
305
  this.log(chalk.red(' • Database tables (pmo_*)\n'));
306
- const result = await inquirer.prompt([{
306
+ const result = await this.prompt([{
307
307
  type: 'input',
308
308
  name: 'confirmation',
309
309
  message: 'Type "delete pmo" to confirm:',
310
- }]);
310
+ }], null);
311
311
  confirmation = result.confirmation;
312
312
  }
313
313
  if (confirmation !== 'delete pmo') {
@@ -140,7 +140,7 @@ export default class ProjectSpec extends PMOCommand {
140
140
  }
141
141
  }
142
142
  // eslint-disable-next-line no-await-in-loop -- Interactive user prompt
143
- const { action } = await inquirer.prompt([{
143
+ const { action } = await this.prompt([{
144
144
  type: 'list',
145
145
  name: 'action',
146
146
  message: `Manage specs for ${projectId}:`,
@@ -150,7 +150,7 @@ export default class ProjectSpec extends PMOCommand {
150
150
  new inquirer.Separator(),
151
151
  { name: 'Done', value: 'done' },
152
152
  ],
153
- }]);
153
+ }], null);
154
154
  if (action === 'done') {
155
155
  continueLoop = false;
156
156
  continue;
@@ -165,7 +165,7 @@ export default class ProjectSpec extends PMOCommand {
165
165
  continue;
166
166
  }
167
167
  // eslint-disable-next-line no-await-in-loop -- User selection prompt
168
- const { selected } = await inquirer.prompt([{
168
+ const { selected } = await this.prompt([{
169
169
  type: 'checkbox',
170
170
  name: 'selected',
171
171
  message: 'Select specs to add:',
@@ -173,7 +173,7 @@ export default class ProjectSpec extends PMOCommand {
173
173
  name: `${s.id} - ${s.title} (${s.status})`,
174
174
  value: s.id,
175
175
  })),
176
- }]);
176
+ }], null);
177
177
  if (selected.length === 0) {
178
178
  this.log(styles.muted(' No specs selected.'));
179
179
  continue;
@@ -191,7 +191,7 @@ export default class ProjectSpec extends PMOCommand {
191
191
  continue;
192
192
  }
193
193
  // eslint-disable-next-line no-await-in-loop -- User selection prompt
194
- const { selected } = await inquirer.prompt([{
194
+ const { selected } = await this.prompt([{
195
195
  type: 'checkbox',
196
196
  name: 'selected',
197
197
  message: 'Select specs to remove:',
@@ -199,7 +199,7 @@ export default class ProjectSpec extends PMOCommand {
199
199
  name: `${s.id} - ${s.title} (${s.status})`,
200
200
  value: s.id,
201
201
  })),
202
- }]);
202
+ }], null);
203
203
  if (selected.length === 0) {
204
204
  this.log(styles.muted(' No specs selected.'));
205
205
  continue;
@@ -0,0 +1,29 @@
1
+ import { PMOCommand } from '../../lib/pmo/index.js';
2
+ export default class SessionHealth extends PMOCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ fix: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
+ watch: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
+ interval: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
9
+ threshold: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
10
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ };
13
+ protected getPMOOptions(): {
14
+ promptIfMultiple: boolean;
15
+ };
16
+ execute(): Promise<void>;
17
+ /**
18
+ * Single health check pass. Returns the list of agent health infos.
19
+ */
20
+ private runHealthCheck;
21
+ /**
22
+ * Display the health status table.
23
+ */
24
+ private displayHealthTable;
25
+ /**
26
+ * Watchdog mode: continuously monitor and auto-recover hung agents.
27
+ */
28
+ private watchMode;
29
+ }