@stackwright-pro/mcp 0.2.0-alpha.95 → 0.2.0-alpha.98
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/dist/integrity.d.mts +2 -1
- package/dist/integrity.d.ts +2 -1
- package/dist/integrity.js +21 -14
- package/dist/integrity.js.map +1 -1
- package/dist/integrity.mjs +20 -14
- package/dist/integrity.mjs.map +1 -1
- package/dist/pipeline-constants.d.mts +30 -0
- package/dist/pipeline-constants.d.ts +30 -0
- package/dist/pipeline-constants.js +445 -0
- package/dist/pipeline-constants.js.map +1 -0
- package/dist/pipeline-constants.mjs +429 -0
- package/dist/pipeline-constants.mjs.map +1 -0
- package/dist/server.js +285 -22
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +298 -22
- package/dist/server.mjs.map +1 -1
- package/package.json +10 -3
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/pipeline-constants.ts
|
|
21
|
+
var pipeline_constants_exports = {};
|
|
22
|
+
__export(pipeline_constants_exports, {
|
|
23
|
+
PHASE_ARTIFACT: () => PHASE_ARTIFACT,
|
|
24
|
+
PHASE_ORDER: () => PHASE_ORDER
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(pipeline_constants_exports);
|
|
27
|
+
|
|
28
|
+
// src/tools/pipeline.ts
|
|
29
|
+
var import_zod5 = require("zod");
|
|
30
|
+
|
|
31
|
+
// src/coerce.ts
|
|
32
|
+
var import_zod = require("zod");
|
|
33
|
+
|
|
34
|
+
// src/artifact-signing.ts
|
|
35
|
+
var import_zod2 = require("zod");
|
|
36
|
+
|
|
37
|
+
// src/tools/pipeline.ts
|
|
38
|
+
var import_types3 = require("@stackwright-pro/types");
|
|
39
|
+
|
|
40
|
+
// src/tools/get-schema.ts
|
|
41
|
+
var import_zod4 = require("zod");
|
|
42
|
+
var import_types2 = require("@stackwright-pro/types");
|
|
43
|
+
|
|
44
|
+
// src/tools/validate-yaml-fragment.ts
|
|
45
|
+
var import_zod3 = require("zod");
|
|
46
|
+
var import_js_yaml = require("js-yaml");
|
|
47
|
+
var import_types = require("@stackwright-pro/types");
|
|
48
|
+
var NavigationLinkSchema = import_zod3.z.lazy(
|
|
49
|
+
() => import_zod3.z.object({
|
|
50
|
+
label: import_zod3.z.string().min(1),
|
|
51
|
+
href: import_zod3.z.string().min(1),
|
|
52
|
+
children: import_zod3.z.array(NavigationLinkSchema).optional()
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
var NavigationSectionSchema = import_zod3.z.object({
|
|
56
|
+
section: import_zod3.z.string().min(1),
|
|
57
|
+
items: import_zod3.z.array(NavigationLinkSchema)
|
|
58
|
+
});
|
|
59
|
+
var NavigationItemSchema = import_zod3.z.union([
|
|
60
|
+
NavigationLinkSchema,
|
|
61
|
+
NavigationSectionSchema
|
|
62
|
+
]);
|
|
63
|
+
|
|
64
|
+
// src/tools/get-schema.ts
|
|
65
|
+
var NavigationLinkSchema2 = import_zod4.z.lazy(
|
|
66
|
+
() => import_zod4.z.object({
|
|
67
|
+
label: import_zod4.z.string().min(1),
|
|
68
|
+
href: import_zod4.z.string().min(1),
|
|
69
|
+
children: import_zod4.z.array(NavigationLinkSchema2).optional()
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
var NavigationSectionSchema2 = import_zod4.z.object({
|
|
73
|
+
section: import_zod4.z.string().min(1),
|
|
74
|
+
items: import_zod4.z.array(NavigationLinkSchema2)
|
|
75
|
+
});
|
|
76
|
+
var NavigationItemSchema2 = import_zod4.z.union([
|
|
77
|
+
NavigationLinkSchema2,
|
|
78
|
+
NavigationSectionSchema2
|
|
79
|
+
]);
|
|
80
|
+
|
|
81
|
+
// src/tools/pipeline.ts
|
|
82
|
+
var import_telemetry = require("@stackwright-pro/telemetry");
|
|
83
|
+
var PHASE_ORDER = [
|
|
84
|
+
"designer",
|
|
85
|
+
"theme",
|
|
86
|
+
"scaffold",
|
|
87
|
+
// generates app/ directory from config
|
|
88
|
+
"api",
|
|
89
|
+
"data",
|
|
90
|
+
"auth",
|
|
91
|
+
// moved earlier — only depends on design-language.json (designer)
|
|
92
|
+
"geo",
|
|
93
|
+
"workflow",
|
|
94
|
+
"services",
|
|
95
|
+
"pages",
|
|
96
|
+
"dashboard",
|
|
97
|
+
"polish",
|
|
98
|
+
"qa"
|
|
99
|
+
];
|
|
100
|
+
var PHASE_ARTIFACT = {
|
|
101
|
+
designer: "design-language.json",
|
|
102
|
+
theme: "theme-tokens.json",
|
|
103
|
+
scaffold: "scaffold-manifest.json",
|
|
104
|
+
api: "api-config.json",
|
|
105
|
+
auth: "auth-config.json",
|
|
106
|
+
data: "data-config.json",
|
|
107
|
+
pages: "pages-manifest.json",
|
|
108
|
+
dashboard: "dashboard-manifest.json",
|
|
109
|
+
workflow: "workflow-config.json",
|
|
110
|
+
services: "services-config.json",
|
|
111
|
+
polish: "polish-manifest.json",
|
|
112
|
+
geo: "geo-manifest.json",
|
|
113
|
+
qa: "qa-findings.json"
|
|
114
|
+
};
|
|
115
|
+
var PHASE_ARTIFACT_SCHEMA = {
|
|
116
|
+
designer: JSON.stringify(
|
|
117
|
+
{
|
|
118
|
+
version: "1.0",
|
|
119
|
+
generatedBy: "stackwright-pro-designer-otter",
|
|
120
|
+
application: {
|
|
121
|
+
type: "<operational|data-explorer|admin|logistics|general>",
|
|
122
|
+
environment: "<workstation|field|control-room|mixed>",
|
|
123
|
+
density: "<compact|balanced|spacious>",
|
|
124
|
+
accessibility: "<wcag-aa|section-508|none>",
|
|
125
|
+
colorScheme: "<light|dark|both>"
|
|
126
|
+
},
|
|
127
|
+
designLanguage: {
|
|
128
|
+
rationale: "<design rationale>",
|
|
129
|
+
spacingScale: { base: 8, scale: [0, 4, 8, 16, 24, 32, 48, 64] },
|
|
130
|
+
colorSemantics: { primary: "#1a365d", accent: "#e53e3e" },
|
|
131
|
+
typography: {
|
|
132
|
+
dataFont: "Inter",
|
|
133
|
+
headingFont: "Inter",
|
|
134
|
+
monoFont: "monospace",
|
|
135
|
+
dataSizePx: 12,
|
|
136
|
+
bodySizePx: 14
|
|
137
|
+
},
|
|
138
|
+
contrastRatio: "4.5",
|
|
139
|
+
borderRadius: "4",
|
|
140
|
+
shadowElevation: "standard"
|
|
141
|
+
},
|
|
142
|
+
themeTokenSeeds: {
|
|
143
|
+
light: {
|
|
144
|
+
background: "#ffffff",
|
|
145
|
+
foreground: "#1a1a1a",
|
|
146
|
+
primary: "#1a365d",
|
|
147
|
+
surface: "#f7f7f7",
|
|
148
|
+
border: "#e2e8f0"
|
|
149
|
+
},
|
|
150
|
+
dark: {
|
|
151
|
+
background: "#1a1a1a",
|
|
152
|
+
foreground: "#ffffff",
|
|
153
|
+
primary: "#90cdf4",
|
|
154
|
+
surface: "#2d2d2d",
|
|
155
|
+
border: "#4a5568"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
conformsTo: null,
|
|
159
|
+
operationalNotes: []
|
|
160
|
+
},
|
|
161
|
+
null,
|
|
162
|
+
2
|
|
163
|
+
),
|
|
164
|
+
theme: JSON.stringify(
|
|
165
|
+
{
|
|
166
|
+
version: "1.0",
|
|
167
|
+
generatedBy: "stackwright-pro-theme-otter",
|
|
168
|
+
componentLibrary: "shadcn",
|
|
169
|
+
colorScheme: "<light|dark|both>",
|
|
170
|
+
tokens: {
|
|
171
|
+
colors: { "primary-500": "#1a365d", background: "#ffffff" },
|
|
172
|
+
spacing: { "spacing-1": "8px", "spacing-2": "16px" },
|
|
173
|
+
typography: { "font-data": "Inter", "text-sm": "12px" },
|
|
174
|
+
shape: { "radius-sm": "4px", "radius-md": "8px" },
|
|
175
|
+
shadows: { "shadow-sm": "0 1px 2px rgba(0,0,0,0.08)" }
|
|
176
|
+
},
|
|
177
|
+
cssVariables: {
|
|
178
|
+
"--background": "0 0% 100%",
|
|
179
|
+
"--foreground": "222.2 84% 4.9%",
|
|
180
|
+
"--primary": "222.2 47.4% 11.2%",
|
|
181
|
+
"--primary-foreground": "210 40% 98%",
|
|
182
|
+
"--surface": "210 40% 98%",
|
|
183
|
+
"--border": "214.3 31.8% 91.4%"
|
|
184
|
+
},
|
|
185
|
+
dark: { "--background": "222.2 84% 4.9%", "--foreground": "210 40% 98%" }
|
|
186
|
+
},
|
|
187
|
+
null,
|
|
188
|
+
2
|
|
189
|
+
),
|
|
190
|
+
scaffold: JSON.stringify(
|
|
191
|
+
{
|
|
192
|
+
version: "1.0",
|
|
193
|
+
generatedBy: "stackwright-pro-scaffold-otter",
|
|
194
|
+
// REQUIRED: appRouterFiles is a required key — NOT 'files' (see swp-k3mb)
|
|
195
|
+
appRouterFiles: [
|
|
196
|
+
"app/layout.tsx",
|
|
197
|
+
"app/_components/page-client.tsx",
|
|
198
|
+
"app/page.tsx",
|
|
199
|
+
"app/[...slug]/page.tsx",
|
|
200
|
+
"app/_components/providers.tsx",
|
|
201
|
+
"app/not-found.tsx"
|
|
202
|
+
],
|
|
203
|
+
title: "<title from stackwright.yml>",
|
|
204
|
+
hasCollectionEndpoints: false,
|
|
205
|
+
hasAuthConfig: true
|
|
206
|
+
},
|
|
207
|
+
null,
|
|
208
|
+
2
|
|
209
|
+
),
|
|
210
|
+
api: JSON.stringify(
|
|
211
|
+
{
|
|
212
|
+
version: "1.0",
|
|
213
|
+
generatedBy: "stackwright-pro-api-otter",
|
|
214
|
+
entities: [
|
|
215
|
+
{
|
|
216
|
+
name: "Shipment",
|
|
217
|
+
endpoint: "/shipments",
|
|
218
|
+
method: "GET",
|
|
219
|
+
revalidate: 60,
|
|
220
|
+
mutationType: null
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
skipped: [
|
|
224
|
+
{
|
|
225
|
+
spec: "ais-message-models.yaml",
|
|
226
|
+
format: "asyncapi",
|
|
227
|
+
reason: "AsyncAPI spec \u2014 WebSocket/event integration required (no REST endpoints)"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
warnings: [
|
|
231
|
+
"Spec contains external $ref URLs \u2014 recommend bundle: true in stackwright.yml integration config"
|
|
232
|
+
],
|
|
233
|
+
auth: { type: "bearer", header: "Authorization", envVar: "API_TOKEN" },
|
|
234
|
+
baseUrl: "https://api.example.mil/v2",
|
|
235
|
+
specPath: "./specs/api.yaml"
|
|
236
|
+
},
|
|
237
|
+
null,
|
|
238
|
+
2
|
|
239
|
+
),
|
|
240
|
+
data: JSON.stringify(
|
|
241
|
+
{
|
|
242
|
+
version: "1.0",
|
|
243
|
+
generatedBy: "stackwright-pro-data-otter",
|
|
244
|
+
strategy: "<pulse-fast|isr-fast|isr-standard|isr-slow>",
|
|
245
|
+
pulseMode: false,
|
|
246
|
+
collections: [{ name: "equipment", revalidate: 60, pulse: false }],
|
|
247
|
+
endpoints: { included: ["/equipment/**"], excluded: ["/admin/**"] },
|
|
248
|
+
requiredPackages: { dependencies: {}, devPackages: {} }
|
|
249
|
+
},
|
|
250
|
+
null,
|
|
251
|
+
2
|
|
252
|
+
),
|
|
253
|
+
geo: JSON.stringify(
|
|
254
|
+
{
|
|
255
|
+
version: "1.0",
|
|
256
|
+
generatedBy: "stackwright-pro-geo-otter",
|
|
257
|
+
geoCollections: [
|
|
258
|
+
{
|
|
259
|
+
collection: "vessels",
|
|
260
|
+
latField: "latitude",
|
|
261
|
+
lngField: "longitude",
|
|
262
|
+
labelField: "vesselName",
|
|
263
|
+
colorField: "navigationStatus"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
pages: [
|
|
267
|
+
{
|
|
268
|
+
slug: "fleet-tracker",
|
|
269
|
+
type: "<tracker|zone|route|combined>",
|
|
270
|
+
collections: ["vessels"],
|
|
271
|
+
hasLayers: false
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
null,
|
|
276
|
+
2
|
|
277
|
+
),
|
|
278
|
+
workflow: JSON.stringify(
|
|
279
|
+
{
|
|
280
|
+
version: "1.0",
|
|
281
|
+
generatedBy: "stackwright-pro-form-wizard-otter",
|
|
282
|
+
// Root key is `workflow` — NOT `workflowConfig` (see swp-k7cl)
|
|
283
|
+
workflow: {
|
|
284
|
+
id: "procurement-approval",
|
|
285
|
+
route: "/procurement",
|
|
286
|
+
files: ["workflows/procurement-approval.yml"],
|
|
287
|
+
serviceDependencies: ["service:workflow-state"],
|
|
288
|
+
warnings: []
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
null,
|
|
292
|
+
2
|
|
293
|
+
),
|
|
294
|
+
services: JSON.stringify(
|
|
295
|
+
{
|
|
296
|
+
version: "1.0",
|
|
297
|
+
generatedBy: "stackwright-services-otter",
|
|
298
|
+
flows: [
|
|
299
|
+
{
|
|
300
|
+
name: "at-risk-patients",
|
|
301
|
+
trigger: "<http|event|schedule|queue>",
|
|
302
|
+
steps: 3,
|
|
303
|
+
outputSpec: "at-risk-patients.openapi.json"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
workflows: [
|
|
307
|
+
{
|
|
308
|
+
name: "evacuation-coordination",
|
|
309
|
+
states: 4,
|
|
310
|
+
transitions: 5
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
openApiSpecs: ["at-risk-patients.openapi.json"],
|
|
314
|
+
capabilitiesUsed: ["service.call", "collection.join", "collection.filter"]
|
|
315
|
+
},
|
|
316
|
+
null,
|
|
317
|
+
2
|
|
318
|
+
),
|
|
319
|
+
pages: JSON.stringify(
|
|
320
|
+
{
|
|
321
|
+
version: "1.0",
|
|
322
|
+
generatedBy: "stackwright-pro-page-otter",
|
|
323
|
+
pages: [
|
|
324
|
+
{
|
|
325
|
+
slug: "catalog",
|
|
326
|
+
type: "collection_listing",
|
|
327
|
+
collection: "products",
|
|
328
|
+
themeApplied: true,
|
|
329
|
+
authRequired: false
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
slug: "admin",
|
|
333
|
+
type: "protected",
|
|
334
|
+
collection: null,
|
|
335
|
+
themeApplied: true,
|
|
336
|
+
authRequired: true
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
null,
|
|
341
|
+
2
|
|
342
|
+
),
|
|
343
|
+
dashboard: JSON.stringify(
|
|
344
|
+
{
|
|
345
|
+
version: "1.0",
|
|
346
|
+
generatedBy: "stackwright-pro-dashboard-otter",
|
|
347
|
+
pages: [
|
|
348
|
+
{
|
|
349
|
+
slug: "dashboard",
|
|
350
|
+
layout: "<grid|table|mixed>",
|
|
351
|
+
collections: ["equipment", "supplies"],
|
|
352
|
+
mode: "<ISR|Pulse>"
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
null,
|
|
357
|
+
2
|
|
358
|
+
),
|
|
359
|
+
// type: 'pki' = CAC/DoD certificate auth | 'oidc' = enterprise SSO
|
|
360
|
+
// For dev-only mock auth: use type: 'oidc' with devOnly: true (Zod strips devOnly — it's a convention only)
|
|
361
|
+
auth: JSON.stringify(
|
|
362
|
+
{
|
|
363
|
+
version: "1.0",
|
|
364
|
+
generatedBy: "stackwright-pro-auth-otter",
|
|
365
|
+
authConfig: {
|
|
366
|
+
type: "<pki|oidc>",
|
|
367
|
+
// OIDC-only fields (omit for pki):
|
|
368
|
+
provider: "<azure_ad|okta|cognito|auth0|authentik|keycloak|custom>",
|
|
369
|
+
discoveryUrl: "<IdP OIDC discovery URL>",
|
|
370
|
+
clientId: "<OIDC client ID>",
|
|
371
|
+
clientSecret: "<OIDC client secret>",
|
|
372
|
+
rbacRoles: ["ADMIN", "ANALYST"],
|
|
373
|
+
rbacDefaultRole: "ANALYST",
|
|
374
|
+
protectedRoutes: ["/dashboard/:path*", "/procurement/:path*"],
|
|
375
|
+
auditEnabled: true,
|
|
376
|
+
auditRetentionDays: 90
|
|
377
|
+
},
|
|
378
|
+
// devScripts is OPTIONAL — only present when devOnly: true was used
|
|
379
|
+
// Polish otter and foreman MUST check devScripts.written before referencing scripts
|
|
380
|
+
devScripts: {
|
|
381
|
+
written: true,
|
|
382
|
+
scripts: { "dev:admin": "MOCK_USER=admin next dev" }
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
null,
|
|
386
|
+
2
|
|
387
|
+
),
|
|
388
|
+
polish: JSON.stringify(
|
|
389
|
+
{
|
|
390
|
+
version: "1.0",
|
|
391
|
+
generatedBy: "stackwright-pro-polish-otter",
|
|
392
|
+
landingPage: { slug: "", rewritten: true },
|
|
393
|
+
navigation: { itemCount: 5, items: ["/dashboard", "/equipment", "/workflows"] },
|
|
394
|
+
gettingStarted: "<rewritten|redirected|not-found>",
|
|
395
|
+
scaffoldCleanup: {
|
|
396
|
+
deleted: ["content/posts/getting-started.yaml"],
|
|
397
|
+
rewritten: ["app/not-found.tsx"],
|
|
398
|
+
skipped: []
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
null,
|
|
402
|
+
2
|
|
403
|
+
),
|
|
404
|
+
qa: JSON.stringify(
|
|
405
|
+
{
|
|
406
|
+
version: "1.0",
|
|
407
|
+
generatedBy: "stackwright-pro-qa-otter",
|
|
408
|
+
// skipped: true path — when dev server is unreachable at audit time
|
|
409
|
+
// skipped: false path — full audit completed
|
|
410
|
+
skipped: false,
|
|
411
|
+
skipReason: null,
|
|
412
|
+
wcagLevel: "<AA|AAA>",
|
|
413
|
+
summary: {
|
|
414
|
+
routesAudited: 3,
|
|
415
|
+
serious: 0,
|
|
416
|
+
moderate: 1,
|
|
417
|
+
minor: 0
|
|
418
|
+
},
|
|
419
|
+
findings: [
|
|
420
|
+
{
|
|
421
|
+
id: "qa-001",
|
|
422
|
+
route: "/dashboard",
|
|
423
|
+
severity: "<serious|moderate|minor>",
|
|
424
|
+
category: "<visual|a11y|design-contract|runtime>",
|
|
425
|
+
finding: "Human-readable description of what was observed",
|
|
426
|
+
evidence: {
|
|
427
|
+
screenshot: ".stackwright/qa/screenshots/dashboard-light.png",
|
|
428
|
+
consoleErrors: [],
|
|
429
|
+
axeViolations: []
|
|
430
|
+
},
|
|
431
|
+
suggested_otters: ["stackwright-pro-theme-otter"],
|
|
432
|
+
suggested_fix: "Specific, concrete next step the repair otter should take"
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
null,
|
|
437
|
+
2
|
|
438
|
+
)
|
|
439
|
+
};
|
|
440
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
441
|
+
0 && (module.exports = {
|
|
442
|
+
PHASE_ARTIFACT,
|
|
443
|
+
PHASE_ORDER
|
|
444
|
+
});
|
|
445
|
+
//# sourceMappingURL=pipeline-constants.js.map
|