anhedral 0.8.5 → 0.9.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 +140 -34
- package/assets/anhedral-cli-init-technical.svg +8 -8
- package/assets/anhedral-cli-init.svg +9 -9
- package/assets/security/LICENSES.txt +63 -0
- package/assets/security/audit-deps.mjs +295 -0
- package/assets/security/braces-regression.mjs +102 -0
- package/assets/security/braces@3.0.3.patch +285 -0
- package/assets/security/decode-uri-component@0.2.2.patch +149 -0
- package/assets/security/decoder-regression.mjs +37 -0
- package/assets/security/forge-regression.mjs +46 -0
- package/assets/security/manifest.json +53 -0
- package/assets/security/node-forge@1.4.0.patch +26 -0
- package/dist/access.d.ts +10 -0
- package/dist/access.js +93 -0
- package/dist/auth-schema-snapshot.d.ts +346 -0
- package/dist/auth-schema-snapshot.js +347 -0
- package/dist/auth-schema.d.ts +1 -0
- package/dist/auth-schema.js +57 -0
- package/dist/bin.js +353 -10
- package/dist/bounded-file.d.ts +2 -0
- package/dist/bounded-file.js +30 -0
- package/dist/capabilities.d.ts +19 -33
- package/dist/capabilities.js +73 -71
- package/dist/cloudflare.d.ts +14 -0
- package/dist/cloudflare.js +66 -0
- package/dist/command.js +12 -3
- package/dist/delivery.d.ts +118 -0
- package/dist/delivery.js +611 -0
- package/dist/dependencies.d.ts +22 -0
- package/dist/dependencies.js +109 -67
- package/dist/dependency-order.d.ts +2 -0
- package/dist/dependency-order.js +24 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.js +12 -1
- package/dist/managed-hosting.d.ts +49 -0
- package/dist/managed-hosting.js +373 -0
- package/dist/management.d.ts +3 -0
- package/dist/management.js +47 -0
- package/dist/platforms/desktop.d.ts +2 -2
- package/dist/platforms/desktop.js +22 -12
- package/dist/platforms/extension.d.ts +2 -2
- package/dist/platforms/extension.js +12 -4
- package/dist/platforms/mobile.d.ts +2 -2
- package/dist/platforms/mobile.js +13 -7
- package/dist/pnpm-policy.d.ts +4 -0
- package/dist/pnpm-policy.js +66 -0
- package/dist/project-state.d.ts +28 -0
- package/dist/project-state.js +226 -0
- package/dist/provider-readiness.d.ts +30 -0
- package/dist/provider-readiness.js +87 -0
- package/dist/provision.d.ts +46 -0
- package/dist/provision.js +197 -0
- package/dist/readiness.d.ts +4 -1
- package/dist/readiness.js +80 -8
- package/dist/registry/add.d.ts +22 -0
- package/dist/registry/add.js +198 -0
- package/dist/registry/bootstrap.d.ts +2 -0
- package/dist/registry/bootstrap.js +14 -0
- package/dist/registry/commands.d.ts +2 -0
- package/dist/registry/commands.js +99 -0
- package/dist/registry/context.d.ts +3 -0
- package/dist/registry/context.js +21 -0
- package/dist/registry/options.d.ts +2 -0
- package/dist/registry/options.js +65 -0
- package/dist/registry/receipt.d.ts +3 -0
- package/dist/registry/receipt.js +73 -0
- package/dist/registry/remote.d.ts +25 -0
- package/dist/registry/remote.js +168 -0
- package/dist/registry/resolve.d.ts +10 -0
- package/dist/registry/resolve.js +98 -0
- package/dist/registry/types.d.ts +64 -0
- package/dist/registry/usage.d.ts +1 -0
- package/dist/registry/usage.js +38 -0
- package/dist/render.js +3 -3
- package/dist/repository.d.ts +24 -0
- package/dist/repository.js +96 -0
- package/dist/scaffold/api.d.ts +2 -0
- package/dist/scaffold/api.js +13 -0
- package/dist/scaffold/auth.d.ts +3 -0
- package/dist/scaffold/auth.js +95 -0
- package/dist/scaffold/bootstrap.d.ts +2 -0
- package/dist/scaffold/bootstrap.js +34 -0
- package/dist/scaffold/compose.d.ts +4 -0
- package/dist/scaffold/compose.js +34 -0
- package/dist/scaffold/database.d.ts +2 -0
- package/dist/scaffold/database.js +43 -0
- package/dist/scaffold/documentation.d.ts +3 -0
- package/dist/scaffold/documentation.js +91 -0
- package/dist/scaffold/environment.d.ts +2 -0
- package/dist/scaffold/environment.js +5 -0
- package/dist/scaffold/files.d.ts +25 -0
- package/dist/scaffold/files.js +108 -0
- package/dist/scaffold/integrations.d.ts +3 -0
- package/dist/scaffold/integrations.js +7 -0
- package/dist/scaffold/services.d.ts +5 -0
- package/dist/scaffold/services.js +84 -0
- package/dist/scaffold/web.d.ts +2 -0
- package/dist/scaffold/web.js +102 -0
- package/dist/scaffold/workspace.d.ts +3 -0
- package/dist/scaffold/workspace.js +150 -0
- package/dist/security-backports.d.ts +3 -0
- package/dist/security-backports.js +26 -0
- package/dist/stack-registry.d.ts +80 -0
- package/dist/stack-registry.js +424 -0
- package/dist/standard.d.ts +6 -17
- package/dist/standard.js +41 -585
- package/dist/transaction.js +46 -26
- package/dist/util.js +12 -2
- package/dist/vercel.d.ts +98 -0
- package/dist/vercel.js +796 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/vinext.d.ts +1 -0
- package/dist/vinext.js +83 -0
- package/dist/workspace-graph.d.ts +7 -0
- package/dist/workspace-graph.js +73 -0
- package/docs/application-stack-standard.md +75 -674
- package/docs/delivery-workflow.md +83 -0
- package/docs/managed-hosting-architecture.md +87 -0
- package/docs/sponsorships.md +25 -0
- package/package.json +23 -28
- package/dist/project.d.ts +0 -4
- package/dist/standard-products.d.ts +0 -2
- package/dist/standard-products.js +0 -6
- /package/assets/{images/svg/logo-white-subtract.svg → anhedral-mark.svg} +0 -0
- /package/dist/{project.js → registry/types.js} +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Build and deliver an application
|
|
2
|
+
|
|
3
|
+
Codex implements the product; the CLI supplies scaffolding, selected resource reconciliation and source/provider evidence. Customer-account delivery exists. Managed hosting has a local client foundation, not an operated service. Start with users, flows, audience, budget and observable acceptance criteria; preserve suitable existing apps.
|
|
4
|
+
|
|
5
|
+
## Plan and implement
|
|
6
|
+
|
|
7
|
+
1. Choose only needed components from the [stack standard](application-stack-standard.md). Record decisions, ownership, environment/cost assumptions and actual connections in the application's `docs/architecture.md`.
|
|
8
|
+
2. Match installed plugin, registry `cliVersion` and executable versions. Check Node/pnpm, Git identity, toolchains and customer provider access. For unpublished development use `pnpm build` and `node dist/bin.js`; never silently substitute `@latest`.
|
|
9
|
+
3. Inspect `new <unused-directory> <flags> --dry-run --json`, then generate with those choices. Review README, AGENTS, setup manifests and resolved lockfile. For initialized apps, preview `add <directory> <items...> --dry-run --json`; additions protect edited source and record registry provenance. Use `--registry <file|https-url>` for reviewed declarative registries. Older projects and runtime relocation require explicit migration. `doctor --providers --json` checks access without configuring infrastructure or certifying production.
|
|
10
|
+
4. Implement screens, APIs, persistence, authorization and integration behavior. Replace placeholders with working flows. Configure real secrets, origins and reviewed migrations using provider tools; starters do not establish setup completion. Keep credentials out of source, logs and handoffs.
|
|
11
|
+
|
|
12
|
+
## Source and release authority
|
|
13
|
+
|
|
14
|
+
Use customer-owned accounts and a reviewed clean commit. Default to a private repository in the selected account; organizations require selection.
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
anhedral repository my-app --create --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This verifies the app's Git root, owner, visibility, write access and exact remote commit. Reuse matching origins without `--create`; do not replace remotes, change visibility or force-push. Connected repository identity is retained and rechecked.
|
|
21
|
+
|
|
22
|
+
Choose one release path per change: checked `ship`, or checks followed by an authorized Git push, active production confirmation and `adopt`. Git integration can deploy independently of CLI checks; configure required CI/branch/deployment policy explicitly. Do not routinely deploy the same commit twice.
|
|
23
|
+
|
|
24
|
+
## Cloudflare delivery
|
|
25
|
+
|
|
26
|
+
Vinext/Workers is the default web recipe. Explicit Next.js on Workers uses `--next --hosting=cloudflare`. Select persistence, identity and AI from the standard. Cloudflare manifests use `anhedral.project.json`; mixed apps append `--provider cloudflare` to lifecycle operations.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
anhedral connect my-app --audience private --allow-email owner@example.com
|
|
30
|
+
anhedral provision my-app --dry-run --json
|
|
31
|
+
anhedral provision my-app --json
|
|
32
|
+
anhedral ship my-app --dry-run --json
|
|
33
|
+
anhedral ship my-app --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Connect verifies the sole accessible or explicitly selected `--account` and preserves audience/account choices. Public access requires authorization. Private hosting needs Zero Trust and scoped Access/Workers permissions; verify routes, domains and previews before and after deployment. Whole-Worker Access does not cover WebSockets: design and verify private realtime separately.
|
|
37
|
+
|
|
38
|
+
Provision reconciles D1, private R2, KV and Queues/dead-letter queues; it does not implement schemas or integrations. Configure reviewed migrations, direct Neon (or selected Hyperdrive), Basin and external providers separately. The Neon starter uses direct serverless HTTP with a server-side DATABASE_URL. Reconcile partial operations before retrying. Shipping requires clean source, checks account/bindings, runs application checks and confirms active versions/traffic. Multiple Workers are not an atomic release; web deploys last by default.
|
|
39
|
+
|
|
40
|
+
## Native Next.js/Vercel delivery
|
|
41
|
+
|
|
42
|
+
Select `--next`, authenticate the intended customer account and choose an eligible plan. Hobby is personal/non-commercial; commercial use requires an eligible existing plan.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
anhedral connect my-app --scope customer-team --audience private --use personal --create --git
|
|
46
|
+
pnpm --dir my-app run check
|
|
47
|
+
anhedral repository my-app --json
|
|
48
|
+
# Wait for the connected production Git deployment.
|
|
49
|
+
anhedral adopt my-app --json
|
|
50
|
+
anhedral verify my-app --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Connect checks project/framework/root, repository link and audience. New private projects establish independently verified all-deployment Vercel Authentication before code or Git deployment. Hosting membership is separate from product identity; do not add members, seats or paid upgrades automatically. Existing protection changes need authorization. Mixed apps provision/ship Cloudflare services first, then verify the web-to-service flow.
|
|
54
|
+
|
|
55
|
+
## Acceptance and operating limits
|
|
56
|
+
|
|
57
|
+
Run relevant lint/types/Fallow, dependency audits, meaningful tests and actual runtime builds. Exercise browser flows, installed extension permissions, packaged desktop behavior and signed/native device flows where selected. Deployment or HTTP 200 alone does not establish product completion.
|
|
58
|
+
|
|
59
|
+
Verify anonymous rejection at primary/deployment URLs, permitted-user login, denied-user and cross-tenant behavior. Verify selected private files, realtime reconnect/replay, duplicate jobs/webhooks, bounded AI, purchase/restore/refund, email/push and offline conflicts. Provider-authenticated requests do not prove visitor login or app authorization. Protected automation may use Vercel curl or authorized origin-scoped Trusted Sources; never weaken protection for testing.
|
|
60
|
+
|
|
61
|
+
Record service quotas, maximum retries/concurrency/AI work, alert ownership and shutdown controls within the authorized budget. Test spikes, duplicate execution, partial deployment and backup restoration. Review migrations and compatibility before rollback; code rollback does not restore data.
|
|
62
|
+
|
|
63
|
+
## Operations and handoff
|
|
64
|
+
|
|
65
|
+
| Command | Boundary |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `register` | Stable app identity; generated apps register automatically. |
|
|
68
|
+
| `status --refresh` | Independently refresh provider state. |
|
|
69
|
+
| `manage` / `manage --local` | Provider overview / explicitly historical local view. |
|
|
70
|
+
| `adopt` | Verify active Vercel Git source/repository and record its checked release; no push/deploy. |
|
|
71
|
+
| `recover` | Reconcile current provider state after cloning; no invented historical tests/releases. |
|
|
72
|
+
| `verify` | Run meaningful root `test:live` with actual URL/release and source/provider checks. |
|
|
73
|
+
| `rollback --release <id> --data-compatible` | Restore recorded code after compatibility review; no migration reversal/data restore. |
|
|
74
|
+
|
|
75
|
+
Open the actual app URL or installable artifact and exercise acceptance. Maintain the application's existing `docs/verification.md`: exact versions, source/release, repository, provider identity, audience, configured versus tested integrations, reproducible results and remaining actions. Refresh after changes; acceptance becomes stale when production changes. After rollback, restore matching clean source before verifying.
|
|
76
|
+
|
|
77
|
+
Committed manifests preserve identity. Ignored `.anhedral/` receipts are local history; back them up when needed. Before removing an interrupted shared lock, confirm no active process and inspect provider state. Maintain alerts, dependencies, costs and tested recovery. Recurring monitoring requires an authorized schedule. Release artifacts need exact contents, secret checks and integrity verification; never replace published version bytes.
|
|
78
|
+
|
|
79
|
+
## Evidence and maintenance
|
|
80
|
+
|
|
81
|
+
Local/mocked coverage is distinct from live GitHub/Vercel private setup, fresh-clone recovery, installed fresh-chat workflow and connected integrations. Retained HTTP/CRUD/redeploy/rollback runs prove only their tested profile. Sites' inventory, visitor connectors and managed sharing require separate platform implementation. No operated managed backend or issued app URL is established here; see the [managed contract](https://github.com/anhedral/anhedral-init/blob/main/docs/managed-hosting-architecture.md).
|
|
82
|
+
|
|
83
|
+
Before release, check the exact candidate's runtime, current dependency advisories, remote CI, installed-plugin and selected provider/native acceptance. Unresolved high-severity production audit failures block shipping. Keep dated results with release/test artifacts. Update this guide when commands, lifecycle or acceptance requirements change, and regenerate its bundled plugin copy.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Anhedral Cloud: setup and deployment contract
|
|
2
|
+
|
|
3
|
+
The CLI has `cloud register|stage|save|deploy|status` and a locally tested API client. There is no operated hosting backend, platform login, issued app hostname or managed provisioning service. Everything marked **planned** below is a design requirement, not an available command. Customer-account delivery remains independent; never silently substitute it for requested managed hosting.
|
|
4
|
+
|
|
5
|
+
## Product boundaries
|
|
6
|
+
|
|
7
|
+
Anhedral is the B2B managed software services business. Anhedral Cloud is its hosting/operations service and client workspace. Anhedral Init (`anhedral` on npm) is the open-source application foundation and CLI; customer-account deployments must work without an Anhedral subscription. Managed delivery is an optional provider adapter, not a dependency hidden in generated application code.
|
|
8
|
+
|
|
9
|
+
Keep `anhedral-landing` as the public website and existing portal frontend initially; retain working Next.js/Vercel hosting while the Hono/Workers control plane is built. Both portal and CLI should consume that same API. One durable model should connect organizations, memberships/roles, engagements, applications, environments, resources, releases and usage. A services project can contain multiple applications; product users are distinct from portal members. The current portal's email-primary membership permits one team per person; expand membership deliberately before multi-organization operator/client access. Private file links need storage-side authorization, not just a private portal page.
|
|
10
|
+
|
|
11
|
+
Use the portal for client progress, approvals, application access, operating status, invoices and exports; expose technical controls according to role. Keep hosted customer code on a separate origin/domain from staff/client sessions. Sell engineering and managed operations with explicit responsibilities and bounded infrastructure usage. Source/data export, recovery and the customer-account deployment path should remain usable when managed hosting ends.
|
|
12
|
+
|
|
13
|
+
Sequence: align released CLI/docs; connect portal organizations to the control-plane registry; ship one independently recoverable private application; prove updates, isolation, backups and cost controls; then add operational/billing UI and selected distribution features. Begin as a managed service for invited clients; expand self-service only after those paths are repeatable.
|
|
14
|
+
|
|
15
|
+
## Accounts and paid activation
|
|
16
|
+
|
|
17
|
+
Managed users should need Anhedral sign-in only for ordinary hosted apps. Anhedral operates the infrastructure and bills its customers; customer-account hosting keeps providers and bills in the customer's account. Product login remains separate from platform/hosting access.
|
|
18
|
+
|
|
19
|
+
| Owner | Account/service | When and gate |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| Anhedral | [Cloudflare Workers for Platforms](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/reference/pricing/), DNS zone and scoped deployment credentials | Required managed runtime. Published baseline is $25/month plus overages; purchase currently uses the dashboard. Verify account, subscription and permissions before provisioning. |
|
|
22
|
+
| Anhedral | [Neon serverless driver](https://neon.com/docs/serverless/serverless-driver); optional [Hyperdrive](https://developers.cloudflare.com/hyperdrive/platform/pricing/) | Default direct HTTP Postgres; provision isolated app credentials/data boundaries. Add Hyperdrive only for measured needs, using the non-pooled Neon endpoint. D1 is the SQLite option. Free quotas are not production capacity guarantees. Hyperdrive is included in Workers plans; Neon has separate billing. |
|
|
23
|
+
| Anhedral | [R2](https://developers.cloudflare.com/r2/pricing/), selected Cloudflare services | Source/build archives and app files; compute/storage/operations/AI/media have separate meters. Enable only selected services. |
|
|
24
|
+
| Anhedral | Better Auth, verified sender and optional OAuth provider registrations | Platform identity, recovery and login mail. No customer Clerk account required; selected app identity providers can differ. |
|
|
25
|
+
| Anhedral | Stripe merchant account | Anhedral subscriptions and usage billing. Customer app payments require the app owner's merchant account or deliberate Stripe Connect onboarding; never mix ledgers. |
|
|
26
|
+
| App owner, when selected | RevenueCat, Apple/Google store products; external AI, mail or other providers | Own commercial identity and app integrations. Verification, terms, billing and OAuth consent may require a human; the CLI reports the exact remaining step. |
|
|
27
|
+
| App owner, when distributed | [Apple](https://developer.apple.com/help/account/basics/about-your-developer-account), [Play](https://support.google.com/googleplay/android-developer/answer/6112435), [Chrome](https://developer.chrome.com/docs/webstore/register) publisher accounts | Paid enrollment/registration and identity checks. Native signing/builds and review remain platform-specific; cloud backend deployment does not publish clients. |
|
|
28
|
+
| Optional | GitHub; custom domain/registrar | GitHub export/connection, not a prerequisite for managed source recovery. Platform subdomains use Anhedral DNS; [customer domains](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/plans/) require ownership validation and hostname limits. |
|
|
29
|
+
|
|
30
|
+
Prices/eligibility must be rechecked at activation. Current numeric baseline is a dated October 8, 2026 check, not an app quote. Paid activation requires authorized spending; an agent can prepare setup and resume after enrollment without recreating resources.
|
|
31
|
+
|
|
32
|
+
## Platform architecture
|
|
33
|
+
|
|
34
|
+
Use separate control-plane and dispatch Workers. Better Auth identifies platform users; Neon holds owners, apps, permissions, resource identities, versions, deployments and billing ledgers. R2 stores immutable source/build archives. Queues/Workflows execute resumable build/provision/deploy jobs. The dispatch Worker maps an authorized hostname to an isolated user Worker; it must not trust a caller-selected worker name.
|
|
35
|
+
|
|
36
|
+
[Workers for Platforms bindings](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/configuration/bindings/) support app resources including D1/R2/KV, Durable Objects, Queues, Workflows and Hyperdrive. Attach only that app's resources; use separate credentials and migration/runtime roles for Postgres. Never give user code platform deployment, billing or shared-admin credentials. Build untrusted code in an isolated runner; export only reviewed executable artifacts. Resolve resources on the server from a declared capability manifest, not arbitrary account IDs from uploaded code.
|
|
37
|
+
|
|
38
|
+
Private previews and production enforce platform audience at dispatch, including assets, APIs and WebSocket upgrades. In-app authorization is still the application's responsibility. Test the chosen framework in the actual dispatch runtime: [platform limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/reference/limits/) include disabled `caches.default` and restricted `request.cf` in untrusted namespaces. Do not enable trusted mode for customer code to bypass compatibility failures. User Workers currently lack gradual deployments; use immutable versioned Worker names plus an authorized routing switch for previews/rollback, and verify WebSocket/stateful-version compatibility.
|
|
39
|
+
|
|
40
|
+
## Agent workflow
|
|
41
|
+
|
|
42
|
+
**Planned interface:** `cloud login` → `cloud plan --json` → implement/check/commit → `cloud ship --json --wait` → `cloud verify`. Login should use a browser/device authorization flow and OS-protected renewable credentials. CI uses revocable project-scoped credentials. JSON output should distinguish setup required, payment required, queued, failed, deployed and verified, with resumable operation IDs and non-secret next actions.
|
|
43
|
+
|
|
44
|
+
`plan` must identify owner/environment, declared resources, provider access, compatibility, estimated cost and authorized limits without mutations. `ship` should check source/build provenance, resolve resources, stage/save, apply reviewed compatible migrations, deploy, poll to completion and return the independently confirmed URL. Neither command exists yet. `new --hosting anhedral` is also not supported; generation currently selects Cloudflare or Vercel.
|
|
45
|
+
|
|
46
|
+
The current low-level sequence is executable only with an operated compatible backend and configured `ANHEDRAL_HOSTING_ORIGIN` / `ANHEDRAL_HOSTING_TOKEN`:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
anhedral cloud register my-app --audience private --json
|
|
50
|
+
# Review source/secrets and commit the managed manifest in the app's own Git repo.
|
|
51
|
+
git -C my-app add <reviewed-paths>
|
|
52
|
+
git -C my-app commit -m "Prepare application version"
|
|
53
|
+
pnpm --dir my-app run check
|
|
54
|
+
# Build a complete self-contained Worker bundle/assets into an ignored app directory.
|
|
55
|
+
anhedral cloud stage my-app --artifact /absolute/path/my-app/build --json
|
|
56
|
+
anhedral cloud save my-app --version <returned-stage-id> --json
|
|
57
|
+
anhedral cloud deploy my-app --version <returned-stage-id> --json
|
|
58
|
+
anhedral cloud status my-app --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Current `deploy` requests deployment and checks once; it may return queued/building. It does not wait for completion, run product acceptance or implement managed rollback/export. `save` writes connected identity into the tracked manifest; review/commit that change before staging a subsequent version. A staged artifact is not proven to originate from its source merely because both were archived: the planned build receipt must bind source commit, lockfile, toolchain and artifact digest.
|
|
62
|
+
|
|
63
|
+
## Source and API contract
|
|
64
|
+
|
|
65
|
+
Local Git remains the working source of truth. Save the exact clean commit plus complete build tree; retain immutable version IDs, SHA-256 hashes and byte lengths. Current staging permits regular files only, at most 64 MiB per archive and 10,000 build files; it rejects symlinks/submodules and credential files. Restore/clone/export must preserve history and allow exit; optional [Artifacts](https://developers.cloudflare.com/artifacts/platform/pricing/) can add Git-compatible managed history but is Paid-plan-only and has separately published metering.
|
|
66
|
+
|
|
67
|
+
Current API routes are under `/v1`. Authenticate every route, derive ownership from the session, preserve audience and validate project/version identity. Pin service origin and owner after connection; forbid redirects and credential-bearing origins.
|
|
68
|
+
|
|
69
|
+
| Route | Contract |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `GET /session` | Authenticated owner identity. |
|
|
72
|
+
| `POST /projects`, `GET /projects/:id` | Idempotent registration/current owned project state. |
|
|
73
|
+
| `POST /projects/:id/versions` | Immutable commit, hashes/lengths and version identity. |
|
|
74
|
+
| `PUT /projects/:id/versions/:version/source` or `/artifact` | Independently verify uploaded hashes/lengths. |
|
|
75
|
+
| `GET /projects/:id/versions/:version` | Saved only when both verified archives exist. |
|
|
76
|
+
| `POST /projects/:id/deployments` | Idempotent deployment of exact saved version/audience. |
|
|
77
|
+
| `GET /projects/:id/deployments/:deployment` | Independently confirmed state/source/artifact; HTTPS URL only when deployed. |
|
|
78
|
+
|
|
79
|
+
Validate archives again server-side before extraction, including traversal, links, duplicate paths and decompression/size limits. Preserve incomplete upload/job evidence for safe retries. Saving source, deploying code and passing product tests remain separate states.
|
|
80
|
+
|
|
81
|
+
## Limits and completion gates
|
|
82
|
+
|
|
83
|
+
Enforce [dispatch CPU/subrequest limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/configuration/custom-limits/) plus application-owned request, storage, SQL, job, AI/media and outbound budgets. Provider alerts are not hard spend caps. Reserve costly work transactionally before execution; reconcile completion/failure idempotently. Rate-limit platform API jobs with bounded retry/backoff for provider throttling. Limit previews/builds, concurrent jobs and retention; define grace/suspension/export policies. Do not delete customer data merely because billing fails. Optional paid/beta/enterprise services need explicit eligibility checks and adapters; free analytics does not make the rest free.
|
|
84
|
+
|
|
85
|
+
Build in this order: platform identity and account/subscription preflight; durable registry/archive API; isolated build/resource provisioning; dispatch/private routes; resumable deployment polling; logs/secrets/recovery/export; billing/quotas; signed client distribution where requested. First acceptance fixture: two owners, independent private apps, persistence, file upload, one bounded job and repeated update. Prove cross-tenant rejection, anonymous denial, interrupted-save/deploy retry, source restoration, quota rejection and code rollback/data compatibility before onboarding.
|
|
86
|
+
|
|
87
|
+
Maintain this single contract as capabilities ship: replace planned claims with verified command/API behavior and update account/limit links. Keep dated test evidence in existing release/test artifacts, not new analysis documents. Deployment and publication remain unproven until the operated service and installed agent workflow pass acceptance.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Support Anhedral Init
|
|
2
|
+
|
|
3
|
+
## Help more people build applications they own
|
|
4
|
+
|
|
5
|
+
Anhedral Init is free and open source. We build tools that help developers turn an idea into an application with source code, infrastructure, and data in their own accounts.
|
|
6
|
+
|
|
7
|
+
If Anhedral Init helps you build, saves you time, or makes your work easier, consider supporting its continued development. Your support helps us improve the tools, maintain integrations, fix bugs, and write clearer documentation.
|
|
8
|
+
|
|
9
|
+
## GitHub Sponsors — coming soon
|
|
10
|
+
|
|
11
|
+
Support can be a thank-you for something useful today or an ongoing contribution to the project's future. Every contribution helps us spend more time improving Anhedral Init for the people who use it.
|
|
12
|
+
|
|
13
|
+
We plan to offer donations and ongoing sponsorships through GitHub Sponsors. Our sponsorship profile is not available yet; we'll add the link here when it launches.
|
|
14
|
+
|
|
15
|
+
In the meantime, [contact us at business@anhedral.com](mailto:business@anhedral.com?subject=Support%20Anhedral%20Init) if you'd like to support the project.
|
|
16
|
+
|
|
17
|
+
## Company sponsorships
|
|
18
|
+
|
|
19
|
+
Does your company use Anhedral Init or want to support its development? We'd love to hear from you. Get in touch to discuss a sponsorship and how we can recognize your support.
|
|
20
|
+
|
|
21
|
+
**[Become a sponsor](mailto:business@anhedral.com?subject=Anhedral%20Init%20sponsorship)**
|
|
22
|
+
|
|
23
|
+
Thank you for helping us keep Anhedral Init free, open source, and improving.
|
|
24
|
+
|
|
25
|
+
[Back to Anhedral Init](../README.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anhedral",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Build and deliver applications with Cloudflare-first Vinext, selected services, optional Next.js on Vercel, and verified release evidence.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -18,12 +18,16 @@
|
|
|
18
18
|
"dist",
|
|
19
19
|
"assets/anhedral-cli-init.svg",
|
|
20
20
|
"assets/anhedral-cli-init-technical.svg",
|
|
21
|
-
"assets/
|
|
21
|
+
"assets/anhedral-mark.svg",
|
|
22
22
|
"LICENSE",
|
|
23
23
|
"README.md",
|
|
24
24
|
"assets/anhedral.svg",
|
|
25
25
|
"assets/favicon.ico",
|
|
26
|
-
"docs/application-stack-standard.md"
|
|
26
|
+
"docs/application-stack-standard.md",
|
|
27
|
+
"docs/delivery-workflow.md",
|
|
28
|
+
"docs/sponsorships.md",
|
|
29
|
+
"docs/managed-hosting-architecture.md",
|
|
30
|
+
"assets/security"
|
|
27
31
|
],
|
|
28
32
|
"homepage": "https://github.com/anhedral/anhedral-init#readme",
|
|
29
33
|
"repository": {
|
|
@@ -43,14 +47,14 @@
|
|
|
43
47
|
"scripts": {
|
|
44
48
|
"scaffold": "node dist/bin.js init",
|
|
45
49
|
"clean": "node scripts/clean.mjs",
|
|
46
|
-
"build": "pnpm clean && tsc && node scripts/prepare-cli.mjs
|
|
50
|
+
"build": "pnpm clean && tsc && node scripts/prepare-cli.mjs",
|
|
47
51
|
"prepare": "pnpm build",
|
|
48
|
-
"typecheck": "tsc --noEmit
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
49
53
|
"check:hygiene": "node scripts/check-source-hygiene.mjs",
|
|
50
54
|
"check:security": "node scripts/check-security-policy.mjs",
|
|
51
55
|
"check:release-policy": "node scripts/check-release-policy.mjs",
|
|
52
56
|
"check:release-secrets": "node scripts/check-release-secrets.mjs",
|
|
53
|
-
"lint": "pnpm typecheck && pnpm check:hygiene && pnpm check:release-policy",
|
|
57
|
+
"lint": "pnpm typecheck && pnpm format:check && pnpm check:hygiene && pnpm check:release-policy",
|
|
54
58
|
"audit:osv": "node scripts/audit-osv.mjs",
|
|
55
59
|
"test": "pnpm test:unit",
|
|
56
60
|
"pretest": "pnpm build",
|
|
@@ -71,7 +75,11 @@
|
|
|
71
75
|
"test:standard": "pnpm build && node --test tests/test-standard.test.mjs",
|
|
72
76
|
"test:unit": "node --test --test-concurrency=4 --test-reporter=spec tests/*.test.mjs",
|
|
73
77
|
"test:integration": "pnpm build && node tests/test-generated-apps.mjs",
|
|
74
|
-
"
|
|
78
|
+
"test:live:delivery": "pnpm build && node tests/test-live-delivery.mjs",
|
|
79
|
+
"test:live:vercel": "pnpm build && node tests/test-live-vercel.mjs",
|
|
80
|
+
"test:live:vercel:git": "pnpm build && node tests/test-live-vercel-git.mjs",
|
|
81
|
+
"format": "prettier --write src scripts tests",
|
|
82
|
+
"format:check": "prettier --check src scripts tests"
|
|
75
83
|
},
|
|
76
84
|
"keywords": [
|
|
77
85
|
"cli",
|
|
@@ -87,31 +95,18 @@
|
|
|
87
95
|
"neon",
|
|
88
96
|
"drizzle",
|
|
89
97
|
"shadcn",
|
|
90
|
-
"turborepo"
|
|
98
|
+
"turborepo",
|
|
99
|
+
"vinext"
|
|
91
100
|
],
|
|
92
101
|
"license": "Apache-2.0",
|
|
93
102
|
"packageManager": "pnpm@10.34.5",
|
|
94
103
|
"devDependencies": {
|
|
95
|
-
"@base-ui/react": "1.8.0",
|
|
96
|
-
"@modelcontextprotocol/ext-apps": "1.7.5",
|
|
97
|
-
"@modelcontextprotocol/sdk": "1.32.1",
|
|
98
|
-
"@openai/mcp-extensions": "0.1.0",
|
|
99
|
-
"@tailwindcss/node": "4.3.3",
|
|
100
|
-
"@tailwindcss/oxide": "4.3.3",
|
|
101
104
|
"@types/node": "20.19.43",
|
|
102
|
-
"
|
|
103
|
-
"@types/react-dom": "19.2.3",
|
|
104
|
-
"class-variance-authority": "0.7.1",
|
|
105
|
-
"cn": "0.4.0",
|
|
106
|
-
"esbuild": "0.28.2",
|
|
107
|
-
"jsonc-parser": "3.3.1",
|
|
108
|
-
"lucide-react": "1.52.0",
|
|
109
|
-
"react": "19.3.0",
|
|
110
|
-
"react-dom": "19.3.0",
|
|
105
|
+
"prettier": "3.9.10",
|
|
111
106
|
"simple-icons": "16.27.0",
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"
|
|
107
|
+
"typescript": "5.9.3"
|
|
108
|
+
},
|
|
109
|
+
"dependencies": {
|
|
110
|
+
"jsonc-parser": "3.3.1"
|
|
116
111
|
}
|
|
117
112
|
}
|
package/dist/project.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const STANDARD_PRODUCTS: readonly ["next", "expo", "electron", "wxt", "hono", "neon", "d1", "local-data", "clerk", "better-auth", "r2", "kv", "realtime", "queues", "cron", "workflows", "openai", "ai-sdk", "workers-ai", "resend", "stripe", "revenuecat", "sentry", "basin", "posthog", "styling"];
|
|
2
|
-
export type StandardProduct = typeof STANDARD_PRODUCTS[number];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const STANDARD_PRODUCTS = [
|
|
2
|
-
'next', 'expo', 'electron', 'wxt', 'hono', 'neon', 'd1', 'local-data',
|
|
3
|
-
'clerk', 'better-auth', 'r2', 'kv', 'realtime', 'queues', 'cron', 'workflows',
|
|
4
|
-
'openai', 'ai-sdk', 'workers-ai', 'resend', 'stripe', 'revenuecat',
|
|
5
|
-
'sentry', 'basin', 'posthog', 'styling',
|
|
6
|
-
];
|
|
File without changes
|
|
File without changes
|