popeye-cli 1.0.0
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/.env.example +25 -0
- package/.prettierrc +8 -0
- package/README.md +320 -0
- package/dist/adapters/claude.d.ts +82 -0
- package/dist/adapters/claude.d.ts.map +1 -0
- package/dist/adapters/claude.js +230 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/openai.d.ts +48 -0
- package/dist/adapters/openai.d.ts.map +1 -0
- package/dist/adapters/openai.js +257 -0
- package/dist/adapters/openai.js.map +1 -0
- package/dist/auth/claude.d.ts +44 -0
- package/dist/auth/claude.d.ts.map +1 -0
- package/dist/auth/claude.js +139 -0
- package/dist/auth/claude.js.map +1 -0
- package/dist/auth/index.d.ts +61 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +141 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/keychain.d.ts +66 -0
- package/dist/auth/keychain.d.ts.map +1 -0
- package/dist/auth/keychain.js +125 -0
- package/dist/auth/keychain.js.map +1 -0
- package/dist/auth/openai-entry.d.ts +9 -0
- package/dist/auth/openai-entry.d.ts.map +1 -0
- package/dist/auth/openai-entry.js +410 -0
- package/dist/auth/openai-entry.js.map +1 -0
- package/dist/auth/openai.d.ts +71 -0
- package/dist/auth/openai.d.ts.map +1 -0
- package/dist/auth/openai.js +212 -0
- package/dist/auth/openai.js.map +1 -0
- package/dist/auth/server.d.ts +32 -0
- package/dist/auth/server.d.ts.map +1 -0
- package/dist/auth/server.js +213 -0
- package/dist/auth/server.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +10 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +162 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/config.d.ts +10 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +215 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/create.d.ts +10 -0
- package/dist/cli/commands/create.d.ts.map +1 -0
- package/dist/cli/commands/create.js +240 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/index.d.ts +10 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +10 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +18 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +241 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/status.d.ts +18 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +154 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +71 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/interactive.d.ts +9 -0
- package/dist/cli/interactive.d.ts.map +1 -0
- package/dist/cli/interactive.js +330 -0
- package/dist/cli/interactive.js.map +1 -0
- package/dist/cli/output.d.ts +182 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +355 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/config/defaults.d.ts +57 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +103 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.d.ts +138 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +244 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/schema.d.ts +220 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +141 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/generators/index.d.ts +101 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +200 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/generators/python.d.ts +48 -0
- package/dist/generators/python.d.ts.map +1 -0
- package/dist/generators/python.js +262 -0
- package/dist/generators/python.js.map +1 -0
- package/dist/generators/templates/index.d.ts +6 -0
- package/dist/generators/templates/index.d.ts.map +1 -0
- package/dist/generators/templates/index.js +6 -0
- package/dist/generators/templates/index.js.map +1 -0
- package/dist/generators/templates/python.d.ts +53 -0
- package/dist/generators/templates/python.d.ts.map +1 -0
- package/dist/generators/templates/python.js +454 -0
- package/dist/generators/templates/python.js.map +1 -0
- package/dist/generators/templates/typescript.d.ts +53 -0
- package/dist/generators/templates/typescript.d.ts.map +1 -0
- package/dist/generators/templates/typescript.js +394 -0
- package/dist/generators/templates/typescript.js.map +1 -0
- package/dist/generators/typescript.d.ts +64 -0
- package/dist/generators/typescript.d.ts.map +1 -0
- package/dist/generators/typescript.js +271 -0
- package/dist/generators/typescript.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/state/index.d.ts +168 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +338 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/persistence.d.ts +91 -0
- package/dist/state/persistence.d.ts.map +1 -0
- package/dist/state/persistence.js +201 -0
- package/dist/state/persistence.js.map +1 -0
- package/dist/types/cli.d.ts +132 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +17 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/types/consensus.d.ts +111 -0
- package/dist/types/consensus.d.ts.map +1 -0
- package/dist/types/consensus.js +29 -0
- package/dist/types/consensus.js.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +13 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/project.d.ts +73 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +55 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/workflow.d.ts +236 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workflow.js +74 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/workflow/consensus.d.ts +89 -0
- package/dist/workflow/consensus.d.ts.map +1 -0
- package/dist/workflow/consensus.js +220 -0
- package/dist/workflow/consensus.js.map +1 -0
- package/dist/workflow/execution-mode.d.ts +82 -0
- package/dist/workflow/execution-mode.d.ts.map +1 -0
- package/dist/workflow/execution-mode.js +346 -0
- package/dist/workflow/execution-mode.js.map +1 -0
- package/dist/workflow/index.d.ts +110 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +283 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/plan-mode.d.ts +83 -0
- package/dist/workflow/plan-mode.d.ts.map +1 -0
- package/dist/workflow/plan-mode.js +241 -0
- package/dist/workflow/plan-mode.js.map +1 -0
- package/dist/workflow/test-runner.d.ts +87 -0
- package/dist/workflow/test-runner.d.ts.map +1 -0
- package/dist/workflow/test-runner.js +273 -0
- package/dist/workflow/test-runner.js.map +1 -0
- package/eslint.config.js +25 -0
- package/package.json +66 -0
- package/src/adapters/claude.ts +298 -0
- package/src/adapters/openai.ts +300 -0
- package/src/auth/claude.ts +166 -0
- package/src/auth/index.ts +171 -0
- package/src/auth/keychain.ts +138 -0
- package/src/auth/openai-entry.ts +410 -0
- package/src/auth/openai.ts +260 -0
- package/src/auth/server.ts +252 -0
- package/src/cli/commands/auth.ts +194 -0
- package/src/cli/commands/config.ts +241 -0
- package/src/cli/commands/create.ts +308 -0
- package/src/cli/commands/index.ts +10 -0
- package/src/cli/commands/resume.ts +304 -0
- package/src/cli/commands/status.ts +189 -0
- package/src/cli/index.ts +90 -0
- package/src/cli/interactive.ts +418 -0
- package/src/cli/output.ts +410 -0
- package/src/config/defaults.ts +114 -0
- package/src/config/index.ts +315 -0
- package/src/config/schema.ts +164 -0
- package/src/generators/index.ts +251 -0
- package/src/generators/python.ts +318 -0
- package/src/generators/templates/index.ts +6 -0
- package/src/generators/templates/python.ts +465 -0
- package/src/generators/templates/typescript.ts +417 -0
- package/src/generators/typescript.ts +340 -0
- package/src/index.ts +13 -0
- package/src/state/index.ts +454 -0
- package/src/state/persistence.ts +230 -0
- package/src/types/cli.ts +146 -0
- package/src/types/consensus.ts +116 -0
- package/src/types/index.ts +64 -0
- package/src/types/project.ts +85 -0
- package/src/types/workflow.ts +149 -0
- package/src/workflow/consensus.ts +299 -0
- package/src/workflow/execution-mode.ts +517 -0
- package/src/workflow/index.ts +396 -0
- package/src/workflow/plan-mode.ts +356 -0
- package/src/workflow/test-runner.ts +345 -0
- package/tests/adapters/openai.test.ts +145 -0
- package/tests/config/config.test.ts +208 -0
- package/tests/generators/generators.test.ts +185 -0
- package/tests/types/consensus.test.ts +152 -0
- package/tests/types/project.test.ts +134 -0
- package/tests/workflow/consensus.test.ts +221 -0
- package/tests/workflow/test-runner.test.ts +214 -0
- package/tsconfig.json +25 -0
- package/vitest.config.ts +22 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI output utilities
|
|
3
|
+
* Handles formatted output, spinners, and progress display
|
|
4
|
+
*/
|
|
5
|
+
import { type Ora } from 'ora';
|
|
6
|
+
import type { ProjectState, Milestone, Task } from '../types/workflow.js';
|
|
7
|
+
import type { ConsensusResult } from '../types/consensus.js';
|
|
8
|
+
import type { TestResult } from '../workflow/test-runner.js';
|
|
9
|
+
/**
|
|
10
|
+
* Output theme colors
|
|
11
|
+
*/
|
|
12
|
+
export declare const theme: {
|
|
13
|
+
primary: import("chalk").ChalkInstance;
|
|
14
|
+
secondary: import("chalk").ChalkInstance;
|
|
15
|
+
success: import("chalk").ChalkInstance;
|
|
16
|
+
warning: import("chalk").ChalkInstance;
|
|
17
|
+
error: import("chalk").ChalkInstance;
|
|
18
|
+
info: import("chalk").ChalkInstance;
|
|
19
|
+
highlight: import("chalk").ChalkInstance;
|
|
20
|
+
dim: import("chalk").ChalkInstance;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Start a spinner with a message
|
|
24
|
+
*
|
|
25
|
+
* @param message - Initial message
|
|
26
|
+
* @returns Spinner instance
|
|
27
|
+
*/
|
|
28
|
+
export declare function startSpinner(message: string): Ora;
|
|
29
|
+
/**
|
|
30
|
+
* Update spinner message
|
|
31
|
+
*
|
|
32
|
+
* @param message - New message
|
|
33
|
+
*/
|
|
34
|
+
export declare function updateSpinner(message: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Stop spinner with success
|
|
37
|
+
*
|
|
38
|
+
* @param message - Success message
|
|
39
|
+
*/
|
|
40
|
+
export declare function succeedSpinner(message?: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Stop spinner with failure
|
|
43
|
+
*
|
|
44
|
+
* @param message - Failure message
|
|
45
|
+
*/
|
|
46
|
+
export declare function failSpinner(message?: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Stop spinner without status
|
|
49
|
+
*/
|
|
50
|
+
export declare function stopSpinner(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Print a header
|
|
53
|
+
*
|
|
54
|
+
* @param title - Header title
|
|
55
|
+
*/
|
|
56
|
+
export declare function printHeader(title: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Print a section header
|
|
59
|
+
*
|
|
60
|
+
* @param title - Section title
|
|
61
|
+
*/
|
|
62
|
+
export declare function printSection(title: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Print a success message
|
|
65
|
+
*
|
|
66
|
+
* @param message - Success message
|
|
67
|
+
*/
|
|
68
|
+
export declare function printSuccess(message: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Print a warning message
|
|
71
|
+
*
|
|
72
|
+
* @param message - Warning message
|
|
73
|
+
*/
|
|
74
|
+
export declare function printWarning(message: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Print an error message
|
|
77
|
+
*
|
|
78
|
+
* @param message - Error message
|
|
79
|
+
*/
|
|
80
|
+
export declare function printError(message: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Print an info message
|
|
83
|
+
*
|
|
84
|
+
* @param message - Info message
|
|
85
|
+
*/
|
|
86
|
+
export declare function printInfo(message: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* Print a key-value pair
|
|
89
|
+
*
|
|
90
|
+
* @param key - Key
|
|
91
|
+
* @param value - Value
|
|
92
|
+
*/
|
|
93
|
+
export declare function printKeyValue(key: string, value: string | number | boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
* Print a list item
|
|
96
|
+
*
|
|
97
|
+
* @param item - List item
|
|
98
|
+
* @param indent - Indentation level
|
|
99
|
+
*/
|
|
100
|
+
export declare function printListItem(item: string, indent?: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* Print project state summary
|
|
103
|
+
*
|
|
104
|
+
* @param state - Project state
|
|
105
|
+
*/
|
|
106
|
+
export declare function printProjectState(state: ProjectState): void;
|
|
107
|
+
/**
|
|
108
|
+
* Print milestone summary
|
|
109
|
+
*
|
|
110
|
+
* @param milestone - Milestone
|
|
111
|
+
*/
|
|
112
|
+
export declare function printMilestone(milestone: Milestone): void;
|
|
113
|
+
/**
|
|
114
|
+
* Print task summary
|
|
115
|
+
*
|
|
116
|
+
* @param task - Task
|
|
117
|
+
* @param indent - Indentation level
|
|
118
|
+
*/
|
|
119
|
+
export declare function printTask(task: Task, indent?: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Print consensus result
|
|
122
|
+
*
|
|
123
|
+
* @param result - Consensus result
|
|
124
|
+
*/
|
|
125
|
+
export declare function printConsensusResult(result: ConsensusResult): void;
|
|
126
|
+
/**
|
|
127
|
+
* Print test result
|
|
128
|
+
*
|
|
129
|
+
* @param result - Test result
|
|
130
|
+
*/
|
|
131
|
+
export declare function printTestResult(result: TestResult): void;
|
|
132
|
+
/**
|
|
133
|
+
* Print progress bar
|
|
134
|
+
*
|
|
135
|
+
* @param current - Current value
|
|
136
|
+
* @param total - Total value
|
|
137
|
+
* @param label - Label
|
|
138
|
+
*/
|
|
139
|
+
export declare function printProgress(current: number, total: number, label?: string): void;
|
|
140
|
+
/**
|
|
141
|
+
* Print authentication status
|
|
142
|
+
*
|
|
143
|
+
* @param status - Authentication status
|
|
144
|
+
*/
|
|
145
|
+
export declare function printAuthStatus(status: {
|
|
146
|
+
claude: {
|
|
147
|
+
authenticated: boolean;
|
|
148
|
+
user?: string;
|
|
149
|
+
};
|
|
150
|
+
openai: {
|
|
151
|
+
authenticated: boolean;
|
|
152
|
+
keyLastFour?: string;
|
|
153
|
+
};
|
|
154
|
+
}): void;
|
|
155
|
+
/**
|
|
156
|
+
* Print help for a command
|
|
157
|
+
*
|
|
158
|
+
* @param command - Command name
|
|
159
|
+
* @param description - Command description
|
|
160
|
+
* @param usage - Usage string
|
|
161
|
+
* @param options - Command options
|
|
162
|
+
*/
|
|
163
|
+
export declare function printHelp(command: string, description: string, usage: string, options?: Array<{
|
|
164
|
+
flag: string;
|
|
165
|
+
description: string;
|
|
166
|
+
}>): void;
|
|
167
|
+
/**
|
|
168
|
+
* Print a table
|
|
169
|
+
*
|
|
170
|
+
* @param headers - Table headers
|
|
171
|
+
* @param rows - Table rows
|
|
172
|
+
*/
|
|
173
|
+
export declare function printTable(headers: string[], rows: string[][]): void;
|
|
174
|
+
/**
|
|
175
|
+
* Clear the console
|
|
176
|
+
*/
|
|
177
|
+
export declare function clearConsole(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Print a blank line
|
|
180
|
+
*/
|
|
181
|
+
export declare function printBlank(): void;
|
|
182
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,U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|
+
/**
|
|
2
|
+
* CLI output utilities
|
|
3
|
+
* Handles formatted output, spinners, and progress display
|
|
4
|
+
*/
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import ora from 'ora';
|
|
7
|
+
/**
|
|
8
|
+
* Output theme colors
|
|
9
|
+
*/
|
|
10
|
+
export const theme = {
|
|
11
|
+
primary: chalk.cyan,
|
|
12
|
+
secondary: chalk.gray,
|
|
13
|
+
success: chalk.green,
|
|
14
|
+
warning: chalk.yellow,
|
|
15
|
+
error: chalk.red,
|
|
16
|
+
info: chalk.blue,
|
|
17
|
+
highlight: chalk.bold.white,
|
|
18
|
+
dim: chalk.dim,
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Spinner instance for progress display
|
|
22
|
+
*/
|
|
23
|
+
let spinner = null;
|
|
24
|
+
/**
|
|
25
|
+
* Start a spinner with a message
|
|
26
|
+
*
|
|
27
|
+
* @param message - Initial message
|
|
28
|
+
* @returns Spinner instance
|
|
29
|
+
*/
|
|
30
|
+
export function startSpinner(message) {
|
|
31
|
+
if (spinner) {
|
|
32
|
+
spinner.stop();
|
|
33
|
+
}
|
|
34
|
+
spinner = ora({
|
|
35
|
+
text: message,
|
|
36
|
+
spinner: 'dots',
|
|
37
|
+
}).start();
|
|
38
|
+
return spinner;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Update spinner message
|
|
42
|
+
*
|
|
43
|
+
* @param message - New message
|
|
44
|
+
*/
|
|
45
|
+
export function updateSpinner(message) {
|
|
46
|
+
if (spinner) {
|
|
47
|
+
spinner.text = message;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Stop spinner with success
|
|
52
|
+
*
|
|
53
|
+
* @param message - Success message
|
|
54
|
+
*/
|
|
55
|
+
export function succeedSpinner(message) {
|
|
56
|
+
if (spinner) {
|
|
57
|
+
spinner.succeed(message);
|
|
58
|
+
spinner = null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Stop spinner with failure
|
|
63
|
+
*
|
|
64
|
+
* @param message - Failure message
|
|
65
|
+
*/
|
|
66
|
+
export function failSpinner(message) {
|
|
67
|
+
if (spinner) {
|
|
68
|
+
spinner.fail(message);
|
|
69
|
+
spinner = null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Stop spinner without status
|
|
74
|
+
*/
|
|
75
|
+
export function stopSpinner() {
|
|
76
|
+
if (spinner) {
|
|
77
|
+
spinner.stop();
|
|
78
|
+
spinner = null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Print a header
|
|
83
|
+
*
|
|
84
|
+
* @param title - Header title
|
|
85
|
+
*/
|
|
86
|
+
export function printHeader(title) {
|
|
87
|
+
console.log();
|
|
88
|
+
console.log(theme.primary.bold(`=== ${title} ===`));
|
|
89
|
+
console.log();
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Print a section header
|
|
93
|
+
*
|
|
94
|
+
* @param title - Section title
|
|
95
|
+
*/
|
|
96
|
+
export function printSection(title) {
|
|
97
|
+
console.log();
|
|
98
|
+
console.log(theme.highlight(`--- ${title} ---`));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Print a success message
|
|
102
|
+
*
|
|
103
|
+
* @param message - Success message
|
|
104
|
+
*/
|
|
105
|
+
export function printSuccess(message) {
|
|
106
|
+
console.log(theme.success(`[OK] ${message}`));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Print a warning message
|
|
110
|
+
*
|
|
111
|
+
* @param message - Warning message
|
|
112
|
+
*/
|
|
113
|
+
export function printWarning(message) {
|
|
114
|
+
console.log(theme.warning(`[WARN] ${message}`));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Print an error message
|
|
118
|
+
*
|
|
119
|
+
* @param message - Error message
|
|
120
|
+
*/
|
|
121
|
+
export function printError(message) {
|
|
122
|
+
console.log(theme.error(`[ERROR] ${message}`));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Print an info message
|
|
126
|
+
*
|
|
127
|
+
* @param message - Info message
|
|
128
|
+
*/
|
|
129
|
+
export function printInfo(message) {
|
|
130
|
+
console.log(theme.info(`[INFO] ${message}`));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Print a key-value pair
|
|
134
|
+
*
|
|
135
|
+
* @param key - Key
|
|
136
|
+
* @param value - Value
|
|
137
|
+
*/
|
|
138
|
+
export function printKeyValue(key, value) {
|
|
139
|
+
console.log(` ${theme.secondary(key + ':')} ${value}`);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Print a list item
|
|
143
|
+
*
|
|
144
|
+
* @param item - List item
|
|
145
|
+
* @param indent - Indentation level
|
|
146
|
+
*/
|
|
147
|
+
export function printListItem(item, indent = 0) {
|
|
148
|
+
const prefix = ' '.repeat(indent) + '- ';
|
|
149
|
+
console.log(theme.secondary(prefix) + item);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Print project state summary
|
|
153
|
+
*
|
|
154
|
+
* @param state - Project state
|
|
155
|
+
*/
|
|
156
|
+
export function printProjectState(state) {
|
|
157
|
+
printHeader(`Project: ${state.name}`);
|
|
158
|
+
printKeyValue('ID', state.id);
|
|
159
|
+
printKeyValue('Language', state.language);
|
|
160
|
+
printKeyValue('Phase', state.phase);
|
|
161
|
+
printKeyValue('Status', state.status);
|
|
162
|
+
printKeyValue('Created', state.createdAt);
|
|
163
|
+
printKeyValue('Updated', state.updatedAt);
|
|
164
|
+
if (state.error) {
|
|
165
|
+
printSection('Error');
|
|
166
|
+
printError(state.error);
|
|
167
|
+
}
|
|
168
|
+
if (state.milestones.length > 0) {
|
|
169
|
+
printSection('Milestones');
|
|
170
|
+
for (const milestone of state.milestones) {
|
|
171
|
+
printMilestone(milestone);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Print milestone summary
|
|
177
|
+
*
|
|
178
|
+
* @param milestone - Milestone
|
|
179
|
+
*/
|
|
180
|
+
export function printMilestone(milestone) {
|
|
181
|
+
const statusIcon = getStatusIcon(milestone.status);
|
|
182
|
+
console.log(`\n ${statusIcon} ${theme.highlight(milestone.name)}`);
|
|
183
|
+
if (milestone.tasks.length > 0) {
|
|
184
|
+
for (const task of milestone.tasks) {
|
|
185
|
+
printTask(task, 2);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Print task summary
|
|
191
|
+
*
|
|
192
|
+
* @param task - Task
|
|
193
|
+
* @param indent - Indentation level
|
|
194
|
+
*/
|
|
195
|
+
export function printTask(task, indent = 0) {
|
|
196
|
+
const statusIcon = getStatusIcon(task.status);
|
|
197
|
+
const prefix = ' '.repeat(indent);
|
|
198
|
+
console.log(`${prefix}${statusIcon} ${task.name}`);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Get status icon
|
|
202
|
+
*
|
|
203
|
+
* @param status - Status
|
|
204
|
+
* @returns Status icon
|
|
205
|
+
*/
|
|
206
|
+
function getStatusIcon(status) {
|
|
207
|
+
switch (status) {
|
|
208
|
+
case 'complete':
|
|
209
|
+
return theme.success('[OK]');
|
|
210
|
+
case 'in-progress':
|
|
211
|
+
return theme.warning('[..]');
|
|
212
|
+
case 'failed':
|
|
213
|
+
return theme.error('[X]');
|
|
214
|
+
default:
|
|
215
|
+
return theme.dim('[ ]');
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Print consensus result
|
|
220
|
+
*
|
|
221
|
+
* @param result - Consensus result
|
|
222
|
+
*/
|
|
223
|
+
export function printConsensusResult(result) {
|
|
224
|
+
const scoreColor = result.score >= 95 ? theme.success :
|
|
225
|
+
result.score >= 80 ? theme.warning : theme.error;
|
|
226
|
+
printSection('Consensus Review');
|
|
227
|
+
console.log(` Score: ${scoreColor(`${result.score}%`)}`);
|
|
228
|
+
console.log(` Status: ${result.approved ? theme.success('APPROVED') : theme.warning('PENDING')}`);
|
|
229
|
+
if (result.strengths && result.strengths.length > 0) {
|
|
230
|
+
console.log();
|
|
231
|
+
console.log(theme.success(' Strengths:'));
|
|
232
|
+
for (const strength of result.strengths.slice(0, 3)) {
|
|
233
|
+
printListItem(strength, 2);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (result.concerns && result.concerns.length > 0) {
|
|
237
|
+
console.log();
|
|
238
|
+
console.log(theme.warning(' Concerns:'));
|
|
239
|
+
for (const concern of result.concerns.slice(0, 3)) {
|
|
240
|
+
printListItem(concern, 2);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Print test result
|
|
246
|
+
*
|
|
247
|
+
* @param result - Test result
|
|
248
|
+
*/
|
|
249
|
+
export function printTestResult(result) {
|
|
250
|
+
printSection('Test Results');
|
|
251
|
+
if (result.error) {
|
|
252
|
+
printError(result.error);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const statusIcon = result.success ? theme.success('[PASS]') : theme.error('[FAIL]');
|
|
256
|
+
console.log(` ${statusIcon} ${result.passed}/${result.total} tests passed`);
|
|
257
|
+
if (result.failedTests && result.failedTests.length > 0) {
|
|
258
|
+
console.log();
|
|
259
|
+
console.log(theme.error(' Failed tests:'));
|
|
260
|
+
for (const test of result.failedTests.slice(0, 5)) {
|
|
261
|
+
printListItem(test, 2);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Print progress bar
|
|
267
|
+
*
|
|
268
|
+
* @param current - Current value
|
|
269
|
+
* @param total - Total value
|
|
270
|
+
* @param label - Label
|
|
271
|
+
*/
|
|
272
|
+
export function printProgress(current, total, label) {
|
|
273
|
+
const percent = total > 0 ? Math.round((current / total) * 100) : 0;
|
|
274
|
+
const barWidth = 30;
|
|
275
|
+
const filled = Math.round((percent / 100) * barWidth);
|
|
276
|
+
const empty = barWidth - filled;
|
|
277
|
+
const bar = theme.success('#'.repeat(filled)) + theme.dim('-'.repeat(empty));
|
|
278
|
+
const percentStr = `${percent}%`.padStart(4);
|
|
279
|
+
console.log(` [${bar}] ${percentStr}${label ? ` - ${label}` : ''}`);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Print authentication status
|
|
283
|
+
*
|
|
284
|
+
* @param status - Authentication status
|
|
285
|
+
*/
|
|
286
|
+
export function printAuthStatus(status) {
|
|
287
|
+
printSection('Authentication Status');
|
|
288
|
+
// Claude status
|
|
289
|
+
const claudeIcon = status.claude.authenticated ? theme.success('[OK]') : theme.error('[X]');
|
|
290
|
+
const claudeInfo = status.claude.user || 'Not authenticated';
|
|
291
|
+
console.log(` ${claudeIcon} Claude CLI: ${claudeInfo}`);
|
|
292
|
+
// OpenAI status
|
|
293
|
+
const openaiIcon = status.openai.authenticated ? theme.success('[OK]') : theme.error('[X]');
|
|
294
|
+
const openaiInfo = status.openai.keyLastFour
|
|
295
|
+
? `Authenticated (****${status.openai.keyLastFour})`
|
|
296
|
+
: 'Not authenticated';
|
|
297
|
+
console.log(` ${openaiIcon} OpenAI API: ${openaiInfo}`);
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Print help for a command
|
|
301
|
+
*
|
|
302
|
+
* @param command - Command name
|
|
303
|
+
* @param description - Command description
|
|
304
|
+
* @param usage - Usage string
|
|
305
|
+
* @param options - Command options
|
|
306
|
+
*/
|
|
307
|
+
export function printHelp(command, description, usage, options) {
|
|
308
|
+
printHeader(command);
|
|
309
|
+
console.log(description);
|
|
310
|
+
console.log();
|
|
311
|
+
console.log(theme.highlight('Usage:'));
|
|
312
|
+
console.log(` ${usage}`);
|
|
313
|
+
if (options && options.length > 0) {
|
|
314
|
+
console.log();
|
|
315
|
+
console.log(theme.highlight('Options:'));
|
|
316
|
+
for (const opt of options) {
|
|
317
|
+
console.log(` ${theme.primary(opt.flag.padEnd(20))} ${opt.description}`);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Print a table
|
|
323
|
+
*
|
|
324
|
+
* @param headers - Table headers
|
|
325
|
+
* @param rows - Table rows
|
|
326
|
+
*/
|
|
327
|
+
export function printTable(headers, rows) {
|
|
328
|
+
// Calculate column widths
|
|
329
|
+
const widths = headers.map((h, i) => {
|
|
330
|
+
const maxRow = Math.max(...rows.map((r) => (r[i] || '').length));
|
|
331
|
+
return Math.max(h.length, maxRow);
|
|
332
|
+
});
|
|
333
|
+
// Print header
|
|
334
|
+
const headerLine = headers.map((h, i) => h.padEnd(widths[i])).join(' ');
|
|
335
|
+
console.log(theme.highlight(headerLine));
|
|
336
|
+
console.log(theme.dim('-'.repeat(headerLine.length)));
|
|
337
|
+
// Print rows
|
|
338
|
+
for (const row of rows) {
|
|
339
|
+
const rowLine = row.map((cell, i) => (cell || '').padEnd(widths[i])).join(' ');
|
|
340
|
+
console.log(rowLine);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Clear the console
|
|
345
|
+
*/
|
|
346
|
+
export function clearConsole() {
|
|
347
|
+
console.clear();
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Print a blank line
|
|
351
|
+
*/
|
|
352
|
+
export function printBlank() {
|
|
353
|
+
console.log();
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAiB,MAAM,KAAK,CAAC;AAKpC;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,IAAI;IACnB,SAAS,EAAE,KAA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Ae;IACf,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAEtD,aAAa;IACb,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default configuration values
|
|
3
|
+
* Matches popeye-cli-spec.md section 9.1 exactly
|
|
4
|
+
*/
|
|
5
|
+
import type { Config } from './schema.js';
|
|
6
|
+
/**
|
|
7
|
+
* Default configuration object
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_CONFIG: Config;
|
|
10
|
+
/**
|
|
11
|
+
* Configuration file names to search for
|
|
12
|
+
*/
|
|
13
|
+
export declare const CONFIG_FILE_NAMES: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Global config directory path
|
|
16
|
+
*/
|
|
17
|
+
export declare const GLOBAL_CONFIG_DIR = ".popeye";
|
|
18
|
+
/**
|
|
19
|
+
* State file name
|
|
20
|
+
*/
|
|
21
|
+
export declare const STATE_FILE_NAME = "state.json";
|
|
22
|
+
/**
|
|
23
|
+
* Config file name in .popeye directory
|
|
24
|
+
*/
|
|
25
|
+
export declare const CONFIG_FILE_NAME = "config.yaml";
|
|
26
|
+
/**
|
|
27
|
+
* Service name for keychain
|
|
28
|
+
*/
|
|
29
|
+
export declare const SERVICE_NAME = "popeye-cli";
|
|
30
|
+
/**
|
|
31
|
+
* Keychain account names
|
|
32
|
+
*/
|
|
33
|
+
export declare const KEYCHAIN_ACCOUNTS: {
|
|
34
|
+
readonly CLAUDE: "claude-cli";
|
|
35
|
+
readonly OPENAI: "openai-api";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Environment variable names
|
|
39
|
+
*/
|
|
40
|
+
export declare const ENV_VARS: {
|
|
41
|
+
readonly OPENAI_KEY: "POPEYE_OPENAI_KEY";
|
|
42
|
+
readonly ANTHROPIC_KEY: "POPEYE_ANTHROPIC_KEY";
|
|
43
|
+
readonly DEFAULT_LANGUAGE: "POPEYE_DEFAULT_LANGUAGE";
|
|
44
|
+
readonly OPENAI_MODEL: "POPEYE_OPENAI_MODEL";
|
|
45
|
+
readonly CONSENSUS_THRESHOLD: "POPEYE_CONSENSUS_THRESHOLD";
|
|
46
|
+
readonly MAX_DISAGREEMENTS: "POPEYE_MAX_DISAGREEMENTS";
|
|
47
|
+
readonly LOG_LEVEL: "POPEYE_LOG_LEVEL";
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* CLI version
|
|
51
|
+
*/
|
|
52
|
+
export declare const CLI_VERSION = "1.0.0";
|
|
53
|
+
/**
|
|
54
|
+
* State file version
|
|
55
|
+
*/
|
|
56
|
+
export declare const STATE_VERSION = "1.0.0";
|
|
57
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAyC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAM7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,eAAe,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;CAQX,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,aAAa,UAAU,CAAC"}
|