anhedral 0.11.0 → 0.11.2

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 (149) hide show
  1. package/README.md +50 -170
  2. package/assets/patches/LICENSE.braces +21 -0
  3. package/assets/patches/LICENSE.node-forge +50 -0
  4. package/assets/patches/audit-deps.mjs +167 -0
  5. package/assets/patches/braces@3.0.3.patch +127 -0
  6. package/assets/patches/node-forge@1.4.0.patch +41 -0
  7. package/dist/auth-schema.js +3 -3
  8. package/dist/bin.js +15 -11
  9. package/dist/capabilities.d.ts +4 -4
  10. package/dist/capabilities.js +6 -2
  11. package/dist/capability-contract.js +22 -5
  12. package/dist/catalog-model.d.ts +24 -0
  13. package/dist/catalog-model.js +1 -0
  14. package/dist/catalog-registration.d.ts +16 -0
  15. package/dist/catalog-registration.js +22 -0
  16. package/dist/catalog-snapshot.d.ts +5 -0
  17. package/dist/catalog-snapshot.js +97 -0
  18. package/dist/cli-arguments.js +1 -1
  19. package/dist/cli-output.js +27 -2
  20. package/dist/cloudflare.d.ts +7 -1
  21. package/dist/cloudflare.js +36 -6
  22. package/dist/command-schema.js +49 -5
  23. package/dist/delivery.d.ts +10 -3
  24. package/dist/delivery.js +154 -37
  25. package/dist/dependencies.d.ts +24 -0
  26. package/dist/dependencies.js +48 -0
  27. package/dist/dependency-patches.d.ts +7 -0
  28. package/dist/dependency-patches.js +125 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +2 -0
  31. package/dist/inspector-model.d.ts +9 -1
  32. package/dist/integration-service-readers.d.ts +13 -0
  33. package/dist/integration-service-readers.js +173 -0
  34. package/dist/lifecycle.d.ts +0 -1
  35. package/dist/lifecycle.js +0 -1
  36. package/dist/neon-service-data.d.ts +8 -0
  37. package/dist/neon-service-data.js +117 -0
  38. package/dist/pnpm-policy.d.ts +2 -2
  39. package/dist/pnpm-policy.js +19 -45
  40. package/dist/project-catalog.d.ts +41 -0
  41. package/dist/project-catalog.js +288 -0
  42. package/dist/project-config.d.ts +14 -0
  43. package/dist/project-config.js +89 -0
  44. package/dist/project-inspector.js +73 -17
  45. package/dist/project-lifecycle.d.ts +25 -0
  46. package/dist/project-lifecycle.js +57 -0
  47. package/dist/project-state.d.ts +5 -1
  48. package/dist/project-state.js +122 -16
  49. package/dist/provider-auth.js +2 -3
  50. package/dist/provider-readiness.js +27 -10
  51. package/dist/providers/adapters.js +4 -1
  52. package/dist/providers/api.d.ts +1 -0
  53. package/dist/providers/api.js +1 -0
  54. package/dist/providers/config.js +6 -8
  55. package/dist/providers/provision.js +1 -1
  56. package/dist/providers/recovery.d.ts +1 -1
  57. package/dist/providers/runtime.d.ts +1 -1
  58. package/dist/providers/runtime.js +46 -23
  59. package/dist/providers/state.d.ts +1 -2
  60. package/dist/providers/state.js +14 -54
  61. package/dist/provision.d.ts +9 -0
  62. package/dist/provision.js +30 -1
  63. package/dist/r2-service-data.d.ts +2 -0
  64. package/dist/r2-service-data.js +136 -0
  65. package/dist/readiness.js +9 -13
  66. package/dist/registry/add.js +64 -21
  67. package/dist/registry/commands.js +7 -9
  68. package/dist/registry/options.d.ts +1 -1
  69. package/dist/registry/options.js +4 -4
  70. package/dist/registry/receipt.d.ts +1 -0
  71. package/dist/registry/receipt.js +19 -4
  72. package/dist/registry/resolve.js +5 -1
  73. package/dist/registry/usage.js +1 -5
  74. package/dist/render.d.ts +2 -0
  75. package/dist/render.js +6 -0
  76. package/dist/runtime-policy.d.ts +4 -0
  77. package/dist/runtime-policy.js +21 -0
  78. package/dist/scaffold/bootstrap.js +2 -2
  79. package/dist/scaffold/compose.js +9 -3
  80. package/dist/scaffold/database.js +107 -25
  81. package/dist/scaffold/documentation.js +18 -13
  82. package/dist/scaffold/lint.d.ts +4 -0
  83. package/dist/scaffold/lint.js +56 -0
  84. package/dist/scaffold/neon-realtime.d.ts +2 -0
  85. package/dist/scaffold/neon-realtime.js +97 -0
  86. package/dist/scaffold/stack-documentation.js +1 -1
  87. package/dist/scaffold/void.d.ts +4 -0
  88. package/dist/scaffold/void.js +256 -0
  89. package/dist/scaffold/web.js +7 -1
  90. package/dist/scaffold/workspace.js +120 -29
  91. package/dist/service-deletion.d.ts +29 -0
  92. package/dist/service-deletion.js +195 -0
  93. package/dist/service-descriptor.d.ts +10 -0
  94. package/dist/service-descriptor.js +78 -0
  95. package/dist/service-model.d.ts +49 -0
  96. package/dist/service-model.js +8 -0
  97. package/dist/service-operations.d.ts +29 -0
  98. package/dist/service-operations.js +78 -0
  99. package/dist/service-readers.d.ts +8 -0
  100. package/dist/service-readers.js +247 -0
  101. package/dist/services-command.d.ts +39 -0
  102. package/dist/services-command.js +100 -0
  103. package/dist/ship.d.ts +36 -8
  104. package/dist/ship.js +39 -13
  105. package/dist/stack-registry.d.ts +4 -2
  106. package/dist/stack-registry.js +41 -11
  107. package/dist/standard.js +23 -4
  108. package/dist/transaction.d.ts +2 -0
  109. package/dist/transaction.js +10 -0
  110. package/dist/util.js +17 -2
  111. package/dist/vercel.d.ts +2 -0
  112. package/dist/vercel.js +69 -13
  113. package/dist/version.d.ts +1 -1
  114. package/dist/version.js +1 -1
  115. package/dist/vinext.d.ts +1 -0
  116. package/dist/vinext.js +13 -1
  117. package/dist/void-execution.d.ts +10 -0
  118. package/dist/void-execution.js +94 -0
  119. package/dist/void-migrations.d.ts +6 -0
  120. package/dist/void-migrations.js +110 -0
  121. package/dist/void-state.d.ts +16 -0
  122. package/dist/void-state.js +65 -0
  123. package/dist/void.d.ts +3 -0
  124. package/dist/void.js +5 -0
  125. package/docs/cli-design.md +2 -2
  126. package/docs/plugin-ui.md +51 -10
  127. package/docs/provider-configuration.md +10 -11
  128. package/docs/software-factory.md +192 -0
  129. package/docs/stack-standard.md +142 -0
  130. package/docs/void-verification.md +185 -0
  131. package/package.json +23 -21
  132. package/assets/anhedral-mark.svg +0 -4
  133. package/assets/anhedral-stack-technical.svg +0 -322
  134. package/assets/anhedral-stack.svg +0 -322
  135. package/assets/anhedral.svg +0 -4
  136. package/assets/favicon.ico +0 -0
  137. package/assets/security/LICENSES.txt +0 -63
  138. package/assets/security/audit-deps.mjs +0 -300
  139. package/assets/security/braces-regression.mjs +0 -102
  140. package/assets/security/braces@3.0.3.patch +0 -285
  141. package/assets/security/decode-uri-component@0.2.2.patch +0 -149
  142. package/assets/security/decoder-regression.mjs +0 -37
  143. package/assets/security/forge-regression.mjs +0 -46
  144. package/assets/security/manifest.json +0 -53
  145. package/assets/security/node-forge@1.4.0.patch +0 -26
  146. package/dist/security-backports.d.ts +0 -3
  147. package/dist/security-backports.js +0 -26
  148. package/docs/application-stack-standard.md +0 -75
  149. package/docs/delivery-workflow.md +0 -97
@@ -0,0 +1,94 @@
1
+ import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ import {} from './project-state.js';
4
+ import { prepareVoidMigrations } from './void-migrations.js';
5
+ import { VOID_VERSION, supportsVoidRuntime } from './void.js';
6
+ /** Validate the local pin: never download or execute an unpinned fallback during delivery. */
7
+ async function assertVoidInstallation(directory, run, env) {
8
+ const version = (await run('node', ['-p', 'process.versions.node'], directory, env)).trim();
9
+ if (!supportsVoidRuntime(version))
10
+ throw new Error('Void delivery requires Node >=24.21.0.');
11
+ const pkg = JSON.parse(readFileSync(path.join(directory, 'package.json'), 'utf8'));
12
+ if ((pkg.dependencies?.void ?? pkg.devDependencies?.void) !== VOID_VERSION)
13
+ throw new Error(`Void delivery requires the exact local void@${VOID_VERSION} dependency.`);
14
+ const installed = (await run('pnpm', ['exec', 'void', '--version'], directory, env)).trim();
15
+ if (installed !== VOID_VERSION)
16
+ throw new Error(`Installed Void version differs from required ${VOID_VERSION}.`);
17
+ }
18
+ /** Bridge the already verified Wrangler identity into Void's separate cf process. */
19
+ export async function voidCloudflareEnvironment(directory, run, env) {
20
+ if (env.CLOUDFLARE_API_TOKEN)
21
+ return env;
22
+ let credentials;
23
+ try {
24
+ const raw = await run('pnpm', ['exec', 'wrangler', 'auth', 'token', '--json'], directory, env);
25
+ if (Buffer.byteLength(raw) > 64 * 1024)
26
+ throw new Error();
27
+ credentials = JSON.parse(raw);
28
+ }
29
+ catch {
30
+ throw new Error('Cannot retrieve structured Cloudflare credentials for Void delivery.');
31
+ }
32
+ if (!credentials || typeof credentials !== 'object' || Array.isArray(credentials))
33
+ throw new Error('Void requires scoped Cloudflare API-token or OAuth access.');
34
+ const credential = credentials;
35
+ if (!['oauth', 'api_token'].includes(String(credential.type)) ||
36
+ typeof credential.token !== 'string' ||
37
+ !/^[\x21-\x7e]{1,16384}$/.test(credential.token))
38
+ throw new Error('Void requires scoped Cloudflare API-token or OAuth access.');
39
+ return { ...env, CLOUDFLARE_API_TOKEN: credential.token };
40
+ }
41
+ /** Pin direct Cloudflare operations before secrets on a fresh checkout. */
42
+ function selectVoidCloudflare(directory) {
43
+ const folder = path.join(directory, '.void');
44
+ const file = path.join(folder, 'project.json');
45
+ if (existsSync(file)) {
46
+ const selection = JSON.parse(readFileSync(file, 'utf8'));
47
+ if (selection.platform !== 'cloudflare')
48
+ throw new Error('Void operation target must explicitly select the customer Cloudflare account.');
49
+ return;
50
+ }
51
+ mkdirSync(folder, { recursive: true, mode: 0o700 });
52
+ writeFileSync(file, JSON.stringify({ platform: 'cloudflare' }) + '\n', {
53
+ mode: 0o600,
54
+ flag: 'wx',
55
+ });
56
+ }
57
+ export function voidServerSecrets(values) {
58
+ return Object.fromEntries(Object.entries(values).filter(([key]) => !['VITE_', 'NEXT_PUBLIC_', 'EXPO_PUBLIC_'].some((prefix) => key.startsWith(prefix))));
59
+ }
60
+ /** Secret put is noninteractive with stdin; sync prompts even in CI in void@0.27. */
61
+ export async function syncVoidSecrets(directory, values, run, env, beforeMutation) {
62
+ for (const [key, value] of Object.entries(values)) {
63
+ if (!/^[A-Z][A-Z0-9_]*$/.test(key) ||
64
+ ['VITE_', 'NEXT_PUBLIC_', 'EXPO_PUBLIC_'].some((prefix) => key.startsWith(prefix)))
65
+ throw new Error('Void production secrets must be declared server environment keys.');
66
+ if (typeof value !== 'string' || !value.length || value.includes('\0') || value.endsWith('\n'))
67
+ throw new Error('Void secret values must be nonempty strings without NUL bytes or terminal newlines.');
68
+ }
69
+ if (!Object.keys(values).length)
70
+ return;
71
+ selectVoidCloudflare(directory);
72
+ await assertVoidInstallation(directory, run, env);
73
+ const authenticated = await voidCloudflareEnvironment(directory, run, env);
74
+ for (const [key, value] of Object.entries(values)) {
75
+ selectVoidCloudflare(directory);
76
+ await beforeMutation?.();
77
+ await run('pnpm', ['exec', 'void', 'secret', 'put', key], directory, authenticated, value);
78
+ }
79
+ }
80
+ export async function deployVoidTarget(directory, run, env) {
81
+ await assertVoidInstallation(directory, run, env);
82
+ if (existsSync(path.join(directory, 'anhedral.cloudflare.json')))
83
+ prepareVoidMigrations(path.resolve(directory, '../..'), directory, JSON.parse(readFileSync(path.join(directory, 'anhedral.cloudflare.json'), 'utf8')));
84
+ const authenticated = await voidCloudflareEnvironment(directory, run, env);
85
+ return run('pnpm', ['exec', 'void', 'deploy', '--platform', 'cloudflare'], directory, authenticated);
86
+ }
87
+ export async function rollbackVoidTarget(directory, versionId, run, env) {
88
+ if (!/^[a-f0-9-]{36}$/i.test(versionId))
89
+ throw new Error('Void rollback requires a complete Worker Version ID.');
90
+ selectVoidCloudflare(directory);
91
+ await assertVoidInstallation(directory, run, env);
92
+ const authenticated = await voidCloudflareEnvironment(directory, run, env);
93
+ return run('pnpm', ['exec', 'void', 'project', 'rollback', versionId], directory, authenticated);
94
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Void 0.27 validates conventional app db/migrations even when Wrangler applies
3
+ * a custom directory. Mirror only the designated owner's reviewed SQL/metadata,
4
+ * then let Void compare that validated set against packages/db/drizzle.
5
+ */
6
+ export declare function prepareVoidMigrations(root: string, directory: string, config: Record<string, unknown>): void;
@@ -0,0 +1,110 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, writeFileSync, } from 'node:fs';
3
+ import path from 'node:path';
4
+ const digest = (value) => createHash('sha256').update(value).digest('hex');
5
+ function files(directory, prefix = '') {
6
+ if (!existsSync(directory))
7
+ return [];
8
+ const result = [];
9
+ for (const name of readdirSync(directory)) {
10
+ const file = path.join(directory, name);
11
+ if (lstatSync(file).isSymbolicLink())
12
+ throw new Error('Void migration sources and generated files must not contain symlinks.');
13
+ if (lstatSync(file).isDirectory())
14
+ result.push(...files(file, prefix + name + '/'));
15
+ else if (lstatSync(file).isFile())
16
+ result.push(prefix + name);
17
+ else
18
+ throw new Error('Void migration sources must contain regular files.');
19
+ }
20
+ return result.sort();
21
+ }
22
+ function assertSafeAncestors(root, directory) {
23
+ const relative = path.relative(root, directory);
24
+ if (relative.startsWith('..') || path.isAbsolute(relative))
25
+ throw new Error('Void migration preparation must stay inside the application workspace.');
26
+ let current = root;
27
+ for (const component of relative.split(path.sep)) {
28
+ current = path.join(current, component);
29
+ if (existsSync(current) && lstatSync(current).isSymbolicLink())
30
+ throw new Error('Void migration paths must not traverse symlinks.');
31
+ }
32
+ }
33
+ /**
34
+ * Void 0.27 validates conventional app db/migrations even when Wrangler applies
35
+ * a custom directory. Mirror only the designated owner's reviewed SQL/metadata,
36
+ * then let Void compare that validated set against packages/db/drizzle.
37
+ */
38
+ export function prepareVoidMigrations(root, directory, config) {
39
+ const requestedRoot = path.resolve(root);
40
+ root = realpathSync(root);
41
+ const requestedDirectory = path.resolve(directory);
42
+ const requestedRelative = path.relative(requestedRoot, requestedDirectory);
43
+ if (!requestedRelative.startsWith('..') && !path.isAbsolute(requestedRelative))
44
+ assertSafeAncestors(requestedRoot, requestedDirectory);
45
+ // Normalize macOS temporary-directory aliases before workspace comparisons.
46
+ if (lstatSync(requestedDirectory).isSymbolicLink())
47
+ throw new Error('Void migration paths must not traverse symlinks.');
48
+ const realDirectory = realpathSync(requestedDirectory);
49
+ const relativeDirectory = path.relative(root, realDirectory);
50
+ if (relativeDirectory.startsWith('..') || path.isAbsolute(relativeDirectory))
51
+ throw new Error('Void migration preparation must stay inside the application workspace.');
52
+ directory = realDirectory;
53
+ assertSafeAncestors(root, directory);
54
+ const target = path.join(directory, 'db/migrations');
55
+ const receiptFile = path.join(directory, '.void/anhedral-migrations.json');
56
+ assertSafeAncestors(root, target);
57
+ assertSafeAncestors(root, receiptFile);
58
+ const databases = Array.isArray(config.d1_databases) ? config.d1_databases : [];
59
+ const owners = databases.filter((entry) => typeof entry.migrations_dir === 'string');
60
+ if (owners.length > 1)
61
+ throw new Error('One Void target may own only one shared D1 migration set.');
62
+ let receipt = null;
63
+ if (existsSync(receiptFile)) {
64
+ const parsed = JSON.parse(readFileSync(receiptFile, 'utf8'));
65
+ if (parsed.schemaVersion !== 1 ||
66
+ !parsed.files ||
67
+ typeof parsed.files !== 'object' ||
68
+ Array.isArray(parsed.files))
69
+ throw new Error('Invalid Void migration ownership receipt.');
70
+ receipt = parsed.files;
71
+ }
72
+ const current = files(target);
73
+ if (existsSync(target) && !receipt)
74
+ throw new Error('Refusing to overwrite an existing app db/migrations directory without Anhedral ownership evidence.');
75
+ if (receipt) {
76
+ const expected = Object.keys(receipt).sort();
77
+ if (JSON.stringify(current) !== JSON.stringify(expected) ||
78
+ current.some((file) => digest(readFileSync(path.join(target, file))) !== receipt[file]))
79
+ throw new Error('Generated Void migrations were edited; review them before preparing deployment.');
80
+ }
81
+ if (!owners.length) {
82
+ if (receipt) {
83
+ rmSync(target, { recursive: true, force: true });
84
+ rmSync(receiptFile);
85
+ }
86
+ return;
87
+ }
88
+ const source = path.resolve(directory, owners[0].migrations_dir);
89
+ const expectedSource = path.join(root, 'packages/db/drizzle');
90
+ if (source !== expectedSource)
91
+ throw new Error('Void migration owner must use packages/db/drizzle.');
92
+ assertSafeAncestors(root, source);
93
+ if (!existsSync(source))
94
+ throw new Error('Shared D1 migration directory does not exist.');
95
+ const names = files(source).filter((file) => /^[^/]+\.sql$/.test(file) || /^meta\/[^/]+\.json$/.test(file));
96
+ if (names.includes('seed.sql'))
97
+ throw new Error('Keep seed.sql outside the deployable shared migration directory.');
98
+ const contents = new Map(names.map((name) => [name, readFileSync(path.join(source, name))]));
99
+ if (receipt)
100
+ rmSync(target, { recursive: true, force: true });
101
+ mkdirSync(target, { recursive: true });
102
+ const hashes = {};
103
+ for (const [name, content] of contents) {
104
+ mkdirSync(path.dirname(path.join(target, name)), { recursive: true });
105
+ writeFileSync(path.join(target, name), content);
106
+ hashes[name] = digest(content);
107
+ }
108
+ mkdirSync(path.dirname(receiptFile), { recursive: true });
109
+ writeFileSync(receiptFile, JSON.stringify({ schemaVersion: 1, files: hashes }, null, 2) + '\n');
110
+ }
@@ -0,0 +1,16 @@
1
+ import type { DeploymentTarget } from './project-state.js';
2
+ export declare function voidLogSnapshot(directory?: string): Set<string>;
3
+ /** Pinned void@0.27.0 JSONL contract, inspected from its published distribution.
4
+ * Log prose never establishes success; exact terminal records and provider state do. */
5
+ export declare function readVoidDeploymentReceipt(before: Set<string>, directory: string, target: DeploymentTarget, startedAt: number, logs?: string): {
6
+ target: string;
7
+ versionId: string;
8
+ urls: string[];
9
+ providerConfirmed: boolean;
10
+ };
11
+ export declare function parseVoidDeploymentLog(source: string, directory: string, target: DeploymentTarget, startedAt: number): {
12
+ target: string;
13
+ versionId: string;
14
+ urls: string[];
15
+ providerConfirmed: boolean;
16
+ } | undefined;
@@ -0,0 +1,65 @@
1
+ import { existsSync, readdirSync, readFileSync, lstatSync, realpathSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import path from 'node:path';
4
+ const logsDirectory = () => path.join(homedir(), '.void', 'logs');
5
+ export function voidLogSnapshot(directory = logsDirectory()) {
6
+ return new Set(existsSync(directory)
7
+ ? readdirSync(directory).filter((name) => /^deploy-.+\.jsonl$/.test(name))
8
+ : []);
9
+ }
10
+ /** Pinned void@0.27.0 JSONL contract, inspected from its published distribution.
11
+ * Log prose never establishes success; exact terminal records and provider state do. */
12
+ export function readVoidDeploymentReceipt(before, directory, target, startedAt, logs = logsDirectory()) {
13
+ const receipts = [];
14
+ for (const name of voidLogSnapshot(logs)) {
15
+ if (before.has(name))
16
+ continue;
17
+ const file = path.join(logs, name);
18
+ const stat = lstatSync(file);
19
+ if (!stat.isFile() || stat.isSymbolicLink() || stat.size > 8 * 1024 * 1024)
20
+ continue;
21
+ const receipt = parseVoidDeploymentLog(readFileSync(file, 'utf8'), realpathSync(directory), target, startedAt);
22
+ if (!receipt)
23
+ continue;
24
+ receipts.push(receipt);
25
+ }
26
+ if (receipts.length !== 1)
27
+ throw new Error('No unique successful pinned Void deployment receipt. Deployment may have occurred; inspect provider status before retrying.');
28
+ return receipts[0];
29
+ }
30
+ export function parseVoidDeploymentLog(source, directory, target, startedAt) {
31
+ let records;
32
+ try {
33
+ records = source
34
+ .trim()
35
+ .split('\n')
36
+ .map((line) => JSON.parse(line));
37
+ }
38
+ catch {
39
+ return undefined;
40
+ }
41
+ if (records.some((record) => !record || typeof record !== 'object' || Array.isArray(record)))
42
+ return undefined;
43
+ const start = records[0];
44
+ const end = records.at(-1);
45
+ if (start?.msg !== 'deploy_start' ||
46
+ start.cwd !== directory ||
47
+ typeof start.ts !== 'number' ||
48
+ start.ts < startedAt ||
49
+ end?.msg !== 'deploy_end' ||
50
+ end.ok !== true)
51
+ return undefined;
52
+ const matches = records.filter((record) => record.msg === 'cloudflare_deploy_end' &&
53
+ record.ok === true &&
54
+ record.worker === target.workerName);
55
+ if (matches.length !== 1 ||
56
+ typeof matches[0].versionId !== 'string' ||
57
+ !/^[a-f0-9-]{36}$/i.test(matches[0].versionId))
58
+ return undefined;
59
+ return {
60
+ target: target.id,
61
+ versionId: matches[0].versionId,
62
+ urls: [],
63
+ providerConfirmed: false,
64
+ };
65
+ }
package/dist/void.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare const VOID_VERSION = "0.27.0";
2
+ export declare const VOID_NODE_ENGINE = ">=24.21.0";
3
+ export { supportsVoidRuntime } from './runtime-policy.js';
package/dist/void.js ADDED
@@ -0,0 +1,5 @@
1
+ // Exact delivery pin. Runtime and receipt adapters target this distribution.
2
+ // renovate: datasource=npm depName=void
3
+ export const VOID_VERSION = '0.27.0';
4
+ export const VOID_NODE_ENGINE = '>=24.21.0';
5
+ export { supportsVoidRuntime } from './runtime-policy.js';
@@ -38,7 +38,7 @@ anhedral doctor --cwd client-app --json
38
38
 
39
39
  Complete the selected provider settings and connect the intended hosting account before delivery, as described in [provider configuration](provider-configuration.md). The commands above are examples, not authorization to deploy an application.
40
40
 
41
- `--cwd` / `-c` selects the working directory and resolves relative directory arguments from it. `add <items...>` uses the current project; the earlier `add <directory> <items...>` form remains supported. Use `--cwd` or an explicit `./directory` when a directory name is also a stack item. `new` remains a compatibility alias for scaffolding an explicit destination; documentation and help lead with `init`.
41
+ `--cwd` / `-c` selects the working directory and resolves relative directory arguments from it. `init [directory]` scaffolds a workspace; `add <items...>` adds bundled parts to the current project. Use `anhedral --cwd <directory> add <items...>` to select a project explicitly.
42
42
 
43
43
  ## Output contract
44
44
 
@@ -52,7 +52,7 @@ Complete the selected provider settings and connect the intended hosting account
52
52
 
53
53
  `add --diff [path]` shows an applicable unified patch. `add --view [path]` shows generated source. Both imply a dry run and use the existing staged transaction; neither installs the preview. Without a path, they show the changed generated files. Conflict reporting still applies; previewing a conflict does not permit overwriting edited source.
54
54
 
55
- Previews exclude private environment files and `.anhedral/` state. Public `.env.example` / `.dev.vars.example` templates can be inspected. Binary, nonregular, or files over 256 KiB are marked unavailable. The combined preview has a 1 MiB limit; select a file for larger additions. Diffs use a linear single-contextual-hunk implementation, including explicit handling of final newlines and new empty files.
55
+ Previews exclude private environment files and `.anhedral/` state. Public `env.example` (Void), `.env.example`, and `.dev.vars.example` templates can be inspected. Binary, nonregular, or files over 256 KiB are marked unavailable. The combined preview has a 1 MiB limit; select a file for larger additions. Diffs use a linear single-contextual-hunk implementation, including explicit handling of final newlines and new empty files.
56
56
 
57
57
  A selection that needs a new upstream web bootstrap cannot produce source previews offline. The CLI explains this and directs the user to the selection-only `--dry-run` plan, which marks `filesChecked: false`. It does not fabricate files or run a networked generator during that preview.
58
58
 
package/docs/plugin-ui.md CHANGED
@@ -1,19 +1,26 @@
1
- # Anhedral project inspector
1
+ # Anhedral project dashboard
2
2
 
3
- Anhedral is headless-first: describe the application to Codex, review the selected stack, develop its features, authenticate to your providers and ship through the CLI. The optional project inspector displays the same local evidence available from `anhedral inspect --json`. Opening or refreshing it performs no provider calls, credential checks, provisioning, deployment or migrations.
3
+ Anhedral is headless-first: describe the application to Codex, review the selected stack, develop its features, authenticate to your providers and ship through the CLI. The optional dashboard starts with the same local evidence available from `anhedral inspect --json`. Opening it or refreshing the project performs no provider calls. Explicit service controls request live status, analytics or data through the shared CLI adapters.
4
4
 
5
5
  Building or packaging the plugin does not install or publish it. Actual Codex host rendering and composer behavior require separate verification; protocol tests do not establish those behaviors.
6
6
 
7
+ ## Project lifecycle
8
+
9
+ The overview begins with **Init → Auth → Ship**, derived by the same inspector used by the CLI. Init reports supported Anhedral configuration and local structural readiness. Auth lists selected providers and recorded account references; these are not proof of a valid session, permission or billing eligibility. Ship summarizes per-target success receipts and flags incomplete operations, conflicts and deletion history. A recorded success does not establish current source or live health.
10
+
11
+ Review source, provider access and shipping plan prepare unsent Codex drafts. They do not run commands directly. The workflow is equally usable through the headless CLI. Services remain a secondary, project-scoped view. Registering an arbitrary directory does not adopt its stack or activate lifecycle actions; supported Anhedral configuration must exist. There is no separate Anhedral account or hosted control plane.
12
+
7
13
  ## Screens and evidence
8
14
 
9
15
  | Screen | Information | Evidence boundary |
10
16
  | --- | --- | --- |
11
17
  | Overview | Project identity, stack selection, per-target latest attempt and last success | Recorded results; not live health or feature acceptance |
18
+ | Services | Application targets, configured bindings, provisioning receipts and selected integrations | Local inventory plus explicitly requested live readings; receipt matching uses resource kind and identifiers |
12
19
  | Stack | Workspace package dependencies, declared bindings, environment names and cron expressions | Package dependencies do not prove network calls; declarations do not prove resource existence |
13
20
  | Setup | Local prerequisites, selected providers, capability limits and setup guidance | Authentication, selected-account permission and billing remain not checked |
14
21
  | Delivery | Separate Cloudflare, Vercel and mobile records; integration pending outcomes and latest operation | One provider's success does not establish another's; old running records do not prove a process is active |
15
22
 
16
- The inspector has no live analytics reader, database-row reader, or schedule-execution reader. These unsupported tabs have been removed. Credentials do not activate an unimplemented reader. Environment names come from example files and reveal no values or proof of secret validity. Mobile download URLs may contain access tokens and are excluded; validated Expo build-page links may be displayed. Missing record timestamps and project identity are unavailable rather than invented.
23
+ Service controls expose only implemented readers; there is no schedule-execution reader. Environment names come from example files and reveal no values or proof of secret validity. Mobile download URLs may contain access tokens and are excluded; validated Expo build-page links may be displayed. Missing record timestamps and project identity are unavailable rather than invented.
17
24
 
18
25
  Every section is bounded and validated independently. A corrupt provider journal must not hide another target's valid evidence. Read time is explicitly distinct from receipt time. Configured, recorded and unknown states must remain distinguishable. General secret files, provider credential vaults, runtime state, raw diagnostics and absolute source paths are excluded from the UI projection.
19
26
 
@@ -21,7 +28,7 @@ Every section is bounded and validated independently. A corrupt provider journal
21
28
 
22
29
  New project opens a new composer with this prompt, without sending: “Create a new project using [@Anhedral](plugin://anhedral@anhedral). Start by explaining the stack and asking me what it should be about.” Setup and delivery actions prepare unsent drafts for the current conversation. The user reviews and sends the request before Codex acts. Unsupported hosts offer copyable text. Project selection updates authorized model context; it does not execute commands.
23
30
 
24
- Refresh reloads local files only. Rename and forget affect only local catalog metadata, never project source or provider resources. There is no project-creation or registration dialog. Register an explicitly authorized directory through the local operator command. MCP tool inputs accept project IDs rather than arbitrary filesystem paths.
31
+ Refresh reloads local files only. Rename and forget affect only local catalog metadata, never project source or provider resources. There is no project-creation or registration dialog. Successful `anhedral init` automatically registers its generated source in the local catalog. Existing sources can be registered through the local operator command. MCP tool inputs accept project IDs rather than arbitrary filesystem paths.
25
32
 
26
33
  ## Installation
27
34
 
@@ -33,29 +40,63 @@ The UI toolchain requires Node 22.13+ within Node 22, or Node 24+. The CLI retai
33
40
 
34
41
  ```sh
35
42
  pnpm install --frozen-lockfile
36
- pnpm --dir plugin-app install --frozen-lockfile
43
+ pnpm --dir plugins/codex/inspector install --frozen-lockfile
37
44
  pnpm build
38
45
  pnpm plugin:check
39
- ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" node plugin-app/dist/server.mjs register "$PWD" "Anhedral"
46
+ pnpm --dir plugins/codex/inspector exec playwright install chromium
47
+ pnpm --dir plugins/codex/inspector test:browser
48
+ ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" node plugins/codex/inspector/dist/server.mjs register "$PWD" "Anhedral"
40
49
  ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" pnpm plugin:preview
41
50
  ```
42
51
 
43
52
  Open `http://127.0.0.1:4317/`. The preview binds only to loopback, validates Host/Origin, bounds requests and uses a restrictive content security policy. `anhedral inspect [directory] --json` provides the shared read-only projection directly. `anhedral registry capabilities --json` explains the supported automation and owner steps.
44
53
 
45
- `src/project-inspector.ts` owns projection; `plugin-app/server/snapshot.ts` adds catalog identity. The browser only renders its validated schema. The MCP server exposes `open_projects`, `list_projects`, `get_project`, local metadata tools and model-only source/catalog context tools. They remain useful without UI rendering. Standard MCP Apps resources and bridge messages provide the optional panel, host themes and inline/fullscreen modes. Native host-specific draft support is a separate acceptance gate.
54
+ `src/project-inspector.ts` owns projection; `src/catalog-snapshot.ts` adds catalog identity. The browser only renders its validated schema. The MCP server exposes `open_projects`, `list_projects`, `get_project`, `get_project_services`, local metadata tools and model-only source/catalog context tools. They remain useful without UI rendering. Standard MCP Apps resources and bridge messages provide the optional panel, host themes and inline/fullscreen modes. Native host-specific draft support is a separate acceptance gate.
46
55
 
47
- The private catalog retains its existing on-disk location for registered users. List views read bounded summaries; only a selected project loads detailed inspection. The server does not automatically discover other projects. A remote server cannot inspect these local directories without a separately reviewed architecture; never publish the local catalog through a tunnel.
56
+ The plugin and standalone CLI share one private catalog. List views read bounded summaries; only a selected project loads detailed inspection. The server does not scan for other projects. CLI initialization registers new apps using the persistent `identity.id` in `anhedral.json`; recreating a directory creates a separate app rather than silently retargeting an old catalog entry. A remote server cannot inspect these local directories without a separately reviewed architecture; never publish the local catalog through a tunnel.
48
57
 
49
58
  ## Recovery and release review
50
59
 
51
60
  Interrupted catalog writers can be inspected and recovered with the same private catalog directory:
52
61
 
53
62
  ```sh
54
- ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" node plugin-app/dist/server.mjs recover-catalog-lock
63
+ ANHEDRAL_PLUGIN_DATA="$PWD/.artifacts/plugin-preview" node plugins/codex/inspector/dist/server.mjs recover-catalog-lock
55
64
  ```
56
65
 
57
66
  Only a proven dead same-host owner permits recovery. Live, foreign, malformed and uncertain owners remain blocked. Recovery changes catalog access only, not provider work or delivery state.
58
67
 
59
- Build/package checks bind the runtime and self-contained browser HTML to source and CLI version. Exact ZIP protocol tests exercise resources, schemas and headless tools. Before publication, verify native host entrypoints, unsent drafts, theme/reload behavior, all four sections, keyboard navigation and narrow screens against the exact rebuilt ZIP. Publication remains a separate reviewed action.
68
+ Build/package checks bind the runtime and self-contained browser HTML to source and CLI version. Exact ZIP protocol tests exercise resources, schemas and headless tools. Before publication, verify native host entrypoints, unsent drafts, theme/reload behavior, all supported sections, keyboard navigation and narrow screens against the exact rebuilt ZIP. Publication remains a separate reviewed action.
60
69
 
61
70
  The design follows the official [optional UI guidance](https://developers.openai.com/plugins/concepts/plugins#optional-ui) and [MCP Apps foundation](https://developers.openai.com/plugins/build/chatgpt-ui#start-with-mcp-apps).
71
+
72
+ ## Live service capabilities
73
+
74
+ Live readings require the selected provider account and resource permissions. Missing access, unavailable providers and absent resources are distinct from a successful reading. Analytics show their source, UTC window and sampling status; recorded deployment success does not imply current health.
75
+
76
+ | Service | Status | Analytics | Data | Confirmed deletion |
77
+ | --- | --- | --- | --- | --- |
78
+ | Cloudflare Worker | Settings existence | Requests, errors and CPU quantiles | — | — |
79
+ | D1 | Resource identity and current storage | Daily query/row counts and latency | Bounded table pages | Project-created, unshared resources |
80
+ | KV | Resource identity | — | Paginated key metadata; no values | Project-created, unshared resources |
81
+ | R2 | Bucket identity | — | Paginated object metadata; no contents | — |
82
+ | Queues | Resource identity | — | — | — |
83
+ | Vercel | Project/deployment status | Daily Web Analytics | — | — |
84
+ | Neon | Project identity | — | Bounded public-table pages | — |
85
+ | PostHog | Project identity | Hourly events and distinct IDs per bucket | — | — |
86
+ | Clerk, Resend, Stripe, RevenueCat, Sentry, OpenAI | Selected integration identity | — | — | — |
87
+
88
+ Neon browsing requires `ANHEDRAL_NEON_READONLY_URL`, optionally suffixed with the uppercase project ID (hyphens replaced by underscores). The endpoint must belong to that project. Each read transaction verifies a restricted role and read-only mode. Sensitive columns are masked before fetching; arbitrary SQL is not accepted.
89
+
90
+ R2 metadata browsing requires bucket-scoped read-only S3 credentials in `ANHEDRAL_R2_ACCESS_KEY_ID` and `ANHEDRAL_R2_SECRET_ACCESS_KEY`, optionally suffixed with the uppercase account ID. The reader signs only the selected account/bucket request and never downloads object contents.
91
+
92
+ Data rows, table names and deletion confirmation tokens are returned through private app metadata rather than model-visible MCP results. CLI data output is explicit user-requested output. Data views mask sensitive fields and do not provide an unmask control. D1 and Neon project bounded columns and mask sensitive columns in SQL before fetching rows; empty tables retain their schema. Database pages use explicit ordering, but concurrent writes can still change offset-based pages. KV and R2 metadata pages use provider cursors.
93
+
94
+ Deletion is intentionally limited to D1 and KV. Review shows the exact account, resource, affected applications and impact. The user must type the resource name. The server requires a short-lived, single-use token, revalidates source and provider identity, and rejects adopted resources or detected external Worker consumers. Provider reads cannot provide an atomic lock against another operator changing remote dependencies.
95
+
96
+ A deletion request is never automatically retried. Confirmed absence is required to report success. Pending or uncertain outcomes remain recorded across reloads and block automatic reprovisioning. Source bindings remain for explicit review before shipping; removing a service does not silently rewrite application code. This implementation does not delete whole applications or provider accounts.
97
+
98
+ The CLI shares these adapters: `anhedral services list --json` lists exact selectors; `anhedral help services` describes status, metrics, tables, data and the two-step deletion flow. No service operation provisions resources, changes billing or deploys code.
99
+
100
+ The catalog defaults to `~/.local/share/anhedral/projects`; `ANHEDRAL_PLUGIN_DATA` selects an alternate directory and `ANHEDRAL_DISABLE_CATALOG=1` disables initialization registration. A catalog failure leaves successfully generated source intact and reports a registration recovery action.
101
+
102
+ The inspector source lives in `plugins/codex/inspector`; the installable plugin source lives in `plugins/codex/distribution`. Packaging reads that directory and emits a self-contained ZIP. Immutable `plugin-v*` release tags retain the public `plugins/anhedral` installation path used by the marketplace; the publication script builds that tree from the verified ZIP. That release path is independent of the development checkout layout.
@@ -5,7 +5,7 @@ Anhedral scaffolds source, guides authentication, and provisions and configures
5
5
  ## Setup
6
6
 
7
7
  1. Run `anhedral init <directory> <stack-flags>`. Review the generated source and install dependencies.
8
- 2. Fill in `anhedral.providers.json`. It contains only selected integrations, nonsecret resource names, account identifiers, regions, and desired webhook settings. Empty account/domain fields require an explicit choice. Commit this file with the application source. To use an existing resource, set its ID instead of requesting a new project by name.
8
+ 2. Fill in the `providers` section of `anhedral.json`. It contains only selected integrations, nonsecret resource names, account identifiers, regions, and desired webhook settings. Empty account/domain fields require an explicit choice. Commit this file with the application source. To use an existing resource, set its ID instead of requesting a new project by name.
9
9
  3. Supply management credentials through the process environment and run `anhedral auth <directory>`. `--status` performs checks without opening login. Cloudflare, Vercel, and Expo support interactive CLI login; API integrations show their required credentials. A successful read does not prove every write permission.
10
10
  4. Connect the intended hosting account, project, plan, and audience using `anhedral connect`. Review and commit the connection manifest. Expo uses the explicit `owner` and `slug` in `apps/mobile/app.json`.
11
11
  5. Inspect `anhedral registry capabilities --json` for implemented scope and evidence limits, then inspect `anhedral ship <directory> --dry-run`. It reports missing provider settings without login, network requests, writes, provisioning, or deployment. Run `ship` after reviewing the plan and authorizing the provider operations.
@@ -20,7 +20,7 @@ Management keys do not belong in this manifest or application source. Runtime cr
20
20
 
21
21
  | Provider | Management credential | Automated configuration | Owner prerequisites and remaining application work |
22
22
  | --- | --- | --- | --- |
23
- | Neon | `NEON_API_KEY` | Create or select an explicitly scoped organization/project; check outstanding operations; obtain the selected database/role's pooled connection URI; configure runtime and migration environment files | An eligible account/region; reviewed schema and migrations; application data access |
23
+ | Neon | `NEON_API_KEY` | Create or select an explicitly scoped organization/project; check outstanding operations; obtain the selected database/role's pooled connection URI; configure the server runtime environment; migration credentials are configured separately | An eligible account/region; reviewed schema and migrations; application data access |
24
24
  | Clerk | `CLERK_PLATFORM_API_KEY` | Verify the selected workspace; create or select an application and environment; retrieve its matching publishable and secret keys | Platform API access; production domain/DNS/OAuth setup; application authorization. `CLERK_SECRET_KEY` alone verifies runtime access and cannot create an application |
25
25
  | Resend | `RESEND_API_KEY` with management access | Create or select the explicit sending domain; request verification; report required DNS records; issue a domain-scoped sending key only after verification | Domain ownership and DNS publication/propagation; sending eligibility; templates and delivery behavior |
26
26
  | Stripe | `STRIPE_SECRET_KEY` | Verify the explicit account and test/live key mode; configure a webhook with explicitly listed events when requested; securely retain its signing secret | Account activation for live payments; product/price decisions and webhook handlers. Provisioning does not invent a billing model or create financial commitments |
@@ -33,7 +33,7 @@ The adapters implement a bounded scaffolding setup, not every administration end
33
33
 
34
34
  ### Example manifest
35
35
 
36
- For a selected Hono + Neon + PostHog stack:
36
+ For a selected Hono + Neon + PostHog stack, the `providers` section contains the following value. Keep the other `anhedral.json` sections intact:
37
37
 
38
38
  ```json
39
39
  {
@@ -59,31 +59,30 @@ Replace example organization IDs with the intended account's actual identifiers.
59
59
 
60
60
  ## Delivery and retries
61
61
 
62
- Cloudflare reconciles D1, private R2 buckets, KV, Queues, and private JSON Basin streams. Basin HTTP ingestion stays disabled; the Worker binding is enabled. Sinks and transformations require application-specific design. Durable Objects, schedules, Workflows, and Workers AI bindings are configured through Worker deployment. Hyperdrive configurations added by a developer still require an explicit provider workflow.
62
+ For new supported Cloudflare workspaces, Void owns resource provisioning and deployment; Anhedral does not run its resource creator in parallel. Explicit resource declarations remain in `anhedral.cloudflare.json`, and Void records resolved identities in `void.lock.json`. Explicit OpenNext, queue/DLQ and Basin selections use Wrangler. Wrangler provisioning reconciles D1, private R2 buckets, KV, Queues, and private JSON Basin streams. Basin HTTP ingestion stays disabled; the Worker binding is enabled. Sinks and transformations require application-specific design. Durable Objects, schedules, Workflows, and Workers AI bindings are configured through Worker deployment. Hyperdrive configurations added by a developer still require an explicit provider workflow.
63
63
 
64
- If resource provisioning changes tracked binding IDs, `ship` returns `configuration-required` and stops before deployment. Review and commit those changes, then repeat the command. It never commits code automatically. Pending Neon operations or unverified Resend DNS return `provider-configuration-required` and stop deployment. The configured integrations' remaining product setup appears in their results.
64
+ If Wrangler resource provisioning changes tracked binding IDs, `ship` returns `configuration-required` before deployment. Void may already activate targets before writing new resource identities to their locks. When only the expected `void.lock.json` files change, it retains the activation receipts and returns `configuration-required`; live product verification remains blocked. Review and commit the changed bindings or locks, then ship the clean configuration. It never commits code automatically. Pending Neon operations or unverified Resend DNS return `provider-configuration-required` and stop deployment. The configured integrations' remaining product setup appears in their results.
65
65
 
66
66
  Review the generated database schema and apply the selected database migrations before testing application features or authentication. Generated tables and SDK factories are starting points; provisioning resources does not migrate the application database or implement its authorization rules.
67
67
 
68
- For selected Better Auth applications, shipping first reads `BETTER_AUTH_SECRET` and `BETTER_AUTH_URL` from the primary server's ignored, untracked runtime file. Configure a generated nonplaceholder secret of at least 32 characters and the intended HTTPS public origin. On POSIX systems this file must have mode `0600`; keep equivalent private file access on other systems. Tracked or symlinked files, broad file permissions, missing values, placeholder secrets, and unsafe origins stop shipping before provider mutations. For older generated Workers, remove `BETTER_AUTH_URL` or `BETTER_AUTH_SECRET` from tracked `wrangler.jsonc` `vars`, review and commit that change, then configure both values in the private runtime file. Wrangler cannot deploy a same-named plain variable and secret. The preflight does not generate a secret, choose a domain, modify files, configure OAuth, or verify application-user authorization.
68
+ For selected Better Auth applications, shipping first reads `BETTER_AUTH_SECRET` and `BETTER_AUTH_URL` from the primary server's ignored, untracked runtime file (`.env` for Void, `.dev.vars` for Wrangler Workers, `.env.local` for native Vercel). Configure a generated nonplaceholder secret of at least 32 characters and the intended HTTPS public origin. On POSIX systems this file must have mode `0600`; keep equivalent private file access on other systems. Tracked or symlinked files, broad file permissions, missing values, placeholder secrets, and unsafe origins stop shipping before provider mutations. Wrangler cannot deploy a same-named plain variable and secret; authentication credentials belong only in the private runtime file. The preflight does not generate a secret, choose a domain, modify files, configure OAuth, or verify application-user authorization.
69
69
 
70
- Cloudflare uploads runtime credentials with the code using Wrangler's `--secrets-file`; it does not make a separate secret update that deploys an old Worker. Temporary credential files are private and removed after the operation. Vercel configures only the selected web runtime's production environment, checks every returned result for success, and then performs the checked deployment. In mixed Vercel/Cloudflare projects, default `ship` coordinates Cloudflare services first, then the Vercel web application under one operation lock. `ship --provider cloudflare` or `ship --provider vercel` explicitly selects only that hosting target. A setup gate stops before the dependent web deployment. If Cloudflare completes and Vercel fails, the result is partial; no atomic provider or data rollback is attempted. Repeating `ship` rechecks both targets and reuses provider receipts where available; it does not skip completed phases merely because the diagnostic operation journal says they completed.
70
+ Void selects direct Cloudflare delivery explicitly and uploads server runtime credentials using noninteractive `void secret put` with stdin before publication. Values never appear in command arguments; public `VITE_*`, `NEXT_PUBLIC_*` and `EXPO_PUBLIC_*` build variables are excluded from these uploads. The pinned Vinext plugin loads the app `.env` for local builds and maps `NEXT_PUBLIC_*` into client bundles. Supply public values in the selected production build environment; uploading server secrets does not configure client bundles. Its separate Cloudflare process receives the verified API token or Wrangler OAuth credential only through the child-process environment. A secret update is a provider mutation even if the subsequent build or deployment fails. Wrangler Cloudflare delivery uploads runtime credentials with the code using Wrangler's `--secrets-file`; its private temporary credential files are removed after the operation. Vercel configures only the selected web runtime's production environment, checks every returned result for success, and then performs the checked deployment. In mixed Vercel/Cloudflare projects, default `ship` coordinates Cloudflare services first, then the Vercel web application under one operation lock. `ship --provider cloudflare` or `ship --provider vercel` explicitly selects only that hosting target. A setup gate stops before the dependent web deployment. If Cloudflare completes and Vercel fails, the result is partial; no atomic provider or data rollback is attempted. Repeating `ship` rechecks both targets and reuses provider receipts where available; it does not skip completed phases merely because the diagnostic operation journal says they completed.
71
71
 
72
72
  Shipping records nonsecret phases and outcome in ignored `.anhedral/operation.json`. This is a diagnostic journal, not a resumable transaction or proof of live product behavior. `status --json` and the dashboard can show the recorded operation; resource replay protection remains in the provider journals and deployment/build receipts. A new run records a new operation and revalidates current prerequisites.
73
73
 
74
- Creation receipts are saved immediately in ignored `.anhedral/providers.json`. Schema 2 keeps minimal creation identities and status there; supported one-time credentials are stored separately in ignored `.anhedral/provider-credentials.json` with private file permissions. Legacy schema 1 journals migrate credentials before replacing their full-response receipts, preserving recovery evidence if receipt writing is interrupted. Subsequent runs verify existing resources and reuse saved credentials. Ignored `.anhedral/runtime.json` contains deployment runtime values and must also remain private. A confirmed 4xx rejection can be retried after access is corrected. A timeout, malformed success response, rate limit, or server error can leave an unknown creation outcome: the CLI stops rather than replaying the mutation. Inspect the provider and preserve a secure backup of the receipt before reconciling the pending operation. Desired configuration changes also stop and require reconciliation. Never remove state blindly to bypass this check.
74
+ Creation receipts are saved immediately in ignored `.anhedral/providers.json`. Schema 2 keeps minimal creation identities and status there; supported one-time credentials are stored separately in ignored `.anhedral/provider-credentials.json` with private file permissions. Subsequent runs verify existing resources and reuse saved credentials. Ignored `.anhedral/runtime.json` contains deployment runtime values and must also remain private. A confirmed 4xx rejection can be retried after access is corrected. A timeout, malformed success response, rate limit, or server error can leave an unknown creation outcome: the CLI stops rather than replaying the mutation. Inspect the provider and preserve a secure backup of the receipt before reconciling the pending operation. Desired configuration changes also stop and require reconciliation. Never remove state blindly to bypass this check.
75
75
 
76
76
  Read-only API requests retry bounded transient failures (429, 502, 503, 504, transport interruptions and timeouts) within a 30-second overall deadline, with at most three attempts. Short provider retry delays are respected; longer delays return an actionable failure instead of retrying early. Invalid or oversized JSON is not retried. Mutating POST/PATCH requests are never replayed automatically, including requests carrying an idempotency key.
77
77
 
78
- Keep secure backups of `.anhedral/` and runtime environment files when moving machines. A fresh clone does not carry one-time credentials or provisioning receipts. Configure explicitly selected existing resource IDs and recover runtime credentials through authorized provider tooling rather than treating it as the original provisioning session. The CLI does not automatically delete, rotate, or replace resources. `integrations status` reads the journal without migration or writes. `integrations recover --provider <provider> --operation <exact hash> --resource <id>` verifies a supported existing resource against the unchanged recorded configuration, then writes only its local completion receipt. It never recreates or deletes a provider resource. Recovery is unavailable for legacy pending entries without operation metadata, changed desired configuration, and one-time credential creation when the original credential is missing; inspect the provider and retain secure backups. RevenueCat application recovery requires the parent project ID recorded explicitly in the original configuration.
78
+ Keep secure backups of `.anhedral/` and runtime environment files when moving machines. A fresh clone does not carry one-time credentials or provisioning receipts. Configure explicitly selected existing resource IDs and recover runtime credentials through authorized provider tooling rather than treating it as the original provisioning session. The CLI does not automatically delete, rotate, or replace resources. `integrations status` reads the journal without writes. `integrations recover --provider <provider> --operation <exact hash> --resource <id>` verifies a supported existing resource against the unchanged recorded configuration, then writes only its local completion receipt. It never recreates or deletes a provider resource. Recovery is unavailable for pending entries without operation metadata, changed desired configuration, and one-time credential creation when the original credential is missing; inspect the provider and retain secure backups. RevenueCat application recovery requires the parent project ID recorded explicitly in the original configuration.
79
79
 
80
80
  ```sh
81
81
  anhedral integrations status my-app --json
82
82
  anhedral integrations recover my-app --provider neon --operation <exact-64-character-hash> --resource <verified-project-id> --json
83
83
  ```
84
84
 
85
- Copy the operation hash from status and supply the intended resource ID yourself. Supported recovery checks cover known Neon projects, Clerk applications/workspace/environment, Resend domains, PostHog projects/organizations, active OpenAI projects, Sentry projects/teams/platform, and RevenueCat projects or explicitly scoped apps. They perform provider GET requests and then update only the local completion receipt. Status does not migrate old journals or create directories. It shows missing descriptors and one-time-credential operations as blocked. Resend sending keys, Stripe webhook signing secrets, and OpenAI service-account keys cannot be recovered from a resource ID alone; securely retained credentials and explicit provider inspection are required. Never paste credentials into the command or conversation.
86
-
85
+ Copy the operation hash from status and supply the intended resource ID yourself. Supported recovery checks cover known Neon projects, Clerk applications/workspace/environment, Resend domains, PostHog projects/organizations, active OpenAI projects, Sentry projects/teams/platform, and RevenueCat projects or explicitly scoped apps. They perform provider GET requests and then update only the local completion receipt. Status does not write journals or create directories. It shows missing descriptors and one-time-credential operations as blocked. Resend sending keys, Stripe webhook signing secrets, and OpenAI service-account keys cannot be recovered from a resource ID alone; securely retained credentials and explicit provider inspection are required. Never paste credentials into the command or conversation.
87
86
 
88
87
  ## Mobile delivery
89
88