anhedral 0.21.0 → 0.22.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/assets/contracts/deployment-provenance.json +3 -3
- package/assets/launch/router.tsx.txt +1 -0
- package/dist/contracts/cli-transport.d.ts +0 -7
- package/dist/contracts/cli-transport.js +0 -11
- package/dist/contracts/deployment.js +9 -31
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/software-factory.md +14 -3
- package/package.json +2 -2
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"contractVersion": 1,
|
|
3
3
|
"owner": "anhedral/platform-contracts/deployment",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"sourceRevision": "
|
|
5
|
+
"sourceRevision": "c2b6bc60de8852173c7dc8e0cfe544d13ef41a5f",
|
|
6
6
|
"files": {
|
|
7
|
-
"cli-transport.ts": "
|
|
7
|
+
"cli-transport.ts": "8bd4063d358b755e72fec637d88b3587c69a6dd3f94f0583c4d676e181386064",
|
|
8
8
|
"source-profile.ts": "1426caa2675db95d249ca36bb06c039ce8382379fd33cf9cdae48d7aad2faded",
|
|
9
9
|
"source-bundle.ts": "99df4874f9337a604da544093215de24f19f136182017be15629f78b5180a52b",
|
|
10
|
-
"deployment.ts": "
|
|
10
|
+
"deployment.ts": "467c5cc692071e51e3e83e54a1c8a39ee55b52d961da9fa800f1d58e4d46d989",
|
|
11
11
|
"fixtures.json": "2dfc70a23c5f60c293f2594263b8f5177b369f162026c323004ff5482f40f154",
|
|
12
12
|
"acceptance.mjs": "66605b98f1a606ae41df35b5e715e8626e760be351ee21c90cc9358a44b8b58a",
|
|
13
13
|
"LICENSE": "6d89bce3e7760469015287d1b6a45d31ef7924475c9b54eabe974bcce373980b"
|
|
@@ -235,10 +235,8 @@ export declare const cliPlanSchema: z.ZodObject<{
|
|
|
235
235
|
}, z.core.$strict>;
|
|
236
236
|
routingRevision: z.ZodString;
|
|
237
237
|
expectedGeneration: z.ZodNumber;
|
|
238
|
-
policyDigest: z.ZodString;
|
|
239
238
|
migrationDigests: z.ZodArray<z.ZodString>;
|
|
240
239
|
expiresAt: z.ZodISODateTime;
|
|
241
|
-
runtimeImage: z.ZodNullable<z.ZodString>;
|
|
242
240
|
configurationRevision: z.ZodNull;
|
|
243
241
|
artifactVerified: z.ZodBoolean;
|
|
244
242
|
hostedAdmission: z.ZodBoolean;
|
|
@@ -304,11 +302,6 @@ export declare const cliPreparationSchema: z.ZodObject<{
|
|
|
304
302
|
}>;
|
|
305
303
|
buildDigest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
304
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
307
|
-
admission: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
308
|
-
policyDigest: z.ZodString;
|
|
309
|
-
image: z.ZodString;
|
|
310
|
-
scope: z.ZodLiteral<"candidate-workspace">;
|
|
311
|
-
}, z.core.$strict>>>;
|
|
312
305
|
hostedAdmission: z.ZodBoolean;
|
|
313
306
|
identityAction: z.ZodLiteral<"preserve">;
|
|
314
307
|
}, z.core.$strict>;
|
|
@@ -179,10 +179,8 @@ export const cliPlanSchema = z
|
|
|
179
179
|
.strict(),
|
|
180
180
|
routingRevision: sourceHashSchema,
|
|
181
181
|
expectedGeneration: z.number().int().nonnegative(),
|
|
182
|
-
policyDigest: sourceHashSchema,
|
|
183
182
|
migrationDigests: z.array(sourceHashSchema).max(100),
|
|
184
183
|
expiresAt: z.iso.datetime(),
|
|
185
|
-
runtimeImage: z.string().max(256).nullable(),
|
|
186
184
|
configurationRevision: z.null(),
|
|
187
185
|
artifactVerified: z.boolean(),
|
|
188
186
|
hostedAdmission: z.boolean(),
|
|
@@ -210,15 +208,6 @@ export const cliPreparationSchema = z
|
|
|
210
208
|
state: z.enum(["awaiting-runtime", "building", "built", "ready", "failed"]),
|
|
211
209
|
buildDigest: sourceHashSchema.nullable().optional(),
|
|
212
210
|
error: z.string().max(300).nullable().optional(),
|
|
213
|
-
admission: z
|
|
214
|
-
.object({
|
|
215
|
-
policyDigest: sourceHashSchema,
|
|
216
|
-
image: z.string().regex(/^registry\.[a-z0-9.-]+\/[a-zA-Z0-9/_.-]+@sha256:[a-f0-9]{64}$/),
|
|
217
|
-
scope: z.literal("candidate-workspace"),
|
|
218
|
-
})
|
|
219
|
-
.strict()
|
|
220
|
-
.nullable()
|
|
221
|
-
.optional(),
|
|
222
211
|
hostedAdmission: z.boolean(),
|
|
223
212
|
identityAction: z.literal("preserve"),
|
|
224
213
|
})
|
|
@@ -47,34 +47,18 @@ export const deploymentManifestSchema = z
|
|
|
47
47
|
.strict()
|
|
48
48
|
.superRefine((value, ctx) => {
|
|
49
49
|
const selected = new Set(value.capabilities);
|
|
50
|
-
|
|
51
|
-
if (tanstack !== (value.intent.runtimeProfile === "anhedral-stack"))
|
|
50
|
+
if (selected.has("hono") !== selected.has("database-auth"))
|
|
52
51
|
ctx.addIssue({
|
|
53
52
|
code: "custom",
|
|
54
|
-
path: ["
|
|
55
|
-
message: "Anhedral Stack
|
|
53
|
+
path: ["capabilities"],
|
|
54
|
+
message: "Anhedral Stack hosting requires Hono and database-auth together.",
|
|
55
|
+
});
|
|
56
|
+
if (value.identity !== (selected.has("database-auth") ? "better-auth-d1-v1" : "none"))
|
|
57
|
+
ctx.addIssue({
|
|
58
|
+
code: "custom",
|
|
59
|
+
path: ["identity"],
|
|
60
|
+
message: "Anhedral Stack hosting preserves standalone Better Auth/D1 identity.",
|
|
56
61
|
});
|
|
57
|
-
if (tanstack) {
|
|
58
|
-
for (const id of value.capabilities)
|
|
59
|
-
if (!["hono", "database-auth", "r2", "stripe"].includes(id))
|
|
60
|
-
ctx.addIssue({
|
|
61
|
-
code: "custom",
|
|
62
|
-
path: ["capabilities"],
|
|
63
|
-
message: `${id} is outside the Anhedral Stack hosting contract.`,
|
|
64
|
-
});
|
|
65
|
-
if (selected.has("hono") !== selected.has("database-auth"))
|
|
66
|
-
ctx.addIssue({
|
|
67
|
-
code: "custom",
|
|
68
|
-
path: ["capabilities"],
|
|
69
|
-
message: "Anhedral Stack hosting requires Hono and database-auth together.",
|
|
70
|
-
});
|
|
71
|
-
if (value.identity !== (selected.has("database-auth") ? "better-auth-d1-v1" : "none"))
|
|
72
|
-
ctx.addIssue({
|
|
73
|
-
code: "custom",
|
|
74
|
-
path: ["identity"],
|
|
75
|
-
message: "Anhedral Stack hosting preserves standalone Better Auth/D1 identity.",
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
62
|
const prerequisites = {
|
|
79
63
|
"database-auth": ["hono"],
|
|
80
64
|
r2: ["database-auth"],
|
|
@@ -88,12 +72,6 @@ export const deploymentManifestSchema = z
|
|
|
88
72
|
path: ["capabilities"],
|
|
89
73
|
message: `${id} requires ${parent}.`,
|
|
90
74
|
});
|
|
91
|
-
if (selected.has("database-auth") !== (value.identity !== "none"))
|
|
92
|
-
ctx.addIssue({
|
|
93
|
-
code: "custom",
|
|
94
|
-
path: ["identity"],
|
|
95
|
-
message: "Identity must match database-auth source.",
|
|
96
|
-
});
|
|
97
75
|
});
|
|
98
76
|
export const deploymentSourceSchema = z
|
|
99
77
|
.object({
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GENERATOR_VERSION = "0.
|
|
1
|
+
export declare const GENERATOR_VERSION = "0.22.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const GENERATOR_VERSION = '0.
|
|
1
|
+
export const GENERATOR_VERSION = '0.22.0';
|
package/docs/software-factory.md
CHANGED
|
@@ -54,6 +54,11 @@ explicit review failure, not a clean secret scan.
|
|
|
54
54
|
|
|
55
55
|
## Runtime verification
|
|
56
56
|
|
|
57
|
+
For local development, `pnpm test` builds once and runs unit tests; `pnpm lint`
|
|
58
|
+
checks source without emitting a build. `pnpm release:check` builds and type-checks
|
|
59
|
+
once, then runs the full source, security, advisory, unit, patch and package checks.
|
|
60
|
+
Use `pnpm release:pack` when preparing a standalone release artifact; it builds fresh.
|
|
61
|
+
|
|
57
62
|
Routine CI compiles the CLI once and runs fast source/security checks and selected
|
|
58
63
|
contract tests. Generated applications are not installed or built in that path.
|
|
59
64
|
Dispatch [CI](https://github.com/anhedral/anhedral-cli/blob/main/.github/workflows/ci.yml) with `runtime_proof` enabled for the
|
|
@@ -69,6 +74,9 @@ isolated local data, never a configured database or live payment provider. Prese
|
|
|
69
74
|
passed and failed evidence. Tests are not provider deployment acceptance. Run
|
|
70
75
|
`node tests/test-generated-config-lint.mjs <installed-workspace>` to exercise the
|
|
71
76
|
generated web ESLint policy; runtime proof checks both web-only and composed source.
|
|
77
|
+
`node tests/test-generated-router.mjs <installed-workspace>` temporarily replaces
|
|
78
|
+
the example route, runs the generated web typecheck and restores the route. The
|
|
79
|
+
router imports its own Start augmentation so ordinary page edits remain type-safe.
|
|
72
80
|
|
|
73
81
|
Backend server entries call TanStack’s `createStartHandler(defaultStreamHandler)` directly so request-local API bindings survive OJ compilation. Source additions repair the exact previous owned adapter and preserve customer edits.
|
|
74
82
|
|
|
@@ -169,9 +177,12 @@ backend/R2/Stripe. Backend manifests preserve `better-auth-d1-v1`; web-only uses
|
|
|
169
177
|
`none`. Broader retained capability/protocol values are compatibility implementation,
|
|
170
178
|
not current public selections or hosted support.
|
|
171
179
|
Continue selecting an explicit manifest; the CLI never infers an admitted artifact
|
|
172
|
-
from locally generated source.
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
from locally generated source. Public plans and candidate receipts omit internal
|
|
181
|
+
registry images and build-policy digests. Platform retains these admission details
|
|
182
|
+
privately and returns a digest over the public plan fields for client verification.
|
|
183
|
+
Previously saved plans containing internal fields require a fresh plan with `--new`.
|
|
184
|
+
Plans list runtime, source-version or lockfile mismatches and remediation. Do not
|
|
185
|
+
relabel source provenance to clear a mismatch.
|
|
175
186
|
|
|
176
187
|
`deploy prepare` reserves an immutable candidate. `deploy status` reads
|
|
177
188
|
`awaiting-runtime`, `building`, `built`, `ready` or `failed`. A built candidate grants no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anhedral",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Generate the Anhedral Stack as editable source: start with web UI, then add backend, storage and payments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"test:pack:exact": "node tests/test-packed-cli.js .artifacts/release/metadata.json",
|
|
76
76
|
"test:packlist": "pnpm build && node tests/test-packlist.js",
|
|
77
77
|
"test:release-tooling": "node tests/test-release-tooling.test.mjs",
|
|
78
|
-
"test:all": "pnpm build && pnpm
|
|
78
|
+
"test:all": "pnpm build && pnpm format:check && pnpm check:hygiene && pnpm check:release-policy && pnpm check:boundaries && pnpm check:security && pnpm audit:osv && pnpm test:unit && pnpm test:patch && node tests/test-packed-cli.js && node tests/test-packlist.js",
|
|
79
79
|
"release:check": "pnpm test:all",
|
|
80
80
|
"release:pack": "pnpm build && pnpm plugin:build && node scripts/create-release-artifact.mjs && node scripts/check-release-secrets.mjs .artifacts/release/metadata.json",
|
|
81
81
|
"release:artifact:verify": "node scripts/verify-release-artifact.mjs .artifacts/release/metadata.json && node scripts/check-release-secrets.mjs .artifacts/release/metadata.json",
|