@instruktlabs/kiln 1.0.0 → 1.2.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +60 -3
- package/CONTRIBUTING.md +16 -7
- package/README.md +95 -381
- package/dist/agent-run.mjs +220 -150
- package/dist/build.json +40 -28
- package/dist/cli.mjs +242 -163
- package/dist/mcp-engine.mjs +412 -154
- package/dist/mcp-server.mjs +1 -1
- package/docs/architecture.md +6 -3
- package/docs/chatgpt.md +20 -5
- package/docs/examples.md +40 -170
- package/docs/install.md +100 -35
- package/docs/migration.md +20 -0
- package/docs/sdk.md +49 -5
- package/docs/tools-operations.md +1529 -0
- package/lib/asset-widget-uri.d.ts +9 -0
- package/lib/asset-widget-uri.js +9 -0
- package/lib/cli-render-mode.js +10 -3
- package/lib/discovery/index.d.ts +1 -1
- package/lib/discovery/index.js +2 -2
- package/lib/discovery/portable.d.ts +9 -0
- package/lib/discovery/portable.js +6 -0
- package/lib/discovery/service.d.ts +3 -1
- package/lib/discovery/service.js +4 -2
- package/lib/engine-identity.d.ts +1 -1
- package/lib/engine-identity.js +1 -1
- package/lib/evaluator/isolation.js +19 -5
- package/lib/evaluator/probe-invariants.d.ts +11 -0
- package/lib/evaluator/probe-invariants.js +36 -0
- package/lib/evaluator/probe-worker.js +16 -4
- package/lib/loopback.d.ts +6 -0
- package/lib/loopback.js +6 -0
- package/lib/mcp-core.d.ts +210 -0
- package/lib/mcp-core.js +279 -0
- package/lib/mcp-engine.d.ts +59 -0
- package/lib/mcp-engine.js +289 -0
- package/lib/mcp-manifest.d.ts +15 -0
- package/lib/mcp-manifest.js +65 -0
- package/lib/mcp.d.ts +5 -0
- package/lib/mcp.js +2 -0
- package/lib/render-service-host.js +1 -1
- package/lib/tools/discovery.d.ts +1 -1
- package/lib/tools/discovery.js +11 -9
- package/lib/tools/materials.d.ts +1 -1
- package/lib/tools/materials.js +44 -14
- package/lib/tools/operation-contract.d.ts +8 -0
- package/lib/tools/operation-contract.js +37 -0
- package/lib/tools/operations.d.ts +3 -0
- package/lib/tools/operations.js +154 -0
- package/lib/tools/registry.d.ts +6 -2
- package/lib/tools/registry.js +71 -23
- package/package.json +23 -1
- package/plugin.json +1 -1
- package/plugins/kiln-engine/.claude-plugin/icon.png +0 -0
- package/plugins/kiln-engine/.claude-plugin/plugin.json +9 -3
- package/plugins/kiln-engine/PRIVACY.md +100 -0
- package/plugins/kiln-engine/README.md +103 -18
- package/plugins/kiln-engine/{scripts/setup-workspace.mjs → bin/kiln-setup-workspace.mjs} +37 -9
- package/plugins/kiln-engine/package-provenance.json +15 -8
- package/plugins/kiln-engine/plugin.json +10 -4
- package/plugins/kiln-engine/runtime.json +10 -1
- package/plugins/kiln-engine/skills/kiln-setup-workspace/SKILL.md +17 -18
- package/plugins/kiln-engine/skills/kiln-setup-workspace/references/plugin-install.md +28 -8
- package/plugins/kiln-engine/skills/kiln-setup-workspace/references/renderer-setup.md +11 -0
- package/scripts/create-workspace.mjs +71 -13
- package/scripts/workspace-config.mjs +239 -0
- package/scripts/workspace-project.mjs +384 -0
- package/scripts/workspace-transaction.mjs +504 -0
- package/skills/kiln-setup-workspace/SKILL.md +17 -18
- package/skills/kiln-setup-workspace/references/plugin-install.md +28 -8
- package/skills/kiln-setup-workspace/references/renderer-setup.md +11 -0
- package/src/cli-render-mode.ts +9 -9
- package/src/cli.ts +3 -3
- package/src/discovery/index.ts +2 -0
- package/src/discovery/portable.ts +9 -0
- package/src/discovery/service.ts +3 -1
- package/src/engine-identity.ts +1 -1
- package/src/evaluator/isolation.ts +27 -6
- package/src/evaluator/probe-invariants.ts +50 -0
- package/src/evaluator/probe-worker.ts +22 -4
- package/src/mcp-core.ts +3 -0
- package/src/mcp-engine.ts +11 -1
- package/src/mcp.ts +5 -0
- package/src/render-service-host.ts +1 -1
- package/src/tools/discovery.ts +20 -10
- package/src/tools/materials.ts +59 -15
- package/src/tools/operation-contract.ts +51 -0
- package/src/tools/operations.ts +177 -0
- package/src/tools/registry.ts +100 -20
package/README.md
CHANGED
|
@@ -1,444 +1,158 @@
|
|
|
1
1
|
# Kiln
|
|
2
2
|
|
|
3
3
|
[](https://github.com/instruktlabs/kiln/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@instruktlabs/kiln)
|
|
4
5
|
[](LICENSE)
|
|
5
6
|
|
|
6
7
|
**Build and revise 3D assets with your coding agent.**
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
the model; Kiln does not require a separate model API key for its tools.
|
|
25
|
-
|
|
26
|
-
Walk the [Farm](https://kilnstudio.tools/scenes/farm/), drive across
|
|
27
|
-
[Golden Gate](https://kilnstudio.tools/scenes/golden-gate/), or explore the
|
|
28
|
-
[Foundry Floor](https://kilnstudio.tools/scenes/foundry-floor/), or fight as Achilles
|
|
29
|
-
or Hector in [Troy](https://kilnstudio.tools/scenes/troy/).
|
|
30
|
-
The scenes put Kiln assets to work with animation, levels of detail and interactive controls.
|
|
9
|
+
Your agent writes JavaScript using Kiln's geometry and material helpers. Kiln runs
|
|
10
|
+
the program, returns rendered views and structural checks, and exports a GLB.
|
|
11
|
+
Keep the editable source to refine the asset later.
|
|
12
|
+
|
|
13
|
+
Kiln runs locally through MCP, the CLI or a JavaScript/TypeScript SDK. It is free,
|
|
14
|
+
open source and account-free. Your coding agent supplies the model; Kiln's tools
|
|
15
|
+
do not require a separate model API key.
|
|
16
|
+
|
|
17
|
+
[Documentation](https://kilnstudio.tools/docs/install/) ·
|
|
18
|
+
[Gallery](https://kilnstudio.tools/gallery/) ·
|
|
19
|
+
[Interactive scenes](https://kilnstudio.tools/scenes/) ·
|
|
20
|
+
[Changelog](CHANGELOG.md)
|
|
21
|
+
|
|
22
|
+
| Troy: the city and fleet | Achilles and Hector at the gates |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| [](https://kilnstudio.tools/scenes/troy/) | [](https://kilnstudio.tools/scenes/troy/) |
|
|
31
25
|
|
|
32
26
|
| Farm | Golden Gate |
|
|
33
27
|
| --- | --- |
|
|
34
28
|
| [](https://kilnstudio.tools/scenes/farm/) | [](https://kilnstudio.tools/scenes/golden-gate/) |
|
|
35
|
-
| Crops, animals and working farm buildings. | Bridge, terrain, water and drivable traffic. |
|
|
36
29
|
|
|
37
30
|
| Foundry Floor: the campus | Inside the fab |
|
|
38
31
|
| --- | --- |
|
|
39
32
|
| [](https://kilnstudio.tools/scenes/foundry-floor/) | [](https://kilnstudio.tools/scenes/foundry-floor/) |
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
Play [Troy](https://kilnstudio.tools/scenes/troy/), explore the
|
|
35
|
+
[Farm](https://kilnstudio.tools/scenes/farm/), drive across
|
|
36
|
+
[Golden Gate](https://kilnstudio.tools/scenes/golden-gate/), or walk the
|
|
37
|
+
[Foundry Floor](https://kilnstudio.tools/scenes/foundry-floor/).
|
|
38
|
+
The scenes combine Kiln assets with application code; their [source](scenes/README.md)
|
|
39
|
+
and [asset packs](packs/README.md) are available separately.
|
|
43
40
|
|
|
44
41
|
Six reusable vehicles, shown with the gallery's live body-paint controls:
|
|
45
42
|
|
|
46
|
-
| Hatchback
|
|
43
|
+
| Hatchback | Sedan | SUV |
|
|
47
44
|
| --- | --- | --- |
|
|
48
45
|
| [](https://kilnstudio.tools/gallery/hatchback/) | [](https://kilnstudio.tools/gallery/sedan/) | [](https://kilnstudio.tools/gallery/suv/) |
|
|
49
|
-
| Pickup
|
|
46
|
+
| Pickup | Box truck | Transit bus |
|
|
50
47
|
| [](https://kilnstudio.tools/gallery/pickup/) | [](https://kilnstudio.tools/gallery/box-truck/) | [](https://kilnstudio.tools/gallery/transit-bus/) |
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
All five packs offer **Runtime assets** for applications and **Editable assets** with
|
|
58
|
-
authoring sources, materials and the available revisions. The vehicle viewer includes
|
|
59
|
-
live paint colours. [Pack source](packs/README.md) and the maintained
|
|
60
|
-
[Farm, Bridge, Foundry and Troy scene code](scenes/README.md) are in this repository.
|
|
61
|
-
Large generated models and archives are downloaded explicitly from Cloudflare.
|
|
62
|
-
The [Blender and Unity guide](https://kilnstudio.tools/docs/engine-handoff/)
|
|
63
|
-
describes the tested import workflows and their limits.
|
|
64
|
-
|
|
65
|
-
Kiln's local dashboard adds [optional projects, a material library and Live Review](docs/projects-and-live-review.md).
|
|
66
|
-
Standalone assets remain a complete workflow; projects add shared briefs, inventories,
|
|
67
|
-
art direction and material pins when useful.
|
|
68
|
-
|
|
69
|
-
Earlier examples remain in the gallery and [example provenance](docs/example-provenance.md).
|
|
70
|
-
They are historical showcases, not golden outputs or a model ranking.
|
|
71
|
-
Screenshots above show the v0.9 review builds; [image provenance](assets/readme/README.md).
|
|
72
|
-
|
|
73
|
-
Version **0.10.0** is the v1 readiness release: the stdio server serves protocol revision
|
|
74
|
-
2026-07-28 beside the 2025 handshakes and answers before the engine loads, the three
|
|
75
|
-
record tools are flat objects with an `action` field, every tool result is bounded and
|
|
76
|
-
leads with its verdict, and the generated workspace guide and skills are shorter. It
|
|
77
|
-
builds on 0.9.0's optional projects, material library, Live Review and calibrated
|
|
78
|
-
`review-neutral-v1` lighting rig. [CHANGELOG.md](CHANGELOG.md) lists the changes with
|
|
79
|
-
each breaking one marked, and the [migration notes](docs/migration.md#changes-in-0100)
|
|
80
|
-
list what an existing author will notice.
|
|
81
|
-
|
|
82
|
-
**0.10.0 was the source and site release for dogfooding.** Its package tarball is attached
|
|
83
|
-
to the [v0.10.0 release](https://github.com/instruktlabs/kiln/releases/tag/v0.10.0)
|
|
84
|
-
with `SHA256SUMS.txt` and the installed-package receipts, as later releases' tarballs are
|
|
85
|
-
on the [releases page](https://github.com/instruktlabs/kiln/releases).
|
|
86
|
-
The public npm release candidate and stable release process are described above;
|
|
87
|
-
site deployment does not publish a package.
|
|
88
|
-
|
|
89
|
-
## Install and start an asset workspace
|
|
90
|
-
|
|
91
|
-
Use Node.js **20.15.0+ on the 20.x line**, or **22.2.0 and later**, with npm.
|
|
92
|
-
Download the tarball and `SHA256SUMS.txt` from the release and check the tarball
|
|
93
|
-
against the checksum file before installing. Use only a tarball actually attached to
|
|
94
|
-
a release, with that release's documentation; a checkout ahead of the release
|
|
95
|
-
[builds its own package](docs/install.md#install-a-local-package). Bun and a separate
|
|
96
|
-
model API key are not required to install the tarball:
|
|
49
|
+
## Install
|
|
50
|
+
|
|
51
|
+
Use Node.js 22 or 24 LTS and npm. See [supported versions and platforms](docs/install.md)
|
|
52
|
+
for the complete compatibility range. Bun is only needed to work on Kiln itself.
|
|
97
53
|
|
|
98
54
|
```sh
|
|
99
55
|
mkdir kiln-install
|
|
100
56
|
cd kiln-install
|
|
101
57
|
npm init -y
|
|
102
|
-
npm install /
|
|
103
|
-
|
|
58
|
+
npm install @instruktlabs/kiln
|
|
59
|
+
npx --offline --no -- kiln-init ../my-assets --harness codex
|
|
104
60
|
cd ../my-assets
|
|
105
|
-
# Follow START.md for your harness
|
|
106
61
|
```
|
|
107
62
|
|
|
108
|
-
|
|
109
|
-
`
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
installation, a maintained Node 22 or 24 LTS release is recommended; Node 20
|
|
113
|
-
compatibility accommodates existing distribution-managed installations.
|
|
63
|
+
Open your coding agent in `my-assets` and follow `START.md`. Choose `claude`,
|
|
64
|
+
`codex`, `opencode`, `agy`, `hermes`, `copilot` or `cursor-agent` for `--harness`.
|
|
65
|
+
Setup creates project-local instructions, skills, launchers and a `kiln_workspace`
|
|
66
|
+
MCP connection. Keep this authoring workspace separate from the engine installation.
|
|
114
67
|
|
|
115
|
-
|
|
68
|
+
Then ask your agent for an asset:
|
|
116
69
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
```sh
|
|
120
|
-
git clone --filter=blob:none https://github.com/instruktlabs/kiln
|
|
121
|
-
cd kiln
|
|
122
|
-
bun install --frozen-lockfile
|
|
123
|
-
bun run kiln render examples/crate.kiln.js --out crate.glb --views sheet.png
|
|
124
|
-
```
|
|
70
|
+
> Create a low-poly camping lantern with a carry handle. Review it from several
|
|
71
|
+
> angles, refine any problems, and save the editable source and a GLB.
|
|
125
72
|
|
|
126
|
-
|
|
127
|
-
file contents on the server, fetching them only if you ask for an old revision.
|
|
128
|
-
A plain `git clone` also works and gives you the whole history up front.
|
|
129
|
-
|
|
130
|
-
This writes a GLB and a six-view image of an existing program. It makes no model call.
|
|
131
|
-
Rendering uses the CPU unless a compatible local GPU service is available.
|
|
132
|
-
Use `--render cpu` to select the CPU explicitly. Sheets sit on a neutral grey; add
|
|
133
|
-
`--backdrop dark` or `--backdrop light` when an asset's silhouette merges with it; `kiln save`
|
|
134
|
-
takes the same flag for the preview it stores.
|
|
135
|
-
|
|
136
|
-
For anchored CLI edits, import source with `kiln source asset.kiln.js`, then run
|
|
137
|
-
`kiln edit RETURNED_REF --edits edits.json`. The file contains an array of
|
|
138
|
-
`{ "oldString": "exact existing text", "newString": "replacement text" }` objects.
|
|
139
|
-
The command returns a new immutable reference and diff without executing source;
|
|
140
|
-
render that new reference to inspect the result. `kiln edit --help` describes
|
|
141
|
-
batch limits and `replaceAll`.
|
|
142
|
-
|
|
143
|
-
**Using assets in Blender or Unity?** Read the [handoff guide](docs/engine-handoff.md) for direct GLB import,
|
|
144
|
-
materials, backfaces, named pivots and animation checks. The established exporter remains
|
|
145
|
-
the default. An **experimental community exporter** is available for explicit comparison
|
|
146
|
-
when you need its additional feature preservation; the guide includes activation, rollback
|
|
147
|
-
and known limitations. Both converters are included in this installation.
|
|
148
|
-
|
|
149
|
-
<details>
|
|
150
|
-
<summary>For clones made before the September 10 history cleanup</summary>
|
|
151
|
-
|
|
152
|
-
History was rewritten on 2026-09-10 to drop 288 MB of gallery renders and launch
|
|
153
|
-
video that no tool reads, taking a clone from 440 MB to 60 MB, or 49 MB with
|
|
154
|
-
`--filter=blob:none`; measured 2026-09-12. Every commit survived and the tree is
|
|
155
|
-
unchanged apart from those files, but every commit hash changed, so a clone made
|
|
156
|
-
before that date cannot fast-forward.
|
|
157
|
-
|
|
158
|
-
Re-cloning is simplest. Before converting an old clone, back up uncommitted work
|
|
159
|
-
and local branches: the commands below reset the checkout and prune recovery
|
|
160
|
-
history. Move the **tag** as well as the branch:
|
|
73
|
+
For an **existing project**, Kiln 1.1+ supports a preview followed by adoption:
|
|
161
74
|
|
|
162
75
|
```sh
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
git gc --prune=now
|
|
76
|
+
# Run from kiln-install; replace the path and harness for your project.
|
|
77
|
+
npx --offline --no -- kiln-init /absolute/path/to/my-project --adopt --harness codex --check
|
|
78
|
+
npx --offline --no -- kiln-init /absolute/path/to/my-project --adopt --harness codex
|
|
167
79
|
```
|
|
168
80
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
228 MB where a fresh clone is 26 MB; run it and the same clone packs to 23 MB.
|
|
174
|
-
|
|
175
|
-
The gallery images are served from `assets.kilnstudio.tools`; the 83 poster
|
|
176
|
-
receipts that attest their bytes stayed in `examples/renders/`.
|
|
177
|
-
|
|
178
|
-
</details>
|
|
81
|
+
The preview writes nothing and exits 1 when changes are needed. Adoption preserves
|
|
82
|
+
existing instructions and unrelated configuration, and reports conflicts before
|
|
83
|
+
overwriting files. See [installation and upgrades](docs/install.md) for version
|
|
84
|
+
availability, additional agents, repairs and plugin setup.
|
|
179
85
|
|
|
180
|
-
##
|
|
86
|
+
## What you can do
|
|
181
87
|
|
|
182
|
-
|
|
183
|
-
|
|
88
|
+
| Task | Kiln provides |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| Author and refine | Geometry helpers, named parts, immutable source revisions and anchored edits |
|
|
91
|
+
| Inspect | Multi-view renders, measurements and image-independent structural QA |
|
|
92
|
+
| Save and reuse | A local asset library, revision history and portable source/GLB exports |
|
|
93
|
+
| Review together | A local dashboard with materials, optional projects and Live Review |
|
|
94
|
+
| Integrate | Shared CLI/MCP tools and compiled ESM with TypeScript declarations |
|
|
184
95
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
project-local configuration and leaves your global settings unchanged. A user-level server
|
|
188
|
-
named `kiln` from another installation can still load beside the workspace's
|
|
189
|
-
`kiln_workspace`; author with `kiln_workspace`, and disable the other server for these
|
|
190
|
-
sessions when the harness lists both ([how to tell them apart](docs/harnesses.md)).
|
|
96
|
+
Projects are optional. A single asset needs no pack, project record or hosted account.
|
|
97
|
+
Use [Discovery](docs/tools.md) to find helpers rather than guessing API names.
|
|
191
98
|
|
|
192
|
-
|
|
99
|
+
CPU rendering works without a GPU and is useful for geometry review. Material-faithful
|
|
100
|
+
views use the optional local render service; texture and metallic appearance must be
|
|
101
|
+
checked against the reported fidelity. See [rendering and materials](docs/rendering.md).
|
|
102
|
+
Experimental implicit modeling and the alternative Three.js exporter are opt-in;
|
|
103
|
+
their [stability boundaries](docs/sdk.md#stability-in-1x) are documented separately.
|
|
193
104
|
|
|
194
|
-
|
|
195
|
-
bun run build:runtime
|
|
196
|
-
node scripts/create-workspace.mjs ../my-assets --harness opencode
|
|
197
|
-
cd ../my-assets
|
|
198
|
-
# Follow START.md for your harness
|
|
199
|
-
```
|
|
105
|
+
## CLI and SDK
|
|
200
106
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
first. The compiled MCP server and CLI accept Node.js 20.15.0+ on the 20.x line,
|
|
204
|
-
or 22.2.0 and later. Bun is for building and testing the engine; installed commands
|
|
205
|
-
do not require it. The optional native Strands agent requires Node 22.2.0+.
|
|
206
|
-
See the [runtime requirements and qualification limits](docs/install.md).
|
|
207
|
-
|
|
208
|
-
If the brief depends on textures, roughness, metalness, glass, or other material evidence,
|
|
209
|
-
check the optional [GPU renderer setup](docs/rendering.md#running-the-gpu-renderer) before
|
|
210
|
-
the first authoring session. Auto mode starts a compatible local service lazily when its
|
|
211
|
-
dependencies are available. CPU views are useful for shape and contact, but not for judging
|
|
212
|
-
materials. After dependency repair or a failed startup, call
|
|
213
|
-
`kiln_renderer({action:"reprobe"})` inside the MCP session to refresh its connection.
|
|
214
|
-
Restart after changing Kiln, environment variables or credentials. A compatible
|
|
215
|
-
renderer can also run on another device: configure the MCP server's
|
|
216
|
-
`KILN_RENDER_PORT_URL` and `KILN_RENDER_TOKEN`, or use CLI `--render-port URL` with
|
|
217
|
-
the token in its environment. The [rendering guide](docs/rendering.md#running-the-gpu-renderer)
|
|
218
|
-
covers remote service authentication and lifecycle.
|
|
219
|
-
|
|
220
|
-
**Follow START.md rather than launching the harness directly.** Some harnesses keep all
|
|
221
|
-
configuration in a user-level home and read nothing from a project directory, so the workspace
|
|
222
|
-
reaches them through a small generated launcher -- `node codex.mjs`, `node agy.mjs`,
|
|
223
|
-
`node hermes.mjs` -- which passes the server, the program store and the directory per
|
|
224
|
-
invocation. Nothing is written outside the workspace and your existing configuration and
|
|
225
|
-
sign-in are left alone. Starting those harnesses with their bare command in the workspace finds
|
|
226
|
-
no Kiln tools. START.md names the right command for the harness you chose, and hermes needs one
|
|
227
|
-
extra user-level registration that it prints for you.
|
|
228
|
-
|
|
229
|
-
Try: “Read AGENTS.md, then make a wooden workbench with a lower shelf. Render it,
|
|
230
|
-
review the result, and save the source and GLB.”
|
|
231
|
-
|
|
232
|
-
Setup installs the core authoring, refinement and QA skills. Composition and batch workflows are opt-in.
|
|
233
|
-
These skills work with your chosen harness through CLI/MCP. The optional built-in
|
|
234
|
-
Strands agent adds its own workflow internally; do not copy that context into your
|
|
235
|
-
harness. See [the workflow boundary](docs/runtime.md#optional-native-strands-workflow).
|
|
236
|
-
|
|
237
|
-
The workspace contains your brief, assets, and skills. The engine source and example
|
|
238
|
-
collection stay in the installation directory. See [clean-room setup](docs/clean-room.md)
|
|
239
|
-
for the exact boundaries and headless use, or [installation](docs/install.md) for other
|
|
240
|
-
harnesses and the plugin path.
|
|
241
|
-
|
|
242
|
-
For Google models, see [Antigravity and Gemini setup](docs/google.md). Local coding
|
|
243
|
-
agents use stdio directly; browser chat connections have different setup requirements.
|
|
244
|
-
|
|
245
|
-
## Revise an asset
|
|
246
|
-
|
|
247
|
-
Save finished work into this workspace with
|
|
248
|
-
`node kiln.mjs save workbench.kiln.js --name "Workbench"`, or add
|
|
249
|
-
`--collection library` when you explicitly want it in your cross-workspace user library.
|
|
250
|
-
Run `node kiln.mjs view` to browse **This project** and **Your library**, inspect revisions,
|
|
251
|
-
and download Original GLB, Runtime GLB with companion metadata, or editable ZIP
|
|
252
|
-
bundles. Both collections use the same portable format and viewer. See [saved assets and the viewer](docs/collections.md).
|
|
253
|
-
|
|
254
|
-
For application delivery, export with `--profile runtime --out asset.glb` to move
|
|
255
|
-
Kiln's animation review metadata into a hash-linked JSON sidecar. Native glTF animation
|
|
256
|
-
still plays without that sidecar. The default `editable` profile preserves saved files
|
|
257
|
-
exactly; keep its ZIP for source and build records. The delivery profile is independent
|
|
258
|
-
of the established/experimental converter selected during generation. An export never
|
|
259
|
-
replaces an existing file, unlike `render --out`, because it hands off one exact saved
|
|
260
|
-
revision; `--json` prints a receipt with each file's `bytes` and `sha256`.
|
|
261
|
-
[Which options to use, why they exist, and examples](docs/export-profiles.md#which-option-should-i-use)
|
|
262
|
-
are also included in the authoring and QA skills installed into new asset workspaces.
|
|
263
|
-
|
|
264
|
-
## Use Kiln in a chat client
|
|
265
|
-
|
|
266
|
-
Create and refine assets in ChatGPT through a private MCP connection, then ask to
|
|
267
|
-
see a saved revision. `kiln_present` opens that exact revision in an interactive 3D card in
|
|
268
|
-
supporting MCP App clients. Every coding harness receives exact artifact descriptors and readable
|
|
269
|
-
resource URIs in the JSON result; a verified host can opt into core MCP `resource_link` blocks.
|
|
270
|
-
An agent can also launch the local viewer on the saved revision and provide its loopback URL.
|
|
271
|
-
Orbit the model and inspect its animation without leaving chat.
|
|
272
|
-
ChatGPT viewing was verified with real saved assets.
|
|
273
|
-
|
|
274
|
-
1. Install Kiln (or build the runtime from a checkout) and connect its stdio MCP server through an OpenAI Secure
|
|
275
|
-
MCP Tunnel scoped to your workspace.
|
|
276
|
-
2. Install the authoring and refinement skills with their reference files using
|
|
277
|
-
ChatGPT's native skill uploader.
|
|
278
|
-
3. Ask: “Make a field recorder, review the renders, save it to my project
|
|
279
|
-
collection, and show it with `kiln_present`.”
|
|
280
|
-
|
|
281
|
-
The [ChatGPT setup guide](docs/chatgpt.md) covers connection, skill packaging, and
|
|
282
|
-
host requirements. This currently needs developer setup; it is not a public
|
|
283
|
-
one-click ChatGPT app. Local GLB and editable ZIP downloads work through
|
|
284
|
-
`kiln view`. ChatGPT-native GLB/ZIP attachments remain unverified; download support
|
|
285
|
-
depends on the client or a host-provided delivery link.
|
|
286
|
-
|
|
287
|
-
## Restore source for another edit
|
|
288
|
-
|
|
289
|
-
Import an existing program from your asset workspace:
|
|
107
|
+
The package installs three commands: `kiln`, `kiln-init` and `kiln-mcp`.
|
|
108
|
+
For a command available throughout your terminal, install it globally:
|
|
290
109
|
|
|
291
110
|
```sh
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
The command prints a short `programRef`, such as `p_7c94a132b8e0`, identifying that
|
|
296
|
-
exact source. Copy it exactly for later calls:
|
|
297
|
-
|
|
298
|
-
```js
|
|
299
|
-
// programRef is the value returned by Kiln.
|
|
300
|
-
kiln_source({ programRef, query: "shelfHeight" })
|
|
301
|
-
kiln_edit({
|
|
302
|
-
programRef,
|
|
303
|
-
edits: [{ oldString: "shelfHeight = 0.2", newString: "shelfHeight = 0.35" }]
|
|
304
|
-
})
|
|
111
|
+
npm install -g @instruktlabs/kiln
|
|
112
|
+
kiln discover --capabilities --json
|
|
113
|
+
kiln render my-asset.kiln.js --out my-asset.glb --views sheet.png
|
|
305
114
|
```
|
|
306
115
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
does not modify the base.
|
|
116
|
+
With a project-local installation, use `npx --no -- kiln discover --capabilities --json`
|
|
117
|
+
from that project. The [CLI installation guide](docs/install.md#run-the-cli) covers PATH
|
|
118
|
+
and the equivalent `npm exec` command.
|
|
311
119
|
|
|
312
|
-
|
|
120
|
+
Inside a generated authoring workspace, use its launcher to match the MCP server's
|
|
121
|
+
Kiln installation, Node version and source store:
|
|
313
122
|
|
|
314
123
|
```sh
|
|
315
|
-
node kiln.mjs
|
|
316
|
-
node kiln.mjs render
|
|
124
|
+
node kiln.mjs discover --capabilities --json
|
|
125
|
+
node kiln.mjs render my-asset.kiln.js --out my-asset.glb --views sheet.png
|
|
126
|
+
node kiln.mjs view
|
|
317
127
|
```
|
|
318
128
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
129
|
+
The SDK is available as `@instruktlabs/kiln` and documented subpaths.
|
|
130
|
+
Read the [SDK guide](docs/sdk.md) for imports and host interfaces, and the
|
|
131
|
+
[tool reference](docs/tools.md) for MCP schemas. Local Claude Code and Codex
|
|
132
|
+
[plugins](docs/install.md#local-claude-code-and-codex-plugins) use the same workspace
|
|
133
|
+
setup. Other MCP clients can connect directly.
|
|
323
134
|
|
|
324
|
-
|
|
135
|
+
[ChatGPT](docs/chatgpt.md) uses a separate remote-connection setup. A public hosted
|
|
136
|
+
Kiln service and vendor directory listings are not available yet.
|
|
325
137
|
|
|
326
|
-
|
|
327
|
-
samples a curved sheet; the [complete canopy example](site/examples/equation-canopy.kiln.js)
|
|
328
|
-
adds its material, posts and sockets.
|
|
138
|
+
## Work on Kiln
|
|
329
139
|
|
|
330
|
-
|
|
331
|
-
const surface = parametricSurface(
|
|
332
|
-
(u, v) => [u, 1.35 + 0.22 * Math.sin(u * 2) + 0.12 * v * v, v],
|
|
333
|
-
{ u: [-1.6, 1.6], v: [-0.8, 0.8],
|
|
334
|
-
uSegments: 48, vSegments: 24, orientation: 'vu' }
|
|
335
|
-
);
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
Use `meshGeo` for explicit topology, or shape existing geometry with bends, twists,
|
|
339
|
-
lofts and sweeps. [Geometry contracts and limits](docs/geometry.md).
|
|
340
|
-
|
|
341
|
-
To check an attachment, request a close-up beside a whole-asset view. Reuse the
|
|
342
|
-
`programRef` and exact `partPath` from the render result:
|
|
343
|
-
|
|
344
|
-
```js
|
|
345
|
-
kiln_render({ programRef, capture: {
|
|
346
|
-
version: 'kiln.capture.v1', cols: 2,
|
|
347
|
-
shots: [
|
|
348
|
-
{ name: 'Whole asset' },
|
|
349
|
-
{ name: 'Attachment', subject: { path: partPath },
|
|
350
|
-
visibility: 'context', camera: { type: 'orbit', relativeTo: 'part',
|
|
351
|
-
azimuthDeg: 65, elevationDeg: -18, padding: 3 } }
|
|
352
|
-
]
|
|
353
|
-
}});
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
The close-up follows the part's local axes while retaining surrounding geometry.
|
|
357
|
-
You can also set explicit camera positions, return separate images, or sample
|
|
358
|
-
animation frames. Either capture shape also takes `backdrop: 'neutral' | 'dark' |
|
|
359
|
-
'light'`, and every result echoes the one used as `capture.backdrop`. `kiln_save` takes the
|
|
360
|
-
same field for the preview it stores, and the manifest records it as `preview.backdrop`.
|
|
361
|
-
[Camera controls](docs/cameras.md).
|
|
362
|
-
|
|
363
|
-
## Tool reference
|
|
364
|
-
|
|
365
|
-
Use `kiln_discover` to find operations, assemblies and optional recipes in ordinary
|
|
366
|
-
modeling language. An empty request returns a compact overview with starting
|
|
367
|
-
signatures and six summaries. For example, search with `{ query: "curved hollow tube" }`,
|
|
368
|
-
then request `{ ids: ["sweepProfile"] }` for a complete contract and example. Exact
|
|
369
|
-
batches accept up to six distinct IDs or executable names. Recipes take the id the
|
|
370
|
-
search prints, with or without its prefix: `{ ids: ["recipe:material-wood-v1"] }` or
|
|
371
|
-
`{ ids: ["material-wood-v1"] }`. A material recipe's summary names the call it stands
|
|
372
|
-
for, `await materialRecipe("kiln.material.wood.v1")`. Search is local and needs no
|
|
373
|
-
separate model, network call, or asset-category selection.
|
|
374
|
-
|
|
375
|
-
The same workflow is available from your asset workspace in the CLI:
|
|
376
|
-
|
|
377
|
-
```sh
|
|
378
|
-
node kiln.mjs discover --query "curved hollow tube"
|
|
379
|
-
node kiln.mjs discover --id sweepProfile --id createPart --json
|
|
380
|
-
node kiln.mjs discover --kind recipe
|
|
381
|
-
node kiln.mjs discover --capabilities
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
Search and overview accept `family`, `kind`, `tags`, `offset` and `limit` (default six,
|
|
385
|
-
maximum twelve). CLI uses `--family`, `--kind`, repeated `--tag`, `--offset` and `--limit`.
|
|
386
|
-
Browse current filter labels in the overview. Search relevance does not certify that
|
|
387
|
-
a helper supports the entire requested asset; read its limitations and exact contract.
|
|
388
|
-
|
|
389
|
-
`kiln_list_primitives` and its `name`, `names`, and `category` selectors are removed,
|
|
390
|
-
with no callable alias. Stop the harness/MCP session, then run `kiln-init WORKSPACE
|
|
391
|
-
--check` and `kiln-init WORKSPACE --upgrade` from the updated installation. Upgrade
|
|
392
|
-
preserves assets and refuses conflicting local changes; resolve those explicitly
|
|
393
|
-
before retrying. Restart the session to load current schemas. A fresh workspace is
|
|
394
|
-
also supported. `--repair` repairs paths without upgrading copied skills. Use
|
|
395
|
-
`kiln migrate intent|manifest OLD.json --out REVIEW.json` for an explicit legacy-data
|
|
396
|
-
review; unresolved obligations prevent activation. See [migration](docs/migration.md).
|
|
397
|
-
The
|
|
398
|
-
[generated tool reference](docs/tools.md) covers source editing, validation,
|
|
399
|
-
rendering, part inspection, animation and interior views. The shared factory is
|
|
400
|
-
`createKilnProgramToolRegistry` in `@instruktlabs/kiln/tools`.
|
|
401
|
-
|
|
402
|
-
## Uses and limitations
|
|
403
|
-
|
|
404
|
-
The examples cover props, machinery, vehicles, buildings and rigid-part animation.
|
|
405
|
-
Programs are useful when you want named parts, adjustable dimensions and repeatable
|
|
406
|
-
variants. Organic shapes and detailed character work are less well demonstrated.
|
|
407
|
-
Kiln is not a reconstruction tool: a reference image does not establish unseen geometry.
|
|
408
|
-
|
|
409
|
-
Structural checks help find problems, but do not establish visual quality or suitability
|
|
410
|
-
for a particular game. Review scale, performance, collision and appearance in your target
|
|
411
|
-
scene. The CPU renderer shows geometry and base colours; inspect `viewFidelity` before
|
|
412
|
-
judging textures or PBR materials. [GPU setup and materials](docs/rendering.md).
|
|
413
|
-
|
|
414
|
-
## Development
|
|
140
|
+
For engine development, use the [pinned toolchain](toolchain.json):
|
|
415
141
|
|
|
416
142
|
```sh
|
|
143
|
+
git clone --filter=blob:none https://github.com/instruktlabs/kiln
|
|
144
|
+
cd kiln
|
|
145
|
+
bun install --frozen-lockfile
|
|
146
|
+
bun run build:sdk
|
|
147
|
+
node scripts/example-archive.mjs --fetch
|
|
417
148
|
bun run typecheck
|
|
418
|
-
bun run lint
|
|
419
149
|
bun run test
|
|
420
|
-
bun run test:coverage
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
Tests run without model calls and use CPU rendering. Coverage thresholds are checked
|
|
424
|
-
in CI. Runtime changes to the MCP server or CLI must also rebuild their committed bundles:
|
|
425
|
-
|
|
426
|
-
```sh
|
|
427
|
-
bun run build:runtime
|
|
428
150
|
```
|
|
429
151
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
- [Library and architecture](docs/architecture.md)
|
|
435
|
-
- [Headless generation](docs/dispatch.md)
|
|
436
|
-
- [Headless harnesses](docs/harnesses.md)
|
|
437
|
-
- [Program-reference design](docs/programs.md)
|
|
438
|
-
- [Example collection](docs/examples.md)
|
|
439
|
-
- [Production history](docs/history/production-architecture.md)
|
|
440
|
-
|
|
441
|
-
Kiln began as the engine behind Kiln Studio. The hosted product has retired; this
|
|
442
|
-
repository contains the open-source engine and local tools.
|
|
152
|
+
Read [CONTRIBUTING.md](CONTRIBUTING.md) for the complete checks, package builds and
|
|
153
|
+
bug-report guidance, and [AGENTS.md](AGENTS.md) when changing the engine with an agent.
|
|
154
|
+
Author assets in a separate workspace. Large scene downloads are optional and are
|
|
155
|
+
not fetched by cloning the repository.
|
|
443
156
|
|
|
444
|
-
|
|
157
|
+
Kiln is maintained by [Instrukt Labs](https://github.com/instruktlabs) and released
|
|
158
|
+
under the [MIT license](LICENSE). Downloaded asset packs carry their own licenses.
|