@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,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Policy Matrix
|
|
3
|
+
* Comprehensive policy definitions for org-level gates
|
|
4
|
+
* @package bootspring
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Policy scopes define what can be controlled
|
|
9
|
+
*/
|
|
10
|
+
const POLICY_SCOPES = {
|
|
11
|
+
skills: {
|
|
12
|
+
external: 'skills.external', // Third-party/external skills
|
|
13
|
+
premium: 'skills.premium', // Premium skill categories
|
|
14
|
+
ai: 'skills.ai', // AI-powered skills
|
|
15
|
+
all: 'skills.*'
|
|
16
|
+
},
|
|
17
|
+
workflows: {
|
|
18
|
+
parallel: 'workflows.parallel', // Parallel execution
|
|
19
|
+
premium: 'workflows.premium', // Premium workflow packs
|
|
20
|
+
custom: 'workflows.custom', // Custom workflow definitions
|
|
21
|
+
all: 'workflows.*'
|
|
22
|
+
},
|
|
23
|
+
agents: {
|
|
24
|
+
technical: 'agents.technical', // Technical experts
|
|
25
|
+
business: 'agents.business', // Business/legal experts
|
|
26
|
+
enterprise: 'agents.enterprise', // Enterprise-only agents
|
|
27
|
+
all: 'agents.*'
|
|
28
|
+
},
|
|
29
|
+
features: {
|
|
30
|
+
telemetry: 'features.telemetry', // Usage telemetry
|
|
31
|
+
cloudSync: 'features.cloud_sync', // Cloud synchronization
|
|
32
|
+
teamSharing: 'features.team_sharing', // Team context sharing
|
|
33
|
+
auditLogs: 'features.audit_logs', // Audit logging
|
|
34
|
+
apiAccess: 'features.api_access', // Direct API access
|
|
35
|
+
all: 'features.*'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Default policy matrix by tier
|
|
41
|
+
* Defines what's allowed/blocked per tier
|
|
42
|
+
*/
|
|
43
|
+
const TIER_POLICY_DEFAULTS = {
|
|
44
|
+
free: {
|
|
45
|
+
allowed: [
|
|
46
|
+
'skills.external',
|
|
47
|
+
'agents.technical',
|
|
48
|
+
'features.telemetry'
|
|
49
|
+
],
|
|
50
|
+
blocked: [
|
|
51
|
+
'skills.premium',
|
|
52
|
+
'skills.ai',
|
|
53
|
+
'workflows.premium',
|
|
54
|
+
'workflows.parallel',
|
|
55
|
+
'agents.business',
|
|
56
|
+
'agents.enterprise',
|
|
57
|
+
'features.cloud_sync',
|
|
58
|
+
'features.team_sharing',
|
|
59
|
+
'features.audit_logs'
|
|
60
|
+
],
|
|
61
|
+
limits: {
|
|
62
|
+
skillsPerDay: 50,
|
|
63
|
+
workflowsPerDay: 10,
|
|
64
|
+
agentInvocationsPerDay: 20
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
pro: {
|
|
68
|
+
allowed: [
|
|
69
|
+
'skills.*',
|
|
70
|
+
'workflows.*',
|
|
71
|
+
'agents.technical',
|
|
72
|
+
'agents.business',
|
|
73
|
+
'features.telemetry',
|
|
74
|
+
'features.cloud_sync'
|
|
75
|
+
],
|
|
76
|
+
blocked: [
|
|
77
|
+
'agents.enterprise',
|
|
78
|
+
'features.team_sharing',
|
|
79
|
+
'features.audit_logs'
|
|
80
|
+
],
|
|
81
|
+
limits: {
|
|
82
|
+
skillsPerDay: 500,
|
|
83
|
+
workflowsPerDay: 100,
|
|
84
|
+
agentInvocationsPerDay: 200
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
team: {
|
|
88
|
+
allowed: [
|
|
89
|
+
'skills.*',
|
|
90
|
+
'workflows.*',
|
|
91
|
+
'agents.*',
|
|
92
|
+
'features.telemetry',
|
|
93
|
+
'features.cloud_sync',
|
|
94
|
+
'features.team_sharing',
|
|
95
|
+
'features.audit_logs'
|
|
96
|
+
],
|
|
97
|
+
blocked: [],
|
|
98
|
+
limits: {
|
|
99
|
+
skillsPerDay: 2000,
|
|
100
|
+
workflowsPerDay: 500,
|
|
101
|
+
agentInvocationsPerDay: 1000,
|
|
102
|
+
teamMembers: 10
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
enterprise: {
|
|
106
|
+
allowed: ['*'],
|
|
107
|
+
blocked: [],
|
|
108
|
+
limits: {
|
|
109
|
+
skillsPerDay: -1, // Unlimited
|
|
110
|
+
workflowsPerDay: -1,
|
|
111
|
+
agentInvocationsPerDay: -1,
|
|
112
|
+
teamMembers: -1
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Profile-specific policy overrides
|
|
119
|
+
* Applied on top of tier defaults
|
|
120
|
+
*/
|
|
121
|
+
const PROFILE_OVERRIDES = {
|
|
122
|
+
startup: {
|
|
123
|
+
// Startup profile: permissive, fast iteration
|
|
124
|
+
overrides: {},
|
|
125
|
+
additionalBlocked: []
|
|
126
|
+
},
|
|
127
|
+
regulated: {
|
|
128
|
+
// Regulated profile: compliance-focused
|
|
129
|
+
overrides: {
|
|
130
|
+
requireApproval: ['workflows.custom', 'skills.external'],
|
|
131
|
+
auditAll: true,
|
|
132
|
+
dataResidency: true
|
|
133
|
+
},
|
|
134
|
+
additionalBlocked: [
|
|
135
|
+
'skills.external',
|
|
136
|
+
'workflows.growth-pack'
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
enterprise: {
|
|
140
|
+
// Enterprise profile: full control
|
|
141
|
+
overrides: {
|
|
142
|
+
ssoRequired: true,
|
|
143
|
+
auditAll: true,
|
|
144
|
+
approvalWorkflow: true
|
|
145
|
+
},
|
|
146
|
+
additionalBlocked: []
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Member role permissions
|
|
152
|
+
* What each role can do within an org
|
|
153
|
+
*/
|
|
154
|
+
const ROLE_PERMISSIONS = {
|
|
155
|
+
owner: {
|
|
156
|
+
canManageOrg: true,
|
|
157
|
+
canManageMembers: true,
|
|
158
|
+
canManagePolicies: true,
|
|
159
|
+
canManageBilling: true,
|
|
160
|
+
canUseAllFeatures: true
|
|
161
|
+
},
|
|
162
|
+
admin: {
|
|
163
|
+
canManageOrg: false,
|
|
164
|
+
canManageMembers: true,
|
|
165
|
+
canManagePolicies: true,
|
|
166
|
+
canManageBilling: false,
|
|
167
|
+
canUseAllFeatures: true
|
|
168
|
+
},
|
|
169
|
+
member: {
|
|
170
|
+
canManageOrg: false,
|
|
171
|
+
canManageMembers: false,
|
|
172
|
+
canManagePolicies: false,
|
|
173
|
+
canManageBilling: false,
|
|
174
|
+
canUseAllFeatures: true
|
|
175
|
+
},
|
|
176
|
+
viewer: {
|
|
177
|
+
canManageOrg: false,
|
|
178
|
+
canManageMembers: false,
|
|
179
|
+
canManagePolicies: false,
|
|
180
|
+
canManageBilling: false,
|
|
181
|
+
canUseAllFeatures: false
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Check if a scope matches a pattern
|
|
187
|
+
* @param {string} scope - Specific scope (e.g., 'skills.external')
|
|
188
|
+
* @param {string} pattern - Pattern to match (e.g., 'skills.*' or 'skills.external')
|
|
189
|
+
* @returns {boolean}
|
|
190
|
+
*/
|
|
191
|
+
function matchesScope(scope, pattern) {
|
|
192
|
+
if (pattern === '*') return true;
|
|
193
|
+
if (pattern === scope) return true;
|
|
194
|
+
if (pattern.endsWith('.*')) {
|
|
195
|
+
const prefix = pattern.slice(0, -2);
|
|
196
|
+
return scope.startsWith(prefix + '.');
|
|
197
|
+
}
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Check if a scope is allowed by policy
|
|
203
|
+
* @param {string} scope - Scope to check
|
|
204
|
+
* @param {string[]} allowed - Allowed patterns
|
|
205
|
+
* @param {string[]} blocked - Blocked patterns
|
|
206
|
+
* @returns {boolean}
|
|
207
|
+
*/
|
|
208
|
+
function isScopeAllowed(scope, allowed, blocked) {
|
|
209
|
+
// Check blocked first (blocked takes precedence)
|
|
210
|
+
for (const pattern of blocked) {
|
|
211
|
+
if (matchesScope(scope, pattern)) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// Check allowed
|
|
216
|
+
for (const pattern of allowed) {
|
|
217
|
+
if (matchesScope(scope, pattern)) {
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Build effective policy for an org member
|
|
226
|
+
* @param {string} tier - Org tier (free/pro/team/enterprise)
|
|
227
|
+
* @param {string} profile - Policy profile (startup/regulated/enterprise)
|
|
228
|
+
* @param {object} memberOverrides - Per-member policy overrides
|
|
229
|
+
* @returns {object} Effective policy
|
|
230
|
+
*/
|
|
231
|
+
function buildEffectivePolicy(tier, profile, memberOverrides = {}) {
|
|
232
|
+
const tierDefaults = TIER_POLICY_DEFAULTS[tier] || TIER_POLICY_DEFAULTS.free;
|
|
233
|
+
const profileOverrides = PROFILE_OVERRIDES[profile] || PROFILE_OVERRIDES.startup;
|
|
234
|
+
|
|
235
|
+
// Merge allowed/blocked lists
|
|
236
|
+
const allowed = [...tierDefaults.allowed];
|
|
237
|
+
const blocked = [
|
|
238
|
+
...tierDefaults.blocked,
|
|
239
|
+
...profileOverrides.additionalBlocked
|
|
240
|
+
];
|
|
241
|
+
|
|
242
|
+
// Apply member overrides
|
|
243
|
+
if (memberOverrides.additionalAllowed) {
|
|
244
|
+
allowed.push(...memberOverrides.additionalAllowed);
|
|
245
|
+
}
|
|
246
|
+
if (memberOverrides.additionalBlocked) {
|
|
247
|
+
blocked.push(...memberOverrides.additionalBlocked);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
tier,
|
|
252
|
+
profile,
|
|
253
|
+
allowed: [...new Set(allowed)],
|
|
254
|
+
blocked: [...new Set(blocked)],
|
|
255
|
+
limits: { ...tierDefaults.limits, ...(memberOverrides.limits || {}) },
|
|
256
|
+
overrides: { ...profileOverrides.overrides, ...(memberOverrides.overrides || {}) }
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Check access against effective policy
|
|
262
|
+
* @param {string} scope - Scope to check
|
|
263
|
+
* @param {object} policy - Effective policy
|
|
264
|
+
* @returns {object} Access result
|
|
265
|
+
*/
|
|
266
|
+
function checkPolicyAccess(scope, policy) {
|
|
267
|
+
const allowed = isScopeAllowed(scope, policy.allowed, policy.blocked);
|
|
268
|
+
|
|
269
|
+
if (!allowed) {
|
|
270
|
+
return {
|
|
271
|
+
allowed: false,
|
|
272
|
+
code: 'policy_blocked',
|
|
273
|
+
scope,
|
|
274
|
+
reason: `Scope "${scope}" is blocked by ${policy.profile} policy`
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// Check if approval is required
|
|
279
|
+
if (policy.overrides.requireApproval?.some(p => matchesScope(scope, p))) {
|
|
280
|
+
return {
|
|
281
|
+
allowed: true,
|
|
282
|
+
requiresApproval: true,
|
|
283
|
+
scope,
|
|
284
|
+
reason: `Scope "${scope}" requires approval under ${policy.profile} policy`
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return {
|
|
289
|
+
allowed: true,
|
|
290
|
+
scope
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
module.exports = {
|
|
295
|
+
POLICY_SCOPES,
|
|
296
|
+
TIER_POLICY_DEFAULTS,
|
|
297
|
+
PROFILE_OVERRIDES,
|
|
298
|
+
ROLE_PERMISSIONS,
|
|
299
|
+
matchesScope,
|
|
300
|
+
isScopeAllowed,
|
|
301
|
+
buildEffectivePolicy,
|
|
302
|
+
checkPolicyAccess
|
|
303
|
+
};
|
package/core/project-context.js
CHANGED
|
@@ -36,6 +36,7 @@ const EXEMPT_COMMANDS = [
|
|
|
36
36
|
'billing', // Billing status/info accessible without project
|
|
37
37
|
'preseed', // Preseed works locally, auth enhances features
|
|
38
38
|
'seed', // Seed works locally for scaffolding
|
|
39
|
+
'org', // Org policy accessible without project
|
|
39
40
|
];
|
|
40
41
|
|
|
41
42
|
// Sub-commands of auth that are exempt
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { S as SimpleTodoItem, T as TodoItem, d as dashboard, g as generate, a as generateClaudeMd, r as runDashboard, b as runGenerate, c as runTelemetry, e as runTodo, t as telemetry, f as todo } from '../index-UiYCgwiH.js';
|
|
2
|
+
import '../context-McpJQa_2.js';
|
|
3
|
+
import 'zod';
|