@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.
- package/README.md +49 -117
- package/agent/graph.yaml +12 -6
- package/agent/refs/admin.md +11 -0
- package/agent/refs/analytics.md +17 -0
- package/agent/refs/launch.md +15 -11
- package/agent/refs/performance.md +1 -1
- package/bin/api/agent/evaluate.js +5 -5
- package/bin/api/agent/grade.js +5 -5
- package/bin/api/cli/api.js +15 -13
- package/bin/api/cli.js +15 -15
- package/bin/api/engine.js +6 -6
- package/bin/api/hosting.js +9 -7
- package/bin/api/index.js +2 -2
- package/bin/api/render.js +1 -1
- package/bin/chunks/{chunk-ZIROO2U4.js → chunk-37F7XIMH.js} +4 -3
- package/bin/chunks/{chunk-TTAUU3AZ.js → chunk-3OKR5AZJ.js} +1 -1
- package/bin/chunks/{chunk-PGFFKPK6.js → chunk-A2XMAPVW.js} +2 -2
- package/bin/chunks/{chunk-O55LAQ2C.js → chunk-FGSQE3DU.js} +2 -2
- package/bin/chunks/{chunk-VTI32UGJ.js → chunk-H3BS2EBR.js} +2 -2
- package/bin/chunks/{chunk-DSS2U2OM.js → chunk-KVMZSQ3D.js} +8 -2
- package/bin/chunks/{chunk-4MFPATAB.js → chunk-L44ZTNDM.js} +12 -5
- package/bin/chunks/{chunk-7V3OKLKH.js → chunk-LZC37OJZ.js} +4 -4
- package/bin/chunks/{chunk-5YSPWKFF.js → chunk-PYCRUMCT.js} +1 -1
- package/bin/chunks/{chunk-QRWGFLUU.js → chunk-R2WRQDVE.js} +2 -2
- package/bin/chunks/{chunk-YZWEXHT4.js → chunk-SEMH6MCV.js} +129 -21
- package/bin/chunks/{chunk-H7Y72HXC.js → chunk-UFTVWTEZ.js} +26 -7
- package/bin/chunks/{chunk-P56ZDMX7.js → chunk-WMJVLMU2.js} +16 -4
- package/bin/chunks/{chunk-FRABKM65.js → chunk-XY73ZLHB.js} +12 -9
- package/bin/chunks/{chunk-ZWFG4GPG.js → chunk-YXJAQYDE.js} +69 -53
- package/bin/chunks/{design-context-store-DCZOAK56.js → design-context-store-W3VTZ4HA.js} +5 -5
- package/bin/chunks/{packets-QOLWPRNV.js → packets-LBMDIFPO.js} +5 -5
- package/bin/chunks/{preparation-T2IOD5SJ.js → preparation-AV4PDQY6.js} +5 -5
- package/bin/chunks/{template-gallery-ET76ERZQ.js → template-gallery-H2SVYNRD.js} +1 -1
- package/bin/cloudflare/backend.js +144 -62
- package/bin/types/src/admin/connection.d.ts +3 -0
- package/bin/types/src/cli/admin.d.ts +21 -0
- package/bin/types/src/cli/api.d.ts +1 -1
- package/bin/types/src/cli/deploy.d.ts +2 -0
- package/bin/types/src/cli/doctor.d.ts +1 -0
- package/bin/types/src/cli/site-create.d.ts +2 -0
- package/bin/types/src/compile/site.d.ts +1 -1
- package/bin/types/src/integrations/hosting.d.ts +2 -0
- package/bin/vitris-art.js +5 -5
- package/bin/vitris-build.js +3 -3
- package/bin/vitris-create-site.js +9 -7
- package/bin/vitris-cursor-hook.js +5 -5
- package/bin/vitris-eval.js +7 -7
- package/bin/vitris-go.js +7 -7
- package/bin/vitris-harvest.js +6 -6
- package/bin/vitris-knowledge.js +6 -6
- package/bin/vitris-launch-preflight.js +5 -5
- package/bin/vitris-motion-view.js +5 -5
- package/bin/vitris-references.js +3 -3
- package/bin/vitris-refresh.js +6 -6
- package/bin/vitris-stock.js +1 -1
- package/bin/vitris-templates.js +1 -1
- package/bin/vitris-themes.js +5 -5
- package/bin/vitris-upgrade.js +6 -6
- package/bin/vitris-verify-browser.js +5 -5
- package/bin/vitris-verify-performance.js +3 -3
- package/bin/vitris.js +15 -15
- package/docs/ADMIN.md +85 -0
- package/docs/CLI.md +14 -6
- package/docs/CLOUDFLARE.md +27 -2
- package/docs/DISTRIBUTION.md +5 -3
- package/docs/ENGINE.md +6 -0
- package/docs/PRESERVE.md +1 -1
- package/docs/SECURITY.md +2 -2
- package/package.json +28 -23
- package/templates/site/AGENTS.md +4 -2
- package/templates/site/README.md +8 -3
- package/templates/site/deployment/README.md +24 -0
- package/templates/site/{.github/workflows/deploy.yml → deployment/github-actions.yml.example} +5 -6
- package/templates/site/gitignore +3 -0
- package/templates/site/package.json +3 -1
package/templates/site/AGENTS.md
CHANGED
|
@@ -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
|
|
@@ -27,9 +29,9 @@ When making later-life changes in Cursor or chat:
|
|
|
27
29
|
|
|
28
30
|
## Operator Guardrails
|
|
29
31
|
|
|
30
|
-
- Never mark checks passed by hand
|
|
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
|
|
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.
|
package/templates/site/README.md
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -55,3 +57,6 @@ description: …
|
|
|
55
57
|
```
|
|
56
58
|
|
|
57
59
|
Build flattens `<hero>` into ordinary HTML. Lead forms use `data-lead-form` and POST to the backend (`VITRIS_BACKEND_ORIGIN`).
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
For an explicitly requested quick publish, use `vitris deploy --quick --environment production` (`npm run deploy:quick` in newly scaffolded sites). This rebuilds and deploys without browser, graph or launch review gates. Compilation, Cloudflare credentials, staged-file integrity and an HTTP smoke check still run. Receipts record build-only verification. Preservation sites use `--environment preview` and also skip screenshot comparisons. Ordinary deployment retains full preflight.
|
|
@@ -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.
|
package/templates/site/{.github/workflows/deploy.yml → deployment/github-actions.yml.example}
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
name: Deploy
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
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]
|
package/templates/site/gitignore
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
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": "
|
|
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",
|
|
16
|
+
"deploy:quick": "node ./node_modules/@tryvitris/website-harness/bin/vitris.js deploy --site . --environment production --quick",
|
|
15
17
|
"verify:browser": "node ./node_modules/@tryvitris/website-harness/bin/vitris-verify-browser.js",
|
|
16
18
|
"verify:performance": "node ./node_modules/@tryvitris/website-harness/bin/vitris-verify-performance.js --site .",
|
|
17
19
|
"refresh-agent": "node ./node_modules/@tryvitris/website-harness/bin/vitris-refresh.js --site .",
|