@helix3/helix-cli 0.1.14-helix3.166 → 0.1.14-helix3.168

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 (80) hide show
  1. package/README.md +2 -0
  2. package/dist/builds/index.d.ts +54 -0
  3. package/dist/builds/index.js +215 -0
  4. package/dist/builds/index.js.map +1 -0
  5. package/dist/canary/cli.d.ts +17 -0
  6. package/dist/canary/cli.js +95 -0
  7. package/dist/canary/cli.js.map +1 -0
  8. package/dist/canary/index.d.ts +4 -0
  9. package/dist/canary/index.js +21 -0
  10. package/dist/canary/index.js.map +1 -0
  11. package/dist/canary/inventory.d.ts +46 -0
  12. package/dist/canary/inventory.js +499 -0
  13. package/dist/canary/inventory.js.map +1 -0
  14. package/dist/canary/pacifica.d.ts +51 -0
  15. package/dist/canary/pacifica.js +247 -0
  16. package/dist/canary/pacifica.js.map +1 -0
  17. package/dist/canary/plan.d.ts +115 -0
  18. package/dist/canary/plan.js +479 -0
  19. package/dist/canary/plan.js.map +1 -0
  20. package/dist/character/faceManifest.d.ts +33 -0
  21. package/dist/character/faceManifest.js +169 -0
  22. package/dist/character/faceManifest.js.map +1 -0
  23. package/dist/character/importCharacter.d.ts +7 -0
  24. package/dist/character/importCharacter.js +7 -0
  25. package/dist/character/importCharacter.js.map +1 -1
  26. package/dist/continuum/authoring.d.ts +31 -0
  27. package/dist/continuum/authoring.js +34 -0
  28. package/dist/continuum/authoring.js.map +1 -0
  29. package/dist/continuum/cli.d.ts +46 -0
  30. package/dist/continuum/cli.js +62 -0
  31. package/dist/continuum/cli.js.map +1 -0
  32. package/dist/continuum/cliAuthority.d.ts +17 -0
  33. package/dist/continuum/cliAuthority.js +28 -0
  34. package/dist/continuum/cliAuthority.js.map +1 -0
  35. package/dist/continuum/client.d.ts +40 -0
  36. package/dist/continuum/client.js +76 -0
  37. package/dist/continuum/client.js.map +1 -0
  38. package/dist/continuum/identity.d.ts +4 -0
  39. package/dist/continuum/identity.js +20 -0
  40. package/dist/continuum/identity.js.map +1 -0
  41. package/dist/continuum/index.d.ts +7 -0
  42. package/dist/continuum/index.js +24 -0
  43. package/dist/continuum/index.js.map +1 -0
  44. package/dist/continuum/state.d.ts +40 -0
  45. package/dist/continuum/state.js +194 -0
  46. package/dist/continuum/state.js.map +1 -0
  47. package/dist/continuum/types.d.ts +125 -0
  48. package/dist/continuum/types.js +6 -0
  49. package/dist/continuum/types.js.map +1 -0
  50. package/dist/continuum/workflow.d.ts +54 -0
  51. package/dist/continuum/workflow.js +404 -0
  52. package/dist/continuum/workflow.js.map +1 -0
  53. package/dist/index.js +136 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/lib.d.ts +6 -0
  56. package/dist/lib.js +30 -5
  57. package/dist/lib.js.map +1 -1
  58. package/dist/sceneElements/continuum.d.ts +48 -0
  59. package/dist/sceneElements/continuum.js +286 -0
  60. package/dist/sceneElements/continuum.js.map +1 -0
  61. package/dist/sceneImport/materials/binding.d.ts +16 -0
  62. package/dist/sceneImport/materials/binding.js +42 -0
  63. package/dist/sceneImport/materials/binding.js.map +1 -0
  64. package/dist/sceneImport/materials/catalog.d.ts +36 -0
  65. package/dist/sceneImport/materials/catalog.js +233 -0
  66. package/dist/sceneImport/materials/catalog.js.map +1 -0
  67. package/dist/sceneImport/materials/index.d.ts +4 -0
  68. package/dist/sceneImport/materials/index.js +21 -0
  69. package/dist/sceneImport/materials/index.js.map +1 -0
  70. package/dist/sceneImport/materials/matcher.d.ts +33 -0
  71. package/dist/sceneImport/materials/matcher.js +127 -0
  72. package/dist/sceneImport/materials/matcher.js.map +1 -0
  73. package/dist/sceneImport/materials/recipe.d.ts +30 -0
  74. package/dist/sceneImport/materials/recipe.js +134 -0
  75. package/dist/sceneImport/materials/recipe.js.map +1 -0
  76. package/dist/sceneImport/semantic.d.ts +75 -0
  77. package/dist/sceneImport/semantic.js +296 -0
  78. package/dist/sceneImport/semantic.js.map +1 -0
  79. package/dist/tsconfig.build.tsbuildinfo +1 -1
  80. package/package.json +3 -3
package/README.md CHANGED
@@ -65,6 +65,8 @@ The token is stored in `~/.helix/credentials.json` (mode `600`). It's sent as
65
65
  | `helix world audit\|source-audit\|perf-gate\|prove-live` | Run the blocking world QA, performance, and deployed-build identity gates. |
66
66
  | `helix world scene-source inventory\|compile <helsinki\|bistro> <archive>` | Verify and safely inventory a known CC BY source archive, then compile deterministic local proxy/detail GLBs and an existing-schema Scene v2 package. |
67
67
  | `helix world scene-source publish <world-id> <package-dir> [--publish]` | Validate the Scene v2 package and print its multipart build receipt. Execution remains dry-run-only until backend private-pin entitlement lands; `--publish` currently fails closed, and access control never changes CC BY rights. |
68
+ | `helix continuum publish-source-map\|publish-scratch\|publish-package` | Resume exact-CID object adoption/ingestion, Package lease/seal, optional explicitly authorized Listing, and WorldRelease publication through one creator-owned pipeline. |
69
+ | `helix continuum receipt <job-id>` | Read the sanitized durable receipt for a completed Continuum publication. |
68
70
  | `helix unreal init\|validate\|doctor\|package [project]` | Create and gate a shared-runtime or native-game publish manifest, check optional editor MCP, and assemble a local upload-shaped package. |
69
71
  | `helix unreal publish <candidate> --world <slug>` | Upload a **cooked** Unreal world to HELIX: verify the candidate, presign, upload every artifact, finalize, and promote it as the world's active build. |
70
72
  | `helix doctor [--project <dir>]` | Print the environment + whether the @helix toolchain (CLI/MCP/SDK/manifest) is current. |
@@ -0,0 +1,54 @@
1
+ import { type BuildPackage, type ContinuumCid, type ContinuumObjectReference, type ContinuumPackageVariant, type ContinuumPackageVersion, type ContinuumPackageVersionReference, type RuntimeProfile } from '@hypersoniclabs/helix-manifest';
2
+ export declare const PRIVATE_BUILD_DRAFT_SCHEMA: "helix.creator.build-draft/1";
3
+ export type BuildDraft = {
4
+ schema: typeof PRIVATE_BUILD_DRAFT_SCHEMA;
5
+ visibility: 'private';
6
+ kind: BuildPackage['kind'];
7
+ base: ContinuumPackageVersionReference;
8
+ addOns: Array<{
9
+ /** Existing platform ItemSlotType or Package compatibility slot identifier. */
10
+ slot: string;
11
+ package: ContinuumPackageVersionReference;
12
+ }>;
13
+ overrides: Record<string, unknown>;
14
+ compatibility: BuildPackage['compatibility'];
15
+ provenance: ContinuumPackageVersion['provenance'];
16
+ };
17
+ export type BuildDraftInput = Omit<BuildDraft, 'schema' | 'visibility'>;
18
+ export type BuildFreezeInput = {
19
+ packageId: string;
20
+ version: string;
21
+ root: ContinuumObjectReference;
22
+ variants?: ContinuumPackageVariant[];
23
+ contract: string;
24
+ expectedClosure: ContinuumPackageVersion['expectedClosure'];
25
+ /** Current registry/package metadata truth; this module does not duplicate it. */
26
+ slotTypes: readonly string[];
27
+ sourcePackages: readonly ContinuumPackageVersion[];
28
+ };
29
+ export type FrozenBuild = {
30
+ draft: BuildDraft;
31
+ manifest: ContinuumPackageVersion & {
32
+ build: BuildPackage;
33
+ };
34
+ manifestBytes: Uint8Array;
35
+ manifestCid: ContinuumCid;
36
+ sourceClosure: ContinuumPackageVersionReference[];
37
+ };
38
+ export type BuildFreezeResult = {
39
+ ok: true;
40
+ frozen: FrozenBuild;
41
+ errors: [];
42
+ } | {
43
+ ok: false;
44
+ draft: BuildDraft;
45
+ errors: string[];
46
+ };
47
+ /** Start a mutable private draft through the same canonical Build normalizer. */
48
+ export declare function createPrivateBuildDraft(input: BuildDraftInput): BuildDraft;
49
+ /**
50
+ * Freeze a mutable private draft into the existing immutable U1 Build Package.
51
+ * Failure is data, not destruction: every refusal returns the untouched draft.
52
+ */
53
+ export declare function freezeBuildDraft(draft: BuildDraft, input: BuildFreezeInput): BuildFreezeResult;
54
+ export declare function frozenBuildArtifactKey(frozen: FrozenBuild, runtimeProfile: RuntimeProfile, compilerContract: string): ContinuumCid;
@@ -0,0 +1,215 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRIVATE_BUILD_DRAFT_SCHEMA = void 0;
4
+ exports.createPrivateBuildDraft = createPrivateBuildDraft;
5
+ exports.freezeBuildDraft = freezeBuildDraft;
6
+ exports.frozenBuildArtifactKey = frozenBuildArtifactKey;
7
+ const helix_manifest_1 = require("@hypersoniclabs/helix-manifest");
8
+ const identity_1 = require("../continuum/identity");
9
+ exports.PRIVATE_BUILD_DRAFT_SCHEMA = 'helix.creator.build-draft/1';
10
+ /** Start a mutable private draft through the same canonical Build normalizer. */
11
+ function createPrivateBuildDraft(input) {
12
+ const build = (0, helix_manifest_1.normalizeBuildPackage)({
13
+ kind: input.kind,
14
+ base: input.base,
15
+ slots: input.addOns,
16
+ parameters: input.overrides,
17
+ compatibility: input.compatibility,
18
+ });
19
+ return {
20
+ schema: exports.PRIVATE_BUILD_DRAFT_SCHEMA,
21
+ visibility: 'private',
22
+ kind: build.kind,
23
+ base: build.base,
24
+ addOns: build.slots,
25
+ overrides: build.parameters,
26
+ compatibility: build.compatibility,
27
+ provenance: structuredClone(input.provenance),
28
+ };
29
+ }
30
+ /**
31
+ * Freeze a mutable private draft into the existing immutable U1 Build Package.
32
+ * Failure is data, not destruction: every refusal returns the untouched draft.
33
+ */
34
+ function freezeBuildDraft(draft, input) {
35
+ const preserved = structuredClone(draft);
36
+ const errors = [];
37
+ if (draft.schema !== exports.PRIVATE_BUILD_DRAFT_SCHEMA ||
38
+ draft.visibility !== 'private') {
39
+ errors.push('Build draft must be a private helix.creator.build-draft/1 value');
40
+ }
41
+ try {
42
+ (0, identity_1.assertContinuumUuid)(input.packageId, 'Build Package id');
43
+ (0, identity_1.assertContinuumUuid)(draft.base.packageId, 'Build base Package id');
44
+ draft.addOns.forEach((addOn) => (0, identity_1.assertContinuumUuid)(addOn.package.packageId, `Build slot ${addOn.slot} Package id`));
45
+ input.sourcePackages.forEach((pkg) => (0, identity_1.assertContinuumUuid)(pkg.package.id, `Build source ${pkg.package.id} Package id`));
46
+ }
47
+ catch (error) {
48
+ errors.push(error instanceof Error ? error.message : String(error));
49
+ }
50
+ const slotTypes = new Set(input.slotTypes);
51
+ if (slotTypes.size !== input.slotTypes.length) {
52
+ errors.push('Build slot registry contains duplicate slot identifiers');
53
+ }
54
+ for (const addOn of draft.addOns) {
55
+ if (!slotTypes.has(addOn.slot)) {
56
+ errors.push(`Build add-on slot "${addOn.slot}" is not in the supplied slot registry`);
57
+ }
58
+ }
59
+ let build = null;
60
+ try {
61
+ build = (0, helix_manifest_1.normalizeBuildPackage)({
62
+ kind: draft.kind,
63
+ base: draft.base,
64
+ slots: draft.addOns,
65
+ parameters: draft.overrides,
66
+ compatibility: draft.compatibility,
67
+ });
68
+ }
69
+ catch (error) {
70
+ errors.push(error instanceof Error ? error.message : String(error));
71
+ }
72
+ if (!build || errors.length)
73
+ return failure(preserved, errors);
74
+ const sourceByIdentity = new Map(input.sourcePackages.map((pkg) => [packageIdentity(pkg.package.id, pkg.version), pkg]));
75
+ const basePackage = exactSourcePackage(build.base, sourceByIdentity, errors);
76
+ if (basePackage && basePackage.package.type !== build.kind) {
77
+ errors.push(`Build base Package type "${basePackage.package.type}" does not match Build kind "${build.kind}"`);
78
+ }
79
+ for (const slot of build.slots) {
80
+ const addOnPackage = exactSourcePackage(slot.package, sourceByIdentity, errors);
81
+ if (addOnPackage && addOnPackage.package.type !== 'addon') {
82
+ errors.push(`Build slot "${slot.slot}" must reference an addon Package, got "${addOnPackage.package.type}"`);
83
+ }
84
+ }
85
+ if (errors.length)
86
+ return failure(preserved, errors);
87
+ const manifest = {
88
+ schema: 'helix.continuum.package-version/1',
89
+ package: { id: input.packageId, type: 'build' },
90
+ version: input.version,
91
+ root: structuredClone(input.root),
92
+ dependencies: [
93
+ { slot: 'base', package: build.base, required: true },
94
+ ...build.slots.map((slot) => ({
95
+ slot: slot.slot,
96
+ package: slot.package,
97
+ required: true,
98
+ })),
99
+ ],
100
+ variants: structuredClone(input.variants ?? []),
101
+ compatibility: {
102
+ contract: input.contract,
103
+ requires: [...build.compatibility.requires],
104
+ provides: [...build.compatibility.provides],
105
+ },
106
+ provenance: structuredClone(draft.provenance),
107
+ expectedClosure: structuredClone(input.expectedClosure),
108
+ build,
109
+ };
110
+ const manifestResult = (0, helix_manifest_1.validateBuildPackage)(manifest);
111
+ if (!manifestResult.valid) {
112
+ return failure(preserved, manifestResult.errors);
113
+ }
114
+ const graphResult = (0, helix_manifest_1.validateContinuumGraph)({
115
+ packages: [...input.sourcePackages, manifestResult.manifest],
116
+ listings: [],
117
+ worldReleases: [],
118
+ });
119
+ if (!graphResult.valid)
120
+ return failure(preserved, graphResult.errors);
121
+ const normalizedManifest = graphResult.graph.packages.find((pkg) => pkg.package.id === input.packageId && pkg.version === input.version);
122
+ if (!normalizedManifest?.build) {
123
+ return failure(preserved, ['Validated graph did not retain the frozen Build Package']);
124
+ }
125
+ const sourceClosure = collectSourceClosure(normalizedManifest.build, sourceByIdentity);
126
+ const normalizedDraft = {
127
+ ...preserved,
128
+ base: normalizedManifest.build.base,
129
+ addOns: normalizedManifest.build.slots,
130
+ overrides: normalizedManifest.build.parameters,
131
+ compatibility: normalizedManifest.build.compatibility,
132
+ };
133
+ const frozenManifest = normalizedManifest;
134
+ return {
135
+ ok: true,
136
+ frozen: {
137
+ draft: normalizedDraft,
138
+ manifest: frozenManifest,
139
+ manifestBytes: (0, helix_manifest_1.canonicalContinuumPackageVersionBytes)(frozenManifest),
140
+ manifestCid: (0, helix_manifest_1.continuumPackageVersionCid)(frozenManifest),
141
+ sourceClosure,
142
+ },
143
+ errors: [],
144
+ };
145
+ }
146
+ function frozenBuildArtifactKey(frozen, runtimeProfile, compilerContract) {
147
+ const input = {
148
+ build: frozen.manifest.build,
149
+ sourceClosure: frozen.sourceClosure,
150
+ runtimeProfile,
151
+ compilerContract,
152
+ };
153
+ return (0, helix_manifest_1.runtimeArtifactKey)(input);
154
+ }
155
+ function failure(draft, errors) {
156
+ return { ok: false, draft, errors: [...new Set(errors)] };
157
+ }
158
+ function packageIdentity(packageId, version) {
159
+ return JSON.stringify([packageId, version]);
160
+ }
161
+ function referenceKey(reference) {
162
+ return JSON.stringify([
163
+ reference.packageId,
164
+ reference.version,
165
+ reference.manifestCid,
166
+ ]);
167
+ }
168
+ function exactSourcePackage(reference, sourceByIdentity, errors) {
169
+ const source = sourceByIdentity.get(packageIdentity(reference.packageId, reference.version));
170
+ if (!source) {
171
+ errors.push(`Build source is missing Package Version ${reference.packageId}@${reference.version}`);
172
+ return null;
173
+ }
174
+ let actualCid;
175
+ try {
176
+ actualCid = (0, helix_manifest_1.continuumPackageVersionCid)(source);
177
+ }
178
+ catch (error) {
179
+ errors.push(`Build source Package Version ${reference.packageId}@${reference.version} is invalid: ${error instanceof Error ? error.message : String(error)}`);
180
+ return null;
181
+ }
182
+ if (actualCid !== reference.manifestCid) {
183
+ errors.push(`Build source Package Version ${reference.packageId}@${reference.version} has CID ${actualCid}, expected ${reference.manifestCid}`);
184
+ return null;
185
+ }
186
+ return source;
187
+ }
188
+ function collectSourceClosure(build, sourceByIdentity) {
189
+ const collected = new Map();
190
+ const visited = new Set();
191
+ const visitReference = (reference) => {
192
+ const key = packageIdentity(reference.packageId, reference.version);
193
+ if (visited.has(key))
194
+ return;
195
+ visited.add(key);
196
+ const pkg = sourceByIdentity.get(key);
197
+ if (!pkg)
198
+ return;
199
+ const exact = {
200
+ packageId: pkg.package.id,
201
+ version: pkg.version,
202
+ manifestCid: (0, helix_manifest_1.continuumPackageVersionCid)(pkg),
203
+ };
204
+ collected.set(referenceKey(exact), exact);
205
+ pkg.dependencies.forEach((dependency) => visitReference(dependency.package));
206
+ pkg.scene?.children.forEach((child) => visitReference(child.scene));
207
+ };
208
+ visitReference(build.base);
209
+ build.slots.forEach((slot) => visitReference(slot.package));
210
+ return [...collected.values()].sort((left, right) => compareText(referenceKey(left), referenceKey(right)));
211
+ }
212
+ function compareText(left, right) {
213
+ return left < right ? -1 : left > right ? 1 : 0;
214
+ }
215
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/builds/index.ts"],"names":[],"mappings":";;;AA8DA,0DAkBC;AAMD,4CA8HC;AAED,wDAYC;AAlOD,mEAew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AAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7E,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,CAAC,CAAC;IACF,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAClD,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CACrD,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC9C,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type PacificaHybridMigrationReport } from './pacifica';
2
+ import type { ContinuumCanaryInput } from './plan';
3
+ export type LoadedContinuumCanaryDescriptor = {
4
+ sourceDigest: string;
5
+ preflight?: PacificaHybridMigrationReport;
6
+ input?: ContinuumCanaryInput;
7
+ };
8
+ export declare const CANARY_FILE_READ_CONCURRENCY = 12;
9
+ export declare class BoundedCanaryFileReader {
10
+ readonly limit: number;
11
+ private active;
12
+ private readonly waiting;
13
+ constructor(limit?: number);
14
+ run<T>(read: () => Promise<T>): Promise<T>;
15
+ }
16
+ /** Resolve descriptor-relative files once; the normal U8 publisher remains the only transport. */
17
+ export declare function loadContinuumCanaryDescriptor(path: string): Promise<LoadedContinuumCanaryDescriptor>;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BoundedCanaryFileReader = exports.CANARY_FILE_READ_CONCURRENCY = void 0;
4
+ exports.loadContinuumCanaryDescriptor = loadContinuumCanaryDescriptor;
5
+ const node_crypto_1 = require("node:crypto");
6
+ const node_buffer_1 = require("node:buffer");
7
+ const node_path_1 = require("node:path");
8
+ const cli_1 = require("../continuum/cli");
9
+ const pacifica_1 = require("./pacifica");
10
+ exports.CANARY_FILE_READ_CONCURRENCY = 12;
11
+ class BoundedCanaryFileReader {
12
+ limit;
13
+ active = 0;
14
+ waiting = [];
15
+ constructor(limit = exports.CANARY_FILE_READ_CONCURRENCY) {
16
+ this.limit = limit;
17
+ if (!Number.isInteger(limit) || limit < 1)
18
+ throw new TypeError('canary file read concurrency must be a positive integer');
19
+ }
20
+ async run(read) {
21
+ if (this.active >= this.limit)
22
+ await new Promise((resolve) => this.waiting.push(resolve));
23
+ else
24
+ this.active += 1;
25
+ try {
26
+ return await read();
27
+ }
28
+ finally {
29
+ const next = this.waiting.shift();
30
+ if (next)
31
+ next();
32
+ else
33
+ this.active -= 1;
34
+ }
35
+ }
36
+ }
37
+ exports.BoundedCanaryFileReader = BoundedCanaryFileReader;
38
+ /** Resolve descriptor-relative files once; the normal U8 publisher remains the only transport. */
39
+ async function loadContinuumCanaryDescriptor(path) {
40
+ const absolute = (0, node_path_1.resolve)(path);
41
+ const descriptorFile = await (0, cli_1.readSafeRegularFile)(absolute, 16 * 1024 * 1024, 'canary descriptor');
42
+ const bytes = descriptorFile.bytes;
43
+ const value = JSON.parse(node_buffer_1.Buffer.from(bytes).toString('utf8'));
44
+ const hydrated = await hydrateFileSources(value, (0, node_path_1.dirname)(descriptorFile.path), { nodes: 0 }, 0, new BoundedCanaryFileReader());
45
+ const sourceDigest = (hydrated.sourceDigest ?? (0, node_crypto_1.createHash)('sha256').update(bytes).digest('hex')).toLowerCase();
46
+ if (!/^[a-f0-9]{64}$/.test(sourceDigest))
47
+ throw new TypeError('canary descriptor sourceDigest must be a SHA-256 digest');
48
+ if (hydrated.pacifica && hydrated.pacificaHybrid)
49
+ throw new TypeError('canary descriptor must choose pacifica or pacificaHybrid, not both');
50
+ let pacifica = hydrated.pacifica;
51
+ let preflight;
52
+ if (hydrated.pacificaHybrid) {
53
+ const migration = await (0, pacifica_1.loadPacificaHybridMigration)({
54
+ fixtureRoot: hydrated.pacificaHybrid.fixtureRoot,
55
+ objectSourcesByCid: hydrated.pacificaHybrid.objectSourcesByCid,
56
+ });
57
+ preflight = migration.report;
58
+ pacifica = migration.pacifica;
59
+ }
60
+ if (!pacifica)
61
+ return { sourceDigest, ...(preflight ? { preflight } : {}) };
62
+ const { pacificaHybrid: _hybrid, ...descriptor } = hydrated;
63
+ return {
64
+ sourceDigest,
65
+ ...(preflight ? { preflight } : {}),
66
+ input: { ...descriptor, sourceDigest, pacifica },
67
+ };
68
+ }
69
+ async function hydrateFileSources(value, base, budget, depth, reader) {
70
+ if (depth > 128)
71
+ throw new TypeError('canary descriptor exceeds the maximum nesting depth of 128');
72
+ budget.nodes += 1;
73
+ if (budget.nodes > 100_000)
74
+ throw new TypeError('canary descriptor exceeds the maximum value count of 100000');
75
+ if (Array.isArray(value))
76
+ return Promise.all(value.map((entry) => hydrateFileSources(entry, base, budget, depth + 1, reader)));
77
+ if (!value || typeof value !== 'object')
78
+ return value;
79
+ const record = value;
80
+ if (record.kind === 'inline')
81
+ throw new TypeError('JSON canary descriptors cannot embed inline bytes; use a descriptor-relative file source');
82
+ if (record.kind === 'file') {
83
+ if (typeof record.path !== 'string')
84
+ throw new TypeError('canary file source path must be a string');
85
+ const sourcePath = record.path;
86
+ const object = await reader.run(() => (0, cli_1.readSafeConfinedFile)(base, sourcePath, 1024 * 1024, `canary file source ${sourcePath}`));
87
+ return {
88
+ kind: 'inline', bytes: object.bytes, filename: (0, node_path_1.basename)(object.path),
89
+ ...(record.audience === 'private' || record.audience === 'public' ? { audience: record.audience } : {}),
90
+ };
91
+ }
92
+ const entries = await Promise.all(Object.entries(record).map(async ([key, entry]) => [key, await hydrateFileSources(entry, base, budget, depth + 1, reader)]));
93
+ return Object.fromEntries(entries);
94
+ }
95
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/canary/cli.ts"],"names":[],"mappings":";;;AA+CA,sEA6BC;AA5ED,6CAAyC;AACzC,6CAAqC;AACrC,yCAAuD;AAEvD,0CAA6E;AAC7E,yCAA6F;AAmBhF,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAE/C,MAAa,uBAAuB;IAIb;IAHb,MAAM,GAAG,CAAC,CAAC;IACF,OAAO,GAAsB,EAAE,CAAC;IAEjD,YAAqB,QAAQ,oCAA4B;QAApC,UAAK,GAAL,KAAK,CAA+B;QACvD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;YAAE,MAAM,IAAI,SAAS,CAAC,yDAAyD,CAAC,CAAC;IAC5H,CAAC;IAED,KAAK,CAAC,GAAG,CAAI,IAAsB;QACjC,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;;YAC3F,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC;YAAC,OAAO,MAAM,IAAI,EAAE,CAAC;QAAC,CAAC;gBACpB,CAAC;YACP,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAClC,IAAI,IAAI;gBAAE,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AC,CAAU,CAAC,CAAC,CAAC;IACxK,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './cli';
2
+ export * from './inventory';
3
+ export * from './pacifica';
4
+ export * from './plan';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cli"), exports);
18
+ __exportStar(require("./inventory"), exports);
19
+ __exportStar(require("./pacifica"), exports);
20
+ __exportStar(require("./plan"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/canary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,8CAA4B;AAC5B,6CAA2B;AAC3B,yCAAuB"}
@@ -0,0 +1,46 @@
1
+ export declare const PACIFICA_MATERIAL_BINDING_IDS: readonly ["raw-concrete", "polished-concrete", "ceramic-tile", "painted-metal", "white-marble"];
2
+ export type CanarySourceState = "inline-input-required" | "candidate-adoption" | "staged-input-required" | "unresolved";
3
+ export type CanarySourceInventoryEntry = {
4
+ key: string;
5
+ category: "material" | "vehicle" | "character" | "scene";
6
+ state: CanarySourceState;
7
+ path?: string;
8
+ url?: string;
9
+ localSha256?: string;
10
+ sha256?: string;
11
+ cid?: `cid:sha256:${string}`;
12
+ bytes?: number;
13
+ mediaType?: string;
14
+ legacyIds?: Record<string, string>;
15
+ adoption?: {
16
+ kind: "instant-world-adoption";
17
+ buildId: string;
18
+ contentSha256: string;
19
+ } | {
20
+ kind: "vault-adoption";
21
+ vaultAssetVersionId: string;
22
+ };
23
+ nextAction: string;
24
+ };
25
+ export declare const CANARY_MATERIAL_ARTIFACT_INVENTORY: readonly CanarySourceInventoryEntry[];
26
+ export declare const AUTHORITATIVE_CANARY_INVENTORY: readonly CanarySourceInventoryEntry[];
27
+ export type CanaryInventoryAudit = {
28
+ schema: "helix.creator.continuum-canary-inventory-audit/1";
29
+ status: "ready" | "blocked";
30
+ entries: number;
31
+ blockers: Array<{
32
+ key: string;
33
+ reason: string;
34
+ nextAction: string;
35
+ }>;
36
+ };
37
+ /**
38
+ * Local paths are hash-verified and backend adoption receipts are explicit
39
+ * inputs. A historical publish JSON alone never makes an isolated environment
40
+ * publish-ready.
41
+ */
42
+ export declare function auditCanaryInventory(entries?: readonly CanarySourceInventoryEntry[], available?: {
43
+ inlineCids?: ReadonlySet<string>;
44
+ stagedCids?: ReadonlySet<string>;
45
+ verifiedAdoptions?: ReadonlySet<string>;
46
+ }): Promise<CanaryInventoryAudit>;