@girardmedia/bootspring 2.0.21 → 2.0.23
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 +5 -0
- package/cli/org.js +474 -0
- package/cli/preseed/index.js +16 -0
- package/cli/preseed/interactive.js +143 -0
- package/cli/preseed/templates.js +227 -0
- package/cli/preseed.js +9 -301
- package/cli/seed/builders/ai-context-builder.js +85 -0
- package/cli/seed/builders/index.js +13 -0
- package/cli/seed/builders/seed-builder.js +272 -0
- package/cli/seed/extractors/content-extractors.js +383 -0
- package/cli/seed/extractors/index.js +47 -0
- package/cli/seed/extractors/metadata-extractors.js +167 -0
- package/cli/seed/extractors/section-extractor.js +54 -0
- package/cli/seed/extractors/stack-extractors.js +228 -0
- package/cli/seed/index.js +18 -0
- package/cli/seed/utils/folder-structure.js +84 -0
- package/cli/seed/utils/index.js +11 -0
- package/cli/seed.js +23 -1074
- package/core/api-client.js +77 -0
- package/core/entitlements.js +36 -0
- package/core/organizations.js +223 -0
- package/core/policies.js +51 -6
- package/core/policy-matrix.js +303 -0
- package/core/project-context.js +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +3220 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/context-McpJQa_2.d.ts +5710 -0
- package/dist/core/index.d.ts +635 -0
- package/dist/core/index.js +2593 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index-QqbeEiDm.d.ts +857 -0
- package/dist/index-UiYCgwiH.d.ts +174 -0
- package/dist/index.d.ts +453 -0
- package/dist/index.js +44228 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +41173 -0
- package/dist/mcp/index.js.map +1 -0
- package/generators/index.ts +82 -0
- package/intelligence/orchestrator/config/failure-signatures.js +48 -0
- package/intelligence/orchestrator/config/index.js +23 -0
- package/intelligence/orchestrator/config/pack-lifecycle.js +262 -0
- package/intelligence/orchestrator/config/phases.js +111 -0
- package/intelligence/orchestrator/config/remediation.js +150 -0
- package/intelligence/orchestrator/config/workflows.js +168 -0
- package/intelligence/orchestrator/core/index.js +16 -0
- package/intelligence/orchestrator/core/state-manager.js +88 -0
- package/intelligence/orchestrator/core/telemetry.js +24 -0
- package/intelligence/orchestrator/index.js +17 -0
- package/intelligence/orchestrator.js +17 -512
- package/mcp/contracts/mcp-contract.v1.json +1 -1
- package/package.json +16 -3
- package/src/cli/agent.ts +703 -0
- package/src/cli/analyze.ts +640 -0
- package/src/cli/audit.ts +707 -0
- package/src/cli/auth.ts +930 -0
- package/src/cli/billing.ts +364 -0
- package/src/cli/build.ts +1089 -0
- package/src/cli/business.ts +508 -0
- package/src/cli/checkpoint-utils.ts +236 -0
- package/src/cli/checkpoint.ts +757 -0
- package/src/cli/cloud-sync.ts +534 -0
- package/src/cli/content.ts +273 -0
- package/src/cli/context.ts +667 -0
- package/src/cli/dashboard.ts +133 -0
- package/src/cli/deploy.ts +704 -0
- package/src/cli/doctor.ts +480 -0
- package/src/cli/fundraise.ts +494 -0
- package/src/cli/generate.ts +346 -0
- package/src/cli/github-cmd.ts +566 -0
- package/src/cli/health.ts +599 -0
- package/src/cli/index.ts +113 -0
- package/src/cli/init.ts +838 -0
- package/src/cli/legal.ts +495 -0
- package/src/cli/log.ts +316 -0
- package/src/cli/loop.ts +1660 -0
- package/src/cli/manager.ts +878 -0
- package/src/cli/mcp.ts +275 -0
- package/src/cli/memory.ts +346 -0
- package/src/cli/metrics.ts +590 -0
- package/src/cli/monitor.ts +960 -0
- package/src/cli/mvp.ts +662 -0
- package/src/cli/onboard.ts +663 -0
- package/src/cli/orchestrator.ts +622 -0
- package/src/cli/plugin.ts +483 -0
- package/src/cli/prd.ts +671 -0
- package/src/cli/preseed-start.ts +1633 -0
- package/src/cli/preseed.ts +2434 -0
- package/src/cli/project.ts +526 -0
- package/src/cli/quality.ts +885 -0
- package/src/cli/security.ts +1079 -0
- package/src/cli/seed.ts +1224 -0
- package/src/cli/skill.ts +537 -0
- package/src/cli/suggest.ts +1225 -0
- package/src/cli/switch.ts +518 -0
- package/src/cli/task.ts +780 -0
- package/src/cli/telemetry.ts +172 -0
- package/src/cli/todo.ts +627 -0
- package/src/cli/types.ts +15 -0
- package/src/cli/update.ts +334 -0
- package/src/cli/visualize.ts +609 -0
- package/src/cli/watch.ts +895 -0
- package/src/cli/workspace.ts +709 -0
- package/src/core/action-recorder.ts +673 -0
- package/src/core/analyze-workflow.ts +1453 -0
- package/src/core/api-client.ts +1120 -0
- package/src/core/audit-workflow.ts +1681 -0
- package/src/core/auth.ts +471 -0
- package/src/core/build-orchestrator.ts +509 -0
- package/src/core/build-state.ts +621 -0
- package/src/core/checkpoint-engine.ts +482 -0
- package/src/core/config.ts +1285 -0
- package/src/core/context-loader.ts +694 -0
- package/src/core/context.ts +410 -0
- package/src/core/deploy-workflow.ts +1085 -0
- package/src/core/entitlements.ts +322 -0
- package/src/core/github-sync.ts +720 -0
- package/src/core/index.ts +981 -0
- package/src/core/ingest.ts +1186 -0
- package/src/core/metrics-engine.ts +886 -0
- package/src/core/mvp.ts +847 -0
- package/src/core/onboard-workflow.ts +1293 -0
- package/src/core/policies.ts +81 -0
- package/src/core/preseed-workflow.ts +1163 -0
- package/src/core/preseed.ts +1826 -0
- package/src/core/project-context.ts +380 -0
- package/src/core/project-state.ts +699 -0
- package/src/core/r2-sync.ts +691 -0
- package/src/core/scaffold.ts +1715 -0
- package/src/core/session.ts +286 -0
- package/src/core/task-extractor.ts +799 -0
- package/src/core/telemetry.ts +371 -0
- package/src/core/tier-enforcement.ts +737 -0
- package/src/core/utils.ts +437 -0
- package/src/index.ts +29 -0
- package/src/intelligence/agent-collab.ts +2376 -0
- package/src/intelligence/auto-suggest.ts +713 -0
- package/src/intelligence/content-gen.ts +1351 -0
- package/src/intelligence/cross-project.ts +1692 -0
- package/src/intelligence/git-memory.ts +529 -0
- package/src/intelligence/index.ts +318 -0
- package/src/intelligence/orchestrator.ts +534 -0
- package/src/intelligence/prd.ts +466 -0
- package/src/intelligence/recommendations.ts +982 -0
- package/src/intelligence/workflow-composer.ts +1472 -0
- package/src/mcp/capabilities.ts +233 -0
- package/src/mcp/index.ts +37 -0
- package/src/mcp/registry.ts +1268 -0
- package/src/mcp/response-formatter.ts +797 -0
- package/src/mcp/server.ts +240 -0
- package/src/types/agent.ts +69 -0
- package/src/types/config.ts +86 -0
- package/src/types/context.ts +77 -0
- package/src/types/index.ts +53 -0
- package/src/types/mcp.ts +91 -0
- package/src/types/skills.ts +47 -0
- package/src/types/workflow.ts +155 -0
- package/generators/index.js +0 -18
package/src/cli/log.ts
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootspring Log Command
|
|
3
|
+
* View and manage action logs
|
|
4
|
+
*
|
|
5
|
+
* Commands:
|
|
6
|
+
* list List recent actions
|
|
7
|
+
* search <query> Search action logs
|
|
8
|
+
* show <filename> View a specific log
|
|
9
|
+
* export Export logs to a directory
|
|
10
|
+
* clear Clear old logs
|
|
11
|
+
*
|
|
12
|
+
* @package bootspring
|
|
13
|
+
* @module cli/log
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// Import JS modules with type interfaces
|
|
17
|
+
interface LogEntry {
|
|
18
|
+
type: string;
|
|
19
|
+
timestamp: string;
|
|
20
|
+
agent?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
filename: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface SearchResult {
|
|
26
|
+
type: string;
|
|
27
|
+
file: string;
|
|
28
|
+
matches?: Array<{
|
|
29
|
+
line: number;
|
|
30
|
+
preview: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface LogDetails {
|
|
35
|
+
type: string;
|
|
36
|
+
relativePath: string;
|
|
37
|
+
content: string;
|
|
38
|
+
metadata?: {
|
|
39
|
+
size: number;
|
|
40
|
+
modifiedRelative: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface ActionRecorderModule {
|
|
45
|
+
list(options: { type?: string | undefined; limit?: number | undefined }): LogEntry[];
|
|
46
|
+
search(query: string, options: { limit?: number | undefined }): SearchResult[];
|
|
47
|
+
get(filename: string): LogDetails | null;
|
|
48
|
+
exportLogs(outputDir: string): { count: number; outputDir: string };
|
|
49
|
+
clearOld(options: { olderThanDays: number }): { deleted: number };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface ParsedArgs {
|
|
53
|
+
_: string[];
|
|
54
|
+
type?: string;
|
|
55
|
+
limit?: string;
|
|
56
|
+
output?: string;
|
|
57
|
+
o?: string;
|
|
58
|
+
days?: string;
|
|
59
|
+
force?: boolean;
|
|
60
|
+
f?: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
64
|
+
const actionRecorder = require('../../core/action-recorder') as ActionRecorderModule;
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
66
|
+
const utils = require('../../core/utils') as typeof import('../core/utils');
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Run log command
|
|
70
|
+
*/
|
|
71
|
+
export async function run(args: string[]): Promise<void> {
|
|
72
|
+
const parsedArgs = utils.parseArgs(args) as ParsedArgs;
|
|
73
|
+
const subcommand = parsedArgs._[0] || 'list';
|
|
74
|
+
const subArgs = args.slice(1);
|
|
75
|
+
|
|
76
|
+
switch (subcommand) {
|
|
77
|
+
case 'list':
|
|
78
|
+
case 'ls':
|
|
79
|
+
listLogs(parsedArgs);
|
|
80
|
+
return;
|
|
81
|
+
case 'search':
|
|
82
|
+
case 'find':
|
|
83
|
+
searchLogs(subArgs);
|
|
84
|
+
return;
|
|
85
|
+
case 'show':
|
|
86
|
+
case 'get':
|
|
87
|
+
case 'view':
|
|
88
|
+
showLog(subArgs);
|
|
89
|
+
return;
|
|
90
|
+
case 'export':
|
|
91
|
+
exportLogs(parsedArgs);
|
|
92
|
+
return;
|
|
93
|
+
case 'clear':
|
|
94
|
+
case 'clean':
|
|
95
|
+
clearLogs(parsedArgs);
|
|
96
|
+
return;
|
|
97
|
+
case 'help':
|
|
98
|
+
case '-h':
|
|
99
|
+
case '--help':
|
|
100
|
+
showHelp();
|
|
101
|
+
return;
|
|
102
|
+
default:
|
|
103
|
+
utils.print.error(`Unknown subcommand: ${subcommand}`);
|
|
104
|
+
showHelp();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* List recent action logs
|
|
110
|
+
*/
|
|
111
|
+
function listLogs(args: ParsedArgs): void {
|
|
112
|
+
utils.print.header('Action Logs');
|
|
113
|
+
|
|
114
|
+
const type = args.type;
|
|
115
|
+
const limit = args.limit ? parseInt(args.limit, 10) : 20;
|
|
116
|
+
|
|
117
|
+
const logs = actionRecorder.list({ type, limit });
|
|
118
|
+
|
|
119
|
+
if (logs.length === 0) {
|
|
120
|
+
utils.print.info('No action logs found');
|
|
121
|
+
utils.print.dim('Actions are automatically recorded when you use bootspring');
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Group by type
|
|
126
|
+
const grouped: Record<string, LogEntry[]> = {};
|
|
127
|
+
for (const log of logs) {
|
|
128
|
+
if (!grouped[log.type]) {
|
|
129
|
+
grouped[log.type] = [];
|
|
130
|
+
}
|
|
131
|
+
const group = grouped[log.type];
|
|
132
|
+
if (group) {
|
|
133
|
+
group.push(log);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
for (const [logType, entries] of Object.entries(grouped)) {
|
|
138
|
+
console.log(`\n${utils.COLORS.bold}${logType}${utils.COLORS.reset} (${entries.length})`);
|
|
139
|
+
|
|
140
|
+
for (const entry of entries) {
|
|
141
|
+
const time = new Date(entry.timestamp).toLocaleString();
|
|
142
|
+
const agent = entry.agent ? ` [${entry.agent}]` : '';
|
|
143
|
+
const title = entry.title || entry.filename;
|
|
144
|
+
|
|
145
|
+
console.log(` ${utils.COLORS.dim}${time}${utils.COLORS.reset}${agent} ${title}`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
console.log(`\n${utils.COLORS.dim}Total: ${logs.length} entries${utils.COLORS.reset}`);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Search action logs
|
|
154
|
+
*/
|
|
155
|
+
function searchLogs(args: string[]): void {
|
|
156
|
+
const parsedArgs = utils.parseArgs(args) as ParsedArgs;
|
|
157
|
+
const query = parsedArgs._[0];
|
|
158
|
+
|
|
159
|
+
if (!query) {
|
|
160
|
+
utils.print.error('Please specify a search query');
|
|
161
|
+
utils.print.dim('Example: bootspring log search "authentication"');
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
utils.print.header(`Searching logs for: ${query}`);
|
|
166
|
+
|
|
167
|
+
const limit = parsedArgs.limit ? parseInt(parsedArgs.limit, 10) : 20;
|
|
168
|
+
const results = actionRecorder.search(query, { limit });
|
|
169
|
+
|
|
170
|
+
if (results.length === 0) {
|
|
171
|
+
utils.print.warning('No results found');
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
console.log(`${utils.COLORS.dim}Found ${results.length} result(s)${utils.COLORS.reset}\n`);
|
|
176
|
+
|
|
177
|
+
for (const result of results) {
|
|
178
|
+
console.log(`${utils.COLORS.bold}${result.type}${utils.COLORS.reset}: ${result.file}`);
|
|
179
|
+
|
|
180
|
+
if (result.matches) {
|
|
181
|
+
for (const match of result.matches) {
|
|
182
|
+
console.log(` ${utils.COLORS.dim}L${match.line}:${utils.COLORS.reset} ${highlightMatch(match.preview, query)}`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
console.log('');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Show a specific log entry
|
|
191
|
+
*/
|
|
192
|
+
function showLog(args: string[]): void {
|
|
193
|
+
const parsedArgs = utils.parseArgs(args) as ParsedArgs;
|
|
194
|
+
const filename = parsedArgs._[0];
|
|
195
|
+
|
|
196
|
+
if (!filename) {
|
|
197
|
+
utils.print.error('Please specify a log filename');
|
|
198
|
+
utils.print.dim('Example: bootspring log show 2026-02-16-12-30-00-agent.md');
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const log = actionRecorder.get(filename);
|
|
203
|
+
|
|
204
|
+
if (!log) {
|
|
205
|
+
utils.print.error(`Log not found: ${filename}`);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
utils.print.header(`Log: ${filename}`);
|
|
210
|
+
console.log(`${utils.COLORS.dim}Type: ${log.type} | Path: ${log.relativePath}${utils.COLORS.reset}\n`);
|
|
211
|
+
|
|
212
|
+
if (log.metadata) {
|
|
213
|
+
console.log(`${utils.COLORS.dim}Size: ${formatSize(log.metadata.size)} | Modified: ${log.metadata.modifiedRelative}${utils.COLORS.reset}\n`);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
console.log(log.content);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Export logs to a directory
|
|
221
|
+
*/
|
|
222
|
+
function exportLogs(args: ParsedArgs): void {
|
|
223
|
+
const outputDir = args.output || args.o || './bootspring-logs-export';
|
|
224
|
+
|
|
225
|
+
const spinner = utils.createSpinner('Exporting logs...').start();
|
|
226
|
+
|
|
227
|
+
try {
|
|
228
|
+
const result = actionRecorder.exportLogs(outputDir);
|
|
229
|
+
spinner.succeed(`Exported ${result.count} logs to ${result.outputDir}`);
|
|
230
|
+
} catch (error) {
|
|
231
|
+
spinner.fail(`Export failed: ${(error as Error).message}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Clear old logs
|
|
237
|
+
*/
|
|
238
|
+
function clearLogs(args: ParsedArgs): void {
|
|
239
|
+
const days = args.days ? parseInt(args.days, 10) : 30;
|
|
240
|
+
const force = args.force || args.f;
|
|
241
|
+
|
|
242
|
+
if (!force) {
|
|
243
|
+
utils.print.warning(`This will delete logs older than ${days} days`);
|
|
244
|
+
utils.print.dim('Use --force to confirm');
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const spinner = utils.createSpinner('Clearing old logs...').start();
|
|
249
|
+
|
|
250
|
+
try {
|
|
251
|
+
const result = actionRecorder.clearOld({ olderThanDays: days });
|
|
252
|
+
spinner.succeed(`Deleted ${result.deleted} old log entries`);
|
|
253
|
+
} catch (error) {
|
|
254
|
+
spinner.fail(`Clear failed: ${(error as Error).message}`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Show help
|
|
260
|
+
*/
|
|
261
|
+
function showHelp(): void {
|
|
262
|
+
console.log(`
|
|
263
|
+
${utils.COLORS.cyan}${utils.COLORS.bold}⚡ Bootspring Log${utils.COLORS.reset}
|
|
264
|
+
${utils.COLORS.dim}View and manage action logs${utils.COLORS.reset}
|
|
265
|
+
|
|
266
|
+
${utils.COLORS.bold}Usage:${utils.COLORS.reset}
|
|
267
|
+
bootspring log <command> [options]
|
|
268
|
+
|
|
269
|
+
${utils.COLORS.bold}Commands:${utils.COLORS.reset}
|
|
270
|
+
${utils.COLORS.cyan}list${utils.COLORS.reset} List recent actions (default)
|
|
271
|
+
${utils.COLORS.cyan}search <query>${utils.COLORS.reset} Search action logs
|
|
272
|
+
${utils.COLORS.cyan}show <filename>${utils.COLORS.reset} View a specific log
|
|
273
|
+
${utils.COLORS.cyan}export${utils.COLORS.reset} Export logs to a directory
|
|
274
|
+
${utils.COLORS.cyan}clear${utils.COLORS.reset} Clear old logs
|
|
275
|
+
|
|
276
|
+
${utils.COLORS.bold}Options:${utils.COLORS.reset}
|
|
277
|
+
--type=<type> Filter by log type (agent, code, decision, fix, business, meeting)
|
|
278
|
+
--limit=<n> Limit results (default: 20)
|
|
279
|
+
--output=<dir> Export output directory
|
|
280
|
+
--days=<n> Clear logs older than N days (default: 30)
|
|
281
|
+
--force Confirm destructive actions
|
|
282
|
+
|
|
283
|
+
${utils.COLORS.bold}Log Types:${utils.COLORS.reset}
|
|
284
|
+
agent Agent invocation logs
|
|
285
|
+
code Code generation logs
|
|
286
|
+
decision Decision records
|
|
287
|
+
fix Bug fix documentation
|
|
288
|
+
business Business action logs
|
|
289
|
+
meeting Meeting notes
|
|
290
|
+
|
|
291
|
+
${utils.COLORS.bold}Examples:${utils.COLORS.reset}
|
|
292
|
+
bootspring log
|
|
293
|
+
bootspring log list --type=agent
|
|
294
|
+
bootspring log search "authentication"
|
|
295
|
+
bootspring log show 2026-02-16-agent-frontend.md
|
|
296
|
+
bootspring log export --output=./logs
|
|
297
|
+
bootspring log clear --days=60 --force
|
|
298
|
+
`);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Format file size
|
|
303
|
+
*/
|
|
304
|
+
function formatSize(bytes: number): string {
|
|
305
|
+
if (bytes < 1024) return `${bytes}B`;
|
|
306
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}KB`;
|
|
307
|
+
return `${(bytes / 1024 / 1024).toFixed(1)}MB`;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Highlight search match in text
|
|
312
|
+
*/
|
|
313
|
+
function highlightMatch(text: string, query: string): string {
|
|
314
|
+
const regex = new RegExp(`(${query})`, 'gi');
|
|
315
|
+
return text.replace(regex, `${utils.COLORS.yellow}$1${utils.COLORS.reset}`);
|
|
316
|
+
}
|