@girardmedia/bootspring 2.5.0 → 2.5.2
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 +9 -403
- package/bin/bootspring.js +1 -96
- package/dist/cli/index.js +65134 -0
- package/dist/cli-launcher.js +92 -0
- package/dist/core/index.d.ts +2110 -5582
- package/dist/core/index.js +2 -0
- package/dist/core.js +21123 -5413
- package/dist/mcp/index.d.ts +357 -1
- package/dist/mcp/index.js +2 -0
- package/dist/mcp-server.js +51948 -1976
- package/package.json +27 -63
- package/scripts/postinstall.cjs +144 -0
- package/LICENSE +0 -29
- package/dist/cli/index.cjs +0 -20776
- package/generators/api-docs.js +0 -827
- package/generators/decisions.js +0 -655
- package/generators/generate.js +0 -595
- package/generators/health.js +0 -942
- package/generators/index.ts +0 -82
- package/generators/presets/full.js +0 -28
- package/generators/presets/index.js +0 -12
- package/generators/presets/minimal.js +0 -29
- package/generators/presets/standard.js +0 -28
- package/generators/questionnaire.js +0 -414
- package/generators/sections/advanced.js +0 -136
- package/generators/sections/ai.js +0 -106
- package/generators/sections/auth.js +0 -89
- package/generators/sections/backend.js +0 -146
- package/generators/sections/business.js +0 -118
- package/generators/sections/content.js +0 -300
- package/generators/sections/deployment.js +0 -139
- package/generators/sections/features.js +0 -122
- package/generators/sections/frontend.js +0 -118
- package/generators/sections/identity.js +0 -76
- package/generators/sections/index.js +0 -40
- package/generators/sections/instructions.js +0 -146
- package/generators/sections/payments.js +0 -104
- package/generators/sections/plugins.js +0 -142
- package/generators/sections/pre-build.js +0 -130
- package/generators/sections/security.js +0 -127
- package/generators/sections/technical.js +0 -171
- package/generators/sections/testing.js +0 -125
- package/generators/sections/workflow.js +0 -104
- package/generators/sprint.js +0 -675
- package/generators/templates/agents.template.js +0 -199
- package/generators/templates/assistant-context.template.js +0 -83
- package/generators/templates/build-planning.template.js +0 -708
- package/generators/templates/claude.template.js +0 -379
- package/generators/templates/content.template.js +0 -819
- package/generators/templates/index.js +0 -16
- package/generators/templates/planning.template.js +0 -515
- package/generators/templates/seed.template.js +0 -109
- package/generators/visual-doc-generator.js +0 -910
- package/scripts/postinstall.js +0 -197
- /package/{claude-commands → assets/claude-commands}/agent.md +0 -0
- /package/{claude-commands → assets/claude-commands}/bs.md +0 -0
- /package/{claude-commands → assets/claude-commands}/build.md +0 -0
- /package/{claude-commands → assets/claude-commands}/skill.md +0 -0
- /package/{claude-commands → assets/claude-commands}/todo.md +0 -0
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1 +1,357 @@
|
|
|
1
|
-
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { ToolDefinition, ResourceDefinition, ToolHandler, ResourceHandler, InvokeToolOptions, InvokeToolResult, MCPToolResult, WorkflowDefinition, CapabilitiesManifest } from '@bootspring/types';
|
|
3
|
+
export { InvocationContext, InvokeToolOptions, InvokeToolResult, ResourceDefinition, ResourceHandler, ToolDefinition, ToolHandler } from '@bootspring/types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Bootspring MCP Server
|
|
7
|
+
* Model Context Protocol server for AI assistant integration
|
|
8
|
+
*
|
|
9
|
+
* @package @bootspring/mcp
|
|
10
|
+
* @module server
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface ValidationResult {
|
|
14
|
+
valid: boolean;
|
|
15
|
+
errors: string[];
|
|
16
|
+
}
|
|
17
|
+
interface RegistryExports {
|
|
18
|
+
TOOLS: ToolDefinition[];
|
|
19
|
+
RESOURCES: ResourceDefinition[];
|
|
20
|
+
toolHandlers: Record<string, ToolHandler>;
|
|
21
|
+
resourceHandlers: Record<string, ResourceHandler>;
|
|
22
|
+
trackTelemetry: (event: string, payload: Record<string, unknown>) => void;
|
|
23
|
+
}
|
|
24
|
+
interface MCPServerOptions {
|
|
25
|
+
name?: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
registry: RegistryExports;
|
|
28
|
+
onToolSuccess?: (toolName: string) => void;
|
|
29
|
+
}
|
|
30
|
+
interface BootstrapModule {
|
|
31
|
+
getRegistry?: () => RegistryExports;
|
|
32
|
+
main?: () => Promise<void>;
|
|
33
|
+
default?: {
|
|
34
|
+
getRegistry?: () => RegistryExports;
|
|
35
|
+
main?: () => Promise<void>;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
interface ResolveRuntimeRegistryOptions {
|
|
39
|
+
basePath?: string;
|
|
40
|
+
defaultRegistry?: RegistryExports;
|
|
41
|
+
loadModule?: (specifier: string) => Promise<BootstrapModule>;
|
|
42
|
+
}
|
|
43
|
+
declare function createServer(options: MCPServerOptions): Promise<Server>;
|
|
44
|
+
declare function isRegistryPopulated(registry: RegistryExports): boolean;
|
|
45
|
+
declare function getLegacyRegistryCandidatePaths(basePath?: string): string[];
|
|
46
|
+
declare function resolveRuntimeRegistry(options?: ResolveRuntimeRegistryOptions): Promise<RegistryExports | null>;
|
|
47
|
+
declare function startStdioServer(options: MCPServerOptions): Promise<void>;
|
|
48
|
+
declare function validateDependencies(): ValidationResult;
|
|
49
|
+
declare function main(): Promise<void>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* MCP Registry
|
|
53
|
+
* Central registry for tool/resource definitions and handler wiring
|
|
54
|
+
*
|
|
55
|
+
* @package @bootspring/mcp
|
|
56
|
+
* @module registry
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
type CompatibilityRegistry = ReturnType<typeof createRegistryExports>;
|
|
60
|
+
interface LegacyRegistryModule {
|
|
61
|
+
TOOLS?: ToolDefinition[] | undefined;
|
|
62
|
+
RESOURCES?: ResourceDefinition[] | undefined;
|
|
63
|
+
toolHandlers?: Record<string, ToolHandler> | undefined;
|
|
64
|
+
resourceHandlers?: Record<string, ResourceHandler> | undefined;
|
|
65
|
+
trackTelemetry?: ((event: string, payload: Record<string, unknown>) => void) | undefined;
|
|
66
|
+
getRegistry?: (() => CompatibilityRegistry) | undefined;
|
|
67
|
+
getRegistryExports?: (() => CompatibilityRegistry) | undefined;
|
|
68
|
+
default?: LegacyRegistryModule | undefined;
|
|
69
|
+
}
|
|
70
|
+
interface CompatibilityRegistryOptions {
|
|
71
|
+
basePath?: string | undefined;
|
|
72
|
+
defaultRegistry?: CompatibilityRegistry | undefined;
|
|
73
|
+
loadModule?: ((candidatePath: string) => LegacyRegistryModule) | undefined;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Register a tool with the MCP server
|
|
77
|
+
*/
|
|
78
|
+
declare function registerTool(definition: ToolDefinition, handler: ToolHandler): void;
|
|
79
|
+
/**
|
|
80
|
+
* Register a resource with the MCP server
|
|
81
|
+
*/
|
|
82
|
+
declare function registerResource(definition: ResourceDefinition, handler: ResourceHandler): void;
|
|
83
|
+
/**
|
|
84
|
+
* Load tools from a directory of tool modules
|
|
85
|
+
*/
|
|
86
|
+
declare function loadToolsFromDirectory(toolsDir: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* Invoke a tool from within another tool (tool-to-tool calls)
|
|
89
|
+
*/
|
|
90
|
+
declare function invokeTool(toolName: string, args: Record<string, unknown>, options?: InvokeToolOptions): Promise<InvokeToolResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Track telemetry events
|
|
93
|
+
*/
|
|
94
|
+
declare function trackTelemetry(event: string, payload: Record<string, unknown>): void;
|
|
95
|
+
declare function createRegistryExports(): {
|
|
96
|
+
TOOLS: ToolDefinition[];
|
|
97
|
+
RESOURCES: ResourceDefinition[];
|
|
98
|
+
toolHandlers: Record<string, ToolHandler>;
|
|
99
|
+
resourceHandlers: Record<string, ResourceHandler>;
|
|
100
|
+
trackTelemetry: typeof trackTelemetry;
|
|
101
|
+
};
|
|
102
|
+
declare function getCompatibilityRegistryCandidatePaths(basePath?: string): string[];
|
|
103
|
+
declare function resolveCompatibilityRegistry(options?: CompatibilityRegistryOptions): CompatibilityRegistry;
|
|
104
|
+
/**
|
|
105
|
+
* Clear the result cache
|
|
106
|
+
*/
|
|
107
|
+
declare function clearCache(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Get all registered tools
|
|
110
|
+
*/
|
|
111
|
+
declare function getTools(): ToolDefinition[];
|
|
112
|
+
/**
|
|
113
|
+
* Get all registered resources
|
|
114
|
+
*/
|
|
115
|
+
declare function getResources(): ResourceDefinition[];
|
|
116
|
+
/**
|
|
117
|
+
* Get all tool handlers
|
|
118
|
+
*/
|
|
119
|
+
declare function getToolHandlers(): Record<string, ToolHandler>;
|
|
120
|
+
/**
|
|
121
|
+
* Get all resource handlers
|
|
122
|
+
*/
|
|
123
|
+
declare function getResourceHandlers(): Record<string, ResourceHandler>;
|
|
124
|
+
/**
|
|
125
|
+
* Get the full registry export object
|
|
126
|
+
*/
|
|
127
|
+
declare function getRegistryExports(): {
|
|
128
|
+
TOOLS: ToolDefinition[];
|
|
129
|
+
RESOURCES: ResourceDefinition[];
|
|
130
|
+
toolHandlers: Record<string, ToolHandler>;
|
|
131
|
+
resourceHandlers: Record<string, ResourceHandler>;
|
|
132
|
+
trackTelemetry: typeof trackTelemetry;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* MCP Response Formatter
|
|
137
|
+
* Creates well-structured, human-friendly tool responses
|
|
138
|
+
*
|
|
139
|
+
* @package @bootspring/mcp
|
|
140
|
+
* @module response-formatter
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
interface SuccessOptions {
|
|
144
|
+
summary?: string;
|
|
145
|
+
data?: unknown;
|
|
146
|
+
hints?: string[];
|
|
147
|
+
meta?: Record<string, unknown>;
|
|
148
|
+
}
|
|
149
|
+
interface ListOptions<T> {
|
|
150
|
+
title: string;
|
|
151
|
+
items: T[];
|
|
152
|
+
formatter?: (item: T, index: number) => string;
|
|
153
|
+
emptyMessage?: string;
|
|
154
|
+
hints?: string[];
|
|
155
|
+
}
|
|
156
|
+
interface AgentData {
|
|
157
|
+
name: string;
|
|
158
|
+
category?: string;
|
|
159
|
+
description: string;
|
|
160
|
+
expertise: string[];
|
|
161
|
+
systemPrompt?: string;
|
|
162
|
+
}
|
|
163
|
+
interface SkillData {
|
|
164
|
+
name: string;
|
|
165
|
+
description: string;
|
|
166
|
+
tags?: string[];
|
|
167
|
+
}
|
|
168
|
+
interface TodoItem {
|
|
169
|
+
text: string;
|
|
170
|
+
status?: string;
|
|
171
|
+
}
|
|
172
|
+
interface QualityGateResults {
|
|
173
|
+
name?: string;
|
|
174
|
+
gate?: string;
|
|
175
|
+
status: 'pass' | 'fail';
|
|
176
|
+
passed: number;
|
|
177
|
+
failed: number;
|
|
178
|
+
skipped?: number;
|
|
179
|
+
results: Array<{
|
|
180
|
+
name: string;
|
|
181
|
+
status: 'pass' | 'fail' | 'skip';
|
|
182
|
+
message?: string;
|
|
183
|
+
}>;
|
|
184
|
+
}
|
|
185
|
+
interface ContextValidationResult {
|
|
186
|
+
valid: boolean;
|
|
187
|
+
errors?: string[];
|
|
188
|
+
warnings?: string[];
|
|
189
|
+
suggestions?: string[];
|
|
190
|
+
}
|
|
191
|
+
interface ProjectContextDisplay {
|
|
192
|
+
project?: {
|
|
193
|
+
name?: string;
|
|
194
|
+
version?: string;
|
|
195
|
+
};
|
|
196
|
+
stack?: {
|
|
197
|
+
framework?: string;
|
|
198
|
+
language?: string;
|
|
199
|
+
database?: string;
|
|
200
|
+
};
|
|
201
|
+
plugins?: Record<string, unknown>;
|
|
202
|
+
}
|
|
203
|
+
interface OrchestratorStatus {
|
|
204
|
+
currentPhase?: string;
|
|
205
|
+
availableAgents?: number;
|
|
206
|
+
activeWorkflow?: string;
|
|
207
|
+
activeWorkflowSignalProgress?: {
|
|
208
|
+
completedSignals: unknown[];
|
|
209
|
+
totalSignals: number;
|
|
210
|
+
};
|
|
211
|
+
recentSuggestions?: Array<{
|
|
212
|
+
text?: string;
|
|
213
|
+
} | string>;
|
|
214
|
+
}
|
|
215
|
+
interface PRDData {
|
|
216
|
+
name: string;
|
|
217
|
+
stories: Array<{
|
|
218
|
+
title: string;
|
|
219
|
+
status: string;
|
|
220
|
+
}>;
|
|
221
|
+
}
|
|
222
|
+
interface ProgressInfo {
|
|
223
|
+
completed: number;
|
|
224
|
+
total: number;
|
|
225
|
+
percentage: number;
|
|
226
|
+
}
|
|
227
|
+
interface AssistResponseData {
|
|
228
|
+
confidenceTier?: 'high' | 'medium' | 'low' | 'very_low';
|
|
229
|
+
understood?: {
|
|
230
|
+
intent?: string;
|
|
231
|
+
confidence?: number;
|
|
232
|
+
description?: string;
|
|
233
|
+
};
|
|
234
|
+
primarySuggestion?: {
|
|
235
|
+
message: string;
|
|
236
|
+
};
|
|
237
|
+
clarificationNeeded?: boolean;
|
|
238
|
+
clarificationQuestion?: string;
|
|
239
|
+
clarificationOptions?: string[];
|
|
240
|
+
suggestions?: Array<{
|
|
241
|
+
message: string;
|
|
242
|
+
}>;
|
|
243
|
+
memoryInsight?: {
|
|
244
|
+
message: string;
|
|
245
|
+
recommendation: string;
|
|
246
|
+
};
|
|
247
|
+
recommendedTool?: {
|
|
248
|
+
name: string;
|
|
249
|
+
args: Record<string, unknown>;
|
|
250
|
+
reason: string;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
interface MCPToolResultWithMeta extends MCPToolResult {
|
|
254
|
+
_meta?: Record<string, unknown>;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Format a success response
|
|
258
|
+
*/
|
|
259
|
+
declare function success(options: SuccessOptions): MCPToolResultWithMeta;
|
|
260
|
+
/**
|
|
261
|
+
* Format an error response
|
|
262
|
+
*/
|
|
263
|
+
declare function error(message: string, suggestions?: string[]): MCPToolResult;
|
|
264
|
+
/**
|
|
265
|
+
* Format a warning response
|
|
266
|
+
*/
|
|
267
|
+
declare function warning(message: string, suggestions?: string[]): MCPToolResult;
|
|
268
|
+
/**
|
|
269
|
+
* Format a list response
|
|
270
|
+
*/
|
|
271
|
+
declare function list<T>(options: ListOptions<T>): MCPToolResult;
|
|
272
|
+
/**
|
|
273
|
+
* Format agent details
|
|
274
|
+
*/
|
|
275
|
+
declare function agentDetails(id: string, agent: AgentData): MCPToolResult;
|
|
276
|
+
/**
|
|
277
|
+
* Format skill details
|
|
278
|
+
*/
|
|
279
|
+
declare function skillDetails(id: string, skill: SkillData, content?: string | null): MCPToolResult;
|
|
280
|
+
/**
|
|
281
|
+
* Format todo list
|
|
282
|
+
*/
|
|
283
|
+
declare function todoList(pending: TodoItem[], completed: TodoItem[]): MCPToolResult;
|
|
284
|
+
/**
|
|
285
|
+
* Format quality gate results
|
|
286
|
+
*/
|
|
287
|
+
declare function qualityResults(results: QualityGateResults): MCPToolResult;
|
|
288
|
+
/**
|
|
289
|
+
* Format context validation results
|
|
290
|
+
*/
|
|
291
|
+
declare function contextValidation(validation: ContextValidationResult): MCPToolResult;
|
|
292
|
+
/**
|
|
293
|
+
* Format project context summary
|
|
294
|
+
*/
|
|
295
|
+
declare function contextSummary(ctx: ProjectContextDisplay): MCPToolResult;
|
|
296
|
+
/**
|
|
297
|
+
* Format orchestrator status
|
|
298
|
+
*/
|
|
299
|
+
declare function orchestratorStatus(status: OrchestratorStatus): MCPToolResult;
|
|
300
|
+
/**
|
|
301
|
+
* Format PRD/loop status
|
|
302
|
+
*/
|
|
303
|
+
declare function loopStatus(prd: PRDData, progress: ProgressInfo): MCPToolResult;
|
|
304
|
+
/**
|
|
305
|
+
* Generate a progress bar
|
|
306
|
+
*/
|
|
307
|
+
declare function generateProgressBar(percentage: number): string;
|
|
308
|
+
/**
|
|
309
|
+
* Format assist response
|
|
310
|
+
*/
|
|
311
|
+
declare function assistResponse(response: AssistResponseData): MCPToolResult;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* MCP Capabilities
|
|
315
|
+
* Capability manifest for assistant clients
|
|
316
|
+
*
|
|
317
|
+
* @package @bootspring/mcp
|
|
318
|
+
* @module capabilities
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
interface BuildCapabilitiesOptions {
|
|
322
|
+
tier?: string;
|
|
323
|
+
entitled?: boolean;
|
|
324
|
+
mode?: string;
|
|
325
|
+
[key: string]: unknown;
|
|
326
|
+
}
|
|
327
|
+
interface WorkflowAccessContext {
|
|
328
|
+
mode: string;
|
|
329
|
+
tier: string;
|
|
330
|
+
entitled: boolean;
|
|
331
|
+
policyProfile: string;
|
|
332
|
+
}
|
|
333
|
+
interface PolicyProfile {
|
|
334
|
+
id: string;
|
|
335
|
+
allowExternalSkills: boolean;
|
|
336
|
+
blockedWorkflows: string[];
|
|
337
|
+
}
|
|
338
|
+
interface FilteredWorkflows {
|
|
339
|
+
allowed: WorkflowDefinition[];
|
|
340
|
+
denied: WorkflowDefinition[];
|
|
341
|
+
}
|
|
342
|
+
interface CapabilitiesDeps {
|
|
343
|
+
resolveWorkflowAccessContext: (options: BuildCapabilitiesOptions) => WorkflowAccessContext;
|
|
344
|
+
filterAccessibleWorkflows: (workflows: WorkflowDefinition[], options: BuildCapabilitiesOptions) => FilteredWorkflows;
|
|
345
|
+
getPolicyProfile: (profileId: string, options: BuildCapabilitiesOptions) => PolicyProfile;
|
|
346
|
+
listWorkflows: () => WorkflowDefinition[];
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Build capabilities manifest
|
|
350
|
+
*/
|
|
351
|
+
declare function buildCapabilities(deps: CapabilitiesDeps, options?: BuildCapabilitiesOptions): CapabilitiesManifest;
|
|
352
|
+
/**
|
|
353
|
+
* Build a default capabilities manifest for unauthenticated/local mode
|
|
354
|
+
*/
|
|
355
|
+
declare function buildDefaultCapabilities(): CapabilitiesManifest;
|
|
356
|
+
|
|
357
|
+
export { type AgentData, type AssistResponseData, type BuildCapabilitiesOptions, type CapabilitiesDeps, type ContextValidationResult, type FilteredWorkflows, type ListOptions, type MCPServerOptions, type MCPToolResultWithMeta, type OrchestratorStatus, type PRDData, type PolicyProfile, type ProgressInfo, type ProjectContextDisplay, type QualityGateResults, type RegistryExports, type SkillData, type SuccessOptions, type TodoItem, type ValidationResult, type WorkflowAccessContext, agentDetails, assistResponse, buildCapabilities, buildDefaultCapabilities, clearCache, contextSummary, contextValidation, createServer, error, generateProgressBar, getCompatibilityRegistryCandidatePaths, getLegacyRegistryCandidatePaths, getRegistryExports, getResourceHandlers, getResources, getToolHandlers, getTools, invokeTool, isRegistryPopulated, list, loadToolsFromDirectory, loopStatus, main, orchestratorStatus, qualityResults, registerResource, registerTool, resolveCompatibilityRegistry, resolveRuntimeRegistry, skillDetails, startStdioServer, success, todoList, trackTelemetry, validateDependencies, warning };
|