anhedral 0.15.0 → 0.16.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 +29 -38
- package/assets/stack/ai-schema.ts.txt +5 -0
- package/assets/stack/ai.ts.txt +30 -0
- package/assets/stack/api-index.ts.txt +15 -0
- package/assets/stack/auth-features.ts.txt +4 -0
- package/assets/stack/auth-journal.json.txt +13 -0
- package/assets/stack/auth-migration.sql.txt +53 -0
- package/assets/stack/auth-routes.ts.txt +11 -0
- package/assets/stack/auth-schema.ts.txt +64 -0
- package/assets/stack/auth-snapshot.json.txt +346 -0
- package/assets/stack/auth.ts.txt +32 -0
- package/assets/stack/billing-mode.ts.txt +8 -0
- package/assets/stack/billing-schema.ts.txt +11 -0
- package/assets/stack/desktop.rs.txt +21 -0
- package/assets/stack/entitlement-guard.ts.txt +32 -0
- package/assets/stack/entitlements.ts.txt +8 -0
- package/assets/stack/events-schema.ts.txt +12 -0
- package/assets/stack/events.ts.txt +59 -0
- package/assets/stack/mobile-auth.ts.txt +25 -0
- package/assets/stack/mobile-billing.tsx.txt +63 -0
- package/assets/stack/mobile-session.tsx.txt +83 -0
- package/assets/stack/native-button.tsx.txt +108 -0
- package/assets/stack/native-global.css.txt +4 -0
- package/assets/stack/native-lib-utils.ts.txt +5 -0
- package/assets/stack/native-metro.config.js.txt +6 -0
- package/assets/stack/native-nativewind-env.d.ts.txt +1 -0
- package/assets/stack/native-tailwind.config.js.txt +73 -0
- package/assets/stack/native-text.tsx.txt +89 -0
- package/assets/stack/purchases.ts.txt +65 -0
- package/assets/stack/revenuecat.ts.txt +88 -0
- package/assets/stack/rtc-schema.ts.txt +10 -0
- package/assets/stack/rtc.ts.txt +122 -0
- package/assets/stack/security.ts.txt +31 -0
- package/assets/stack/storage.ts.txt +36 -0
- package/assets/stack/stripe.ts.txt +126 -0
- package/assets/stack/web-sign-in.tsx.txt +51 -0
- package/assets/ui/LICENSE.react-native-reusables +21 -0
- package/assets/ui/UPSTREAM.json +7 -1
- package/assets/ui/catalog.json +891 -0
- package/assets/ui/extensions/registry.json +6 -0
- package/assets/ui/native/_controls.tsx +521 -0
- package/assets/ui/native/_core.tsx +118 -0
- package/assets/ui/native/_data.tsx +200 -0
- package/assets/ui/native/_display.tsx +453 -0
- package/assets/ui/native/_feedback.tsx +242 -0
- package/assets/ui/native/_legacy-dialog.tsx +38 -0
- package/assets/ui/native/_motion.tsx +520 -0
- package/assets/ui/native/_overlay.tsx +402 -0
- package/assets/ui/native/_selection.tsx +366 -0
- package/assets/ui/native/accordion.tsx +1 -0
- package/assets/ui/native/alert-dialog.tsx +11 -0
- package/assets/ui/native/alert.tsx +1 -0
- package/assets/ui/native/aspect-ratio.tsx +1 -0
- package/assets/ui/native/attachment.tsx +8 -0
- package/assets/ui/native/avatar.tsx +8 -0
- package/assets/ui/native/badge.tsx +1 -0
- package/assets/ui/native/breadcrumb.tsx +9 -0
- package/assets/ui/native/bubble.tsx +1 -0
- package/assets/ui/native/button-group.tsx +1 -0
- package/assets/ui/native/button.tsx +2 -1
- package/assets/ui/native/calendar.tsx +170 -0
- package/assets/ui/native/card.tsx +16 -5
- package/assets/ui/native/carousel.tsx +1 -0
- package/assets/ui/native/chart.tsx +193 -0
- package/assets/ui/native/checkbox.tsx +1 -0
- package/assets/ui/native/code-block.tsx +137 -0
- package/assets/ui/native/collapsible.tsx +1 -0
- package/assets/ui/native/combobox.tsx +1 -0
- package/assets/ui/native/command.tsx +11 -0
- package/assets/ui/native/context-menu.tsx +16 -0
- package/assets/ui/native/data-table.tsx +1 -0
- package/assets/ui/native/date-picker.tsx +43 -0
- package/assets/ui/native/dialog.tsx +14 -74
- package/assets/ui/native/direction.tsx +1 -0
- package/assets/ui/native/drawer.tsx +10 -0
- package/assets/ui/native/dropdown-menu.tsx +16 -0
- package/assets/ui/native/empty.tsx +8 -0
- package/assets/ui/native/field.tsx +13 -0
- package/assets/ui/native/hover-card.tsx +1 -0
- package/assets/ui/native/input-group.tsx +8 -0
- package/assets/ui/native/input-otp.tsx +1 -0
- package/assets/ui/native/input.tsx +2 -1
- package/assets/ui/native/item.tsx +12 -0
- package/assets/ui/native/kbd.tsx +1 -0
- package/assets/ui/native/marker.tsx +1 -0
- package/assets/ui/native/menubar.tsx +17 -0
- package/assets/ui/native/message-scroller.tsx +6 -0
- package/assets/ui/native/message.tsx +10 -0
- package/assets/ui/native/native-select.tsx +1 -0
- package/assets/ui/native/navigation-menu.tsx +10 -0
- package/assets/ui/native/pagination.tsx +9 -0
- package/assets/ui/native/popover.tsx +1 -0
- package/assets/ui/native/progress.tsx +1 -0
- package/assets/ui/native/questionnaire.tsx +130 -0
- package/assets/ui/native/radio-group.tsx +1 -0
- package/assets/ui/native/registry.json +1103 -0
- package/assets/ui/native/resizable.tsx +1 -0
- package/assets/ui/native/scroll-area.tsx +1 -0
- package/assets/ui/native/select.tsx +11 -0
- package/assets/ui/native/separator.tsx +1 -0
- package/assets/ui/native/sheet.tsx +10 -0
- package/assets/ui/native/sidebar.tsx +22 -0
- package/assets/ui/native/skeleton.tsx +1 -0
- package/assets/ui/native/slider.tsx +1 -0
- package/assets/ui/native/spinner.tsx +1 -0
- package/assets/ui/native/switch.tsx +1 -0
- package/assets/ui/native/table.tsx +10 -0
- package/assets/ui/native/tabs.tsx +1 -0
- package/assets/ui/native/textarea.tsx +1 -0
- package/assets/ui/native/toast.tsx +11 -0
- package/assets/ui/native/toggle-group.tsx +1 -0
- package/assets/ui/native/toggle.tsx +1 -0
- package/assets/ui/native/tooltip.tsx +1 -0
- package/assets/ui/native/trace.tsx +20 -0
- package/assets/ui/native/typography.tsx +15 -0
- package/dist/bin.js +7 -12
- package/dist/capabilities.d.ts +4 -33
- package/dist/capabilities.js +2 -66
- package/dist/capability-catalog.d.ts +83 -0
- package/dist/capability-catalog.js +121 -0
- package/dist/capability-command.d.ts +3 -0
- package/dist/capability-command.js +188 -0
- package/dist/capability-editor.d.ts +17 -0
- package/dist/capability-editor.js +97 -0
- package/dist/capability-recipes.d.ts +4 -0
- package/dist/capability-recipes.js +520 -0
- package/dist/capability-references.d.ts +4 -0
- package/dist/capability-references.js +7 -0
- package/dist/cli-commands.d.ts +1 -2
- package/dist/cli-commands.js +10 -104
- package/dist/cli-output.d.ts +1 -2
- package/dist/cli-output.js +6 -251
- package/dist/command-schema.js +39 -322
- package/dist/dependencies.d.ts +29 -6
- package/dist/dependencies.js +61 -14
- package/dist/index.d.ts +1 -42
- package/dist/index.js +1 -27
- package/dist/platforms/mobile.js +1 -20
- package/dist/platforms/web.d.ts +1 -1
- package/dist/platforms/web.js +27 -75
- package/dist/project-config.d.ts +2 -13
- package/dist/project-config.js +10 -82
- package/dist/registry/options.js +1 -5
- package/dist/registry/resolve.d.ts +1 -1
- package/dist/registry/resolve.js +2 -10
- package/dist/registry/usage.js +3 -9
- package/dist/scaffold/backend.js +0 -3
- package/dist/scaffold/database.js +2 -1
- package/dist/scaffold/documentation.js +82 -20
- package/dist/scaffold/expo-runtime.js +3 -4
- package/dist/scaffold/native-ui.js +12 -7
- package/dist/scaffold/stack-documentation.js +1 -1
- package/dist/scaffold/storage.d.ts +2 -0
- package/dist/scaffold/storage.js +21 -0
- package/dist/scaffold/workspace.js +26 -21
- package/dist/stack-registry.d.ts +2 -8
- package/dist/stack-registry.js +11 -87
- package/dist/standard.js +1 -11
- package/dist/ui-catalog.d.ts +26 -0
- package/dist/ui-catalog.js +31 -0
- package/dist/ui-command.d.ts +3 -0
- package/dist/ui-command.js +219 -0
- package/dist/ui-project.d.ts +22 -0
- package/dist/ui-project.js +110 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/anhedral-stack.md +4 -20
- package/docs/capabilities.md +110 -0
- package/docs/native-ui.md +102 -0
- package/docs/software-factory.md +16 -44
- package/docs/stack-standard.md +11 -60
- package/docs/ui.md +33 -0
- package/docs/verification.md +191 -0
- package/package.json +19 -18
- package/dist/access.d.ts +0 -10
- package/dist/access.js +0 -93
- package/dist/auth-schema-snapshot.d.ts +0 -346
- package/dist/auth-schema-snapshot.js +0 -347
- package/dist/auth-schema.d.ts +0 -1
- package/dist/auth-schema.js +0 -57
- package/dist/capability-contract.d.ts +0 -47
- package/dist/capability-contract.js +0 -129
- package/dist/catalog-model.d.ts +0 -24
- package/dist/catalog-model.js +0 -1
- package/dist/catalog-registration.d.ts +0 -16
- package/dist/catalog-registration.js +0 -22
- package/dist/catalog-snapshot.d.ts +0 -5
- package/dist/catalog-snapshot.js +0 -97
- package/dist/cli-delivery.d.ts +0 -3
- package/dist/cli-delivery.js +0 -112
- package/dist/cloudflare.d.ts +0 -25
- package/dist/cloudflare.js +0 -226
- package/dist/delivery-evidence.d.ts +0 -62
- package/dist/delivery-evidence.js +0 -157
- package/dist/delivery.d.ts +0 -82
- package/dist/delivery.js +0 -489
- package/dist/inspector-model.d.ts +0 -123
- package/dist/inspector-model.js +0 -1
- package/dist/integration-service-readers.d.ts +0 -12
- package/dist/integration-service-readers.js +0 -92
- package/dist/lifecycle-model.d.ts +0 -15
- package/dist/lifecycle-model.js +0 -20
- package/dist/lifecycle.d.ts +0 -11
- package/dist/lifecycle.js +0 -91
- package/dist/management.d.ts +0 -3
- package/dist/management.js +0 -47
- package/dist/mobile-delivery.d.ts +0 -77
- package/dist/mobile-delivery.js +0 -370
- package/dist/project-catalog.d.ts +0 -41
- package/dist/project-catalog.js +0 -288
- package/dist/project-inspector.d.ts +0 -4
- package/dist/project-inspector.js +0 -671
- package/dist/project-lifecycle.d.ts +0 -25
- package/dist/project-lifecycle.js +0 -57
- package/dist/project-state.d.ts +0 -47
- package/dist/project-state.js +0 -480
- package/dist/provider-auth.d.ts +0 -41
- package/dist/provider-auth.js +0 -180
- package/dist/provider-readiness.d.ts +0 -30
- package/dist/provider-readiness.js +0 -85
- package/dist/providers/adapters.d.ts +0 -17
- package/dist/providers/adapters.js +0 -103
- package/dist/providers/api.d.ts +0 -29
- package/dist/providers/api.js +0 -253
- package/dist/providers/config.d.ts +0 -15
- package/dist/providers/config.js +0 -136
- package/dist/providers/definitions.d.ts +0 -115
- package/dist/providers/definitions.js +0 -42
- package/dist/providers/provision.d.ts +0 -24
- package/dist/providers/provision.js +0 -76
- package/dist/providers/receipts.d.ts +0 -20
- package/dist/providers/receipts.js +0 -56
- package/dist/providers/recovery-verification.d.ts +0 -7
- package/dist/providers/recovery-verification.js +0 -52
- package/dist/providers/recovery.d.ts +0 -30
- package/dist/providers/recovery.js +0 -34
- package/dist/providers/runtime.d.ts +0 -10
- package/dist/providers/runtime.js +0 -234
- package/dist/providers/schema.d.ts +0 -28
- package/dist/providers/schema.js +0 -49
- package/dist/providers/state.d.ts +0 -55
- package/dist/providers/state.js +0 -283
- package/dist/provision.d.ts +0 -47
- package/dist/provision.js +0 -208
- package/dist/r2-service-data.d.ts +0 -2
- package/dist/r2-service-data.js +0 -136
- package/dist/readiness.d.ts +0 -23
- package/dist/readiness.js +0 -117
- package/dist/registry/add.d.ts +0 -24
- package/dist/registry/add.js +0 -210
- package/dist/registry/bootstrap.d.ts +0 -3
- package/dist/registry/bootstrap.js +0 -5
- package/dist/registry/commands.d.ts +0 -3
- package/dist/registry/commands.js +0 -83
- package/dist/registry/preview.d.ts +0 -11
- package/dist/registry/preview.js +0 -91
- package/dist/registry/receipt.d.ts +0 -3
- package/dist/registry/receipt.js +0 -68
- package/dist/repository.d.ts +0 -24
- package/dist/repository.js +0 -96
- package/dist/scaffold/auth.d.ts +0 -2
- package/dist/scaffold/auth.js +0 -76
- package/dist/scaffold/billing-config.d.ts +0 -1
- package/dist/scaffold/billing-config.js +0 -73
- package/dist/scaffold/billing-contracts.d.ts +0 -2
- package/dist/scaffold/billing-contracts.js +0 -48
- package/dist/scaffold/billing-providers.d.ts +0 -1
- package/dist/scaffold/billing-providers.js +0 -249
- package/dist/scaffold/billing-schema.d.ts +0 -1
- package/dist/scaffold/billing-schema.js +0 -34
- package/dist/scaffold/billing-security.d.ts +0 -1
- package/dist/scaffold/billing-security.js +0 -46
- package/dist/scaffold/billing-server.d.ts +0 -1
- package/dist/scaffold/billing-server.js +0 -139
- package/dist/scaffold/billing-store.d.ts +0 -1
- package/dist/scaffold/billing-store.js +0 -72
- package/dist/scaffold/billing.d.ts +0 -2
- package/dist/scaffold/billing.js +0 -208
- package/dist/scaffold/expo-auth.d.ts +0 -3
- package/dist/scaffold/expo-auth.js +0 -203
- package/dist/scaffold/expo-billing.d.ts +0 -3
- package/dist/scaffold/expo-billing.js +0 -257
- package/dist/scaffold/integrations.d.ts +0 -2
- package/dist/scaffold/integrations.js +0 -11
- package/dist/scaffold/managed-email.d.ts +0 -3
- package/dist/scaffold/managed-email.js +0 -47
- package/dist/scaffold/password-reset.d.ts +0 -1
- package/dist/scaffold/password-reset.js +0 -99
- package/dist/scaffold/private-files.d.ts +0 -2
- package/dist/scaffold/private-files.js +0 -78
- package/dist/scaffold/web-billing.d.ts +0 -2
- package/dist/scaffold/web-billing.js +0 -48
- package/dist/service-deletion.d.ts +0 -29
- package/dist/service-deletion.js +0 -195
- package/dist/service-descriptor.d.ts +0 -10
- package/dist/service-descriptor.js +0 -71
- package/dist/service-model.d.ts +0 -49
- package/dist/service-model.js +0 -8
- package/dist/service-operations.d.ts +0 -29
- package/dist/service-operations.js +0 -48
- package/dist/service-readers.d.ts +0 -8
- package/dist/service-readers.js +0 -216
- package/dist/services-command.d.ts +0 -39
- package/dist/services-command.js +0 -96
- package/dist/ship.d.ts +0 -35
- package/dist/ship.js +0 -107
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
package/docs/software-factory.md
CHANGED
|
@@ -1,54 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Scaffold workflow
|
|
2
2
|
|
|
3
|
-
Anhedral CLI
|
|
3
|
+
Anhedral CLI creates a foundation; consumers develop and operate it themselves. See stack-standard.md for architectural ownership.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1. Inspect an empty destination. Preview `anhedral init my-app --dry-run --json`.
|
|
6
|
+
2. Run `anhedral init my-app`, or `--skip-install --no-git` for offline source generation.
|
|
7
|
+
3. Review README.md, AGENTS.md, anhedral.json, environment examples and Wrangler configuration. Follow the recorded Node and pnpm versions.
|
|
8
|
+
4. Run `pnpm dev` and open the address printed by the server. New projects contain only the web app. Add other clients only when required.
|
|
9
|
+
5. Use `anhedral ui list/add/diff/doctor` to extend source-owned UI; see [UI commands](ui.md). Develop features and run `pnpm check`.
|
|
10
|
+
6. Use `anhedral add` to compose selected [stack capabilities](capabilities.md), inspect the dry-run plan, configure the selected auth methods/providers and validate the consumer. Cloudflare, Stripe and RevenueCat Codex plugins can assist when installed and explicitly invoked; they are separate products with their own credentials and workflows.
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
The CLI does not manage provider access, billing, infrastructure, deployments, releases or production acceptance. Generated Wrangler/OpenNext configuration and explicit database migration scripts remain editable consumer tooling.
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
## Maintaining the scaffold
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
anhedral init my-app
|
|
13
|
-
anhedral init paid-app --stripe --revenuecat
|
|
14
|
-
```
|
|
16
|
+
Preserve generated-consumer tests, source-generation safety, pinned dependencies, UI provenance, licenses and immutable release packaging. Check emitted source and the actual packed npm artifact. Preserve docs/verification.md as dated evidence. Keep one focused behavior per topic branch from staging; promote stable releases through main. A build does not publish npm or install a plugin.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
The Codex plugin ships skills and stack references only. It has no MCP server, project catalog, dashboard or provider credentials. Package validation checks the skills, references, versions and absence of a managed runtime.
|
|
17
19
|
|
|
18
|
-
##
|
|
20
|
+
## Next/OpenNext runtime regression gate
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Relevant web generator, build dependency and runtime-harness PRs automatically compile one isolated generated foundation and run it in local workerd. The smoke verifies prerendered homepage output, dynamic SSR/RSC, a synthetic Server Action and cookie round-trip, static asset cache headers; Hono service binding is covered separately by the retained proxy contract tests. Synthetic routes exist only in the test workspace. It never deploys or migrates a configured database. Run `pnpm test:next-runtime` locally.
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
The gate retains `.artifacts/next-runtime/{bundle,smoke}.json` for one day. Its initial 4 MiB gzip budget sums emitted Worker JS/Wasm modules individually, lists the largest modules, and fails when exceeded. This is a source artifact regression ceiling, not provider upload size, memory consumption or cold-request latency. Review measurement changes before adjusting the ceiling.
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## Add payments
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
anhedral add stripe --cwd my-app --dry-run --json
|
|
30
|
-
anhedral add stripe --cwd my-app
|
|
31
|
-
anhedral add revenuecat --cwd my-app
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Only these two additions are supported. Use the exact project generator version and preserve edited-source fingerprints; review conflicts instead of forcing replacement. Configure provider scope, plans, environment and credentials before acceptance. Test retries, duplicate/reordered webhooks, account switching, refunds/revocation and expiry. Native purchases require an actual device build and store sandbox configuration.
|
|
35
|
-
|
|
36
|
-
## Provision and deliver
|
|
37
|
-
|
|
38
|
-
Use the CLI help for exact flags. Authenticate the selected Cloudflare/provider accounts explicitly, inspect plans, and provision only authorized resources. Commit resolved tracked configuration before delivery. Keep management credentials out of application code and logs. Secret installation, provider activation, DNS ownership and any spending approvals remain explicit operator steps.
|
|
39
|
-
|
|
40
|
-
Cloudflare delivery checks clean-source provenance, account identity, selected audience and recorded releases. Retain those safeguards. A deployment exit code alone does not prove the intended application works. Migrations are explicit; no automatic remote database migration during checks/startup. Native builds and store distribution are separate workflows.
|
|
41
|
-
|
|
42
|
-
Verify the actual deployed web URL and target device against product acceptance criteria, including anonymous rejection and cross-account isolation. Record source SHA, exact artifact identity, commands, outcomes and remaining limitations. Rollback does not restore data or undo migrations; review data compatibility independently.
|
|
43
|
-
|
|
44
|
-
## Evidence-driven maintenance
|
|
45
|
-
|
|
46
|
-
Before deleting code, trace runtime entrypoints, published exports, generated consumers, plugin tools and maintained examples. Keep changes scoped to an explicit behavior. The 0.14 scope reduction deliberately removes unsupported alternatives; it does not authorize deleting customer source, remote resources, credentials or historical verification.
|
|
47
|
-
|
|
48
|
-
Preserve operational checks, secret protection, lock/recovery safeguards and independent provider evidence. For generator changes, check emitted source and packed package behavior. For provider changes, distinguish isolated contract fixtures from live acceptance. Passing static tests cannot establish production operation.
|
|
49
|
-
|
|
50
|
-
## Maintain and release the CLI
|
|
51
|
-
|
|
52
|
-
Follow repository AGENTS and CONTRIBUTING instructions. Use short-lived codex branches from staging and reviewable PRs into staging. Main accepts release promotions; no direct development pushes. Preserve reviewed release artifacts, npm provenance, plugin source integrity and protected publishing. Saving code to GitHub is separate from publishing npm, deploying customer applications, or installing a plugin.
|
|
53
|
-
|
|
54
|
-
Run build, typecheck, formatting/source hygiene, static security, relevant unit/generated runtime tests and packed-consumer tests. The Codex plugin has its own build/check and independently packaged runtime. A local CLI build does not update an installed plugin. Keep package version, source generator version and plugin marketplace reference synchronized.
|
|
26
|
+
New public homepages are prerenderable; request-dependent routes opt into dynamic rendering where needed. Generated `public/_headers` caches fingerprinted Next assets immutably; ordinary assets retain platform revalidation. Authenticated responses continue to require private/no-store policy. Existing apps must adopt generator changes explicitly.
|
package/docs/stack-standard.md
CHANGED
|
@@ -1,72 +1,23 @@
|
|
|
1
1
|
# Stack standard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
New applications begin with Next.js App Router, OpenNext for Cloudflare Workers and Anhedral UI. Init writes `apps/web`, shared tokens and workspace tooling. It does not generate Expo, Hono, database/contracts packages, authentication, private R2 or managed services.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Progressive composition
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| apps/web | Next.js App Router web application, DOM shadcn UI, SSR/RSC and Cloudflare OpenNext |
|
|
10
|
-
| apps/mobile | Expo iOS/Android application and the Anhedral native shadcn port using StyleSheet and shared tokens |
|
|
11
|
-
| apps/api | Hono Worker, authentication, application routes and authorization |
|
|
12
|
-
| packages/contracts | Framework-independent schemas, JSON contracts and transport |
|
|
13
|
-
| packages/db | Drizzle/D1 schema and explicit migrations |
|
|
14
|
-
| packages/auth | Better Auth server construction and session contracts |
|
|
15
|
-
| packages/styling | Shared colors, spacing and light/dark tokens |
|
|
7
|
+
Add Hono when a separate API is useful, then Drizzle/D1 and Better Auth when persistence and identity are useful. Add private R2, payments, realtime and AI for actual product requirements. Additional clients may use Expo, WXT with the Side Panel API, or GPUI for a native desktop application. Anhedral UI for Expo and RevenueCat remain conditional choices. The precise “if needed” conditions remain open; these are optional additions, without commercial tier labels.
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
The public source interface implements `init`, progressive `add`, `stack list/status/doctor` and the `ui` family. See [capability recipes and safety](capabilities.md). Retired operational `auth`, `ship`, `inspect` and provider-management commands remain unavailable. The reintroduced `add` command composes source only. The programmatic generator retains explicit legacy recipes for compatibility tests; they are not the new-project default or the new UI architecture.
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
When a backend is introduced, Hono owns privileged data and application authorization. Next server actions adapt forms and call that API. Share framework-independent contracts and tokens without cross-importing application source. Keep R2 private; implement identity, ownership and limits before exposing files. Database migrations are deliberate operations and never part of startup or build.
|
|
20
12
|
|
|
21
|
-
##
|
|
13
|
+
## Anhedral UI
|
|
22
14
|
|
|
23
|
-
|
|
15
|
+
Anhedral UI is thin orchestration over official shadcn web and React Native Reusables native source. Its maintained surface is a versioned component catalog, CLI routing, setup metadata and a small reviewed native extension registry. Native resolution prefers an Anhedral extension, then RNR, then reports unavailable. The extension registry is initially empty. Do not revive the exhaustive native shadcn fork or require every component to reach parity before shipping a useful feature.
|
|
24
16
|
|
|
25
|
-
|
|
17
|
+
New web applications include a bounded Button/Input/Label starter and MIT attribution. Additional components are installed by the pinned shadcn CLI. Native currently supports the RNR NativeWind 4 registry only, in an already configured Expo application. Keep matching React/React Native/Expo dependencies and test the consuming app. The UI layer has no dependency on Hono, D1 or Better Auth.
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
Components belong to the consumer's source tree. Retain upstream licenses, use semantic theme tokens, review diffs and preserve local edits. No runtime UI package or automatic overwrite/update is introduced. Catalog availability means an upstream source exists; it does not assert API parity, accessibility or device acceptance. See [UI commands](ui.md).
|
|
28
20
|
|
|
29
|
-
##
|
|
21
|
+
## Operations and compatibility
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
| --- | --- |
|
|
33
|
-
| stripe | Authenticated web checkout/customer portal, webhooks, reconciliation and server entitlements |
|
|
34
|
-
| revenuecat | Native purchase/restore/manage adapters, provider reconciliation and shared server entitlements |
|
|
35
|
-
|
|
36
|
-
```sh
|
|
37
|
-
anhedral init my-app --stripe
|
|
38
|
-
anhedral init my-app --revenuecat
|
|
39
|
-
anhedral init my-app --stripe --revenuecat
|
|
40
|
-
anhedral add stripe --cwd my-app --dry-run --json
|
|
41
|
-
anhedral add revenuecat --cwd my-app
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Stripe and RevenueCat are independent. Configure products, prices/offerings, environment, application IDs, credentials and webhook endpoints in the intended accounts. Use server-verified provider state for access; client purchase callbacks and redirects never grant entitlements. Preserve replay handling, durable reconciliation, expiry and fail-closed behavior. No real payment or provider activation occurs during generation.
|
|
45
|
-
|
|
46
|
-
## Runtime boundaries
|
|
47
|
-
|
|
48
|
-
Hono owns privileged behavior. Applications do not import each other's source. Shared schema/transport stays framework-independent. Use request-scoped database and service factories. Private responses must not enter shared caches. No credentials or raw secrets in clients, generated source, logs or Git.
|
|
49
|
-
|
|
50
|
-
Cloudflare Workers host the OpenNext web application and Hono API. The web Worker calls Hono through its `ANHEDRAL_API` service binding. Next server rendering and actions adapt requests to Hono; they never own database/auth-server access. Web UI uses DOM shadcn components; native UI uses the Anhedral-maintained shadcn port. Both share contracts and design tokens. Native signing, device/store acceptance and store submission remain separate from OpenNext deployment. See [workflow](software-factory.md) for supported commands and evidence boundaries.
|
|
51
|
-
|
|
52
|
-
## Version compatibility
|
|
53
|
-
|
|
54
|
-
Version 0.15 replaces Expo web with full Next.js App Router through OpenNext and keeps Expo for iOS/Android only. The former broad catalog remains retired. Core records are always present; only Stripe and RevenueCat can be selected as additions. Registry inspection may show supporting records; it does not make those records independently selectable additions. Legacy application source and provider resources are never deleted or migrated by this change. Preserve old CLI pins for old projects and retain dated verification as historical evidence.
|
|
55
|
-
|
|
56
|
-
## Managed authentication email
|
|
57
|
-
|
|
58
|
-
New apps include a server-only `packages/managed-email` adapter and web/native
|
|
59
|
-
verification and password-reset screens. Anhedral operations may provision the API
|
|
60
|
-
Worker's `ANHEDRAL_EMAIL` service binding, `ANHEDRAL_EMAIL_SCOPE` UUID and secret
|
|
61
|
-
`ANHEDRAL_EMAIL_CAPABILITY`; provider keys and sender configuration stay in the
|
|
62
|
-
broker. Its scope must match the app's public Better Auth origin and exact native
|
|
63
|
-
scheme. Do not expose these values through Next public variables or Expo config.
|
|
64
|
-
|
|
65
|
-
No broker configuration preserves standalone sign-in behavior. Partial setup fails
|
|
66
|
-
closed. Complete setup requires verified email and enables reset delivery with
|
|
67
|
-
session revocation. Do not remove broker configuration to bypass verification;
|
|
68
|
-
existing unverified sessions need an explicit revocation plan when enabling the
|
|
69
|
-
policy for an existing deployment. Initialization does not provision email or send
|
|
70
|
-
messages. Test with an isolated sink; a receipt proves acceptance, not inbox delivery.
|
|
71
|
-
Existing hosted execution images remain pinned until a separate verified image
|
|
72
|
-
release; publishing the CLI does not replace them or rewrite saved apps.
|
|
23
|
+
Init writes editable source and can install dependencies and initialize Git. It never provisions providers, creates credentials, deploys or registers a managed project. Consumers own application security and operations; Platform is a separate managed product. Existing applications, native port work and Platform runtime artifacts retain their explicit reviewed pins until separately adopted. A CLI build or release does not update them.
|
package/docs/ui.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Anhedral UI
|
|
2
|
+
|
|
3
|
+
One CLI routes source installation to official shadcn for Next.js and React Native Reusables for Expo. It owns the catalog and a small native extension registry, rather than a fork of either library. New `anhedral init` applications already have web UI configuration and three starter components.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
anhedral ui list --json
|
|
7
|
+
anhedral ui init --web
|
|
8
|
+
anhedral ui add button card --web
|
|
9
|
+
anhedral ui add button --native
|
|
10
|
+
anhedral ui diff button --native
|
|
11
|
+
anhedral ui doctor --all
|
|
12
|
+
anhedral ui add card --all --dry-run --json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
All commands accept the global `--cwd`, `--json` and `--quiet` options. `--web`, `--native` and `--all` are mutually exclusive. Without a selector, a single detected Next.js or Expo app is used; ambiguous workspaces require selection. Detection supports an app itself or applications immediately under a workspace's `apps/` directory. Web and native use separate directories.
|
|
16
|
+
|
|
17
|
+
`list` reads the packaged catalog without network access. `doctor` checks static configuration and exits unsuccessfully for missing setup; it does not claim runtime acceptance. `--dry-run` previews init/add/diff without network or writes. Every selected target is preflighted before installation starts. Upstream installation can still fail after an earlier target succeeds; source installation is not a cross-project transaction, so review Git changes before retrying.
|
|
18
|
+
|
|
19
|
+
`init --web` delegates new configuration to pinned shadcn with Base UI defaults. Existing `components.json` is validated and preserved. `init --native` requires a prepared Expo/NativeWind 4 project using the [RNR manual setup](https://reactnativereusables.com/docs/installation/manual). It does not create Expo, rewrite Metro/root layouts, choose device permissions or add a second styling engine. Complete RNR's dependencies, CSS variables, Tailwind/Metro configuration, aliases, `cn` helper and portal host first. It can create the conventional native `components.json`, then adds Anhedral metadata and attribution without replacing existing files.
|
|
20
|
+
|
|
21
|
+
`add` validates canonical names against the catalog. Native chooses a packaged reviewed Anhedral extension when declared, otherwise RNR's NativeWind item, otherwise fails clearly before installing. The extension registry starts empty. Web uses official shadcn items. The pinned shadcn CLI owns registry dependency resolution and copying source. We do not use the universal-only `@shadcn/registry` installer for component projects.
|
|
22
|
+
|
|
23
|
+
`add` never requests `--overwrite`; upstream protects existing component files. `diff` delegates to shadcn's `add --diff` preview. Commit or inspect consumer changes before updating, and reconcile changes explicitly. Native `diff` availability follows the upstream CLI and registry behavior; it is not a custom merge engine.
|
|
24
|
+
|
|
25
|
+
## Ownership and provenance
|
|
26
|
+
|
|
27
|
+
`assets/ui/catalog.json` records the catalog revision, upstream sources, dependency metadata and pinned installer. Availability is not parity or runtime certification. RNR URLs are live upstream endpoints; the catalog's recorded source revision describes the inventory, not an immutable downloaded artifact. Review registry changes before installing into sensitive consumers.
|
|
28
|
+
|
|
29
|
+
`.anhedral-ui.json` records platform, catalog revision and source ownership; it does not automatically update components. `ANHEDRAL_UI_LICENSES/` retains the relevant MIT notice. No Anhedral runtime package is introduced. Theme through consumer CSS variables and existing tokens. Future native extensions require a focused product need, upstream provenance/license and native consumer evidence; broad parity is not a release prerequisite.
|
|
30
|
+
|
|
31
|
+
Validate web flows in a browser. Validate native interactions in Android/iOS development builds, including accessibility, overlays, keyboard and lifecycle. Typechecking or an Expo web export does not establish device acceptance. Legacy `docs/native-ui.md` describes the retained earlier port, not this new default UI layer.
|
|
32
|
+
|
|
33
|
+
For a generated Anhedral workspace, `anhedral add expo` creates the native application after its core source prerequisites, and `anhedral add native-ui` prepares its NativeWind/RNR integration without replacing product UI. The UI component commands remain independent of backend activation. See [stack additions](capabilities.md).
|
package/docs/verification.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
# Progressive init and thin Anhedral UI — October 26, 2026
|
|
2
|
+
|
|
3
|
+
Prepared on `codex/progressive-ui` from staging `97c4f28` in an isolated checkout. The primary checkout's ongoing native port is preserved. New init generates only Next.js/OpenNext/Workers with editable Anhedral UI (three reviewed web starter components), shared tokens and tooling. The CLI adds ui init/add/list/diff/doctor, a packaged upstream catalog and an empty reviewed native extension registry. Web uses official shadcn; native falls back to RNR NativeWind 4. No new whole-library fork or runtime UI package is introduced. Existing Platform pins and installed plugins are unchanged.
|
|
4
|
+
|
|
5
|
+
Validation: CLI build; 106 unit tests passed with zero failures and one existing conditional skip; lint/typecheck/format/hygiene/release policy; static security; plugin package; packed consumer; and packlist checks. A real generated web consumer installed official Card, passed typecheck/lint and built an OpenNext Worker. Repeated add preserved a customization in Card; diff preview reported it. A real two-conflict batch and an offline colored-prompt regression verify that the wrapper declines each overwrite and closes installer input after the completed file report. The compiled minimal runtime smoke passed prerender, SSR/RSC, server action/cookie round-trip and asset headers, and confirmed that no backend API exists. Measured Worker: 4,877,700 raw bytes / 1,000,286 individually gzipped bytes, below 4 MiB. The fresh minimal generated consumer also passed its full pnpm check and cold/warm Next type-generation cache restoration. Retained Hono proxy and explicit legacy full-stack/native source tests remain separate.
|
|
6
|
+
|
|
7
|
+
A prepared Expo 56 / React Native 0.85.3 / React 19.2.3 / NativeWind 4.2.7 consumer used native ui init and installed RNR Button plus its Text/slot dependency. It passed TypeScript and an iOS Metro/Hermes export. The first export identified a missing direct react-native-css-interop dependency under pnpm; adding the matching NativeWind dependency to this fixture resolved it. This is consumer setup evidence, not a new native project generator or device acceptance claim. Fixtures and logs are retained locally under `.artifacts/progressive-{web,native}` and `/tmp/anhedral-progressive-*`; they are not shipped assets.
|
|
8
|
+
|
|
9
|
+
The first hosted CI run failed because the retained native harness still invoked default init and expected packages/native-ui. Its fixture now selects the explicit legacy recipe; the public default remains minimal. The generated cache helper likewise handles web-only projects. After the harness correction, the preserved legacy native suite passed typechecking and 144 tests on each simulated platform (iOS and Android); these are RNTL tests, not device acceptance. The original failure log is retained locally at /tmp/anhedral-progressive-ci-failure.log.
|
|
10
|
+
|
|
11
|
+
Limits: native init requires upstream Expo/NativeWind/RNR setup, uses one styling engine, and does not rewrite native app layouts. Catalog availability is not parity. Registry endpoints remain live upstream sources; the inventory revision is not a downloaded-source integrity pin. Cross-target preflight prevents setup errors from mutating earlier targets, but upstream installs are not a cross-project transaction. No Android/iOS interaction acceptance, exhaustive native suite, live provider checks, remote migrations, package publication, installed-plugin update or Platform artifact adoption was performed. Release checks and version preparation remain required before publication.
|
|
12
|
+
|
|
13
|
+
# UI source and Expo SDK boundaries — October 25, 2026
|
|
14
|
+
|
|
15
|
+
Prepared on an isolated branch from staging `5e211c0`, coordinated with the active native UI chat. The stack standard, generated README/AGENTS guidance and design skill now distinguish editable reviewed DOM/native source, shared tokens, the upstream review fork, host-owned Expo/React Native/React peers and direct Expo SDK capability usage. Application permissions, background work, uploads and push registration remain application responsibilities. Expo UI adoption is selective; custom native bridges and the ongoing native port are preserved.
|
|
16
|
+
|
|
17
|
+
Validation: CLI build; all four standard scaffold tests; lint/typecheck/format/hygiene/release policy; static security; skills-only plugin check; skill frontmatter validation; and packlist policy (189 files, 462,179 packed bytes) passed. The stack-standard plugin reference was refreshed by the build. The skill validator initially lacked PyYAML; validation passed using an isolated temporary dependency directory without changing project dependencies. No runtime/component/dependency changes, new native acceptance claim, package publication, installed plugin update or Platform deployment occurred. The active native checkout was not edited, built or packaged. Its remaining OS/parity work is independent of this guidance change.
|
|
18
|
+
|
|
19
|
+
# Next/OpenNext runtime gate — October 25, 2026
|
|
20
|
+
|
|
21
|
+
Implemented in an isolated branch from staging; unrelated native registry work remains untouched. Relevant PRs compile the current init-only foundation and exercise actual OpenNext/workerd: prerendered home, dynamic SSR/RSC, synthetic Server Action/cookie round-trip, Hono service binding and immutable asset headers. The fixture remains local and has no configured database migrations or provider calls.
|
|
22
|
+
|
|
23
|
+
Validation: CLI build, lint/typecheck/format/hygiene, static security/release policy, packed consumer and packlist passed. Unit suite: 99 passed, zero failed, one conditional skip. Compiled runtime smoke passed; final emitted Worker measured 5,219,988 raw bytes and 1,078,898 individually gzipped bytes, below the initial 4 MiB regression ceiling. Budget boundary/overflow and scope-selection regressions passed. The public homepage is proven prerendered from Next's manifest; request-dependent fixture routes remain dynamic. No npm publication, deployment or installed plugin update occurred. CI is configured in source; hosted acceptance remains separate.
|
|
24
|
+
|
|
25
|
+
# Scaffold-only CLI preparation — October 24, 2026
|
|
26
|
+
|
|
27
|
+
Prepared on `codex/scaffold-only` from staging in an isolated checkout. The actively edited CLI checkout and its native UI work are preserved. This is an unpublished breaking 0.16.0 candidate; no installed plugin, Platform image, provider account, remote database or deployment was changed.
|
|
28
|
+
|
|
29
|
+
Scope: `init` is the sole product command; npm exports expose generation only. Removed provider authentication, delivery/provisioning/operations, payments additions, inspection/catalog/MCP and their retired tests. Generated applications retain Next.js/OpenNext, native Expo, web shadcn and native ports, Hono/workerd, Drizzle/D1 and a private R2 binding, contracts/tokens and explicit consumer migration/configuration scripts. They contain no auth/email/billing integration or public object routes. The skills-only Codex plugin explains this stack, initializes it, starts local development/opens the browser, and recommends separately installed provider plugins when requested. Historical evidence below remains unchanged.
|
|
30
|
+
|
|
31
|
+
Validation: CLI build/typecheck, lint/format/source hygiene, static security and release policy pass. The unit suite passes with one existing conditional skip. Skills-only packaging and published-file policy pass. The packed npm consumer successfully installs the package and initializes the foundation with real dependencies; generation does not register a catalog. The generated HTTP contracts pass six positive/negative semantic compiler cases without source rewriting. A fresh application passes lint, typecheck, strict dead-code analysis, configured dependency-audit policy, and serial production builds including Next/OpenNext and the Hono Worker. An isolated local Next → Hono/workerd health request succeeds without application credentials; removed auth, file and payment routes return 404. Test servers stop after acceptance. No configured remote migrations run.
|
|
32
|
+
|
|
33
|
+
Limit: full generated `pnpm check` still fails Fallow's health complexity threshold on the unchanged native port catalog (28 findings in the initial fresh run). The scope change's unused web UI/helpers were repaired; final strict dead-code analysis passes. Native UI source is deliberately unchanged because separate active work owns it. The raw dependency audit reports the reviewed node-forge advisory (accepted only with the existing exact local patch) and two moderate transitive advisories; the existing policy preserves the raw report and passes. No new exceptions or weakened thresholds were introduced. Browser interaction, physical-device/store acceptance, live providers and production operation are not claimed. Existing Platform runtime pins keep the prior generator and inspect command until a separate explicit adoption.
|
|
34
|
+
|
|
35
|
+
# Expo native shadcn catalog — October 24, 2026
|
|
36
|
+
|
|
37
|
+
The CLI now maintains native semantic adaptations for all 66 entries in the shadcn Components catalog reviewed on 2026-10-24. `assets/ui/native/registry.json` pins the IDs, exports, shared helpers and evidence status; [Native UI](native-ui.md) is its generated parity checklist. This baseline excludes separately maintained AI Elements, form-library integrations and ecosystem registries. Native style/events, SVG chart data and touch/menu interactions deliberately have native APIs rather than DOM/Recharts compatibility.
|
|
38
|
+
|
|
39
|
+
- The real offline generator is used by both the contract tests and native test harness. Tests compare copied sources, explicit helper inventory, all public exports/module paths, an independent upstream ID snapshot, examples and Expo-compatible dependency pins. Fresh applications receive all source, attribution, inventory and native guidance. Application edits are never overwritten by CLI upgrades.
|
|
40
|
+
- React Native Testing Library: 144 tests in nine suites pass under both iOS and Android module resolution (288 executions), using real generated components. Tests exercise controlled values, disabled inputs, long press, native back/escape, menus/filtering, calendar bounds/leap dates/ranges, cumulative drag state, adjustable actions, table selection/sort/pagination, timers, source-preserving syntax/diff highlighting, clipboard failure/retry, six SVG chart types, questionnaire submission, safe areas, themes and reduced-motion subscriptions. Native persistence/clipboard bridges are isolated at the platform boundary. Coverage gates require 90% lines, 85% statements, 75% functions and 70% branches.
|
|
41
|
+
- Strict TypeScript 6 includes the generated mobile application's `noUncheckedIndexedAccess` setting. A fresh installed core application passes native-package ESLint, native-package typechecking and mobile typechecking. Expo SDK 57 exports Hermes bundles for iOS and Android for that application and the complete 66-component gallery. SVG is pinned to the SDK's 15.15.4 native ABI and Clipboard to 57.0.2.
|
|
42
|
+
- CLI build, lint, source hygiene, static security and release policy pass. The full root unit run initially had two failures: the isolated plugin fixture omitted the newly required native guide and the bundled stack-standard link lacked that reference. Both were fixed at their source; the full rerun reports 560 tests, 559 passed and one existing optional runtime test skipped. Plugin checks, packed CLI smoke and explicit packlist checks pass. Live upstream comparison reports exactly the 66 pinned IDs. Native changes run the test harness within the existing single Linux CI gate; no hosted device/build matrix is added.
|
|
43
|
+
|
|
44
|
+
The gallery is maintained in `tests/native-ui` for native review. Interactive device acceptance remains pending for every component: neither JavaScript tests nor Hermes exports establish VoiceOver/TalkBack, physical gestures, OS focus restoration, dynamic type or hardware behavior. A local test simulator could boot, but the Simulator application was unavailable and the existing development client lacked the new Clipboard module; no interactive acceptance is claimed. The temporary Metro server was stopped and the simulator returned to its prior shutdown state. No provider configuration, store submission, production deployment or package publication occurred.
|
|
45
|
+
|
|
1
46
|
# Next.js web and Expo native architecture — October 23, 2026
|
|
2
47
|
|
|
3
48
|
CLI 0.15 source preparation separates full Next.js App Router web (SSR/RSC through
|
|
@@ -875,3 +920,149 @@ provisioned only Node. Add the same pinned pnpm action/version to those jobs, wi
|
|
|
875
920
|
run_install disabled. Keep normal init, artifact integrity, npm environment/OIDC
|
|
876
921
|
and exact-artifact checks intact. A workflow regression covers all three smoke
|
|
877
922
|
locations. A fresh main candidate must be reviewed again after this correction.
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
## 2026-10-24 — Published 0.15.0 artifact identity
|
|
926
|
+
|
|
927
|
+
Read-only release verification resolved tag `v0.15.0` to source
|
|
928
|
+
`2c06f4eb528da0ba404212298fc57e1a2287f22e`. The npm registry serves 0.15.0;
|
|
929
|
+
its tarball and the GitHub release tarball both match the release metadata:
|
|
930
|
+
|
|
931
|
+
- CLI SHA-512: `sha512-1D2XHnw4QSDYXfNigt7YBdv5N8Y8ANOpaoSb38xlqEvv1uq7VHFurx+lAsX0IpB4Jf2R5PISitx2Fs6cDyJ4KQ==`.
|
|
932
|
+
- Plugin SHA-512: `sha512-G3/obSaCpHv+AvitX/Xtb34ChmsBc+7NrV7WHDDNEyqZkOin6CH4MSDgqu4lJnCdUn6dxCN06mFckBadwqlwgg==`.
|
|
933
|
+
|
|
934
|
+
The downloaded plugin ZIP matches both release metadata and plugin metadata.
|
|
935
|
+
The npm and GitHub package checks hashed the actual bytes in memory; the tag
|
|
936
|
+
was checked against the remote repository. This establishes published artifact
|
|
937
|
+
agreement, not independent provenance-signature verification or a rebuilt source
|
|
938
|
+
comparison. Release assets and metadata are available at
|
|
939
|
+
[the 0.15.0 release](https://github.com/anhedral/anhedral-cli/releases/tag/v0.15.0);
|
|
940
|
+
[registry metadata](https://registry.npmjs.org/anhedral/0.15.0) records the npm integrity.
|
|
941
|
+
|
|
942
|
+
This supersedes unpublished-preview wording, not the dated runtime evidence
|
|
943
|
+
above. Publication does not update existing applications, installed plugins or
|
|
944
|
+
Platform images. Platform's separately recorded Next generator at `2280c3b` has
|
|
945
|
+
a different integrity and must retain its own acceptance evidence until an
|
|
946
|
+
explicit artifact adoption is verified. No publication, deployment, provider
|
|
947
|
+
mutation or payment operation was performed during this verification.
|
|
948
|
+
|
|
949
|
+
Documentation correction validation: CLI build, documentation/plugin contract
|
|
950
|
+
checks (two passing test entries) and `git diff --check` passed in an isolated
|
|
951
|
+
checkout. No runtime behavior changed.
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
## 2026-10-24 — Addition post-commit installation recovery
|
|
955
|
+
|
|
956
|
+
Focused addition regressions now inject a failure in the final frozen install,
|
|
957
|
+
after the actual staged source transaction commits. They verify PostCommitError,
|
|
958
|
+
retained billing source/receipts, removal of stale dependency links, released
|
|
959
|
+
transaction lock, preservation of authored/private files and a successful
|
|
960
|
+
idempotent retry that still invokes the installer. A second regression rejects
|
|
961
|
+
an installer that mutates the reviewed lockfile after source commit.
|
|
962
|
+
|
|
963
|
+
The dependency runner is injected: these checks exercise the real addition and
|
|
964
|
+
transaction paths, not a real pnpm dependency installation or application runtime.
|
|
965
|
+
No generator behavior change was required. Build and lint (typecheck, formatting,
|
|
966
|
+
source hygiene and release policy) passed; the focused addition, transaction
|
|
967
|
+
rollback and CLI-output run passed all 36 test entries. `git diff --check` passed.
|
|
968
|
+
No provider, publication, deployment, database or payment operation occurred.
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
## 2026-10-24 — Recovered embedded inspector contracts
|
|
972
|
+
|
|
973
|
+
Compared the preserved user-work snapshot at `4a48ca3` with the current CLI.
|
|
974
|
+
Its embedded-host fixture and browser regressions had not landed. Recovered them
|
|
975
|
+
against the current synthetic core-stack fixture, retaining its lockfile evidence
|
|
976
|
+
and supported init options. The installed MCP Apps SDK now exercises project
|
|
977
|
+
context updates, advertised desktop unsent drafts for both active/new targets,
|
|
978
|
+
unsupported/web-host fallback, failed-composer fallback and actual safe-area layout.
|
|
979
|
+
The production preview CSP remains unchanged; embedding is test-fixture-only.
|
|
980
|
+
Recovered service-argument descriptions now explain catalog/service identities,
|
|
981
|
+
D1's complete-UTC-day analytics windows, pagination and app-only deletion inputs;
|
|
982
|
+
obsolete Vercel guidance was removed.
|
|
983
|
+
|
|
984
|
+
CLI build, root lint/static security, plugin check (61 tests) and the browser suite
|
|
985
|
+
(17 tests, including four recovered host tests) passed. Browser execution used
|
|
986
|
+
installed Google Chrome via PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH because the pinned
|
|
987
|
+
Playwright browser binary is absent. An initial fixture port attempted obsolete
|
|
988
|
+
init flags; it was corrected to preserve the current fixture before acceptance.
|
|
989
|
+
This is synthetic browser/SDK evidence, not live Codex-host or provider acceptance.
|
|
990
|
+
No installed-plugin update, publication, deployment or provider operation occurred.
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
## 2026-10-24 — Recovered generated-type cache restoration
|
|
994
|
+
|
|
995
|
+
The historical cache-restoration check in `0f827d9` remains useful for the maintained
|
|
996
|
+
core stack. A real installed pre-fix generated workspace failed its warm Next
|
|
997
|
+
cache-HIT assertion after generated type files were removed. Worker typecheck also
|
|
998
|
+
had no declared outputs. The corrected generator caches Worker binding types,
|
|
999
|
+
Next environment types and production route types; it ignores next-env.d.ts so a
|
|
1000
|
+
generated file cannot become a changing task input. The regression uses a fresh
|
|
1001
|
+
local-only Turbo cache, requires both application tasks to report HIT in the actual
|
|
1002
|
+
warm-run JSON summary, and compares every restored file byte-for-byte. It runs in
|
|
1003
|
+
the generated-profile integration runner and can target an installed local fixture.
|
|
1004
|
+
|
|
1005
|
+
The same pre-fix fixture passed after applying only the reviewed output/ignore
|
|
1006
|
+
settings. A fresh core application generated by the corrected CLI passed its full
|
|
1007
|
+
check, confirmed cache restoration, dynamic SSR/RSC, workerd service-binding and
|
|
1008
|
+
D1 authentication/authorization, protected contracts, session revocation, native
|
|
1009
|
+
scheme transport and origin rejection. Migration fixtures were explicitly local.
|
|
1010
|
+
CLI build/lint/static security, the unit suite (556 pass, one existing skip), plugin
|
|
1011
|
+
check (61 pass), packed CLI smoke and packlist policy (249 files) also passed.
|
|
1012
|
+
This does not update existing customer projects or establish device, store or live
|
|
1013
|
+
provider acceptance. No remote migration, deployment, payment or publication ran.
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
## 2026-10-24 — Preserved-work disposition and service-tool guidance
|
|
1017
|
+
|
|
1018
|
+
Compared all preserved snapshots against the maintained CLI, its registered
|
|
1019
|
+
commands/plugin tools, emitted source, packaging and tests. Patch IDs alone were
|
|
1020
|
+
insufficient because the repository squashes topic PRs. Exact Git tree comparison
|
|
1021
|
+
established the following dispositions:
|
|
1022
|
+
|
|
1023
|
+
| Preserved source | Disposition |
|
|
1024
|
+
| --- | --- |
|
|
1025
|
+
| Maintainer-policy `f7e51c8` | Exactly the tree of merged PR #24 (`723a213`): architecture, lifecycle, security/toolchain and review work landed historically. PR #46 later retired the old control-panel/alternative-stack layout. The still-useful cache regression was adapted for the current API/Next stack. |
|
|
1026
|
+
| Former local staging `91ec88f` | Exactly the tree of merged PR #37 (`fc721c9`). Maintenance guidance, CI scope, Windows PATH ordering, release-artifact/profile fixes, README and artwork changes were already incorporated. Current command resolution, CI scope and preview discovery retain their relevant fixes. |
|
|
1027
|
+
| Older control-panel variant `d7ac371` | Its 28 changed paths belong to the retired apps/control-panel/plugin layout and an independent anhedral.progress.json report/discovery store. Current project inspection/lifecycle, provider records, delivery evidence, catalog and transaction locks own those concerns. Do not restore a parallel writable evidence store or unsupported capabilities. Original variant remains archived. |
|
|
1028
|
+
| User-work snapshot `4a48ca3` | Reviewed all 114 changed paths. Recovered embedded-host browser coverage, service-argument descriptions and per-operation service-tool descriptions. Nova auth controls/packaging (#60/#62), managed auth email (#61), security pins (#58/#59), approved branding (#47), contract checks (#44), UI inspection/substitution (#41/#43) and owned Next/native components (#49) already landed in focused form. |
|
|
1029
|
+
| User-work UI/generator alternatives | Generic ui/expo-ui packages, native web adapters, duplicate token JSON, unused component inventory, selectable provider/preset recipes and mobile-web bootstrap variants are superseded by separate DOM/native UI, shared tokens, offline core bootstrap and mandatory Next/Expo/Hono/D1/R2. Preserve originals in the archive; no current runtime consumer requires restoring them. |
|
|
1030
|
+
| Attached completed worktree branches | Addition recovery, dependency fixes, Nova packlist and product positioning have exactly the trees of merged PRs #67, #59, #62 and #56 respectively. Retiring their refs does not require removing their worktree files. |
|
|
1031
|
+
| Existing user-work stash | Shared tracked paths match the recovery snapshot, and all 39 untracked stash files are byte-identical to files in that snapshot. Keep the stash unchanged and independently backed up. |
|
|
1032
|
+
|
|
1033
|
+
The recovered service-tool descriptions distinguish existence from application
|
|
1034
|
+
health, explain catalog/service identities, supported Worker/D1 analytics windows,
|
|
1035
|
+
offset/cursor paging, app-only private data, and reviewed single-use deletion
|
|
1036
|
+
plans. Obsolete Vercel wording was removed. Input validation, visibility,
|
|
1037
|
+
permissions, confirmation requirements and provider behavior are unchanged. Plugin
|
|
1038
|
+
check passed all 61 tests after the description recovery. No additional tests were
|
|
1039
|
+
added merely to compare documentation strings.
|
|
1040
|
+
|
|
1041
|
+
Before branch retirement, retain verified self-contained Git bundles containing
|
|
1042
|
+
all original refs (including stash), original ref/object inventories and checksums.
|
|
1043
|
+
The detailed path inventory covers the 142 changed paths in the two independent
|
|
1044
|
+
snapshots. The approved disposition is to retire accounted-for recovery and
|
|
1045
|
+
completed-topic refs after the focused patches merge to staging, keeping old
|
|
1046
|
+
worktrees detached at their original commits so source and ignored material remain
|
|
1047
|
+
intact. Keep main/staging unchanged on the remote except for reviewed staging PRs.
|
|
1048
|
+
The old implementations remain recoverable; this is not proof of current device,
|
|
1049
|
+
store, live-provider or payment acceptance. No publication or deployment occurred.
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
## 2026-10-26: Progressive source additions for the complete stack
|
|
1053
|
+
|
|
1054
|
+
The public CLI now composes selected capability source after minimal Next.js/OpenNext/Workers + Anhedral UI initialization. The strict builder progression is Hono, then Drizzle/D1/Better Auth, followed by independently selected R2, Stripe, events, RTC, AI, Expo, native UI, RevenueCat, WXT, Side Panel and GPUI branches. See [the owning capability contract](capabilities.md). This extends the earlier thin UI work without adopting the separate native port or changing Platform’s immutable generator pin.
|
|
1055
|
+
|
|
1056
|
+
Validation on the isolated `codex/progressive-ui` checkout:
|
|
1057
|
+
|
|
1058
|
+
- CLI build and 114 unit tests passed; zero failed, one existing conditional skip. Eight addition regressions cover prerequisites, whole-plan collisions, JSONC/user edits, offline dry runs, symlinks, repeat additions, retained source and retry after install failure, client customization and file permissions.
|
|
1059
|
+
- CLI lint/typecheck, asset formatting, hygiene, security/release policy, plugin validation and OSV audit of 77 exact locked/catalog versions passed. Frozen braces/node-forge patch installation and Node/browser signature regressions passed.
|
|
1060
|
+
- Published package allowlist and installed-tarball smoke passed. The installed CLI initializes the minimal app, lists all 13 additions and installs Hono source with bundled capability references. No package was published.
|
|
1061
|
+
- A fresh `.artifacts/stack-acceptance` consumer installed all 13 additions through the normal CLI dependency/patch path. Its full `pnpm check` passed: lint, types, Fallow source/dead-code/duplication/health checks, dependency audit, tests and serial builds. Fallow reported zero above-threshold files and maintainability 94.3. The dependency audit retains raw reports and accepts only the existing reviewed node-forge patch; no advisory policy or quality threshold was weakened.
|
|
1062
|
+
- Builds produced the Next/OpenNext Worker, Hono Worker, iOS and Android Metro/Hermes bundles, Chromium MV3 popup/Side Panel/background and a native GPUI executable. GPUI uses upstream runtime shaders. The initial desktop format failure was corrected to Rust 2024 formatting before the full check. An exploratory Expo `--platform all` command requested unsupported web dependencies; the generated mobile build correctly targets iOS and Android, and both passed.
|
|
1063
|
+
- `node tests/test-capability-runtime.mjs .artifacts/stack-acceptance` passed against fresh in-memory Miniflare D1/R2 bindings. It generates SQL and explicitly applies only fixture migrations. Auth defaults remain disabled; a temporary fixture-only password opt-in proves real registration/session flows and is restored in `finally`. Checks cover owner-scoped storage, CSRF/forged bearer rejection, raw Stripe signatures through the actual generated Next proxy, tamper/environment rejection, scoped RevenueCat webhooks, durable duplicate receipts and resumable owner events. A forced clock-skew fixture verifies that atomic owner cursors increase monotonically, so later equal-millisecond or backward-clock events remain replayable.
|
|
1064
|
+
- Canonical billing fixtures made 12 intercepted local read requests, granting active access and rejecting cancellation, wrong identity/environment, expiry and provider outage. Unexpected outbound requests were zero. Unconfigured AI fails closed; RTC cross-user session and track operations are rejected before provider access. AI inference, RTC media and live billing services were not exercised.
|
|
1065
|
+
|
|
1066
|
+
After the recovery/cursor corrections, the real repeated-add dependency retry and `stack doctor` passed. Focused API lint, bundle, runtime and Fallow checks passed again.
|
|
1067
|
+
|
|
1068
|
+
Logs and runtime evidence are retained locally in `.artifacts/verification/2026-10-26-progressive-stack/`. Earlier dated failures and the separate native work are preserved. Source recipes and client builds do not establish live provider activation, physical device interaction, browser-store acceptance, native signing/distribution or production readiness. No provider resources, credentials, real payments, remote migrations, deployments, installed-plugin updates or Platform artifact adoption were performed. The PR remains a draft for review.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anhedral",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"description": "Start with Next.js and Anhedral UI, then progressively add APIs, data, clients, payments, realtime and AI as editable source.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -27,9 +27,11 @@
|
|
|
27
27
|
"docs/software-factory.md",
|
|
28
28
|
"docs/verification.md",
|
|
29
29
|
"docs/anhedral-stack.md",
|
|
30
|
-
"
|
|
31
|
-
"docs/
|
|
32
|
-
"
|
|
30
|
+
"assets/ui",
|
|
31
|
+
"docs/native-ui.md",
|
|
32
|
+
"docs/ui.md",
|
|
33
|
+
"assets/stack",
|
|
34
|
+
"docs/capabilities.md"
|
|
33
35
|
],
|
|
34
36
|
"homepage": "https://github.com/anhedral/anhedral-cli#readme",
|
|
35
37
|
"repository": {
|
|
@@ -73,16 +75,17 @@
|
|
|
73
75
|
"release:artifact:verify": "node scripts/verify-release-artifact.mjs .artifacts/release/metadata.json && node scripts/check-release-secrets.mjs .artifacts/release/metadata.json",
|
|
74
76
|
"release:artifact:smoke": "node tests/test-packed-cli.js .artifacts/release/metadata.json",
|
|
75
77
|
"test:standard": "pnpm build && node --test tests/test-standard.test.mjs",
|
|
76
|
-
"test:unit": "node
|
|
78
|
+
"test:unit": "node --test --test-concurrency=4 --test-reporter=spec tests/*.test.mjs",
|
|
77
79
|
"test:integration": "pnpm build && node tests/test-generated-apps.mjs",
|
|
78
|
-
"
|
|
79
|
-
"format": "prettier --
|
|
80
|
-
"
|
|
81
|
-
"plugin:
|
|
82
|
-
"plugin:check": "pnpm --dir plugins/codex/inspector check",
|
|
83
|
-
"plugin:preview": "pnpm --dir plugins/codex/inspector start",
|
|
80
|
+
"format": "prettier --write src scripts tests \"assets/patches/*.mjs\" assets/ui && node scripts/stack-template-format.mjs --write",
|
|
81
|
+
"format:check": "prettier --check src scripts tests \"assets/patches/*.mjs\" assets/ui && node scripts/stack-template-format.mjs",
|
|
82
|
+
"plugin:build": "node scripts/check-plugin.mjs",
|
|
83
|
+
"plugin:check": "node scripts/check-plugin.mjs",
|
|
84
84
|
"test:patch": "node tests/test-braces-install.mjs && node tests/test-forge-install.mjs",
|
|
85
|
-
"test:
|
|
85
|
+
"test:native-ui": "pnpm build && pnpm --dir tests/native-ui typecheck && pnpm --dir tests/native-ui test",
|
|
86
|
+
"native-ui:docs": "node scripts/native-ui-catalog.mjs --write",
|
|
87
|
+
"native-ui:upstream": "node scripts/native-ui-catalog.mjs --upstream",
|
|
88
|
+
"test:next-runtime": "pnpm build && node scripts/next-runtime-smoke.mjs"
|
|
86
89
|
},
|
|
87
90
|
"keywords": [
|
|
88
91
|
"cli",
|
|
@@ -94,8 +97,6 @@
|
|
|
94
97
|
"d1",
|
|
95
98
|
"r2",
|
|
96
99
|
"drizzle",
|
|
97
|
-
"stripe",
|
|
98
|
-
"revenuecat",
|
|
99
100
|
"turborepo",
|
|
100
101
|
"nextjs",
|
|
101
102
|
"opennext"
|
|
@@ -106,11 +107,11 @@
|
|
|
106
107
|
"@types/node": "20.19.43",
|
|
107
108
|
"hono": "4.13.13",
|
|
108
109
|
"prettier": "3.9.10",
|
|
109
|
-
"typescript": "5.9.3"
|
|
110
|
+
"typescript": "5.9.3",
|
|
111
|
+
"zod": "4.6.6"
|
|
110
112
|
},
|
|
111
113
|
"dependencies": {
|
|
112
114
|
"jsonc-parser": "3.3.1",
|
|
113
|
-
"yaml": "2.9.1"
|
|
114
|
-
"zod": "4.6.6"
|
|
115
|
+
"yaml": "2.9.1"
|
|
115
116
|
}
|
|
116
117
|
}
|
package/dist/access.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ApplicationProject } from './project-state.js';
|
|
2
|
-
import { type CloudflareRequest } from './cloudflare.js';
|
|
3
|
-
export interface AccessReceipt {
|
|
4
|
-
target: string;
|
|
5
|
-
workerId: string;
|
|
6
|
-
applicationId: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function validatePrivateAudience(project: ApplicationProject, root: string): void;
|
|
9
|
-
/** Protect the entire Worker, including every route and preview, before product code is deployed. */
|
|
10
|
-
export declare function reconcileAccess(root: string, project: ApplicationProject, request: CloudflareRequest, create: boolean): Promise<AccessReceipt[]>;
|