@metamesh/cli 0.0.0-bootstrap.0 → 0.13.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/CHANGELOG.md +27 -0
- package/README.md +71 -5
- package/dist/authoring/artifacts.d.ts +11 -0
- package/dist/authoring/artifacts.d.ts.map +1 -0
- package/dist/authoring/artifacts.js +343 -0
- package/dist/authoring/artifacts.js.map +1 -0
- package/dist/authoring/capture/render-client.js +4222 -0
- package/dist/authoring/capture/render-client.js.LEGAL.txt +9 -0
- package/dist/authoring/capture/render-client.js.map +7 -0
- package/dist/authoring/check.d.ts +3 -0
- package/dist/authoring/check.d.ts.map +1 -0
- package/dist/authoring/check.js +117 -0
- package/dist/authoring/check.js.map +1 -0
- package/dist/authoring/environment.d.ts +19 -0
- package/dist/authoring/environment.d.ts.map +1 -0
- package/dist/authoring/environment.js +173 -0
- package/dist/authoring/environment.js.map +1 -0
- package/dist/authoring/errors.d.ts +11 -0
- package/dist/authoring/errors.d.ts.map +1 -0
- package/dist/authoring/errors.js +41 -0
- package/dist/authoring/errors.js.map +1 -0
- package/dist/authoring/render-client.d.ts +6 -0
- package/dist/authoring/render-client.d.ts.map +1 -0
- package/dist/authoring/render-client.js +55 -0
- package/dist/authoring/render-client.js.map +1 -0
- package/dist/authoring/render-scene.d.ts +22 -0
- package/dist/authoring/render-scene.d.ts.map +1 -0
- package/dist/authoring/render-scene.js +139 -0
- package/dist/authoring/render-scene.js.map +1 -0
- package/dist/authoring/render-types.d.ts +81 -0
- package/dist/authoring/render-types.d.ts.map +1 -0
- package/dist/authoring/render-types.js +2 -0
- package/dist/authoring/render-types.js.map +1 -0
- package/dist/authoring/render.d.ts +23 -0
- package/dist/authoring/render.d.ts.map +1 -0
- package/dist/authoring/render.js +243 -0
- package/dist/authoring/render.js.map +1 -0
- package/dist/authoring/run.d.ts +3 -0
- package/dist/authoring/run.d.ts.map +1 -0
- package/dist/authoring/run.js +304 -0
- package/dist/authoring/run.js.map +1 -0
- package/dist/authoring/types.d.ts +138 -0
- package/dist/authoring/types.d.ts.map +1 -0
- package/dist/authoring/types.js +2 -0
- package/dist/authoring/types.js.map +1 -0
- package/dist/authoring/worker.d.ts +15 -0
- package/dist/authoring/worker.d.ts.map +1 -0
- package/dist/authoring/worker.js +163 -0
- package/dist/authoring/worker.js.map +1 -0
- package/dist/authoring.d.ts +12 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.js +9 -0
- package/dist/authoring.js.map +1 -0
- package/dist/docs/guides/agent-authoring.md +183 -0
- package/dist/docs/guides/package.md +72 -0
- package/dist/docs/manifest.json +554 -0
- package/dist/docs/reference/authoring/AUTHORING_PROTOCOL_VERSION.md +9 -0
- package/dist/docs/reference/authoring/AuthoringDiagnostic.md +19 -0
- package/dist/docs/reference/authoring/AuthoringEnvironment.md +14 -0
- package/dist/docs/reference/authoring/AuthoringError.md +15 -0
- package/dist/docs/reference/authoring/AuthoringFailure-type.md +15 -0
- package/dist/docs/reference/authoring/AuthoringKind.md +9 -0
- package/dist/docs/reference/authoring/AuthoringPhase.md +9 -0
- package/dist/docs/reference/authoring/CapturedBuffer.md +13 -0
- package/dist/docs/reference/authoring/CapturedGeometry.md +13 -0
- package/dist/docs/reference/authoring/CapturedPart.md +16 -0
- package/dist/docs/reference/authoring/CapturedResource.md +14 -0
- package/dist/docs/reference/authoring/CapturedRun.md +13 -0
- package/dist/docs/reference/authoring/CapturedRunManifest.md +38 -0
- package/dist/docs/reference/authoring/CheckOptions.md +14 -0
- package/dist/docs/reference/authoring/CheckSuccess.md +15 -0
- package/dist/docs/reference/authoring/DocumentationEntry.md +18 -0
- package/dist/docs/reference/authoring/DocumentationManifest.md +14 -0
- package/dist/docs/reference/authoring/DocumentationSearchResult.md +12 -0
- package/dist/docs/reference/authoring/InstalledAuthoringPackage.md +14 -0
- package/dist/docs/reference/authoring/RenderCamera.md +22 -0
- package/dist/docs/reference/authoring/RenderFormat.md +10 -0
- package/dist/docs/reference/authoring/RenderOptions.md +20 -0
- package/dist/docs/reference/authoring/RenderResult.md +15 -0
- package/dist/docs/reference/authoring/RenderView.md +10 -0
- package/dist/docs/reference/authoring/RenderedImage.md +23 -0
- package/dist/docs/reference/authoring/RunOptions.md +17 -0
- package/dist/docs/reference/authoring/RunSuccess.md +13 -0
- package/dist/docs/reference/authoring/authoringFailure-value.md +9 -0
- package/dist/docs/reference/authoring/checkAuthoringSource.md +9 -0
- package/dist/docs/reference/authoring/discoverAuthoringEnvironment.md +9 -0
- package/dist/docs/reference/authoring/inspectCapturedRun.md +11 -0
- package/dist/docs/reference/authoring/installAuthoringBrowser.md +13 -0
- package/dist/docs/reference/authoring/readCapturedRun.md +10 -0
- package/dist/docs/reference/authoring/renderCapturedRun.md +13 -0
- package/dist/docs/reference/authoring/runAuthoringSource.md +9 -0
- package/dist/docs/reference/authoring/searchAuthoringDocumentation.md +12 -0
- package/dist/docs/reference/authoring/showAuthoringDocumentation.md +11 -0
- package/dist/metamesh.d.ts +3 -0
- package/dist/metamesh.d.ts.map +1 -0
- package/dist/metamesh.js +183 -0
- package/dist/metamesh.js.map +1 -0
- package/package.json +51 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/authoring/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AASzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAiCzE,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,UAAU,CAAC;AACpG,CAAC;AAED,KAA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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtC,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,kBAAkB;oBAC1E,QAAQ,EAAE,OAAO;oBACjB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;oBAC/D,GAAG,CAAC,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;wBACrD,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE;wBACrC,CAAC,CAAC,EAAE,CAAC;iBACR;aACF;SACF,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpC,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,WAAW,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;IAC1D,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAkB,CAAC,CAAC;IAC/F,MAAM,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Node-only authoring tools for trusted local MetaMesh source. */
|
|
2
|
+
export { AUTHORING_PROTOCOL_VERSION } from "./authoring/types.js";
|
|
3
|
+
export type { AuthoringDiagnostic, AuthoringEnvironment, AuthoringFailure, AuthoringKind, AuthoringPhase, CapturedBuffer, CapturedGeometry, CapturedPart, CapturedResource, CapturedRun, CapturedRunManifest, CheckOptions, CheckSuccess, DocumentationEntry, DocumentationManifest, InstalledAuthoringPackage, RunOptions, RunSuccess, } from "./authoring/types.js";
|
|
4
|
+
export { AuthoringError, authoringFailure } from "./authoring/errors.js";
|
|
5
|
+
export { discoverAuthoringEnvironment, searchAuthoringDocumentation, showAuthoringDocumentation, } from "./authoring/environment.js";
|
|
6
|
+
export type { DocumentationSearchResult } from "./authoring/environment.js";
|
|
7
|
+
export { checkAuthoringSource } from "./authoring/check.js";
|
|
8
|
+
export { runAuthoringSource } from "./authoring/run.js";
|
|
9
|
+
export { inspectCapturedRun, readCapturedRun } from "./authoring/artifacts.js";
|
|
10
|
+
export { renderCapturedRun, installAuthoringBrowser } from "./authoring/render.js";
|
|
11
|
+
export type { RenderOptions, RenderResult, RenderView, RenderFormat, RenderCamera, RenderedImage, } from "./authoring/render-types.js";
|
|
12
|
+
//# sourceMappingURL=authoring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../src/authoring.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACnF,YAAY,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Node-only authoring tools for trusted local MetaMesh source. */
|
|
2
|
+
export { AUTHORING_PROTOCOL_VERSION } from "./authoring/types.js";
|
|
3
|
+
export { AuthoringError, authoringFailure } from "./authoring/errors.js";
|
|
4
|
+
export { discoverAuthoringEnvironment, searchAuthoringDocumentation, showAuthoringDocumentation, } from "./authoring/environment.js";
|
|
5
|
+
export { checkAuthoringSource } from "./authoring/check.js";
|
|
6
|
+
export { runAuthoringSource } from "./authoring/run.js";
|
|
7
|
+
export { inspectCapturedRun, readCapturedRun } from "./authoring/artifacts.js";
|
|
8
|
+
export { renderCapturedRun, installAuthoringBrowser } from "./authoring/render.js";
|
|
9
|
+
//# sourceMappingURL=authoring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring.js","sourceRoot":"","sources":["../src/authoring.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAqBlE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Author and inspect models with an agent
|
|
2
|
+
|
|
3
|
+
Find installed documentation, check TypeScript, generate a captured model, and inspect its measurements and rendered views locally.
|
|
4
|
+
|
|
5
|
+
The `metamesh` CLI gives coding agents and developers the same local workflow: look up the
|
|
6
|
+
installed API, check source, execute the real engine, and inspect a captured result. It runs trusted
|
|
7
|
+
local TypeScript with your ordinary Node permissions. The child process is disposable; it is not a
|
|
8
|
+
security sandbox.
|
|
9
|
+
|
|
10
|
+
## Install and discover the environment
|
|
11
|
+
|
|
12
|
+
Install Modeling for your model code and the CLI for the local authoring workflow:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @metamesh/modeling
|
|
16
|
+
pnpm add -D @metamesh/cli
|
|
17
|
+
pnpm exec metamesh environment
|
|
18
|
+
pnpm exec metamesh setup
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`environment` reports project-resolved versions, documentation locations, available capabilities,
|
|
22
|
+
and `authoringProtocolVersion: 1`. `setup` prints skill installation guidance and a project-instruction
|
|
23
|
+
snippet for you to review. It does not modify your project or install anything.
|
|
24
|
+
|
|
25
|
+
Add the Generator SDK as a direct dependency when defining Generators, and Testkit when writing
|
|
26
|
+
automated tests. A project that only runs ordinary models needs Modeling and the CLI as its direct
|
|
27
|
+
dependencies. Keep installed MetaMesh packages on matching releases.
|
|
28
|
+
|
|
29
|
+
Every public package exposes its offline documentation manifest through `./docs/manifest.json`.
|
|
30
|
+
The CLI searches the packages installed in the selected project. Find a topic in the bounded index,
|
|
31
|
+
then read the returned document ID:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pnpm exec metamesh docs search "cylinder"
|
|
35
|
+
pnpm exec metamesh docs show modeling/reference/model/cylinder
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Documentation is resolved from the selected project through package exports. No global installation
|
|
39
|
+
or documentation fetched from a moving Git branch replaces the installed version.
|
|
40
|
+
|
|
41
|
+
## Model entries
|
|
42
|
+
|
|
43
|
+
A model entry default-exports an ordinary `ModelProgram`. It imports the real package; Studio's
|
|
44
|
+
virtual `@metamesh/project` module is not available in local Node projects.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { box, cylinder, generate } from "@metamesh/modeling";
|
|
50
|
+
|
|
51
|
+
export default generate<Record<never, never>>(({ part }) => {
|
|
52
|
+
const body = box({ size: [30, 20, 6] });
|
|
53
|
+
const bore = cylinder({ height: 8, radius: 3, sizing: "face" });
|
|
54
|
+
return part("plate", body.subtract([bore]));
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Save this as `model.ts`, then check and run it:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pnpm exec metamesh check model.ts --kind model
|
|
64
|
+
pnpm exec metamesh run model.ts --kind model --export-3mf
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Both commands perform semantic TypeScript checking. They use the nearest project TypeScript
|
|
68
|
+
configuration, or an explicit `--tsconfig`, with strict checking enforced. Ordinary local imports
|
|
69
|
+
and installed dependencies are supported. `check` does not evaluate your source.
|
|
70
|
+
|
|
71
|
+
Use `--params values.json` for a model's JSON parameter map; the default is `{}`. Models do not
|
|
72
|
+
receive injected Generator services. A standalone module can prepare licensed local fonts before
|
|
73
|
+
constructing its synchronous generation program.
|
|
74
|
+
|
|
75
|
+
For standalone font provenance, also pass `--font-fixtures fonts.json`. The CLI verifies those local
|
|
76
|
+
bytes and records their declared font selections and immutable revisions in the capture; the model
|
|
77
|
+
still prepares its own fonts and receives no injected services. Arbitrary filesystem or network
|
|
78
|
+
reads are not intercepted, so their asset identities cannot be inferred. The source fingerprint
|
|
79
|
+
covers bundled source, while fixture descriptors provide explicit asset provenance.
|
|
80
|
+
|
|
81
|
+
## Generator entries
|
|
82
|
+
|
|
83
|
+
Install the Generator contract layer in addition to Modeling and the CLI:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pnpm add @metamesh/generator-sdk
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
A Generator entry named-exports `definition` and default-exports its module envelope:
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import {
|
|
95
|
+
defineGenerator,
|
|
96
|
+
defineGeneratorModule,
|
|
97
|
+
type GeneratorParams,
|
|
98
|
+
} from "@metamesh/generator-sdk";
|
|
99
|
+
import { box, generate } from "@metamesh/modeling";
|
|
100
|
+
|
|
101
|
+
export const definition = defineGenerator({
|
|
102
|
+
id: "plate",
|
|
103
|
+
version: "0.1.0",
|
|
104
|
+
title: "Plate",
|
|
105
|
+
groups: [],
|
|
106
|
+
parameters: [{ id: "width", label: "Width", type: "number", default: 30, min: 1 }],
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const model = generate<GeneratorParams<typeof definition>>(({ params, part }) =>
|
|
110
|
+
part("plate", box({ size: [params.width, 20, 6] }))
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
export default defineGeneratorModule({ definition, generate: model });
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pnpm exec metamesh check generator.ts --kind generator
|
|
120
|
+
pnpm exec metamesh run generator.ts --kind generator --params values.json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Generator runs merge declared defaults with explicit overrides, then validate strictly. Unknown
|
|
124
|
+
keys, invalid values, and unsupported combinations produce diagnostics. They are not silently
|
|
125
|
+
clamped or repaired. Use assertions for relationships between parameters.
|
|
126
|
+
|
|
127
|
+
Generators with Font controls supply a local font-fixture descriptor with `--font-fixtures fonts.json`.
|
|
128
|
+
Fixtures resolve beside that descriptor and must match their immutable revisions. Missing
|
|
129
|
+
bytes and revision mismatches fail before generation; the CLI does not fetch catalog fonts.
|
|
130
|
+
|
|
131
|
+
## Inspect the captured result
|
|
132
|
+
|
|
133
|
+
Each run creates a unique directory under `.metamesh/runs`, or the explicit output parent. Use the
|
|
134
|
+
run directory reported by that command as `RUN_DIRECTORY` below:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pnpm exec metamesh inspect RUN_DIRECTORY
|
|
138
|
+
pnpm exec metamesh inspect RUN_DIRECTORY --part plate
|
|
139
|
+
pnpm exec metamesh browser install
|
|
140
|
+
pnpm exec metamesh render RUN_DIRECTORY
|
|
141
|
+
pnpm exec metamesh render RUN_DIRECTORY --views top --format webp --transparent
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Inspection reads finalized geometry facts, including semantic part IDs, placements, colors,
|
|
145
|
+
measurements, diagnostics, and execution provenance. Rendering reads the same captured buffers
|
|
146
|
+
without executing the model again. Artifacts remain usable after the engine session is disposed or
|
|
147
|
+
the run directory is moved. Corrupt or incomplete artifacts reject.
|
|
148
|
+
|
|
149
|
+
Rendering requires the separately installed pinned Chromium. It is never downloaded implicitly;
|
|
150
|
+
checking, generation, and inspection work without it. Standard orthographic views are isometric,
|
|
151
|
+
front, top, and right. The default is an isometric 1024 × 1024 PNG on a neutral background. WebP is
|
|
152
|
+
lossless; PNG and WebP both support explicit transparent output. Images record their run, camera,
|
|
153
|
+
renderer, and browser versions. Compare pixels only within the pinned capture environment.
|
|
154
|
+
|
|
155
|
+
`--export-3mf` exports that run's finalized snapshot. A failed attempt never exposes an older
|
|
156
|
+
successful result as its output. Match the captured parameters and source fingerprint to the
|
|
157
|
+
revision you intended to verify.
|
|
158
|
+
|
|
159
|
+
## Test models
|
|
160
|
+
|
|
161
|
+
Install Testkit separately when you want assertions and fixtures for your existing test runner:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pnpm add -D @metamesh/testkit
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Use its assertions to check dimensions, topology, defaults,
|
|
168
|
+
presets, and parameter variations. Compare physical measurements with explicit tolerances;
|
|
169
|
+
rendered views complement those checks. A valid solid alone does not prove a suitable fit or
|
|
170
|
+
manufacturable wall thickness.
|
|
171
|
+
|
|
172
|
+
Testkit has no compiler, renderer, or browser dependencies. The CLI owns those tools and its
|
|
173
|
+
reusable Node functions under `@metamesh/cli/authoring`; integrations can call them without
|
|
174
|
+
spawning the command.
|
|
175
|
+
|
|
176
|
+
## Command results
|
|
177
|
+
|
|
178
|
+
The CLI defaults to concise human output. Add `--json` for one structured stdout result, with
|
|
179
|
+
bounded author logs on stderr. Exit status is `0` for success, `1` for source, parameter, or
|
|
180
|
+
generation failure, and `2` for invocation, environment, artifact, or tooling failure. Runs have a
|
|
181
|
+
30-second default execution deadline and can lower engine resource ceilings.
|
|
182
|
+
|
|
183
|
+
Modeling and the Generator SDK remain independent of the CLI and its local Node tooling.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# `@metamesh/cli`
|
|
2
|
+
|
|
3
|
+
Check, execute, inspect, and render trusted local MetaMesh source. The `metamesh` executable and
|
|
4
|
+
Node-only `/authoring` functions use the production engine and version-matched installed documentation.
|
|
5
|
+
|
|
6
|
+
> **Preview:** `0.x` minor releases may break compatibility. Patches remain compatible within the
|
|
7
|
+
> same minor line.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Install matching releases in the project where you author models:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @metamesh/modeling
|
|
15
|
+
pnpm add -D @metamesh/cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Add `@metamesh/generator-sdk` when your source defines Generators. Add `@metamesh/testkit` as a
|
|
19
|
+
development dependency when importing testing helpers. CLI internally reuses Testkit font fixtures
|
|
20
|
+
and its SDK contracts; neither package needs to be directly declared for standalone model authoring.
|
|
21
|
+
The compiler, bundler, Three renderer, and Playwright belong to CLI; Testkit does not install them.
|
|
22
|
+
Chromium is installed separately and never downloaded by checking or generation.
|
|
23
|
+
|
|
24
|
+
## Local workflow
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm exec metamesh environment
|
|
28
|
+
pnpm exec metamesh docs search "extrude"
|
|
29
|
+
pnpm exec metamesh docs show TOPIC_ID
|
|
30
|
+
pnpm exec metamesh check model.ts --kind model
|
|
31
|
+
pnpm exec metamesh run model.ts --kind model
|
|
32
|
+
pnpm exec metamesh inspect RUN_DIRECTORY
|
|
33
|
+
pnpm exec metamesh browser install
|
|
34
|
+
pnpm exec metamesh render RUN_DIRECTORY --views isometric,front,top,right
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`run` includes semantic TypeScript checking and executes in a disposable child process with a
|
|
38
|
+
30-second default deadline. It saves each attempt beneath `.metamesh/runs` with source identity,
|
|
39
|
+
parameters, diagnostics, measurements, and hashed geometry buffers. `inspect` and `render` validate
|
|
40
|
+
those captured buffers without importing the original source. Use `--json` for one structured stdout
|
|
41
|
+
result; bounded author logs go to stderr. Exit codes are 0 for success, 1 for source or generation
|
|
42
|
+
failure, and 2 for invocation, environment, artifact, or tooling failure. This executes trusted local
|
|
43
|
+
code and is not a security sandbox.
|
|
44
|
+
|
|
45
|
+
For Generators, use `--kind generator`. Entries named-export `definition` and default-export the
|
|
46
|
+
Generator module envelope. Defaults merge with `--params parameters.json`, then strict validation
|
|
47
|
+
rejects unknown or invalid overrides. Standalone model entries default-export a `ModelProgram` and
|
|
48
|
+
receive no injected services. Both support normal local imports and installed dependencies; Studio's
|
|
49
|
+
virtual `@metamesh/project` module is unavailable.
|
|
50
|
+
|
|
51
|
+
Use `--help` on each command for parameters, fonts, resource limits, export, and image options.
|
|
52
|
+
`metamesh setup` prints skill installation and project-instruction guidance without modifying files.
|
|
53
|
+
|
|
54
|
+
## Programmatic API and documentation
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { inspectCapturedRun, runAuthoringSource } from "@metamesh/cli/authoring";
|
|
58
|
+
|
|
59
|
+
const result = await runAuthoringSource({ entry: "model.ts", kind: "model" });
|
|
60
|
+
if (result.success) {
|
|
61
|
+
console.log(await inspectCapturedRun(result.runDirectory));
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Resolve `@metamesh/cli/docs/manifest.json` for the installed Markdown reference. The
|
|
66
|
+
[authoring guide](https://metamesh.studio/docs/develop/agent-authoring) explains local font fixtures,
|
|
67
|
+
artifacts, rendering, and agent integration. The reusable authoring functions and command
|
|
68
|
+
implementation stay in this package; geometry and Generator contracts retain their existing owners.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
[Apache-2.0](https://github.com/JasonKoolman/metamesh/blob/main/packages/cli/LICENSE).
|