@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
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
export { A as AIPlugin, b as AIPluginInput, d as AIPluginSchema, e as AgentConfig, f as AgentConfigSchema, g as AgentsConfig, h as AgentsConfigSchema, i as AnalyticsPlugin, j as AnalyticsPluginInput, k as AnalyticsPluginSchema, l as AuthPlugin, m as AuthPluginInput, n as AuthPluginSchema, B as BasePlugin, o as BasePluginInput, p as CONFIG_FILES, q as CONFIG_PRESETS, r as Config, C as ConfigInput, s as ConfigProjectConfig, t as ConfigSchema, u as ConfigStackConfig, v as ConfigWorkflowPhase, w as ContextConfig, x as ContextConfigSchema, y as ContextOptions, z as ContextValidationResult, D as DEFAULT_CONFIG, E as DashboardConfig, F as DashboardConfigSchema, G as DatabasePlugin, H as DatabasePluginInput, I as DatabasePluginSchema, J as EmailPlugin, K as EmailPluginInput, M as EmailPluginSchema, N as EnabledPlugin, O as EnabledPlugins, Q as GitInfo, R as ListPresetsOptions, S as LoadWithValidationOptions, L as LoadedConfig, T as MonitoringPlugin, U as MonitoringPluginInput, V as MonitoringPluginSchema, W as PathsConfig, X as PathsConfigSchema, Y as PaymentsPlugin, Z as PaymentsPluginInput, _ as PaymentsPluginSchema, $ as PluginSchema, a0 as Plugins, a1 as PluginsInput, a2 as PluginsSchema, a3 as PresetDefinition, a4 as PresetInfo, a5 as ProjectConfigSchema, P as ProjectContext, a6 as ProjectFiles, a7 as ProjectState, a8 as QualityCheck, a9 as QualityConfig, aa as QualityConfigSchema, ab as SectionValidationResult, ac as SecurityPlugin, ad as SecurityPluginInput, ae as SecurityPluginSchema, af as SkillConfig, ag as SkillConfigSchema, ah as SkillsConfig, ai as SkillsConfigSchema, aj as StackConfigSchema, ak as TestingPlugin, al as TestingPluginInput, am as TestingPluginSchema, an as ValidateOptions, ao as ValidationCheck, ap as ValidationResult, aq as WorkflowConfig, ar as WorkflowConfigSchema, as as WorkflowPhaseSchema, at as WorkflowsConfig, au as WorkflowsConfigSchema, av as applyPreset, aw as combinePresets, c as config, a as context, ax as createCustomPreset, ay as deepMerge, az as findConfigFile, aA as findProjectRoot, aB as formatValidationErrors, aC as generateSummary, aD as getContext, aE as getDefaults, aF as getEnabledPlugins, aG as getGitInfo, aH as getPreset, aI as getPresetsByTag, aJ as getProjectFiles, aK as getProjectState, aL as getValidationHint, aM as listPresets, aN as load, aO as loadWithValidation, aP as parseConfig, aQ as parsePresetString, aR as resolvePresetChain, aS as save, aT as validate, aU as validateContext, aV as validatePresets, aW as validateSection } from '../context-McpJQa_2.js';
|
|
2
|
+
import 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Bootspring Utilities
|
|
6
|
+
* Shared utility functions
|
|
7
|
+
*
|
|
8
|
+
* @package bootspring
|
|
9
|
+
* @module core/utils
|
|
10
|
+
*/
|
|
11
|
+
declare const COLORS: {
|
|
12
|
+
readonly reset: "\u001B[0m";
|
|
13
|
+
readonly bold: "\u001B[1m";
|
|
14
|
+
readonly dim: "\u001B[2m";
|
|
15
|
+
readonly italic: "\u001B[3m";
|
|
16
|
+
readonly underline: "\u001B[4m";
|
|
17
|
+
readonly black: "\u001B[30m";
|
|
18
|
+
readonly red: "\u001B[31m";
|
|
19
|
+
readonly green: "\u001B[32m";
|
|
20
|
+
readonly yellow: "\u001B[33m";
|
|
21
|
+
readonly blue: "\u001B[34m";
|
|
22
|
+
readonly magenta: "\u001B[35m";
|
|
23
|
+
readonly cyan: "\u001B[36m";
|
|
24
|
+
readonly white: "\u001B[37m";
|
|
25
|
+
readonly bgBlack: "\u001B[40m";
|
|
26
|
+
readonly bgRed: "\u001B[41m";
|
|
27
|
+
readonly bgGreen: "\u001B[42m";
|
|
28
|
+
readonly bgYellow: "\u001B[43m";
|
|
29
|
+
readonly bgBlue: "\u001B[44m";
|
|
30
|
+
readonly bgMagenta: "\u001B[45m";
|
|
31
|
+
readonly bgCyan: "\u001B[46m";
|
|
32
|
+
readonly bgWhite: "\u001B[47m";
|
|
33
|
+
};
|
|
34
|
+
type ColorName = keyof typeof COLORS;
|
|
35
|
+
/**
|
|
36
|
+
* Spinner controller interface
|
|
37
|
+
*/
|
|
38
|
+
interface Spinner {
|
|
39
|
+
start(): Spinner;
|
|
40
|
+
succeed(text?: string): Spinner;
|
|
41
|
+
fail(text?: string): Spinner;
|
|
42
|
+
warn(text?: string): Spinner;
|
|
43
|
+
info(text?: string): Spinner;
|
|
44
|
+
stop(): Spinner;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Parsed command line arguments
|
|
48
|
+
*/
|
|
49
|
+
interface ParsedArgs {
|
|
50
|
+
_: string[];
|
|
51
|
+
[key: string]: string | boolean | string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Styled console output
|
|
55
|
+
*/
|
|
56
|
+
declare const print: {
|
|
57
|
+
info: (msg: string) => void;
|
|
58
|
+
success: (msg: string) => void;
|
|
59
|
+
warning: (msg: string) => void;
|
|
60
|
+
error: (msg: string) => void;
|
|
61
|
+
debug: (msg: string) => void;
|
|
62
|
+
header: (msg: string) => void;
|
|
63
|
+
dim: (msg: string) => void;
|
|
64
|
+
brand: (msg: string) => void;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Create a spinner for async operations
|
|
68
|
+
*/
|
|
69
|
+
declare function createSpinner(message: string): Spinner;
|
|
70
|
+
/**
|
|
71
|
+
* Ensure directory exists
|
|
72
|
+
*/
|
|
73
|
+
declare function ensureDir$2(dirPath: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Read file safely
|
|
76
|
+
*/
|
|
77
|
+
declare function readFile(filepath: string, defaultValue?: string | null): string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Write file safely
|
|
80
|
+
*/
|
|
81
|
+
declare function writeFile(filepath: string, content: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Check if file exists
|
|
84
|
+
*/
|
|
85
|
+
declare function fileExists(filepath: string): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Get file modification time
|
|
88
|
+
*/
|
|
89
|
+
declare function getFileTime(filepath: string): Date | null;
|
|
90
|
+
/**
|
|
91
|
+
* Format date as ISO string without time
|
|
92
|
+
*/
|
|
93
|
+
declare function formatDate(date?: Date): string;
|
|
94
|
+
/**
|
|
95
|
+
* Format date as relative time
|
|
96
|
+
*/
|
|
97
|
+
declare function formatRelativeTime(date: Date): string;
|
|
98
|
+
/**
|
|
99
|
+
* Slugify a string
|
|
100
|
+
*/
|
|
101
|
+
declare function slugify(str: string): string;
|
|
102
|
+
/**
|
|
103
|
+
* Truncate string with ellipsis
|
|
104
|
+
*/
|
|
105
|
+
declare function truncate(str: string, length?: number): string;
|
|
106
|
+
/**
|
|
107
|
+
* Parse command line arguments
|
|
108
|
+
*/
|
|
109
|
+
declare function parseArgs(args: string[]): ParsedArgs;
|
|
110
|
+
/**
|
|
111
|
+
* Create a simple table for console output
|
|
112
|
+
*/
|
|
113
|
+
declare function createTable(headers: string[], rows: (string | number)[][]): string;
|
|
114
|
+
/**
|
|
115
|
+
* Deep clone an object
|
|
116
|
+
*/
|
|
117
|
+
declare function deepClone<T>(obj: T): T;
|
|
118
|
+
/**
|
|
119
|
+
* Check if running in CI environment
|
|
120
|
+
*/
|
|
121
|
+
declare function isCI(): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Package.json structure
|
|
124
|
+
*/
|
|
125
|
+
interface PackageJson {
|
|
126
|
+
name?: string;
|
|
127
|
+
version?: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
main?: string;
|
|
130
|
+
scripts?: Record<string, string>;
|
|
131
|
+
dependencies?: Record<string, string>;
|
|
132
|
+
devDependencies?: Record<string, string>;
|
|
133
|
+
[key: string]: unknown;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Get package.json from project
|
|
137
|
+
*/
|
|
138
|
+
declare function getPackageJson(projectRoot: string): PackageJson | null;
|
|
139
|
+
/**
|
|
140
|
+
* Check if running in MCP context (AI assistant integration only)
|
|
141
|
+
*/
|
|
142
|
+
declare function isMCPContext(): boolean;
|
|
143
|
+
interface RequireMCPOptions {
|
|
144
|
+
silent?: boolean;
|
|
145
|
+
brief?: boolean;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Print MCP recommendation message and return false if not in MCP context.
|
|
149
|
+
* This is a soft gate - callers should provide degraded functionality.
|
|
150
|
+
*/
|
|
151
|
+
declare function requireMCP(feature: string, options?: RequireMCPOptions): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Print a warning about MCP-only features (non-blocking)
|
|
154
|
+
*/
|
|
155
|
+
declare function warnMCPLimited(feature: string): void;
|
|
156
|
+
|
|
157
|
+
declare const utils_COLORS: typeof COLORS;
|
|
158
|
+
type utils_ColorName = ColorName;
|
|
159
|
+
type utils_PackageJson = PackageJson;
|
|
160
|
+
type utils_ParsedArgs = ParsedArgs;
|
|
161
|
+
type utils_RequireMCPOptions = RequireMCPOptions;
|
|
162
|
+
type utils_Spinner = Spinner;
|
|
163
|
+
declare const utils_createSpinner: typeof createSpinner;
|
|
164
|
+
declare const utils_createTable: typeof createTable;
|
|
165
|
+
declare const utils_deepClone: typeof deepClone;
|
|
166
|
+
declare const utils_fileExists: typeof fileExists;
|
|
167
|
+
declare const utils_formatDate: typeof formatDate;
|
|
168
|
+
declare const utils_formatRelativeTime: typeof formatRelativeTime;
|
|
169
|
+
declare const utils_getFileTime: typeof getFileTime;
|
|
170
|
+
declare const utils_getPackageJson: typeof getPackageJson;
|
|
171
|
+
declare const utils_isCI: typeof isCI;
|
|
172
|
+
declare const utils_isMCPContext: typeof isMCPContext;
|
|
173
|
+
declare const utils_parseArgs: typeof parseArgs;
|
|
174
|
+
declare const utils_print: typeof print;
|
|
175
|
+
declare const utils_readFile: typeof readFile;
|
|
176
|
+
declare const utils_requireMCP: typeof requireMCP;
|
|
177
|
+
declare const utils_slugify: typeof slugify;
|
|
178
|
+
declare const utils_truncate: typeof truncate;
|
|
179
|
+
declare const utils_warnMCPLimited: typeof warnMCPLimited;
|
|
180
|
+
declare const utils_writeFile: typeof writeFile;
|
|
181
|
+
declare namespace utils {
|
|
182
|
+
export { utils_COLORS as COLORS, type utils_ColorName as ColorName, type utils_PackageJson as PackageJson, type utils_ParsedArgs as ParsedArgs, type utils_RequireMCPOptions as RequireMCPOptions, type utils_Spinner as Spinner, utils_createSpinner as createSpinner, utils_createTable as createTable, utils_deepClone as deepClone, ensureDir$2 as ensureDir, utils_fileExists as fileExists, utils_formatDate as formatDate, utils_formatRelativeTime as formatRelativeTime, utils_getFileTime as getFileTime, utils_getPackageJson as getPackageJson, utils_isCI as isCI, utils_isMCPContext as isMCPContext, utils_parseArgs as parseArgs, utils_print as print, utils_readFile as readFile, utils_requireMCP as requireMCP, utils_slugify as slugify, utils_truncate as truncate, utils_warnMCPLimited as warnMCPLimited, utils_writeFile as writeFile };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Bootspring Telemetry
|
|
187
|
+
* Lightweight JSONL event emitter for product instrumentation.
|
|
188
|
+
*
|
|
189
|
+
* @package bootspring
|
|
190
|
+
* @module core/telemetry
|
|
191
|
+
*/
|
|
192
|
+
declare const MAX_EVENTS_LIMIT = 10000;
|
|
193
|
+
/**
|
|
194
|
+
* Telemetry event record
|
|
195
|
+
*/
|
|
196
|
+
interface TelemetryRecord {
|
|
197
|
+
timestamp: string;
|
|
198
|
+
event: string;
|
|
199
|
+
payload: Record<string, unknown>;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Telemetry status
|
|
203
|
+
*/
|
|
204
|
+
interface TelemetryStatus {
|
|
205
|
+
file: string;
|
|
206
|
+
exists: boolean;
|
|
207
|
+
count: number;
|
|
208
|
+
lastEventAt: string | null;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Upload result
|
|
212
|
+
*/
|
|
213
|
+
interface UploadResult {
|
|
214
|
+
uploaded: number;
|
|
215
|
+
remaining: number;
|
|
216
|
+
endpoint: string;
|
|
217
|
+
attempted?: number;
|
|
218
|
+
batches?: number;
|
|
219
|
+
attempts?: number;
|
|
220
|
+
failedBatches?: FailedBatch[];
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Failed batch info
|
|
224
|
+
*/
|
|
225
|
+
interface FailedBatch {
|
|
226
|
+
index: number;
|
|
227
|
+
count: number;
|
|
228
|
+
error: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* List events options
|
|
232
|
+
*/
|
|
233
|
+
interface ListEventsOptions {
|
|
234
|
+
projectRoot?: string | undefined;
|
|
235
|
+
event?: string | undefined;
|
|
236
|
+
from?: string | Date | undefined;
|
|
237
|
+
to?: string | Date | undefined;
|
|
238
|
+
limit?: number | undefined;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Upload options
|
|
242
|
+
*/
|
|
243
|
+
interface UploadOptions {
|
|
244
|
+
projectRoot?: string | undefined;
|
|
245
|
+
endpoint?: string | undefined;
|
|
246
|
+
token?: string | undefined;
|
|
247
|
+
event?: string | undefined;
|
|
248
|
+
limit?: number | undefined;
|
|
249
|
+
batchSize?: number | undefined;
|
|
250
|
+
clearOnSuccess?: boolean | undefined;
|
|
251
|
+
maxRetries?: number | undefined;
|
|
252
|
+
retryDelayMs?: number | undefined;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Emit event options
|
|
256
|
+
*/
|
|
257
|
+
interface EmitOptions {
|
|
258
|
+
projectRoot?: string;
|
|
259
|
+
}
|
|
260
|
+
declare function getTelemetryDir(projectRoot?: string): string;
|
|
261
|
+
declare function getTelemetryFile(projectRoot?: string): string;
|
|
262
|
+
declare function ensureTelemetryDir(projectRoot?: string): string;
|
|
263
|
+
declare function emitEvent(event: string, payload?: Record<string, unknown>, options?: EmitOptions): TelemetryRecord;
|
|
264
|
+
declare function listEvents(options?: ListEventsOptions): TelemetryRecord[];
|
|
265
|
+
interface ClearResult {
|
|
266
|
+
cleared: number;
|
|
267
|
+
file: string;
|
|
268
|
+
}
|
|
269
|
+
declare function clearEvents(options?: {
|
|
270
|
+
projectRoot?: string;
|
|
271
|
+
}): ClearResult;
|
|
272
|
+
declare function getStatus(options?: {
|
|
273
|
+
projectRoot?: string;
|
|
274
|
+
}): TelemetryStatus;
|
|
275
|
+
declare function uploadEvents(options?: UploadOptions): Promise<UploadResult>;
|
|
276
|
+
declare const track: typeof emitEvent;
|
|
277
|
+
|
|
278
|
+
type telemetry_ClearResult = ClearResult;
|
|
279
|
+
type telemetry_EmitOptions = EmitOptions;
|
|
280
|
+
type telemetry_FailedBatch = FailedBatch;
|
|
281
|
+
type telemetry_ListEventsOptions = ListEventsOptions;
|
|
282
|
+
declare const telemetry_MAX_EVENTS_LIMIT: typeof MAX_EVENTS_LIMIT;
|
|
283
|
+
type telemetry_TelemetryRecord = TelemetryRecord;
|
|
284
|
+
type telemetry_TelemetryStatus = TelemetryStatus;
|
|
285
|
+
type telemetry_UploadOptions = UploadOptions;
|
|
286
|
+
type telemetry_UploadResult = UploadResult;
|
|
287
|
+
declare const telemetry_clearEvents: typeof clearEvents;
|
|
288
|
+
declare const telemetry_emitEvent: typeof emitEvent;
|
|
289
|
+
declare const telemetry_ensureTelemetryDir: typeof ensureTelemetryDir;
|
|
290
|
+
declare const telemetry_getStatus: typeof getStatus;
|
|
291
|
+
declare const telemetry_getTelemetryDir: typeof getTelemetryDir;
|
|
292
|
+
declare const telemetry_getTelemetryFile: typeof getTelemetryFile;
|
|
293
|
+
declare const telemetry_listEvents: typeof listEvents;
|
|
294
|
+
declare const telemetry_track: typeof track;
|
|
295
|
+
declare const telemetry_uploadEvents: typeof uploadEvents;
|
|
296
|
+
declare namespace telemetry {
|
|
297
|
+
export { type telemetry_ClearResult as ClearResult, type telemetry_EmitOptions as EmitOptions, type telemetry_FailedBatch as FailedBatch, type telemetry_ListEventsOptions as ListEventsOptions, telemetry_MAX_EVENTS_LIMIT as MAX_EVENTS_LIMIT, type telemetry_TelemetryRecord as TelemetryRecord, type telemetry_TelemetryStatus as TelemetryStatus, type telemetry_UploadOptions as UploadOptions, type telemetry_UploadResult as UploadResult, telemetry_clearEvents as clearEvents, telemetry_emitEvent as emitEvent, telemetry_ensureTelemetryDir as ensureTelemetryDir, telemetry_getStatus as getStatus, telemetry_getTelemetryDir as getTelemetryDir, telemetry_getTelemetryFile as getTelemetryFile, telemetry_listEvents as listEvents, telemetry_track as track, telemetry_uploadEvents as uploadEvents };
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Bootspring Session Manager
|
|
302
|
+
*
|
|
303
|
+
* Manages the current project session context linked to bootspring.com API.
|
|
304
|
+
* This tracks which project the CLI is currently working with.
|
|
305
|
+
*
|
|
306
|
+
* @package bootspring
|
|
307
|
+
* @module core/session
|
|
308
|
+
*/
|
|
309
|
+
declare const BOOTSPRING_DIR$1: string;
|
|
310
|
+
declare const SESSION_FILE: string;
|
|
311
|
+
declare const LOCAL_CONFIG_NAME = ".bootspring.json";
|
|
312
|
+
/**
|
|
313
|
+
* Project info structure
|
|
314
|
+
*/
|
|
315
|
+
interface ProjectInfo {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
slug?: string | undefined;
|
|
319
|
+
lastUsed?: string | undefined;
|
|
320
|
+
[key: string]: unknown;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Session data structure
|
|
324
|
+
*/
|
|
325
|
+
interface SessionData {
|
|
326
|
+
project?: ProjectInfo;
|
|
327
|
+
recentProjects?: ProjectInfo[];
|
|
328
|
+
updatedAt?: string;
|
|
329
|
+
[key: string]: unknown;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Local config structure
|
|
333
|
+
*/
|
|
334
|
+
interface LocalConfig {
|
|
335
|
+
projectId?: string | undefined;
|
|
336
|
+
projectName?: string | undefined;
|
|
337
|
+
projectSlug?: string | undefined;
|
|
338
|
+
createdAt?: string | undefined;
|
|
339
|
+
_path?: string | undefined;
|
|
340
|
+
_dir?: string | undefined;
|
|
341
|
+
_fromJsConfig?: boolean | undefined;
|
|
342
|
+
[key: string]: unknown;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Effective project with source info
|
|
346
|
+
*/
|
|
347
|
+
interface EffectiveProject extends ProjectInfo {
|
|
348
|
+
source: 'local' | 'session';
|
|
349
|
+
_localConfig?: LocalConfig;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Session state for display
|
|
353
|
+
*/
|
|
354
|
+
interface SessionState {
|
|
355
|
+
hasSession: boolean;
|
|
356
|
+
project: EffectiveProject | null;
|
|
357
|
+
source: 'local' | 'session' | null;
|
|
358
|
+
hasLocalConfig: boolean;
|
|
359
|
+
localConfigPath?: string | undefined;
|
|
360
|
+
recentProjects: ProjectInfo[];
|
|
361
|
+
lastUpdated: string | null;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Ensure ~/.bootspring directory exists
|
|
365
|
+
*/
|
|
366
|
+
declare function ensureDir$1(): void;
|
|
367
|
+
/**
|
|
368
|
+
* Get current session data
|
|
369
|
+
*/
|
|
370
|
+
declare function getSession(): SessionData | null;
|
|
371
|
+
/**
|
|
372
|
+
* Save session data
|
|
373
|
+
*/
|
|
374
|
+
declare function saveSession(session: SessionData): void;
|
|
375
|
+
/**
|
|
376
|
+
* Clear session
|
|
377
|
+
*/
|
|
378
|
+
declare function clearSession(): void;
|
|
379
|
+
/**
|
|
380
|
+
* Get current project context
|
|
381
|
+
*/
|
|
382
|
+
declare function getCurrentProject(): ProjectInfo | null;
|
|
383
|
+
/**
|
|
384
|
+
* Set current project context
|
|
385
|
+
*/
|
|
386
|
+
declare function setCurrentProject(project: ProjectInfo): void;
|
|
387
|
+
/**
|
|
388
|
+
* Get recent projects
|
|
389
|
+
*/
|
|
390
|
+
declare function getRecentProjects(): ProjectInfo[];
|
|
391
|
+
/**
|
|
392
|
+
* Add to recent projects
|
|
393
|
+
*/
|
|
394
|
+
declare function addRecentProject(project: ProjectInfo): void;
|
|
395
|
+
/**
|
|
396
|
+
* Check if a local .bootspring.json or bootspring.config.js exists in cwd or ancestors
|
|
397
|
+
*/
|
|
398
|
+
declare function findLocalConfig(startDir?: string): LocalConfig | null;
|
|
399
|
+
/**
|
|
400
|
+
* Get effective project context (local config > session)
|
|
401
|
+
*/
|
|
402
|
+
declare function getEffectiveProject(): EffectiveProject | null;
|
|
403
|
+
/**
|
|
404
|
+
* Create a local .bootspring.json file
|
|
405
|
+
*/
|
|
406
|
+
declare function createLocalConfig(dir: string, project: ProjectInfo): string;
|
|
407
|
+
/**
|
|
408
|
+
* Get full session state for display
|
|
409
|
+
*/
|
|
410
|
+
declare function getSessionState(): SessionState;
|
|
411
|
+
|
|
412
|
+
type session_EffectiveProject = EffectiveProject;
|
|
413
|
+
declare const session_LOCAL_CONFIG_NAME: typeof LOCAL_CONFIG_NAME;
|
|
414
|
+
type session_LocalConfig = LocalConfig;
|
|
415
|
+
type session_ProjectInfo = ProjectInfo;
|
|
416
|
+
declare const session_SESSION_FILE: typeof SESSION_FILE;
|
|
417
|
+
type session_SessionData = SessionData;
|
|
418
|
+
type session_SessionState = SessionState;
|
|
419
|
+
declare const session_addRecentProject: typeof addRecentProject;
|
|
420
|
+
declare const session_clearSession: typeof clearSession;
|
|
421
|
+
declare const session_createLocalConfig: typeof createLocalConfig;
|
|
422
|
+
declare const session_findLocalConfig: typeof findLocalConfig;
|
|
423
|
+
declare const session_getCurrentProject: typeof getCurrentProject;
|
|
424
|
+
declare const session_getEffectiveProject: typeof getEffectiveProject;
|
|
425
|
+
declare const session_getRecentProjects: typeof getRecentProjects;
|
|
426
|
+
declare const session_getSession: typeof getSession;
|
|
427
|
+
declare const session_getSessionState: typeof getSessionState;
|
|
428
|
+
declare const session_saveSession: typeof saveSession;
|
|
429
|
+
declare const session_setCurrentProject: typeof setCurrentProject;
|
|
430
|
+
declare namespace session {
|
|
431
|
+
export { BOOTSPRING_DIR$1 as BOOTSPRING_DIR, type session_EffectiveProject as EffectiveProject, session_LOCAL_CONFIG_NAME as LOCAL_CONFIG_NAME, type session_LocalConfig as LocalConfig, type session_ProjectInfo as ProjectInfo, session_SESSION_FILE as SESSION_FILE, type session_SessionData as SessionData, type session_SessionState as SessionState, session_addRecentProject as addRecentProject, session_clearSession as clearSession, session_createLocalConfig as createLocalConfig, ensureDir$1 as ensureDir, session_findLocalConfig as findLocalConfig, session_getCurrentProject as getCurrentProject, session_getEffectiveProject as getEffectiveProject, session_getRecentProjects as getRecentProjects, session_getSession as getSession, session_getSessionState as getSessionState, session_saveSession as saveSession, session_setCurrentProject as setCurrentProject };
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Bootspring Auth Module
|
|
436
|
+
*
|
|
437
|
+
* Manages authentication tokens stored in ~/.bootspring/
|
|
438
|
+
*
|
|
439
|
+
* @package bootspring
|
|
440
|
+
* @module core/auth
|
|
441
|
+
*/
|
|
442
|
+
declare const BOOTSPRING_DIR: string;
|
|
443
|
+
declare const CREDENTIALS_FILE: string;
|
|
444
|
+
declare const CONFIG_FILE: string;
|
|
445
|
+
declare const DEVICE_FILE: string;
|
|
446
|
+
/**
|
|
447
|
+
* User info structure
|
|
448
|
+
*/
|
|
449
|
+
interface UserInfo {
|
|
450
|
+
id?: string;
|
|
451
|
+
email?: string;
|
|
452
|
+
name?: string;
|
|
453
|
+
tier?: string;
|
|
454
|
+
[key: string]: unknown;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Stored credentials structure
|
|
458
|
+
*/
|
|
459
|
+
interface Credentials {
|
|
460
|
+
token?: string | undefined;
|
|
461
|
+
refreshToken?: string | undefined;
|
|
462
|
+
expiresAt?: string | undefined;
|
|
463
|
+
apiKey?: string | undefined;
|
|
464
|
+
user?: UserInfo | undefined;
|
|
465
|
+
[key: string]: unknown;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Login response structure
|
|
469
|
+
*/
|
|
470
|
+
interface LoginResponse {
|
|
471
|
+
token: string;
|
|
472
|
+
refreshToken?: string;
|
|
473
|
+
expiresIn?: string;
|
|
474
|
+
user?: UserInfo;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Device info structure
|
|
478
|
+
*/
|
|
479
|
+
interface DeviceInfo {
|
|
480
|
+
deviceId: string;
|
|
481
|
+
fingerprint: string;
|
|
482
|
+
createdAt: string;
|
|
483
|
+
platform: string;
|
|
484
|
+
arch: string;
|
|
485
|
+
hostname: string;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Device context for auth requests
|
|
489
|
+
*/
|
|
490
|
+
interface DeviceContext {
|
|
491
|
+
deviceId: string;
|
|
492
|
+
platform: string;
|
|
493
|
+
arch: string;
|
|
494
|
+
hostname: string;
|
|
495
|
+
cliVersion: string;
|
|
496
|
+
nodeVersion: string;
|
|
497
|
+
timezone: string;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Global config structure
|
|
501
|
+
*/
|
|
502
|
+
interface GlobalConfig {
|
|
503
|
+
[key: string]: unknown;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Ensure ~/.bootspring directory exists
|
|
507
|
+
*/
|
|
508
|
+
declare function ensureDir(): void;
|
|
509
|
+
/**
|
|
510
|
+
* Get stored credentials
|
|
511
|
+
*/
|
|
512
|
+
declare function getCredentials(): Credentials | null;
|
|
513
|
+
/**
|
|
514
|
+
* Save credentials (encrypted)
|
|
515
|
+
*/
|
|
516
|
+
declare function saveCredentials(credentials: Credentials): void;
|
|
517
|
+
/**
|
|
518
|
+
* Clear credentials (logout)
|
|
519
|
+
*/
|
|
520
|
+
declare function clearCredentials(): void;
|
|
521
|
+
/**
|
|
522
|
+
* Get auth token (JWT)
|
|
523
|
+
*/
|
|
524
|
+
declare function getToken(): string | null;
|
|
525
|
+
/**
|
|
526
|
+
* Get API key (if using API key auth)
|
|
527
|
+
*/
|
|
528
|
+
declare function getApiKey(): string | null;
|
|
529
|
+
/**
|
|
530
|
+
* Check if using API key authentication
|
|
531
|
+
*/
|
|
532
|
+
declare function isApiKeyAuth(): boolean;
|
|
533
|
+
/**
|
|
534
|
+
* Get refresh token
|
|
535
|
+
*/
|
|
536
|
+
declare function getRefreshToken(): string | null;
|
|
537
|
+
/**
|
|
538
|
+
* Check if user is authenticated
|
|
539
|
+
*/
|
|
540
|
+
declare function isAuthenticated(): boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Get user info from stored credentials
|
|
543
|
+
*/
|
|
544
|
+
declare function getUser(): UserInfo | null;
|
|
545
|
+
/**
|
|
546
|
+
* Get user's current tier
|
|
547
|
+
*/
|
|
548
|
+
declare function getTier(): string;
|
|
549
|
+
/**
|
|
550
|
+
* Save login response (JWT auth)
|
|
551
|
+
*/
|
|
552
|
+
declare function login(response: LoginResponse): void;
|
|
553
|
+
/**
|
|
554
|
+
* Save API key credentials
|
|
555
|
+
*/
|
|
556
|
+
declare function loginWithApiKey(apiKey: string, user?: UserInfo): void;
|
|
557
|
+
/**
|
|
558
|
+
* Update tokens (after refresh)
|
|
559
|
+
*/
|
|
560
|
+
declare function updateTokens(response: LoginResponse): void;
|
|
561
|
+
/**
|
|
562
|
+
* Logout
|
|
563
|
+
*/
|
|
564
|
+
declare function logout(): void;
|
|
565
|
+
/**
|
|
566
|
+
* Get global config
|
|
567
|
+
*/
|
|
568
|
+
declare function getConfig(): GlobalConfig;
|
|
569
|
+
/**
|
|
570
|
+
* Save global config
|
|
571
|
+
*/
|
|
572
|
+
declare function saveConfig(config: GlobalConfig): void;
|
|
573
|
+
/**
|
|
574
|
+
* Get credentials file path (for display)
|
|
575
|
+
*/
|
|
576
|
+
declare function getCredentialsPath(): string;
|
|
577
|
+
/**
|
|
578
|
+
* Generate a stable device fingerprint based on machine characteristics
|
|
579
|
+
*/
|
|
580
|
+
declare function generateDeviceFingerprint(): string;
|
|
581
|
+
/**
|
|
582
|
+
* Get or create persistent device ID
|
|
583
|
+
*/
|
|
584
|
+
declare function getDeviceInfo(): DeviceInfo;
|
|
585
|
+
/**
|
|
586
|
+
* Get device ID for authentication requests
|
|
587
|
+
*/
|
|
588
|
+
declare function getDeviceId(): string;
|
|
589
|
+
/**
|
|
590
|
+
* Get full device context for authentication
|
|
591
|
+
*/
|
|
592
|
+
declare function getDeviceContext(): DeviceContext;
|
|
593
|
+
/**
|
|
594
|
+
* Clear device info (for testing or reset)
|
|
595
|
+
*/
|
|
596
|
+
declare function clearDeviceInfo(): void;
|
|
597
|
+
|
|
598
|
+
declare const auth_BOOTSPRING_DIR: typeof BOOTSPRING_DIR;
|
|
599
|
+
declare const auth_CONFIG_FILE: typeof CONFIG_FILE;
|
|
600
|
+
declare const auth_CREDENTIALS_FILE: typeof CREDENTIALS_FILE;
|
|
601
|
+
type auth_Credentials = Credentials;
|
|
602
|
+
declare const auth_DEVICE_FILE: typeof DEVICE_FILE;
|
|
603
|
+
type auth_DeviceContext = DeviceContext;
|
|
604
|
+
type auth_DeviceInfo = DeviceInfo;
|
|
605
|
+
type auth_GlobalConfig = GlobalConfig;
|
|
606
|
+
type auth_LoginResponse = LoginResponse;
|
|
607
|
+
type auth_UserInfo = UserInfo;
|
|
608
|
+
declare const auth_clearCredentials: typeof clearCredentials;
|
|
609
|
+
declare const auth_clearDeviceInfo: typeof clearDeviceInfo;
|
|
610
|
+
declare const auth_ensureDir: typeof ensureDir;
|
|
611
|
+
declare const auth_generateDeviceFingerprint: typeof generateDeviceFingerprint;
|
|
612
|
+
declare const auth_getApiKey: typeof getApiKey;
|
|
613
|
+
declare const auth_getConfig: typeof getConfig;
|
|
614
|
+
declare const auth_getCredentials: typeof getCredentials;
|
|
615
|
+
declare const auth_getCredentialsPath: typeof getCredentialsPath;
|
|
616
|
+
declare const auth_getDeviceContext: typeof getDeviceContext;
|
|
617
|
+
declare const auth_getDeviceId: typeof getDeviceId;
|
|
618
|
+
declare const auth_getDeviceInfo: typeof getDeviceInfo;
|
|
619
|
+
declare const auth_getRefreshToken: typeof getRefreshToken;
|
|
620
|
+
declare const auth_getTier: typeof getTier;
|
|
621
|
+
declare const auth_getToken: typeof getToken;
|
|
622
|
+
declare const auth_getUser: typeof getUser;
|
|
623
|
+
declare const auth_isApiKeyAuth: typeof isApiKeyAuth;
|
|
624
|
+
declare const auth_isAuthenticated: typeof isAuthenticated;
|
|
625
|
+
declare const auth_login: typeof login;
|
|
626
|
+
declare const auth_loginWithApiKey: typeof loginWithApiKey;
|
|
627
|
+
declare const auth_logout: typeof logout;
|
|
628
|
+
declare const auth_saveConfig: typeof saveConfig;
|
|
629
|
+
declare const auth_saveCredentials: typeof saveCredentials;
|
|
630
|
+
declare const auth_updateTokens: typeof updateTokens;
|
|
631
|
+
declare namespace auth {
|
|
632
|
+
export { auth_BOOTSPRING_DIR as BOOTSPRING_DIR, auth_CONFIG_FILE as CONFIG_FILE, auth_CREDENTIALS_FILE as CREDENTIALS_FILE, type auth_Credentials as Credentials, auth_DEVICE_FILE as DEVICE_FILE, type auth_DeviceContext as DeviceContext, type auth_DeviceInfo as DeviceInfo, type auth_GlobalConfig as GlobalConfig, type auth_LoginResponse as LoginResponse, type auth_UserInfo as UserInfo, auth_clearCredentials as clearCredentials, auth_clearDeviceInfo as clearDeviceInfo, auth_ensureDir as ensureDir, auth_generateDeviceFingerprint as generateDeviceFingerprint, auth_getApiKey as getApiKey, auth_getConfig as getConfig, auth_getCredentials as getCredentials, auth_getCredentialsPath as getCredentialsPath, auth_getDeviceContext as getDeviceContext, auth_getDeviceId as getDeviceId, auth_getDeviceInfo as getDeviceInfo, auth_getRefreshToken as getRefreshToken, auth_getTier as getTier, auth_getToken as getToken, auth_getUser as getUser, auth_isApiKeyAuth as isApiKeyAuth, auth_isAuthenticated as isAuthenticated, auth_login as login, auth_loginWithApiKey as loginWithApiKey, auth_logout as logout, auth_saveConfig as saveConfig, auth_saveCredentials as saveCredentials, auth_updateTokens as updateTokens };
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export { BOOTSPRING_DIR$1 as BOOTSPRING_DIR, COLORS, type ColorName, type Credentials, type DeviceContext, type DeviceInfo, type EffectiveProject, type EmitOptions, type GlobalConfig, LOCAL_CONFIG_NAME, type ListEventsOptions, type LocalConfig, type LoginResponse, MAX_EVENTS_LIMIT, type PackageJson, type ParsedArgs, type ProjectInfo, type RequireMCPOptions, SESSION_FILE, type SessionData, type SessionState, type Spinner, type TelemetryRecord, type TelemetryStatus, type UploadOptions, type UploadResult, type UserInfo, addRecentProject, auth, clearCredentials, clearDeviceInfo, clearEvents, clearSession, createLocalConfig, createSpinner, createTable, deepClone, emitEvent, ensureDir$2 as ensureDir, fileExists, findLocalConfig, formatDate, formatRelativeTime, generateDeviceFingerprint, getApiKey, getConfig, getCredentials, getCredentialsPath, getCurrentProject, getDeviceContext, getDeviceId, getDeviceInfo, getEffectiveProject, getFileTime, getPackageJson, getRecentProjects, getRefreshToken, getSession, getSessionState, getStatus, getTier, getToken, getUser, isApiKeyAuth, isAuthenticated, isCI, isMCPContext, listEvents, login, loginWithApiKey, logout, parseArgs, print, readFile, requireMCP, saveConfig, saveCredentials, saveSession, session, setCurrentProject, slugify, telemetry, track, truncate, updateTokens, uploadEvents, utils, warnMCPLimited, writeFile };
|