@girardmedia/bootspring 2.1.3 → 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 +157 -83
- 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/generators/api-docs.js +3 -3
- package/generators/decisions.js +14 -14
- package/generators/health.js +6 -6
- package/generators/sprint.js +4 -4
- package/generators/templates/build-planning.template.js +2 -2
- package/generators/visual-doc-generator.js +1 -1
- package/package.json +22 -68
- package/cli/agent.js +0 -799
- package/cli/auth.js +0 -896
- package/cli/billing.js +0 -320
- package/cli/build.js +0 -1442
- package/cli/dashboard.js +0 -123
- package/cli/init.js +0 -669
- package/cli/mcp.js +0 -240
- package/cli/orchestrator.js +0 -240
- package/cli/project.js +0 -825
- package/cli/quality.js +0 -281
- package/cli/skill.js +0 -503
- package/cli/switch.js +0 -453
- package/cli/todo.js +0 -629
- package/cli/update.js +0 -132
- 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/mcp/server.js
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bootspring MCP Server
|
|
3
|
-
* Thin stdio proxy for the hosted Bootspring MCP API.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
|
|
7
|
-
const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
8
|
-
const {
|
|
9
|
-
CallToolRequestSchema,
|
|
10
|
-
ListResourcesRequestSchema,
|
|
11
|
-
ListToolsRequestSchema,
|
|
12
|
-
ReadResourceRequestSchema
|
|
13
|
-
} = require('@modelcontextprotocol/sdk/types.js');
|
|
14
|
-
|
|
15
|
-
const api = require('../core/api-client');
|
|
16
|
-
const auth = require('../core/auth');
|
|
17
|
-
|
|
18
|
-
const VERSION = require('../package.json').version;
|
|
19
|
-
|
|
20
|
-
const FALLBACK_TOOLS = [
|
|
21
|
-
{
|
|
22
|
-
name: 'bootspring_agent',
|
|
23
|
-
description: 'Invoke a hosted Bootspring agent.',
|
|
24
|
-
inputSchema: {
|
|
25
|
-
type: 'object',
|
|
26
|
-
properties: {
|
|
27
|
-
agent: { type: 'string' },
|
|
28
|
-
task: { type: 'string' }
|
|
29
|
-
},
|
|
30
|
-
required: ['agent']
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'bootspring_skill',
|
|
35
|
-
description: 'Fetch a hosted Bootspring skill.',
|
|
36
|
-
inputSchema: {
|
|
37
|
-
type: 'object',
|
|
38
|
-
properties: {
|
|
39
|
-
skill: { type: 'string' }
|
|
40
|
-
},
|
|
41
|
-
required: ['skill']
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'bootspring_context',
|
|
46
|
-
description: 'Get or analyze project context.',
|
|
47
|
-
inputSchema: {
|
|
48
|
-
type: 'object',
|
|
49
|
-
properties: {
|
|
50
|
-
action: { type: 'string', enum: ['get', 'generate', 'analyze'] }
|
|
51
|
-
},
|
|
52
|
-
required: ['action']
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'bootspring_orchestrator',
|
|
57
|
-
description: 'Use the hosted orchestrator.',
|
|
58
|
-
inputSchema: {
|
|
59
|
-
type: 'object',
|
|
60
|
-
properties: {
|
|
61
|
-
action: { type: 'string', enum: ['analyze', 'start', 'suggest'] },
|
|
62
|
-
workflow: { type: 'string' }
|
|
63
|
-
},
|
|
64
|
-
required: ['action']
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'bootspring_quality',
|
|
69
|
-
description: 'Fetch a hosted quality gate.',
|
|
70
|
-
inputSchema: {
|
|
71
|
-
type: 'object',
|
|
72
|
-
properties: {
|
|
73
|
-
gate: { type: 'string', enum: ['pre-commit', 'pre-push', 'pre-deploy'] }
|
|
74
|
-
},
|
|
75
|
-
required: ['gate']
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: 'bootspring_todo',
|
|
80
|
-
description: 'Manage local todo items.',
|
|
81
|
-
inputSchema: {
|
|
82
|
-
type: 'object',
|
|
83
|
-
properties: {
|
|
84
|
-
action: { type: 'string', enum: ['list', 'add', 'complete', 'delete'] },
|
|
85
|
-
text: { type: 'string' },
|
|
86
|
-
id: { type: 'string' }
|
|
87
|
-
},
|
|
88
|
-
required: ['action']
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
|
|
93
|
-
const FALLBACK_RESOURCES = [
|
|
94
|
-
{
|
|
95
|
-
uri: 'bootspring://context',
|
|
96
|
-
name: 'Project Context',
|
|
97
|
-
description: 'Current project context and configuration',
|
|
98
|
-
mimeType: 'application/json'
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
uri: 'bootspring://agents',
|
|
102
|
-
name: 'Available Agents',
|
|
103
|
-
description: 'Hosted Bootspring agents for your account',
|
|
104
|
-
mimeType: 'application/json'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
uri: 'bootspring://skills',
|
|
108
|
-
name: 'Code Skills',
|
|
109
|
-
description: 'Hosted Bootspring skills and patterns',
|
|
110
|
-
mimeType: 'application/json'
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
uri: 'bootspring://workflows',
|
|
114
|
-
name: 'Workflows',
|
|
115
|
-
description: 'Hosted Bootspring workflows',
|
|
116
|
-
mimeType: 'application/json'
|
|
117
|
-
}
|
|
118
|
-
];
|
|
119
|
-
|
|
120
|
-
const TOOLS = FALLBACK_TOOLS;
|
|
121
|
-
const RESOURCES = FALLBACK_RESOURCES;
|
|
122
|
-
|
|
123
|
-
function formatTextContent(value) {
|
|
124
|
-
return typeof value === 'string' ? value : JSON.stringify(value, null, 2);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function createAuthError(message) {
|
|
128
|
-
return {
|
|
129
|
-
content: [{ type: 'text', text: message }],
|
|
130
|
-
isError: true
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async function resolveTools() {
|
|
135
|
-
if (!auth.isAuthenticated()) {
|
|
136
|
-
return FALLBACK_TOOLS;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
try {
|
|
140
|
-
const response = await api.listMcpTools();
|
|
141
|
-
return Array.isArray(response) ? response : response.tools || FALLBACK_TOOLS;
|
|
142
|
-
} catch {
|
|
143
|
-
return FALLBACK_TOOLS;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
async function resolveResources() {
|
|
148
|
-
if (!auth.isAuthenticated()) {
|
|
149
|
-
return FALLBACK_RESOURCES;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
try {
|
|
153
|
-
const response = await api.listMcpResources();
|
|
154
|
-
return Array.isArray(response) ? response : response.resources || FALLBACK_RESOURCES;
|
|
155
|
-
} catch {
|
|
156
|
-
return FALLBACK_RESOURCES;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
async function proxyToolCall(name, args) {
|
|
161
|
-
if (!auth.isAuthenticated()) {
|
|
162
|
-
return createAuthError('Authentication required. Run `bootspring auth login` first.');
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
try {
|
|
166
|
-
const response = await api.callMcpTool(name, args || {});
|
|
167
|
-
return {
|
|
168
|
-
content: [{ type: 'text', text: formatTextContent(response.result || response) }]
|
|
169
|
-
};
|
|
170
|
-
} catch (error) {
|
|
171
|
-
const message = error.status === 403
|
|
172
|
-
? 'This MCP capability requires a paid Bootspring plan.'
|
|
173
|
-
: error.message;
|
|
174
|
-
|
|
175
|
-
return {
|
|
176
|
-
content: [{ type: 'text', text: `Error: ${message}` }],
|
|
177
|
-
isError: true
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
async function proxyResourceRead(uri) {
|
|
183
|
-
if (!auth.isAuthenticated()) {
|
|
184
|
-
return {
|
|
185
|
-
contents: [{
|
|
186
|
-
uri,
|
|
187
|
-
mimeType: 'text/plain',
|
|
188
|
-
text: 'Authentication required. Run `bootspring auth login` first.'
|
|
189
|
-
}]
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
try {
|
|
194
|
-
const response = await api.getMcpResource(uri);
|
|
195
|
-
return {
|
|
196
|
-
contents: [{
|
|
197
|
-
uri: response.uri || uri,
|
|
198
|
-
mimeType: response.mimeType || 'application/json',
|
|
199
|
-
text: formatTextContent(response.content || response)
|
|
200
|
-
}]
|
|
201
|
-
};
|
|
202
|
-
} catch (error) {
|
|
203
|
-
return {
|
|
204
|
-
contents: [{
|
|
205
|
-
uri,
|
|
206
|
-
mimeType: 'text/plain',
|
|
207
|
-
text: `Error: ${error.message}`
|
|
208
|
-
}]
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
const toolHandlers = Object.fromEntries(
|
|
214
|
-
TOOLS.map((tool) => [tool.name, async (args = {}) => proxyToolCall(tool.name, args)])
|
|
215
|
-
);
|
|
216
|
-
|
|
217
|
-
const resourceHandlers = Object.fromEntries(
|
|
218
|
-
RESOURCES.map((resource) => [resource.uri, async () => proxyResourceRead(resource.uri)])
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
async function main() {
|
|
222
|
-
const server = new Server(
|
|
223
|
-
{ name: 'bootspring', version: VERSION },
|
|
224
|
-
{ capabilities: { tools: {}, resources: {} } }
|
|
225
|
-
);
|
|
226
|
-
|
|
227
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
228
|
-
tools: await resolveTools()
|
|
229
|
-
}));
|
|
230
|
-
|
|
231
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
232
|
-
const { name, arguments: args } = request.params;
|
|
233
|
-
return proxyToolCall(name, args);
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
237
|
-
resources: await resolveResources()
|
|
238
|
-
}));
|
|
239
|
-
|
|
240
|
-
server.setRequestHandler(ReadResourceRequestSchema, async (request) => (
|
|
241
|
-
proxyResourceRead(request.params.uri)
|
|
242
|
-
));
|
|
243
|
-
|
|
244
|
-
const transport = new StdioServerTransport();
|
|
245
|
-
await server.connect(transport);
|
|
246
|
-
console.error(`Bootspring MCP proxy v${VERSION} started`);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (require.main === module) {
|
|
250
|
-
main().catch((error) => {
|
|
251
|
-
console.error('Failed to start MCP proxy:', error.message);
|
|
252
|
-
process.exit(1);
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
module.exports = {
|
|
257
|
-
TOOLS,
|
|
258
|
-
RESOURCES,
|
|
259
|
-
toolHandlers,
|
|
260
|
-
resourceHandlers,
|
|
261
|
-
FALLBACK_TOOLS,
|
|
262
|
-
FALLBACK_RESOURCES,
|
|
263
|
-
main
|
|
264
|
-
};
|