rivet-design 0.14.18 → 0.14.19
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/agent-variants/WorktreeOrchestrator.d.ts +8 -17
- package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
- package/dist/agent-variants/WorktreeOrchestrator.js +50 -91
- package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
- package/dist/agent-variants/contracts.d.ts +11 -13
- package/dist/agent-variants/contracts.d.ts.map +1 -1
- package/dist/agent-variants/contracts.js.map +1 -1
- package/dist/agent-variants/diffQa.d.ts +0 -4
- package/dist/agent-variants/diffQa.d.ts.map +1 -1
- package/dist/agent-variants/diffQa.js +4 -60
- package/dist/agent-variants/diffQa.js.map +1 -1
- package/dist/agent-variants/errors.d.ts +1 -1
- package/dist/agent-variants/errors.d.ts.map +1 -1
- package/dist/agent-variants/errors.js +1 -0
- package/dist/agent-variants/errors.js.map +1 -1
- package/dist/agent-variants/previewQa.d.ts +5 -52
- package/dist/agent-variants/previewQa.d.ts.map +1 -1
- package/dist/agent-variants/previewQa.js +12 -474
- package/dist/agent-variants/previewQa.js.map +1 -1
- package/dist/agent-variants/sourceContext.d.ts +1 -1
- package/dist/agent-variants/sourceContext.js +1 -1
- package/dist/agent-variants/workItemBriefing.d.ts.map +1 -1
- package/dist/agent-variants/workItemBriefing.js +14 -6
- package/dist/agent-variants/workItemBriefing.js.map +1 -1
- package/package.json +1 -1
- package/src/ui/dist/assets/main-BJDmnLTY.js +422 -0
- package/src/ui/dist/index.html +1 -1
- package/src/ui/dist/assets/main-WNwLeuDz.js +0 -422
|
@@ -1,495 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.runPreviewQa = runPreviewQa;
|
|
8
|
-
exports.extractExternalAssetUrls = extractExternalAssetUrls;
|
|
9
|
-
exports.extractLocalAssetPaths = extractLocalAssetPaths;
|
|
10
|
-
const dns_1 = __importDefault(require("dns"));
|
|
11
|
-
const fs_1 = __importDefault(require("fs"));
|
|
12
|
-
const http_1 = __importDefault(require("http"));
|
|
13
|
-
const https_1 = __importDefault(require("https"));
|
|
14
|
-
const path_1 = __importDefault(require("path"));
|
|
15
|
-
const sourceContext_1 = require("./sourceContext");
|
|
16
|
-
/**
|
|
17
|
-
* Preview QA — objective post-generation health checks for static-preview
|
|
18
|
-
* variants. The orchestrator runs this before accepting a `static_preview`
|
|
19
|
-
* succeeded report so a variant cannot enter `ready` while its referenced
|
|
20
|
-
* assets 404 or its runtime throws.
|
|
21
|
-
*
|
|
22
|
-
* The runner has two layers:
|
|
23
|
-
*
|
|
24
|
-
* 1. A pure static check that extracts external asset URLs from the
|
|
25
|
-
* generated HTML and fetches each one with a small timeout. This
|
|
26
|
-
* catches the most common failure mode (broken CDN URLs, missing
|
|
27
|
-
* `.glb` model assets) without needing a browser.
|
|
28
|
-
*
|
|
29
|
-
* 2. An injectable runtime check that can be wired to Playwright later
|
|
30
|
-
* to capture `pageerror` / `console.error` events. Tests stub this
|
|
31
|
-
* layer; production uses `DEFAULT_RUNTIME_QA_RUNNER` which is a
|
|
32
|
-
* no-op so the gate falls back to the static layer when no real
|
|
33
|
-
* runner is available.
|
|
34
|
-
*/
|
|
35
|
-
const DEFAULT_ASSET_TIMEOUT_MS = 4_000;
|
|
36
|
-
const LOCAL_ASSET_EXTENSIONS = new Set([
|
|
37
|
-
'.avif',
|
|
38
|
-
'.gif',
|
|
39
|
-
'.glb',
|
|
40
|
-
'.gltf',
|
|
41
|
-
'.jpg',
|
|
42
|
-
'.jpeg',
|
|
43
|
-
'.mp4',
|
|
44
|
-
'.png',
|
|
45
|
-
'.svg',
|
|
46
|
-
'.webm',
|
|
47
|
-
'.webp',
|
|
48
|
-
]);
|
|
49
|
-
/**
|
|
50
|
-
* No-op runtime QA runner used when no real (e.g. Playwright-based)
|
|
51
|
-
* runner is injected. Returns an empty issue list so the gate decision
|
|
52
|
-
* is driven entirely by the static asset layer.
|
|
53
|
-
*/
|
|
54
|
-
const DEFAULT_RUNTIME_QA_RUNNER = async () => [];
|
|
55
|
-
exports.DEFAULT_RUNTIME_QA_RUNNER = DEFAULT_RUNTIME_QA_RUNNER;
|
|
56
|
-
const MAX_REDIRECTS = 5;
|
|
57
|
-
/**
|
|
58
|
-
* Resolves a hostname to public addresses and returns the address that the
|
|
59
|
-
* subsequent HTTP request must use for its own lookup.
|
|
60
|
-
*
|
|
61
|
-
* @effect Performs a DNS lookup via dns.promises.lookup
|
|
62
|
-
*/
|
|
63
|
-
const resolvePinnedAddress = async (hostname) => {
|
|
64
|
-
if ((0, sourceContext_1.isLocalLiteralHostname)(hostname)) {
|
|
65
|
-
return {
|
|
66
|
-
kind: 'blocked',
|
|
67
|
-
message: `Host '${hostname}' resolves to a protected target.`,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
let addresses;
|
|
71
|
-
try {
|
|
72
|
-
addresses = await dns_1.default.promises.lookup(hostname, { all: true });
|
|
73
|
-
}
|
|
74
|
-
catch {
|
|
75
|
-
return {
|
|
76
|
-
kind: 'blocked',
|
|
77
|
-
message: `Host '${hostname}' could not be resolved safely.`,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
const protectedAddress = addresses.find(({ address }) => (0, sourceContext_1.isLocalLiteralHostname)(address));
|
|
81
|
-
if (protectedAddress) {
|
|
82
|
-
return {
|
|
83
|
-
kind: 'blocked',
|
|
84
|
-
message: `Host '${hostname}' resolves to a protected target.`,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
const address = addresses[0];
|
|
88
|
-
if (!address) {
|
|
89
|
-
return {
|
|
90
|
-
kind: 'blocked',
|
|
91
|
-
message: `Host '${hostname}' did not resolve to an address.`,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
kind: 'resolved',
|
|
96
|
-
address: {
|
|
97
|
-
address: address.address,
|
|
98
|
-
family: address.family === 6 ? 6 : 4,
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
const locationHeader = (headers) => {
|
|
103
|
-
const value = headers.location;
|
|
104
|
-
return Array.isArray(value) ? value[0] : value;
|
|
105
|
-
};
|
|
3
|
+
exports.runPreviewQa = void 0;
|
|
106
4
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* @effect Performs a network request to the validated asset URL
|
|
5
|
+
* Verifies that a worker produced a non-empty static preview artifact.
|
|
6
|
+
* Project-native checks remain the worker's responsibility; Rivet does not
|
|
7
|
+
* infer runtime validity by inspecting the artifact's implementation details.
|
|
111
8
|
*/
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
if (pinned.kind === 'blocked') {
|
|
116
|
-
return { kind: 'blocked', status: 0, message: pinned.message };
|
|
117
|
-
}
|
|
118
|
-
const lookup = (_hostname, _options, callback) => {
|
|
119
|
-
callback(null, pinned.address.address, pinned.address.family);
|
|
120
|
-
};
|
|
121
|
-
const transport = parsed.protocol === 'https:' ? https_1.default : http_1.default;
|
|
122
|
-
return new Promise((resolve, reject) => {
|
|
123
|
-
const request = transport.request({
|
|
124
|
-
protocol: parsed.protocol,
|
|
125
|
-
hostname: parsed.hostname,
|
|
126
|
-
port: parsed.port || undefined,
|
|
127
|
-
path: `${parsed.pathname}${parsed.search}`,
|
|
128
|
-
method: input.method,
|
|
129
|
-
headers: input.headers,
|
|
130
|
-
lookup,
|
|
131
|
-
signal: input.signal,
|
|
132
|
-
}, (response) => {
|
|
133
|
-
response.resume();
|
|
134
|
-
resolve({
|
|
135
|
-
kind: 'response',
|
|
136
|
-
response: {
|
|
137
|
-
status: response.statusCode ?? 0,
|
|
138
|
-
headers: response.headers,
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
request.on('error', reject);
|
|
143
|
-
request.end();
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
const DEFAULT_ASSET_PROBER = async (url, timeoutMs) => {
|
|
147
|
-
// SSRF guard: agent-supplied HTML can carry URLs pointing at localhost,
|
|
148
|
-
// RFC1918, link-local, or cloud-metadata hosts. Validate scheme +
|
|
149
|
-
// local-literal targets before issuing a network request, pin DNS for the
|
|
150
|
-
// request itself, and re-check after redirects.
|
|
151
|
-
const validation = (0, sourceContext_1.validateInspirationUrl)(url);
|
|
152
|
-
if (!validation.ok) {
|
|
153
|
-
return { ok: false, status: 0, message: validation.reason };
|
|
154
|
-
}
|
|
155
|
-
const controller = new AbortController();
|
|
156
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
157
|
-
const requestWithGuardedRedirects = async (initialUrl, init) => {
|
|
158
|
-
let currentUrl = initialUrl;
|
|
159
|
-
for (let hop = 0; hop <= MAX_REDIRECTS; hop += 1) {
|
|
160
|
-
const currentValidation = (0, sourceContext_1.validateInspirationUrl)(currentUrl);
|
|
161
|
-
if (!currentValidation.ok) {
|
|
162
|
-
return {
|
|
163
|
-
kind: 'blocked',
|
|
164
|
-
status: 0,
|
|
165
|
-
message: currentValidation.reason,
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
const result = await requestAsset({
|
|
169
|
-
url: currentValidation.normalized,
|
|
170
|
-
method: init.method,
|
|
171
|
-
headers: init.headers,
|
|
172
|
-
signal: controller.signal,
|
|
173
|
-
});
|
|
174
|
-
if (result.kind === 'blocked')
|
|
175
|
-
return result;
|
|
176
|
-
const response = result.response;
|
|
177
|
-
const isRedirect = response.status >= 300 && response.status < 400;
|
|
178
|
-
const location = locationHeader(response.headers);
|
|
179
|
-
if (!isRedirect || !location) {
|
|
180
|
-
return { kind: 'response', response };
|
|
181
|
-
}
|
|
182
|
-
if (hop === MAX_REDIRECTS) {
|
|
183
|
-
return {
|
|
184
|
-
kind: 'blocked',
|
|
185
|
-
status: 0,
|
|
186
|
-
message: `Exceeded ${MAX_REDIRECTS} redirects probing asset.`,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
// Resolve relative redirects against the URL we just hit.
|
|
190
|
-
let nextUrl;
|
|
191
|
-
try {
|
|
192
|
-
nextUrl = new URL(location, currentUrl);
|
|
193
|
-
}
|
|
194
|
-
catch {
|
|
195
|
-
return {
|
|
196
|
-
kind: 'blocked',
|
|
197
|
-
status: 0,
|
|
198
|
-
message: `Malformed redirect Location '${location}'.`,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
currentUrl = nextUrl.toString();
|
|
202
|
-
}
|
|
203
|
-
return {
|
|
204
|
-
kind: 'blocked',
|
|
205
|
-
status: 0,
|
|
206
|
-
message: 'Redirect handling exhausted unexpectedly.',
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
try {
|
|
210
|
-
let result = await requestWithGuardedRedirects(validation.normalized, {
|
|
211
|
-
method: 'HEAD',
|
|
212
|
-
});
|
|
213
|
-
if (result.kind === 'blocked') {
|
|
214
|
-
return { ok: false, status: result.status, message: result.message };
|
|
215
|
-
}
|
|
216
|
-
let response = result.response;
|
|
217
|
-
// Some CDNs reject HEAD with 405 — fall back to a ranged GET.
|
|
218
|
-
if (response.status === 405 || response.status === 501) {
|
|
219
|
-
result = await requestWithGuardedRedirects(validation.normalized, {
|
|
220
|
-
method: 'GET',
|
|
221
|
-
headers: { Range: 'bytes=0-0' },
|
|
222
|
-
});
|
|
223
|
-
if (result.kind === 'blocked') {
|
|
224
|
-
return { ok: false, status: result.status, message: result.message };
|
|
225
|
-
}
|
|
226
|
-
response = result.response;
|
|
227
|
-
}
|
|
228
|
-
return {
|
|
229
|
-
ok: response.status >= 200 && response.status < 300,
|
|
230
|
-
status: response.status,
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
catch (err) {
|
|
234
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
235
|
-
return { ok: false, status: 0, message };
|
|
236
|
-
}
|
|
237
|
-
finally {
|
|
238
|
-
clearTimeout(timer);
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
exports.DEFAULT_ASSET_PROBER = DEFAULT_ASSET_PROBER;
|
|
242
|
-
/**
|
|
243
|
-
* Run preview QA against a generated static-preview HTML document. The
|
|
244
|
-
* static layer extracts external asset URLs and local asset references; the
|
|
245
|
-
* injectable runtime layer adds console/runtime checks. Returns a single
|
|
246
|
-
* `VariantQaResult` with the combined verdict.
|
|
247
|
-
*/
|
|
248
|
-
async function runPreviewQa(input) {
|
|
249
|
-
const html = input.html;
|
|
250
|
-
if (typeof html !== 'string' || html.trim().length === 0) {
|
|
9
|
+
const runPreviewQa = async (input) => {
|
|
10
|
+
const source = input.options?.source;
|
|
11
|
+
if (typeof input.html !== 'string' || input.html.trim().length === 0) {
|
|
251
12
|
return {
|
|
252
13
|
status: 'failed',
|
|
253
14
|
issues: [
|
|
254
15
|
{
|
|
255
16
|
kind: 'preview_unavailable',
|
|
256
|
-
detail:
|
|
17
|
+
detail: source ?? 'inline',
|
|
257
18
|
message: 'Preview HTML was empty',
|
|
258
19
|
},
|
|
259
20
|
],
|
|
260
21
|
summary: 'Preview unavailable: generated HTML was empty.',
|
|
261
|
-
checkedSource: input.options?.source,
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
const assetProber = input.options?.assetProber ?? exports.DEFAULT_ASSET_PROBER;
|
|
265
|
-
const runtimeRunner = input.options?.runtimeQaRunner ?? exports.DEFAULT_RUNTIME_QA_RUNNER;
|
|
266
|
-
const assetTimeoutMs = input.options?.assetTimeoutMs ?? DEFAULT_ASSET_TIMEOUT_MS;
|
|
267
|
-
const source = input.options?.source;
|
|
268
|
-
const localAssetBasePath = input.options?.localAssetBasePath;
|
|
269
|
-
const issues = [];
|
|
270
|
-
const blockingAssetDetails = new Set();
|
|
271
|
-
const assetUrls = extractExternalAssetUrls(html);
|
|
272
|
-
await Promise.all(assetUrls.map(async (url) => {
|
|
273
|
-
const result = await assetProber(url, assetTimeoutMs);
|
|
274
|
-
if (!result.ok) {
|
|
275
|
-
issues.push({
|
|
276
|
-
kind: 'asset_load_failed',
|
|
277
|
-
detail: url,
|
|
278
|
-
message: result.status > 0
|
|
279
|
-
? `HTTP ${result.status}`
|
|
280
|
-
: result.message ?? 'Network error',
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
}));
|
|
284
|
-
const localAssetPaths = extractLocalAssetPaths(html);
|
|
285
|
-
for (const assetPath of localAssetPaths) {
|
|
286
|
-
const validation = validateLocalAssetReference(assetPath, localAssetBasePath);
|
|
287
|
-
if (!validation.ok) {
|
|
288
|
-
blockingAssetDetails.add(assetPath);
|
|
289
|
-
issues.push({
|
|
290
|
-
kind: 'asset_load_failed',
|
|
291
|
-
detail: assetPath,
|
|
292
|
-
message: validation.message,
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
try {
|
|
297
|
-
const runtimeIssues = await runtimeRunner({ html, source: source ?? 'inline' });
|
|
298
|
-
for (const issue of runtimeIssues) {
|
|
299
|
-
issues.push(issue);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
catch (err) {
|
|
303
|
-
issues.push({
|
|
304
|
-
kind: 'console_error',
|
|
305
|
-
detail: 'runtime_qa_runner',
|
|
306
|
-
message: err instanceof Error ? err.message : String(err),
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
// External-asset probe failures don't block — the user's browser fetches
|
|
310
|
-
// these directly when viewing the preview, so a server-side reachability
|
|
311
|
-
// failure (e.g. IPv6/SSRF-guard edge cases on fonts.googleapis.com) doesn't
|
|
312
|
-
// predict whether the iframe will render. Local asset failures do block:
|
|
313
|
-
// if the generated static preview references `./hero.png` and no sibling
|
|
314
|
-
// file exists in the asset base, the iframe has nowhere to load it from.
|
|
315
|
-
const blockingIssues = issues.filter((issue) => issue.kind !== 'asset_load_failed' ||
|
|
316
|
-
(issue.detail ? blockingAssetDetails.has(issue.detail) : false));
|
|
317
|
-
if (blockingIssues.length === 0) {
|
|
318
|
-
const assetIssueCount = issues.length;
|
|
319
|
-
return {
|
|
320
|
-
status: 'passed',
|
|
321
|
-
issues,
|
|
322
|
-
summary: assetIssueCount === 0
|
|
323
|
-
? 'Preview QA passed — assets reachable, no runtime errors.'
|
|
324
|
-
: `Preview QA passed — ${assetIssueCount} external asset${assetIssueCount === 1 ? '' : 's'} unreachable from server (browser will fetch independently).`,
|
|
325
22
|
checkedSource: source,
|
|
326
23
|
};
|
|
327
24
|
}
|
|
328
25
|
return {
|
|
329
|
-
status: '
|
|
330
|
-
issues,
|
|
331
|
-
summary:
|
|
26
|
+
status: 'passed',
|
|
27
|
+
issues: [],
|
|
28
|
+
summary: 'Preview integrity passed.',
|
|
332
29
|
checkedSource: source,
|
|
333
30
|
};
|
|
334
|
-
}
|
|
335
|
-
const buildIssueSummary = (issues) => {
|
|
336
|
-
const counts = {
|
|
337
|
-
asset_load_failed: 0,
|
|
338
|
-
console_error: 0,
|
|
339
|
-
preview_unavailable: 0,
|
|
340
|
-
design_quality: 0,
|
|
341
|
-
};
|
|
342
|
-
for (const issue of issues) {
|
|
343
|
-
counts[issue.kind] += 1;
|
|
344
|
-
}
|
|
345
|
-
const fragments = [];
|
|
346
|
-
if (counts.asset_load_failed > 0) {
|
|
347
|
-
const first = issues.find((i) => i.kind === 'asset_load_failed');
|
|
348
|
-
fragments.push(counts.asset_load_failed === 1
|
|
349
|
-
? `asset failed to load (${first?.detail ?? 'unknown'})`
|
|
350
|
-
: `${counts.asset_load_failed} assets failed to load`);
|
|
351
|
-
}
|
|
352
|
-
if (counts.console_error > 0) {
|
|
353
|
-
fragments.push(counts.console_error === 1
|
|
354
|
-
? '1 console/runtime error detected'
|
|
355
|
-
: `${counts.console_error} console/runtime errors detected`);
|
|
356
|
-
}
|
|
357
|
-
if (counts.preview_unavailable > 0) {
|
|
358
|
-
fragments.push('preview unavailable');
|
|
359
|
-
}
|
|
360
|
-
return `Preview QA failed: ${fragments.join('; ')}.`;
|
|
361
|
-
};
|
|
362
|
-
/**
|
|
363
|
-
* Extract external asset URLs from a generated HTML document. Pulls from
|
|
364
|
-
* the common attributes (`src`, `href`, `poster`, `data-*` images) and
|
|
365
|
-
* inline CSS `url(...)` references. Keeps only http(s) URLs; local asset
|
|
366
|
-
* references are validated separately against the static preview asset base.
|
|
367
|
-
*/
|
|
368
|
-
function extractExternalAssetUrls(html) {
|
|
369
|
-
const seen = new Set();
|
|
370
|
-
const push = (raw) => {
|
|
371
|
-
if (!raw)
|
|
372
|
-
return;
|
|
373
|
-
const trimmed = raw.trim();
|
|
374
|
-
if (!trimmed)
|
|
375
|
-
return;
|
|
376
|
-
if (!/^https?:\/\//i.test(trimmed))
|
|
377
|
-
return;
|
|
378
|
-
seen.add(trimmed);
|
|
379
|
-
};
|
|
380
|
-
const attributeRegex = /\b(?:src|href|poster|data-src|data-href|data-image|model-src)\s*=\s*("|')([^"']+)\1/gi;
|
|
381
|
-
let attrMatch;
|
|
382
|
-
while ((attrMatch = attributeRegex.exec(html))) {
|
|
383
|
-
push(attrMatch[2]);
|
|
384
|
-
}
|
|
385
|
-
// <link rel="stylesheet" href="..."> is already covered above; capture
|
|
386
|
-
// <img srcset> entries here. srcset is a comma list of "url descriptor".
|
|
387
|
-
const srcsetRegex = /\bsrcset\s*=\s*("|')([^"']+)\1/gi;
|
|
388
|
-
let srcsetMatch;
|
|
389
|
-
while ((srcsetMatch = srcsetRegex.exec(html))) {
|
|
390
|
-
const list = srcsetMatch[2];
|
|
391
|
-
for (const entry of list.split(',')) {
|
|
392
|
-
const url = entry.trim().split(/\s+/)[0];
|
|
393
|
-
push(url);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
// Inline CSS `url(...)` references (background-image, etc.). Strip
|
|
397
|
-
// surrounding quotes if present.
|
|
398
|
-
const cssUrlRegex = /url\(\s*("|'|)([^"')]+)\1\s*\)/gi;
|
|
399
|
-
let cssMatch;
|
|
400
|
-
while ((cssMatch = cssUrlRegex.exec(html))) {
|
|
401
|
-
push(cssMatch[2]);
|
|
402
|
-
}
|
|
403
|
-
return [...seen];
|
|
404
|
-
}
|
|
405
|
-
function extractLocalAssetPaths(html) {
|
|
406
|
-
const seen = new Set();
|
|
407
|
-
const push = (raw) => {
|
|
408
|
-
if (!raw)
|
|
409
|
-
return;
|
|
410
|
-
const trimmed = raw.trim();
|
|
411
|
-
if (!trimmed || !isLocalAssetReference(trimmed))
|
|
412
|
-
return;
|
|
413
|
-
seen.add(trimmed);
|
|
414
|
-
};
|
|
415
|
-
const attributeRegex = /\b(?:src|href|poster|data-src|data-href|data-image|model-src)\s*=\s*("|')([^"']+)\1/gi;
|
|
416
|
-
let attrMatch;
|
|
417
|
-
while ((attrMatch = attributeRegex.exec(html))) {
|
|
418
|
-
push(attrMatch[2]);
|
|
419
|
-
}
|
|
420
|
-
const srcsetRegex = /\bsrcset\s*=\s*("|')([^"']+)\1/gi;
|
|
421
|
-
let srcsetMatch;
|
|
422
|
-
while ((srcsetMatch = srcsetRegex.exec(html))) {
|
|
423
|
-
const list = srcsetMatch[2];
|
|
424
|
-
for (const entry of list.split(',')) {
|
|
425
|
-
const url = entry.trim().split(/\s+/)[0];
|
|
426
|
-
push(url);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
const cssUrlRegex = /url\(\s*("|'|)([^"')]+)\1\s*\)/gi;
|
|
430
|
-
let cssMatch;
|
|
431
|
-
while ((cssMatch = cssUrlRegex.exec(html))) {
|
|
432
|
-
push(cssMatch[2]);
|
|
433
|
-
}
|
|
434
|
-
return [...seen];
|
|
435
|
-
}
|
|
436
|
-
const isLocalAssetReference = (raw) => {
|
|
437
|
-
if (/^(?:https?:|data:|blob:|mailto:|tel:|javascript:)/i.test(raw)) {
|
|
438
|
-
return false;
|
|
439
|
-
}
|
|
440
|
-
if (raw.startsWith('#') || raw.startsWith('//'))
|
|
441
|
-
return false;
|
|
442
|
-
let pathname;
|
|
443
|
-
try {
|
|
444
|
-
pathname = new URL(raw, 'http://rivet.local').pathname;
|
|
445
|
-
}
|
|
446
|
-
catch {
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
const extension = path_1.default.extname(pathname).toLowerCase();
|
|
450
|
-
return LOCAL_ASSET_EXTENSIONS.has(extension);
|
|
451
|
-
};
|
|
452
|
-
const normalizeLocalAssetPath = (raw) => {
|
|
453
|
-
try {
|
|
454
|
-
const pathOnly = raw.trim().split(/[?#]/)[0] ?? '';
|
|
455
|
-
const decoded = decodeURIComponent(pathOnly);
|
|
456
|
-
return decoded.startsWith('/') ? decoded.replace(/^\/+/, '') : decoded;
|
|
457
|
-
}
|
|
458
|
-
catch {
|
|
459
|
-
return null;
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
const validateLocalAssetReference = (raw, localAssetBasePath) => {
|
|
463
|
-
if (!localAssetBasePath) {
|
|
464
|
-
return {
|
|
465
|
-
ok: false,
|
|
466
|
-
message: 'Local asset reference has no static preview asset base; copy the file or inline the asset.',
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
const relativePath = normalizeLocalAssetPath(raw);
|
|
470
|
-
if (!relativePath) {
|
|
471
|
-
return { ok: false, message: 'Local asset reference is malformed.' };
|
|
472
|
-
}
|
|
473
|
-
const base = path_1.default.resolve(localAssetBasePath);
|
|
474
|
-
const target = path_1.default.resolve(base, relativePath);
|
|
475
|
-
if (target !== base && !target.startsWith(base + path_1.default.sep)) {
|
|
476
|
-
return {
|
|
477
|
-
ok: false,
|
|
478
|
-
message: 'Local asset reference escapes the static preview asset base.',
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
try {
|
|
482
|
-
const stat = fs_1.default.statSync(target);
|
|
483
|
-
if (!stat.isFile()) {
|
|
484
|
-
return { ok: false, message: 'Local asset reference is not a file.' };
|
|
485
|
-
}
|
|
486
|
-
return { ok: true };
|
|
487
|
-
}
|
|
488
|
-
catch {
|
|
489
|
-
return {
|
|
490
|
-
ok: false,
|
|
491
|
-
message: 'Local asset reference was not found in the static preview.',
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
31
|
};
|
|
32
|
+
exports.runPreviewQa = runPreviewQa;
|
|
495
33
|
//# sourceMappingURL=previewQa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewQa.js","sourceRoot":"","sources":["../../src/agent-variants/previewQa.ts"],"names":[],"mappings":";;;;;;AA4UA,oCA0GC;AAwCD,4DAqCC;AAED,wDAiCC;AAtiBD,8CAAsB;AACtB,4CAAoB;AACpB,gDAAwB;AACxB,kDAA0B;AAE1B,gDAAwB;AAMxB,mDAGyB;AAEzB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,wBAAwB,GAAG,KAAK,CAAC;AACvC,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;CACR,CAAC,CAAC;AAmBH;;;;GAIG;AACI,MAAM,yBAAyB,GAAoB,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;AAA5D,QAAA,yBAAyB,6BAAmC;AAsBzE,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB;;;;;GAKG;AACH,MAAM,oBAAoB,GAAG,KAAK,EAChC,QAAgB,EAIhB,EAAE;IACF,IAAI,IAAA,sCAAsB,EAAC,QAAQ,CAAC,EAAE,CAAC;QACrC,OAAO;YACL,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,SAAS,QAAQ,mCAAmC;SAC9D,CAAC;IACJ,CAAC;IACD,IAAI,SAA8B,CAAC;IACnC,IAAI,CAAC;QACH,SAAS,GAAG,MAAM,aAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;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AgD;YACzD,aAAa,EAAE,MAAM;SACtB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,2BAA2B;QACpC,aAAa,EAAE,MAAM;KACtB,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,YAAY,gBAyBvB"}
|
|
@@ -7,7 +7,7 @@ export declare const isLocalLiteralHostname: (hostname: string) => boolean;
|
|
|
7
7
|
/**
|
|
8
8
|
* Synchronous URL validator: enforces HTTP/HTTPS scheme and rejects literal
|
|
9
9
|
* hostnames that match local/loopback/link-local patterns. Used as the SSRF
|
|
10
|
-
* guard for
|
|
10
|
+
* guard for visual reference URLs.
|
|
11
11
|
*/
|
|
12
12
|
export declare const validateInspirationUrl: (rawUrl: string) => {
|
|
13
13
|
ok: true;
|
|
@@ -66,7 +66,7 @@ exports.isLocalLiteralHostname = isLocalLiteralHostname;
|
|
|
66
66
|
/**
|
|
67
67
|
* Synchronous URL validator: enforces HTTP/HTTPS scheme and rejects literal
|
|
68
68
|
* hostnames that match local/loopback/link-local patterns. Used as the SSRF
|
|
69
|
-
* guard for
|
|
69
|
+
* guard for visual reference URLs.
|
|
70
70
|
*/
|
|
71
71
|
const validateInspirationUrl = (rawUrl) => {
|
|
72
72
|
const trimmed = rawUrl.trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workItemBriefing.d.ts","sourceRoot":"","sources":["../../src/agent-variants/workItemBriefing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAC;AAK7E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,QAAQ,MAAM,KACb,MACwE,CAAC;AAE5E,KAAK,8BAA8B,GAAG;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAQF,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,EACd,UAAU,8BAA8B,KACvC,MAaW,CAAC;AAEf,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,MAAM,yCAAyC,KAC9C,MAG4E,CAAC;AAwChF,eAAO,MAAM,sBAAsB,GACjC,MAAM,yCAAyC,EAC/C,UAAU;IACR,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,iBAAiB,CAAC,EAAE,8BAA8B,CAAC;CACpD,KACA,
|
|
1
|
+
{"version":3,"file":"workItemBriefing.d.ts","sourceRoot":"","sources":["../../src/agent-variants/workItemBriefing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAC;AAK7E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,QAAQ,MAAM,KACb,MACwE,CAAC;AAE5E,KAAK,8BAA8B,GAAG;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAQF,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,EACd,UAAU,8BAA8B,KACvC,MAaW,CAAC;AAEf,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,MAAM,yCAAyC,KAC9C,MAG4E,CAAC;AAwChF,eAAO,MAAM,sBAAsB,GACjC,MAAM,yCAAyC,EAC/C,UAAU;IACR,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,iBAAiB,CAAC,EAAE,8BAA8B,CAAC;CACpD,KACA,MA4NF,CAAC"}
|
|
@@ -134,7 +134,7 @@ const renderWorkItemBriefing = (item, options) => {
|
|
|
134
134
|
lines.push('', `## Relevant files`, ...item.relevantFiles.map((file) => `- ${file}`));
|
|
135
135
|
}
|
|
136
136
|
if (item.contextFiles?.length) {
|
|
137
|
-
lines.push('', `## Visual references — Read these files FIRST`, `They are the primary design signal (brand, palette, type, layout,`, `energy); match them over any prose interpretation in the brief.`, ...item.contextFiles.map((file) => `- ${file.path}${file.label ? ` — ${file.label}` : ''}`));
|
|
137
|
+
lines.push('', `## Visual references — Read these files FIRST`, `They are the primary design signal (brand, palette, type, layout,`, `energy); match them over any prose interpretation in the brief.`, `If the generated app renders one, copy it into the assigned workspace and reference that copy.`, `Never reference these source paths from the generated app; they are not part of its artifact.`, ...item.contextFiles.map((file) => `- ${file.path}${file.label ? ` — ${file.label}` : ''}`));
|
|
138
138
|
}
|
|
139
139
|
if (item.contextAssets?.length) {
|
|
140
140
|
lines.push('', `## Context assets — already copied into this workspace`, `These caller-supplied files are available to this direction. Use the`, `workspace path to inspect a file and the reference path when the app`, `needs to load it.`, ...item.contextAssets.flatMap((asset) => [
|
|
@@ -151,9 +151,15 @@ const renderWorkItemBriefing = (item, options) => {
|
|
|
151
151
|
if (item.contextBundlePath) {
|
|
152
152
|
lines.push('', `## Design context`, `Read ${item.contextBundlePath} before implementing.`);
|
|
153
153
|
}
|
|
154
|
+
if (item.qaRetry) {
|
|
155
|
+
lines.push('', `## Output integrity repair`, `The prior completion was returned for one repair. Address this before reporting success:`, item.qaRetry.summary);
|
|
156
|
+
}
|
|
154
157
|
lines.push('', `## Boundaries`, `Edit only ${item.workspace.rootPath}${item.workspace.kind === 'git_worktree'
|
|
155
158
|
? ` (app at ${item.workspace.projectPath})`
|
|
156
159
|
: ''}. Do not touch other variants' workspaces. Do not run git commit or push.`);
|
|
160
|
+
if (item.mode === 'create' && item.workspace.kind === 'git_worktree') {
|
|
161
|
+
lines.push('', `## Project check`, `Run the project's existing targeted build or typecheck once if one is`, `available. Fix failures caused by your changes. Do not install new`, `dependencies or start a browser solely for verification.`);
|
|
162
|
+
}
|
|
157
163
|
if (options?.completion === 'executor') {
|
|
158
164
|
// Executor-run workers never self-report: the executor observes process
|
|
159
165
|
// exit, validates the artifact, and completes the work item itself.
|
|
@@ -165,7 +171,8 @@ const renderWorkItemBriefing = (item, options) => {
|
|
|
165
171
|
// the mode contract above forbids (the 2026-07-23 cursor incident
|
|
166
172
|
// shipped through this: workers told to "write the COMPLETE page" with
|
|
167
173
|
// `wc -c` on index.html replaced a Vite app's shell).
|
|
168
|
-
if (item.mode === 'create' &&
|
|
174
|
+
if (item.mode === 'create' &&
|
|
175
|
+
item.workspace.kind === 'artifact_directory') {
|
|
169
176
|
if (item.fidelity === 'high') {
|
|
170
177
|
// High fidelity: frontier authorship, no size cap — the user chose
|
|
171
178
|
// quality over latency. Structure discipline still applies.
|
|
@@ -187,19 +194,20 @@ const renderWorkItemBriefing = (item, options) => {
|
|
|
187
194
|
lines.push('', `## Delivery contract`, `Implement the direction with targeted edits to the app's existing`, `source files, scoped to what the direction actually touches. Keep`, `the app building and its entry shell intact; Rivet captures your`, `changes as a diff against the app's baseline.`);
|
|
188
195
|
}
|
|
189
196
|
lines.push('', `## Completion`);
|
|
190
|
-
if (item.mode === 'create' &&
|
|
197
|
+
if (item.mode === 'create' &&
|
|
198
|
+
item.workspace.kind === 'artifact_directory') {
|
|
191
199
|
// Full-page authorship gets one bounded structural pass — overlapping
|
|
192
200
|
// absolutely-positioned text and missing sections have shipped broken
|
|
193
|
-
// pages that the
|
|
201
|
+
// pages that the artifact presence check cannot catch.
|
|
194
202
|
lines.push(`Before stopping, re-read your finished page ONCE, checking structure`, `only: no overlapping or stacked text (be careful with absolute`, `positioning), no unclosed tags, and every requested section present.`, `Fix findings with minimal targeted Edit operations — never re-emit`, `the page — then stop.`);
|
|
195
203
|
}
|
|
196
204
|
else if (item.mode === 'create') {
|
|
197
205
|
lines.push(`Before stopping, re-read your changed files ONCE, checking that the`, `app still builds coherently: imports resolve, tags and braces are`, `balanced, and every aspect the direction names is present. Fix`, `findings with minimal targeted Edit operations, then stop.`);
|
|
198
206
|
}
|
|
199
|
-
lines.push(`Rivet
|
|
207
|
+
lines.push(`Rivet checks that the worker produced an artifact — do NOT spend time`, `on screenshots, broader verification, or repeated re-reads, and do`, `not run any completion command. When your edits are in place, simply`, `stop.`, '');
|
|
200
208
|
return lines.join('\n');
|
|
201
209
|
}
|
|
202
|
-
lines.push('', `## Completion — your FINAL step, the moment the workspace is done`, `Rivet
|
|
210
|
+
lines.push('', `## Completion — your FINAL step, the moment the workspace is done`, `Rivet checks that the worker produced an artifact — do NOT spend time on`, `screenshots, broader verification, or repeated re-reads. When your edits`, `are in place, run exactly:`, '', '```', (0, exports.workItemCompleteCommand)(item.workId, options?.completionCommand), '```', '', `(Hosts with Rivet MCP tools may instead call the rivet_variants tool with ` +
|
|
203
211
|
`action "complete" and workId "${item.workId}".) Do not send file contents ` +
|
|
204
212
|
`through the completion; Rivet reads the workspace itself. Then stop.`, '');
|
|
205
213
|
return lines.join('\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workItemBriefing.js","sourceRoot":"","sources":["../../src/agent-variants/workItemBriefing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,oBAAoB,GAAG,CAClC,SAAiB,EACjB,MAAc,EACN,EAAE,CACV,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,sBAAsB,EAAE,SAAS,EAAE,GAAG,MAAM,KAAK,CAAC,CAAC;AAJ/D,QAAA,oBAAoB,wBAI2C;AAO5E,6EAA6E;AAC7E,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE,CAChD,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC,CAAC,KAAK;IACP,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AAE1C,yEAAyE;AAClE,MAAM,uBAAuB,GA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,sEAAsE,EACtE,mBAAmB,EACnB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;YACvC,KAAK,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,EAAE,EAAE;YAC9B,aAAa,KAAK,CAAC,aAAa,EAAE;YAClC,kBAAkB,KAAK,CAAC,aAAa,EAAE;SACxC,CAAC,EACF,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,oBAAoB;YAC9C,CAAC,CAAC;gBACE,oEAAoE;gBACpE,uCAAuC,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG;aACnE;YACH,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CACR,EAAE,EACF,mBAAmB,EACnB,QAAQ,IAAI,CAAC,iBAAiB,uBAAuB,CACtD,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,eAAe,EACf,aAAa,IAAI,CAAC,SAAS,CAAC,QAAQ,GAClC,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,cAAc;QACpC,CAAC,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG;QAC3C,CAAC,CAAC,EACN,2EAA2E,CAC5E,CAAC;IACF,IAAI,OAAO,EAAE,UAAU,KAAK,UAAU,EAAE,CAAC;QACvC,wEAAwE;QACxE,oEAAoE;QACpE,EAAE;QACF,qEAAqE;QACrE,oEAAoE;QACpE,uEAAuE;QACvE,wEAAwE;QACxE,kEAAkE;QAClE,uEAAuE;QACvE,sDAAsD;QACtD,
|
|
1
|
+
{"version":3,"file":"workItemBriefing.js","sourceRoot":"","sources":["../../src/agent-variants/workItemBriefing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAE7B;;;;;;;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