@msn-control/liftoff 0.3.3 → 0.4.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/README.md +66 -42
- package/assets/locks/frontend/package-lock.json +2217 -0
- package/assets/locks/frontend/package.json +19 -0
- package/assets/locks/node-backend/package-lock.json +4352 -0
- package/assets/locks/node-backend/package.json +32 -0
- package/dist/args.d.ts +9 -1
- package/dist/args.js +113 -33
- package/dist/args.js.map +1 -1
- package/dist/catalogs.d.ts +10 -1
- package/dist/catalogs.js +89 -0
- package/dist/catalogs.js.map +1 -1
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts +5 -0
- package/dist/commands.js +633 -124
- package/dist/commands.js.map +1 -1
- package/dist/file-system.js +89 -5
- package/dist/file-system.js.map +1 -1
- package/dist/framework-adapters.d.ts +15 -0
- package/dist/framework-adapters.js +112 -0
- package/dist/framework-adapters.js.map +1 -0
- package/dist/framework-validation.d.ts +8 -0
- package/dist/framework-validation.js +83 -0
- package/dist/framework-validation.js.map +1 -0
- package/dist/init-filesystem.d.ts +102 -0
- package/dist/init-filesystem.js +762 -0
- package/dist/init-filesystem.js.map +1 -0
- package/dist/interactive.d.ts +5 -1
- package/dist/interactive.js +75 -4
- package/dist/interactive.js.map +1 -1
- package/dist/npm-template-assets.d.ts +3 -0
- package/dist/npm-template-assets.js +32 -0
- package/dist/npm-template-assets.js.map +1 -0
- package/dist/planner.js +62 -3
- package/dist/planner.js.map +1 -1
- package/dist/process-runner.d.ts +28 -0
- package/dist/process-runner.js +80 -0
- package/dist/process-runner.js.map +1 -0
- package/dist/project-dependencies.d.ts +28 -0
- package/dist/project-dependencies.js +163 -0
- package/dist/project-dependencies.js.map +1 -0
- package/dist/published-verifier.d.ts +39 -0
- package/dist/published-verifier.js +173 -0
- package/dist/published-verifier.js.map +1 -0
- package/dist/reconcile.js +4 -1
- package/dist/reconcile.js.map +1 -1
- package/dist/release-identity.d.ts +17 -0
- package/dist/release-identity.js +51 -0
- package/dist/release-identity.js.map +1 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +9 -0
- package/dist/runtime.js.map +1 -0
- package/dist/standard-templates.js +3 -30
- package/dist/standard-templates.js.map +1 -1
- package/dist/templates.d.ts +9 -1
- package/dist/templates.js +110 -46
- package/dist/templates.js.map +1 -1
- package/dist/terminal.d.ts +32 -0
- package/dist/terminal.js +182 -0
- package/dist/terminal.js.map +1 -0
- package/dist/types.d.ts +38 -1
- package/dist/workstation-catalog.d.ts +20 -0
- package/dist/workstation-catalog.js +122 -0
- package/dist/workstation-catalog.js.map +1 -0
- package/dist/workstation.d.ts +76 -0
- package/dist/workstation.js +461 -0
- package/dist/workstation.js.map +1 -0
- package/package.json +10 -2
package/dist/terminal.js
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import picocolors, { createColors } from 'picocolors';
|
|
2
|
+
export const LIFTOFF_WORDMARK = [
|
|
3
|
+
' _ ___ _____ _____ ___ _____ _____',
|
|
4
|
+
'| | |_ _| ___|_ _/ _ \\| ___| ___|',
|
|
5
|
+
'| | | || |_ | || | | | |_ | |_',
|
|
6
|
+
'| |___ | || _| | || |_| | _| | _|',
|
|
7
|
+
'|_____|___|_| |_| \\___/|_| |_|'
|
|
8
|
+
];
|
|
9
|
+
const ANSI_PATTERN = /\u001B\[[0-?]*[ -/]*[@-~]/g;
|
|
10
|
+
export function visibleLength(value) {
|
|
11
|
+
return value.replace(ANSI_PATTERN, '').length;
|
|
12
|
+
}
|
|
13
|
+
function padVisible(value, width) {
|
|
14
|
+
return `${value}${' '.repeat(Math.max(0, width - visibleLength(value)))}`;
|
|
15
|
+
}
|
|
16
|
+
function wrapLine(value, width) {
|
|
17
|
+
if (value.length <= width) {
|
|
18
|
+
return [value];
|
|
19
|
+
}
|
|
20
|
+
const words = value.split(/\s+/);
|
|
21
|
+
const lines = [];
|
|
22
|
+
let current = '';
|
|
23
|
+
for (const word of words) {
|
|
24
|
+
if (word.length > width) {
|
|
25
|
+
if (current) {
|
|
26
|
+
lines.push(current);
|
|
27
|
+
current = '';
|
|
28
|
+
}
|
|
29
|
+
for (let index = 0; index < word.length; index += width) {
|
|
30
|
+
lines.push(word.slice(index, index + width));
|
|
31
|
+
}
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (!current) {
|
|
35
|
+
current = word;
|
|
36
|
+
}
|
|
37
|
+
else if (current.length + word.length + 1 <= width) {
|
|
38
|
+
current += ` ${word}`;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
lines.push(current);
|
|
42
|
+
current = word;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (current) {
|
|
46
|
+
lines.push(current);
|
|
47
|
+
}
|
|
48
|
+
return lines.length > 0 ? lines : [''];
|
|
49
|
+
}
|
|
50
|
+
export class TerminalRenderer {
|
|
51
|
+
options;
|
|
52
|
+
columns;
|
|
53
|
+
layout;
|
|
54
|
+
colorEnabled;
|
|
55
|
+
jsonMode;
|
|
56
|
+
colors;
|
|
57
|
+
constructor(options) {
|
|
58
|
+
this.options = options;
|
|
59
|
+
const stream = options.stream;
|
|
60
|
+
const env = options.env ?? process.env;
|
|
61
|
+
this.columns = Math.max(20, options.columns ?? stream.columns ?? 80);
|
|
62
|
+
this.jsonMode = options.json ?? false;
|
|
63
|
+
const tty = stream.isTTY === true;
|
|
64
|
+
const noColor = Object.hasOwn(env, 'NO_COLOR');
|
|
65
|
+
this.colorEnabled = !this.jsonMode && !options.snapshot && !noColor &&
|
|
66
|
+
(options.color ?? (tty && !noColor && picocolors.isColorSupported));
|
|
67
|
+
this.colors = createColors(this.colorEnabled);
|
|
68
|
+
this.layout = this.jsonMode || (!tty && !options.snapshot)
|
|
69
|
+
? 'plain'
|
|
70
|
+
: this.columns >= 96
|
|
71
|
+
? 'full'
|
|
72
|
+
: this.columns >= 64
|
|
73
|
+
? 'compact'
|
|
74
|
+
: 'plain';
|
|
75
|
+
}
|
|
76
|
+
write(value) {
|
|
77
|
+
if (value) {
|
|
78
|
+
this.options.stream.write(value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
json(value) {
|
|
82
|
+
return `${JSON.stringify(value, null, 2)}\n`;
|
|
83
|
+
}
|
|
84
|
+
banner(subtitle = 'Project workstation and scaffold initializer') {
|
|
85
|
+
if (this.jsonMode) {
|
|
86
|
+
return '';
|
|
87
|
+
}
|
|
88
|
+
if (this.layout === 'plain') {
|
|
89
|
+
return `${this.colors.bold('Liftoff')} - ${subtitle}\n`;
|
|
90
|
+
}
|
|
91
|
+
if (this.layout === 'compact') {
|
|
92
|
+
return `${this.colors.bold(this.colors.cyan('LIFTOFF'))}\n${this.colors.dim(subtitle)}\n`;
|
|
93
|
+
}
|
|
94
|
+
const contentWidth = Math.min(this.columns - 4, 92);
|
|
95
|
+
const border = `+${'-'.repeat(contentWidth + 2)}+`;
|
|
96
|
+
const lines = [
|
|
97
|
+
...LIFTOFF_WORDMARK.map((line) => this.colors.cyan(this.colors.bold(line))),
|
|
98
|
+
'',
|
|
99
|
+
this.colors.dim(subtitle)
|
|
100
|
+
];
|
|
101
|
+
return [
|
|
102
|
+
border,
|
|
103
|
+
...lines.map((line) => `| ${padVisible(line, contentWidth)} |`),
|
|
104
|
+
border,
|
|
105
|
+
''
|
|
106
|
+
].join('\n');
|
|
107
|
+
}
|
|
108
|
+
heading(value) {
|
|
109
|
+
if (this.jsonMode) {
|
|
110
|
+
return '';
|
|
111
|
+
}
|
|
112
|
+
return this.layout === 'plain'
|
|
113
|
+
? `${this.colors.bold(value)}\n`
|
|
114
|
+
: `${this.colors.bold(this.colors.cyan(value))}\n${this.colors.dim('-'.repeat(Math.min(visibleLength(value), this.columns)))}\n`;
|
|
115
|
+
}
|
|
116
|
+
panel(title, lines) {
|
|
117
|
+
if (this.jsonMode) {
|
|
118
|
+
return '';
|
|
119
|
+
}
|
|
120
|
+
if (this.layout !== 'full') {
|
|
121
|
+
return `${this.heading(title)}${lines.map((line) => `${line}\n`).join('')}`;
|
|
122
|
+
}
|
|
123
|
+
const width = Math.min(this.columns - 4, 92);
|
|
124
|
+
const body = lines.flatMap((line) => wrapLine(line, width));
|
|
125
|
+
const topLabel = ` ${title} `;
|
|
126
|
+
const top = `+${this.colors.bold(this.colors.cyan(topLabel))}${'-'.repeat(Math.max(0, width + 2 - topLabel.length))}+`;
|
|
127
|
+
return [
|
|
128
|
+
top,
|
|
129
|
+
...body.map((line) => `| ${padVisible(line, width)} |`),
|
|
130
|
+
`+${'-'.repeat(width + 2)}+`,
|
|
131
|
+
''
|
|
132
|
+
].join('\n');
|
|
133
|
+
}
|
|
134
|
+
table(headers, rows) {
|
|
135
|
+
if (this.jsonMode) {
|
|
136
|
+
return '';
|
|
137
|
+
}
|
|
138
|
+
if (headers.length === 0) {
|
|
139
|
+
return '';
|
|
140
|
+
}
|
|
141
|
+
if (this.layout === 'plain' || this.columns < headers.length * 18) {
|
|
142
|
+
return rows.map((row) => row.map((cell, index) => `${headers[index] ?? `Column ${index + 1}`}: ${cell}`).join(' | ')).join('\n') + (rows.length ? '\n' : '');
|
|
143
|
+
}
|
|
144
|
+
const natural = headers.map((header, index) => Math.max(visibleLength(header), ...rows.map((row) => visibleLength(row[index] ?? ''))));
|
|
145
|
+
const separators = (headers.length - 1) * 3;
|
|
146
|
+
const available = Math.max(headers.length * 8, this.columns - separators);
|
|
147
|
+
const capped = natural.map((width) => Math.min(width, Math.floor(available / headers.length)));
|
|
148
|
+
const renderRow = (row) => row.map((cell, index) => padVisible(cell, capped[index] ?? 8)).join(' | ');
|
|
149
|
+
return [
|
|
150
|
+
this.colors.bold(renderRow(headers)),
|
|
151
|
+
renderRow(capped.map((width) => '-'.repeat(width))),
|
|
152
|
+
...rows.map(renderRow),
|
|
153
|
+
''
|
|
154
|
+
].join('\n');
|
|
155
|
+
}
|
|
156
|
+
status(kind, label, detail) {
|
|
157
|
+
if (this.jsonMode) {
|
|
158
|
+
return '';
|
|
159
|
+
}
|
|
160
|
+
const tokens = {
|
|
161
|
+
success: this.colors.green('[ok]'),
|
|
162
|
+
info: this.colors.cyan('[info]'),
|
|
163
|
+
warning: this.colors.yellow('[warn]'),
|
|
164
|
+
error: this.colors.red('[error]'),
|
|
165
|
+
pending: this.colors.dim('[....]')
|
|
166
|
+
};
|
|
167
|
+
return `${tokens[kind]} ${this.colors.bold(label)}${detail ? ` - ${detail}` : ''}\n`;
|
|
168
|
+
}
|
|
169
|
+
command(value) {
|
|
170
|
+
return this.jsonMode ? '' : `${this.colors.magenta('$')} ${this.colors.bold(value)}\n`;
|
|
171
|
+
}
|
|
172
|
+
warning(value) {
|
|
173
|
+
return this.status('warning', 'Warning', value);
|
|
174
|
+
}
|
|
175
|
+
error(value) {
|
|
176
|
+
return this.status('error', 'Error', value);
|
|
177
|
+
}
|
|
178
|
+
confirmation(value) {
|
|
179
|
+
return this.jsonMode ? '' : `${this.colors.yellow('?')} ${this.colors.bold(value)}\n`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../src/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgBtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,yCAAyC;IACzC,2CAA2C;IAC3C,uCAAuC;IACvC,wCAAwC;IACxC,uCAAuC;CAC/B,CAAC;AAEX,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAElD,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC;AAChD,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAA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,CAAC;IACzF,CAAC;IAED,OAAO,CAAC,KAAa;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,KAAa;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED,YAAY,CAAC,KAAa;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACxF,CAAC;CACF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type PatternId = 'rag' | 'chatbot' | 'agent' | 'prompt' | 'multi-agent' |
|
|
|
2
2
|
export type ProviderId = 'azure' | 'aws' | 'gcp';
|
|
3
3
|
export type ProviderStatus = 'available' | 'planned';
|
|
4
4
|
export type SpecWorkflowId = 'openspec' | 'spec-kit';
|
|
5
|
+
export type CodingAgentId = 'github-copilot' | 'claude';
|
|
5
6
|
export type EnvironmentId = 'dev' | 'test' | 'prod';
|
|
6
7
|
export type ScaffoldStatus = 'full' | 'foundation' | 'integration-shell';
|
|
7
8
|
export type ProjectTypeId = 'genai' | 'standard';
|
|
@@ -55,6 +56,27 @@ export interface SpecWorkflowDefinition {
|
|
|
55
56
|
default: boolean;
|
|
56
57
|
description: string;
|
|
57
58
|
}
|
|
59
|
+
export interface ExternalCommand {
|
|
60
|
+
executable: string;
|
|
61
|
+
args: string[];
|
|
62
|
+
}
|
|
63
|
+
export interface CodingAgentDefinition {
|
|
64
|
+
id: CodingAgentId;
|
|
65
|
+
inputName: string;
|
|
66
|
+
label: string;
|
|
67
|
+
aliases: string[];
|
|
68
|
+
executable: string;
|
|
69
|
+
integrationIds: Record<SpecWorkflowId, string>;
|
|
70
|
+
}
|
|
71
|
+
export interface FrameworkDefinition {
|
|
72
|
+
id: SpecWorkflowId;
|
|
73
|
+
executable: string;
|
|
74
|
+
version: string;
|
|
75
|
+
installCommand: ExternalCommand;
|
|
76
|
+
allowedRoots: string[];
|
|
77
|
+
baseMarkers: string[][];
|
|
78
|
+
agentMarkers: Record<CodingAgentId, string[][]>;
|
|
79
|
+
}
|
|
58
80
|
export interface ProjectOptions {
|
|
59
81
|
projectName?: string;
|
|
60
82
|
projectType?: string;
|
|
@@ -65,8 +87,13 @@ export interface ProjectOptions {
|
|
|
65
87
|
includeFrontend?: boolean;
|
|
66
88
|
environments?: string[];
|
|
67
89
|
specWorkflow?: string;
|
|
90
|
+
agents?: string[];
|
|
91
|
+
defaultAgent?: string;
|
|
68
92
|
configPath?: string;
|
|
69
93
|
yes?: boolean;
|
|
94
|
+
force?: boolean;
|
|
95
|
+
installTools?: boolean;
|
|
96
|
+
installDependencies?: boolean;
|
|
70
97
|
}
|
|
71
98
|
export interface ProjectPlan {
|
|
72
99
|
projectName: string;
|
|
@@ -81,6 +108,9 @@ export interface ProjectPlan {
|
|
|
81
108
|
frontendStarter: string;
|
|
82
109
|
environments: EnvironmentDefinition[];
|
|
83
110
|
specWorkflow: SpecWorkflowDefinition;
|
|
111
|
+
agents: CodingAgentDefinition[];
|
|
112
|
+
defaultAgent?: CodingAgentDefinition;
|
|
113
|
+
framework: FrameworkDefinition;
|
|
84
114
|
approvedStack: string[];
|
|
85
115
|
}
|
|
86
116
|
export interface GeneratedArtifact {
|
|
@@ -96,7 +126,7 @@ export interface ManifestArtifact {
|
|
|
96
126
|
contentHash: string;
|
|
97
127
|
}
|
|
98
128
|
export interface LiftoffManifest {
|
|
99
|
-
artifactVersion: 2;
|
|
129
|
+
artifactVersion: 2 | 3;
|
|
100
130
|
generatedBy: 'Mission Control Liftoff';
|
|
101
131
|
liftoffVersion: string;
|
|
102
132
|
project: {
|
|
@@ -108,8 +138,15 @@ export interface LiftoffManifest {
|
|
|
108
138
|
region: string;
|
|
109
139
|
frontend: boolean;
|
|
110
140
|
specWorkflow: SpecWorkflowId;
|
|
141
|
+
agents: CodingAgentId[];
|
|
142
|
+
defaultAgent?: CodingAgentId;
|
|
111
143
|
environments: EnvironmentId[];
|
|
112
144
|
};
|
|
145
|
+
framework: {
|
|
146
|
+
state: 'initialized' | 'legacy';
|
|
147
|
+
adapter: SpecWorkflowId;
|
|
148
|
+
contractVersion?: string;
|
|
149
|
+
};
|
|
113
150
|
artifacts: ManifestArtifact[];
|
|
114
151
|
}
|
|
115
152
|
export interface ParsedArgs {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExternalCommand } from './types.js';
|
|
2
|
+
export type WorkstationRequirementId = 'node' | 'python' | 'go' | 'uv' | 'docker' | 'opentofu' | 'azure-cli' | 'openspec' | 'spec-kit' | 'github-copilot' | 'claude';
|
|
3
|
+
export type RequirementSeverity = 'blocking' | 'advisory';
|
|
4
|
+
export type SupportedPlatform = 'darwin' | 'win32' | 'linux';
|
|
5
|
+
export type LinuxFamily = 'debian' | 'fedora' | 'arch' | 'unknown';
|
|
6
|
+
export interface InstallRecipe {
|
|
7
|
+
command: ExternalCommand;
|
|
8
|
+
manager: 'brew' | 'winget' | 'npm' | 'uv';
|
|
9
|
+
}
|
|
10
|
+
export interface WorkstationRequirementDefinition {
|
|
11
|
+
id: WorkstationRequirementId;
|
|
12
|
+
label: string;
|
|
13
|
+
severity: RequirementSeverity;
|
|
14
|
+
probes: ExternalCommand[];
|
|
15
|
+
minimumVersion?: string;
|
|
16
|
+
exactVersion?: string;
|
|
17
|
+
install: Partial<Record<SupportedPlatform, InstallRecipe>>;
|
|
18
|
+
linuxRemedies: Record<LinuxFamily, string>;
|
|
19
|
+
}
|
|
20
|
+
export declare const workstationRequirementCatalog: Record<WorkstationRequirementId, WorkstationRequirementDefinition>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const linuxRemedies = (url) => ({
|
|
2
|
+
debian: `Follow the official Debian/Ubuntu installation guide: ${url}`,
|
|
3
|
+
fedora: `Follow the official Fedora/RHEL installation guide: ${url}`,
|
|
4
|
+
arch: `Follow the official Arch Linux installation guide: ${url}`,
|
|
5
|
+
unknown: `Follow the official Linux installation guide: ${url}`
|
|
6
|
+
});
|
|
7
|
+
const winget = (id) => ({
|
|
8
|
+
manager: 'winget',
|
|
9
|
+
command: { executable: 'winget', args: ['install', '--id', id, '--exact', '--accept-package-agreements', '--accept-source-agreements'] }
|
|
10
|
+
});
|
|
11
|
+
const brew = (name, cask = false) => ({
|
|
12
|
+
manager: 'brew',
|
|
13
|
+
command: { executable: 'brew', args: ['install', ...(cask ? ['--cask'] : []), name] }
|
|
14
|
+
});
|
|
15
|
+
export const workstationRequirementCatalog = {
|
|
16
|
+
node: {
|
|
17
|
+
id: 'node',
|
|
18
|
+
label: 'Node.js',
|
|
19
|
+
severity: 'blocking',
|
|
20
|
+
probes: [{ executable: 'node', args: ['--version'] }],
|
|
21
|
+
minimumVersion: '20.19.0',
|
|
22
|
+
install: { darwin: brew('node'), win32: winget('OpenJS.NodeJS.LTS') },
|
|
23
|
+
linuxRemedies: linuxRemedies('https://nodejs.org/en/download/package-manager')
|
|
24
|
+
},
|
|
25
|
+
python: {
|
|
26
|
+
id: 'python',
|
|
27
|
+
label: 'Python',
|
|
28
|
+
severity: 'blocking',
|
|
29
|
+
probes: [
|
|
30
|
+
{ executable: 'python3', args: ['--version'] },
|
|
31
|
+
{ executable: 'python', args: ['--version'] },
|
|
32
|
+
{ executable: 'py', args: ['-3', '--version'] }
|
|
33
|
+
],
|
|
34
|
+
minimumVersion: '3.11.0',
|
|
35
|
+
install: { darwin: brew('python@3.12'), win32: winget('Python.Python.3.12') },
|
|
36
|
+
linuxRemedies: linuxRemedies('https://www.python.org/downloads/')
|
|
37
|
+
},
|
|
38
|
+
go: {
|
|
39
|
+
id: 'go',
|
|
40
|
+
label: 'Go',
|
|
41
|
+
severity: 'blocking',
|
|
42
|
+
probes: [{ executable: 'go', args: ['version'] }],
|
|
43
|
+
minimumVersion: '1.23.0',
|
|
44
|
+
install: { darwin: brew('go'), win32: winget('GoLang.Go') },
|
|
45
|
+
linuxRemedies: linuxRemedies('https://go.dev/doc/install')
|
|
46
|
+
},
|
|
47
|
+
uv: {
|
|
48
|
+
id: 'uv',
|
|
49
|
+
label: 'uv',
|
|
50
|
+
severity: 'blocking',
|
|
51
|
+
probes: [{ executable: 'uv', args: ['--version'] }],
|
|
52
|
+
install: { darwin: brew('uv'), win32: winget('astral-sh.uv') },
|
|
53
|
+
linuxRemedies: linuxRemedies('https://docs.astral.sh/uv/getting-started/installation/')
|
|
54
|
+
},
|
|
55
|
+
docker: {
|
|
56
|
+
id: 'docker',
|
|
57
|
+
label: 'Docker',
|
|
58
|
+
severity: 'advisory',
|
|
59
|
+
probes: [{ executable: 'docker', args: ['--version'] }],
|
|
60
|
+
install: { darwin: brew('docker', true), win32: winget('Docker.DockerDesktop') },
|
|
61
|
+
linuxRemedies: linuxRemedies('https://docs.docker.com/engine/install/')
|
|
62
|
+
},
|
|
63
|
+
opentofu: {
|
|
64
|
+
id: 'opentofu',
|
|
65
|
+
label: 'OpenTofu',
|
|
66
|
+
severity: 'advisory',
|
|
67
|
+
probes: [{ executable: 'tofu', args: ['--version'] }],
|
|
68
|
+
install: { darwin: brew('opentofu'), win32: winget('OpenTofu.OpenTofu') },
|
|
69
|
+
linuxRemedies: linuxRemedies('https://opentofu.org/docs/intro/install/')
|
|
70
|
+
},
|
|
71
|
+
'azure-cli': {
|
|
72
|
+
id: 'azure-cli',
|
|
73
|
+
label: 'Azure CLI',
|
|
74
|
+
severity: 'advisory',
|
|
75
|
+
probes: [{ executable: 'az', args: ['version', '--output', 'json'] }],
|
|
76
|
+
install: { darwin: brew('azure-cli'), win32: winget('Microsoft.AzureCLI') },
|
|
77
|
+
linuxRemedies: linuxRemedies('https://learn.microsoft.com/cli/azure/install-azure-cli-linux')
|
|
78
|
+
},
|
|
79
|
+
openspec: {
|
|
80
|
+
id: 'openspec',
|
|
81
|
+
label: 'OpenSpec',
|
|
82
|
+
severity: 'blocking',
|
|
83
|
+
probes: [{ executable: 'openspec', args: ['--version'] }],
|
|
84
|
+
exactVersion: '1.6.0',
|
|
85
|
+
install: {
|
|
86
|
+
darwin: { manager: 'npm', command: { executable: 'npm', args: ['install', '-g', '@fission-ai/openspec@1.6.0'] } },
|
|
87
|
+
win32: { manager: 'npm', command: { executable: 'npm', args: ['install', '-g', '@fission-ai/openspec@1.6.0'] } },
|
|
88
|
+
linux: { manager: 'npm', command: { executable: 'npm', args: ['install', '-g', '@fission-ai/openspec@1.6.0'] } }
|
|
89
|
+
},
|
|
90
|
+
linuxRemedies: linuxRemedies('https://github.com/Fission-AI/OpenSpec')
|
|
91
|
+
},
|
|
92
|
+
'spec-kit': {
|
|
93
|
+
id: 'spec-kit',
|
|
94
|
+
label: 'Spec Kit',
|
|
95
|
+
severity: 'blocking',
|
|
96
|
+
probes: [{ executable: 'specify', args: ['--version'] }],
|
|
97
|
+
exactVersion: '0.14.1',
|
|
98
|
+
install: {
|
|
99
|
+
darwin: { manager: 'uv', command: { executable: 'uv', args: ['tool', 'install', 'specify-cli==0.14.1'] } },
|
|
100
|
+
win32: { manager: 'uv', command: { executable: 'uv', args: ['tool', 'install', 'specify-cli==0.14.1'] } },
|
|
101
|
+
linux: { manager: 'uv', command: { executable: 'uv', args: ['tool', 'install', 'specify-cli==0.14.1'] } }
|
|
102
|
+
},
|
|
103
|
+
linuxRemedies: linuxRemedies('https://github.com/github/spec-kit')
|
|
104
|
+
},
|
|
105
|
+
'github-copilot': {
|
|
106
|
+
id: 'github-copilot',
|
|
107
|
+
label: 'GitHub Copilot',
|
|
108
|
+
severity: 'blocking',
|
|
109
|
+
probes: [{ executable: 'copilot', args: ['--version'] }],
|
|
110
|
+
install: { darwin: brew('copilot-cli', true), win32: winget('GitHub.Copilot') },
|
|
111
|
+
linuxRemedies: linuxRemedies('https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli')
|
|
112
|
+
},
|
|
113
|
+
claude: {
|
|
114
|
+
id: 'claude',
|
|
115
|
+
label: 'Claude Code',
|
|
116
|
+
severity: 'blocking',
|
|
117
|
+
probes: [{ executable: 'claude', args: ['--version'] }],
|
|
118
|
+
install: { darwin: brew('claude-code', true), win32: winget('Anthropic.ClaudeCode') },
|
|
119
|
+
linuxRemedies: linuxRemedies('https://docs.anthropic.com/en/docs/claude-code/setup')
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=workstation-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workstation-catalog.js","sourceRoot":"","sources":["../src/workstation-catalog.ts"],"names":[],"mappings":"AAmCA,MAAM,aAAa,GAAG,CAAC,GAAW,EAA+B,EAAE,CAAC,CAAC;IACnE,MAAM,EAAE,yDAAyD,GAAG,EAAE;IACtE,MAAM,EAAE,uDAAuD,GAAG,EAAE;IACpE,IAAI,EAAE,sDAAsD,GAAG,EAAE;IACjE,OAAO,EAAE,iDAAiD,GAAG,EAAE;CAChE,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,CAAC,EAAU,EAAiB,EAAE,CAAC,CAAC;IAC7C,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,6BAA6B,EAAE,4BAA4B,CAAC,EAAE;CACzI,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,IAAI,GAAG,KAAK,EAAiB,EAAE,CAAC,CAAC;IAC3D,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,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EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAAE;QACrF,aAAa,EAAE,aAAa,CAAC,sDAAsD,CAAC;KACrF;CACF,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type LinuxFamily, type RequirementSeverity, type SupportedPlatform, type WorkstationRequirementDefinition, type WorkstationRequirementId } from './workstation-catalog.js';
|
|
2
|
+
import type { CommandRunner, RunCommandOptions } from './process-runner.js';
|
|
3
|
+
import type { ApiStackId, CodingAgentId, ProviderId, ProjectPlan, SpecWorkflowId } from './types.js';
|
|
4
|
+
export type RequirementState = 'ready' | 'missing' | 'outdated' | 'unhealthy' | 'not-observable';
|
|
5
|
+
export interface SelectedRequirement {
|
|
6
|
+
id: WorkstationRequirementId;
|
|
7
|
+
definition: WorkstationRequirementDefinition;
|
|
8
|
+
severity: RequirementSeverity;
|
|
9
|
+
reasons: string[];
|
|
10
|
+
minimumVersion?: string;
|
|
11
|
+
exactVersion?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ReadinessNotice {
|
|
14
|
+
label: string;
|
|
15
|
+
state: 'ready' | 'unhealthy' | 'not-observable';
|
|
16
|
+
detail: string;
|
|
17
|
+
remedy?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface RequirementProbeResult {
|
|
20
|
+
requirement: SelectedRequirement;
|
|
21
|
+
state: RequirementState;
|
|
22
|
+
detail: string;
|
|
23
|
+
detectedVersion?: string;
|
|
24
|
+
detectedBy?: string;
|
|
25
|
+
remedy?: string;
|
|
26
|
+
notices: ReadinessNotice[];
|
|
27
|
+
}
|
|
28
|
+
export interface WorkstationRequirementSelection {
|
|
29
|
+
apiStack: {
|
|
30
|
+
id: ApiStackId;
|
|
31
|
+
};
|
|
32
|
+
specWorkflow: {
|
|
33
|
+
id: SpecWorkflowId;
|
|
34
|
+
};
|
|
35
|
+
framework: {
|
|
36
|
+
version: string;
|
|
37
|
+
};
|
|
38
|
+
provider: {
|
|
39
|
+
id: ProviderId;
|
|
40
|
+
};
|
|
41
|
+
agents: Array<{
|
|
42
|
+
id: CodingAgentId;
|
|
43
|
+
label: string;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
export interface RequirementSelectionOptions {
|
|
47
|
+
includeFramework?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface HostEnvironment {
|
|
50
|
+
platform: SupportedPlatform;
|
|
51
|
+
linuxFamily: LinuxFamily;
|
|
52
|
+
}
|
|
53
|
+
export type InstallState = 'installed' | 'declined' | 'manual' | 'failed' | 'restart-required';
|
|
54
|
+
export interface InstallResult {
|
|
55
|
+
requirement: SelectedRequirement;
|
|
56
|
+
state: InstallState;
|
|
57
|
+
detail: string;
|
|
58
|
+
command?: string;
|
|
59
|
+
probe: RequirementProbeResult;
|
|
60
|
+
remedy?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function extractVersion(output: string): string | undefined;
|
|
63
|
+
export declare function selectLiftoffRuntimeRequirements(): SelectedRequirement[];
|
|
64
|
+
export declare function selectWorkstationRequirements(plan: ProjectPlan | WorkstationRequirementSelection, options?: RequirementSelectionOptions): SelectedRequirement[];
|
|
65
|
+
export declare function probeRequirement(requirement: SelectedRequirement, runner: CommandRunner, options?: Pick<RunCommandOptions, 'cwd'>): Promise<RequirementProbeResult>;
|
|
66
|
+
export declare function probeWorkstation(requirements: SelectedRequirement[], runner: CommandRunner, options?: Pick<RunCommandOptions, 'cwd'>): Promise<RequirementProbeResult[]>;
|
|
67
|
+
export declare function parseLinuxFamily(osRelease: string): LinuxFamily;
|
|
68
|
+
export declare function detectHostEnvironment(platform?: NodeJS.Platform, osReleasePath?: string): Promise<HostEnvironment>;
|
|
69
|
+
export declare function installRequirement(requirement: SelectedRequirement, currentProbe: RequirementProbeResult, context: {
|
|
70
|
+
authorized: boolean;
|
|
71
|
+
host: HostEnvironment;
|
|
72
|
+
runner: CommandRunner;
|
|
73
|
+
cwd?: string;
|
|
74
|
+
streamOptions?: Pick<RunCommandOptions, 'stdout' | 'stderr'>;
|
|
75
|
+
}): Promise<InstallResult>;
|
|
76
|
+
export declare function blockingReadinessFailures(results: RequirementProbeResult[]): RequirementProbeResult[];
|