@proletariat/cli 0.3.35 → 0.3.40
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/README.md +37 -2
- package/bin/dev.js +0 -0
- package/dist/commands/agent/auth.d.ts +12 -2
- package/dist/commands/agent/auth.js +128 -4
- package/dist/commands/agent/list.js +16 -7
- package/dist/commands/agent/status.js +32 -4
- package/dist/commands/board/watch.js +6 -0
- package/dist/commands/branch/list.d.ts +1 -0
- package/dist/commands/branch/list.js +43 -12
- package/dist/commands/branch/where.js +9 -19
- package/dist/commands/category/list.d.ts +2 -1
- package/dist/commands/category/list.js +38 -13
- package/dist/commands/{claude.d.ts → claude/index.d.ts} +1 -1
- package/dist/commands/{claude.js → claude/index.js} +12 -12
- package/dist/commands/claude/open.d.ts +13 -0
- package/dist/commands/claude/open.js +175 -0
- package/dist/commands/diet.js +18 -2
- package/dist/commands/docker/logs.js +7 -3
- package/dist/commands/docker/shell.js +6 -0
- package/dist/commands/docker/start.js +20 -4
- package/dist/commands/docker/sync.d.ts +4 -0
- package/dist/commands/docker/sync.js +30 -2
- package/dist/commands/epic/show.d.ts +13 -0
- package/dist/commands/epic/show.js +16 -0
- package/dist/commands/epic/ticket.js +7 -24
- package/dist/commands/epic/view.js +27 -0
- package/dist/commands/execution/config.d.ts +0 -4
- package/dist/commands/execution/config.js +14 -46
- package/dist/commands/execution/index.js +2 -1
- package/dist/commands/execution/logs.js +7 -1
- package/dist/commands/execution/stop.js +2 -1
- package/dist/commands/execution/view.js +30 -26
- package/dist/commands/init.js +2 -19
- package/dist/commands/label/create.js +2 -1
- package/dist/commands/label/delete.js +2 -1
- package/dist/commands/label/group/create.js +2 -1
- package/dist/commands/label/group/list.js +2 -1
- package/dist/commands/label/list.js +2 -1
- package/dist/commands/mcp-server.js +27 -1
- package/dist/commands/phase/template/list.js +2 -1
- package/dist/commands/pmo/init.js +12 -40
- package/dist/commands/project/create.js +3 -4
- package/dist/commands/project/update.js +5 -6
- package/dist/commands/pull.js +24 -0
- package/dist/commands/qa/index.d.ts +54 -0
- package/dist/commands/qa/index.js +762 -0
- package/dist/commands/repo/view.js +2 -8
- package/dist/commands/session/attach.js +4 -4
- package/dist/commands/session/create.d.ts +19 -0
- package/dist/commands/session/create.js +102 -0
- package/dist/commands/session/health.js +4 -23
- package/dist/commands/session/index.js +14 -1
- package/dist/commands/session/list.js +9 -8
- package/dist/commands/session/peek.d.ts +38 -0
- package/dist/commands/session/peek.js +316 -0
- package/dist/commands/session/poke.d.ts +27 -0
- package/dist/commands/session/poke.js +219 -0
- package/dist/commands/spec/view.js +29 -0
- package/dist/commands/template/list.js +2 -1
- package/dist/commands/theme/add-names.d.ts +4 -0
- package/dist/commands/theme/add-names.js +11 -1
- package/dist/commands/theme/create.d.ts +2 -0
- package/dist/commands/theme/create.js +8 -0
- package/dist/commands/ticket/bulk.js +2 -2
- package/dist/commands/ticket/complete.js +2 -2
- package/dist/commands/ticket/create.js +21 -0
- package/dist/commands/ticket/delete.js +8 -0
- package/dist/commands/ticket/edit.js +25 -0
- package/dist/commands/ticket/epic.js +17 -43
- package/dist/commands/ticket/index.js +2 -2
- package/dist/commands/ticket/move.js +25 -2
- package/dist/commands/ticket/resolve.js +3 -4
- package/dist/commands/ticket/show.d.ts +13 -0
- package/dist/commands/ticket/show.js +16 -0
- package/dist/commands/ticket/template/list.js +2 -1
- package/dist/commands/ticket/view.d.ts +0 -1
- package/dist/commands/ticket/view.js +30 -1
- package/dist/commands/work/index.js +4 -0
- package/dist/commands/work/spawn-all.js +1 -1
- package/dist/commands/work/spawn.js +15 -4
- package/dist/commands/work/start.js +186 -103
- package/dist/commands/work/status.d.ts +14 -0
- package/dist/commands/work/status.js +60 -0
- package/dist/commands/work/watch.js +1 -1
- package/dist/commands/workflow/index.js +2 -1
- package/dist/commands/workflow/show.d.ts +13 -0
- package/dist/commands/workflow/show.js +16 -0
- package/dist/commands/workspace/add.js +15 -0
- package/dist/commands/workspace/list.js +2 -1
- package/dist/commands/workspace/prune.js +7 -7
- package/dist/hooks/init.js +10 -2
- package/dist/lib/agents/commands.d.ts +5 -0
- package/dist/lib/agents/commands.js +143 -97
- package/dist/lib/branch/index.d.ts +1 -0
- package/dist/lib/database/drizzle-schema.d.ts +465 -0
- package/dist/lib/database/drizzle-schema.js +53 -0
- package/dist/lib/database/index.d.ts +47 -1
- package/dist/lib/database/index.js +138 -20
- package/dist/lib/execution/config.d.ts +15 -1
- package/dist/lib/execution/config.js +28 -0
- package/dist/lib/execution/runners.d.ts +45 -0
- package/dist/lib/execution/runners.js +187 -26
- package/dist/lib/execution/session-utils.d.ts +16 -1
- package/dist/lib/execution/session-utils.js +71 -4
- package/dist/lib/execution/spawner.js +15 -2
- package/dist/lib/execution/storage.d.ts +6 -1
- package/dist/lib/execution/storage.js +35 -5
- package/dist/lib/execution/types.d.ts +3 -0
- package/dist/lib/mcp/tools/board.js +4 -6
- package/dist/lib/mcp/tools/cli-passthrough.js +25 -6
- package/dist/lib/mcp/tools/epic.js +8 -3
- package/dist/lib/mcp/tools/index.d.ts +1 -0
- package/dist/lib/mcp/tools/index.js +1 -0
- package/dist/lib/mcp/tools/spec.js +1 -1
- package/dist/lib/mcp/tools/ticket.js +11 -9
- package/dist/lib/mcp/tools/tmux.d.ts +16 -0
- package/dist/lib/mcp/tools/tmux.js +182 -0
- package/dist/lib/mcp/tools/work.js +148 -6
- package/dist/lib/mcp/types.d.ts +10 -0
- package/dist/lib/multiline-input.js +2 -1
- package/dist/lib/pmo/base-command.js +4 -4
- package/dist/lib/pmo/schema.d.ts +1 -1
- package/dist/lib/pmo/schema.js +1 -0
- package/dist/lib/pmo/storage/actions.js +1 -1
- package/dist/lib/pmo/storage/base.js +402 -50
- package/dist/lib/pmo/storage/dependencies.d.ts +1 -0
- package/dist/lib/pmo/storage/dependencies.js +11 -3
- package/dist/lib/pmo/storage/epics.js +1 -1
- package/dist/lib/pmo/storage/helpers.d.ts +4 -4
- package/dist/lib/pmo/storage/helpers.js +36 -26
- package/dist/lib/pmo/storage/projects.d.ts +2 -0
- package/dist/lib/pmo/storage/projects.js +207 -119
- package/dist/lib/pmo/storage/specs.d.ts +2 -0
- package/dist/lib/pmo/storage/specs.js +274 -188
- package/dist/lib/pmo/storage/tickets.d.ts +2 -0
- package/dist/lib/pmo/storage/tickets.js +350 -290
- package/dist/lib/pmo/storage/types.d.ts +1 -0
- package/dist/lib/pmo/storage/views.d.ts +2 -0
- package/dist/lib/pmo/storage/views.js +183 -130
- package/dist/lib/prompt-command.d.ts +20 -0
- package/dist/lib/prompt-command.js +38 -2
- package/dist/lib/prompt-json.d.ts +41 -4
- package/dist/lib/prompt-json.js +138 -7
- package/dist/lib/styles.d.ts +37 -0
- package/dist/lib/styles.js +73 -0
- package/oclif.manifest.json +4046 -3385
- package/package.json +11 -6
- package/LICENSE +0 -190
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Flags, Args } from '@oclif/core';
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
|
-
import inquirer from 'inquirer';
|
|
5
4
|
import { createBoardContent, createSpecFolders, PMOCommand, pmoBaseFlags, BUILTIN_TEMPLATES } from '../../lib/pmo/index.js';
|
|
6
5
|
import { styles } from '../../lib/styles.js';
|
|
7
6
|
import { slugify } from '../../lib/pmo/utils.js';
|
|
@@ -164,16 +163,16 @@ export default class ProjectCreate extends PMOCommand {
|
|
|
164
163
|
}
|
|
165
164
|
async promptProjectData(fields) {
|
|
166
165
|
// Build inquirer prompts from fields, adding validators and dynamic defaults
|
|
167
|
-
const answers = await
|
|
166
|
+
const answers = await this.prompt(fields.map(field => ({
|
|
168
167
|
...field,
|
|
169
168
|
validate: field.name === 'name'
|
|
170
|
-
? ((input) => input.length > 0 || 'Name is required')
|
|
169
|
+
? ((input) => String(input).length > 0 || 'Name is required')
|
|
171
170
|
: undefined,
|
|
172
171
|
// Dynamic default for id based on name
|
|
173
172
|
default: field.name === 'id'
|
|
174
173
|
? ((answers) => slugify(answers.name))
|
|
175
174
|
: field.default,
|
|
176
|
-
})));
|
|
175
|
+
})), null);
|
|
177
176
|
return {
|
|
178
177
|
name: answers.name,
|
|
179
178
|
id: answers.id || undefined,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
2
|
import { PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
4
3
|
import { styles } from '../../lib/styles.js';
|
|
5
4
|
import { shouldOutputJson, outputPromptAsJson, outputErrorAsJson, outputSuccessAsJson, createMetadata, buildFormPromptConfig, } from '../../lib/prompt-json.js';
|
|
@@ -66,12 +65,12 @@ export default class ProjectUpdate extends PMOCommand {
|
|
|
66
65
|
}, createMetadata('project update', flags));
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
|
-
const { selectedProjectId } = await
|
|
68
|
+
const { selectedProjectId } = await this.prompt([{
|
|
70
69
|
type: 'list',
|
|
71
70
|
name: 'selectedProjectId',
|
|
72
71
|
message: 'Select project to update:',
|
|
73
72
|
choices: projectChoices,
|
|
74
|
-
}]);
|
|
73
|
+
}], null);
|
|
75
74
|
projectId = selectedProjectId;
|
|
76
75
|
}
|
|
77
76
|
// Get the project
|
|
@@ -103,12 +102,12 @@ export default class ProjectUpdate extends PMOCommand {
|
|
|
103
102
|
outputPromptAsJson(buildFormPromptConfig(fields), createMetadata('project update', flags));
|
|
104
103
|
return;
|
|
105
104
|
}
|
|
106
|
-
const answers = await
|
|
105
|
+
const answers = await this.prompt(fields.map(field => ({
|
|
107
106
|
...field,
|
|
108
107
|
validate: field.name === 'name'
|
|
109
|
-
? ((input) => input.length > 0 || 'Name is required')
|
|
108
|
+
? ((input) => String(input).length > 0 || 'Name is required')
|
|
110
109
|
: undefined,
|
|
111
|
-
})));
|
|
110
|
+
})), null);
|
|
112
111
|
newName = answers.name;
|
|
113
112
|
newDescription = answers.description;
|
|
114
113
|
}
|
package/dist/commands/pull.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { PMOCommand, pmoBaseFlags } from '../lib/pmo/base-command.js';
|
|
3
|
+
import { shouldOutputJson } from '../lib/prompt-json.js';
|
|
3
4
|
import { styles, divider } from '../lib/styles.js';
|
|
4
5
|
import { loadDietConfig, formatDietConfig, } from '../lib/pmo/diet.js';
|
|
5
6
|
export default class Pull extends PMOCommand {
|
|
@@ -26,6 +27,7 @@ export default class Pull extends PMOCommand {
|
|
|
26
27
|
};
|
|
27
28
|
async execute() {
|
|
28
29
|
const { flags } = await this.parse(Pull);
|
|
30
|
+
const jsonMode = shouldOutputJson(flags);
|
|
29
31
|
const projectId = await this.requireProject();
|
|
30
32
|
const count = flags.count;
|
|
31
33
|
const dryRun = flags['dry-run'];
|
|
@@ -60,6 +62,28 @@ export default class Pull extends PMOCommand {
|
|
|
60
62
|
const existingReadyTickets = await this.storage.listTickets(projectId, { statusCategory: 'unstarted' });
|
|
61
63
|
// Run the pull algorithm
|
|
62
64
|
const result = await this.runPullAlgorithm(allBacklogTickets, existingReadyTickets, dietConfig, count);
|
|
65
|
+
// JSON output path
|
|
66
|
+
if (jsonMode) {
|
|
67
|
+
this.log(JSON.stringify({
|
|
68
|
+
type: 'success',
|
|
69
|
+
result: {
|
|
70
|
+
dryRun,
|
|
71
|
+
pulled: result.pulled,
|
|
72
|
+
skippedBlocked: result.skippedBlocked,
|
|
73
|
+
skippedCeiling: result.skippedCeiling,
|
|
74
|
+
totalCandidates: result.totalCandidates,
|
|
75
|
+
targetStatus: targetStatus.name,
|
|
76
|
+
}
|
|
77
|
+
}, null, 2));
|
|
78
|
+
// Still move tickets if not dry-run
|
|
79
|
+
if (!dryRun && result.pulled.length > 0) {
|
|
80
|
+
for (const ticket of result.pulled) {
|
|
81
|
+
// eslint-disable-next-line no-await-in-loop -- Sequential moves to maintain ordering
|
|
82
|
+
await this.storage.moveTicket(projectId, ticket.id, targetStatus.name);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
63
87
|
// Display results
|
|
64
88
|
this.displayPullResults(result, dietConfig, targetStatus, dryRun);
|
|
65
89
|
// Move tickets if not dry-run
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PromptCommand } from '../../lib/prompt-command.js';
|
|
2
|
+
export default class QA extends PromptCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static aliases: string[];
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
seed: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
watch: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
environment: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'display-mode': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'permission-mode': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
prompt: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Load the explore-cli action prompt from PMO storage.
|
|
19
|
+
*/
|
|
20
|
+
private getExploreCLIPrompt;
|
|
21
|
+
/**
|
|
22
|
+
* Run seed-explore-data.mjs to pre-populate test data.
|
|
23
|
+
*/
|
|
24
|
+
private runSeedData;
|
|
25
|
+
/**
|
|
26
|
+
* Run in tracked mode - inside an HQ
|
|
27
|
+
* Creates an ephemeral QA agent with full tracking
|
|
28
|
+
*/
|
|
29
|
+
private runTracked;
|
|
30
|
+
/**
|
|
31
|
+
* Run in yolo mode - outside any HQ
|
|
32
|
+
*/
|
|
33
|
+
private runYolo;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve execution environment (devcontainer vs host).
|
|
36
|
+
*/
|
|
37
|
+
private resolveEnvironment;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve display mode.
|
|
40
|
+
*/
|
|
41
|
+
private resolveDisplayMode;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve permission mode. Defaults to danger for QA (container provides isolation).
|
|
44
|
+
*/
|
|
45
|
+
private resolvePermissionMode;
|
|
46
|
+
/**
|
|
47
|
+
* Set up catch-all devcontainer for directories without one.
|
|
48
|
+
*/
|
|
49
|
+
private setupCatchallDevcontainer;
|
|
50
|
+
/**
|
|
51
|
+
* Check if catch-all container image is available.
|
|
52
|
+
*/
|
|
53
|
+
private checkCatchallImage;
|
|
54
|
+
}
|