@tryvitris/website-harness 0.1.0-beta.8 → 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.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tryvitris/website-harness",
3
- "version": "0.1.0-beta.8",
3
+ "version": "1.0.0",
4
4
  "description": "Vitris agent harness for building and verifying customer websites, with a static compiler, media tools, and optional Cloudflare backend.",
5
5
  "type": "module",
6
6
  "exports": {
7
- "./icons": {
8
- "types": "./bin/types/src/icons/index.d.ts",
9
- "import": "./bin/api/icons.js"
10
- },
7
+ "./icons": {
8
+ "types": "./bin/types/src/icons/index.d.ts",
9
+ "import": "./bin/api/icons.js"
10
+ },
11
11
  ".": {
12
12
  "types": "./bin/types/src/build/index.d.ts",
13
13
  "import": "./bin/api/index.js"
@@ -94,9 +94,9 @@
94
94
  "vitris-templates": "bin/vitris-templates.js",
95
95
  "vitris-motion-view": "bin/vitris-motion-view.js",
96
96
  "vitris-media-serve": "bin/vitris-media-serve.js",
97
- "vitris-cursor-hook": "bin/vitris-cursor-hook.js",
98
- "vitris-icons": "bin/vitris-icons.js",
99
- "vitris-verify-performance": "bin/vitris-verify-performance.js"
97
+ "vitris-cursor-hook": "bin/vitris-cursor-hook.js",
98
+ "vitris-icons": "bin/vitris-icons.js",
99
+ "vitris-verify-performance": "bin/vitris-verify-performance.js"
100
100
  },
101
101
  "files": [
102
102
  "bin/**/*.js",
@@ -106,6 +106,7 @@
106
106
  "design-system/MASTER.md",
107
107
  "design-system/knowledge",
108
108
  "docs/CLI.md",
109
+ "docs/ADMIN.md",
109
110
  "docs/DISTRIBUTION.md",
110
111
  "docs/ENGINE.md",
111
112
  "docs/CLOUDFLARE.md",
@@ -147,7 +148,9 @@
147
148
  "preview:prepare": "node scripts/prepare-worker-preview.mjs",
148
149
  "preview:worker": "wrangler preview --config .wrangler-preview.jsonc --ignore-base-config",
149
150
  "typecheck": "tsc --noEmit",
150
- "test": "node --experimental-strip-types --test --test-concurrency=2 src/icons.test.ts src/template-icon-migration.test.ts src/engine.test.ts src/upgrade.test.ts src/hosting.test.ts src/render.test.ts src/analytics.test.ts src/cookie-compliance.test.ts src/schema.test.ts src/patch.test.ts src/jobs.test.ts src/onboard.test.ts src/github-preview.test.ts src/agent.test.ts src/workflow.test.ts src/design-run.test.ts src/creative-profile.test.ts src/creative-efficiency.test.ts src/refine.test.ts src/critic-calibration.test.ts src/cli.test.ts src/jev.test.ts src/lifecycle.test.ts src/theme-lifecycle-policy.test.ts src/template-adaptation.test.ts src/adaptation-checkpoint.test.ts src/template-motion.test.ts src/template-motion-browser.test.ts src/experience-browser.test.ts src/jev-capabilities.test.ts src/jev-phase8.test.ts src/jev-prepilot.test.ts src/jev-phase0.test.ts src/jev-sept20.test.ts src/trace.test.ts src/cursor-hook.test.ts src/design-intelligence.test.ts src/design-context-integration.test.ts src/package-bin.test.ts src/knowledge-layers.test.ts src/launch-preflight.test.ts src/page-transfer.test.ts src/worker-publish.test.ts src/worker-preview.test.ts src/worker-security.test.ts src/harness-upgrades.test.ts src/stock-media.test.ts src/harness-distribution.test.ts src/storyboard-media.test.ts src/added-media.test.ts src/lead-forms.test.ts src/composition.test.ts src/reference-library.test.ts src/art-direction.test.ts src/scroll-motion.test.ts src/scroll-motion-browser.test.ts src/artistic-motion-browser.test.ts src/page-composition.test.ts src/reference-quality.test.ts src/production-quality.test.ts src/browser-focus.test.ts src/browser-work-queue.test.ts src/quality-subject.test.ts src/preview-cli.test.ts src/theme-selection.test.ts src/site-inputs.test.ts src/fieldwell.test.ts src/still-field.test.ts src/current-craft.test.ts src/copper-chair.test.ts src/clearline.test.ts src/template-cloud.test.ts src/contact-forms.test.ts src/contact-forms-operations.test.ts src/contact-forms-browser.test.ts src/preserve.test.ts src/release-safety.test.ts src/performance-media.test.ts src/lighthouse-browser.test.ts src/browser-timeout.test.ts src/browser-output-contract.test.ts src/template-motion-snapshot.test.ts",
151
+ "test:admin": "node --experimental-strip-types --test src/admin-integration.test.ts",
152
+ "verify:admin": "node --experimental-strip-types scripts/verify-admin.ts",
153
+ "test": "node --experimental-strip-types --test --test-concurrency=2 src/admin-integration.test.ts src/icons.test.ts src/template-icon-migration.test.ts src/engine.test.ts src/upgrade.test.ts src/hosting.test.ts src/render.test.ts src/analytics.test.ts src/cookie-compliance.test.ts src/schema.test.ts src/patch.test.ts src/jobs.test.ts src/onboard.test.ts src/github-preview.test.ts src/agent.test.ts src/workflow.test.ts src/design-run.test.ts src/creative-profile.test.ts src/creative-efficiency.test.ts src/refine.test.ts src/critic-calibration.test.ts src/cli.test.ts src/jev.test.ts src/lifecycle.test.ts src/theme-lifecycle-policy.test.ts src/template-adaptation.test.ts src/adaptation-checkpoint.test.ts src/template-motion.test.ts src/template-motion-browser.test.ts src/experience-browser.test.ts src/jev-capabilities.test.ts src/jev-phase8.test.ts src/jev-prepilot.test.ts src/jev-phase0.test.ts src/jev-sept20.test.ts src/trace.test.ts src/cursor-hook.test.ts src/design-intelligence.test.ts src/design-context-integration.test.ts src/package-bin.test.ts src/knowledge-layers.test.ts src/launch-preflight.test.ts src/page-transfer.test.ts src/worker-publish.test.ts src/worker-preview.test.ts src/worker-security.test.ts src/harness-upgrades.test.ts src/stock-media.test.ts src/harness-distribution.test.ts src/storyboard-media.test.ts src/added-media.test.ts src/lead-forms.test.ts src/composition.test.ts src/reference-library.test.ts src/art-direction.test.ts src/scroll-motion.test.ts src/scroll-motion-browser.test.ts src/artistic-motion-browser.test.ts src/page-composition.test.ts src/reference-quality.test.ts src/production-quality.test.ts src/browser-focus.test.ts src/browser-work-queue.test.ts src/quality-subject.test.ts src/preview-cli.test.ts src/theme-selection.test.ts src/site-inputs.test.ts src/fieldwell.test.ts src/still-field.test.ts src/current-craft.test.ts src/copper-chair.test.ts src/clearline.test.ts src/template-cloud.test.ts src/contact-forms.test.ts src/contact-forms-operations.test.ts src/contact-forms-browser.test.ts src/preserve.test.ts src/release-safety.test.ts src/performance-media.test.ts src/lighthouse-browser.test.ts src/browser-timeout.test.ts src/browser-output-contract.test.ts src/template-motion-snapshot.test.ts",
151
154
  "eval:jev": "node --experimental-strip-types scripts/eval-jev.ts",
152
155
  "benchmark": "node --experimental-strip-types scripts/benchmark.ts",
153
156
  "refresh-agent": "node --experimental-strip-types scripts/refresh-agent.ts",
@@ -169,15 +172,15 @@
169
172
  "templates:gallery": "node --experimental-strip-types scripts/template-gallery.ts",
170
173
  "templates:artifact": "node --experimental-strip-types scripts/template-cloud-artifact.ts",
171
174
  "audit:package": "node scripts/audit-package.mjs",
172
- "prepublishOnly": "node scripts/guard-publish.mjs",
173
- "icons": "node --experimental-strip-types scripts/icons.ts",
174
- "icons:artifact": "node --experimental-strip-types scripts/icons.ts gallery",
175
- "icons:gallery": "node --experimental-strip-types scripts/icons.ts gallery --serve",
176
- "test:icons": "node --experimental-strip-types --test src/icons.test.ts",
177
- "verify:icons": "node --experimental-strip-types scripts/verify-icons.ts",
178
- "icons:review-industry-studio": "node --experimental-strip-types scripts/review-industry-studio.ts",
179
- "templates:icons": "node --experimental-strip-types scripts/migrate-template-icons.ts",
180
- "verify:performance": "node --experimental-strip-types scripts/verify-performance.ts"
175
+ "prepublishOnly": "node scripts/guard-publish.mjs",
176
+ "icons": "node --experimental-strip-types scripts/icons.ts",
177
+ "icons:artifact": "node --experimental-strip-types scripts/icons.ts gallery",
178
+ "icons:gallery": "node --experimental-strip-types scripts/icons.ts gallery --serve",
179
+ "test:icons": "node --experimental-strip-types --test src/icons.test.ts",
180
+ "verify:icons": "node --experimental-strip-types scripts/verify-icons.ts",
181
+ "icons:review-industry-studio": "node --experimental-strip-types scripts/review-industry-studio.ts",
182
+ "templates:icons": "node --experimental-strip-types scripts/migrate-template-icons.ts",
183
+ "verify:performance": "node --experimental-strip-types scripts/verify-performance.ts"
181
184
  },
182
185
  "engines": {
183
186
  "node": ">=24"
@@ -192,13 +195,15 @@
192
195
  },
193
196
  "dependencies": {
194
197
  "@axe-core/playwright": "4.11.0",
198
+ "@tryvitris/website-admin-contracts": "0.1.0-alpha.1",
199
+ "@tryvitris/website-admin-harness": "0.1.0-alpha.1",
195
200
  "@typesafe-ai/sdk": "^0.6.0",
196
201
  "blake3-wasm": "^2.1.5",
202
+ "chrome-launcher": "1.2.1",
203
+ "lighthouse": "13.5.0",
197
204
  "parse5": "8.0.0",
198
- "playwright": "^1.63.0",
199
- "chrome-launcher": "1.2.1",
200
- "lighthouse": "13.5.0",
201
- "sharp": "0.35.5"
205
+ "playwright": "^1.63.0",
206
+ "sharp": "0.35.5"
202
207
  },
203
208
  "overrides": {
204
209
  "miniflare": {
@@ -218,7 +223,7 @@
218
223
  },
219
224
  "publishConfig": {
220
225
  "access": "public",
221
- "tag": "beta",
226
+ "tag": "latest",
222
227
  "registry": "https://registry.npmjs.org/"
223
228
  }
224
229
  }
@@ -1,5 +1,7 @@
1
1
  # __NAME__ site agent
2
2
 
3
+ For a requested separate business admin, read `agent/refs/admin.md` and the installed harness's `docs/ADMIN.md`. Site creation `--admin` prepares next steps only. Use `vitris admin setup --plan` then reviewed `--apply` for a sibling installation; cloud provisioning, authentication and deployment are separate. Preserve existing forms, tenants, credentials and workflow progress; never deploy a shared backend as a setup side effect.
4
+
3
5
  This site uses the Vitris active-agent workflow. The active local agent executes workflow stages directly. The harness prepares context in `agent/CURRENT.md`, executes deterministic tools, evaluates artifacts, and advances the graph.
4
6
 
5
7
  ## Active-Agent Loop
@@ -30,6 +32,6 @@ When making later-life changes in Cursor or chat:
30
32
  - Never mark checks passed by hand. Skip deployment review gates only when the user explicitly requests quick publish, using `vitris deploy --quick` (production requires `--environment production`); record this as build-only verification.
31
33
  - Site-specific preferences belong in `agent/request.json` or site memory.
32
34
  - Plan managed-kit updates with `vitris upgrade --site . --plan`, inspect conflicts, then use `--apply`. `npm run refresh-agent` is a compatibility alias. Package defaults are selected only when their recorded hashes match `agent/managed-files.json`; place site-specific instructions under `agent/overrides/`. Unknown copied-kit edits remain conflicts. `launch.json`, authored files, `agent/STATE.json`, preparations, leases, and receipts are preserved.
33
- - Cloudflare deployment is explicit via `vitris deploy` (or `wrangler deploy`).
35
+ - Local builds and direct Cloudflare Pages uploads are the default. Use `npm run deploy:preview` for a hosted preview and `npm run deploy` only for explicitly requested production publication. Both run local verification and upload the exact staged bundle. Keep `dist/`, release bundles, receipts, and credentials out of Git. Do not enable GitHub Actions or Cloudflare Git builds unless the operator chooses hosted automation; `deployment/github-actions.yml.example` is inactive by default. Existing sites require review of their workflows and Cloudflare branch-deployment settings before migration.
34
36
 
35
37
  Two identical failures block automatic continuation. Fix the cause and use an explicit restart with a reason; ordinary resume does not reset attempts or spend. Follow parent design-stage resume instructions exactly. Active-agent reviews and independent-model reviews are labeled separately; neither implies human approval.
@@ -29,13 +29,15 @@ npm run go # prepare the next stage → preview_ready
29
29
  npm run build # → dist/ local preview
30
30
  ```
31
31
 
32
- Default loop stops at a local preview. Launch (GitHub + Cloudflare Pages + backend tenant) is explicit — see `agent/refs/launch.md` and `launch.json`.
32
+ Default loop stops at a local preview. Launch is explicit — see `agent/refs/launch.md` and `launch.json`. Builds and verification run locally; the deployment command uploads the finished files directly to Cloudflare Pages. GitHub stores source and history. New sites have no active GitHub deployment workflow.
33
33
 
34
- For a production Pages deployment, set `launch.json.publicOrigin` to the final `https://` origin. Use `npm run build && npm run preflight` as the Cloudflare Git build command, with `VITRIS_SITE_ENVIRONMENT=production` and `VITRIS_BACKEND_ORIGIN` set in build environment variables; the output directory is `dist`. The preflight rebuilds and verifies the exact publishable files with Chromium, so the build must have Playwright's browser binary installed. Any failed required check exits nonzero and stops publication. Keep preview branches on `VITRIS_SITE_ENVIRONMENT=preview` and use the generated CI workflow when branch-specific gating is needed. Do not use a bare `npm run build` as a production build command.
34
+ Set `launch.json.pagesProject` to your Pages project and `launch.json.publicOrigin` to the final production `https://` origin. Install Chromium with `npx playwright install chromium`, authenticate using `npx wrangler login`, and run `npm run deploy:preview` to check a hosted preview. After accepting it, explicitly publish with `npm run deploy`. Ordinary deployment runs the full local verification, stages the exact checked files, uploads that bundle, records its identity, and checks the hosted URL. Failed required checks stop publication. Keep `dist/` and staged release output ignored in Git. See `deployment/README.md` for setup.
35
35
 
36
36
  To ignore local Cursor-chat traces in an existing site, add `agent/runs/traces/` to `.gitignore`. See harness `docs/tracing.md`.
37
37
 
38
- If this site publishes through the backend Worker, protected CI needs `VITRIS_TENANT_ID`, `VITRIS_PUBLISH_ATTESTATION_SECRET`, and `VITRIS_BACKEND_ORIGIN`; the Worker needs the matching `PUBLISH_ATTESTATION_SECRET` and its Cloudflare API credentials. The generated workflow signs the exact verified `dist/` bundle and posts it to `/api/publish-attested`. The Worker rejects stale, altered, or mismatched evidence before changing hosted content. A Pages project using Git integration can continue using its normal build path; avoid configuring both paths for the same production release.
38
+ For an existing Git-connected Pages project, disable automatic production and preview branch deployments before adopting local direct uploads. Existing GitHub deployment workflows also need to be disabled. The optional `deployment/github-actions.yml.example` runs only after an owner installs it under `.github/workflows/`; hosted CI is an explicit alternative.
39
+
40
+ If this site publishes through the authenticated backend Worker, retain its signed bundle publication contract. The optional workflow signs the exact verified `dist/` bundle and posts it to `/api/publish-attested`, using protected `VITRIS_TENANT_ID`, `VITRIS_PUBLISH_ATTESTATION_SECRET`, and `VITRIS_BACKEND_ORIGIN`; the Worker needs the matching `PUBLISH_ATTESTATION_SECRET` and its Cloudflare credentials. Review that existing publication path before changing deployment providers. Static direct uploads do not register backend tenants or configure contact forms.
39
41
 
40
42
  For interactive workflow commands on Windows, call the installed bin directly when forwarding flags, for example `node ./node_modules/@tryvitris/website-harness/bin/vitris-go.js --prepare --jev-mode off`. `npm run go -- --prepare` may be parsed differently by some npm/PowerShell versions. A prepared `agent/CURRENT.md` is the active stage; complete it with the recorded preparation ID, then prepare the next stage. Do not edit `agent/STATE.json`.
41
43
 
@@ -0,0 +1,24 @@
1
+ # Deployment
2
+
3
+ Build and verify on your own computer, then upload the finished files directly to Cloudflare Pages. GitHub stores authored source and the lockfile. Keep generated `dist/`, staged bundles, receipts, and credentials out of Git.
4
+
5
+ After setting `launch.json.pagesProject` and the production `launch.json.publicOrigin`, install dependencies and Chromium and authenticate with your own Cloudflare account:
6
+
7
+ ```sh
8
+ npm ci
9
+ npx playwright install chromium
10
+ npx wrangler login
11
+ npm run deploy:preview
12
+ # After accepting the preview and explicitly choosing production publication:
13
+ npm run deploy
14
+ ```
15
+
16
+ The deploy command builds locally, verifies the release, stages the exact checked files, uploads them, and checks the hosted URL. New sites have no active GitHub deployment workflow. Source pushes do not publish the website.
17
+
18
+ For an existing Git-connected Cloudflare Pages project, disable automatic production and preview branch deployments before using local uploads. Keep the existing project and domains. See the installed harness's `docs/CLOUDFLARE.md` for migration and optional backend publishing.
19
+
20
+ Preservation sites use `npm run deploy` for temporary previews only; production remains unsupported.
21
+
22
+ ## Optional hosted automation
23
+
24
+ `github-actions.yml.example` is inactive in this directory. An owner choosing GitHub-hosted deployment can copy it to `.github/workflows/deploy.yml`, review its triggers, and configure protected secrets. Hosted CI is subject to the provider's usage limits. Do not enable a second automatic deployment path for the same site. Backend Worker publication retains the signed bundle and preflight checks in the example.
@@ -1,9 +1,8 @@
1
- name: Deploy
2
- # Prefer connecting the Cloudflare Pages project to this GitHub repo
3
- # (Dashboard → Pages → project → Settings → Builds → Connect to Git).
4
- # Then every branch, including update-* preview branches from the Vitris
5
- # concierge, builds automatically. Keep this workflow only if you are NOT
6
- # using Pages Git integration (Direct Upload fallback).
1
+ name: Deploy (optional GitHub Actions)
2
+ # Local builds and direct uploads are the default: use npm run deploy locally.
3
+ # This example does not run from deployment/. To opt into hosted CI, copy it to
4
+ # .github/workflows/deploy.yml and configure your own protected secrets.
5
+ # Enable only one automatic deployment path for each site.
7
6
  on:
8
7
  push:
9
8
  branches: [main]
@@ -6,6 +6,9 @@ dist/
6
6
  .dev.vars
7
7
  scratch/
8
8
  agent/runs/traces/
9
+ agent/release-bundles/
10
+ agent/release-candidate.json
11
+ agent/releases/
9
12
  .cursor/vitris-trace-hooks.json
10
13
  .cursor/hooks.json.vitris-backup
11
14
  .cursor/hooks.json.malformed
@@ -11,7 +11,8 @@
11
11
  "eval": "node ./node_modules/@tryvitris/website-harness/bin/vitris-eval.js",
12
12
  "go": "node ./node_modules/@tryvitris/website-harness/bin/vitris-go.js",
13
13
  "preflight": "node ./node_modules/@tryvitris/website-harness/bin/vitris-launch-preflight.js --environment production",
14
- "deploy": "npm run build && npm run preflight && wrangler pages deploy dist --project-name=__SLUG__",
14
+ "deploy": "node ./node_modules/@tryvitris/website-harness/bin/vitris.js deploy --site . --environment production",
15
+ "deploy:preview": "node ./node_modules/@tryvitris/website-harness/bin/vitris.js deploy --site . --environment preview",
15
16
  "deploy:quick": "node ./node_modules/@tryvitris/website-harness/bin/vitris.js deploy --site . --environment production --quick",
16
17
  "verify:browser": "node ./node_modules/@tryvitris/website-harness/bin/vitris-verify-browser.js",
17
18
  "verify:performance": "node ./node_modules/@tryvitris/website-harness/bin/vitris-verify-performance.js --site .",