anhedral 0.11.2 → 0.13.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.
Files changed (102) hide show
  1. package/README.md +171 -18
  2. package/dist/bin.js +48 -493
  3. package/dist/capabilities.d.ts +3 -3
  4. package/dist/capability-contract.js +16 -1
  5. package/dist/cli-arguments.d.ts +8 -0
  6. package/dist/cli-arguments.js +32 -0
  7. package/dist/cli-commands.d.ts +3 -0
  8. package/dist/cli-commands.js +114 -0
  9. package/dist/cli-delivery.d.ts +3 -0
  10. package/dist/cli-delivery.js +172 -0
  11. package/dist/cli-output.js +231 -205
  12. package/dist/command-schema.js +8 -2
  13. package/dist/command.js +9 -11
  14. package/dist/delivery-evidence.d.ts +62 -0
  15. package/dist/delivery-evidence.js +186 -0
  16. package/dist/delivery.d.ts +3 -40
  17. package/dist/delivery.js +7 -182
  18. package/dist/dependencies.d.ts +7 -1
  19. package/dist/dependencies.js +15 -1
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.js +1 -0
  22. package/dist/mobile-delivery.d.ts +21 -44
  23. package/dist/mobile-delivery.js +127 -80
  24. package/dist/platforms/mobile.d.ts +1 -1
  25. package/dist/platforms/mobile.js +44 -3
  26. package/dist/project-state.js +4 -1
  27. package/dist/provider-auth.js +9 -3
  28. package/dist/providers/adapters.js +9 -3
  29. package/dist/providers/runtime.js +11 -0
  30. package/dist/readiness.js +4 -2
  31. package/dist/registry/add.js +40 -7
  32. package/dist/registry/options.js +12 -0
  33. package/dist/registry/presets.d.ts +4 -0
  34. package/dist/registry/presets.js +41 -0
  35. package/dist/registry/resolve.d.ts +3 -1
  36. package/dist/registry/resolve.js +40 -14
  37. package/dist/registry/types.d.ts +1 -0
  38. package/dist/registry/usage.js +1 -1
  39. package/dist/runtime-policy.js +4 -1
  40. package/dist/scaffold/api.js +10 -2
  41. package/dist/scaffold/auth.d.ts +1 -1
  42. package/dist/scaffold/auth.js +22 -6
  43. package/dist/scaffold/backend.d.ts +6 -0
  44. package/dist/scaffold/backend.js +224 -0
  45. package/dist/scaffold/billing-config.d.ts +1 -0
  46. package/dist/scaffold/billing-config.js +73 -0
  47. package/dist/scaffold/billing-contracts.d.ts +2 -0
  48. package/dist/scaffold/billing-contracts.js +48 -0
  49. package/dist/scaffold/billing-providers.d.ts +1 -0
  50. package/dist/scaffold/billing-providers.js +249 -0
  51. package/dist/scaffold/billing-schema.d.ts +1 -0
  52. package/dist/scaffold/billing-schema.js +34 -0
  53. package/dist/scaffold/billing-security.d.ts +1 -0
  54. package/dist/scaffold/billing-security.js +46 -0
  55. package/dist/scaffold/billing-server.d.ts +1 -0
  56. package/dist/scaffold/billing-server.js +139 -0
  57. package/dist/scaffold/billing-store.d.ts +1 -0
  58. package/dist/scaffold/billing-store.js +72 -0
  59. package/dist/scaffold/billing.d.ts +2 -0
  60. package/dist/scaffold/billing.js +216 -0
  61. package/dist/scaffold/cloudflare-services.d.ts +8 -0
  62. package/dist/scaffold/cloudflare-services.js +198 -0
  63. package/dist/scaffold/compose.js +2 -0
  64. package/dist/scaffold/database.js +19 -2
  65. package/dist/scaffold/documentation.js +11 -6
  66. package/dist/scaffold/expo-auth.d.ts +3 -0
  67. package/dist/scaffold/expo-auth.js +192 -0
  68. package/dist/scaffold/expo-billing.d.ts +3 -0
  69. package/dist/scaffold/expo-billing.js +292 -0
  70. package/dist/scaffold/expo-runtime.d.ts +3 -0
  71. package/dist/scaffold/expo-runtime.js +134 -0
  72. package/dist/scaffold/integrations.d.ts +2 -1
  73. package/dist/scaffold/integrations.js +7 -2
  74. package/dist/scaffold/stream.d.ts +2 -0
  75. package/dist/scaffold/stream.js +114 -0
  76. package/dist/scaffold/void.js +13 -5
  77. package/dist/scaffold/web.js +2 -0
  78. package/dist/scaffold/workspace.js +6 -1
  79. package/dist/service-readers.js +1 -1
  80. package/dist/services-command.js +8 -6
  81. package/dist/ship.d.ts +15 -15
  82. package/dist/ship.js +3 -1
  83. package/dist/stack-registry.d.ts +13 -2
  84. package/dist/stack-registry.js +152 -16
  85. package/dist/transaction-lock.d.ts +15 -0
  86. package/dist/transaction-lock.js +227 -0
  87. package/dist/transaction.js +2 -208
  88. package/dist/vercel-project.d.ts +101 -0
  89. package/dist/vercel-project.js +305 -0
  90. package/dist/vercel.d.ts +3 -36
  91. package/dist/vercel.js +3 -300
  92. package/dist/version.d.ts +1 -1
  93. package/dist/version.js +1 -1
  94. package/docs/anhedral-stack.md +122 -0
  95. package/docs/software-factory.md +402 -7
  96. package/docs/stack-standard.md +226 -49
  97. package/docs/verification.md +557 -0
  98. package/package.json +7 -7
  99. package/docs/cli-design.md +0 -67
  100. package/docs/plugin-ui.md +0 -102
  101. package/docs/provider-configuration.md +0 -116
  102. package/docs/void-verification.md +0 -185
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "anhedral",
3
- "version": "0.11.2",
4
- "description": "Build and deliver applications with Cloudflare-first Vinext, selected services, optional Next.js on Vercel, and verified release evidence.",
3
+ "version": "0.13.0",
4
+ "description": "Start with a minimal Expo app and progressively add Hono, identity, data and Cloudflare services.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -25,10 +25,8 @@
25
25
  "README.md",
26
26
  "docs/stack-standard.md",
27
27
  "docs/software-factory.md",
28
- "docs/void-verification.md",
29
- "docs/provider-configuration.md",
30
- "docs/cli-design.md",
31
- "docs/plugin-ui.md"
28
+ "docs/verification.md",
29
+ "docs/anhedral-stack.md"
32
30
  ],
33
31
  "homepage": "https://github.com/anhedral/anhedral-cli#readme",
34
32
  "repository": {
@@ -83,7 +81,9 @@
83
81
  "plugin:build": "pnpm --dir plugins/codex/inspector build",
84
82
  "plugin:check": "pnpm --dir plugins/codex/inspector check",
85
83
  "plugin:preview": "pnpm --dir plugins/codex/inspector start",
86
- "test:patch": "node tests/test-braces-install.mjs && node tests/test-forge-install.mjs"
84
+ "test:patch": "node tests/test-braces-install.mjs && node tests/test-forge-install.mjs",
85
+ "test:reference": "node tests/test-universal-reference.mjs",
86
+ "test:billing": "node tests/test-generated-billing.mjs examples/billing-reference"
87
87
  },
88
88
  "keywords": [
89
89
  "cli",
@@ -1,67 +0,0 @@
1
- # CLI behavior and design
2
-
3
- Anhedral uses three primary commands: `init` scaffolds source, `auth` checks or guides provider authentication, and `ship` provisions/configures the supported stack and coordinates delivery. `add`, `registry`, and `doctor` support development. Hosting selection and advanced release operations remain available through focused command help.
4
-
5
- The comparison below uses current upstream documentation and source inspected on October 12, 2026. These projects solve different problems; the useful comparison is how they make commands discoverable, changes reviewable, and failures understandable.
6
-
7
- | Reference | Useful practice | Anhedral behavior |
8
- | --- | --- | --- |
9
- | [shadcn CLI](https://ui.shadcn.com/docs/cli) and its [command source](https://github.com/shadcn-ui/ui/tree/main/packages/shadcn/src/commands) | Source ownership, command-specific help, working-directory selection, and previews before changing files | Bundled recipes scaffold owned source; focused help, `--cwd`, and `add --dry-run`, `--diff`, and `--view` support review |
10
- | [shadcn monorepos](https://ui.shadcn.com/docs/monorepo) | Resolve application and shared-package destinations coherently | The registry resolves dependencies and workspace references into `apps/*` and `packages/*`; additions preserve edited source and record provenance |
11
- | [GitHub CLI help](https://cli.github.com/manual/gh_help) | Discover commands through focused help topics | `anhedral help <command>` and `<command> --help` show the same options, examples, and relevant prerequisites |
12
- | [uv command reference](https://docs.astral.sh/uv/reference/cli/) | Consistent output controls and discoverable options | `--quiet` suppresses human output; `--json` retains one machine-readable result; errors remain on stderr |
13
- | [CLI Guidelines](https://clig.dev/) | Explain outcomes, suggest corrections, and show the next action | Human summaries describe selected parts, pending setup, release evidence, and next steps; command/flag typos receive bounded suggestions |
14
-
15
- Shadcn's entry point uses Commander and registers separate commands; its initialization separates preflight checks, configuration, templates, registry work, and source updates. Anhedral separates its command metadata, argument handling, human output, registry resolution, staged transactions, and provider operations. The existing provider verification and mutation boundaries remain in the operation modules. See [shadcn's entry point](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/src/index.ts) and [initialization implementation](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/src/commands/init.ts).
16
-
17
- ## Command definitions
18
-
19
- `src/command-schema.ts` declares command descriptions, option flags and aliases, required or optional values, and repeatable options. Command help and argument validation consume this same metadata; help text is never parsed to infer flag behavior. Singleton command options reject duplicates, required values reject missing input, and boolean options reject inline values without echoing those values. `--allow-email` remains repeatable; `add --diff` and `--view` accept an optional path. Command dispatch and domain-specific value validation remain in the operation handlers.
20
-
21
- ## Daily use
22
-
23
- ```sh
24
- anhedral init client-app --hono --neon --dry-run
25
- anhedral init client-app --hono --neon
26
- anhedral auth --cwd client-app
27
- anhedral ship --cwd client-app --dry-run
28
-
29
- anhedral add resend --cwd client-app --dry-run
30
- anhedral add resend --cwd client-app --diff
31
- anhedral add resend --cwd client-app --view packages/email/src/index.ts
32
- anhedral add resend --cwd client-app
33
-
34
- anhedral help ship
35
- anhedral registry view neon
36
- anhedral doctor --cwd client-app --json
37
- ```
38
-
39
- Complete the selected provider settings and connect the intended hosting account before delivery, as described in [provider configuration](provider-configuration.md). The commands above are examples, not authorization to deploy an application.
40
-
41
- `--cwd` / `-c` selects the working directory and resolves relative directory arguments from it. `init [directory]` scaffolds a workspace; `add <items...>` adds bundled parts to the current project. Use `anhedral --cwd <directory> add <items...>` to select a project explicitly.
42
-
43
- ## Output contract
44
-
45
- - Human output summarizes the operation and relevant next steps. Interactive scaffolding reports its current stage on stderr. Redirected output has no animated terminal effects or progress messages.
46
- - `--json` emits a complete result on stdout. Failures emit a JSON error, code, and next action on stderr with a nonzero exit status. Login prompts and scaffolding tool output are suppressed in machine mode.
47
- - `--quiet` / `-q` suppresses human results and progress, retaining errors. Combining it with `--json` retains the JSON result.
48
- - `--verbose` exposes local scaffolding tool output in human mode. Machine and quiet modes keep tool output suppressed.
49
- - Help and version checks do not require an existing project or a usable working directory. Unknown commands and flags fail before setup or provider operations; suggestions do not execute corrections.
50
-
51
- ## Source previews
52
-
53
- `add --diff [path]` shows an applicable unified patch. `add --view [path]` shows generated source. Both imply a dry run and use the existing staged transaction; neither installs the preview. Without a path, they show the changed generated files. Conflict reporting still applies; previewing a conflict does not permit overwriting edited source.
54
-
55
- Previews exclude private environment files and `.anhedral/` state. Public `env.example` (Void), `.env.example`, and `.dev.vars.example` templates can be inspected. Binary, nonregular, or files over 256 KiB are marked unavailable. The combined preview has a 1 MiB limit; select a file for larger additions. Diffs use a linear single-contextual-hunk implementation, including explicit handling of final newlines and new empty files.
56
-
57
- A selection that needs a new upstream web bootstrap cannot produce source previews offline. The CLI explains this and directs the user to the selection-only `--dry-run` plan, which marks `filesChecked: false`. It does not fabricate files or run a networked generator during that preview.
58
-
59
- ## Deliberate boundaries
60
-
61
- The public CLI accepts only bundled registry options. It does not accept external URLs, local third-party registries, or arbitrary remote content. It does not force overwrites, infer paid activation, or claim that scaffolding and authentication establish complete product behavior. Provider enrollment, permissions, DNS, billing eligibility, signing, and feature development remain explicit where required.
62
-
63
- Contract and local-flow tests establish command behavior, source preservation, machine output, and provider request/response handling. Live account provisioning and deployment require separate authorized verification. Release remains a separate review decision.
64
-
65
- ## Read-only project inspection
66
-
67
- `anhedral inspect [directory] --json` returns the shared versioned project-inspector contract used by the optional plugin UI. It reads bounded allowlisted local source and receipt files only, with independent errors for unavailable evidence. It does not contact providers, inspect credential values, migrate state or change files. It preserves per-target latest attempt and last successful release as separate facts. Authentication, permission and live provider health remain explicitly unknown. Read time does not make an old receipt fresh.
package/docs/plugin-ui.md DELETED
@@ -1,102 +0,0 @@
1
- # Anhedral project dashboard
2
-
3
- Anhedral is headless-first: describe the application to Codex, review the selected stack, develop its features, authenticate to your providers and ship through the CLI. The optional dashboard starts with the same local evidence available from `anhedral inspect --json`. Opening it or refreshing the project performs no provider calls. Explicit service controls request live status, analytics or data through the shared CLI adapters.
4
-
5
- Building or packaging the plugin does not install or publish it. Actual Codex host rendering and composer behavior require separate verification; protocol tests do not establish those behaviors.
6
-
7
- ## Project lifecycle
8
-
9
- The overview begins with **Init → Auth → Ship**, derived by the same inspector used by the CLI. Init reports supported Anhedral configuration and local structural readiness. Auth lists selected providers and recorded account references; these are not proof of a valid session, permission or billing eligibility. Ship summarizes per-target success receipts and flags incomplete operations, conflicts and deletion history. A recorded success does not establish current source or live health.
10
-
11
- Review source, provider access and shipping plan prepare unsent Codex drafts. They do not run commands directly. The workflow is equally usable through the headless CLI. Services remain a secondary, project-scoped view. Registering an arbitrary directory does not adopt its stack or activate lifecycle actions; supported Anhedral configuration must exist. There is no separate Anhedral account or hosted control plane.
12
-
13
- ## Screens and evidence
14
-
15
- | Screen | Information | Evidence boundary |
16
- | --- | --- | --- |
17
- | Overview | Project identity, stack selection, per-target latest attempt and last success | Recorded results; not live health or feature acceptance |
18
- | Services | Application targets, configured bindings, provisioning receipts and selected integrations | Local inventory plus explicitly requested live readings; receipt matching uses resource kind and identifiers |
19
- | Stack | Workspace package dependencies, declared bindings, environment names and cron expressions | Package dependencies do not prove network calls; declarations do not prove resource existence |
20
- | Setup | Local prerequisites, selected providers, capability limits and setup guidance | Authentication, selected-account permission and billing remain not checked |
21
- | Delivery | Separate Cloudflare, Vercel and mobile records; integration pending outcomes and latest operation | One provider's success does not establish another's; old running records do not prove a process is active |
22
-
23
- Service controls expose only implemented readers; there is no schedule-execution reader. Environment names come from example files and reveal no values or proof of secret validity. Mobile download URLs may contain access tokens and are excluded; validated Expo build-page links may be displayed. Missing record timestamps and project identity are unavailable rather than invented.
24
-
25
- Every section is bounded and validated independently. A corrupt provider journal must not hide another target's valid evidence. Read time is explicitly distinct from receipt time. Configured, recorded and unknown states must remain distinguishable. General secret files, provider credential vaults, runtime state, raw diagnostics and absolute source paths are excluded from the UI projection.
26
-
27
- ## Interactions
28
-
29
- New project opens a new composer with this prompt, without sending: “Create a new project using [@Anhedral](plugin://anhedral@anhedral). Start by explaining the stack and asking me what it should be about.” Setup and delivery actions prepare unsent drafts for the current conversation. The user reviews and sends the request before Codex acts. Unsupported hosts offer copyable text. Project selection updates authorized model context; it does not execute commands.
30
-
31
- Refresh reloads local files only. Rename and forget affect only local catalog metadata, never project source or provider resources. There is no project-creation or registration dialog. Successful `anhedral init` automatically registers its generated source in the local catalog. Existing sources can be registered through the local operator command. MCP tool inputs accept project IDs rather than arbitrary filesystem paths.
32
-
33
- ## Installation
34
-
35
- Install with `codex plugin marketplace add anhedral/anhedral-cli`, then `codex plugin add anhedral@anhedral`. The marketplace references `plugin-v<version>` in the same repository. The release workflow creates this immutable tag from the verified ZIP, including its generated runtime; the development source directory alone is not an installable release. Plugin source tags retain the reviewed release commit as their parent. Existing tags cannot be replaced by the release workflow.
36
-
37
- ## Local development
38
-
39
- The UI toolchain requires Node 22.13+ within Node 22, or Node 24+. The CLI retains its separately documented engines.
40
-
41
- ```sh
42
- pnpm install --frozen-lockfile
43
- pnpm --dir plugins/codex/inspector install --frozen-lockfile
44
- pnpm build
45
- pnpm plugin:check
46
- pnpm --dir plugins/codex/inspector exec playwright install chromium
47
- pnpm --dir plugins/codex/inspector test:browser
48
- ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" node plugins/codex/inspector/dist/server.mjs register "$PWD" "Anhedral"
49
- ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" pnpm plugin:preview
50
- ```
51
-
52
- Open `http://127.0.0.1:4317/`. The preview binds only to loopback, validates Host/Origin, bounds requests and uses a restrictive content security policy. `anhedral inspect [directory] --json` provides the shared read-only projection directly. `anhedral registry capabilities --json` explains the supported automation and owner steps.
53
-
54
- `src/project-inspector.ts` owns projection; `src/catalog-snapshot.ts` adds catalog identity. The browser only renders its validated schema. The MCP server exposes `open_projects`, `list_projects`, `get_project`, `get_project_services`, local metadata tools and model-only source/catalog context tools. They remain useful without UI rendering. Standard MCP Apps resources and bridge messages provide the optional panel, host themes and inline/fullscreen modes. Native host-specific draft support is a separate acceptance gate.
55
-
56
- The plugin and standalone CLI share one private catalog. List views read bounded summaries; only a selected project loads detailed inspection. The server does not scan for other projects. CLI initialization registers new apps using the persistent `identity.id` in `anhedral.json`; recreating a directory creates a separate app rather than silently retargeting an old catalog entry. A remote server cannot inspect these local directories without a separately reviewed architecture; never publish the local catalog through a tunnel.
57
-
58
- ## Recovery and release review
59
-
60
- Interrupted catalog writers can be inspected and recovered with the same private catalog directory:
61
-
62
- ```sh
63
- ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" node plugins/codex/inspector/dist/server.mjs recover-catalog-lock
64
- ```
65
-
66
- Only a proven dead same-host owner permits recovery. Live, foreign, malformed and uncertain owners remain blocked. Recovery changes catalog access only, not provider work or delivery state.
67
-
68
- Build/package checks bind the runtime and self-contained browser HTML to source and CLI version. Exact ZIP protocol tests exercise resources, schemas and headless tools. Before publication, verify native host entrypoints, unsent drafts, theme/reload behavior, all supported sections, keyboard navigation and narrow screens against the exact rebuilt ZIP. Publication remains a separate reviewed action.
69
-
70
- The design follows the official [optional UI guidance](https://developers.openai.com/plugins/concepts/plugins#optional-ui) and [MCP Apps foundation](https://developers.openai.com/plugins/build/chatgpt-ui#start-with-mcp-apps).
71
-
72
- ## Live service capabilities
73
-
74
- Live readings require the selected provider account and resource permissions. Missing access, unavailable providers and absent resources are distinct from a successful reading. Analytics show their source, UTC window and sampling status; recorded deployment success does not imply current health.
75
-
76
- | Service | Status | Analytics | Data | Confirmed deletion |
77
- | --- | --- | --- | --- | --- |
78
- | Cloudflare Worker | Settings existence | Requests, errors and CPU quantiles | — | — |
79
- | D1 | Resource identity and current storage | Daily query/row counts and latency | Bounded table pages | Project-created, unshared resources |
80
- | KV | Resource identity | — | Paginated key metadata; no values | Project-created, unshared resources |
81
- | R2 | Bucket identity | — | Paginated object metadata; no contents | — |
82
- | Queues | Resource identity | — | — | — |
83
- | Vercel | Project/deployment status | Daily Web Analytics | — | — |
84
- | Neon | Project identity | — | Bounded public-table pages | — |
85
- | PostHog | Project identity | Hourly events and distinct IDs per bucket | — | — |
86
- | Clerk, Resend, Stripe, RevenueCat, Sentry, OpenAI | Selected integration identity | — | — | — |
87
-
88
- Neon browsing requires `ANHEDRAL_NEON_READONLY_URL`, optionally suffixed with the uppercase project ID (hyphens replaced by underscores). The endpoint must belong to that project. Each read transaction verifies a restricted role and read-only mode. Sensitive columns are masked before fetching; arbitrary SQL is not accepted.
89
-
90
- R2 metadata browsing requires bucket-scoped read-only S3 credentials in `ANHEDRAL_R2_ACCESS_KEY_ID` and `ANHEDRAL_R2_SECRET_ACCESS_KEY`, optionally suffixed with the uppercase account ID. The reader signs only the selected account/bucket request and never downloads object contents.
91
-
92
- Data rows, table names and deletion confirmation tokens are returned through private app metadata rather than model-visible MCP results. CLI data output is explicit user-requested output. Data views mask sensitive fields and do not provide an unmask control. D1 and Neon project bounded columns and mask sensitive columns in SQL before fetching rows; empty tables retain their schema. Database pages use explicit ordering, but concurrent writes can still change offset-based pages. KV and R2 metadata pages use provider cursors.
93
-
94
- Deletion is intentionally limited to D1 and KV. Review shows the exact account, resource, affected applications and impact. The user must type the resource name. The server requires a short-lived, single-use token, revalidates source and provider identity, and rejects adopted resources or detected external Worker consumers. Provider reads cannot provide an atomic lock against another operator changing remote dependencies.
95
-
96
- A deletion request is never automatically retried. Confirmed absence is required to report success. Pending or uncertain outcomes remain recorded across reloads and block automatic reprovisioning. Source bindings remain for explicit review before shipping; removing a service does not silently rewrite application code. This implementation does not delete whole applications or provider accounts.
97
-
98
- The CLI shares these adapters: `anhedral services list --json` lists exact selectors; `anhedral help services` describes status, metrics, tables, data and the two-step deletion flow. No service operation provisions resources, changes billing or deploys code.
99
-
100
- The catalog defaults to `~/.local/share/anhedral/projects`; `ANHEDRAL_PLUGIN_DATA` selects an alternate directory and `ANHEDRAL_DISABLE_CATALOG=1` disables initialization registration. A catalog failure leaves successfully generated source intact and reports a registration recovery action.
101
-
102
- The inspector source lives in `plugins/codex/inspector`; the installable plugin source lives in `plugins/codex/distribution`. Packaging reads that directory and emits a self-contained ZIP. Immutable `plugin-v*` release tags retain the public `plugins/anhedral` installation path used by the marketplace; the publication script builds that tree from the verified ZIP. That release path is independent of the development checkout layout.
@@ -1,116 +0,0 @@
1
- # Provider configuration
2
-
3
- Anhedral scaffolds source, guides authentication, and provisions and configures the selected stack before deployment. The application and accounts belong to the developer or client. Feature development, design, custom integrations, and ongoing maintenance are Anhedral's services.
4
-
5
- ## Setup
6
-
7
- 1. Run `anhedral init <directory> <stack-flags>`. Review the generated source and install dependencies.
8
- 2. Fill in the `providers` section of `anhedral.json`. It contains only selected integrations, nonsecret resource names, account identifiers, regions, and desired webhook settings. Empty account/domain fields require an explicit choice. Commit this file with the application source. To use an existing resource, set its ID instead of requesting a new project by name.
9
- 3. Supply management credentials through the process environment and run `anhedral auth <directory>`. `--status` performs checks without opening login. Cloudflare, Vercel, and Expo support interactive CLI login; API integrations show their required credentials. A successful read does not prove every write permission.
10
- 4. Connect the intended hosting account, project, plan, and audience using `anhedral connect`. Review and commit the connection manifest. Expo uses the explicit `owner` and `slug` in `apps/mobile/app.json`.
11
- 5. Inspect `anhedral registry capabilities --json` for implemented scope and evidence limits, then inspect `anhedral ship <directory> --dry-run`. It reports missing provider settings without login, network requests, writes, provisioning, or deployment. Run `ship` after reviewing the plan and authorizing the provider operations.
12
-
13
- The manifest uses a typed, provider-specific configuration contract. It rejects unsupported providers, foreign fields, unknown enum choices, and duplicate webhook events before network operations. Empty fields are accepted for scaffolding but must be completed when required for provisioning. The exported `PROVIDER_CONFIGURATION_SCHEMA` matches these fields and enums; no generated `$schema` URL is currently installed in projects.
14
-
15
- Authentication results label verified access as `session`, `management`, or `runtime`; unsuccessful checks use `none`. Clerk and OpenAI management credentials take precedence over runtime credentials. A runtime probe is never reported as management access. Vercel and Expo session probes require bounded, single-identity output from the pinned CLI; diagnostic paragraphs do not count as a session. These probes do not verify the selected project, all write permissions, account enrollment, or remaining owner prerequisites.
16
-
17
- Management keys do not belong in this manifest or application source. Runtime credentials returned by providers are configured in ignored application environment files and private `.anhedral/` state. API errors and CLI results omit credential values. Never attach this private state to an issue or commit it.
18
-
19
- ## Adapters
20
-
21
- | Provider | Management credential | Automated configuration | Owner prerequisites and remaining application work |
22
- | --- | --- | --- | --- |
23
- | Neon | `NEON_API_KEY` | Create or select an explicitly scoped organization/project; check outstanding operations; obtain the selected database/role's pooled connection URI; configure the server runtime environment; migration credentials are configured separately | An eligible account/region; reviewed schema and migrations; application data access |
24
- | Clerk | `CLERK_PLATFORM_API_KEY` | Verify the selected workspace; create or select an application and environment; retrieve its matching publishable and secret keys | Platform API access; production domain/DNS/OAuth setup; application authorization. `CLERK_SECRET_KEY` alone verifies runtime access and cannot create an application |
25
- | Resend | `RESEND_API_KEY` with management access | Create or select the explicit sending domain; request verification; report required DNS records; issue a domain-scoped sending key only after verification | Domain ownership and DNS publication/propagation; sending eligibility; templates and delivery behavior |
26
- | Stripe | `STRIPE_SECRET_KEY` | Verify the explicit account and test/live key mode; configure a webhook with explicitly listed events when requested; securely retain its signing secret | Account activation for live payments; product/price decisions and webhook handlers. Provisioning does not invent a billing model or create financial commitments |
27
- | RevenueCat | `RC_API_KEY` with v2 configuration access | Create or select a project; create/select iOS, Android, or connected Stripe apps; retrieve platform public SDK keys | Store credentials or Stripe account connection; products, offerings, entitlements, SDK installation, and purchase verification |
28
- | Sentry | `SENTRY_AUTH_TOKEN` | Select organization/team/project; create a project if absent; verify the team/platform; select a single active client key or create one if absent; configure DSN | Appropriate organization/team permissions; platform SDK initialization, source maps, privacy filtering, and alerts |
29
- | PostHog | `POSTHOG_PERSONAL_API_KEY` | Select US/EU region and organization; create/select a project; retrieve its ingestion key and matching ingestion host | Project permissions; product events, privacy/consent rules, and SDK initialization. Personal management keys never become ingestion keys |
30
- | OpenAI | `OPENAI_ADMIN_KEY` | Create or select an active project; create a named service account; retain its one-time runtime key privately | Organization administration access, provider billing eligibility, limits, and application AI behavior. `OPENAI_API_KEY` alone cannot create projects |
31
-
32
- The adapters implement a bounded scaffolding setup, not every administration endpoint a provider exposes. Account enrollment, required billing acceptance, DNS ownership, OAuth consent, store enrollment, and product-specific design remain explicit owner steps. Provisioning success does not certify those steps or finished product functionality.
33
-
34
- ### Example manifest
35
-
36
- For a selected Hono + Neon + PostHog stack, the `providers` section contains the following value. Keep the other `anhedral.json` sections intact:
37
-
38
- ```json
39
- {
40
- "schemaVersion": 1,
41
- "providers": {
42
- "neon": {
43
- "name": "customer-app",
44
- "organizationId": "org-example",
45
- "region": "aws-us-east-1",
46
- "database": "app",
47
- "role": "app_owner"
48
- },
49
- "posthog": {
50
- "name": "customer-app",
51
- "organizationId": "00000000-0000-0000-0000-000000000000",
52
- "region": "eu"
53
- }
54
- }
55
- }
56
- ```
57
-
58
- Replace example organization IDs with the intended account's actual identifiers. Existing resources use `projectId`; Clerk uses `applicationId` and `workspaceId`; Resend uses `domainId`; RevenueCat can select `iosAppId`, `androidAppId`, or `webAppId`. New RevenueCat native apps use `bundleId` / `packageName`; a new Stripe app requires a previously connected `stripeAccountId`. Sentry selects `organization`, `team`, `project`, and `platform`. Stripe requires `accountId` and `mode`; optional `webhookUrl` must use HTTPS and `webhookEvents` must explicitly name the handled events. A webhook endpoint and handler must already be designed before registering it.
59
-
60
- ## Delivery and retries
61
-
62
- For new supported Cloudflare workspaces, Void owns resource provisioning and deployment; Anhedral does not run its resource creator in parallel. Explicit resource declarations remain in `anhedral.cloudflare.json`, and Void records resolved identities in `void.lock.json`. Explicit OpenNext, queue/DLQ and Basin selections use Wrangler. Wrangler provisioning reconciles D1, private R2 buckets, KV, Queues, and private JSON Basin streams. Basin HTTP ingestion stays disabled; the Worker binding is enabled. Sinks and transformations require application-specific design. Durable Objects, schedules, Workflows, and Workers AI bindings are configured through Worker deployment. Hyperdrive configurations added by a developer still require an explicit provider workflow.
63
-
64
- If Wrangler resource provisioning changes tracked binding IDs, `ship` returns `configuration-required` before deployment. Void may already activate targets before writing new resource identities to their locks. When only the expected `void.lock.json` files change, it retains the activation receipts and returns `configuration-required`; live product verification remains blocked. Review and commit the changed bindings or locks, then ship the clean configuration. It never commits code automatically. Pending Neon operations or unverified Resend DNS return `provider-configuration-required` and stop deployment. The configured integrations' remaining product setup appears in their results.
65
-
66
- Review the generated database schema and apply the selected database migrations before testing application features or authentication. Generated tables and SDK factories are starting points; provisioning resources does not migrate the application database or implement its authorization rules.
67
-
68
- For selected Better Auth applications, shipping first reads `BETTER_AUTH_SECRET` and `BETTER_AUTH_URL` from the primary server's ignored, untracked runtime file (`.env` for Void, `.dev.vars` for Wrangler Workers, `.env.local` for native Vercel). Configure a generated nonplaceholder secret of at least 32 characters and the intended HTTPS public origin. On POSIX systems this file must have mode `0600`; keep equivalent private file access on other systems. Tracked or symlinked files, broad file permissions, missing values, placeholder secrets, and unsafe origins stop shipping before provider mutations. Wrangler cannot deploy a same-named plain variable and secret; authentication credentials belong only in the private runtime file. The preflight does not generate a secret, choose a domain, modify files, configure OAuth, or verify application-user authorization.
69
-
70
- Void selects direct Cloudflare delivery explicitly and uploads server runtime credentials using noninteractive `void secret put` with stdin before publication. Values never appear in command arguments; public `VITE_*`, `NEXT_PUBLIC_*` and `EXPO_PUBLIC_*` build variables are excluded from these uploads. The pinned Vinext plugin loads the app `.env` for local builds and maps `NEXT_PUBLIC_*` into client bundles. Supply public values in the selected production build environment; uploading server secrets does not configure client bundles. Its separate Cloudflare process receives the verified API token or Wrangler OAuth credential only through the child-process environment. A secret update is a provider mutation even if the subsequent build or deployment fails. Wrangler Cloudflare delivery uploads runtime credentials with the code using Wrangler's `--secrets-file`; its private temporary credential files are removed after the operation. Vercel configures only the selected web runtime's production environment, checks every returned result for success, and then performs the checked deployment. In mixed Vercel/Cloudflare projects, default `ship` coordinates Cloudflare services first, then the Vercel web application under one operation lock. `ship --provider cloudflare` or `ship --provider vercel` explicitly selects only that hosting target. A setup gate stops before the dependent web deployment. If Cloudflare completes and Vercel fails, the result is partial; no atomic provider or data rollback is attempted. Repeating `ship` rechecks both targets and reuses provider receipts where available; it does not skip completed phases merely because the diagnostic operation journal says they completed.
71
-
72
- Shipping records nonsecret phases and outcome in ignored `.anhedral/operation.json`. This is a diagnostic journal, not a resumable transaction or proof of live product behavior. `status --json` and the dashboard can show the recorded operation; resource replay protection remains in the provider journals and deployment/build receipts. A new run records a new operation and revalidates current prerequisites.
73
-
74
- Creation receipts are saved immediately in ignored `.anhedral/providers.json`. Schema 2 keeps minimal creation identities and status there; supported one-time credentials are stored separately in ignored `.anhedral/provider-credentials.json` with private file permissions. Subsequent runs verify existing resources and reuse saved credentials. Ignored `.anhedral/runtime.json` contains deployment runtime values and must also remain private. A confirmed 4xx rejection can be retried after access is corrected. A timeout, malformed success response, rate limit, or server error can leave an unknown creation outcome: the CLI stops rather than replaying the mutation. Inspect the provider and preserve a secure backup of the receipt before reconciling the pending operation. Desired configuration changes also stop and require reconciliation. Never remove state blindly to bypass this check.
75
-
76
- Read-only API requests retry bounded transient failures (429, 502, 503, 504, transport interruptions and timeouts) within a 30-second overall deadline, with at most three attempts. Short provider retry delays are respected; longer delays return an actionable failure instead of retrying early. Invalid or oversized JSON is not retried. Mutating POST/PATCH requests are never replayed automatically, including requests carrying an idempotency key.
77
-
78
- Keep secure backups of `.anhedral/` and runtime environment files when moving machines. A fresh clone does not carry one-time credentials or provisioning receipts. Configure explicitly selected existing resource IDs and recover runtime credentials through authorized provider tooling rather than treating it as the original provisioning session. The CLI does not automatically delete, rotate, or replace resources. `integrations status` reads the journal without writes. `integrations recover --provider <provider> --operation <exact hash> --resource <id>` verifies a supported existing resource against the unchanged recorded configuration, then writes only its local completion receipt. It never recreates or deletes a provider resource. Recovery is unavailable for pending entries without operation metadata, changed desired configuration, and one-time credential creation when the original credential is missing; inspect the provider and retain secure backups. RevenueCat application recovery requires the parent project ID recorded explicitly in the original configuration.
79
-
80
- ```sh
81
- anhedral integrations status my-app --json
82
- anhedral integrations recover my-app --provider neon --operation <exact-64-character-hash> --resource <verified-project-id> --json
83
- ```
84
-
85
- Copy the operation hash from status and supply the intended resource ID yourself. Supported recovery checks cover known Neon projects, Clerk applications/workspace/environment, Resend domains, PostHog projects/organizations, active OpenAI projects, Sentry projects/teams/platform, and RevenueCat projects or explicitly scoped apps. They perform provider GET requests and then update only the local completion receipt. Status does not write journals or create directories. It shows missing descriptors and one-time-credential operations as blocked. Resend sending keys, Stripe webhook signing secrets, and OpenAI service-account keys cannot be recovered from a resource ID alone; securely retained credentials and explicit provider inspection are required. Never paste credentials into the command or conversation.
86
-
87
- ## Mobile delivery
88
-
89
- Use `anhedral ship <directory> --platform ios|android --profile <profile>`. Set the intended Expo `owner` and `slug` in static `apps/mobile/app.json`. The pinned EAS CLI creates/links the project when needed, then stops for review and a source commit. Subsequent builds independently check the linked project identity. Inherited profiles require explicit resolution before automatic delivery.
90
-
91
- Only public mobile keys are uploaded to the selected EAS environment; server credentials are excluded. Queued builds return a build-page link and `building` state. Repeat the same command to inspect the saved build ID without creating another build. Completed builds must match the selected project and source commit before returning the download link. Failed/cancelled builds require provider inspection before removing the pending record and requesting another build.
92
-
93
- Android preview builds produce APKs; production builds produce AABs. iOS simulator artifacts need no device signing; signed iOS builds need the developer's Apple credentials and enrollment. Anhedral never runs `eas submit`. Store uploads and approvals belong to the owner.
94
-
95
- ## Verification scope
96
-
97
- Local contract tests cover selected-stack planning, API request/response shapes, resource reuse, one-time credentials, account mismatch, pending operations, DNS gates, unknown outcomes, private file safety, runtime partitioning, and deployment handoff. These tests do not establish live account eligibility, quota, permissions, billing, DNS, signing, or production product behavior. Verify those in explicitly authorized accounts before release.
98
-
99
- Provider contracts: [Neon API](https://api-docs.neon.tech/reference/createproject), [Clerk Platform schema](https://github.com/clerk/openapi-specs/blob/main/platform/beta.yml), [Resend API](https://resend.com/docs/api-reference/introduction), [Stripe API](https://docs.stripe.com/api), [RevenueCat API v2](https://www.revenuecat.com/docs/api-v2), [Sentry API](https://docs.sentry.io/api/), [PostHog API](https://posthog.com/docs/api), [OpenAI administration](https://developers.openai.com/api/reference/resources/admin/), [Cloudflare secrets](https://developers.cloudflare.com/workers/configuration/secrets/), [Vercel OpenAPI](https://openapi.vercel.sh), and [pinned EAS source](https://github.com/expo/eas-cli/tree/v21.0.1/packages/eas-cli/src/commands).
100
-
101
- ## Authorized staging acceptance
102
-
103
- Use a dedicated, explicitly selected account/project for live verification. Before the first mutation, record its owner, region, resource names, permitted operations, spending limit, cleanup responsibility, and retention period in the application's verification notes. Never use production credentials for routine tests or treat access to an account as permission to incur unspecified costs.
104
-
105
- For each selected provider, verify the following against the exact candidate CLI:
106
-
107
- 1. Missing, expired, and insufficient credentials produce an actionable state without leaking keys or starting creation.
108
- 2. The selected account, organization, environment and region match the manifest before provisioning.
109
- 3. First creation and repeated configuration use the intended resources, with no duplicate creation.
110
- 4. Pending DNS, provider operations or enrollment produce an explicit blocked state before deployment.
111
- 5. An interrupted or unknown creation outcome preserves evidence and stops automatic replay; recovery requires inspected provider state.
112
- 6. Runtime credentials reach only their intended server or public client target. Check runtime access through a bounded application flow, without publishing the credential value.
113
- 7. The actual deployed service or build matches the selected project and checked source commit. Test its promised user flow independently of build success.
114
- 8. Record provider/resource IDs, source revision, nonsecret verification results, unresolved owner steps, and cleanup results. Keep credential files and complete provider responses out of public logs and issues.
115
-
116
- A completed local contract test, an accessible API endpoint, a created resource, a successful deployment, and a verified product flow are separate evidence levels. Release notes must name the level actually established; do not promote one to another.
@@ -1,185 +0,0 @@
1
- # Void delivery verification
2
-
3
- This records the implementation's evidence and remaining acceptance work. It is not a release certificate. Update the live results when an operation completes; retain sanitized target/version identifiers and actual acceptance results rather than diagnostic output.
4
-
5
- ## Version contract
6
-
7
- - Anhedral development checkout: `anhedral@0.11.1`.
8
- - Direct Cloudflare delivery: exact `void@0.27.0`.
9
- - Void runtime requirement: Node `>=24.21.0` (checked before execution).
10
- - Workspace package manager: `pnpm@10.34.5`.
11
- - The published Void package distribution and its bundled documentation were inspected. Installed executable version and app dependency pin must agree.
12
-
13
- Current Cloudflare configuration requires an explicit `deliveryEngine` in the `cloudflare` section of `anhedral.json`. Supported Void profiles select `void`; explicit OpenNext, Queues/DLQ and Basin profiles select `wrangler`. Missing or unsupported markers are rejected. No existing-project migration workflow is provided.
14
-
15
- ## Historical local evidence: initial Void integration
16
-
17
- These results describe the earlier integration snapshot. They do not certify the current uncommitted candidate; subsequent local reviews are recorded in the repository’s `docs/verification.md` and `docs/codebase-review.md`.
18
-
19
- The initial Void/coherence local CLI suite passed **608 of 608 tests**, with zero failures. The inspector suite passed **60 of 60 tests**. Build, typecheck, formatting, source hygiene, static security policy, packed CLI smoke and package allowlist checks passed. The corrected OSV audit passed for **85 unique locked and direct-catalog package versions**; the inspector dependency audit also reported no known vulnerabilities. This does not audit every generated application’s transitive dependency graph.
20
-
21
- The normal generated combined workspace installed **395 packages** without extra harness dependency pins. Actual fresh builds passed for **Vinext 1.1.0 with Void 0.27.0** and **Hono**. Workerd returned HTTP 200 for rendered HTML, its client asset, API health and OpenAPI. A separate services profile covered D1/R2/KV/AI plus cron build/preview gates; the compiled scheduled handler was preserved and invoked successfully. Readiness responses contained an actual Worker version UUID.
22
-
23
- Wrangler applied the generated local D1 migration `0000_better_auth` (10 commands). The shared Better Auth/D1 runtime passed signup, login, cookie/session lookup, incorrect-password HTTP 401, logout and session revocation through `tests/test-void-local-auth.mjs`. These are actual local runtime checks rather than mocked provider tests. They do not prove Cloudflare provisioning, production secrets, visitor Access policy enforcement or remote rollback.
24
-
25
- The earlier generated dependency audit passed with a local `braces` backport and `fflate@0.7.5`; its raw advisory report still contained one high finding. The bundled backport system has since been removed at the owner’s request. A subsequent owner-approved change adds one narrowly scoped standard pnpm patch for `braces@3.0.3`, while retaining the upstream pnpm audit report and all advisory findings. The owner subsequently approved a verification gate for the one exact patched advisory, described below. The earlier backport audit gate remains removed; its result does not establish a passing audit for newly generated applications.
26
-
27
- Additional regression coverage includes non-object JSONL records, canonical configuration/lock merging, and resolved bindings with authored placeholders. The final integrated count above includes this regression coverage.
28
-
29
- The automated checks cover the pinned JSONL receipt format, rejection of stale/foreign/incomplete/ambiguous receipts, independent provider version confirmation, source cleanliness, explicit current engine validation, private policy reconciliation, and the lock-review checkpoint. Mocked Cloudflare responses establish control flow; they do not establish provider/runtime compatibility.
30
-
31
- ## Deployment evidence contract
32
-
33
- Void 0.27.0 writes a new `~/.void/logs/deploy-*.jsonl` per invocation. Anhedral requires exactly one new matching log with:
34
-
35
- 1. A `deploy_start` record identifying the exact target working directory and a timestamp after invocation began.
36
- 2. One `cloudflare_deploy_end` record with `ok: true`, the expected Worker name and a complete version ID.
37
- 3. A final `deploy_end` record with `ok: true`.
38
-
39
- This contract was inspected in the published distribution, rather than inferred from console prose. The recorded version must independently own 100% of current Cloudflare traffic. Application source and configuration are checked before and after deployment. Void's direct Cloudflare log does not contain a Git commit annotation; Anhedral correlates the checked invocation and its receipt with the clean source commit. Missing or ambiguous logs stop acceptance even when provider changes may have occurred.
40
-
41
- Application URLs require provider evidence: enabled Workers subdomain plus account subdomain, or a matching custom-domain assignment. Private Access policies are checked before and after activation. Selected resource identities and private R2 exposure are independently inspected after Void resolves resources.
42
-
43
- Void lock changes are expected on initial provisioning. If only the allowed target `void.lock.json` files change, activated version receipts are retained with release state `configuration-required`. Review and commit those files, then ship the clean configuration. Such a checkpoint cannot pass `verify` or serve as a complete rollback release. Arbitrary source changes still fail delivery. Database migrations remain applied during code rollback.
44
-
45
- ## Reproduce local checks
46
-
47
- From the CLI repository:
48
-
49
- ```sh
50
- pnpm build
51
- pnpm typecheck
52
- node --test tests/test-void-state.test.mjs tests/test-void-execution.test.mjs tests/test-void-migrations.test.mjs tests/test-delivery.test.mjs tests/test-delivery-lock.test.mjs tests/test-ship.test.mjs
53
- pnpm test:unit
54
- ```
55
-
56
- Use the repository's installed Node/pnpm versions. Avoid concurrent builds because the build script replaces shared `dist/` output.
57
-
58
- ## Live acceptance
59
-
60
- Customer Cloudflare authentication succeeded using workspace-scoped Wrangler state. No credential contents belong in this document. A reproducible authentication pattern is:
61
-
62
- ```sh
63
- XDG_CONFIG_HOME="$PWD/.anhedral/cloudflare-auth" pnpm exec wrangler login
64
- XDG_CONFIG_HOME="$PWD/.anhedral/cloudflare-auth" pnpm exec wrangler whoami --json
65
- ```
66
-
67
- The actual Void authentication bridge also succeeded against the customer account with `accountConfirmed: true`. Credentials were supplied through the child-process environment, and no credential was persisted by the bridge. This is read-only authentication evidence, not deployment evidence.
68
-
69
- The source-coherence review removed obsolete release helpers, diagram assets, stale plugin wrappers and duplicate dependencies; fixed bounded inspection of resolved Void locks; and brought CI runtimes and delivery documentation in line with the implementation. Browser UI acceptance was attempted but could not launch Chromium because the host denied its macOS Mach-port registration. The browser suite remains unverified in this environment. Hosted CI on commit `06bce77173cd8a122a35c3e04a7e210e4fd9d78c` subsequently passed the dashboard browser suite, both plugin checks, four CLI test lanes, eight macOS/Windows portability jobs and CodeQL. That evidence applies to that commit; subsequent changes require their own checks.
70
-
71
- The executable read-only live preflight was also run using the workspace-scoped login. It exited with status 1 and structured `providerMutations: false`, `ready: false` before any cloud writes. Reproduce against the intended customer account and an existing generated fixture:
72
-
73
- ```sh
74
- XDG_CONFIG_HOME="$PWD/.anhedral/cloudflare-auth" \
75
- WRANGLER_LOG_PATH=/tmp/anhedral-void-live-preflight.log \
76
- node tests/test-live-void.mjs --account <customer-account-id> --fixture /absolute/generated-workspace
77
- ```
78
-
79
- The preflight can prepare an isolated local fixture with `--prepare-only /absolute/new-unused-path`; this scaffolds and builds locally and does not perform remote acceptance or publication.
80
-
81
- Authentication alone does not prove provisioning, runtime builds, private access or deployment. Authenticated read-only preflight succeeded for the Workers account subdomain. The same login received HTTP 403 from Access organizations (provider code `10000`) and Access applications (provider code `9999`). No deployment or other provider mutation was performed. Private live acceptance is blocked until the authorized account has usable Access organization/application/policy permissions. Public deployment is not a substitute for the requested private acceptance. Separately, the Cloudflare dashboard explicitly shows that Zero Trust onboarding must be completed for this account. The dashboard observation and API permission errors are distinct evidence; the 403 responses alone do not establish their cause. In particular, do not infer that the complete Vinext plus Hono/shared database/auth combination works from local unit tests.
82
-
83
- The acceptance workspace must exercise:
84
-
85
- - Fresh-checkout installation and build using pinned versions.
86
- - Vinext and Hono Workers with reusable shared packages.
87
- - Existing D1/private R2 identity reuse, one migration owner, serialized resource creation and committed lock reuse across a new checkout.
88
- - Environment validation, production secret stdin upload and public build variables.
89
- - Private Access protection before activation, anonymous rejection, allowed user login and denied user behavior.
90
- - Actual routing, assets, authentication and streaming responses.
91
- - Initial lock review checkpoint followed by a clean provider-confirmed release and meaningful `test:live`.
92
- - Failed build/deployment recovery and rollback without claiming migration reversal.
93
-
94
- Watch the interaction between private Access's pre-created empty Worker and Void's existing-Worker checks, and between the first target's lock changes and later targets' secret upload guards. Validate both rather than weakening privacy or source checks.
95
-
96
- For an authorized disposable application, use the built CLI's `connect`, `ship --dry-run`, `ship`, `status --refresh`, `verify`, and reviewed `rollback` commands. Preserve resource ownership and inspect partial operations before retrying. This document does not authorize additional provider resources or expenses.
97
-
98
- ## Handoff
99
-
100
- Keep the customer-owned account, committed application manifest, `anhedral.cloudflare.json`, `void.config.ts`, `env.ts`, reviewed SQL and each app's `void.lock.json`. Keep secrets out of source. Local `.anhedral/` history and Void diagnostic logs are separate operational evidence; a fresh checkout cannot reconstruct historical source-to-version mappings from current provider versions. `recover` reports a current snapshot and does not fabricate historical verification.
101
-
102
- ## Generated dependency review (2026-10-15)
103
-
104
- Hosted generated-profile checks on `d117f402faa6d899f972152f242b18026a45053b` failed. They are distinct from the passing CLI/plugin checks. Root-cause analysis found several independent paths to `braces`, including:
105
-
106
- | Consumer | Dependency path | Required structural remediation |
107
- | --- | --- | --- |
108
- | Every inherited starter | Shared ESLint config → Next ESLint plugin → fast-glob → micromatch → braces | Declare framework lint tooling only in the web application; retain generic shared lint coverage |
109
- | Vinext | vite-plugin-commonjs → vite-plugin-dynamic-import → fast-glob → micromatch → braces | Upstream consumer migration with CommonJS, development and SSR/RSC behavior verified |
110
- | WXT styling | Tailwind CSS 3 → chokidar → braces | Supported Tailwind/toolchain migration, including generated styles and builds |
111
- | Expo | React Native Metro config → Metro tooling → glob matching dependencies → braces | Compatible Metro/Expo dependency migration |
112
-
113
- The current [CVE-2026-93687 advisory](https://github.com/advisories/GHSA-vfj7-8cjw-p6xm) affects `braces <=3.0.3` and lists no patched version. npm’s latest is still `3.0.3`. [Proposed fix #72](https://github.com/micromatch/braces/pull/72) is closed without merging. The maintainer disputes the advisory’s security interpretation in [issue #70](https://github.com/micromatch/braces/issues/70); the advisory remains active. The separate [CVE-2024-4068](https://github.com/advisories/GHSA-grv7-fg5c-xmjg) was fixed by `3.0.3`, which does not resolve the newer advisory.
114
-
115
- The failure is recursive AST processing of deeply nested glob patterns. Remote exploitability depends on whether an application passes attacker-controlled patterns to those operations; the presence of a development dependency alone does not establish an exploitable deployed endpoint. No complete reachability review has been performed for every generated profile.
116
-
117
- An unqualified `fast-glob` → `tinyglobby` package alias is incompatible: consumers use different exports and directory expansion defaults. Removing the global starter dependency is an Anhedral composition fix, not proof that every supported framework is free of `braces`. Do not clear the audit gate or claim production acceptance until the resolved graphs and relevant runtime checks pass. The same generated CI also reports a separate `node-forge` advisory in Expo/WXT tooling, which is outside the `braces` remediation.
118
-
119
- The shared-lint ownership change was checked against the actual upstream template manifest: a newly resolved pnpm graph contained 169 packages and none of `@next/eslint-plugin-next`, `fast-glob`, `micromatch` or `braces`; its standard pnpm audit reported no known vulnerabilities. This is evidence for the shared lint foundation only, not the entire generated application matrix. App-local web linting explicitly selects JavaScript/TypeScript/JSX/TSX files rather than relying on ESLint’s default JavaScript selection.
120
-
121
- Validation of the scoped composition change passed 613 CLI unit tests with the real lint probe enabled, 60 inspector tests, builds, lint, static security policy, OSV checks for 86 root/catalog versions, and the package allowlist. The five lint tests include actual Next Image/Link and React Hooks diagnostics, full recommended/Core Web Vitals rule configuration, TypeScript/JSX parsing and adding web after an API-only scaffold. A helper now exercises installed rules in generated web CI profiles. A fresh local upstream shadcn initialization was attempted but its `ui.shadcn.com` request was refused by the network proxy; no fresh full generated-app matrix success is claimed.
122
-
123
- ## Temporary braces patch verification
124
-
125
- The depth-only mitigation is based on official `braces@3.0.3`, tarball integrity `sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==`. Both the unmodified baseline and patched package passed all 764 tests from the published release source (`74b2db2938fad48a2ea54a9c8bf27a37a62c350d`). The bounded verifier passed 360 differential compile/expand/stringify comparisons, depth 100/101 and mixed/literal boundaries, deep direct ASTs, child cycles and expansion-parent cycles. Expansion width/range behavior and stringify parent handling remain unchanged.
126
-
127
- This establishes the tested library mitigation, not a complete application exposure analysis or an upstream fixed release. The upstream registry report remains unmodified. The owner-approved gate accepts only the exact patched braces advisory after verifying installed bytes and regressions. Separate Expo/WXT findings and the remaining private Cloudflare acceptance gaps remain independent.
128
-
129
- A real pnpm fixture resolved `braces@3.0.3` with micromatch, fast-glob and chokidar consumers, merged the exact patch, resolved the new lock and installed with `--frozen-lockfile --ignore-scripts`. The installed bytes passed the depth verifier and normal filesystem glob/watch checks. Changing the patch after resolution made a frozen install fail; restoring its bytes restored successful installation. The untouched pnpm audit JSON still reported `GHSA-vfj7-8cjw-p6xm` for `3.0.3` and was retained locally as test evidence. Both the patch and MIT notice are recorded in generated source fingerprints; customer artifacts and YAML patch entries are preserved or rejected on conflict.
130
-
131
- Release-exception assessment: the evidence supports the tested depth mitigation for the exact patched version. It does not support a blanket advisory waiver, other versions, unrelated findings or a claim that every generated installation has been exercised. Any later exception must be constrained to the advisory/version and independently verified installed bytes, reviewed for the intended release, and retired with the patch. The owner subsequently approved and restored the exact verified exception below; other findings remain blocking.
132
-
133
- The generated exact-path Git attributes preserve LF bytes with `core.autocrlf=true`; a real index/checkout round trip verifies the patch and license remain identical. The patch’s SHA-256 is `69bd65a37da4569ba0be8a044aa732ad7c2ebd5494d6076f966eb6df8a12756e`.
134
-
135
- Final local validation of the mitigation passed 628 CLI tests without skips, 60 inspector tests, build/typecheck/lint, static secret/security scans, OSV checks for 87 root/catalog versions, package allowlist and packed CLI smoke. The packed installation test invokes the installed patch helper and compares generated patch/license bytes with the shipped assets. These results establish the tested mitigation, not completion of all generated-profile or live acceptance requirements.
136
-
137
- ## Restored verified advisory handling
138
-
139
- The owner approved restoring the earlier verification-aware behavior for one package/advisory. `pnpm audit:deps` now invokes the bundled gate, preserving raw pnpm JSON in `.anhedral-audit-report.json` and printing the known upstream finding. Only `GHSA-vfj7-8cjw-p6xm` for `braces@3.0.3` can pass through this exception. Verification requires the pinned patch checksum, every discovered installed copy matching the reviewed full-package hash, and bounded depth/cycle regression checks. Unpatched/tampered copies, unknown versions, malformed or incomplete reports, command failures, and unrelated high/critical findings fail.
140
-
141
- This restores the working patch-plus-verification behavior without the removed multi-package backport framework. It does not claim an upstream fixed release or waive the independent Expo/WXT findings or private Cloudflare acceptance work.
142
-
143
- Validation of the restored gate passed 634 CLI tests without skips and 60 inspector tests, build/typecheck/lint, static security policy, package allowlist and packed CLI smoke. The real frozen pnpm fixture covered an npm dependency alias, accepted the exact verified mitigation, preserved the upstream audit JSON, rejected both patch-file and installed-package tampering, and passed again after restoration. The packed CLI writes the audit gate from its distributed asset.
144
-
145
- ## Hosted release follow-through (2026-10-16)
146
-
147
- Hosted CI on `83e83e476fba8a052fb3c73aaa0e3b59659231bc` passed the Linux braces installation gate, all four CLI Node-version checks, portable macOS/Windows checks, inspector checks, plain Vercel, Next.js/Cloudflare (including Better Auth), desktop on Linux/macOS, Worker services and Vercel services. Other generated profiles exposed Void entrypoint discovery and duplicated database configuration, corrected in the subsequent source changes. These results are profile-specific, not a successful full matrix or live deployment.
148
-
149
- The same hosted run independently confirmed that extension and combined-client profiles fail on `GHSA-86w9-cpqp-85rv` in `node-forge`. The [current advisory](https://github.com/advisories/GHSA-86w9-cpqp-85rv) covers versions through 1.4.0 and has no patched release; [upstream PR 1152](https://github.com/digitalbazaar/forge/pull/1152) remains unmerged. Current Expo CLI and extension-runner dependency paths still require this package. A framework version upgrade alone does not establish remediation.
150
-
151
- The prior Node-main patch was evaluated separately against the official 1.4.0 release source (`fa385f92440879601240020f158bed68e444e83a`): baseline and patched versions each passed 828 tests with four upstream pending cases; the malformed-signature regression failed before and passed after patching. The aggregate harness neutralized an upstream `describe.only` so the complete suite actually ran. At that checkpoint the source-only patch did not update the package's prebuilt browser bundles and was not accepted. The completed bundle remediation and verification below supersede that earlier candidate.
152
-
153
- Fresh pnpm resolution confirmed that Void's `^1.63.1` Cloudflare Vite dependency could select 1.64.0, whose Wrangler peer requirement exceeds Anhedral's validated pin. The Void recipe now pins that transitive edge to 1.63.1, sharing the existing version source, preserving customer override entries and leaving unrelated recipes untouched. The exact 1.63.1/4.149.0 pair passed fresh resolution and an actual Vinext/Void Vite build. Generated Worker acceptance reads the emitted Vite Worker configuration and verifies its actual entry artifact, instead of expecting the legacy Wrangler output path.
154
-
155
- ## Completed node-forge remediation
156
-
157
- The final exact-version mitigation covers `lib/rsa.js`, `dist/forge.min.js` and `dist/forge.all.min.js` from official `node-forge@1.4.0`, rather than accepting an unpatched distribution path. The patch is 1,177,827 bytes because unified diffs include complete minified lines; the actual guard changes are limited to nested DigestAlgorithm cardinality and strict DER NULL contents. The minified predicates implement the same source guard, and their trivial one-line source maps remain valid. The upstream BSD attribution is retained.
158
-
159
- Patch SHA-256: `2cbbff9183d2896f13da8c8655b8f598b0f24c9b7477e8230f9a313f806c239f`. Reviewed full installed-tree SHA-256: `2e3a4c3aa2e8f3235d9dd9b3f21698c7aa88983ba9623f1502029386316380e4`. The official tarball integrity is `sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==`.
160
-
161
- For each of the three published entrypoints, forced pure-JavaScript RSA verification preserved 11 valid cases and rejected all 30 malformed cases across six digest algorithms. The official unpatched package accepted 23 malformed cases, so the regression distinguishes the fix. The complete official Node suite passed 828 tests with four upstream pending cases against the final source patch. Exact Node 24.21/pnpm 10.34.5 frozen installation with direct and aliased dependencies passed and reproduced the reviewed bytes and all-entrypoint behavior.
162
-
163
- The audit gate extends its fixed policy to the one additional exact advisory/version only after patch checksum, every installed package tree and bounded runtime probes pass. It retains the raw upstream advisory and rejects unrelated high/critical findings. It is a verified local mitigation, not an official upstream fixed release. The removed open-ended multi-package manifest/backport framework remains absent.
164
-
165
- CI now prepares a reviewable Linux release candidate on Node 24.21 after its checks, verifying artifact integrity, scanning for secrets and executing the exact packed CLI. It uploads the candidate with one-day retention; this step cannot publish and does not change required reviews or main-commit release checks.
166
-
167
- Consolidated local validation passed 649 CLI tests without skips, 60 inspector tests, build/typecheck/lint, static security policy, package allowlist and packed CLI smoke. Both real frozen-install fixtures passed, including original braces glob/watch behavior and node-forge source/browser-bundle tamper rejection. The packed CLI carries and stages both exact patches and upstream notices. The combined candidate still requires the full hosted matrix and the repository’s existing code-owner review before publication.
168
-
169
- Installed-graph verification recognizes explicitly optional peer dependencies as well as ordinary optional dependencies. A missing peer is skippable only when the parent declares the peer and marks it optional, with no competing required dependency declaration; present dangling links, outside paths and missing required packages still fail. Missing required-package diagnostics include an escaped project-relative path. All 650 CLI tests passed after this change.
170
-
171
- ## Incremental dependency installation repair
172
-
173
- The remaining existing-project acceptance case exposed a real pnpm 10.34.5 installation defect. In an API/Neon project, `tslib@2.8.1` was initially skipped through optional `@emnapi/runtime`. Adding WXT introduced required `async-mutex -> tslib`, and the newly resolved lock recorded it as required, but the incremental frozen installation retained the old skipped state and omitted the package. The original verifier correctly rejected this missing required dependency. Optional-peer support is independently valid and does not hide this defect.
174
-
175
- Removing only generated root `node_modules` and running an ordinary frozen installation completed in 5.6 seconds on the original failing graph. The reviewed lock remained exactly `b412f3758702f52968e564a99fcac618ea6be89697a05e301e4bad4807a04906`; the dependency was installed, its skipped state cleared, and both the original collector and full verified audit gate passed. Workspace links and the separate content-addressed package store were retained.
176
-
177
- Actual additions now rematerialize that generated cache before frozen installation and check that the lock bytes remain unchanged. Linked or non-directory cache paths are rejected before cleanup. Source, reviewed patches and lock ownership remain intact. The alternate `--fix-lockfile` command was rejected because it rewrote the reviewed lock despite `--frozen-lockfile`; `--force` is not used.
178
-
179
- The final cache-regression run passed all 652 CLI tests without skips, 60 inspector tests, lint and static security policy. Focused cases cover stale generated cache removal with package-store preservation, linked-cache refusal and frozen-lock byte drift.
180
-
181
- ## Simplified dependency patch policy (2026-10-16)
182
-
183
- This supersedes the installed-tree and runtime audit-gate design described in the historical checkpoints above. `src/dependency-patches.ts` installs both exact-version patches and notices while preserving customer policy and source files. Generated audits retain the raw pnpm report and accept only the two reviewed advisory/version pairs, with the effective pnpm patch mapping and bundled patch checksum. Frozen pnpm installation applies the patches and checks lockfile consistency. The audit no longer traverses installed dependencies, hashes package trees, or executes package code.
184
-
185
- Runtime coverage lives in this repository: the braces fixture checks depth/cycle guards and normal glob/watch consumers; the forge fixture checks valid and malformed signatures through Node and both browser bundles. Both fixtures check frozen installation and changed-patch rejection. Audit-policy tests use deterministic reports to cover unknown advisories, other versions, critical findings, malformed reports, command errors, missing/wrong mappings, and changed patch bytes. Live advisory-service availability is independent of these regression tests; generated `pnpm audit:deps` still queries the actual service.