@girardmedia/bootspring 2.2.0 → 2.2.1
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/bin/bootspring.js +127 -73
- package/claude-commands/agent.md +34 -0
- package/claude-commands/bs.md +31 -0
- package/claude-commands/build.md +25 -0
- package/claude-commands/skill.md +31 -0
- package/claude-commands/todo.md +25 -0
- package/dist/core/index.d.ts +5814 -0
- package/dist/core.js +5779 -0
- package/dist/index.js +93883 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp-server.js +2298 -0
- package/package.json +22 -55
- package/core/api-client.d.ts +0 -69
- package/core/api-client.js +0 -1482
- package/core/auth.d.ts +0 -98
- package/core/auth.js +0 -737
- package/core/build-orchestrator.js +0 -508
- package/core/build-state.js +0 -612
- package/core/config.d.ts +0 -106
- package/core/config.js +0 -1328
- package/core/context-loader.js +0 -580
- package/core/context.d.ts +0 -61
- package/core/context.js +0 -327
- package/core/entitlements.d.ts +0 -70
- package/core/entitlements.js +0 -322
- package/core/index.d.ts +0 -53
- package/core/index.js +0 -62
- package/core/mcp-config.js +0 -115
- package/core/policies.d.ts +0 -43
- package/core/policies.js +0 -113
- package/core/policy-matrix.js +0 -303
- package/core/project-activity.js +0 -175
- package/core/redaction.d.ts +0 -5
- package/core/redaction.js +0 -63
- package/core/self-update.js +0 -259
- package/core/session.js +0 -353
- package/core/task-extractor.js +0 -1098
- package/core/telemetry.d.ts +0 -55
- package/core/telemetry.js +0 -617
- package/core/tier-enforcement.js +0 -928
- package/core/utils.d.ts +0 -90
- package/core/utils.js +0 -455
- package/core/validation.js +0 -572
- package/mcp/server.d.ts +0 -57
- package/mcp/server.js +0 -264
package/bin/bootspring.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Bootspring CLI Bridge
|
|
5
|
-
* Routes commands to either the modern v2 monorepo CLI or legacy v1 handlers.
|
|
6
|
-
*/
|
|
3
|
+
/** Bootspring CLI bridge. Stable runtime by default, monorepo preview via --v2. */
|
|
7
4
|
|
|
8
5
|
const path = require('path');
|
|
9
6
|
const fs = require('fs');
|
|
7
|
+
const { spawn } = require('child_process');
|
|
10
8
|
|
|
11
9
|
const VERSION = require('../package.json').version;
|
|
10
|
+
const STABLE_CLI_DIST = path.join(__dirname, '../dist/index.js');
|
|
12
11
|
const MONOREPO_CLI_DIST = path.join(__dirname, '../monorepo/apps/cli/dist/index.js');
|
|
13
12
|
const USE_V2 = process.env.BOOTSPRING_V2 === 'true' || process.argv.includes('--v2');
|
|
14
13
|
|
|
@@ -24,70 +23,129 @@ const C = {
|
|
|
24
23
|
|
|
25
24
|
const LOGO = `${C.cyan}${C.bold}⚡ Bootspring${C.reset} ${C.dim}v${VERSION}${C.reset}${USE_V2 ? ` ${C.green}(v2-beta)${C.reset}` : ''}`;
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
26
|
+
const COMMANDS = {
|
|
27
|
+
auth: 'auth',
|
|
28
|
+
init: 'init',
|
|
29
|
+
project: 'project',
|
|
30
|
+
switch: { module: 'switchCmd' },
|
|
31
|
+
health: 'health',
|
|
32
|
+
mcp: 'mcp',
|
|
33
|
+
dashboard: 'dashboard',
|
|
34
|
+
context: 'context',
|
|
35
|
+
build: 'build',
|
|
36
|
+
deploy: 'deploy',
|
|
37
|
+
loop: 'loop',
|
|
38
|
+
quality: 'quality',
|
|
39
|
+
security: 'security',
|
|
40
|
+
doctor: 'doctor',
|
|
41
|
+
update: 'update',
|
|
42
|
+
plan: 'plan',
|
|
43
|
+
prd: 'prd',
|
|
44
|
+
preseed: 'preseed',
|
|
45
|
+
'preseed-start': { module: 'preseedStart', method: 'start' },
|
|
46
|
+
'preseed-from-codebase': { module: 'preseed', prepend: ['from-codebase'] },
|
|
47
|
+
seed: 'seed',
|
|
48
|
+
manager: 'manager',
|
|
49
|
+
agent: 'agent',
|
|
50
|
+
skill: 'skill',
|
|
51
|
+
todo: 'todo',
|
|
52
|
+
billing: 'billing',
|
|
53
|
+
plugin: 'plugin',
|
|
54
|
+
analyze: 'analyze',
|
|
55
|
+
audit: 'audit',
|
|
56
|
+
monitor: 'monitor',
|
|
57
|
+
metrics: 'metrics',
|
|
58
|
+
validate: 'validate',
|
|
59
|
+
visualize: 'visualize',
|
|
60
|
+
generate: 'generate',
|
|
61
|
+
content: 'content',
|
|
62
|
+
docs: 'docs',
|
|
63
|
+
learn: 'learn',
|
|
64
|
+
memory: 'memory',
|
|
65
|
+
suggest: 'suggest',
|
|
66
|
+
orchestrator: 'orchestrator',
|
|
67
|
+
watch: 'watch',
|
|
68
|
+
business: 'business',
|
|
69
|
+
fundraise: 'fundraise',
|
|
70
|
+
legal: 'legal',
|
|
71
|
+
org: 'org',
|
|
72
|
+
workspace: 'workspace',
|
|
73
|
+
'cloud-sync': { module: 'cloudSync' },
|
|
74
|
+
github: { module: 'githubCmd' },
|
|
75
|
+
onboard: 'onboard',
|
|
76
|
+
checkpoint: 'checkpoint',
|
|
77
|
+
setup: 'setup',
|
|
78
|
+
log: 'log',
|
|
79
|
+
mvp: 'mvp',
|
|
80
|
+
task: 'task',
|
|
81
|
+
telemetry: 'telemetry'
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const HELP_GROUPS = {
|
|
85
|
+
'Core': ['auth', 'init', 'project', 'switch', 'health', 'mcp', 'dashboard', 'context'],
|
|
86
|
+
'Build & Deploy': ['build', 'deploy', 'loop', 'quality', 'security', 'doctor', 'update'],
|
|
87
|
+
'Planning': ['plan', 'prd', 'preseed', 'preseed-start', 'preseed-from-codebase', 'seed', 'manager'],
|
|
88
|
+
'Agents & Skills': ['agent', 'skill', 'todo', 'billing', 'plugin'],
|
|
89
|
+
'Analysis': ['analyze', 'audit', 'monitor', 'metrics', 'validate', 'visualize'],
|
|
90
|
+
'Docs & Content': ['generate', 'content', 'docs'],
|
|
91
|
+
'Intelligence': ['learn', 'memory', 'suggest', 'orchestrator', 'watch'],
|
|
92
|
+
'Business': ['business', 'fundraise', 'legal', 'org'],
|
|
93
|
+
'Infrastructure': ['workspace', 'cloud-sync', 'github', 'onboard', 'checkpoint', 'setup'],
|
|
94
|
+
'Tools': ['log', 'mvp', 'task', 'telemetry']
|
|
95
|
+
};
|
|
96
|
+
|
|
57
97
|
function showHelp() {
|
|
58
98
|
console.log(LOGO);
|
|
59
99
|
console.log(`${C.dim}Development scaffolding with intelligence${C.reset}\n`);
|
|
60
100
|
console.log(`${C.bold}Usage:${C.reset} bootspring <command> [options]\n`);
|
|
61
101
|
|
|
62
|
-
const
|
|
63
|
-
'Core': ['auth', 'init', 'project', 'switch', 'health', 'mcp', 'dashboard'],
|
|
64
|
-
'Build & Deploy': ['build', 'deploy', 'loop', 'quality', 'security', 'doctor', 'update'],
|
|
65
|
-
'Planning': ['plan', 'prd', 'preseed', 'preseed-start', 'preseed-from-codebase', 'seed'],
|
|
66
|
-
'Agents & Skills': ['agent', 'skill', 'todo', 'billing'],
|
|
67
|
-
'Analysis': ['analyze', 'audit', 'monitor', 'metrics', 'validate', 'visualize'],
|
|
68
|
-
'Docs & Content': ['generate', 'content', 'docs'],
|
|
69
|
-
'Intelligence': ['learn', 'memory', 'suggest', 'orchestrator', 'watch'],
|
|
70
|
-
'Business': ['business', 'fundraise', 'legal', 'org'],
|
|
71
|
-
'Infrastructure': ['workspace', 'cloud-sync', 'github', 'onboard', 'checkpoint'],
|
|
72
|
-
'Tools': ['log', 'mvp', 'plugin', 'task', 'telemetry']
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
for (const [group, cmds] of Object.entries(groups)) {
|
|
102
|
+
for (const [group, cmds] of Object.entries(HELP_GROUPS)) {
|
|
76
103
|
console.log(`${C.bold}${group}:${C.reset} ${cmds.map(c => `${C.green}${c}${C.reset}`).join(', ')}`);
|
|
77
104
|
}
|
|
78
105
|
|
|
79
106
|
console.log(`\n${C.dim}Run "bootspring <command> --help" for command details${C.reset}`);
|
|
107
|
+
console.log(`${C.dim}Use --v2 to try the monorepo preview CLI${C.reset}`);
|
|
108
|
+
console.log(`${C.dim}The preview CLI is not the production MCP/server path${C.reset}`);
|
|
80
109
|
console.log(`${C.dim}Docs: https://bootspring.com/docs${C.reset}\n`);
|
|
81
110
|
}
|
|
82
111
|
|
|
83
|
-
|
|
84
|
-
|
|
112
|
+
function loadStableCli() {
|
|
113
|
+
if (!fs.existsSync(STABLE_CLI_DIST)) {
|
|
114
|
+
console.error(`${C.red}Error: stable CLI build not found at ${STABLE_CLI_DIST}${C.reset}`);
|
|
115
|
+
console.error(`${C.dim}Please run 'npm run build' first.${C.reset}`);
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return require(STABLE_CLI_DIST);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
async function runStable(command, args) {
|
|
123
|
+
const config = COMMANDS[command];
|
|
85
124
|
if (!config) {
|
|
86
|
-
|
|
87
|
-
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const stableCli = loadStableCli();
|
|
129
|
+
const route = typeof config === 'string'
|
|
130
|
+
? { module: config, method: 'run', prepend: [] }
|
|
131
|
+
: { method: 'run', prepend: [], ...config };
|
|
132
|
+
const cliModule = stableCli.cli && stableCli.cli[route.module];
|
|
133
|
+
const handler = cliModule && cliModule[route.method];
|
|
134
|
+
const normalizedArgs = args[0] === '--help' || args[0] === '-h'
|
|
135
|
+
? ['help', ...args.slice(1)]
|
|
136
|
+
: args;
|
|
137
|
+
|
|
138
|
+
if (typeof handler !== 'function') {
|
|
139
|
+
console.error(`${C.red}Error: missing stable CLI handler for ${command}${C.reset}`);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const result = await Promise.resolve(handler([...(route.prepend || []), ...normalizedArgs]));
|
|
144
|
+
if (typeof result === 'number' && Number.isFinite(result)) {
|
|
145
|
+
process.exit(result);
|
|
88
146
|
}
|
|
89
|
-
|
|
90
|
-
|
|
147
|
+
|
|
148
|
+
return true;
|
|
91
149
|
}
|
|
92
150
|
|
|
93
151
|
async function runV2(args) {
|
|
@@ -97,11 +155,8 @@ async function runV2(args) {
|
|
|
97
155
|
process.exit(1);
|
|
98
156
|
}
|
|
99
157
|
|
|
100
|
-
|
|
158
|
+
console.error(`${C.yellow}Warning: using preview v2 CLI. Stable npm CLI remains the supported production path.${C.reset}`);
|
|
101
159
|
const cleanArgs = args.filter(arg => arg !== '--v2');
|
|
102
|
-
|
|
103
|
-
// Use dynamic import for ESM v2 CLI
|
|
104
|
-
const { spawn } = require('child_process');
|
|
105
160
|
const child = spawn('node', [MONOREPO_CLI_DIST, ...cleanArgs], {
|
|
106
161
|
stdio: 'inherit',
|
|
107
162
|
env: { ...process.env, BOOTSPRING_V2_BRIDGE: 'true' }
|
|
@@ -113,10 +168,15 @@ async function runV2(args) {
|
|
|
113
168
|
}
|
|
114
169
|
|
|
115
170
|
async function main() {
|
|
116
|
-
const
|
|
171
|
+
const rawArgs = process.argv.slice(2);
|
|
172
|
+
const args = rawArgs.filter(arg => arg !== '--v2');
|
|
117
173
|
const command = args[0];
|
|
118
174
|
|
|
119
175
|
if (!command || command === '--help' || command === '-h' || command === 'help') {
|
|
176
|
+
if (command === 'help' && args[1]) {
|
|
177
|
+
const handled = await runStable(args[1], ['--help']);
|
|
178
|
+
if (handled) return;
|
|
179
|
+
}
|
|
120
180
|
showHelp();
|
|
121
181
|
return;
|
|
122
182
|
}
|
|
@@ -126,28 +186,19 @@ async function main() {
|
|
|
126
186
|
return;
|
|
127
187
|
}
|
|
128
188
|
|
|
129
|
-
// Auto-update check (before any command execution)
|
|
130
189
|
try {
|
|
131
|
-
const selfUpdate = require(path.resolve(__dirname, '../core
|
|
190
|
+
const { selfUpdate } = require(path.resolve(__dirname, '../dist/core'));
|
|
132
191
|
selfUpdate.ensureLatestVersion(args);
|
|
133
192
|
} catch {
|
|
134
|
-
// Best-effort;
|
|
193
|
+
// Best-effort; do not block CLI on update failures.
|
|
135
194
|
}
|
|
136
195
|
|
|
137
|
-
|
|
138
|
-
if (USE_V2 || V2_COMMANDS.includes(command)) {
|
|
196
|
+
if (USE_V2) {
|
|
139
197
|
await runV2(args);
|
|
140
198
|
return;
|
|
141
199
|
}
|
|
142
200
|
|
|
143
|
-
|
|
144
|
-
if (V1_COMMANDS[command]) {
|
|
145
|
-
try {
|
|
146
|
-
await runV1(command, args.slice(1));
|
|
147
|
-
} catch (error) {
|
|
148
|
-
console.error(`\n${C.red}Legacy Error: ${error.message}${C.reset}\n`);
|
|
149
|
-
process.exit(1);
|
|
150
|
-
}
|
|
201
|
+
if (await runStable(command, args.slice(1))) {
|
|
151
202
|
return;
|
|
152
203
|
}
|
|
153
204
|
|
|
@@ -156,4 +207,7 @@ async function main() {
|
|
|
156
207
|
process.exit(1);
|
|
157
208
|
}
|
|
158
209
|
|
|
159
|
-
main()
|
|
210
|
+
main().catch((error) => {
|
|
211
|
+
console.error(`\n${C.red}Error: ${error.message}${C.reset}\n`);
|
|
212
|
+
process.exit(1);
|
|
213
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent
|
|
3
|
+
description: Invoke Bootspring specialized AI agents
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agent - Bootspring Agents
|
|
7
|
+
|
|
8
|
+
Invoke specialized AI agents for focused tasks.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When user invokes `/agent`, use the `bootspring_agent` MCP tool:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"action": "invoke",
|
|
17
|
+
"name": "<agent-name>"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Actions
|
|
22
|
+
|
|
23
|
+
- `/agent <name>` → `bootspring_agent` with action: "invoke", name: "<name>"
|
|
24
|
+
- `/agent list` → `bootspring_agent` with action: "list"
|
|
25
|
+
- `/agent show <name>` → `bootspring_agent` with action: "show", name: "<name>"
|
|
26
|
+
|
|
27
|
+
## Available Agents
|
|
28
|
+
|
|
29
|
+
- `security` - Security audit
|
|
30
|
+
- `performance` - Performance review
|
|
31
|
+
- `api` - API design review
|
|
32
|
+
- `database` - Database review
|
|
33
|
+
- `testing` - Test analysis
|
|
34
|
+
- `code-reviewer` - Code review
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bs
|
|
3
|
+
description: Bootspring quick commands (universal shorthand)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /bs - Bootspring Quick Commands
|
|
7
|
+
|
|
8
|
+
Universal shorthand for Bootspring operations. Works with any AI CLI.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
Parse the subcommand and use the appropriate bootspring MCP tool or CLI command.
|
|
13
|
+
|
|
14
|
+
## Commands
|
|
15
|
+
|
|
16
|
+
| Command | MCP Tool | CLI Fallback |
|
|
17
|
+
|---------|----------|--------------|
|
|
18
|
+
| `/bs skill <q>` | `bootspring_skill` action:search | `bootspring skill search <q>` |
|
|
19
|
+
| `/bs agent <n>` | `bootspring_agent` action:invoke | `bootspring agent invoke <n>` |
|
|
20
|
+
| `/bs todo` | `bootspring_todo` action:list | `bootspring todo list` |
|
|
21
|
+
| `/bs todo add "<t>"` | `bootspring_todo` action:add | `bootspring todo add "<t>"` |
|
|
22
|
+
| `/bs build` | `bootspring_seed` action:build-status | `bootspring build status` |
|
|
23
|
+
| `/bs health` | `bootspring_context` action:health | `bootspring health` |
|
|
24
|
+
| `/bs help` | - | `bootspring help` |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
- `/bs skill auth` - Search auth patterns
|
|
29
|
+
- `/bs agent security` - Run security agent
|
|
30
|
+
- `/bs todo add "Fix bug"` - Add todo
|
|
31
|
+
- `/bs build` - Check build status
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build
|
|
3
|
+
description: Bootspring build management
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /build - Bootspring Build
|
|
7
|
+
|
|
8
|
+
Manage the Bootspring build loop and task execution.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When user invokes `/build`, use the `bootspring_seed` MCP tool with build actions:
|
|
13
|
+
|
|
14
|
+
## Actions
|
|
15
|
+
|
|
16
|
+
- `/build` → `bootspring_seed` with action: "build-status"
|
|
17
|
+
- `/build status` → `bootspring_seed` with action: "build-status"
|
|
18
|
+
- `/build next` → `bootspring_seed` with action: "build-next"
|
|
19
|
+
- `/build done` → `bootspring_seed` with action: "build-done"
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
1. `/build next` - Get next task
|
|
24
|
+
2. Implement the task
|
|
25
|
+
3. `/build done` - Mark complete
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill
|
|
3
|
+
description: Search and view Bootspring code patterns
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /skill - Bootspring Skills
|
|
7
|
+
|
|
8
|
+
Search and view code patterns from the Bootspring library.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When user invokes `/skill`, use the `bootspring_skill` MCP tool:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"action": "search",
|
|
17
|
+
"query": "<user's query>"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Actions
|
|
22
|
+
|
|
23
|
+
- `/skill <query>` → `bootspring_skill` with action: "search", query: "<query>"
|
|
24
|
+
- `/skill show <name>` → `bootspring_skill` with action: "show", name: "<name>"
|
|
25
|
+
- `/skill list` → `bootspring_skill` with action: "list"
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
- `/skill auth` → Search for authentication patterns
|
|
30
|
+
- `/skill show auth/clerk` → Show the Clerk auth pattern
|
|
31
|
+
- `/skill list` → List all available patterns
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: todo
|
|
3
|
+
description: Manage Bootspring project todos
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /todo - Bootspring Todos
|
|
7
|
+
|
|
8
|
+
Manage project todos tracked by Bootspring.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When user invokes `/todo`, use the `bootspring_todo` MCP tool:
|
|
13
|
+
|
|
14
|
+
## Actions
|
|
15
|
+
|
|
16
|
+
- `/todo` → `bootspring_todo` with action: "list"
|
|
17
|
+
- `/todo add "<task>"` → `bootspring_todo` with action: "add", text: "<task>"
|
|
18
|
+
- `/todo done <id>` → `bootspring_todo` with action: "done", id: "<id>"
|
|
19
|
+
- `/todo clear` → `bootspring_todo` with action: "clear"
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
- `/todo` - List all todos
|
|
24
|
+
- `/todo add "Fix login bug"` - Add new todo
|
|
25
|
+
- `/todo done 1` - Complete todo #1
|