anhedral 0.12.0 → 0.15.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 (184) hide show
  1. package/README.md +35 -172
  2. package/assets/patches/audit-deps.mjs +12 -2
  3. package/assets/ui/LICENSE.shadcn +21 -0
  4. package/assets/ui/UPSTREAM.json +33 -0
  5. package/assets/ui/native/button.tsx +85 -0
  6. package/assets/ui/native/card.tsx +33 -0
  7. package/assets/ui/native/dialog.tsx +75 -0
  8. package/assets/ui/native/input.tsx +27 -0
  9. package/assets/ui/native/label.tsx +4 -0
  10. package/assets/ui/native/layout.tsx +26 -0
  11. package/assets/ui/native/text.tsx +20 -0
  12. package/assets/ui/native/theme-switcher.tsx +22 -0
  13. package/assets/ui/theme-storage.ts +25 -0
  14. package/assets/ui/theme.tsx +66 -0
  15. package/assets/ui/web/button.tsx +59 -0
  16. package/assets/ui/web/input.tsx +21 -0
  17. package/assets/ui/web/label.tsx +19 -0
  18. package/dist/capabilities.d.ts +5 -5
  19. package/dist/capabilities.js +3 -21
  20. package/dist/capability-contract.d.ts +3 -3
  21. package/dist/capability-contract.js +11 -39
  22. package/dist/cli-delivery.d.ts +1 -1
  23. package/dist/cli-delivery.js +5 -65
  24. package/dist/cli-output.js +3 -3
  25. package/dist/command-schema.js +35 -80
  26. package/dist/command.js +9 -11
  27. package/dist/delivery-evidence.d.ts +1 -1
  28. package/dist/delivery-evidence.js +7 -36
  29. package/dist/delivery.d.ts +2 -8
  30. package/dist/delivery.js +23 -102
  31. package/dist/dependencies.d.ts +12 -58
  32. package/dist/dependencies.js +67 -189
  33. package/dist/index.d.ts +1 -3
  34. package/dist/index.js +1 -3
  35. package/dist/inspector-model.d.ts +2 -2
  36. package/dist/integration-service-readers.d.ts +1 -2
  37. package/dist/integration-service-readers.js +3 -84
  38. package/dist/lifecycle-model.d.ts +1 -1
  39. package/dist/lifecycle-model.js +1 -1
  40. package/dist/mobile-delivery.d.ts +1 -1
  41. package/dist/mobile-delivery.js +4 -0
  42. package/dist/platforms/mobile.d.ts +1 -1
  43. package/dist/platforms/mobile.js +64 -114
  44. package/dist/platforms/web.d.ts +3 -0
  45. package/dist/platforms/web.js +299 -0
  46. package/dist/project-config.d.ts +1 -1
  47. package/dist/project-config.js +0 -1
  48. package/dist/project-inspector.js +5 -36
  49. package/dist/project-state.d.ts +1 -3
  50. package/dist/project-state.js +6 -86
  51. package/dist/provider-auth.js +3 -32
  52. package/dist/provider-readiness.d.ts +1 -1
  53. package/dist/provider-readiness.js +5 -24
  54. package/dist/providers/adapters.js +9 -178
  55. package/dist/providers/api.d.ts +1 -1
  56. package/dist/providers/api.js +3 -3
  57. package/dist/providers/config.js +2 -48
  58. package/dist/providers/definitions.d.ts +1 -204
  59. package/dist/providers/definitions.js +0 -85
  60. package/dist/providers/provision.d.ts +1 -1
  61. package/dist/providers/receipts.js +1 -11
  62. package/dist/providers/recovery-verification.js +1 -61
  63. package/dist/providers/runtime.js +15 -35
  64. package/dist/providers/state.js +1 -7
  65. package/dist/provision.d.ts +5 -13
  66. package/dist/provision.js +4 -80
  67. package/dist/readiness.d.ts +1 -1
  68. package/dist/readiness.js +3 -6
  69. package/dist/registry/add.js +11 -38
  70. package/dist/registry/bootstrap.d.ts +3 -2
  71. package/dist/registry/bootstrap.js +4 -13
  72. package/dist/registry/commands.js +8 -10
  73. package/dist/registry/context.js +0 -1
  74. package/dist/registry/options.js +8 -26
  75. package/dist/registry/resolve.d.ts +3 -2
  76. package/dist/registry/resolve.js +26 -82
  77. package/dist/registry/types.d.ts +2 -7
  78. package/dist/registry/usage.js +2 -2
  79. package/dist/runtime-policy.d.ts +0 -2
  80. package/dist/runtime-policy.js +0 -13
  81. package/dist/scaffold/api.js +10 -2
  82. package/dist/scaffold/auth.d.ts +1 -2
  83. package/dist/scaffold/auth.js +57 -116
  84. package/dist/scaffold/backend.d.ts +2 -0
  85. package/dist/scaffold/backend.js +39 -0
  86. package/dist/scaffold/billing-config.d.ts +1 -0
  87. package/dist/scaffold/billing-config.js +73 -0
  88. package/dist/scaffold/billing-contracts.d.ts +2 -0
  89. package/dist/scaffold/billing-contracts.js +48 -0
  90. package/dist/scaffold/billing-providers.d.ts +1 -0
  91. package/dist/scaffold/billing-providers.js +249 -0
  92. package/dist/scaffold/billing-schema.d.ts +1 -0
  93. package/dist/scaffold/billing-schema.js +34 -0
  94. package/dist/scaffold/billing-security.d.ts +1 -0
  95. package/dist/scaffold/billing-security.js +46 -0
  96. package/dist/scaffold/billing-server.d.ts +1 -0
  97. package/dist/scaffold/billing-server.js +139 -0
  98. package/dist/scaffold/billing-store.d.ts +1 -0
  99. package/dist/scaffold/billing-store.js +72 -0
  100. package/dist/scaffold/billing.d.ts +2 -0
  101. package/dist/scaffold/billing.js +208 -0
  102. package/dist/scaffold/bootstrap.d.ts +2 -3
  103. package/dist/scaffold/bootstrap.js +37 -43
  104. package/dist/scaffold/compose.js +2 -12
  105. package/dist/scaffold/database.d.ts +1 -1
  106. package/dist/scaffold/database.js +20 -111
  107. package/dist/scaffold/documentation.d.ts +0 -1
  108. package/dist/scaffold/documentation.js +22 -82
  109. package/dist/scaffold/expo-auth.d.ts +3 -0
  110. package/dist/scaffold/expo-auth.js +203 -0
  111. package/dist/scaffold/expo-billing.d.ts +3 -0
  112. package/dist/scaffold/expo-billing.js +257 -0
  113. package/dist/scaffold/expo-runtime.d.ts +3 -0
  114. package/dist/scaffold/expo-runtime.js +43 -0
  115. package/dist/scaffold/integrations.d.ts +1 -2
  116. package/dist/scaffold/integrations.js +9 -5
  117. package/dist/scaffold/managed-email.d.ts +3 -0
  118. package/dist/scaffold/managed-email.js +47 -0
  119. package/dist/scaffold/native-ui.d.ts +2 -0
  120. package/dist/scaffold/native-ui.js +69 -0
  121. package/dist/scaffold/password-reset.d.ts +1 -0
  122. package/dist/scaffold/password-reset.js +99 -0
  123. package/dist/scaffold/private-files.d.ts +2 -0
  124. package/dist/scaffold/private-files.js +78 -0
  125. package/dist/scaffold/stack-documentation.d.ts +0 -1
  126. package/dist/scaffold/stack-documentation.js +3 -49
  127. package/dist/scaffold/styling.d.ts +1 -1
  128. package/dist/scaffold/styling.js +20 -28
  129. package/dist/scaffold/web-billing.d.ts +2 -0
  130. package/dist/scaffold/web-billing.js +48 -0
  131. package/dist/scaffold/workspace.js +53 -189
  132. package/dist/service-deletion.js +1 -1
  133. package/dist/service-descriptor.js +5 -12
  134. package/dist/service-model.d.ts +1 -1
  135. package/dist/service-operations.js +2 -32
  136. package/dist/service-readers.js +1 -32
  137. package/dist/services-command.d.ts +1 -1
  138. package/dist/services-command.js +3 -9
  139. package/dist/ship.d.ts +3 -316
  140. package/dist/ship.js +13 -143
  141. package/dist/stack-registry.d.ts +2 -43
  142. package/dist/stack-registry.js +80 -308
  143. package/dist/standard.js +7 -14
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/docs/anhedral-stack.md +23 -0
  147. package/docs/assets/anhedral-stack-light.png +0 -0
  148. package/docs/assets/anhedral-stack.png +0 -0
  149. package/docs/software-factory.md +25 -499
  150. package/docs/stack-standard.md +48 -226
  151. package/docs/verification.md +433 -0
  152. package/package.json +22 -21
  153. package/dist/neon-service-data.d.ts +0 -8
  154. package/dist/neon-service-data.js +0 -117
  155. package/dist/platforms/desktop.d.ts +0 -2
  156. package/dist/platforms/desktop.js +0 -415
  157. package/dist/platforms/extension.d.ts +0 -2
  158. package/dist/platforms/extension.js +0 -328
  159. package/dist/scaffold/lint.d.ts +0 -4
  160. package/dist/scaffold/lint.js +0 -56
  161. package/dist/scaffold/neon-realtime.d.ts +0 -2
  162. package/dist/scaffold/neon-realtime.js +0 -97
  163. package/dist/scaffold/services.d.ts +0 -5
  164. package/dist/scaffold/services.js +0 -108
  165. package/dist/scaffold/stream.d.ts +0 -2
  166. package/dist/scaffold/stream.js +0 -114
  167. package/dist/scaffold/void.d.ts +0 -4
  168. package/dist/scaffold/void.js +0 -256
  169. package/dist/scaffold/web.d.ts +0 -2
  170. package/dist/scaffold/web.js +0 -128
  171. package/dist/vercel-project.d.ts +0 -101
  172. package/dist/vercel-project.js +0 -305
  173. package/dist/vercel.d.ts +0 -67
  174. package/dist/vercel.js +0 -581
  175. package/dist/vinext.d.ts +0 -2
  176. package/dist/vinext.js +0 -86
  177. package/dist/void-execution.d.ts +0 -10
  178. package/dist/void-execution.js +0 -94
  179. package/dist/void-migrations.d.ts +0 -6
  180. package/dist/void-migrations.js +0 -110
  181. package/dist/void-state.d.ts +0 -16
  182. package/dist/void-state.js +0 -65
  183. package/dist/void.d.ts +0 -3
  184. package/dist/void.js +0 -5
@@ -0,0 +1,66 @@
1
+ import { createContext, useContext, useEffect, useRef, useState, type ReactNode } from 'react';
2
+ import { useColorScheme } from 'react-native';
3
+ import { styling } from '@workspace/styling';
4
+ type ThemeColors = Record<string, string> & { background: string; foreground: string };
5
+ const colors = (tokens: Record<string, string>) =>
6
+ Object.fromEntries(
7
+ Object.entries(tokens)
8
+ .filter(([key]) => key !== '--radius')
9
+ .map(([key, value]) => [key.slice(2), 'hsl(' + value.replaceAll(' ', ', ') + ')']),
10
+ ) as ThemeColors;
11
+ const themes = { light: colors(styling.themes.light), dark: colors(styling.themes.dark) };
12
+ import { readPreference, savePreference, applyTheme, subscribePreference } from './theme-storage';
13
+
14
+ export type ThemePreference = 'system' | 'light' | 'dark';
15
+ export function isThemePreference(value: unknown): value is ThemePreference {
16
+ return value === 'system' || value === 'light' || value === 'dark';
17
+ }
18
+ const ThemeContext = createContext<{
19
+ preference: ThemePreference;
20
+ mode: 'light' | 'dark';
21
+ colors: typeof themes.light;
22
+ setPreference: (value: ThemePreference) => void;
23
+ } | null>(null);
24
+ export function ThemeProvider({ children }: { children: ReactNode }) {
25
+ const system = useColorScheme();
26
+ const [preference, setPreferenceState] = useState<ThemePreference>('system');
27
+ const [ready, setReady] = useState(false);
28
+ const changed = useRef(false);
29
+ const mode = preference === 'system' ? (system === 'dark' ? 'dark' : 'light') : preference;
30
+ useEffect(() => {
31
+ let active = true;
32
+ void readPreference()
33
+ .then((saved) => {
34
+ if (active && !changed.current && isThemePreference(saved)) setPreferenceState(saved);
35
+ })
36
+ .finally(() => {
37
+ if (active) setReady(true);
38
+ });
39
+ const unsubscribe = subscribePreference((saved) => {
40
+ if (isThemePreference(saved)) setPreferenceState(saved);
41
+ });
42
+ return () => {
43
+ active = false;
44
+ unsubscribe();
45
+ };
46
+ }, []);
47
+ useEffect(() => {
48
+ if (ready) applyTheme(mode, themes[mode].background, preference);
49
+ }, [mode, ready, preference]);
50
+ function setPreference(value: ThemePreference) {
51
+ if (!isThemePreference(value)) return;
52
+ changed.current = true;
53
+ setPreferenceState(value);
54
+ void savePreference(value);
55
+ }
56
+ return (
57
+ <ThemeContext.Provider value={{ preference, mode, colors: themes[mode], setPreference }}>
58
+ {children}
59
+ </ThemeContext.Provider>
60
+ );
61
+ }
62
+ export function useTheme() {
63
+ const value = useContext(ThemeContext);
64
+ if (!value) throw new Error('Mount ThemeProvider at the application root.');
65
+ return value;
66
+ }
@@ -0,0 +1,59 @@
1
+ 'use client';
2
+ import { Button as ButtonPrimitive } from '@base-ui/react/button';
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { cn } from '@/lib/utils';
5
+
6
+ /** @public Shared shadcn variant API for application components. */
7
+ export const buttonVariants = cva(
8
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: 'bg-primary text-primary-foreground hover:bg-primary/80',
13
+ outline:
14
+ 'border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',
15
+ secondary:
16
+ 'bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
17
+ ghost:
18
+ 'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50',
19
+ destructive:
20
+ 'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40',
21
+ link: 'text-primary underline-offset-4 hover:underline',
22
+ },
23
+ size: {
24
+ default:
25
+ 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
26
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
27
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
28
+ lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
29
+ icon: 'size-8',
30
+ 'icon-xs':
31
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
32
+ 'icon-sm':
33
+ 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
34
+ 'icon-lg': 'size-9',
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ variant: 'default',
39
+ size: 'default',
40
+ },
41
+ },
42
+ );
43
+
44
+ function Button({
45
+ className,
46
+ variant = 'default',
47
+ size = 'default',
48
+ ...props
49
+ }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
50
+ return (
51
+ <ButtonPrimitive
52
+ data-slot="button"
53
+ className={cn(buttonVariants({ variant, size, className }))}
54
+ {...props}
55
+ />
56
+ );
57
+ }
58
+
59
+ export { Button };
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { Input as InputPrimitive } from '@base-ui/react/input';
5
+ import { cn } from '@/lib/utils';
6
+
7
+ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
8
+ return (
9
+ <InputPrimitive
10
+ type={type}
11
+ data-slot="input"
12
+ className={cn(
13
+ 'h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',
14
+ className,
15
+ )}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ export { Input };
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { cn } from '@/lib/utils';
5
+
6
+ function Label({ className, ...props }: React.ComponentProps<'label'>) {
7
+ return (
8
+ <label
9
+ data-slot="label"
10
+ className={cn(
11
+ 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
12
+ className,
13
+ )}
14
+ {...props}
15
+ />
16
+ );
17
+ }
18
+
19
+ export { Label };
@@ -6,7 +6,7 @@ export declare const CAPABILITIES: Record<StandardProduct, Capability>;
6
6
  export declare const CAPABILITY_REGISTRY: {
7
7
  schemaVersion: number;
8
8
  cliVersion: string;
9
- capabilities: Record<"next" | "queues" | "basin" | "vinext" | "hono" | "realtime" | "cron" | "workflows" | "electron" | "wxt" | "expo" | "styling" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "posthog", Capability>;
9
+ capabilities: Record<"next" | "expo" | "better-auth" | "styling" | "hono" | "d1" | "r2" | "stripe" | "revenuecat", Capability>;
10
10
  };
11
11
  export declare function createSetupPlan(options: StandardOptions, registry?: import("./registry/resolve.js").ResolvedStackRegistry): {
12
12
  schemaVersion: number;
@@ -15,10 +15,10 @@ export declare function createSetupPlan(options: StandardOptions, registry?: imp
15
15
  standard: string;
16
16
  root: string;
17
17
  name: string;
18
- products: ("next" | "queues" | "basin" | "vinext" | "hono" | "realtime" | "cron" | "workflows" | "electron" | "wxt" | "expo" | "styling" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "posthog")[];
19
- hosting: import("./registry/types.js").Hosting;
18
+ products: ("next" | "expo" | "better-auth" | "styling" | "hono" | "d1" | "r2" | "stripe" | "revenuecat")[];
19
+ hosting: "cloudflare";
20
20
  registry: import("./registry/resolve.js").ResolvedStackRegistry;
21
- bootstrap: ("next" | "pnpm" | "shadcn@4.21.4" | "dlx" | "init" | "--monorepo" | "--template")[];
21
+ bootstrap: ("anhedral" | "init")[];
22
22
  dryRun: boolean;
23
23
  setup: {
24
24
  tools: string[];
@@ -32,7 +32,7 @@ export declare function createSetupPlan(options: StandardOptions, registry?: imp
32
32
  credentials: readonly string[];
33
33
  resources: readonly string[];
34
34
  verify: readonly string[];
35
- id: "next" | "queues" | "basin" | "vinext" | "hono" | "realtime" | "cron" | "workflows" | "electron" | "wxt" | "expo" | "styling" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "posthog";
35
+ id: "next" | "expo" | "better-auth" | "styling" | "hono" | "d1" | "r2" | "stripe" | "revenuecat";
36
36
  }[];
37
37
  completion: string[];
38
38
  resourcesProvisioned: boolean;
@@ -1,4 +1,3 @@
1
- import { usesVoidSelection } from './runtime-policy.js';
2
1
  import { resolveStackRegistry } from './registry/resolve.js';
3
2
  import { BOOTSTRAP_COMMAND } from './registry/bootstrap.js';
4
3
  import { GENERATOR_VERSION } from './version.js';
@@ -15,20 +14,13 @@ export const CAPABILITY_REGISTRY = {
15
14
  };
16
15
  const HOSTING_SETUP = {
17
16
  cloudflare: {
18
- tools: ['Cloudflare integration or API', 'Void', 'Wrangler'],
17
+ tools: ['Wrangler'],
19
18
  access: [
20
19
  'Client-owned Cloudflare account; account ID; scoped OAuth/API access; service-compatible plan; DNS access only when needed',
21
20
  ],
22
21
  },
23
- vercel: {
24
- tools: ['Vercel integration or CLI'],
25
- access: [
26
- 'Client-owned Vercel team/project access; Hobby only for personal non-commercial use; suitable authorized plan for commercial apps',
27
- ],
28
- },
29
22
  };
30
23
  export function createSetupPlan(options, registry = resolveStackRegistry(options)) {
31
- const voidWorkspace = usesVoidSelection(options.products, options.hosting);
32
24
  const items = new Map(registry.items.map((item) => [item.name, item]));
33
25
  const capabilities = options.products.map((id) => {
34
26
  const item = items.get(id);
@@ -41,12 +33,9 @@ export function createSetupPlan(options, registry = resolveStackRegistry(options
41
33
  });
42
34
  const providers = [
43
35
  ...new Set([
44
- ...(options.products.includes('next') || options.products.includes('vinext')
45
- ? [options.hosting]
46
- : []),
47
36
  ...capabilities.flatMap(({ tools }) => tools.includes('Wrangler') ? ['cloudflare'] : []),
48
37
  ]),
49
- ].map((provider) => HOSTING_SETUP[provider]);
38
+ ].map(() => HOSTING_SETUP.cloudflare);
50
39
  return {
51
40
  schemaVersion: 1,
52
41
  cliVersion: GENERATOR_VERSION,
@@ -63,22 +52,15 @@ export function createSetupPlan(options, registry = resolveStackRegistry(options
63
52
  tools: [
64
53
  ...new Set([
65
54
  'Git',
66
- voidWorkspace
67
- ? 'Node.js 24.21.0+ for Void workspaces'
68
- : 'Node.js 22.13+ on 22.x, or Node.js 24+ for generated workspaces',
55
+ 'Node.js 22.13+ on 22.x, or Node.js 24+ for generated workspaces',
69
56
  PACKAGE_MANAGER.replace('@', ' '),
70
57
  'GitHub integration or gh',
71
- 'Fallow',
72
- 'Cloudflare security audit skill',
73
58
  ...providers.flatMap((provider) => provider.tools),
74
59
  ...capabilities.flatMap((item) => item.tools),
75
60
  ]),
76
61
  ],
77
62
  access: [
78
63
  'User-owned GitHub repository and CI access',
79
- ...(options.hosting === 'vercel' && options.products.includes('next')
80
- ? ['Vercel GitHub installation access for the selected web repository']
81
- : []),
82
64
  ...providers.flatMap((provider) => provider.access),
83
65
  ],
84
66
  capabilities,
@@ -27,11 +27,11 @@ export declare const CAPABILITY_CONTRACT: {
27
27
  products: ProductCapability[];
28
28
  providers: {
29
29
  id: string;
30
- managementCredential: "RESEND_API_KEY" | "STRIPE_SECRET_KEY" | "NEON_API_KEY" | "CLERK_PLATFORM_API_KEY" | "RC_API_KEY" | "SENTRY_AUTH_TOKEN" | "POSTHOG_PERSONAL_API_KEY" | "OPENAI_ADMIN_KEY";
31
- resources: readonly ["project", "database connection"] | readonly ["application", "environment keys"] | readonly ["domain", "sending key"] | readonly ["account verification", "webhook"] | readonly ["project", "application", "SDK keys"] | readonly ["project", "DSN"] | readonly ["project", "ingestion configuration"] | readonly ["project", "service account", "runtime key"];
30
+ managementCredential: "STRIPE_SECRET_KEY" | "RC_API_KEY";
31
+ resources: readonly ["account verification", "webhook"] | readonly ["project", "application", "SDK keys"];
32
32
  provisioning: CapabilityStage;
33
33
  liveAcceptance: "unverified";
34
- ownerSteps: readonly ["Choose an organization and region; approve any provider billing requirements."] | readonly ["Obtain Platform API access; configure production domains, DNS, and OAuth credentials."] | readonly ["Publish domain verification DNS records and wait for verification."] | readonly ["Complete account activation; define products, prices, and purchase behavior."] | readonly ["Configure store credentials or Stripe, products, offerings, and entitlements; verify purchases."] | readonly ["Choose organization and team access; configure source maps and application instrumentation."] | readonly ["Choose organization and region; define analytics events and consent behavior."] | readonly ["Obtain organization administration access; configure billing and application usage limits."];
34
+ ownerSteps: readonly ["Complete account activation; define products, prices, and purchase behavior."] | readonly ["Configure store credentials or Stripe, products, offerings, and entitlements; verify purchases."];
35
35
  }[];
36
36
  hosts: {
37
37
  id: string;
@@ -3,10 +3,9 @@ import { PROVIDER_DEFINITIONS } from './providers/definitions.js';
3
3
  import { GENERATOR_VERSION } from './version.js';
4
4
  const stage = (support, scope, evidence = 'local-contract') => ({ support, evidence, scope });
5
5
  const none = (scope) => stage('not-applicable', scope, 'unverified');
6
- const cloudflareResources = ['d1', 'r2', 'kv', 'queues', 'basin'];
7
- const deploymentBindings = ['realtime', 'cron', 'workflows', 'workers-ai'];
6
+ const cloudflareResources = ['d1', 'r2'];
8
7
  function integration(id) {
9
- const provider = id === 'ai-sdk' ? 'openai' : id;
8
+ const provider = id;
10
9
  return Object.hasOwn(PROVIDER_DEFINITIONS, provider)
11
10
  ? provider
12
11
  : undefined;
@@ -24,39 +23,19 @@ function productCapability(id) {
24
23
  limits.push(...PROVIDER_DEFINITIONS[provider].ownerSteps, 'Live account permissions and provider behavior require authorized acceptance.');
25
24
  }
26
25
  if (cloudflareResources.includes(id)) {
27
- provisioning = stage('implemented', id === 'basin'
28
- ? 'Private Cloudflare stream and Worker binding.'
29
- : 'Selected Cloudflare resource and checked Worker binding.');
26
+ provisioning = stage('implemented', 'Selected Cloudflare resource and checked Worker binding.');
30
27
  limits.push('Account eligibility, quotas, and live runtime behavior require authorized acceptance.');
31
- if (id === 'basin')
32
- limits.push('Pipeline transforms and sinks are outside automated provisioning.');
33
28
  }
34
- if (deploymentBindings.includes(id)) {
35
- provisioning = stage('implemented', 'Worker deployment configures the selected binding or trigger.');
36
- limits.push('Configured bindings and triggers do not establish application behavior or execution success.');
29
+ if (id === 'next') {
30
+ delivery = stage('implemented', 'Full Next.js OpenNext Worker and assets deployed through Wrangler with an API service binding.');
31
+ limits.push('Default adapter caching is not persistent ISR; provision separately scoped cache infrastructure before adding persistent ISR.');
37
32
  }
38
- if (['vinext', 'next', 'hono'].includes(id))
39
- delivery = stage('implemented', id === 'next'
40
- ? 'Selected Cloudflare or Vercel deployment with provider identity and source checks.'
41
- : 'Cloudflare Worker deployment with provider identity and source checks.');
33
+ if (id === 'hono')
34
+ delivery = stage('implemented', 'Cloudflare Worker deployment with provider identity and source checks.');
42
35
  if (id === 'expo') {
43
36
  delivery = stage('implemented', 'EAS build request, build receipt verification, and artifact link.');
44
37
  limits.push('No store submission; signing, enrollment, device testing, and store distribution remain developer responsibilities.');
45
38
  }
46
- if (id === 'electron' || id === 'wxt') {
47
- delivery = stage('scaffold-only', 'Generated application and local build tooling; automated distribution is unavailable.');
48
- limits.push(id === 'electron'
49
- ? 'Signing, notarization, installers, updates, and distribution require a separate delivery workflow.'
50
- : 'Extension signing, store submission, review, and distribution require a separate delivery workflow.');
51
- }
52
- if (id === 'stream') {
53
- provisioning = stage('scaffold-only', 'Manual Stream activation and live input setup; no automatic Stream provisioning or runtime credential installation.', 'unverified');
54
- limits.push('Server management factory only; creator/player UI, WHIP/WHEP signaling and playback token issuance require application implementation.', 'Keep management tokens server-only and disclose secret WHIP URLs only to authorized creators; verify private media access independently of hosting protection.', 'One-to-many broadcasts; conferencing, recording, HLS/DASH bridging, restreaming and live viewer counts are outside this integration.', 'Usage-based viewer-minute billing, account eligibility and live broadcast/playback acceptance require separate verification.');
55
- }
56
- if (id === 'neon-realtime') {
57
- provisioning = stage('scaffold-only', 'Manually enable Realtime on the intended Neon branch, configure allowed origins and supply its private secret and public URL; no automatic Realtime provisioning.', 'unverified');
58
- limits.push('Neon Realtime is beta and does not support RLS; authenticate requests and seal only explicitly scoped, read-only application queries.', 'Keep DATABASE_URL and NEON_REALTIME_SECRET server-only; clients use the public NEON_REALTIME_URL and short-lived sealed queries.', 'The package exposes separate server/client factories and a Drizzle adapter; no arbitrary SQL endpoint or application subscription flow is generated.', 'Live subscriptions, renewal, revocation, allowed origins and cross-tenant isolation require authorized acceptance; live behavior remains unverified.');
59
- }
60
39
  if (id === 'better-auth')
61
40
  limits.push('Configure private authentication secret and public origin; apply and verify database migrations and authorization rules.');
62
41
  return {
@@ -93,11 +72,6 @@ export const CAPABILITY_CONTRACT = {
93
72
  delivery: stage('implemented', 'Provision selected resources, configure bindings/secrets, deploy Workers, inspect provider identity and source receipts.'),
94
73
  liveAcceptance: 'unverified',
95
74
  },
96
- {
97
- id: 'vercel',
98
- delivery: stage('implemented', 'Configure the selected project environment, deploy the web app, inspect provider identity and source receipts.'),
99
- liveAcceptance: 'unverified',
100
- },
101
75
  ],
102
76
  plugin: [
103
77
  {
@@ -114,11 +88,11 @@ export const CAPABILITY_CONTRACT = {
114
88
  },
115
89
  {
116
90
  id: 'live-analytics',
117
- capability: stage('implemented', 'Explicit selected-resource analytics for Cloudflare Workers/D1, Vercel and PostHog; provider access and metric availability require live acceptance.'),
91
+ capability: stage('implemented', 'Explicit selected-resource analytics for Cloudflare Workers/D1; provider access and metric availability require live acceptance.'),
118
92
  },
119
93
  {
120
94
  id: 'live-database-reader',
121
- capability: stage('implemented', 'Explicit bounded D1 and restricted read-only Neon data reads; masked rows and schema are private app metadata.'),
95
+ capability: stage('implemented', 'Explicit bounded D1 data reads; masked rows and schema are private app metadata.'),
122
96
  },
123
97
  {
124
98
  id: 'live-provider-health',
@@ -132,7 +106,6 @@ export const CAPABILITY_CONTRACT = {
132
106
  limits: [
133
107
  'Local contract tests are separate from live provider acceptance and completed application verification.',
134
108
  'Account selection, enrollment, billing approval, DNS ownership, and signing can require owner action.',
135
- 'Mixed hosting is sequential; no atomic cross-provider rollback or cached phase skipping is promised.',
136
109
  'The CLI scaffolds supported primitives; customer application features remain development work.',
137
110
  ],
138
111
  };
@@ -146,9 +119,8 @@ export function formatCapabilityContract() {
146
119
  '',
147
120
  'Providers: ' + CAPABILITY_CONTRACT.providers.map((provider) => provider.id).join(', '),
148
121
  'Expo delivery returns EAS artifacts; it does not submit to stores.',
149
- 'Electron and WXT distribution: scaffold only.',
150
122
  'Plugin: explicit selected-resource analytics, bounded database reads and provider status checks; live acceptance remains unverified.',
151
- 'Schedule execution history: unavailable. Resource status does not certify application health.',
123
+ 'Resource status does not certify application health.',
152
124
  '',
153
125
  ...CAPABILITY_CONTRACT.limits,
154
126
  '',
@@ -1,3 +1,3 @@
1
1
  import { type OutputOptions } from './cli-output.js';
2
- export declare const DELIVERY_COMMANDS: readonly ["register", "connect", "provision", "ship", "status", "manage", "verify", "rollback", "adopt", "recover"];
2
+ export declare const DELIVERY_COMMANDS: readonly ["register", "connect", "provision", "ship", "status", "manage", "verify", "rollback", "recover"];
3
3
  export declare function runDelivery(command: string, args: string[], output: OutputOptions): Promise<void>;
@@ -1,15 +1,13 @@
1
1
  import path from 'node:path';
2
2
  import { commandArguments, commandArgumentError } from './cli-arguments.js';
3
3
  import { printResult } from './cli-output.js';
4
- import { hasProjectSection, readProjectSection } from './project-config.js';
5
4
  import { recoverDeliveryLock } from './project-state.js';
6
5
  import { readLifecycleOperation } from './lifecycle.js';
7
6
  import { buildMobileApplication } from './mobile-delivery.js';
8
- import { shipCloudflareApplication, shipSelectedVercelApplication, shipSelectedStack, } from './ship.js';
7
+ import { shipCloudflareApplication } from './ship.js';
9
8
  import { planProvisioning, provisionApplication } from './provision.js';
10
9
  import { writeManagementOverview } from './management.js';
11
10
  import { registerApplication, connectApplication, applicationStatus, verifyApplication, rollbackApplication, recoverApplication, } from './delivery.js';
12
- import { registerVercelApplication, connectVercelApplication, vercelApplicationStatus, verifyVercelApplication, rollbackVercelApplication, adoptVercelApplication, recoverVercelApplication, writeVercelOverview, } from './vercel.js';
13
11
  export const DELIVERY_COMMANDS = [
14
12
  'register',
15
13
  'connect',
@@ -19,7 +17,6 @@ export const DELIVERY_COMMANDS = [
19
17
  'manage',
20
18
  'verify',
21
19
  'rollback',
22
- 'adopt',
23
20
  'recover',
24
21
  ];
25
22
  function deliveryOptions(command, args) {
@@ -40,11 +37,7 @@ function deliveryOptions(command, args) {
40
37
  account: options.value('--account'),
41
38
  audience: choice('--audience', ['public', 'private'], 'Specify --audience public or private.'),
42
39
  emails: options.values('--allow-email'),
43
- provider: choice('--provider', ['vercel', 'cloudflare'], 'Specify one provider: vercel or cloudflare.'),
44
- scope: options.value('--scope'),
45
- use: choice('--use', ['personal', 'commercial'], 'Specify --use personal or commercial.'),
46
- create: options.has('--create'),
47
- git: options.has('--git'),
40
+ provider: choice('--provider', ['cloudflare'], 'Only Cloudflare hosting is supported.'),
48
41
  platform: choice('--platform', ['ios', 'android'], 'Select one mobile platform.'),
49
42
  profile: options.value('--profile'),
50
43
  releaseId: options.value('--release'),
@@ -55,55 +48,13 @@ function deliveryOptions(command, args) {
55
48
  dataCompatible: options.has('--data-compatible'),
56
49
  };
57
50
  }
58
- function isVercel(command, { root, provider }) {
59
- if (provider)
60
- return provider === 'vercel';
61
- if (hasProjectSection(root, 'vercel'))
62
- return true;
63
- return (command === 'register' &&
64
- hasProjectSection(root, 'setup') &&
65
- readProjectSection(root, 'setup').hosting === 'vercel');
66
- }
67
51
  function releaseId(command, options) {
68
52
  if (!options.releaseId)
69
53
  throw commandArgumentError(command, 'Rollback requires --release <recorded-id>.');
70
54
  return options.releaseId;
71
55
  }
72
- async function vercelCommand(command, options) {
73
- const { root, account, emails, audience, use, scope, create, git, dryRun, refresh, local } = options;
74
- if (account || emails.length)
75
- throw commandArgumentError(command, 'Cloudflare account/member flags require --provider cloudflare.');
76
- switch (command) {
77
- case 'register':
78
- return registerVercelApplication(root);
79
- case 'connect':
80
- if (!audience || !use)
81
- throw commandArgumentError(command, 'Vercel connect requires --audience public|private and --use personal|commercial.');
82
- return connectVercelApplication(root, { scope, audience, use, create, git });
83
- case 'ship':
84
- return shipSelectedVercelApplication(root, dryRun);
85
- case 'adopt':
86
- return adoptVercelApplication(root);
87
- case 'recover':
88
- return recoverVercelApplication(root);
89
- case 'verify':
90
- return verifyVercelApplication(root);
91
- case 'rollback':
92
- return rollbackVercelApplication(root, releaseId(command, options), options.dataCompatible);
93
- case 'status':
94
- return vercelApplicationStatus(root, refresh);
95
- case 'manage': {
96
- const snapshot = await vercelApplicationStatus(root, !local);
97
- return { file: writeVercelOverview(root, snapshot), evidence: snapshot.evidence };
98
- }
99
- default:
100
- throw commandArgumentError(command, 'Vercel project creation is handled by connect --create; Cloudflare resource provisioning requires --provider cloudflare.');
101
- }
102
- }
103
56
  async function cloudflareCommand(command, options) {
104
- const { root, account, audience, emails, scope, use, create, git, dryRun, refresh, local } = options;
105
- if (scope || use || create || git)
106
- throw commandArgumentError(command, 'Vercel connect options require a Vercel web manifest or --provider vercel.');
57
+ const { root, account, audience, emails, dryRun, refresh, local } = options;
107
58
  switch (command) {
108
59
  case 'register':
109
60
  return registerApplication(root);
@@ -113,8 +64,6 @@ async function cloudflareCommand(command, options) {
113
64
  return dryRun ? planProvisioning(root) : provisionApplication(root);
114
65
  case 'ship':
115
66
  return shipCloudflareApplication(root, dryRun);
116
- case 'adopt':
117
- throw commandArgumentError(command, 'Git deployment adoption requires --provider vercel.');
118
67
  case 'recover':
119
68
  return recoverApplication(root);
120
69
  case 'verify':
@@ -144,21 +93,12 @@ async function executeDelivery(command, options) {
144
93
  blockedStates: ['configuration-required', 'provider-configuration-required'],
145
94
  };
146
95
  }
147
- // Resolve hosting before the mixed-stack path, retaining its configuration preflight.
148
- const web = isVercel(command, options);
149
- if (command === 'ship' && !provider)
150
- return {
151
- result: await shipSelectedStack(root, dryRun),
152
- blockedStates: ['configuration-required', 'provider-configuration-required', 'partial'],
153
- };
154
- let result = await (web ? vercelCommand : cloudflareCommand)(command, options);
96
+ let result = await cloudflareCommand(command, options);
155
97
  if (command === 'status')
156
98
  result = { ...result, operation: readLifecycleOperation(root) };
157
99
  return {
158
100
  result,
159
- blockedStates: web
160
- ? ['provider-configuration-required']
161
- : ['configuration-required', 'provider-configuration-required'],
101
+ blockedStates: ['configuration-required', 'provider-configuration-required'],
162
102
  };
163
103
  }
164
104
  export async function runDelivery(command, args, output) {
@@ -48,8 +48,6 @@ function formatAdd(data, lines) {
48
48
  const files = Array.isArray(data.files) ? data.files : [];
49
49
  if (files.length)
50
50
  lines.push('', ...files.map((file) => ` ${string(file)}`));
51
- if (data.filesChecked === false)
52
- lines.push('Source files were not checked: this selection needs the networked web bootstrap.');
53
51
  if (names(data.conflicts))
54
52
  lines.push(`Conflicts: ${names(data.conflicts)}.`);
55
53
  for (const preview of entries(data.previews))
@@ -133,7 +131,9 @@ function formatRegistry(data, lines) {
133
131
  for (const key of ['access', 'credentials', 'resources', 'verify'])
134
132
  if (names(setup[key]))
135
133
  lines.push(`${key}: ${names(setup[key])}`);
136
- next(lines, `Inspect anhedral add ${string(data.name)} --dry-run in your project.`);
134
+ next(lines, ['stripe', 'revenuecat'].includes(string(data.name))
135
+ ? `Inspect anhedral add ${string(data.name)} --dry-run in your project.`
136
+ : 'Included in every project created with anhedral init.');
137
137
  }
138
138
  function formatDoctor(data, lines) {
139
139
  const local = record(data.local);