@tryvitris/website-harness 0.1.0-beta.7 → 1.0.0

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.
Files changed (75) hide show
  1. package/README.md +49 -117
  2. package/agent/graph.yaml +12 -6
  3. package/agent/refs/admin.md +11 -0
  4. package/agent/refs/analytics.md +17 -0
  5. package/agent/refs/launch.md +15 -11
  6. package/agent/refs/performance.md +1 -1
  7. package/bin/api/agent/evaluate.js +5 -5
  8. package/bin/api/agent/grade.js +5 -5
  9. package/bin/api/cli/api.js +15 -13
  10. package/bin/api/cli.js +15 -15
  11. package/bin/api/engine.js +6 -6
  12. package/bin/api/hosting.js +9 -7
  13. package/bin/api/index.js +2 -2
  14. package/bin/api/render.js +1 -1
  15. package/bin/chunks/{chunk-ZIROO2U4.js → chunk-37F7XIMH.js} +4 -3
  16. package/bin/chunks/{chunk-TTAUU3AZ.js → chunk-3OKR5AZJ.js} +1 -1
  17. package/bin/chunks/{chunk-PGFFKPK6.js → chunk-A2XMAPVW.js} +2 -2
  18. package/bin/chunks/{chunk-O55LAQ2C.js → chunk-FGSQE3DU.js} +2 -2
  19. package/bin/chunks/{chunk-VTI32UGJ.js → chunk-H3BS2EBR.js} +2 -2
  20. package/bin/chunks/{chunk-DSS2U2OM.js → chunk-KVMZSQ3D.js} +8 -2
  21. package/bin/chunks/{chunk-4MFPATAB.js → chunk-L44ZTNDM.js} +12 -5
  22. package/bin/chunks/{chunk-7V3OKLKH.js → chunk-LZC37OJZ.js} +4 -4
  23. package/bin/chunks/{chunk-5YSPWKFF.js → chunk-PYCRUMCT.js} +1 -1
  24. package/bin/chunks/{chunk-QRWGFLUU.js → chunk-R2WRQDVE.js} +2 -2
  25. package/bin/chunks/{chunk-YZWEXHT4.js → chunk-SEMH6MCV.js} +129 -21
  26. package/bin/chunks/{chunk-H7Y72HXC.js → chunk-UFTVWTEZ.js} +26 -7
  27. package/bin/chunks/{chunk-P56ZDMX7.js → chunk-WMJVLMU2.js} +16 -4
  28. package/bin/chunks/{chunk-FRABKM65.js → chunk-XY73ZLHB.js} +12 -9
  29. package/bin/chunks/{chunk-ZWFG4GPG.js → chunk-YXJAQYDE.js} +69 -53
  30. package/bin/chunks/{design-context-store-DCZOAK56.js → design-context-store-W3VTZ4HA.js} +5 -5
  31. package/bin/chunks/{packets-QOLWPRNV.js → packets-LBMDIFPO.js} +5 -5
  32. package/bin/chunks/{preparation-T2IOD5SJ.js → preparation-AV4PDQY6.js} +5 -5
  33. package/bin/chunks/{template-gallery-ET76ERZQ.js → template-gallery-H2SVYNRD.js} +1 -1
  34. package/bin/cloudflare/backend.js +144 -62
  35. package/bin/types/src/admin/connection.d.ts +3 -0
  36. package/bin/types/src/cli/admin.d.ts +21 -0
  37. package/bin/types/src/cli/api.d.ts +1 -1
  38. package/bin/types/src/cli/deploy.d.ts +2 -0
  39. package/bin/types/src/cli/doctor.d.ts +1 -0
  40. package/bin/types/src/cli/site-create.d.ts +2 -0
  41. package/bin/types/src/compile/site.d.ts +1 -1
  42. package/bin/types/src/integrations/hosting.d.ts +2 -0
  43. package/bin/vitris-art.js +5 -5
  44. package/bin/vitris-build.js +3 -3
  45. package/bin/vitris-create-site.js +9 -7
  46. package/bin/vitris-cursor-hook.js +5 -5
  47. package/bin/vitris-eval.js +7 -7
  48. package/bin/vitris-go.js +7 -7
  49. package/bin/vitris-harvest.js +6 -6
  50. package/bin/vitris-knowledge.js +6 -6
  51. package/bin/vitris-launch-preflight.js +5 -5
  52. package/bin/vitris-motion-view.js +5 -5
  53. package/bin/vitris-references.js +3 -3
  54. package/bin/vitris-refresh.js +6 -6
  55. package/bin/vitris-stock.js +1 -1
  56. package/bin/vitris-templates.js +1 -1
  57. package/bin/vitris-themes.js +5 -5
  58. package/bin/vitris-upgrade.js +6 -6
  59. package/bin/vitris-verify-browser.js +5 -5
  60. package/bin/vitris-verify-performance.js +3 -3
  61. package/bin/vitris.js +15 -15
  62. package/docs/ADMIN.md +85 -0
  63. package/docs/CLI.md +14 -6
  64. package/docs/CLOUDFLARE.md +27 -2
  65. package/docs/DISTRIBUTION.md +5 -3
  66. package/docs/ENGINE.md +6 -0
  67. package/docs/PRESERVE.md +1 -1
  68. package/docs/SECURITY.md +2 -2
  69. package/package.json +28 -23
  70. package/templates/site/AGENTS.md +4 -2
  71. package/templates/site/README.md +8 -3
  72. package/templates/site/deployment/README.md +24 -0
  73. package/templates/site/{.github/workflows/deploy.yml → deployment/github-actions.yml.example} +5 -6
  74. package/templates/site/gitignore +3 -0
  75. package/templates/site/package.json +3 -1
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2NW7KSPA.js";
4
4
  import {
5
5
  verifyPreservedSite
6
- } from "./chunk-QRWGFLUU.js";
6
+ } from "./chunk-R2WRQDVE.js";
7
7
  import {
8
8
  EXIT_CODES
9
9
  } from "./chunk-JCRGE6AL.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  gradeAll,
15
15
  sourceRevision
16
- } from "./chunk-FRABKM65.js";
16
+ } from "./chunk-XY73ZLHB.js";
17
17
  import {
18
18
  parseReleaseRecord
19
19
  } from "./chunk-M4LNHYYR.js";
@@ -21,7 +21,7 @@ import {
21
21
  buildVerified,
22
22
  findHarnessRoot,
23
23
  isPreserveSite
24
- } from "./chunk-VTI32UGJ.js";
24
+ } from "./chunk-H3BS2EBR.js";
25
25
  import {
26
26
  json,
27
27
  save
@@ -125,6 +125,17 @@ async function prepareVerifiedRelease(siteRoot, environment = "preview") {
125
125
  const root = resolve2(siteRoot);
126
126
  const verified = await verifySite({ site: root, environment });
127
127
  if (!verified.ok) throw new Error(`Release verification failed: ${verified.error || verified.summary}`);
128
+ return stageRelease(root, environment, isPreserveSite(root) ? "preserve-preview-v1" : environment === "production" ? "launch-preflight" : "preview-gates");
129
+ }
130
+ async function prepareQuickRelease(siteRoot, environment = "preview") {
131
+ const root = resolve2(siteRoot);
132
+ if (isPreserveSite(root) && environment !== "preview") throw new Error("Preserve mode supports temporary previews only");
133
+ const revision = sourceRevision(root).digest;
134
+ await buildVerified(root);
135
+ if (sourceRevision(root).digest !== revision) throw new Error("Source changed during quick release build");
136
+ return stageRelease(root, environment, "quick-publish-build-only-v1");
137
+ }
138
+ function stageRelease(root, environment, policyId) {
128
139
  const distDirectory = join2(root, "dist");
129
140
  const evidence = json(join2(distDirectory, "build-evidence.json"));
130
141
  const version = json(join2(findHarnessRoot(), "package.json")).version;
@@ -140,7 +151,7 @@ async function prepareVerifiedRelease(siteRoot, environment = "preview") {
140
151
  compilerDigest: evidence.compilerHash,
141
152
  harnessVersion: version,
142
153
  environment,
143
- policyId: isPreserveSite(root) ? "preserve-preview-v1" : environment === "production" ? "launch-preflight" : "preview-gates",
154
+ policyId,
144
155
  outputDirectory,
145
156
  checkedAt: (/* @__PURE__ */ new Date()).toISOString()
146
157
  };
@@ -173,5 +184,6 @@ async function deployVerifiedArtifact(siteRoot, artifact, adapter) {
173
184
  export {
174
185
  verifySite,
175
186
  prepareVerifiedRelease,
187
+ prepareQuickRelease,
176
188
  deployVerifiedArtifact
177
189
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PICKER_RUNTIME,
3
3
  renderThemePickerShell
4
- } from "./chunk-DSS2U2OM.js";
4
+ } from "./chunk-KVMZSQ3D.js";
5
5
  import {
6
6
  CLAIM_ERROR_SEMANTICS_HASH,
7
7
  CONTINUITY_SEMANTICS_HASH,
@@ -158,10 +158,10 @@ import {
158
158
  import {
159
159
  buildVerified,
160
160
  findHarnessRoot
161
- } from "./chunk-VTI32UGJ.js";
161
+ } from "./chunk-H3BS2EBR.js";
162
162
  import {
163
163
  MOTION_EFFECTS
164
- } from "./chunk-ZIROO2U4.js";
164
+ } from "./chunk-37F7XIMH.js";
165
165
  import {
166
166
  themeCss
167
167
  } from "./chunk-LKN75JGA.js";
@@ -7582,15 +7582,18 @@ function isPathConfined(root, candidatePath) {
7582
7582
  if (!root || !candidatePath) {
7583
7583
  return { safe: false, resolvedPath: "", reason: "Empty root or candidate path" };
7584
7584
  }
7585
+ const lexicalRoot = resolve9(root);
7585
7586
  let canonicalRoot;
7586
7587
  try {
7587
- canonicalRoot = realpathSync2.native ? realpathSync2.native(resolve9(root)) : realpathSync2(resolve9(root));
7588
+ canonicalRoot = realpathSync2.native ? realpathSync2.native(lexicalRoot) : realpathSync2(lexicalRoot);
7588
7589
  } catch {
7589
- canonicalRoot = resolve9(root);
7590
+ canonicalRoot = lexicalRoot;
7590
7591
  }
7591
- const resolvedCandidate = isAbsolute2(candidatePath) ? resolve9(candidatePath) : resolve9(canonicalRoot, candidatePath);
7592
- const rel = relative6(canonicalRoot, resolvedCandidate);
7593
- if (rel.startsWith("..") || isAbsolute2(rel) || rel.split(sep2).includes("..")) {
7592
+ const resolvedCandidate = isAbsolute2(candidatePath) ? resolve9(candidatePath) : resolve9(lexicalRoot, candidatePath);
7593
+ const rel = relative6(lexicalRoot, resolvedCandidate);
7594
+ const canonicalRel = relative6(canonicalRoot, resolvedCandidate);
7595
+ const escapes = (path) => path.startsWith("..") || isAbsolute2(path) || path.split(sep2).includes("..");
7596
+ if (escapes(rel) && escapes(canonicalRel)) {
7594
7597
  return {
7595
7598
  safe: false,
7596
7599
  resolvedPath: resolvedCandidate,
@@ -7601,7 +7604,7 @@ function isPathConfined(root, candidatePath) {
7601
7604
  try {
7602
7605
  const realTarget = realpathSync2.native ? realpathSync2.native(resolvedCandidate) : realpathSync2(resolvedCandidate);
7603
7606
  const relReal = relative6(canonicalRoot, realTarget);
7604
- if (relReal.startsWith("..") || isAbsolute2(relReal) || relReal.split(sep2).includes("..")) {
7607
+ if (escapes(relReal)) {
7605
7608
  return {
7606
7609
  safe: false,
7607
7610
  resolvedPath: realTarget,
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  prepareChange,
3
3
  verifyChange
4
- } from "./chunk-O55LAQ2C.js";
4
+ } from "./chunk-FGSQE3DU.js";
5
5
  import {
6
6
  deployVerifiedArtifact,
7
+ prepareQuickRelease,
7
8
  prepareVerifiedRelease
8
- } from "./chunk-P56ZDMX7.js";
9
+ } from "./chunk-WMJVLMU2.js";
9
10
  import {
10
11
  creativeRunStatus,
11
12
  currentRunId,
@@ -13,10 +14,10 @@ import {
13
14
  runCreativeProfile,
14
15
  startDesignReview,
15
16
  submitFeedback
16
- } from "./chunk-7V3OKLKH.js";
17
+ } from "./chunk-LZC37OJZ.js";
17
18
  import {
18
19
  verifyPreservedSite
19
- } from "./chunk-QRWGFLUU.js";
20
+ } from "./chunk-R2WRQDVE.js";
20
21
  import {
21
22
  EXIT_CODES
22
23
  } from "./chunk-JCRGE6AL.js";
@@ -34,7 +35,7 @@ import {
34
35
  prepareRefine,
35
36
  runWorkflow,
36
37
  verifyRefine
37
- } from "./chunk-FRABKM65.js";
38
+ } from "./chunk-XY73ZLHB.js";
38
39
  import {
39
40
  parseGraphYaml
40
41
  } from "./chunk-BBV7PMFC.js";
@@ -48,7 +49,7 @@ import {
48
49
  buildVerified,
49
50
  findKernelRoot,
50
51
  isPreserveSite
51
- } from "./chunk-VTI32UGJ.js";
52
+ } from "./chunk-H3BS2EBR.js";
52
53
  import {
53
54
  recoverPendingTransactions,
54
55
  save
@@ -56,8 +57,32 @@ import {
56
57
 
57
58
  // src/cli/doctor.ts
58
59
  import { existsSync, readFileSync } from "node:fs";
59
- import { join, resolve } from "node:path";
60
+ import { join as join2, resolve } from "node:path";
60
61
  import { spawnSync } from "node:child_process";
62
+
63
+ // src/integrations/wrangler-command.ts
64
+ import { createRequire } from "node:module";
65
+ import { dirname, join } from "node:path";
66
+ function wranglerCommand(siteRoot, args) {
67
+ const require2 = createRequire(join(siteRoot, "package.json"));
68
+ let entry;
69
+ try {
70
+ entry = join(dirname(require2.resolve("wrangler/package.json")), "bin/wrangler.js");
71
+ } catch {
72
+ entry = join(dirname(createRequire(import.meta.url).resolve("wrangler/package.json")), "bin/wrangler.js");
73
+ }
74
+ return { command: process.execPath, args: [entry, ...args] };
75
+ }
76
+
77
+ // src/cli/doctor.ts
78
+ function hasAuthenticatedWranglerSession(status, stdout) {
79
+ if (status !== 0) return false;
80
+ try {
81
+ return JSON.parse(stdout)?.loggedIn === true;
82
+ } catch {
83
+ return false;
84
+ }
85
+ }
61
86
  async function runDoctor(opts = {}) {
62
87
  const diagnostics = [];
63
88
  const nodeMajor = parseInt(process.versions.node.split(".")[0] || "0", 10);
@@ -100,31 +125,31 @@ async function runDoctor(opts = {}) {
100
125
  diagnostics.push({ name: "site_exists", ok: false, message: `Site directory not found: ${siteRoot}`, severity: "error" });
101
126
  } else {
102
127
  diagnostics.push({ name: "site_exists", ok: true, message: `Site directory exists at ${siteRoot}`, severity: "info" });
103
- const pkgPath = join(siteRoot, "package.json");
128
+ const pkgPath = join2(siteRoot, "package.json");
104
129
  if (existsSync(pkgPath)) {
105
130
  diagnostics.push({ name: "package_json", ok: true, message: "package.json present", severity: "info" });
106
131
  } else {
107
132
  diagnostics.push({ name: "package_json", ok: false, message: "package.json missing from site root", severity: "error" });
108
133
  }
109
- const graphPath = join(siteRoot, "agent/graph.yaml");
134
+ const graphPath = join2(siteRoot, "agent/graph.yaml");
110
135
  if (existsSync(graphPath)) {
111
136
  diagnostics.push({ name: "graph_yaml", ok: true, message: "agent/graph.yaml present", severity: "info" });
112
137
  } else {
113
138
  diagnostics.push({ name: "graph_yaml", ok: false, message: "agent/graph.yaml missing", severity: "error" });
114
139
  }
115
- const statePath = join(siteRoot, "agent/STATE.json");
140
+ const statePath = join2(siteRoot, "agent/STATE.json");
116
141
  if (existsSync(statePath)) {
117
142
  diagnostics.push({ name: "state_json", ok: true, message: "agent/STATE.json present", severity: "info" });
118
143
  } else {
119
144
  diagnostics.push({ name: "state_json", ok: false, message: "agent/STATE.json missing", severity: "warning" });
120
145
  }
121
- const launchPath = join(siteRoot, "launch.json");
146
+ const launchPath = join2(siteRoot, "launch.json");
122
147
  if (existsSync(launchPath)) {
123
148
  diagnostics.push({ name: "launch_json", ok: true, message: "launch.json present", severity: "info" });
124
149
  } else {
125
150
  diagnostics.push({ name: "launch_json", ok: false, message: "launch.json missing", severity: "warning" });
126
151
  }
127
- const lockPath = join(siteRoot, "agent/RUN.lock");
152
+ const lockPath = join2(siteRoot, "agent/RUN.lock");
128
153
  if (existsSync(lockPath)) {
129
154
  try {
130
155
  const lock = JSON.parse(readFileSync(lockPath, "utf8"));
@@ -165,8 +190,14 @@ async function runDoctor(opts = {}) {
165
190
  severity: "info"
166
191
  });
167
192
  } else {
168
- const whoami = spawnSync(process.platform === "win32" ? "npx.cmd" : "npx", ["wrangler", "whoami"], { encoding: "utf8" });
169
- if (whoami.status === 0 && !whoami.stdout.includes("not logged in") && !whoami.stderr.includes("not logged in")) {
193
+ let authenticated = false;
194
+ try {
195
+ const command = wranglerCommand(resolve(opts.site || "."), ["whoami", "--json"]);
196
+ const whoami = spawnSync(command.command, command.args, { encoding: "utf8", timeout: 3e4, windowsHide: true });
197
+ authenticated = hasAuthenticatedWranglerSession(whoami.status, whoami.stdout || "");
198
+ } catch {
199
+ }
200
+ if (authenticated) {
170
201
  diagnostics.push({
171
202
  name: "cloudflare_auth",
172
203
  ok: true,
@@ -203,7 +234,7 @@ async function runDoctor(opts = {}) {
203
234
 
204
235
  // src/cli/refine.ts
205
236
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
206
- import { join as join2, resolve as resolve2 } from "node:path";
237
+ import { join as join3, resolve as resolve2 } from "node:path";
207
238
  var kernelRoot = findKernelRoot();
208
239
  async function refineAmend(opts) {
209
240
  const root = resolve2(opts.site || ".");
@@ -248,7 +279,7 @@ Proposed changes: ${classified.proposedChanges.join("; ")}`,
248
279
  error: "Refinement aborted by signal before execution"
249
280
  };
250
281
  }
251
- const graphPath = join2(root, "agent/graph.yaml");
282
+ const graphPath = join3(root, "agent/graph.yaml");
252
283
  if (!existsSync2(graphPath)) {
253
284
  return {
254
285
  ok: false,
@@ -265,7 +296,7 @@ Proposed changes: ${classified.proposedChanges.join("; ")}`,
265
296
  instruction,
266
297
  scopeFlag: opts.scope
267
298
  });
268
- save(join2(root, "agent/STATE.json"), state);
299
+ save(join3(root, "agent/STATE.json"), state);
269
300
  const result = await runWorkflow({
270
301
  root,
271
302
  kernel: kernelRoot,
@@ -379,9 +410,9 @@ async function refineVerify(opts) {
379
410
  summary: `[dry-run] Would run impact verification on site ${root}`
380
411
  };
381
412
  }
382
- const pending = existsSync2(join2(root, "agent/refine-pending.json")) ? JSON.parse(readFileSync2(join2(root, "agent/refine-pending.json"), "utf8")) : void 0;
413
+ const pending = existsSync2(join3(root, "agent/refine-pending.json")) ? JSON.parse(readFileSync2(join3(root, "agent/refine-pending.json"), "utf8")) : void 0;
383
414
  const requestId = opts.requestId || pending?.requestId;
384
- if (requestId && existsSync2(join2(root, `agent/requests/${requestId}/engine-preparation.json`))) {
415
+ if (requestId && existsSync2(join3(root, `agent/requests/${requestId}/engine-preparation.json`))) {
385
416
  const result2 = await verifyChange(root, requestId);
386
417
  const ok = result2.technical === "pass" && result2.fulfillment === "pass" && result2.design !== "fail";
387
418
  return {
@@ -404,7 +435,7 @@ async function refineVerify(opts) {
404
435
 
405
436
  // src/cli/lifecycle.ts
406
437
  import { existsSync as existsSync3, readFileSync as readFileSync3, unlinkSync } from "node:fs";
407
- import { join as join3, resolve as resolve3 } from "node:path";
438
+ import { join as join4, resolve as resolve3 } from "node:path";
408
439
  import { spawnSync as spawnSync2 } from "node:child_process";
409
440
  var kernelRoot2 = findKernelRoot();
410
441
  function killProcessTree(pid) {
@@ -437,8 +468,8 @@ async function resumeSite(opts = {}) {
437
468
  error: `Site root not found: ${root}`
438
469
  };
439
470
  }
440
- const creative = opts.runId && existsSync3(join3(root, "agent/creative-runs", opts.runId, "manifest.json")) ? creativeRunStatus(root, opts.runId) : !opts.runId && existsSync3(join3(root, "agent/creative-runs/CURRENT.json")) ? creativeRunStatus(root) : void 0;
441
- const runId = opts.runId || (existsSync3(join3(root, "agent/design-runs")) ? currentRunId(root) : void 0);
471
+ const creative = opts.runId && existsSync3(join4(root, "agent/creative-runs", opts.runId, "manifest.json")) ? creativeRunStatus(root, opts.runId) : !opts.runId && existsSync3(join4(root, "agent/creative-runs/CURRENT.json")) ? creativeRunStatus(root) : void 0;
472
+ const runId = opts.runId || (existsSync3(join4(root, "agent/design-runs")) ? currentRunId(root) : void 0);
442
473
  if (opts.dryRun) {
443
474
  return {
444
475
  ok: true,
@@ -451,7 +482,7 @@ async function resumeSite(opts = {}) {
451
482
  const result2 = await runCreativeProfile(root, kernelRoot2, ["--creative-profile", "--creative-run", creative.id, "--resume", ...opts.workflowArgv || []]);
452
483
  return { ok: result2.exitCode === 0, exitCode: result2.exitCode, summary: result2.summary, data: { runId: creative.id } };
453
484
  }
454
- if (runId && existsSync3(join3(root, "agent/design-runs", runId))) {
485
+ if (runId && existsSync3(join4(root, "agent/design-runs", runId))) {
455
486
  const code = await handleDesignRunCommand({
456
487
  root,
457
488
  kernel: kernelRoot2,
@@ -489,7 +520,7 @@ async function cancelSite(opts = {}) {
489
520
  error: `Site root not found: ${root}`
490
521
  };
491
522
  }
492
- const lockPath = join3(root, "agent/RUN.lock");
523
+ const lockPath = join4(root, "agent/RUN.lock");
493
524
  if (!existsSync3(lockPath)) {
494
525
  return {
495
526
  ok: true,
@@ -536,7 +567,7 @@ async function cancelSite(opts = {}) {
536
567
  if (existsSync3(lockPath)) {
537
568
  unlinkSync(lockPath);
538
569
  }
539
- const statePath = join3(root, "agent/STATE.json");
570
+ const statePath = join4(root, "agent/STATE.json");
540
571
  if (existsSync3(statePath)) {
541
572
  try {
542
573
  const state = JSON.parse(readFileSync3(statePath, "utf8"));
@@ -671,7 +702,7 @@ async function synthesizeSite(opts = {}) {
671
702
 
672
703
  // src/cli/preview.ts
673
704
  import { existsSync as existsSync5 } from "node:fs";
674
- import { join as join4, resolve as resolve5 } from "node:path";
705
+ import { join as join5, resolve as resolve5 } from "node:path";
675
706
  async function previewSite(opts = {}) {
676
707
  const root = resolve5(opts.site || ".");
677
708
  if (!existsSync5(root)) {
@@ -681,8 +712,8 @@ async function previewSite(opts = {}) {
681
712
  error: `Site root not found: ${root}`
682
713
  };
683
714
  }
684
- const dist = join4(root, "dist");
685
- if (!existsSync5(join4(dist, "index.html"))) {
715
+ const dist = join5(root, "dist");
716
+ if (!existsSync5(join5(dist, "index.html"))) {
686
717
  try {
687
718
  await buildVerified(root);
688
719
  } catch (err) {
@@ -764,22 +795,6 @@ import { join as join6, resolve as resolve6 } from "node:path";
764
795
 
765
796
  // src/integrations/cloudflare-pages.ts
766
797
  import { spawn } from "node:child_process";
767
-
768
- // src/integrations/wrangler-command.ts
769
- import { createRequire } from "node:module";
770
- import { dirname as dirname4, join as join5 } from "node:path";
771
- function wranglerCommand(siteRoot, args) {
772
- const require2 = createRequire(join5(siteRoot, "package.json"));
773
- let entry;
774
- try {
775
- entry = join5(dirname4(require2.resolve("wrangler/package.json")), "bin/wrangler.js");
776
- } catch {
777
- entry = join5(dirname4(createRequire(import.meta.url).resolve("wrangler/package.json")), "bin/wrangler.js");
778
- }
779
- return { command: process.execPath, args: [entry, ...args] };
780
- }
781
-
782
- // src/integrations/cloudflare-pages.ts
783
798
  async function ensurePreservePreviewProject(project, branch, signal) {
784
799
  const account = process.env.CLOUDFLARE_ACCOUNT_ID, token = process.env.CLOUDFLARE_API_TOKEN;
785
800
  if (!account || !token) throw new Error("Preserve preview provisioning requires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN with Pages Edit access");
@@ -890,6 +905,7 @@ async function deploySite(opts = {}) {
890
905
  const provider = opts.provider || "cloudflare";
891
906
  if (provider !== "cloudflare") return { ok: false, exitCode: EXIT_CODES.CONFIG_OR_CLI_ERROR, error: `Unsupported provider: ${provider}` };
892
907
  const environment = opts.environment || "preview";
908
+ const verification = opts.quick ? "build-only" : "full";
893
909
  if (isPreserveSite(root) && environment !== "preview") return { ok: false, exitCode: EXIT_CODES.CONFIG_OR_CLI_ERROR, error: "Preserve mode supports temporary previews only; customer domains and production publication are not enabled" };
894
910
  const launch = existsSync6(join6(root, "launch.json")) ? JSON.parse(readFileSync5(join6(root, "launch.json"), "utf8")) : {};
895
911
  const project = launch.pagesProject || launch.slug || "vitris-site";
@@ -903,12 +919,12 @@ ${doctor.summary}`
903
919
  if (opts.dryRun) return {
904
920
  ok: true,
905
921
  exitCode: EXIT_CODES.SUCCESS,
906
- summary: `[dry-run] Would verify and deploy ${project} to Cloudflare Pages (${environment})`,
907
- data: { environment, project }
922
+ summary: `[dry-run] Would ${opts.quick ? "build and deploy without review gates" : "verify and deploy"} ${project} to Cloudflare Pages (${environment})`,
923
+ data: { environment, project, verification }
908
924
  };
909
925
  try {
910
- opts.onLog?.("Preparing a verified, staged release bundle...");
911
- const artifact = await prepareVerifiedRelease(root, environment);
926
+ opts.onLog?.(opts.quick ? "Quick publish: building a staged bundle; browser, quality and launch reviews are skipped." : "Preparing a verified, staged release bundle...");
927
+ const artifact = opts.quick ? await prepareQuickRelease(root, environment) : await prepareVerifiedRelease(root, environment);
912
928
  const adapter = cloudflarePagesAdapter({ siteRoot: root, project, previewBranch: opts.branch, signal: opts.signal, onLog: opts.onLog, ensurePreviewProject: isPreserveSite(root) });
913
929
  const { deployment } = await deployVerifiedArtifact(root, artifact, adapter);
914
930
  let smokeCheck;
@@ -920,18 +936,18 @@ ${doctor.summary}`
920
936
  ok: false,
921
937
  exitCode: EXIT_CODES.DEPLOYMENT_FAILED,
922
938
  error: `Deployment smoke check failed: ${smokeCheck.message}`,
923
- data: { url: deployment.url, environment, project, smokeCheck }
939
+ data: { url: deployment.url, environment, project, verification, smokeCheck }
924
940
  };
925
- if (isPreserveSite(root) && deployment.url) {
941
+ if (!opts.quick && isPreserveSite(root) && deployment.url) {
926
942
  opts.onLog?.("Checking the hosted preservation across all captured routes and viewports...");
927
943
  const remote = await verifyPreservedSite(root, { remoteUrl: deployment.url, signal: opts.signal, onLog: opts.onLog });
928
- if (!remote.ok) return { ok: false, exitCode: EXIT_CODES.DEPLOYMENT_FAILED, error: "Hosted preservation checks failed; see agent/reviews/preserve-remote.json", failures: remote.failures, data: { url: deployment.url, environment, project, smokeCheck } };
944
+ if (!remote.ok) return { ok: false, exitCode: EXIT_CODES.DEPLOYMENT_FAILED, error: "Hosted preservation checks failed; see agent/reviews/preserve-remote.json", failures: remote.failures, data: { url: deployment.url, environment, project, verification, smokeCheck } };
929
945
  }
930
946
  return {
931
947
  ok: true,
932
948
  exitCode: EXIT_CODES.SUCCESS,
933
- summary: `Deployed exact verified bundle to ${deployment.url}`,
934
- data: { url: deployment.url, environment, project, smokeCheck }
949
+ summary: `Deployed exact ${opts.quick ? "build-only bundle (review gates skipped)" : "verified bundle"} to ${deployment.url}`,
950
+ data: { url: deployment.url, environment, project, verification, smokeCheck }
935
951
  };
936
952
  } catch (error) {
937
953
  return { ok: false, exitCode: EXIT_CODES.DEPLOYMENT_FAILED, error: error instanceof Error ? error.message : String(error) };
@@ -3,8 +3,8 @@ import {
3
3
  loadPersistedDesignContextPacket,
4
4
  persistDesignContextArtifacts,
5
5
  resolveDesignContextExpansion
6
- } from "./chunk-FRABKM65.js";
7
- import "./chunk-DSS2U2OM.js";
6
+ } from "./chunk-XY73ZLHB.js";
7
+ import "./chunk-KVMZSQ3D.js";
8
8
  import "./chunk-WOORR67N.js";
9
9
  import "./chunk-PRLL7B63.js";
10
10
  import "./chunk-5JTBC6UK.js";
@@ -17,9 +17,9 @@ import "./chunk-AUO5I56E.js";
17
17
  import "./chunk-BIEDSEL2.js";
18
18
  import "./chunk-IKNMBGGD.js";
19
19
  import "./chunk-WEFDVXFX.js";
20
- import "./chunk-VTI32UGJ.js";
21
- import "./chunk-4MFPATAB.js";
22
- import "./chunk-ZIROO2U4.js";
20
+ import "./chunk-H3BS2EBR.js";
21
+ import "./chunk-L44ZTNDM.js";
22
+ import "./chunk-37F7XIMH.js";
23
23
  import "./chunk-LKN75JGA.js";
24
24
  import "./chunk-YYPYYOEV.js";
25
25
  import "./chunk-GZDLXYZV.js";
@@ -10,8 +10,8 @@ import {
10
10
  partitionByObligation,
11
11
  rankEvidenceRelevance,
12
12
  selectDiverseEvidence
13
- } from "./chunk-FRABKM65.js";
14
- import "./chunk-DSS2U2OM.js";
13
+ } from "./chunk-XY73ZLHB.js";
14
+ import "./chunk-KVMZSQ3D.js";
15
15
  import "./chunk-WOORR67N.js";
16
16
  import "./chunk-PRLL7B63.js";
17
17
  import "./chunk-5JTBC6UK.js";
@@ -24,9 +24,9 @@ import "./chunk-AUO5I56E.js";
24
24
  import "./chunk-BIEDSEL2.js";
25
25
  import "./chunk-IKNMBGGD.js";
26
26
  import "./chunk-WEFDVXFX.js";
27
- import "./chunk-VTI32UGJ.js";
28
- import "./chunk-4MFPATAB.js";
29
- import "./chunk-ZIROO2U4.js";
27
+ import "./chunk-H3BS2EBR.js";
28
+ import "./chunk-L44ZTNDM.js";
29
+ import "./chunk-37F7XIMH.js";
30
30
  import "./chunk-LKN75JGA.js";
31
31
  import "./chunk-YYPYYOEV.js";
32
32
  import "./chunk-GZDLXYZV.js";
@@ -30,8 +30,8 @@ import {
30
30
  withMutationLock,
31
31
  withMutationLockAsync,
32
32
  writeCommitJournal
33
- } from "./chunk-FRABKM65.js";
34
- import "./chunk-DSS2U2OM.js";
33
+ } from "./chunk-XY73ZLHB.js";
34
+ import "./chunk-KVMZSQ3D.js";
35
35
  import "./chunk-WOORR67N.js";
36
36
  import "./chunk-PRLL7B63.js";
37
37
  import "./chunk-5JTBC6UK.js";
@@ -44,9 +44,9 @@ import "./chunk-AUO5I56E.js";
44
44
  import "./chunk-BIEDSEL2.js";
45
45
  import "./chunk-IKNMBGGD.js";
46
46
  import "./chunk-WEFDVXFX.js";
47
- import "./chunk-VTI32UGJ.js";
48
- import "./chunk-4MFPATAB.js";
49
- import "./chunk-ZIROO2U4.js";
47
+ import "./chunk-H3BS2EBR.js";
48
+ import "./chunk-L44ZTNDM.js";
49
+ import "./chunk-37F7XIMH.js";
50
50
  import "./chunk-LKN75JGA.js";
51
51
  import "./chunk-YYPYYOEV.js";
52
52
  import "./chunk-GZDLXYZV.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PICKER_RUNTIME,
3
3
  renderThemePickerShell
4
- } from "./chunk-DSS2U2OM.js";
4
+ } from "./chunk-KVMZSQ3D.js";
5
5
 
6
6
  // scripts/template-gallery.ts
7
7
  import { createServer } from "node:http";