site: agentflare.dev landing page + Cloudflare Workers deploy - #203
Conversation
Self-contained landing page (inline CSS/JS, system-font terminal aesthetic, light+dark) served from Cloudflare Workers static assets, matching the sarvo apps/web pattern. Worker proxies /install.sh and /install.ps1 to the raw installer so the hero command resolves on the domain.
📝 WalkthroughWalkthroughAdds an ChangesLanding site
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant CloudflareWorker
participant ASSETS
participant GitHubRaw
Browser->>CloudflareWorker: Request site path
CloudflareWorker->>ASSETS: Fetch non-installer asset
ASSETS-->>CloudflareWorker: Return site asset or 404 page
CloudflareWorker->>GitHubRaw: Fetch installer script
GitHubRaw-->>CloudflareWorker: Return installer response
CloudflareWorker-->>Browser: Return site or installer response
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@site/README.md`:
- Around line 7-16: Add the text language identifier to the fenced directory
tree block in the README by changing its opening fence from an unlabeled fence
to a text-labeled fence, preserving the tree content and closing fence.
- Around line 38-41: Update the installer copy control in site/public/index.html
so its data-copy value uses the proxied https://agentflare.dev/install.sh URL
instead of the raw GitHub URL, while preserving the displayed command and
existing copy behavior.
In `@site/src/worker.ts`:
- Around line 29-38: Wrap the fetch(source) call in the worker’s upstream
installer flow with try/catch so rejected DNS, TLS, or connection requests also
return the existing documented 502 fallback response. Preserve the current
!upstream.ok handling and reuse the same response content and headers for caught
fetch failures.
- Around line 15-20: Update the RAW constant used by INSTALL_SCRIPTS to
reference an immutable commit SHA or versioned integrity-checked artifact
instead of the mutable master branch. Keep both installer mappings using this
pinned source, and update the revision deliberately whenever installer contents
change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 97263c19-3334-4ac1-a4ff-229a9d1a8637
📒 Files selected for processing (6)
site/README.mdsite/package.jsonsite/public/404.htmlsite/public/index.htmlsite/src/worker.tssite/wrangler.jsonc
Adds Commit Mono (OFL-1.1) under public/fonts/ — weights 400 + 700, @font-face + preload, served same-origin by the Worker so the page still makes no third-party font request. Distinctive terminal-native display face over the prior system-mono stack. License included.
- worker.ts: pin installer to immutable release tag (v1.3.1) instead of mutable master; wrap upstream fetch in try/catch so DNS/TLS failures return the 502 fallback instead of a platform error. - index.html: hero Copy button now copies the agentflare.dev/install.sh proxy URL (matches the displayed command); add og:image/twitter:image meta. - og.png: 1200x630 branded social card (og.svg source + scripts/render-og.mjs). - README: label the tree fence (MD040).
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@site/scripts/render-og.mjs`:
- Around line 3-5: Declare `@resvg/resvg-js` as a pinned devDependency in
site/package.json so the render-og.mjs bare ESM import resolves from a normal
site installation while preserving the documented npx execution path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 759d3be5-de40-46f0-bbcb-384d2e9b14af
⛔ Files ignored due to path filters (2)
site/og.svgis excluded by!**/*.svgsite/public/og.pngis excluded by!**/*.png
📒 Files selected for processing (4)
site/README.mdsite/public/index.htmlsite/scripts/render-og.mjssite/src/worker.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- site/src/worker.ts
- site/README.md
- site/public/index.html
| // Run: cd site && npx --yes --package=@resvg/resvg-js node scripts/render-og.mjs | ||
| import { readFileSync, writeFileSync } from "node:fs"; | ||
| import { Resvg } from "@resvg/resvg-js"; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python - <<'PY'
import json
from pathlib import Path
p = json.loads(Path("site/package.json").read_text())
deps = {**p.get("dependencies", {}), **p.get("devDependencies", {})}
assert "`@resvg/resvg-js`" in deps, "`@resvg/resvg-js` is not declared in site/package.json"
print("dependency declared:", deps["`@resvg/resvg-js`"])
PYRepository: getappz/agentflare
Length of output: 298
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- site/package.json ---'
python3 - <<'PY'
from pathlib import Path
import json
p = json.loads(Path("site/package.json").read_text())
for section in ("dependencies", "devDependencies", "peerDependencies", "optionalDependencies"):
deps = p.get(section, {})
if "`@resvg/resvg-js`" in deps:
print(section, deps["`@resvg/resvg-js`"])
PY
echo '--- outline render-og.mjs ---'
ast-grep outline site/scripts/render-og.mjs --view expanded || true
echo '--- relevant lines ---'
cat -n site/scripts/render-og.mjs | sed -n '1,220p'Repository: getappz/agentflare
Length of output: 1267
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- search `@resvg/resvg-js` declarations ---'
rg -n '"`@resvg/resvg-js`"|`@resvg/resvg-js`' site . || true
echo '--- site/og.svg header ---'
cat -n site/og.svg | sed -n '1,40p'
echo '--- site/package.json top ---'
cat -n site/package.json | sed -n '1,220p'Repository: getappz/agentflare
Length of output: 3910
🌐 Web query:
npm exec --package bare import module resolution NODE_PATH temporary node_modules package availability
💡 Result:
The npm exec command (and its npx alias) manages package resolution and execution by modifying the PATH environment variable of the subshell rather than relying on NODE_PATH [1][2]. When you use the --package option, npm ensures the specified packages are available in the executed process [1][3]. If these packages are not already present in your local project's dependencies, npm downloads them to a temporary location within the npm cache [1]. This temporary directory is then added to the PATH environment variable of the executed command, making the package binaries accessible [1][2]. Locally installed binaries from your project's node_modules are also automatically included in the PATH of the executed process [2][3]. Regarding module resolution and NODE_PATH: 1. Module resolution: npm exec does not inherently use or respect the NODE_PATH environment variable for its own internal package resolution [4]. 2. Execution environment: While you may set environment variables like NODE_OPTIONS to influence the behavior of the Node.js process being executed (e.g., passing flags), the primary mechanism for package availability in npm exec is the manipulation of the PATH [1][2]. 3. NODE_PATH status: Usage of NODE_PATH is widely discouraged in the Node.js ecosystem, as it is largely deprecated, does not support ESM (ECMAScript Modules), and can lead to fragile environment-dependent behavior [4]. In summary, for npm exec, you should rely on --package to make necessary packages available [1]. If you need to configure Node.js runtime behavior, use NODE_OPTIONS instead of trying to manipulate module resolution via NODE_PATH [2].
Citations:
- 1: https://docs.npmjs.com/cli/v10/commands/npm-exec/
- 2: https://github.com/npm/cli/blob/latest/docs/lib/content/commands/npx.md
- 3: https://manpages.ubuntu.com/manpages/jammy/man1/npm-exec.1.html
- 4: [BUG] npx is ignoring NODE_PATH npm/cli#7100
Declare @resvg/resvg-js in site/package.json. The script imports it as a bare ESM package, but it isn’t listed in the site manifest, so the documented npx --package=... node scripts/render-og.mjs path can still fail with ERR_MODULE_NOT_FOUND. A pinned devDependency keeps the generator runnable from a normal install.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@site/scripts/render-og.mjs` around lines 3 - 5, Declare `@resvg/resvg-js` as a
pinned devDependency in site/package.json so the render-og.mjs bare ESM import
resolves from a normal site installation while preserving the documented npx
execution path.
The public landing site for agentflare.dev, live on Cloudflare Workers.
What's here
site/public/index.html— self-contained landing page: inline CSS/JS, SVG favicon, system-font terminal aesthetic, light + dark themes, animated hero terminal streaming the real "34.2M tokens saved" readout, copy-to-clipboard install commands, the honest attributed-benchmark table (mirrors the repo README's "no blended totals" framing).site/src/worker.ts— servespublic/from theASSETSbinding; proxies/install.sh+/install.ps1to the raw installer socurl -fsSL https://agentflare.dev/install.sh | shresolves on the domain.site/wrangler.jsonc— assets binding +agentflare.dev/www.agentflare.devcustom-domain routes. Same pattern as the sarvoapps/webworker.site/public/404.html,site/package.json,site/README.md(deploy docs).No build step — the page is hand-authored and shipped as-is.
Deploy
Already deployed: https://agentflare.dev (Worker
agentflare-web).Notes
v1.3.1, MIT/beta.README.mdmetrics table.Summary by CodeRabbit
/install.sh,/install.ps1) with edge caching and graceful fallback instructions.