anhedral 0.18.0 → 0.20.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 (128) hide show
  1. package/README.md +10 -6
  2. package/assets/contracts/deployment-provenance.json +6 -6
  3. package/assets/contracts/operations-provenance.json +2 -1
  4. package/assets/launch/oj/OJ.LICENSE +21 -0
  5. package/assets/launch/oj/run.mjs +82 -0
  6. package/assets/launch/oj/runtime.json +21 -0
  7. package/assets/launch/root.tsx.txt +1 -2
  8. package/assets/launch/server.ts.txt +4 -2
  9. package/assets/ui/catalog.json +36 -324
  10. package/dist/{platforms/web.d.ts → api-proxy.d.ts} +1 -3
  11. package/dist/api-proxy.js +48 -0
  12. package/dist/capability-catalog.d.ts +3 -57
  13. package/dist/capability-catalog.js +3 -90
  14. package/dist/capability-command.d.ts +10 -2
  15. package/dist/capability-command.js +35 -99
  16. package/dist/capability-editor.js +21 -1
  17. package/dist/capability-recipes.js +8 -343
  18. package/dist/cli-commands.js +6 -1
  19. package/dist/command-schema.js +141 -2
  20. package/dist/command-types.d.ts +1 -0
  21. package/dist/composition.d.ts +4 -14
  22. package/dist/composition.js +6 -6
  23. package/dist/contracts/cli-transport.d.ts +139 -40
  24. package/dist/contracts/cli-transport.js +96 -27
  25. package/dist/contracts/deployment.d.ts +7 -56
  26. package/dist/contracts/deployment.js +9 -45
  27. package/dist/contracts/production-transport.d.ts +71 -0
  28. package/dist/contracts/production-transport.js +56 -0
  29. package/dist/contracts/source-profile.js +1 -1
  30. package/dist/contracts/staging-transport.d.ts +2 -2
  31. package/dist/credential-helper.d.ts +2 -0
  32. package/dist/credential-helper.js +44 -0
  33. package/dist/dependencies.d.ts +0 -27
  34. package/dist/dependencies.js +3 -67
  35. package/dist/index.d.ts +0 -4
  36. package/dist/index.js +0 -2
  37. package/dist/launch.d.ts +11 -5
  38. package/dist/launch.js +21 -9
  39. package/dist/platform-command.js +245 -42
  40. package/dist/platform-production.d.ts +16 -0
  41. package/dist/platform-production.js +135 -0
  42. package/dist/platform-state.d.ts +4 -1
  43. package/dist/platform-state.js +28 -5
  44. package/dist/platforms/tanstack.d.ts +2 -0
  45. package/dist/platforms/tanstack.js +113 -20
  46. package/dist/registry/usage.js +3 -1
  47. package/dist/release-artifact.d.ts +18 -0
  48. package/dist/release-artifact.js +169 -0
  49. package/dist/scaffold/bootstrap.d.ts +3 -3
  50. package/dist/scaffold/styling.d.ts +3 -2
  51. package/dist/stack-update.d.ts +39 -0
  52. package/dist/stack-update.js +346 -0
  53. package/dist/transaction.d.ts +1 -0
  54. package/dist/transaction.js +2 -0
  55. package/dist/ui-catalog.d.ts +3 -5
  56. package/dist/ui-catalog.js +8 -24
  57. package/dist/ui-command.d.ts +1 -1
  58. package/dist/ui-command.js +18 -57
  59. package/dist/ui-project.d.ts +2 -2
  60. package/dist/ui-project.js +8 -36
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/docs/capabilities.md +7 -7
  64. package/docs/software-factory.md +83 -16
  65. package/docs/stack-standard.md +1 -1
  66. package/package.json +1 -4
  67. package/assets/stack/ai-schema.ts.txt +0 -5
  68. package/assets/stack/ai.ts.txt +0 -30
  69. package/assets/stack/desktop.rs.txt +0 -21
  70. package/assets/stack/event-retention.sql.txt +0 -10
  71. package/assets/stack/events-schema.ts.txt +0 -12
  72. package/assets/stack/events.ts.txt +0 -59
  73. package/assets/stack/mobile-auth.ts.txt +0 -25
  74. package/assets/stack/mobile-billing.tsx.txt +0 -63
  75. package/assets/stack/mobile-session.tsx.txt +0 -83
  76. package/assets/stack/native-button.tsx.txt +0 -108
  77. package/assets/stack/native-global.css.txt +0 -4
  78. package/assets/stack/native-lib-utils.ts.txt +0 -5
  79. package/assets/stack/native-metro.config.js.txt +0 -6
  80. package/assets/stack/native-nativewind-env.d.ts.txt +0 -1
  81. package/assets/stack/native-tailwind.config.js.txt +0 -73
  82. package/assets/stack/native-text.tsx.txt +0 -89
  83. package/assets/stack/purchases.ts.txt +0 -65
  84. package/assets/stack/revenuecat.ts.txt +0 -88
  85. package/assets/stack/rtc-schema.ts.txt +0 -10
  86. package/assets/stack/rtc.ts.txt +0 -122
  87. package/assets/stack/web-sign-in.tsx.txt +0 -51
  88. package/dist/capabilities.d.ts +0 -11
  89. package/dist/capabilities.js +0 -14
  90. package/dist/dependency-order.d.ts +0 -2
  91. package/dist/dependency-order.js +0 -24
  92. package/dist/platforms/lint.d.ts +0 -1
  93. package/dist/platforms/lint.js +0 -5
  94. package/dist/platforms/web.js +0 -251
  95. package/dist/project-config.d.ts +0 -3
  96. package/dist/project-config.js +0 -16
  97. package/dist/registry/context.d.ts +0 -3
  98. package/dist/registry/context.js +0 -20
  99. package/dist/registry/options.d.ts +0 -2
  100. package/dist/registry/options.js +0 -47
  101. package/dist/registry/resolve.d.ts +0 -11
  102. package/dist/registry/resolve.js +0 -46
  103. package/dist/registry/types.d.ts +0 -60
  104. package/dist/scaffold/api.d.ts +0 -2
  105. package/dist/scaffold/api.js +0 -38
  106. package/dist/scaffold/backend.d.ts +0 -2
  107. package/dist/scaffold/backend.js +0 -36
  108. package/dist/scaffold/compose.d.ts +0 -4
  109. package/dist/scaffold/compose.js +0 -30
  110. package/dist/scaffold/database.d.ts +0 -2
  111. package/dist/scaffold/database.js +0 -41
  112. package/dist/scaffold/documentation.d.ts +0 -2
  113. package/dist/scaffold/documentation.js +0 -71
  114. package/dist/scaffold/environment.d.ts +0 -4
  115. package/dist/scaffold/environment.js +0 -22
  116. package/dist/scaffold/stack-documentation.d.ts +0 -2
  117. package/dist/scaffold/stack-documentation.js +0 -6
  118. package/dist/scaffold/storage.d.ts +0 -2
  119. package/dist/scaffold/storage.js +0 -21
  120. package/dist/scaffold/workspace.d.ts +0 -3
  121. package/dist/scaffold/workspace.js +0 -141
  122. package/dist/stack-registry.d.ts +0 -35
  123. package/dist/stack-registry.js +0 -189
  124. package/dist/standard.d.ts +0 -8
  125. package/dist/standard.js +0 -109
  126. package/dist/workspace-graph.d.ts +0 -7
  127. package/dist/workspace-graph.js +0 -74
  128. /package/dist/{registry/types.js → command-types.js} +0 -0
@@ -0,0 +1,71 @@
1
+ import { z } from "zod";
2
+ export declare const productionCreateSchema: z.ZodObject<{
3
+ requestId: z.ZodUUID;
4
+ candidateId: z.ZodUUID;
5
+ name: z.ZodString;
6
+ expectedGeneration: z.ZodNumber;
7
+ }, z.core.$strict>;
8
+ export declare const productionConfigurationSchema: z.ZodObject<{
9
+ snapshotId: z.ZodUUID;
10
+ digest: z.ZodString;
11
+ environment: z.ZodLiteral<"production">;
12
+ }, z.core.$strict>;
13
+ export declare const productionCreateReceiptSchema: z.ZodObject<{
14
+ id: z.ZodUUID;
15
+ developmentId: z.ZodUUID;
16
+ candidateId: z.ZodUUID;
17
+ requestId: z.ZodUUID;
18
+ generation: z.ZodNumber;
19
+ configuration: z.ZodObject<{
20
+ snapshotId: z.ZodUUID;
21
+ digest: z.ZodString;
22
+ environment: z.ZodLiteral<"production">;
23
+ }, z.core.$strict>;
24
+ }, z.core.$strict>;
25
+ export declare const productionDeploymentSchema: z.ZodObject<{
26
+ id: z.ZodUUID;
27
+ developmentId: z.ZodUUID;
28
+ candidateId: z.ZodUUID;
29
+ requestId: z.ZodUUID;
30
+ generation: z.ZodNumber;
31
+ status: z.ZodEnum<{
32
+ queued: "queued";
33
+ preparing: "preparing";
34
+ ready: "ready";
35
+ published: "published";
36
+ failed: "failed";
37
+ superseded: "superseded";
38
+ }>;
39
+ sourceRevision: z.ZodString;
40
+ createdAt: z.ZodString;
41
+ updatedAt: z.ZodString;
42
+ }, z.core.$strict>;
43
+ export declare const productionStateSchema: z.ZodObject<{
44
+ enabled: z.ZodOptional<z.ZodBoolean>;
45
+ canDeploy: z.ZodBoolean;
46
+ requiresIndependentApproval: z.ZodBoolean;
47
+ generation: z.ZodNumber;
48
+ activeDeploymentId: z.ZodNullable<z.ZodUUID>;
49
+ desiredDeploymentId: z.ZodNullable<z.ZodUUID>;
50
+ deployments: z.ZodArray<z.ZodObject<{
51
+ id: z.ZodUUID;
52
+ developmentId: z.ZodUUID;
53
+ candidateId: z.ZodUUID;
54
+ requestId: z.ZodUUID;
55
+ generation: z.ZodNumber;
56
+ status: z.ZodEnum<{
57
+ queued: "queued";
58
+ preparing: "preparing";
59
+ ready: "ready";
60
+ published: "published";
61
+ failed: "failed";
62
+ superseded: "superseded";
63
+ }>;
64
+ sourceRevision: z.ZodString;
65
+ createdAt: z.ZodString;
66
+ updatedAt: z.ZodString;
67
+ }, z.core.$strict>>;
68
+ }, z.core.$strict>;
69
+ export type ProductionCreate = z.infer<typeof productionCreateSchema>;
70
+ export type ProductionCreateReceipt = z.infer<typeof productionCreateReceiptSchema>;
71
+ export type ProductionState = z.infer<typeof productionStateSchema>;
@@ -0,0 +1,56 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from "zod";
3
+ const productionDigest = z.string().regex(/^[a-f0-9]{64}$/);
4
+ export const productionCreateSchema = z
5
+ .object({
6
+ requestId: z.uuid(),
7
+ candidateId: z.uuid(),
8
+ name: z
9
+ .string()
10
+ .min(3)
11
+ .max(48)
12
+ .regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/),
13
+ expectedGeneration: z.number().int().nonnegative(),
14
+ })
15
+ .strict();
16
+ export const productionConfigurationSchema = z
17
+ .object({
18
+ snapshotId: z.uuid(),
19
+ digest: productionDigest,
20
+ environment: z.literal("production"),
21
+ })
22
+ .strict();
23
+ export const productionCreateReceiptSchema = z
24
+ .object({
25
+ id: z.uuid(),
26
+ developmentId: z.uuid(),
27
+ candidateId: z.uuid(),
28
+ requestId: z.uuid(),
29
+ generation: z.number().int().positive(),
30
+ configuration: productionConfigurationSchema,
31
+ })
32
+ .strict();
33
+ export const productionDeploymentSchema = z
34
+ .object({
35
+ id: z.uuid(),
36
+ developmentId: z.uuid(),
37
+ candidateId: z.uuid(),
38
+ requestId: z.uuid(),
39
+ generation: z.number().int().positive(),
40
+ status: z.enum(["queued", "preparing", "ready", "published", "failed", "superseded"]),
41
+ sourceRevision: productionDigest,
42
+ createdAt: z.string(),
43
+ updatedAt: z.string(),
44
+ })
45
+ .strict();
46
+ export const productionStateSchema = z
47
+ .object({
48
+ enabled: z.boolean().optional(),
49
+ canDeploy: z.boolean(),
50
+ requiresIndependentApproval: z.boolean(),
51
+ generation: z.number().int().nonnegative(),
52
+ activeDeploymentId: z.uuid().nullable(),
53
+ desiredDeploymentId: z.uuid().nullable(),
54
+ deployments: z.array(productionDeploymentSchema).max(30),
55
+ })
56
+ .strict();
@@ -1,5 +1,5 @@
1
1
  // Shared by trusted Worker source tools and native checkpoint inventory.
2
2
  export const INVENTORY_PROFILE = "anhedral-vinext-source-v2";
3
- export const excludedSource = /(?:^|\/)(?:node_modules|\.git|\.anhedral|\.next|\.turbo|\.wrangler|dist|build)(?:\/|$)/;
3
+ export const excludedSource = /(?:^|\/)(?:node_modules|\.git|\.anhedral|\.next|\.turbo|\.wrangler|\.oj-cache|dist|build)(?:\/|$)/;
4
4
  export const generatedSource = /^(?:apps\/mobile\/(?:\.expo|\.output)(?:\/|$)|apps\/api\/worker-configuration\.d\.ts$|apps\/web\/\.(?:void|open-next|tanstack)(?:\/|$)|apps\/web\/src\/routeTree\.gen\.ts$|apps\/web\/\.void-wrangler\.jsonc$|apps\/web\/(?:next-env\.d\.ts|worker-configuration\.d\.ts|tsconfig\.tsbuildinfo)$)/;
5
5
  export const secretSource = /(?:^|\/)(?:\.env[^/]*|\.dev\.vars[^/]*)(?:\/|$)/;
@@ -18,9 +18,9 @@ export declare const stagingDeploymentSchema: z.ZodObject<{
18
18
  queued: "queued";
19
19
  preparing: "preparing";
20
20
  ready: "ready";
21
- deployed: "deployed";
22
21
  failed: "failed";
23
22
  superseded: "superseded";
23
+ deployed: "deployed";
24
24
  }>;
25
25
  summary: z.ZodNullable<z.ZodString>;
26
26
  sourceRevision: z.ZodString;
@@ -47,9 +47,9 @@ export declare const stagingStateSchema: z.ZodObject<{
47
47
  queued: "queued";
48
48
  preparing: "preparing";
49
49
  ready: "ready";
50
- deployed: "deployed";
51
50
  failed: "failed";
52
51
  superseded: "superseded";
52
+ deployed: "deployed";
53
53
  }>;
54
54
  summary: z.ZodNullable<z.ZodString>;
55
55
  sourceRevision: z.ZodString;
@@ -0,0 +1,2 @@
1
+ /** Never resolve credential infrastructure from project/package-manager PATH. */
2
+ export declare function trustedLinuxCredentialHelper(explicit?: string | undefined): Promise<string>;
@@ -0,0 +1,44 @@
1
+ import { lstat, realpath } from 'node:fs/promises';
2
+ import { dirname, isAbsolute, join, parse } from 'node:path';
3
+ import { CliFailure } from './cli-errors.js';
4
+ const unavailable = () => new CliFailure('A trusted Linux Secret Service helper is unavailable.', 'PLATFORM_ACCESS_FAILED', 'Install a system-owned secret-tool, explicitly select a trusted system helper with ANHEDRAL_CLI_SECRET_TOOL_PATH, or use --credential-file.', 'context', false);
5
+ async function safePath(path, executable) {
6
+ // Validate the original chain as well as the canonical chain: an untrusted
7
+ // symlink or writable parent must not redirect a privileged helper lookup.
8
+ let current = parse(path).root;
9
+ const parts = path.slice(current.length).split('/').filter(Boolean);
10
+ for (const [index, part] of parts.entries()) {
11
+ current = join(current, part);
12
+ const entry = await lstat(current);
13
+ if (entry.uid !== 0 || (!entry.isSymbolicLink() && (entry.mode & 0o022) !== 0))
14
+ throw unavailable();
15
+ const last = index === parts.length - 1;
16
+ if (!entry.isSymbolicLink() && !(last && executable ? entry.isFile() : entry.isDirectory()))
17
+ throw unavailable();
18
+ if (last && executable && !entry.isSymbolicLink() && (entry.mode & 0o111) === 0)
19
+ throw unavailable();
20
+ }
21
+ const root = await lstat(parse(path).root);
22
+ if (root.uid !== 0 || (root.mode & 0o022) !== 0)
23
+ throw unavailable();
24
+ }
25
+ /** Never resolve credential infrastructure from project/package-manager PATH. */
26
+ export async function trustedLinuxCredentialHelper(explicit = process.env.ANHEDRAL_CLI_SECRET_TOOL_PATH) {
27
+ const candidates = explicit === undefined ? ['/usr/bin/secret-tool', '/bin/secret-tool'] : [explicit];
28
+ for (const candidate of candidates) {
29
+ try {
30
+ if (!isAbsolute(candidate) || /[\0\r\n]/.test(candidate) || dirname(candidate) === candidate)
31
+ throw unavailable();
32
+ await safePath(candidate, true);
33
+ const canonical = await realpath(candidate);
34
+ await safePath(canonical, true);
35
+ return canonical;
36
+ }
37
+ catch {
38
+ // An explicit selection never silently falls back to a different helper.
39
+ if (explicit !== undefined)
40
+ throw unavailable();
41
+ }
42
+ }
43
+ throw unavailable();
44
+ }
@@ -12,7 +12,6 @@ export declare const ANHEDRAL_STACK_DEPENDENCIES: {
12
12
  readonly vite: "8.3.5";
13
13
  readonly wrangler: "4.156.1";
14
14
  };
15
- export declare const OPENNEXT_GLOB_VERSION = "14.0.2";
16
15
  export declare const WORKSPACE_NODE_ENGINE = "^22.13.0 || >=24.0.0";
17
16
  export declare const PACKAGE_MANAGER = "pnpm@10.34.5";
18
17
  export declare const STACK_DEPENDENCIES: {
@@ -31,10 +30,8 @@ export declare const STACK_DEPENDENCIES: {
31
30
  readonly '@hono/zod-openapi': "1.6.3";
32
31
  readonly fallow: "3.34.0";
33
32
  readonly undici: "7.30.1";
34
- readonly 'react-native-purchases': "10.14.0";
35
33
  readonly stripe: "23.0.0";
36
34
  };
37
- /** Separate HTTP and inspector ports let all selected Workers run together. */
38
35
  export declare const WORKER_DEV_PORTS: {
39
36
  readonly api: {
40
37
  readonly http: 8787;
@@ -44,29 +41,5 @@ export declare const WORKER_DEV_PORTS: {
44
41
  export declare const CAPABILITY_DEPENDENCIES: {
45
42
  readonly 'better-auth': "1.7.7";
46
43
  readonly '@better-auth/drizzle-adapter': "1.7.7";
47
- readonly '@better-auth/expo': "1.7.7";
48
44
  readonly stripe: "23.0.0";
49
- readonly 'react-native-purchases': "10.14.0";
50
- readonly wxt: "0.21.5";
51
- readonly '@wxt-dev/module-react': "1.2.2";
52
- readonly expo: "56.0.12";
53
- readonly react: "19.2.3";
54
- readonly 'react-native': "0.85.3";
55
- readonly 'expo-secure-store': "56.0.4";
56
- readonly 'expo-linking': "56.0.14";
57
- readonly '@types/react': "19.2.14";
58
- readonly 'babel-preset-expo': "56.0.8";
59
- readonly nativewind: "4.2.7";
60
- readonly 'react-native-css-interop': "0.2.7";
61
- readonly 'react-native-reanimated': "4.3.1";
62
- readonly 'react-native-worklets': "0.8.3";
63
- readonly 'react-native-safe-area-context': "5.7.0";
64
- readonly 'class-variance-authority': "0.7.1";
65
- readonly clsx: "2.1.1";
66
- readonly 'tailwind-merge': "3.5.0";
67
- readonly 'tailwindcss-animate': "1.0.7";
68
- readonly '@rn-primitives/portal': "1.5.2";
69
- readonly '@rn-primitives/slot': "1.5.2";
70
- readonly tailwindcss: "3.4.19";
71
- readonly '@types/react-dom': "19.2.3";
72
45
  };
@@ -1,13 +1,9 @@
1
1
  export const WEB_DEPENDENCIES = {
2
2
  dependencies: {
3
- // renovate: datasource=npm depName=next
4
- next: '16.4.2',
5
3
  // renovate: datasource=npm depName=react
6
4
  react: '19.2.3',
7
5
  // renovate: datasource=npm depName=react-dom
8
6
  'react-dom': '19.2.3',
9
- // renovate: datasource=npm depName=server-only
10
- 'server-only': '0.0.1',
11
7
  // renovate: datasource=npm depName=@base-ui/react
12
8
  '@base-ui/react': '1.9.0',
13
9
  // renovate: datasource=npm depName=class-variance-authority
@@ -16,16 +12,12 @@ export const WEB_DEPENDENCIES = {
16
12
  clsx: '2.1.1',
17
13
  // renovate: datasource=npm depName=tailwind-merge
18
14
  'tailwind-merge': '3.5.0',
19
- // renovate: datasource=npm depName=@opennextjs/cloudflare
20
- '@opennextjs/cloudflare': '1.20.12',
21
15
  },
22
16
  devDependencies: {
23
17
  // renovate: datasource=npm depName=tailwindcss
24
18
  tailwindcss: '4.3.3',
25
19
  // renovate: datasource=npm depName=@tailwindcss/postcss
26
20
  '@tailwindcss/postcss': '4.3.3',
27
- // renovate: datasource=npm depName=eslint-config-next
28
- 'eslint-config-next': '16.4.2',
29
21
  // renovate: datasource=npm depName=eslint
30
22
  eslint: '9.39.5',
31
23
  // renovate: datasource=npm depName=typescript
@@ -40,7 +32,7 @@ export const WEB_DEPENDENCIES = {
40
32
  wrangler: '4.151.0',
41
33
  },
42
34
  };
43
- // Current Anhedral Stack framework/build tooling; legacy generators retain their own pins.
35
+ // Anhedral Stack framework/build tooling.
44
36
  export const ANHEDRAL_STACK_DEPENDENCIES = {
45
37
  // renovate: datasource=npm depName=@tanstack/react-start
46
38
  '@tanstack/react-start': '1.169.4',
@@ -57,8 +49,6 @@ export const ANHEDRAL_STACK_DEPENDENCIES = {
57
49
  // renovate: datasource=npm depName=wrangler
58
50
  wrangler: '4.156.1',
59
51
  };
60
- // renovate: datasource=npm depName=glob
61
- export const OPENNEXT_GLOB_VERSION = '14.0.2';
62
52
  export const WORKSPACE_NODE_ENGINE = '^22.13.0 || >=24.0.0';
63
53
  export const PACKAGE_MANAGER = 'pnpm@10.34.5';
64
54
  export const STACK_DEPENDENCIES = {
@@ -92,69 +82,15 @@ export const STACK_DEPENDENCIES = {
92
82
  fallow: '3.34.0',
93
83
  // renovate: datasource=npm depName=undici
94
84
  undici: '7.30.1',
95
- // renovate: datasource=npm depName=react-native-purchases
96
- 'react-native-purchases': '10.14.0',
97
85
  // renovate: datasource=npm depName=stripe
98
86
  stripe: '23.0.0',
99
87
  };
100
- /** Separate HTTP and inspector ports let all selected Workers run together. */
101
- export const WORKER_DEV_PORTS = {
102
- api: { http: 8787, inspector: 9231 },
103
- };
104
- // Independently selected progressive client and service recipes.
88
+ export const WORKER_DEV_PORTS = { api: { http: 8787, inspector: 9231 } };
89
+ // Backend, storage and payments extend the same Anhedral Stack foundation.
105
90
  export const CAPABILITY_DEPENDENCIES = {
106
91
  // renovate: datasource=npm depName=better-auth
107
92
  'better-auth': '1.7.7',
108
93
  // renovate: datasource=npm depName=@better-auth/drizzle-adapter
109
94
  '@better-auth/drizzle-adapter': '1.7.7',
110
- // renovate: datasource=npm depName=@better-auth/expo
111
- '@better-auth/expo': '1.7.7',
112
- // renovate: datasource=npm depName=stripe
113
95
  stripe: '23.0.0',
114
- // renovate: datasource=npm depName=react-native-purchases
115
- 'react-native-purchases': '10.14.0',
116
- // renovate: datasource=npm depName=wxt
117
- wxt: '0.21.5',
118
- // renovate: datasource=npm depName=@wxt-dev/module-react
119
- '@wxt-dev/module-react': '1.2.2',
120
- // renovate: datasource=npm depName=expo
121
- expo: '56.0.12',
122
- // renovate: datasource=npm depName=react
123
- react: '19.2.3',
124
- // renovate: datasource=npm depName=react-native
125
- 'react-native': '0.85.3',
126
- // renovate: datasource=npm depName=expo-secure-store
127
- 'expo-secure-store': '56.0.4',
128
- // renovate: datasource=npm depName=expo-linking
129
- 'expo-linking': '56.0.14',
130
- // renovate: datasource=npm depName=@types/react
131
- '@types/react': '19.2.14',
132
- // renovate: datasource=npm depName=babel-preset-expo
133
- 'babel-preset-expo': '56.0.8',
134
- // renovate: datasource=npm depName=nativewind
135
- nativewind: '4.2.7',
136
- // renovate: datasource=npm depName=react-native-css-interop
137
- 'react-native-css-interop': '0.2.7',
138
- // renovate: datasource=npm depName=react-native-reanimated
139
- 'react-native-reanimated': '4.3.1',
140
- // renovate: datasource=npm depName=react-native-worklets
141
- 'react-native-worklets': '0.8.3',
142
- // renovate: datasource=npm depName=react-native-safe-area-context
143
- 'react-native-safe-area-context': '5.7.0',
144
- // renovate: datasource=npm depName=class-variance-authority
145
- 'class-variance-authority': '0.7.1',
146
- // renovate: datasource=npm depName=clsx
147
- clsx: '2.1.1',
148
- // renovate: datasource=npm depName=tailwind-merge
149
- 'tailwind-merge': '3.5.0',
150
- // renovate: datasource=npm depName=tailwindcss-animate
151
- 'tailwindcss-animate': '1.0.7',
152
- // renovate: datasource=npm depName=@rn-primitives/portal
153
- '@rn-primitives/portal': '1.5.2',
154
- // renovate: datasource=npm depName=@rn-primitives/slot
155
- '@rn-primitives/slot': '1.5.2',
156
- // renovate: datasource=npm depName=tailwindcss
157
- tailwindcss: '3.4.19',
158
- // renovate: datasource=npm depName=@types/react-dom
159
- '@types/react-dom': '19.2.3',
160
96
  };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,4 @@
2
2
  export { scaffoldLaunchProject as scaffoldAnhedralStack } from './launch.js';
3
3
  export type { LaunchOptions as AnhedralStackOptions } from './launch.js';
4
4
  export { parseAnhedralStackOptions as parseInitOptions } from './launch.js';
5
- /** @deprecated Retained SDK compatibility. Use scaffoldAnhedralStack and parseInitOptions. */
6
- export { parseStandardOptions, scaffoldStandardProject, STANDARD_PRODUCTS, STANDARD_USAGE, } from './standard.js';
7
- /** @deprecated Retained SDK compatibility. Use AnhedralStackOptions for new apps. */
8
- export type { StandardOptions, StandardProduct, StandardRunner } from './standard.js';
9
5
  export { GENERATOR_VERSION } from './version.js';
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  /** The Anhedral Stack: one web foundation with progressive backend, storage and payments. */
2
2
  export { scaffoldLaunchProject as scaffoldAnhedralStack } from './launch.js';
3
3
  export { parseAnhedralStackOptions as parseInitOptions } from './launch.js';
4
- /** @deprecated Retained SDK compatibility. Use scaffoldAnhedralStack and parseInitOptions. */
5
- export { parseStandardOptions, scaffoldStandardProject, STANDARD_PRODUCTS, STANDARD_USAGE, } from './standard.js';
6
4
  export { GENERATOR_VERSION } from './version.js';
package/dist/launch.d.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import { type OutputOptions } from './cli-output.js';
2
- import type { StandardOptions, StandardRunner } from './registry/types.js';
3
- export type LaunchOptions = Pick<StandardOptions, 'root' | 'name' | 'skipInstall' | 'dryRun' | 'json' | 'initializeGit'>;
4
- /** One stack, with directory/install options only; no legacy product selections. */
2
+ import type { CommandRunner } from './command-types.js';
3
+ export interface LaunchOptions {
4
+ root: string;
5
+ name: string;
6
+ skipInstall: boolean;
7
+ dryRun: boolean;
8
+ json: boolean;
9
+ initializeGit: boolean;
10
+ }
5
11
  export declare function parseAnhedralStackOptions(args: readonly string[]): LaunchOptions;
6
12
  export declare function launchPlan(options: LaunchOptions): {
7
13
  schemaVersion: number;
@@ -11,11 +17,11 @@ export declare function launchPlan(options: LaunchOptions): {
11
17
  products: string[];
12
18
  stack: string;
13
19
  foundation: string;
14
- capabilities: ("hono" | "database-auth" | "r2" | "stripe" | "realtime" | "rtc" | "ai" | "expo" | "native-ui" | "revenuecat" | "wxt" | "side-panel" | "gpui")[];
20
+ capabilities: ("hono" | "database-auth" | "r2" | "stripe")[];
15
21
  targets: string[];
16
22
  dryRun: boolean;
17
23
  resourcesProvisioned: boolean;
18
24
  hostedAdmission: string;
19
25
  };
20
26
  /** Fresh directories only; source commit and installation retain the existing recovery contract. */
21
- export declare function scaffoldLaunchProject(options: LaunchOptions, run?: StandardRunner, output?: OutputOptions): Promise<void>;
27
+ export declare function scaffoldLaunchProject(options: LaunchOptions, run?: CommandRunner, output?: OutputOptions): Promise<void>;
package/dist/launch.js CHANGED
@@ -16,11 +16,23 @@ import { GENERATOR_VERSION } from './version.js';
16
16
  import { PACKAGE_MANAGER, STACK_DEPENDENCIES, WORKSPACE_NODE_ENGINE } from './dependencies.js';
17
17
  import { execFile, appendGitignore } from './util.js';
18
18
  import { printProgress, printResult } from './cli-output.js';
19
- import { parseStandardOptions } from './registry/options.js';
20
- /** One stack, with directory/install options only; no legacy product selections. */
19
+ import { CliArgumentError, commandArguments } from './cli-arguments.js';
20
+ import { packageNameFromText } from './render.js';
21
21
  export function parseAnhedralStackOptions(args) {
22
- const { root, name, skipInstall, dryRun, json, initializeGit } = parseStandardOptions(args);
23
- return { root, name, skipInstall, dryRun, json, initializeGit };
22
+ const parsed = commandArguments('init', args);
23
+ const hasDirectory = parsed.positional.length > 0;
24
+ const directory = hasDirectory ? parsed.positional[0] : process.cwd();
25
+ if (!directory)
26
+ throw new CliArgumentError('Specify a valid initialization directory.', 'Run anhedral init --help.');
27
+ const root = path.resolve(directory);
28
+ return {
29
+ root,
30
+ name: packageNameFromText(path.basename(root)),
31
+ skipInstall: parsed.has('--skip-install'),
32
+ dryRun: parsed.has('--dry-run'),
33
+ json: parsed.has('--json'),
34
+ initializeGit: parsed.has('--git') || (!parsed.has('--no-git') && hasDirectory),
35
+ };
24
36
  }
25
37
  const launchCapabilities = [];
26
38
  function rootFiles(root, name) {
@@ -56,7 +68,7 @@ function rootFiles(root, name) {
56
68
  setPnpmPolicy(root, {
57
69
  packages: ['apps/*', 'packages/*'],
58
70
  sharedWorkspaceLockfile: true,
59
- onlyBuiltDependencies: ['esbuild', 'workerd'],
71
+ allowBuilds: { esbuild: true, workerd: true },
60
72
  });
61
73
  json(root, 'anhedral.json', {
62
74
  schemaVersion: 1,
@@ -81,7 +93,7 @@ function rootFiles(root, name) {
81
93
  capabilities: Object.fromEntries(launchCapabilities.map((id) => [id, GENERATOR_VERSION])),
82
94
  }),
83
95
  });
84
- appendGitignore(root, 'node_modules/\ndist/\n.turbo/\n.wrangler/\n.tanstack/\n*.tsbuildinfo\nworker-configuration.d.ts\n.dev.vars\n.dev.vars.*\n!.dev.vars.example\n.env\n.env.*\n!.env.example\n.anhedral/\n'
96
+ appendGitignore(root, 'node_modules/\ndist/\n.turbo/\n.wrangler/\n.tanstack/\n.oj-cache/\n*.tsbuildinfo\nworker-configuration.d.ts\n.dev.vars\n.dev.vars.*\n!.dev.vars.example\n.env\n.env.*\n!.env.example\n.anhedral/\n'
85
97
  .trim()
86
98
  .split('\n'));
87
99
  writeDependencyAudit(root);
@@ -89,7 +101,7 @@ function rootFiles(root, name) {
89
101
  function documentation(root, name) {
90
102
  put(root, 'README.md', `# ${name}
91
103
 
92
- Anhedral Stack: web UI powered by TanStack Start server rendering/server functions
104
+ Anhedral Stack: web UI powered by OJ and TanStack Start server rendering/server functions
93
105
  and source-owned shadcn Anhedral UI.
94
106
  Only the web application is created initially. No backend or provider is provisioned.
95
107
 
@@ -113,7 +125,7 @@ Set PUBLIC_APP_URL=http://localhost:3000 and generate BETTER_AUTH_SECRET with
113
125
  Auth methods start disabled. Deliberately enable chosen methods in
114
126
  apps/api/src/auth-features.ts after configuring email/credentials and policies.
115
127
  Run pnpm db:migrate --local explicitly to initialize the isolated local D1 database,
116
- then pnpm dev. Vite runs the web and auxiliary API Workers with shared local
128
+ then pnpm dev. OJ runs the web and auxiliary API Workers with shared local
117
129
  persistence. Remote bindings are disabled for local development.
118
130
 
119
131
  R2 routes enforce authenticated owner access. Stripe adds schema and source only:
@@ -130,7 +142,7 @@ Composition adapters are fingerprinted and customized files are never overwritte
130
142
 
131
143
  Builds/startup never migrate databases. Provision D1/R2 only when selected and
132
144
  configure environment-specific resources/secrets separately. pnpm build emits web
133
- and selected API Worker artifacts under apps/web/dist. Anhedral Platform admission
145
+ Worker artifacts under apps/web/dist and selected API artifacts under apps/api/dist. Anhedral Platform admission
134
146
  requires its separately reviewed Anhedral Stack runtime/artifact; generation is not activation.
135
147
  `);
136
148
  put(root, 'AGENTS.md', `# Anhedral Stack application