anhedral 0.17.0 → 0.19.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.
- package/README.md +33 -68
- package/assets/contracts/LICENSE +201 -0
- package/assets/contracts/LICENSE.environment +201 -0
- package/assets/contracts/LICENSE.operations +201 -0
- package/assets/contracts/deployment-provenance.json +15 -0
- package/assets/contracts/environment-provenance.json +11 -0
- package/assets/contracts/operations-provenance.json +12 -0
- package/assets/launch/application.server.ts.txt +13 -0
- package/assets/launch/auth-client.ts.txt +4 -0
- package/assets/launch/home.tsx.txt +20 -0
- package/assets/launch/minimal-application.server.ts.txt +5 -0
- package/assets/launch/minimal-server.ts.txt +7 -0
- package/assets/launch/oj/OJ.LICENSE +21 -0
- package/assets/launch/oj/run.mjs +82 -0
- package/assets/launch/oj/runtime.json +21 -0
- package/assets/launch/request-context.ts.txt +3 -0
- package/assets/launch/root.tsx.txt +26 -0
- package/assets/launch/router.tsx.txt +21 -0
- package/assets/launch/server.ts.txt +15 -0
- package/assets/launch/sign-in.tsx.txt +53 -0
- package/assets/launch/styles.css.txt +19 -0
- package/assets/security/credential-patterns.d.mts +3 -0
- package/assets/security/credential-patterns.mjs +59 -0
- package/assets/stack/api-index.ts.txt +6 -1
- package/assets/stack/stripe.ts.txt +30 -13
- package/assets/ui/catalog.json +36 -324
- package/dist/{platforms/web.d.ts → api-proxy.d.ts} +1 -3
- package/dist/api-proxy.js +48 -0
- package/dist/bin.js +55 -36
- package/dist/capability-catalog.d.ts +36 -57
- package/dist/capability-catalog.js +65 -67
- package/dist/capability-command.d.ts +3 -3
- package/dist/capability-command.js +146 -59
- package/dist/capability-editor.js +6 -5
- package/dist/capability-recipes.js +9 -296
- package/dist/cli-arguments.d.ts +2 -0
- package/dist/cli-arguments.js +101 -50
- package/dist/cli-commands.d.ts +1 -1
- package/dist/cli-commands.js +31 -5
- package/dist/cli-errors.d.ts +18 -0
- package/dist/cli-errors.js +63 -0
- package/dist/cli-output.d.ts +22 -0
- package/dist/cli-output.js +42 -7
- package/dist/command-runner.js +88 -0
- package/dist/command-schema.d.ts +16 -0
- package/dist/command-schema.js +496 -21
- package/dist/command-types.d.ts +1 -0
- package/dist/command-types.js +1 -0
- package/dist/completion.d.ts +2 -0
- package/dist/completion.js +201 -0
- package/dist/composition.d.ts +25 -0
- package/dist/composition.js +28 -0
- package/dist/contracts/cli-transport.d.ts +316 -0
- package/dist/contracts/cli-transport.js +236 -0
- package/dist/contracts/deployment.d.ts +233 -0
- package/dist/contracts/deployment.js +198 -0
- package/dist/contracts/environment-file.d.ts +7 -0
- package/dist/contracts/environment-file.js +112 -0
- package/dist/contracts/environment-transport.d.ts +79 -0
- package/dist/contracts/environment-transport.js +110 -0
- package/dist/contracts/production-transport.d.ts +71 -0
- package/dist/contracts/production-transport.js +56 -0
- package/dist/contracts/runtime-logs-transport.d.ts +127 -0
- package/dist/contracts/runtime-logs-transport.js +50 -0
- package/dist/contracts/source-bundle.d.ts +11 -0
- package/dist/contracts/source-bundle.js +197 -0
- package/dist/contracts/source-profile.d.ts +4 -0
- package/dist/contracts/source-profile.js +5 -0
- package/dist/contracts/staging-transport.d.ts +79 -0
- package/dist/contracts/staging-transport.js +43 -0
- package/dist/dependencies.d.ts +9 -27
- package/dist/dependencies.js +19 -66
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/launch.d.ts +27 -0
- package/dist/launch.js +262 -0
- package/dist/platform-command.d.ts +9 -0
- package/dist/platform-command.js +787 -0
- package/dist/platform-environment.d.ts +18 -0
- package/dist/platform-environment.js +257 -0
- package/dist/platform-operations.d.ts +26 -0
- package/dist/platform-operations.js +155 -0
- package/dist/platform-production.d.ts +16 -0
- package/dist/platform-production.js +135 -0
- package/dist/platform-source.d.ts +8 -0
- package/dist/platform-source.js +111 -0
- package/dist/platform-state.d.ts +15 -0
- package/dist/platform-state.js +229 -0
- package/dist/platforms/tanstack.d.ts +10 -0
- package/dist/platforms/tanstack.js +248 -0
- package/dist/registry/usage.d.ts +4 -1
- package/dist/registry/usage.js +59 -4
- package/dist/scaffold/bootstrap.d.ts +3 -3
- package/dist/scaffold/styling.d.ts +3 -2
- package/dist/transaction.js +28 -3
- package/dist/ui-catalog.d.ts +3 -5
- package/dist/ui-catalog.js +8 -24
- package/dist/ui-command.d.ts +3 -1
- package/dist/ui-command.js +74 -72
- package/dist/ui-project.d.ts +4 -2
- package/dist/ui-project.js +40 -38
- package/dist/util.js +40 -61
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/capabilities.md +23 -89
- package/docs/software-factory.md +208 -9
- package/docs/stack-standard.md +7 -17
- package/docs/ui.md +9 -22
- package/package.json +26 -22
- package/assets/stack/ai-schema.ts.txt +0 -5
- package/assets/stack/ai.ts.txt +0 -30
- package/assets/stack/desktop.rs.txt +0 -21
- package/assets/stack/events-schema.ts.txt +0 -12
- package/assets/stack/events.ts.txt +0 -59
- package/assets/stack/mobile-auth.ts.txt +0 -25
- package/assets/stack/mobile-billing.tsx.txt +0 -63
- package/assets/stack/mobile-session.tsx.txt +0 -83
- package/assets/stack/native-button.tsx.txt +0 -108
- package/assets/stack/native-global.css.txt +0 -4
- package/assets/stack/native-lib-utils.ts.txt +0 -5
- package/assets/stack/native-metro.config.js.txt +0 -6
- package/assets/stack/native-nativewind-env.d.ts.txt +0 -1
- package/assets/stack/native-tailwind.config.js.txt +0 -73
- package/assets/stack/native-text.tsx.txt +0 -89
- package/assets/stack/purchases.ts.txt +0 -65
- package/assets/stack/revenuecat.ts.txt +0 -88
- package/assets/stack/rtc-schema.ts.txt +0 -10
- package/assets/stack/rtc.ts.txt +0 -122
- package/assets/stack/web-sign-in.tsx.txt +0 -51
- package/dist/capabilities.d.ts +0 -11
- package/dist/capabilities.js +0 -14
- package/dist/dependency-order.d.ts +0 -2
- package/dist/dependency-order.js +0 -24
- package/dist/platforms/lint.d.ts +0 -1
- package/dist/platforms/lint.js +0 -5
- package/dist/platforms/web.js +0 -251
- package/dist/project-config.d.ts +0 -3
- package/dist/project-config.js +0 -16
- package/dist/registry/context.d.ts +0 -3
- package/dist/registry/context.js +0 -20
- package/dist/registry/options.d.ts +0 -2
- package/dist/registry/options.js +0 -44
- package/dist/registry/resolve.d.ts +0 -11
- package/dist/registry/resolve.js +0 -46
- package/dist/registry/types.d.ts +0 -60
- package/dist/scaffold/api.d.ts +0 -2
- package/dist/scaffold/api.js +0 -38
- package/dist/scaffold/backend.d.ts +0 -2
- package/dist/scaffold/backend.js +0 -36
- package/dist/scaffold/compose.d.ts +0 -4
- package/dist/scaffold/compose.js +0 -30
- package/dist/scaffold/database.d.ts +0 -2
- package/dist/scaffold/database.js +0 -41
- package/dist/scaffold/documentation.d.ts +0 -2
- package/dist/scaffold/documentation.js +0 -71
- package/dist/scaffold/environment.d.ts +0 -4
- package/dist/scaffold/environment.js +0 -22
- package/dist/scaffold/stack-documentation.d.ts +0 -2
- package/dist/scaffold/stack-documentation.js +0 -6
- package/dist/scaffold/storage.d.ts +0 -2
- package/dist/scaffold/storage.js +0 -21
- package/dist/scaffold/workspace.d.ts +0 -3
- package/dist/scaffold/workspace.js +0 -131
- package/dist/stack-registry.d.ts +0 -35
- package/dist/stack-registry.js +0 -189
- package/dist/standard.d.ts +0 -8
- package/dist/standard.js +0 -94
- package/dist/workspace-graph.d.ts +0 -7
- package/dist/workspace-graph.js +0 -74
- package/docs/anhedral-stack.md +0 -12
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
- package/docs/native-ui.md +0 -47
- /package/dist/{registry/types.js → command-runner.d.ts} +0 -0
package/dist/workspace-graph.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { readBoundedFile, MAX_PROJECT_JSON_BYTES } from './bounded-file.js';
|
|
2
|
-
import { existsSync, lstatSync, readdirSync } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { dependencyOrder } from './dependency-order.js';
|
|
5
|
-
const dependencyFields = [
|
|
6
|
-
'dependencies',
|
|
7
|
-
'devDependencies',
|
|
8
|
-
'peerDependencies',
|
|
9
|
-
'optionalDependencies',
|
|
10
|
-
];
|
|
11
|
-
function readManifest(file, directory) {
|
|
12
|
-
if (!existsSync(file))
|
|
13
|
-
throw new Error(`Workspace manifest missing: ${directory}.`);
|
|
14
|
-
if (lstatSync(file).isSymbolicLink())
|
|
15
|
-
throw new Error(`Workspace symlinks are unsupported: ${directory}/package.json.`);
|
|
16
|
-
const value = JSON.parse(readBoundedFile(file, MAX_PROJECT_JSON_BYTES).toString('utf8'));
|
|
17
|
-
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
18
|
-
throw new Error(`Invalid workspace manifest: ${directory}.`);
|
|
19
|
-
const manifest = value;
|
|
20
|
-
if (typeof manifest.name !== 'string' || !manifest.name)
|
|
21
|
-
throw new Error(`Workspace name missing: ${directory}.`);
|
|
22
|
-
for (const field of dependencyFields) {
|
|
23
|
-
const dependencies = manifest[field];
|
|
24
|
-
if (dependencies === undefined)
|
|
25
|
-
continue;
|
|
26
|
-
if (!dependencies ||
|
|
27
|
-
typeof dependencies !== 'object' ||
|
|
28
|
-
Array.isArray(dependencies) ||
|
|
29
|
-
Object.values(dependencies).some((version) => typeof version !== 'string'))
|
|
30
|
-
throw new Error(`Invalid workspace dependencies: ${directory}/${field}.`);
|
|
31
|
-
}
|
|
32
|
-
return manifest;
|
|
33
|
-
}
|
|
34
|
-
/** Validate manifests and references, then traverse the indexed dependency graph. */
|
|
35
|
-
export function inspectWorkspaceGraph(root) {
|
|
36
|
-
const packages = new Map();
|
|
37
|
-
for (const group of ['apps', 'packages']) {
|
|
38
|
-
const parent = path.join(root, group);
|
|
39
|
-
if (!existsSync(parent))
|
|
40
|
-
continue;
|
|
41
|
-
if (lstatSync(parent).isSymbolicLink())
|
|
42
|
-
throw new Error(`Workspace symlinks are unsupported: ${group}.`);
|
|
43
|
-
for (const entry of readdirSync(parent, { withFileTypes: true })) {
|
|
44
|
-
const directory = `${group}/${entry.name}`;
|
|
45
|
-
if (entry.isSymbolicLink())
|
|
46
|
-
throw new Error(`Workspace symlinks are unsupported: ${directory}.`);
|
|
47
|
-
if (!entry.isDirectory())
|
|
48
|
-
continue;
|
|
49
|
-
const manifest = readManifest(path.join(root, directory, 'package.json'), directory);
|
|
50
|
-
if (packages.has(manifest.name))
|
|
51
|
-
throw new Error(`Duplicate workspace package: ${manifest.name}.`);
|
|
52
|
-
packages.set(manifest.name, { directory, manifest });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const graph = [...packages]
|
|
56
|
-
.map(([name, { directory, manifest }]) => {
|
|
57
|
-
const dependencies = new Set();
|
|
58
|
-
for (const field of dependencyFields) {
|
|
59
|
-
for (const [dependency, version] of Object.entries(manifest[field] ?? {})) {
|
|
60
|
-
if (!version.startsWith('workspace:'))
|
|
61
|
-
continue;
|
|
62
|
-
if (!['workspace:*', 'workspace:^', 'workspace:~'].includes(version))
|
|
63
|
-
throw new Error(`Unsupported workspace reference ${name} -> ${dependency}: ${version}.`);
|
|
64
|
-
if (!packages.has(dependency))
|
|
65
|
-
throw new Error(`Missing workspace dependency: ${name} -> ${dependency}.`);
|
|
66
|
-
dependencies.add(dependency);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return { name, directory, dependencies: [...dependencies].sort() };
|
|
70
|
-
})
|
|
71
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
72
|
-
dependencyOrder(new Map(graph.map((node) => [node.name, node.dependencies])), 'Workspace');
|
|
73
|
-
return graph;
|
|
74
|
-
}
|
package/docs/anhedral-stack.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Stack diagram
|
|
2
|
-
|
|
3
|
-
The [README](https://github.com/anhedral/anhedral-cli#readme) shows the complete
|
|
4
|
-
progressive scaffold. [Stack standard](stack-standard.md) owns architecture and
|
|
5
|
-
[capabilities](capabilities.md) owns composition and acceptance.
|
|
6
|
-
|
|
7
|
-
Regenerate the 1920 × 1080 light/dark SVGs with
|
|
8
|
-
`node docs/assets/render-stack.mjs`; add `--png` to export the README PNGs. This
|
|
9
|
-
uses checked-in vendor logo data offline. Supply `sharp` through the checkout or
|
|
10
|
-
`DOCS_NODE_MODULES`. Commit both themes/formats together. Keep vendor attribution
|
|
11
|
-
and the website's neutral theme adaptations when refreshing its shared layout.
|
|
12
|
-
The CLI README retains its navy artwork.
|
|
Binary file
|
|
Binary file
|
package/docs/native-ui.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Archived native port
|
|
2
|
-
|
|
3
|
-
The exhaustive Anhedral shadcn-to-React-Native port is superseded by the
|
|
4
|
-
[source-owned UI catalog and installer](ui.md). Its assets, generator, dependency
|
|
5
|
-
set, test harness and parity tooling are no longer part of the active CLI.
|
|
6
|
-
Existing generated applications remain consumer-owned and are not rewritten.
|
|
7
|
-
|
|
8
|
-
New applications start with Next.js. Add an Expo client with `anhedral add expo`,
|
|
9
|
-
then its RNR/NativeWind integration with `anhedral add native-ui`. Use
|
|
10
|
-
`anhedral ui add` for selected platform components. Programmatic initialization
|
|
11
|
-
with the retired `expo` product now fails before writes with this migration path.
|
|
12
|
-
|
|
13
|
-
## Recovery
|
|
14
|
-
|
|
15
|
-
The October 26, 2026 local archive preserves the unfinished port, including all
|
|
16
|
-
uncommitted tracked and untracked source, at commit
|
|
17
|
-
`4033cab2f068ebc021803d6730e9e04cbc274081` under
|
|
18
|
-
`refs/archive/2026-10-26/old-port`. The clean pre-cleanup staging baseline is
|
|
19
|
-
`630315094dc6bcf71414aa002bedf0dbba09fb86`. These are source identities, not release
|
|
20
|
-
or native acceptance certifications.
|
|
21
|
-
|
|
22
|
-
The independently restorable archive contains `repository.bundle`, source tarballs,
|
|
23
|
-
binary diffs, original Git status, per-file SHA-256 manifests, selected ignored
|
|
24
|
-
local evidence and restoration scripts/results. It is retained outside the npm
|
|
25
|
-
package and plugin. The archive is local; these refs are not promised on GitHub.
|
|
26
|
-
The maintainer's archive location and verification results are recorded in the
|
|
27
|
-
existing development notes.
|
|
28
|
-
|
|
29
|
-
From a supplied archive directory, restore into a new directory:
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
git clone --no-checkout /path/to/archive/repository.bundle restored-native-port
|
|
33
|
-
git -C restored-native-port checkout --detach 4033cab2f068ebc021803d6730e9e04cbc274081
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The bundle also retains available refs and stashes. Inspect `git bundle list-heads`
|
|
37
|
-
and fetch selected refs explicitly into a separate recovery repository when needed;
|
|
38
|
-
ordinary cloning imports branch/tag refs, not every archival or stash ref.
|
|
39
|
-
|
|
40
|
-
Use the archive's `verify_restore.py` to verify source and evidence against their
|
|
41
|
-
manifests. Read `evidence-exclusions.json` for omitted reproducible caches and native
|
|
42
|
-
binaries; original ignored material remains in the retained old checkout.
|
|
43
|
-
|
|
44
|
-
Recover selected components only for a concrete product requirement. Review their
|
|
45
|
-
dependencies, provenance and compatibility with the current NativeWind/RNR runtime,
|
|
46
|
-
then validate the consuming application on iOS and Android. Do not merge the old
|
|
47
|
-
branch wholesale or revive exhaustive registry parity as a release gate.
|
|
File without changes
|