@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.
- package/dist/commands/action/index.js +2 -2
- package/dist/commands/agent/auth.js +1 -1
- package/dist/commands/agent/cleanup.js +6 -6
- package/dist/commands/agent/discover.js +1 -1
- package/dist/commands/agent/remove.js +4 -4
- package/dist/commands/autocomplete/setup.d.ts +2 -2
- package/dist/commands/autocomplete/setup.js +5 -5
- package/dist/commands/branch/create.js +31 -30
- package/dist/commands/category/create.js +4 -5
- package/dist/commands/category/delete.js +2 -3
- package/dist/commands/category/rename.js +2 -3
- package/dist/commands/claude.d.ts +2 -8
- package/dist/commands/claude.js +26 -26
- package/dist/commands/commit.d.ts +2 -8
- package/dist/commands/commit.js +4 -26
- package/dist/commands/config/index.d.ts +2 -10
- package/dist/commands/config/index.js +8 -34
- package/dist/commands/docker/index.d.ts +2 -2
- package/dist/commands/docker/index.js +8 -8
- package/dist/commands/epic/delete.js +4 -5
- package/dist/commands/feedback/submit.d.ts +2 -2
- package/dist/commands/feedback/submit.js +9 -9
- package/dist/commands/link/index.js +2 -2
- package/dist/commands/pmo/init.d.ts +2 -2
- package/dist/commands/pmo/init.js +7 -7
- package/dist/commands/project/spec.js +6 -6
- package/dist/commands/session/health.d.ts +29 -0
- package/dist/commands/session/health.js +495 -0
- package/dist/commands/session/index.js +4 -0
- package/dist/commands/spec/edit.js +2 -3
- package/dist/commands/staff/add.d.ts +2 -2
- package/dist/commands/staff/add.js +15 -14
- package/dist/commands/staff/index.js +2 -2
- package/dist/commands/staff/remove.js +4 -4
- package/dist/commands/status/index.js +6 -7
- package/dist/commands/template/apply.js +10 -11
- package/dist/commands/template/create.js +18 -17
- package/dist/commands/template/index.d.ts +2 -2
- package/dist/commands/template/index.js +6 -6
- package/dist/commands/template/save.js +8 -7
- package/dist/commands/template/update.js +6 -7
- package/dist/commands/terminal/title.d.ts +2 -26
- package/dist/commands/terminal/title.js +4 -33
- package/dist/commands/theme/index.d.ts +2 -2
- package/dist/commands/theme/index.js +19 -18
- package/dist/commands/theme/set.d.ts +2 -2
- package/dist/commands/theme/set.js +5 -5
- package/dist/commands/ticket/create.js +34 -16
- package/dist/commands/ticket/delete.js +15 -13
- package/dist/commands/ticket/edit.js +20 -12
- package/dist/commands/ticket/epic.js +12 -10
- package/dist/commands/ticket/project.js +11 -9
- package/dist/commands/ticket/reassign.js +23 -19
- package/dist/commands/ticket/spec.js +7 -5
- package/dist/commands/ticket/update.js +55 -53
- package/dist/commands/whoami.js +1 -0
- package/dist/commands/work/ready.js +7 -7
- package/dist/commands/work/revise.js +13 -11
- package/dist/commands/work/spawn.js +154 -57
- package/dist/commands/work/start.d.ts +1 -0
- package/dist/commands/work/start.js +295 -173
- package/dist/hooks/init.js +4 -0
- package/dist/lib/pr/index.d.ts +4 -0
- package/dist/lib/pr/index.js +32 -14
- package/dist/lib/prompt-command.d.ts +3 -0
- package/dist/lib/prompt-json.d.ts +72 -1
- package/dist/lib/prompt-json.js +46 -0
- package/oclif.manifest.json +1184 -1116
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
2
|
import { PMOCommand, pmoBaseFlags, autoExportToBoard } from '../../lib/pmo/index.js';
|
|
4
3
|
import { PRIORITIES, PRIORITY_LABELS } from '../../lib/pmo/types.js';
|
|
5
4
|
import { styles } from '../../lib/styles.js';
|
|
@@ -93,55 +92,56 @@ export default class TicketUpdate extends PMOCommand {
|
|
|
93
92
|
let updateCategory = flags.category;
|
|
94
93
|
if (!updatePriority && !updateCategory) {
|
|
95
94
|
// Ask what to update
|
|
96
|
-
const {
|
|
95
|
+
const jsonModeConfig = jsonMode ? { flags, commandName: 'ticket update' } : null;
|
|
96
|
+
const { updateType } = await this.prompt([{
|
|
97
97
|
type: 'list',
|
|
98
98
|
name: 'updateType',
|
|
99
99
|
message: 'What would you like to update?',
|
|
100
100
|
choices: [
|
|
101
|
-
{ name: 'Priority', value: 'priority' },
|
|
102
|
-
{ name: 'Category', value: 'category' },
|
|
103
|
-
{ name: 'Both', value: 'both' },
|
|
101
|
+
{ name: 'Priority', value: 'priority', command: `prlt ticket update ${ticketId} --priority <P0|P1|P2|P3>${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
102
|
+
{ name: 'Category', value: 'category', command: `prlt ticket update ${ticketId} --category <category>${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
103
|
+
{ name: 'Both', value: 'both', command: `prlt ticket update ${ticketId} --priority <P0|P1|P2|P3> --category <category>${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
104
104
|
],
|
|
105
|
-
}]);
|
|
105
|
+
}], jsonModeConfig);
|
|
106
106
|
if (updateType === 'priority' || updateType === 'both') {
|
|
107
|
-
const { priority } = await
|
|
107
|
+
const { priority } = await this.prompt([{
|
|
108
108
|
type: 'list',
|
|
109
109
|
name: 'priority',
|
|
110
110
|
message: 'Set priority to:',
|
|
111
111
|
choices: [
|
|
112
|
-
{ name: `(Keep existing: ${ticket.priority || 'none'})`, value: null },
|
|
113
|
-
...PRIORITIES.map(p => ({ name: PRIORITY_LABELS[p], value: p })),
|
|
114
|
-
{ name: 'None (clear priority)', value: '' },
|
|
112
|
+
{ name: `(Keep existing: ${ticket.priority || 'none'})`, value: null, command: '' },
|
|
113
|
+
...PRIORITIES.map(p => ({ name: PRIORITY_LABELS[p], value: p, command: `prlt ticket update ${ticketId} --priority ${p}${projectId ? ` -P ${projectId}` : ''} --json` })),
|
|
114
|
+
{ name: 'None (clear priority)', value: '', command: `prlt ticket update ${ticketId} --priority none${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
115
115
|
],
|
|
116
|
-
}]);
|
|
116
|
+
}], jsonModeConfig);
|
|
117
117
|
if (priority !== null) {
|
|
118
118
|
updatePriority = priority;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
if (updateType === 'category' || updateType === 'both') {
|
|
122
|
-
const { categoryChoice } = await
|
|
122
|
+
const { categoryChoice } = await this.prompt([{
|
|
123
123
|
type: 'list',
|
|
124
124
|
name: 'categoryChoice',
|
|
125
125
|
message: 'Set category to:',
|
|
126
126
|
choices: [
|
|
127
|
-
{ name: `(Keep existing: ${ticket.category || 'none'})`, value: null },
|
|
128
|
-
{ name: 'feature', value: 'feature' },
|
|
129
|
-
{ name: 'bug', value: 'bug' },
|
|
130
|
-
{ name: 'refactor', value: 'refactor' },
|
|
131
|
-
{ name: 'docs', value: 'docs' },
|
|
132
|
-
{ name: 'test', value: 'test' },
|
|
133
|
-
{ name: 'chore', value: 'chore' },
|
|
134
|
-
{ name: 'None (clear category)', value: '' },
|
|
135
|
-
{ name: 'Custom...', value: '__custom__' },
|
|
127
|
+
{ name: `(Keep existing: ${ticket.category || 'none'})`, value: null, command: '' },
|
|
128
|
+
{ name: 'feature', value: 'feature', command: `prlt ticket update ${ticketId} --category feature${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
129
|
+
{ name: 'bug', value: 'bug', command: `prlt ticket update ${ticketId} --category bug${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
130
|
+
{ name: 'refactor', value: 'refactor', command: `prlt ticket update ${ticketId} --category refactor${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
131
|
+
{ name: 'docs', value: 'docs', command: `prlt ticket update ${ticketId} --category docs${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
132
|
+
{ name: 'test', value: 'test', command: `prlt ticket update ${ticketId} --category test${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
133
|
+
{ name: 'chore', value: 'chore', command: `prlt ticket update ${ticketId} --category chore${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
134
|
+
{ name: 'None (clear category)', value: '', command: `prlt ticket update ${ticketId} --category none${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
135
|
+
{ name: 'Custom...', value: '__custom__', command: `prlt ticket update ${ticketId} --category <category>${projectId ? ` -P ${projectId}` : ''} --json` },
|
|
136
136
|
],
|
|
137
|
-
}]);
|
|
137
|
+
}], jsonModeConfig);
|
|
138
138
|
if (categoryChoice === '__custom__') {
|
|
139
|
-
const { customCategory } = await
|
|
139
|
+
const { customCategory } = await this.prompt([{
|
|
140
140
|
type: 'input',
|
|
141
141
|
name: 'customCategory',
|
|
142
142
|
message: 'Enter custom category:',
|
|
143
143
|
validate: (input) => input.length > 0 || 'Category is required',
|
|
144
|
-
}]);
|
|
144
|
+
}], jsonModeConfig);
|
|
145
145
|
updateCategory = customCategory;
|
|
146
146
|
}
|
|
147
147
|
else if (categoryChoice !== null) {
|
|
@@ -175,9 +175,11 @@ export default class TicketUpdate extends PMOCommand {
|
|
|
175
175
|
this.log(styles.muted(` ${updates.join(', ')}`));
|
|
176
176
|
}
|
|
177
177
|
async executeBulk(allTickets, flags) {
|
|
178
|
+
const jsonMode = shouldOutputJson(flags);
|
|
179
|
+
const jsonModeConfig = jsonMode ? { flags: flags, commandName: 'ticket update' } : null;
|
|
178
180
|
this.log(styles.emphasis('✏️ Update Multiple Tickets\n'));
|
|
179
181
|
// Select tickets to update
|
|
180
|
-
const { selectedTickets } = await
|
|
182
|
+
const { selectedTickets } = await this.prompt([{
|
|
181
183
|
type: 'checkbox',
|
|
182
184
|
name: 'selectedTickets',
|
|
183
185
|
message: 'Select tickets to update:',
|
|
@@ -185,7 +187,7 @@ export default class TicketUpdate extends PMOCommand {
|
|
|
185
187
|
name: `${t.id} - ${t.title} [P:${t.priority || 'none'} C:${t.category || 'none'}]`,
|
|
186
188
|
value: t.id,
|
|
187
189
|
})),
|
|
188
|
-
}]);
|
|
190
|
+
}], jsonModeConfig);
|
|
189
191
|
if (selectedTickets.length === 0) {
|
|
190
192
|
this.log(styles.muted('No tickets selected.'));
|
|
191
193
|
return;
|
|
@@ -195,55 +197,55 @@ export default class TicketUpdate extends PMOCommand {
|
|
|
195
197
|
let updateCategory = flags.category;
|
|
196
198
|
if (!updatePriority && !updateCategory) {
|
|
197
199
|
// Ask what to update
|
|
198
|
-
const { updateType } = await
|
|
200
|
+
const { updateType } = await this.prompt([{
|
|
199
201
|
type: 'list',
|
|
200
202
|
name: 'updateType',
|
|
201
203
|
message: 'What would you like to update?',
|
|
202
204
|
choices: [
|
|
203
|
-
{ name: 'Priority', value: 'priority' },
|
|
204
|
-
{ name: 'Category', value: 'category' },
|
|
205
|
-
{ name: 'Both', value: 'both' },
|
|
205
|
+
{ name: 'Priority', value: 'priority', command: 'prlt ticket update --bulk --priority <P0|P1|P2|P3> --json' },
|
|
206
|
+
{ name: 'Category', value: 'category', command: 'prlt ticket update --bulk --category <category> --json' },
|
|
207
|
+
{ name: 'Both', value: 'both', command: 'prlt ticket update --bulk --priority <P0|P1|P2|P3> --category <category> --json' },
|
|
206
208
|
],
|
|
207
|
-
}]);
|
|
209
|
+
}], jsonModeConfig);
|
|
208
210
|
if (updateType === 'priority' || updateType === 'both') {
|
|
209
|
-
const { priority } = await
|
|
211
|
+
const { priority } = await this.prompt([{
|
|
210
212
|
type: 'list',
|
|
211
213
|
name: 'priority',
|
|
212
214
|
message: 'Set priority to:',
|
|
213
215
|
choices: [
|
|
214
|
-
{ name: '(Keep existing)', value: null },
|
|
215
|
-
...PRIORITIES.map(p => ({ name: PRIORITY_LABELS[p], value: p })),
|
|
216
|
-
{ name: 'None (clear priority)', value: '' },
|
|
216
|
+
{ name: '(Keep existing)', value: null, command: '' },
|
|
217
|
+
...PRIORITIES.map(p => ({ name: PRIORITY_LABELS[p], value: p, command: `prlt ticket update --bulk --priority ${p} --json` })),
|
|
218
|
+
{ name: 'None (clear priority)', value: '', command: 'prlt ticket update --bulk --priority none --json' },
|
|
217
219
|
],
|
|
218
|
-
}]);
|
|
220
|
+
}], jsonModeConfig);
|
|
219
221
|
if (priority !== null) {
|
|
220
222
|
updatePriority = priority;
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
if (updateType === 'category' || updateType === 'both') {
|
|
224
|
-
const { categoryChoice } = await
|
|
226
|
+
const { categoryChoice } = await this.prompt([{
|
|
225
227
|
type: 'list',
|
|
226
228
|
name: 'categoryChoice',
|
|
227
229
|
message: 'Set category to:',
|
|
228
230
|
choices: [
|
|
229
|
-
{ name: '(Keep existing)', value: null },
|
|
230
|
-
{ name: 'feature', value: 'feature' },
|
|
231
|
-
{ name: 'bug', value: 'bug' },
|
|
232
|
-
{ name: 'refactor', value: 'refactor' },
|
|
233
|
-
{ name: 'docs', value: 'docs' },
|
|
234
|
-
{ name: 'test', value: 'test' },
|
|
235
|
-
{ name: 'chore', value: 'chore' },
|
|
236
|
-
{ name: 'None (clear category)', value: '' },
|
|
237
|
-
{ name: 'Custom...', value: '__custom__' },
|
|
231
|
+
{ name: '(Keep existing)', value: null, command: '' },
|
|
232
|
+
{ name: 'feature', value: 'feature', command: 'prlt ticket update --bulk --category feature --json' },
|
|
233
|
+
{ name: 'bug', value: 'bug', command: 'prlt ticket update --bulk --category bug --json' },
|
|
234
|
+
{ name: 'refactor', value: 'refactor', command: 'prlt ticket update --bulk --category refactor --json' },
|
|
235
|
+
{ name: 'docs', value: 'docs', command: 'prlt ticket update --bulk --category docs --json' },
|
|
236
|
+
{ name: 'test', value: 'test', command: 'prlt ticket update --bulk --category test --json' },
|
|
237
|
+
{ name: 'chore', value: 'chore', command: 'prlt ticket update --bulk --category chore --json' },
|
|
238
|
+
{ name: 'None (clear category)', value: '', command: 'prlt ticket update --bulk --category none --json' },
|
|
239
|
+
{ name: 'Custom...', value: '__custom__', command: 'prlt ticket update --bulk --category <category> --json' },
|
|
238
240
|
],
|
|
239
|
-
}]);
|
|
241
|
+
}], jsonModeConfig);
|
|
240
242
|
if (categoryChoice === '__custom__') {
|
|
241
|
-
const { customCategory } = await
|
|
243
|
+
const { customCategory } = await this.prompt([{
|
|
242
244
|
type: 'input',
|
|
243
245
|
name: 'customCategory',
|
|
244
246
|
message: 'Enter custom category:',
|
|
245
247
|
validate: (input) => input.length > 0 || 'Category is required',
|
|
246
|
-
}]);
|
|
248
|
+
}], jsonModeConfig);
|
|
247
249
|
updateCategory = customCategory;
|
|
248
250
|
}
|
|
249
251
|
else if (categoryChoice !== null) {
|
|
@@ -271,16 +273,16 @@ export default class TicketUpdate extends PMOCommand {
|
|
|
271
273
|
this.log(styles.primary(` • ${ticketId}: ${ticket?.title}`));
|
|
272
274
|
}
|
|
273
275
|
this.log('');
|
|
274
|
-
const { confirm } = await
|
|
276
|
+
const { confirm } = await this.prompt([{
|
|
275
277
|
type: 'list',
|
|
276
278
|
name: 'confirm',
|
|
277
279
|
message: 'Continue?',
|
|
278
280
|
choices: [
|
|
279
|
-
{ name: 'No, cancel', value: false },
|
|
280
|
-
{ name: 'Yes, update tickets', value: true }
|
|
281
|
+
{ name: 'No, cancel', value: false, command: '' },
|
|
282
|
+
{ name: 'Yes, update tickets', value: true, command: 'prlt ticket update --bulk --force --json' }
|
|
281
283
|
],
|
|
282
284
|
default: 0
|
|
283
|
-
}]);
|
|
285
|
+
}], jsonModeConfig);
|
|
284
286
|
if (!confirm) {
|
|
285
287
|
this.log(styles.muted('Operation cancelled.'));
|
|
286
288
|
return;
|
package/dist/commands/whoami.js
CHANGED
|
@@ -10,6 +10,7 @@ export default class Whoami extends Command {
|
|
|
10
10
|
'<%= config.bin %> <%= command.id %>',
|
|
11
11
|
];
|
|
12
12
|
async run() {
|
|
13
|
+
await this.parse(Whoami);
|
|
13
14
|
const isDevcontainer = process.env.DEVCONTAINER === 'true';
|
|
14
15
|
const agentName = this.detectAgentName();
|
|
15
16
|
const repoName = this.detectRepoName();
|
|
@@ -2,7 +2,6 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
4
|
import Database from 'better-sqlite3';
|
|
5
|
-
import inquirer from 'inquirer';
|
|
6
5
|
import { PMOCommand, pmoBaseFlags, autoExportToBoard } from '../../lib/pmo/index.js';
|
|
7
6
|
import { getWorkColumnSetting, findColumnByName } from '../../lib/pmo/utils.js';
|
|
8
7
|
import { styles } from '../../lib/styles.js';
|
|
@@ -134,7 +133,8 @@ export default class WorkReady extends PMOCommand {
|
|
|
134
133
|
}
|
|
135
134
|
// Handle PR creation
|
|
136
135
|
let prUrl;
|
|
137
|
-
const
|
|
136
|
+
const jsonModeConfig = jsonMode ? { flags: flags, commandName: 'work ready' } : null;
|
|
137
|
+
const shouldCreatePR = flags.pr || flags['draft-pr'] || (!flags['no-pr'] && await this.shouldOfferPRCreation(jsonModeConfig));
|
|
138
138
|
if (shouldCreatePR) {
|
|
139
139
|
// Get branch and worktree path from the execution record
|
|
140
140
|
const branch = runningExecution?.branch;
|
|
@@ -191,7 +191,7 @@ export default class WorkReady extends PMOCommand {
|
|
|
191
191
|
/**
|
|
192
192
|
* Check if we should offer PR creation (gh is available, on a feature branch, etc.)
|
|
193
193
|
*/
|
|
194
|
-
async shouldOfferPRCreation() {
|
|
194
|
+
async shouldOfferPRCreation(jsonModeConfig) {
|
|
195
195
|
// Check if gh CLI is available
|
|
196
196
|
if (!isGHInstalled() || !isGHAuthenticated()) {
|
|
197
197
|
return false;
|
|
@@ -212,16 +212,16 @@ export default class WorkReady extends PMOCommand {
|
|
|
212
212
|
return false;
|
|
213
213
|
}
|
|
214
214
|
// Prompt user
|
|
215
|
-
const { createPR: wantPR } = await
|
|
215
|
+
const { createPR: wantPR } = await this.prompt([{
|
|
216
216
|
type: 'list',
|
|
217
217
|
name: 'createPR',
|
|
218
218
|
message: 'Create a pull request for this work?',
|
|
219
219
|
choices: [
|
|
220
|
-
{ name: 'Yes', value: true },
|
|
221
|
-
{ name: 'No', value: false },
|
|
220
|
+
{ name: 'Yes', value: true, command: 'prlt work ready --pr --json' },
|
|
221
|
+
{ name: 'No', value: false, command: 'prlt work ready --no-pr --json' },
|
|
222
222
|
],
|
|
223
223
|
default: true,
|
|
224
|
-
}]);
|
|
224
|
+
}], jsonModeConfig);
|
|
225
225
|
return wantPR;
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
@@ -2,7 +2,6 @@ import { Args, 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
|
-
import inquirer from 'inquirer';
|
|
6
5
|
import Database from 'better-sqlite3';
|
|
7
6
|
import { PMOCommand, pmoBaseFlags, autoExportToBoard } from '../../lib/pmo/index.js';
|
|
8
7
|
import { getWorkColumnSetting, findColumnByName } from '../../lib/pmo/utils.js';
|
|
@@ -122,7 +121,8 @@ export default class WorkRevise extends PMOCommand {
|
|
|
122
121
|
this.log(styles.muted('Use "prlt work start" for new work.'));
|
|
123
122
|
return;
|
|
124
123
|
}
|
|
125
|
-
const {
|
|
124
|
+
const jsonModeConfig = jsonMode ? { flags: flags, commandName: 'work revise' } : null;
|
|
125
|
+
const { selectedTicketId } = await this.prompt([
|
|
126
126
|
{
|
|
127
127
|
type: 'list',
|
|
128
128
|
name: 'selectedTicketId',
|
|
@@ -130,9 +130,10 @@ export default class WorkRevise extends PMOCommand {
|
|
|
130
130
|
choices: reviewTickets.map((t) => ({
|
|
131
131
|
name: `${t.id} - ${t.title}`,
|
|
132
132
|
value: t.id,
|
|
133
|
+
command: `prlt work revise ${t.id} --json`,
|
|
133
134
|
})),
|
|
134
135
|
},
|
|
135
|
-
]);
|
|
136
|
+
], jsonModeConfig);
|
|
136
137
|
ticketId = selectedTicketId;
|
|
137
138
|
}
|
|
138
139
|
// Get ticket
|
|
@@ -226,20 +227,21 @@ export default class WorkRevise extends PMOCommand {
|
|
|
226
227
|
let environment = 'host';
|
|
227
228
|
let displayMode = 'terminal';
|
|
228
229
|
let sandboxed = false;
|
|
230
|
+
const reviseJsonModeConfig = jsonMode ? { flags: flags, commandName: 'work revise' } : null;
|
|
229
231
|
if (hasDevcontainer && !flags['run-on-host']) {
|
|
230
232
|
environment = 'devcontainer';
|
|
231
|
-
const { selectedDisplay } = await
|
|
233
|
+
const { selectedDisplay } = await this.prompt([
|
|
232
234
|
{
|
|
233
235
|
type: 'list',
|
|
234
236
|
name: 'selectedDisplay',
|
|
235
237
|
message: 'How should the agent output be displayed?',
|
|
236
238
|
choices: [
|
|
237
|
-
{ name: 'terminal - New terminal window', value: 'terminal' },
|
|
238
|
-
{ name: 'background - Runs detached, reattach with: prlt session attach', value: 'background' },
|
|
239
|
+
{ name: 'terminal - New terminal window', value: 'terminal', command: `prlt work revise ${ticketId} --mode terminal --json` },
|
|
240
|
+
{ name: 'background - Runs detached, reattach with: prlt session attach', value: 'background', command: `prlt work revise ${ticketId} --mode background --json` },
|
|
239
241
|
],
|
|
240
242
|
default: 'terminal',
|
|
241
243
|
},
|
|
242
|
-
]);
|
|
244
|
+
], reviseJsonModeConfig);
|
|
243
245
|
displayMode = selectedDisplay;
|
|
244
246
|
}
|
|
245
247
|
else if (flags.mode) {
|
|
@@ -247,18 +249,18 @@ export default class WorkRevise extends PMOCommand {
|
|
|
247
249
|
displayMode = flags.mode;
|
|
248
250
|
}
|
|
249
251
|
// Permission mode
|
|
250
|
-
const { permissionMode } = await
|
|
252
|
+
const { permissionMode } = await this.prompt([
|
|
251
253
|
{
|
|
252
254
|
type: 'list',
|
|
253
255
|
name: 'permissionMode',
|
|
254
256
|
message: 'Permission mode for Claude Code:',
|
|
255
257
|
choices: [
|
|
256
|
-
{ name: 'danger - Skip permission checks (faster for revisions)', value: 'danger' },
|
|
257
|
-
{ name: 'safe - Requires approval for dangerous operations', value: 'safe' },
|
|
258
|
+
{ name: 'danger - Skip permission checks (faster for revisions)', value: 'danger', command: `prlt work revise ${ticketId} --json` },
|
|
259
|
+
{ name: 'safe - Requires approval for dangerous operations', value: 'safe', command: `prlt work revise ${ticketId} --json` },
|
|
258
260
|
],
|
|
259
261
|
default: 'danger',
|
|
260
262
|
},
|
|
261
|
-
]);
|
|
263
|
+
], reviseJsonModeConfig);
|
|
262
264
|
sandboxed = permissionMode === 'safe';
|
|
263
265
|
const executor = flags.executor || DEFAULT_EXECUTION_CONFIG.defaultExecutor;
|
|
264
266
|
// Show execution info
|