@automovie/template 0.3.4 → 0.4.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 +8 -22
- package/generated/pnpm-workspace.json +5 -5
- package/generated/skills/3d-modeling/conditioning.md +3 -1
- package/generated/skills/3d-modeling/crafting/construction.md +29 -1
- package/generated/skills/3d-modeling/environments.md +47 -0
- package/generated/skills/3d-modeling/inspection.md +7 -4
- package/generated/skills/contracts/development/common.md +4 -6
- package/generated/skills/contracts/development/design.md +7 -17
- package/generated/skills/contracts/development/implementation.md +8 -36
- package/generated/skills/development/repair.md +2 -0
- package/generated/skills/documentation/SKILL.md +5 -5
- package/generated/skills/documentation/writing.md +2 -2
- package/generated/skills/motion/laws/authoring.md +2 -2
- package/generated/skills/motion/laws/contacts.md +6 -2
- package/generated/skills/motion/laws/transitions.md +14 -4
- package/generated/skills/motion/laws/variation.md +2 -2
- package/generated/skills/motion/laws/verification.md +7 -5
- package/generated/skills/multi-agent/continuing.md +5 -0
- package/generated/skills/prompting/SKILL.md +8 -22
- package/generated/skills/visual-debugging/correction-rounds.md +4 -0
- package/lib/IAutoMovieScaffoldProps.d.ts +12 -12
- package/lib/assertScaffoldProjectName.d.ts +8 -10
- package/lib/assertScaffoldProjectName.js +8 -10
- package/lib/assertScaffoldProjectName.js.map +1 -1
- package/lib/createAutoMovieScaffold.d.ts +23 -15
- package/lib/createAutoMovieScaffold.js +35 -18
- package/lib/createAutoMovieScaffold.js.map +1 -1
- package/lib/listAutoMovieScaffoldFiles.d.ts +8 -10
- package/lib/listAutoMovieScaffoldFiles.js +16 -12
- package/lib/listAutoMovieScaffoldFiles.js.map +1 -1
- package/lib/renderAutoMovieWorkspace.d.ts +8 -12
- package/lib/renderAutoMovieWorkspace.js +16 -14
- package/lib/renderAutoMovieWorkspace.js.map +1 -1
- package/lib/scaffoldSharedSkillPath.d.ts +13 -12
- package/lib/scaffoldSharedSkillPath.js +13 -12
- package/lib/scaffoldSharedSkillPath.js.map +1 -1
- package/package.json +6 -6
- package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +2 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +3 -1
- package/scaffold/instructions/.agents/skills/3d-modeling/materials.md +11 -0
- package/scaffold/instructions/.agents/skills/audio/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/audio/acquisition.md +5 -1
- package/scaffold/instructions/.agents/skills/audio/film-sound.md +3 -1
- package/scaffold/instructions/.agents/skills/audio/soundtrack.md +14 -0
- package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +4 -2
- package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/development/catalog.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/development/composition.md +37 -25
- package/scaffold/instructions/.agents/skills/contracts/development/entities.md +3 -1
- package/scaffold/instructions/.agents/skills/contracts/development/films.md +39 -0
- package/scaffold/instructions/.agents/skills/contracts/development/testing.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/principles/research.md +1 -1
- package/scaffold/instructions/.agents/skills/development/SKILL.md +2 -4
- package/scaffold/instructions/.agents/skills/development/entities.md +14 -2
- package/scaffold/instructions/.agents/skills/development/modules.md +16 -6
- package/scaffold/instructions/.agents/skills/development/source-layout.md +6 -6
- package/scaffold/instructions/.agents/skills/development/testing.md +1 -1
- package/scaffold/instructions/.agents/skills/evidence/configuration.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/SKILL.md +4 -5
- package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +3 -3
- package/scaffold/instructions/.agents/skills/motion/compose/composition.md +37 -18
- package/scaffold/instructions/.agents/skills/motion/compose/refusals.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/control-channels.md +4 -4
- package/scaffold/instructions/.agents/skills/motion/diffusion/SKILL.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/judgment.md +7 -3
- package/scaffold/instructions/.agents/skills/motion/laws/SKILL.md +2 -3
- package/scaffold/instructions/.agents/skills/motion/laws/method-references.md +4 -2
- package/scaffold/instructions/.agents/skills/motion/performance.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +6 -4
- package/scaffold/instructions/.agents/skills/motion/retargeting.md +1 -1
- package/scaffold/instructions/.agents/skills/motion/segment-review.md +1 -1
- package/scaffold/instructions/.agents/skills/motion/staging.md +12 -8
- package/scaffold/instructions/.agents/skills/multi-agent/$continuing.md +0 -0
- package/scaffold/instructions/.agents/skills/multi-agent/SKILL.md +8 -0
- package/scaffold/instructions/.agents/skills/production/SKILL.md +1 -2
- package/scaffold/instructions/.agents/skills/production/assembly.md +7 -5
- package/scaffold/instructions/.agents/skills/production/director.md +5 -5
- package/scaffold/instructions/.agents/skills/production/media-records.md +16 -1
- package/scaffold/instructions/.agents/skills/production/project-context.md +7 -13
- package/scaffold/instructions/.agents/skills/production/sustained-runs.md +3 -3
- package/scaffold/instructions/.agents/skills/production/workflow.md +1 -1
- package/scaffold/instructions/.agents/skills/review/delivery-review.md +4 -2
- package/scaffold/instructions/.agents/skills/review/source-review.md +3 -1
- package/scaffold/instructions/.agents/skills/story/answers.md +1 -1
- package/scaffold/instructions/.agents/skills/story/document-layout.md +2 -2
- package/scaffold/instructions/.agents/skills/story/layers/shots.md +1 -1
- package/scaffold/instructions/.agents/skills/story/planning/discovery.md +1 -1
- package/scaffold/instructions/.agents/skills/story/planning/research.md +2 -2
- package/scaffold/instructions/.agents/skills/story/workflow/routes.md +1 -1
- package/scaffold/instructions/.agents/skills/video/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/video/diffusion/hints.md +1 -1
- package/scaffold/instructions/.agents/skills/video/direct-film.md +44 -9
- package/scaffold/instructions/.agents/skills/video/finishing.md +11 -3
- package/scaffold/instructions/.agents/skills/video/generated-film.md +1 -0
- package/scaffold/instructions/.agents/skills/video/requests.md +6 -2
- package/scaffold/instructions/AGENTS.md +21 -48
- package/scaffold/production/README.md +18 -99
- package/scaffold/production/package.json +3 -2
- package/scaffold/production/src/IFilm.ts +1 -6
- package/scaffold/production/src/IFilmProduction.ts +255 -31
- package/scaffold/production/src/clampProductionSeconds.ts +5 -8
- package/scaffold/production/src/composition/films/starter.ts +2 -7
- package/scaffold/production/src/executable/motionTake/IMotionTakeSource.ts +1 -2
- package/scaffold/production/src/executable/motionTake/assertMotionTakeBindings.ts +3 -10
- package/scaffold/production/src/executable/motionTake/collectMotionTakeFiles.ts +2 -6
- package/scaffold/production/src/executable/motionTake/hashMotionTakeFile.ts +2 -6
- package/scaffold/production/src/executable/motionTake/openMotionTake.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeArtifact.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeInstalledLock.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakePackageVersion.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeSource.ts +2 -6
- package/scaffold/production/src/executable/motionTake/replayMotionTake.ts +2 -6
- package/scaffold/production/src/executable/motionTake/resolveMotionTakePath.ts +5 -12
- package/scaffold/production/src/executable/motionTake/verifyMotionTakeEditPrefix.ts +2 -6
- package/scaffold/production/src/executable/motionTake/writeMotionTakeArtifact.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/artifact/archiveAutoMovieRecoveryModel.ts +12 -19
- package/scaffold/production/src/executable/recovery/node/artifact/createAutoMovieRecoveryArtifact.ts +13 -26
- package/scaffold/production/src/executable/recovery/node/artifact/writeAutoMovieRecoveryArtifact.ts +16 -22
- package/scaffold/production/src/executable/recovery/node/internal/IAutoMovieRecoveryMemoryUsage.ts +1 -2
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTable.ts +11 -32
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTableInput.ts +5 -14
- package/scaffold/production/src/executable/recovery/node/internal/createRecoveryFileVectorTable.ts +6 -13
- package/scaffold/production/src/executable/recovery/node/internal/observeRecoveryAtlas.ts +16 -24
- package/scaffold/production/src/executable/recovery/node/internal/readAutoMovieRecoveryBoundedFile.ts +9 -17
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryCameraImages.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryFixedReference.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/recovery.ts +12 -17
- package/scaffold/production/src/executable/recovery/node/internal/recoveryAtlas.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraMap.ts +6 -12
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraScene.ts +2 -10
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameras.ts +2 -9
- package/scaffold/production/src/executable/recovery/node/internal/recoveryContourPath.ts +7 -11
- package/scaffold/production/src/executable/recovery/node/internal/recoveryImages.ts +6 -14
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryContourFileMesh.ts +10 -25
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryMeshSpool.ts +9 -15
- package/scaffold/production/src/executable/recovery/node/mesh/readAutoMovieRecoveryMeshFrontier.ts +10 -13
- package/scaffold/production/src/executable/recovery/node/publishAutoMovieRecoveryArtifact.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/reconstruction/reconstructAutoMovieRecoveryLocal.ts +13 -19
- package/scaffold/production/src/executable/recovery/node/runAutoMovieRecoveryCommand.ts +4 -19
- package/scaffold/production/src/executable/verify.ts +11 -0
- package/scaffold/production/src/inspectFilmProduction.ts +252 -0
- package/scaffold/production/src/main.ts +1 -0
- package/scaffold/production/src/markFilmProduction.ts +31 -19
- package/scaffold/production/src/readFilmVerdicts.ts +43 -0
- package/scaffold/production/src/selectFilm.ts +2 -6
- package/scaffold/production/src/subjectOfFilm.ts +158 -0
- package/scaffold/production/src/subjects.ts +13 -61
- package/scaffold/production/test/features/test_clamp_production_seconds.ts +2 -4
- package/scaffold/production/test/features/test_inspect_film_production.ts +325 -0
- package/scaffold/production/test/features/test_recovery_publication_cancellation.ts +2 -4
- package/scaffold/production/test/features/test_select_film.ts +2 -4
- package/scaffold/production/test/features/test_subject_of_film.ts +95 -0
- package/scaffold/production/test/features/testing/test_test_execution.ts +2 -4
- package/scaffold/production/test/features/testing/test_test_selection.ts +2 -4
- package/scaffold/production/test/helpers/assessTestExecution.ts +4 -7
- package/scaffold/production/test/helpers/overlappingPerformance.ts +199 -0
- package/scaffold/production/test/tsconfig.json +4 -1
- package/scaffold/production/tsconfig.json +2 -6
- package/scaffold/production/vite.config.ts +25 -2
- package/scaffold/workspace/README.md +9 -28
- package/scaffold/workspace/package.json +1 -1
- package/src/IAutoMovieScaffoldProps.ts +12 -12
- package/src/assertScaffoldProjectName.ts +8 -10
- package/src/createAutoMovieScaffold.ts +35 -18
- package/src/listAutoMovieScaffoldFiles.ts +16 -12
- package/src/renderAutoMovieWorkspace.ts +20 -15
- package/src/scaffoldSharedSkillPath.ts +13 -12
- package/generated/skills/contracts/development/testing.md +0 -27
- package/scaffold/instructions/.agents/skills/automovie/SKILL.md +0 -32
- package/scaffold/instructions/.agents/skills/motion/laws/extension.md +0 -39
- package/scaffold/instructions/.agents/skills/production/stage-caches.md +0 -26
- package/scaffold/production/src/executable/recovery/node/internal/recoveryLocal.ts +0 -153
- package/scaffold/production/src/executable/recovery/node/internal/recoveryOpen.ts +0 -237
- package/scaffold/production/tsconfig.test.json +0 -9
- /package/scaffold/instructions/.agents/skills/{contracts/development/$testing.md → 3d-modeling/$environments.md} +0 -0
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IAutoMovieRecoveryInput,
|
|
3
|
-
IAutoMovieRecoveryMeshSections,
|
|
4
|
-
IAutoMovieRecoveryOpenContinuation,
|
|
5
|
-
IAutoMovieRecoveryRegistration,
|
|
6
|
-
} from "@automovie/interface";
|
|
7
|
-
import {
|
|
8
|
-
AutoMovieRecoveryOpenContinuation as O,
|
|
9
|
-
reconstructRecoveryOpen,
|
|
10
|
-
restoreRecoveryCurveBasis,
|
|
11
|
-
} from "@automovie/recovery";
|
|
12
|
-
import { createHash } from "node:crypto";
|
|
13
|
-
import fs from "node:fs";
|
|
14
|
-
import path from "node:path";
|
|
15
|
-
|
|
16
|
-
import { writeAutoMovieRecoveryArtifact } from "../artifact/writeAutoMovieRecoveryArtifact";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Observe endpoint transport into a separate graph, then reconstruct from saved curves and graph.
|
|
20
|
-
* Usage: observe spec.json curves.json graph.json, or reconstruct curves.json graph.json model.json.
|
|
21
|
-
* Source mesh admission occurs only in observe. The graph references the complete curve byte hash;
|
|
22
|
-
* original coefficients are neither duplicated nor refitted. source epoch argument is required.
|
|
23
|
-
*
|
|
24
|
-
* @evidence contracts/development/implementation.md#principled-implementation Complete-byte hashes bind source registration, saved cubic authority and source-independent endpoint transport. Reconstruction opens only the two generating publications.
|
|
25
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Separate observation and reconstruction commands make source consumption explicit; the sidecar avoids copying hundreds of thousands of open coefficients.
|
|
26
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No original vertices, source indices or source normals enter reconstruction, no aperture is closed, and existing artifacts cannot be overwritten.
|
|
27
|
-
* @evidence contracts/development/common.md#meaningful-documentation Documents commands, immutable byte authority, source-only observation, fitting reuse and source-epoch provenance.
|
|
28
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Files are read and hashed once per command; assembly and serialization are linear in admitted or generated data. Numerical work remains with existing observation and engine operators.
|
|
29
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work The original curve publication is reused without fitting, and one engine result supplies model and actual construction.
|
|
30
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Synchronous reads and writes close handles. One command owns temporary source arrays or generated buffers, with no global cache or external process.
|
|
31
|
-
*/
|
|
32
|
-
export function recoveryOpen(args: string[], sourceEpoch: string): void {
|
|
33
|
-
const [command, first, second, output]: string[] = args;
|
|
34
|
-
if (
|
|
35
|
-
!first ||
|
|
36
|
-
!second ||
|
|
37
|
-
!output ||
|
|
38
|
-
(command !== "observe" && command !== "reconstruct")
|
|
39
|
-
)
|
|
40
|
-
throw new Error(
|
|
41
|
-
"Usage: recoveryOpen observe spec curves graph | reconstruct curves graph model",
|
|
42
|
-
);
|
|
43
|
-
if (!sourceEpoch || !/^[a-f0-9]{40,64}$/i.test(sourceEpoch))
|
|
44
|
-
throw new Error("A frozen pre-execution source epoch is required");
|
|
45
|
-
const started: number = performance.now();
|
|
46
|
-
const read: (name: string) => { value: unknown; sha256: string } = (
|
|
47
|
-
name: string,
|
|
48
|
-
): { value: unknown; sha256: string } => {
|
|
49
|
-
const bytes: Buffer = fs.readFileSync(name);
|
|
50
|
-
return {
|
|
51
|
-
value: JSON.parse(bytes.toString("utf8")) as unknown,
|
|
52
|
-
sha256: createHash("sha256").update(bytes).digest("hex"),
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
let artifact: object;
|
|
56
|
-
if (command === "observe") {
|
|
57
|
-
const registered: ReturnType<typeof read> = read(first),
|
|
58
|
-
saved: ReturnType<typeof read> = read(second);
|
|
59
|
-
const spec: {
|
|
60
|
-
units: string;
|
|
61
|
-
frame: string;
|
|
62
|
-
pose: string;
|
|
63
|
-
meshes: { path: string; sha256: string }[];
|
|
64
|
-
policy: IAutoMovieRecoveryMeshSections["policy"];
|
|
65
|
-
} = registered.value as {
|
|
66
|
-
units: string;
|
|
67
|
-
frame: string;
|
|
68
|
-
pose: string;
|
|
69
|
-
meshes: { path: string; sha256: string }[];
|
|
70
|
-
policy: IAutoMovieRecoveryMeshSections["policy"];
|
|
71
|
-
};
|
|
72
|
-
const bundle: IAutoMovieRecoveryMeshSections & {
|
|
73
|
-
provenance: { inputHash: string; sourceEpoch: string };
|
|
74
|
-
registration:
|
|
75
|
-
| IAutoMovieRecoveryRegistration
|
|
76
|
-
| { units: string; frame: string; pose: string };
|
|
77
|
-
} = restoreRecoveryCurveBasis(
|
|
78
|
-
saved.value,
|
|
79
|
-
) as IAutoMovieRecoveryMeshSections & {
|
|
80
|
-
provenance: { inputHash: string; sourceEpoch: string };
|
|
81
|
-
registration:
|
|
82
|
-
| IAutoMovieRecoveryRegistration
|
|
83
|
-
| { units: string; frame: string; pose: string };
|
|
84
|
-
};
|
|
85
|
-
if (
|
|
86
|
-
spec.units !== "mm" ||
|
|
87
|
-
!spec.frame ||
|
|
88
|
-
!spec.pose ||
|
|
89
|
-
!spec.meshes?.length ||
|
|
90
|
-
bundle.provenance.inputHash !== registered.sha256 ||
|
|
91
|
-
bundle.registration.units !== spec.units ||
|
|
92
|
-
bundle.registration.frame !== spec.frame ||
|
|
93
|
-
("evaluatedPose" in bundle.registration
|
|
94
|
-
? bundle.registration.evaluatedPose
|
|
95
|
-
: bundle.registration.pose) !== spec.pose
|
|
96
|
-
)
|
|
97
|
-
throw new Error(
|
|
98
|
-
"The saved curve publication must bind these exact fixed source and registration bytes",
|
|
99
|
-
);
|
|
100
|
-
const verticesMm: IAutoMovieRecoveryInput["verticesMm"] = [],
|
|
101
|
-
triangles: IAutoMovieRecoveryInput["triangles"] = [];
|
|
102
|
-
for (const source of spec.meshes) {
|
|
103
|
-
const admitted: ReturnType<typeof read> = read(
|
|
104
|
-
path.resolve(path.dirname(first), source.path),
|
|
105
|
-
);
|
|
106
|
-
if (admitted.sha256 !== source.sha256)
|
|
107
|
-
throw new Error("Fixed source hash mismatch");
|
|
108
|
-
const mesh: {
|
|
109
|
-
vertices: IAutoMovieRecoveryInput["verticesMm"];
|
|
110
|
-
triangles: IAutoMovieRecoveryInput["triangles"];
|
|
111
|
-
} = admitted.value as {
|
|
112
|
-
vertices: IAutoMovieRecoveryInput["verticesMm"];
|
|
113
|
-
triangles: IAutoMovieRecoveryInput["triangles"];
|
|
114
|
-
};
|
|
115
|
-
const offset: number = verticesMm.length;
|
|
116
|
-
for (const p of mesh.vertices) verticesMm.push(p);
|
|
117
|
-
for (const t of mesh.triangles)
|
|
118
|
-
triangles.push([t[0] + offset, t[1] + offset, t[2] + offset]);
|
|
119
|
-
}
|
|
120
|
-
const admittedAt: number = performance.now();
|
|
121
|
-
const graph: IAutoMovieRecoveryOpenContinuation = O.observe(
|
|
122
|
-
{ ...spec.policy, verticesMm, triangles },
|
|
123
|
-
bundle,
|
|
124
|
-
(completed: number, total: number): void => {
|
|
125
|
-
console.error(
|
|
126
|
-
JSON.stringify({
|
|
127
|
-
phase: "open-observation",
|
|
128
|
-
completed,
|
|
129
|
-
total,
|
|
130
|
-
elapsedMs: performance.now() - admittedAt,
|
|
131
|
-
}),
|
|
132
|
-
);
|
|
133
|
-
},
|
|
134
|
-
);
|
|
135
|
-
artifact = {
|
|
136
|
-
...graph,
|
|
137
|
-
provenance: {
|
|
138
|
-
sourceEpoch,
|
|
139
|
-
sourceKind: "public-recovery-package",
|
|
140
|
-
sourceSpecSha256: registered.sha256,
|
|
141
|
-
curveBundleSha256: saved.sha256,
|
|
142
|
-
curveProducerEpoch: bundle.provenance.sourceEpoch,
|
|
143
|
-
sources: spec.meshes,
|
|
144
|
-
registration: bundle.registration,
|
|
145
|
-
generatedAt: new Date().toISOString(),
|
|
146
|
-
elapsedMs: {
|
|
147
|
-
sourceAndCurveAdmission: admittedAt - started,
|
|
148
|
-
openObservationWithoutRefitting: performance.now() - admittedAt,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
console.log(
|
|
153
|
-
JSON.stringify({
|
|
154
|
-
intervals: graph.intervals.length,
|
|
155
|
-
pairs: graph.intervals.reduce(
|
|
156
|
-
(
|
|
157
|
-
sum: number,
|
|
158
|
-
x: IAutoMovieRecoveryOpenContinuation["intervals"][number],
|
|
159
|
-
): number => sum + x.pairs.length,
|
|
160
|
-
0,
|
|
161
|
-
),
|
|
162
|
-
unsupportedGroups: graph.intervals.reduce(
|
|
163
|
-
(
|
|
164
|
-
sum: number,
|
|
165
|
-
x: IAutoMovieRecoveryOpenContinuation["intervals"][number],
|
|
166
|
-
): number => sum + x.unresolved.length,
|
|
167
|
-
0,
|
|
168
|
-
),
|
|
169
|
-
}),
|
|
170
|
-
);
|
|
171
|
-
} else {
|
|
172
|
-
const saved: ReturnType<typeof read> = read(first),
|
|
173
|
-
topology: ReturnType<typeof read> = read(second);
|
|
174
|
-
const bundle: IAutoMovieRecoveryMeshSections = restoreRecoveryCurveBasis(
|
|
175
|
-
saved.value,
|
|
176
|
-
) as IAutoMovieRecoveryMeshSections;
|
|
177
|
-
const graph: IAutoMovieRecoveryOpenContinuation & {
|
|
178
|
-
provenance: { curveBundleSha256: string };
|
|
179
|
-
} = topology.value as IAutoMovieRecoveryOpenContinuation & {
|
|
180
|
-
provenance: { curveBundleSha256: string };
|
|
181
|
-
};
|
|
182
|
-
if (graph.provenance.curveBundleSha256 !== saved.sha256)
|
|
183
|
-
throw new Error(
|
|
184
|
-
"Open graph does not bind this exact saved cubic authority",
|
|
185
|
-
);
|
|
186
|
-
const generated: ReturnType<typeof reconstructRecoveryOpen> =
|
|
187
|
-
reconstructRecoveryOpen(bundle, graph);
|
|
188
|
-
const counts: { vertices: number; triangles: number } = {
|
|
189
|
-
vertices: 0,
|
|
190
|
-
triangles: 0,
|
|
191
|
-
};
|
|
192
|
-
for (const part of generated.model.parts)
|
|
193
|
-
if (part.geometry.type === "mesh") {
|
|
194
|
-
counts.vertices += part.geometry.mesh.positions.length / 3;
|
|
195
|
-
counts.triangles += part.geometry.mesh.indices!.length / 3;
|
|
196
|
-
}
|
|
197
|
-
artifact = {
|
|
198
|
-
schema: "human-reference-engine-model-v1",
|
|
199
|
-
model: generated.model,
|
|
200
|
-
construction: { units: "m", lines: generated.construction },
|
|
201
|
-
diagnostics: generated.diagnostics,
|
|
202
|
-
unresolved: generated.unresolved,
|
|
203
|
-
unresolvedScope:
|
|
204
|
-
"closed-section operator observations, retained independently of additional open surfaces",
|
|
205
|
-
openReports: generated.openReports,
|
|
206
|
-
counts,
|
|
207
|
-
...(bundle.coverage ? { coverage: bundle.coverage } : {}),
|
|
208
|
-
provenance: {
|
|
209
|
-
sourceCommit: sourceEpoch,
|
|
210
|
-
sourceKind: "public-recovery-package",
|
|
211
|
-
inputKeys: ["curveBundle", "openContinuation"],
|
|
212
|
-
inputHashes: {
|
|
213
|
-
curveBundle: saved.sha256,
|
|
214
|
-
openContinuation: topology.sha256,
|
|
215
|
-
},
|
|
216
|
-
engineOperators: [
|
|
217
|
-
"tessellateAutoMovieContourLoft64",
|
|
218
|
-
"tessellateAutoMovieCurveGrid64",
|
|
219
|
-
],
|
|
220
|
-
generatedAt: new Date().toISOString(),
|
|
221
|
-
elapsedMs: performance.now() - started,
|
|
222
|
-
},
|
|
223
|
-
};
|
|
224
|
-
console.log(
|
|
225
|
-
JSON.stringify({
|
|
226
|
-
counts,
|
|
227
|
-
openRuns: generated.openReports.generatedRuns,
|
|
228
|
-
openPairs: generated.openReports.pairs,
|
|
229
|
-
unsupportedOpenGroups: generated.openReports.unsupportedGroups,
|
|
230
|
-
closedOperatorUnresolved: generated.unresolved.length,
|
|
231
|
-
}),
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
const publication: ReturnType<typeof writeAutoMovieRecoveryArtifact> =
|
|
235
|
-
writeAutoMovieRecoveryArtifact(output, artifact);
|
|
236
|
-
console.log(JSON.stringify({ file: output, ...publication }));
|
|
237
|
-
}
|
|
File without changes
|