anhedral 0.13.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 (170) hide show
  1. package/README.md +35 -232
  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 -50
  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 -86
  26. package/dist/delivery-evidence.d.ts +1 -1
  27. package/dist/delivery-evidence.js +7 -36
  28. package/dist/delivery.d.ts +2 -8
  29. package/dist/delivery.js +20 -101
  30. package/dist/dependencies.d.ts +6 -57
  31. package/dist/dependencies.js +54 -188
  32. package/dist/index.d.ts +1 -4
  33. package/dist/index.js +1 -4
  34. package/dist/inspector-model.d.ts +2 -2
  35. package/dist/integration-service-readers.d.ts +1 -2
  36. package/dist/integration-service-readers.js +3 -84
  37. package/dist/lifecycle-model.d.ts +1 -1
  38. package/dist/lifecycle-model.js +1 -1
  39. package/dist/mobile-delivery.d.ts +1 -1
  40. package/dist/mobile-delivery.js +4 -0
  41. package/dist/platforms/mobile.js +30 -121
  42. package/dist/platforms/web.d.ts +3 -0
  43. package/dist/platforms/web.js +299 -0
  44. package/dist/project-config.d.ts +1 -1
  45. package/dist/project-config.js +0 -1
  46. package/dist/project-inspector.js +5 -36
  47. package/dist/project-state.d.ts +1 -3
  48. package/dist/project-state.js +2 -85
  49. package/dist/provider-auth.js +3 -38
  50. package/dist/provider-readiness.d.ts +1 -1
  51. package/dist/provider-readiness.js +5 -24
  52. package/dist/providers/adapters.js +0 -175
  53. package/dist/providers/api.d.ts +1 -1
  54. package/dist/providers/api.js +3 -3
  55. package/dist/providers/config.js +2 -48
  56. package/dist/providers/definitions.d.ts +1 -204
  57. package/dist/providers/definitions.js +0 -85
  58. package/dist/providers/provision.d.ts +1 -1
  59. package/dist/providers/receipts.js +1 -11
  60. package/dist/providers/recovery-verification.js +1 -61
  61. package/dist/providers/runtime.js +4 -35
  62. package/dist/providers/state.js +1 -7
  63. package/dist/provision.d.ts +5 -13
  64. package/dist/provision.js +4 -80
  65. package/dist/readiness.d.ts +1 -1
  66. package/dist/readiness.js +3 -8
  67. package/dist/registry/add.js +10 -70
  68. package/dist/registry/bootstrap.d.ts +3 -2
  69. package/dist/registry/bootstrap.js +4 -13
  70. package/dist/registry/commands.js +8 -10
  71. package/dist/registry/context.js +0 -1
  72. package/dist/registry/options.js +8 -38
  73. package/dist/registry/resolve.d.ts +3 -4
  74. package/dist/registry/resolve.js +26 -108
  75. package/dist/registry/types.d.ts +1 -7
  76. package/dist/registry/usage.js +2 -2
  77. package/dist/runtime-policy.d.ts +0 -2
  78. package/dist/runtime-policy.js +0 -16
  79. package/dist/scaffold/auth.d.ts +1 -2
  80. package/dist/scaffold/auth.js +55 -130
  81. package/dist/scaffold/backend.d.ts +0 -4
  82. package/dist/scaffold/backend.js +1 -186
  83. package/dist/scaffold/billing-schema.d.ts +1 -1
  84. package/dist/scaffold/billing-schema.js +4 -4
  85. package/dist/scaffold/billing.js +11 -19
  86. package/dist/scaffold/bootstrap.d.ts +2 -3
  87. package/dist/scaffold/bootstrap.js +37 -43
  88. package/dist/scaffold/compose.js +2 -14
  89. package/dist/scaffold/database.d.ts +1 -1
  90. package/dist/scaffold/database.js +18 -126
  91. package/dist/scaffold/documentation.d.ts +0 -1
  92. package/dist/scaffold/documentation.js +22 -86
  93. package/dist/scaffold/expo-auth.js +33 -22
  94. package/dist/scaffold/expo-billing.js +17 -52
  95. package/dist/scaffold/expo-runtime.d.ts +2 -2
  96. package/dist/scaffold/expo-runtime.js +6 -97
  97. package/dist/scaffold/integrations.d.ts +1 -3
  98. package/dist/scaffold/integrations.js +9 -10
  99. package/dist/scaffold/managed-email.d.ts +3 -0
  100. package/dist/scaffold/managed-email.js +47 -0
  101. package/dist/scaffold/native-ui.d.ts +2 -0
  102. package/dist/scaffold/native-ui.js +69 -0
  103. package/dist/scaffold/password-reset.d.ts +1 -0
  104. package/dist/scaffold/password-reset.js +99 -0
  105. package/dist/scaffold/private-files.d.ts +2 -0
  106. package/dist/scaffold/private-files.js +78 -0
  107. package/dist/scaffold/stack-documentation.d.ts +0 -1
  108. package/dist/scaffold/stack-documentation.js +3 -49
  109. package/dist/scaffold/styling.d.ts +1 -1
  110. package/dist/scaffold/styling.js +20 -28
  111. package/dist/scaffold/web-billing.d.ts +2 -0
  112. package/dist/scaffold/web-billing.js +48 -0
  113. package/dist/scaffold/workspace.js +53 -194
  114. package/dist/service-deletion.js +1 -1
  115. package/dist/service-descriptor.js +5 -12
  116. package/dist/service-model.d.ts +1 -1
  117. package/dist/service-operations.js +2 -32
  118. package/dist/service-readers.js +1 -32
  119. package/dist/services-command.d.ts +1 -1
  120. package/dist/services-command.js +3 -9
  121. package/dist/ship.d.ts +3 -316
  122. package/dist/ship.js +10 -142
  123. package/dist/stack-registry.d.ts +2 -52
  124. package/dist/stack-registry.js +55 -403
  125. package/dist/standard.js +7 -14
  126. package/dist/version.d.ts +1 -1
  127. package/dist/version.js +1 -1
  128. package/docs/anhedral-stack.md +23 -122
  129. package/docs/assets/anhedral-stack-light.png +0 -0
  130. package/docs/assets/anhedral-stack.png +0 -0
  131. package/docs/software-factory.md +24 -557
  132. package/docs/stack-standard.md +47 -294
  133. package/docs/verification.md +320 -0
  134. package/package.json +20 -22
  135. package/dist/neon-service-data.d.ts +0 -8
  136. package/dist/neon-service-data.js +0 -117
  137. package/dist/platforms/desktop.d.ts +0 -2
  138. package/dist/platforms/desktop.js +0 -415
  139. package/dist/platforms/extension.d.ts +0 -2
  140. package/dist/platforms/extension.js +0 -328
  141. package/dist/registry/presets.d.ts +0 -4
  142. package/dist/registry/presets.js +0 -41
  143. package/dist/scaffold/cloudflare-services.d.ts +0 -8
  144. package/dist/scaffold/cloudflare-services.js +0 -198
  145. package/dist/scaffold/lint.d.ts +0 -4
  146. package/dist/scaffold/lint.js +0 -56
  147. package/dist/scaffold/neon-realtime.d.ts +0 -2
  148. package/dist/scaffold/neon-realtime.js +0 -97
  149. package/dist/scaffold/services.d.ts +0 -5
  150. package/dist/scaffold/services.js +0 -108
  151. package/dist/scaffold/stream.d.ts +0 -2
  152. package/dist/scaffold/stream.js +0 -114
  153. package/dist/scaffold/void.d.ts +0 -4
  154. package/dist/scaffold/void.js +0 -264
  155. package/dist/scaffold/web.d.ts +0 -2
  156. package/dist/scaffold/web.js +0 -130
  157. package/dist/vercel-project.d.ts +0 -101
  158. package/dist/vercel-project.js +0 -305
  159. package/dist/vercel.d.ts +0 -67
  160. package/dist/vercel.js +0 -581
  161. package/dist/vinext.d.ts +0 -2
  162. package/dist/vinext.js +0 -86
  163. package/dist/void-execution.d.ts +0 -10
  164. package/dist/void-execution.js +0 -94
  165. package/dist/void-migrations.d.ts +0 -6
  166. package/dist/void-migrations.js +0 -110
  167. package/dist/void-state.d.ts +0 -16
  168. package/dist/void-state.js +0 -65
  169. package/dist/void.d.ts +0 -3
  170. package/dist/void.js +0 -5
@@ -0,0 +1,20 @@
1
+ import { Text as NativeText, StyleSheet, type TextProps as NativeTextProps } from 'react-native';
2
+ import { useTheme } from '../theme';
3
+ export type TextProps = NativeTextProps & {
4
+ variant?: 'heading' | 'title' | 'body' | 'muted' | 'caption' | 'label';
5
+ };
6
+ const typography = StyleSheet.create({
7
+ heading: { fontSize: 24, lineHeight: 32, fontWeight: '600' },
8
+ title: { fontSize: 16, lineHeight: 22, fontWeight: '500' },
9
+ body: { fontSize: 14, lineHeight: 20, fontWeight: '400' },
10
+ muted: { fontSize: 14, lineHeight: 20, fontWeight: '400' },
11
+ caption: { fontSize: 12, lineHeight: 20, fontWeight: '400' },
12
+ label: { fontSize: 14, lineHeight: 20, fontWeight: '500' },
13
+ });
14
+ export function Text({ variant = 'body', style, ...props }: TextProps) {
15
+ const { colors } = useTheme();
16
+ const color = ['muted', 'caption'].includes(variant)
17
+ ? colors['muted-foreground']
18
+ : colors.foreground;
19
+ return <NativeText {...props} style={[typography[variant], { color }, style]} />;
20
+ }
@@ -0,0 +1,22 @@
1
+ import { Stack } from './layout';
2
+ import { Button } from './button';
3
+ import { Text } from './text';
4
+ import { useTheme } from '../theme';
5
+ export function ThemeSwitcher() {
6
+ const { preference, setPreference } = useTheme();
7
+ return (
8
+ <Stack>
9
+ <Text variant="label">Appearance</Text>
10
+ {(['system', 'light', 'dark'] as const).map((value) => (
11
+ <Button
12
+ key={value}
13
+ variant={preference === value ? 'secondary' : 'ghost'}
14
+ accessibilityState={{ selected: preference === value }}
15
+ onPress={() => setPreference(value)}
16
+ >
17
+ {value === 'system' ? 'System' : value === 'light' ? 'Light' : 'Dark'}
18
+ </Button>
19
+ ))}
20
+ </Stack>
21
+ );
22
+ }
@@ -0,0 +1,25 @@
1
+ import { Appearance } from 'react-native';
2
+ import AsyncStorage from '@react-native-async-storage/async-storage';
3
+ import * as SystemUI from 'expo-system-ui';
4
+ const key = 'anhedral-theme';
5
+ export async function readPreference() {
6
+ try {
7
+ return await AsyncStorage.getItem(key);
8
+ } catch {
9
+ return null;
10
+ }
11
+ }
12
+ export async function savePreference(value: string) {
13
+ try {
14
+ await AsyncStorage.setItem(key, value);
15
+ } catch {
16
+ /* Preferences remain usable without storage. */
17
+ }
18
+ }
19
+ export function applyTheme(mode: 'light' | 'dark', background: string, preference: string) {
20
+ Appearance.setColorScheme(preference === 'system' ? 'unspecified' : mode);
21
+ void SystemUI.setBackgroundColorAsync(background).catch(() => {});
22
+ }
23
+ export function subscribePreference(_listener: (value: unknown) => void) {
24
+ return () => {};
25
+ }
@@ -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" | "electron" | "wxt" | "expo" | "vinext" | "realtime" | "workflows" | "styling" | "hono" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "queues" | "cron" | "analytics-engine" | "images" | "realtimekit" | "video" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "basin" | "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" | "electron" | "wxt" | "expo" | "vinext" | "realtime" | "workflows" | "styling" | "hono" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "queues" | "cron" | "analytics-engine" | "images" | "realtimekit" | "video" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "basin" | "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" | "electron" | "wxt" | "expo" | "vinext" | "realtime" | "workflows" | "styling" | "hono" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "queues" | "cron" | "analytics-engine" | "images" | "realtimekit" | "video" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "basin" | "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,17 +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 = [
8
- 'realtime',
9
- 'cron',
10
- 'workflows',
11
- 'workers-ai',
12
- 'analytics-engine',
13
- 'images',
14
- ];
6
+ const cloudflareResources = ['d1', 'r2'];
15
7
  function integration(id) {
16
- const provider = id === 'ai-sdk' ? 'openai' : id;
8
+ const provider = id;
17
9
  return Object.hasOwn(PROVIDER_DEFINITIONS, provider)
18
10
  ? provider
19
11
  : undefined;
@@ -31,43 +23,19 @@ function productCapability(id) {
31
23
  limits.push(...PROVIDER_DEFINITIONS[provider].ownerSteps, 'Live account permissions and provider behavior require authorized acceptance.');
32
24
  }
33
25
  if (cloudflareResources.includes(id)) {
34
- provisioning = stage('implemented', id === 'basin'
35
- ? 'Private Cloudflare stream and Worker binding.'
36
- : 'Selected Cloudflare resource and checked Worker binding.');
26
+ provisioning = stage('implemented', 'Selected Cloudflare resource and checked Worker binding.');
37
27
  limits.push('Account eligibility, quotas, and live runtime behavior require authorized acceptance.');
38
- if (id === 'basin')
39
- limits.push('Pipeline transforms and sinks are outside automated provisioning.');
40
28
  }
41
- if (deploymentBindings.includes(id)) {
42
- provisioning = stage('implemented', 'Worker deployment configures the selected binding or trigger.');
43
- 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.');
44
32
  }
45
- if (['vinext', 'next', 'hono'].includes(id))
46
- delivery = stage('implemented', id === 'next'
47
- ? 'Selected Cloudflare or Vercel deployment with provider identity and source checks.'
48
- : '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.');
49
35
  if (id === 'expo') {
50
36
  delivery = stage('implemented', 'EAS build request, build receipt verification, and artifact link.');
51
37
  limits.push('No store submission; signing, enrollment, device testing, and store distribution remain developer responsibilities.');
52
38
  }
53
- if (id === 'electron' || id === 'wxt') {
54
- delivery = stage('scaffold-only', 'Generated application and local build tooling; automated distribution is unavailable.');
55
- limits.push(id === 'electron'
56
- ? 'Signing, notarization, installers, updates, and distribution require a separate delivery workflow.'
57
- : 'Extension signing, store submission, review, and distribution require a separate delivery workflow.');
58
- }
59
- if (id === 'realtimekit' || id === 'video') {
60
- provisioning = stage('scaffold-only', 'Manual account activation and service configuration; no provider activation or credential installation during generation.', 'unverified');
61
- limits.push('Server-only helper; product authorization routes, client UI and live provider acceptance remain required.');
62
- }
63
- if (id === 'stream') {
64
- provisioning = stage('scaffold-only', 'Manual Stream activation and live input setup; no automatic Stream provisioning or runtime credential installation.', 'unverified');
65
- 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.');
66
- }
67
- if (id === 'neon-realtime') {
68
- 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');
69
- 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.');
70
- }
71
39
  if (id === 'better-auth')
72
40
  limits.push('Configure private authentication secret and public origin; apply and verify database migrations and authorization rules.');
73
41
  return {
@@ -104,11 +72,6 @@ export const CAPABILITY_CONTRACT = {
104
72
  delivery: stage('implemented', 'Provision selected resources, configure bindings/secrets, deploy Workers, inspect provider identity and source receipts.'),
105
73
  liveAcceptance: 'unverified',
106
74
  },
107
- {
108
- id: 'vercel',
109
- delivery: stage('implemented', 'Configure the selected project environment, deploy the web app, inspect provider identity and source receipts.'),
110
- liveAcceptance: 'unverified',
111
- },
112
75
  ],
113
76
  plugin: [
114
77
  {
@@ -125,11 +88,11 @@ export const CAPABILITY_CONTRACT = {
125
88
  },
126
89
  {
127
90
  id: 'live-analytics',
128
- 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.'),
129
92
  },
130
93
  {
131
94
  id: 'live-database-reader',
132
- 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.'),
133
96
  },
134
97
  {
135
98
  id: 'live-provider-health',
@@ -143,7 +106,6 @@ export const CAPABILITY_CONTRACT = {
143
106
  limits: [
144
107
  'Local contract tests are separate from live provider acceptance and completed application verification.',
145
108
  'Account selection, enrollment, billing approval, DNS ownership, and signing can require owner action.',
146
- 'Mixed hosting is sequential; no atomic cross-provider rollback or cached phase skipping is promised.',
147
109
  'The CLI scaffolds supported primitives; customer application features remain development work.',
148
110
  ],
149
111
  };
@@ -157,9 +119,8 @@ export function formatCapabilityContract() {
157
119
  '',
158
120
  'Providers: ' + CAPABILITY_CONTRACT.providers.map((provider) => provider.id).join(', '),
159
121
  'Expo delivery returns EAS artifacts; it does not submit to stores.',
160
- 'Electron and WXT distribution: scaffold only.',
161
122
  'Plugin: explicit selected-resource analytics, bounded database reads and provider status checks; live acceptance remains unverified.',
162
- 'Schedule execution history: unavailable. Resource status does not certify application health.',
123
+ 'Resource status does not certify application health.',
163
124
  '',
164
125
  ...CAPABILITY_CONTRACT.limits,
165
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);