Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ test-results/
artifacts/video/
.DS_Store
wrangler.up.jsonc
wrangler.up-*.jsonc
scratch/

.svelte-kit/
33 changes: 25 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
# Agent guide

Up is a security-first static publishing plane on Cloudflare.
Up is an independent anonymous-first publishing experiment on Cloudflare.

## Commands

```sh
bun run build
bun run typecheck
bun run test
bun run dry-run
bun run check
bun run test:e2e
bun cli/up.ts deploy <folder> [name]
```

## Non-negotiables
## Default anonymous mode

- `up deploy` intentionally creates a public `workers.dev` deployment in a Cloudflare Temporary Account.
- Treat `_worker.js` as executable server code and review the `up.json` binding graph before deploying.
- Confirm the folder contains no credentials, private data, or internal-only content.
- Expose only Worker, Static Assets, KV, D1, and Durable Objects until another Temporary Account binding has real smoke evidence.
- Require explicit human approval before an agent passes `--accept-cloudflare-terms`.
- Label the returned URL/API public and the account-wide claim URL sensitive.
- Never commit, screenshot, log, or forward the claim URL or temporary API token.
- Use pinned Wrangler's documented `--temporary` interface; do not reimplement the unpublished provisioning endpoint.
- Keep ordinary CI offline. A live anonymous smoke test is a deliberate remote mutation and must use isolated state.
- Remove inherited Cloudflare credentials and isolate Wrangler state so anonymous mode cannot touch a permanent account.
- Do not promise more than the documented 60-minute unclaimed lifetime.
- Do not position Up as an official or supported Cloudflare product.

## Secondary company mode

The retained `up private` path has a separate trust boundary:

- Never bypass Cloudflare Access locally or in production.
- Never expose uploaded content on `workers.dev`, Preview URLs, or public R2.
- Never expose company-mode uploaded content on `workers.dev`, Preview URLs, or public R2.
- Never execute uploaded code on the control-plane origin.
- Every binding read requires verified identity; every mutation also requires ownership and same-origin checks.
- Every binding read requires verified identity; every mutation also requires authorization and same-origin checks.
- Keep deployment objects immutable and activation atomic.
- Do not deploy placeholder Access configuration.
- Never deploy or modify the AX production Worker, routes, DNS, R2, or Access without explicit user approval.
23 changes: 20 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,26 @@ Use Bun and Node 22 or newer.
```sh
bun install
bun run check
bun run dry-run
bun run test:e2e
```

Keep the product at version `0.0.1`, preserve fail-closed Access behavior, and add runtime tests for authorization or storage changes. Do not add public preview URLs, public R2 access, local authentication bypasses, hidden bearer links, or uploaded-code bindings.
Keep the product at version `0.0.1` and preserve these boundaries.

Open focused pull requests. Explain the threat boundary when changing routes, hostnames, authentication, site serving, caching, or deployment state.
## Anonymous dynamic mode

- Worker code, Static Assets, KV, D1, and Durable Objects are the current public contract.
- Add a live binding claim only after an isolated Temporary Account smoke proves it.
- Do not add unsupported bindings or silently proxy permanent-account resources.
- Keep claim URLs and temporary tokens out of logs, tests, fixtures, screenshots, and git.
- Keep normal CI offline; live smoke tests are deliberate rate-limited mutations.
- Preserve explicit Terms acceptance for non-interactive deployments.
- Preserve credential and filesystem isolation.

## Secondary company mode

- Preserve fail-closed Access behavior.
- Do not add public R2, `workers.dev`, preview URLs, or local authentication bypasses.
- Add runtime tests for authorization and storage changes.
- Never run company production scripts while reviewing anonymous-mode changes.

Open focused pull requests. Explain the authority boundary when changing deployment, bindings, public routes, expiration, claim behavior, or credential handling.
Loading