@tora-editor/tora 0.1.0 → 0.3.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 +107 -58
- package/assets/free-audio/arcade-pop/audio/loss.wav +0 -0
- package/assets/free-audio/arcade-pop/audio/reward.wav +0 -0
- package/assets/free-audio/arcade-pop/audio/win.wav +0 -0
- package/assets/free-audio/arcade-pop/source/INFO.txt +11 -11
- package/assets/kenney-food-starter/License.txt +28 -0
- package/assets/kenney-food-starter/burger.glb +0 -0
- package/assets/kenney-food-starter/frying-pan.glb +0 -0
- package/assets/kenney-food-starter/plan.json +61 -0
- package/assets/kenney-food-starter/plate.glb +0 -0
- package/assets/kenney-food-starter/pot.glb +0 -0
- package/assets/kenney-harvest/audio/victory.wav +0 -0
- package/assets/kenney-harvest/source/music-jingles/OGG/jingles_NES/jingles_NES03.ogg +0 -0
- package/assets/kenney-harvest/source/music-jingles/OGG/jingles_PIZZA/jingles_PIZZA03.ogg +0 -0
- package/assets/kenney-harvest/source/music-jingles/license.txt +14 -0
- package/bin/tora.mjs +322 -28
- package/crates/packer/trusted/native-3d-meta.json +4 -3
- package/crates/packer/trusted/native-3d.js +181 -181
- package/crates/packer/trusted/native-meta.json +3 -3
- package/crates/packer/trusted/native.js +5 -5
- package/crates/packer/trusted/release-manifest.json +17 -17
- package/crates/packer/trusted/review-runtime-meta.json +4 -3
- package/crates/packer/trusted/review-runtime.js +182 -182
- package/docs/MIGRATION_0_3.md +39 -0
- package/docs/NATIVE_AGENT_TOOLS.md +12 -363
- package/docs/TORA_AGENT_SETUP.md +24 -95
- package/docs/TORA_CREATION_API.md +63 -348
- package/docs/reference/CORE_AUTHORING.md +10 -3
- package/docs/reference/PLAYABLE_STARTERS.md +20 -0
- package/docs/reference/packs/3d.md +11 -3
- package/network-rules/mintegral-appgrowth-single-html.json +10 -10
- package/package.json +6 -6
- package/packages/creative-project/project-v21.schema.json +372 -9
- package/scripts/lean/editor/entry.js +11 -6
- package/scripts/lean/editor/project-launcher.js +116 -0
- package/scripts/lean/editor/quick-edit-panel.js +479 -0
- package/scripts/lean/editor/review-editor.css +256 -68
- package/scripts/lean/editor/review-editor.js +1834 -1086
- package/scripts/lean/editor-state.mjs +6 -0
- package/scripts/lean/editor.mjs +6 -3
- package/scripts/lean/matrix.mjs +5 -0
- package/scripts/lean/native/agent-tools.mjs +39 -62
- package/scripts/lean/native/api.mjs +161 -136
- package/scripts/lean/native/asset-catalog.mjs +7 -6
- package/scripts/lean/native/asset-lineage.mjs +54 -0
- package/scripts/lean/native/asset-prep.mjs +173 -40
- package/scripts/lean/native/assets.mjs +107 -11
- package/scripts/lean/native/audio-assets.mjs +30 -0
- package/scripts/lean/native/browser-pool.mjs +34 -0
- package/scripts/lean/native/build-cache.mjs +38 -7
- package/scripts/lean/native/cc0-inputs.mjs +24 -0
- package/scripts/lean/native/cc0-staging.mjs +28 -8
- package/scripts/lean/native/compiler.mjs +9 -3
- package/scripts/lean/native/contracts.mjs +16 -11
- package/scripts/lean/native/creative-qa.mjs +365 -128
- package/scripts/lean/native/demos.mjs +53 -18
- package/scripts/lean/native/document.mjs +50 -12
- package/scripts/lean/native/export-budget.mjs +75 -0
- package/scripts/lean/native/local-bundle.mjs +7 -3
- package/scripts/lean/native/mcp-server.mjs +42 -74
- package/scripts/lean/native/media-validate.mjs +124 -0
- package/scripts/lean/native/modules/harvest-restore.mjs +3 -284
- package/scripts/lean/native/modules/sort-puzzle.mjs +51 -0
- package/scripts/lean/native/modules/star-salvage.mjs +3 -368
- package/scripts/lean/native/native-bin.mjs +3 -3
- package/scripts/lean/native/outcome-playthrough.mjs +97 -0
- package/scripts/lean/native/project-bundle.mjs +6 -5
- package/scripts/lean/native/project-index.mjs +0 -2
- package/scripts/lean/native/qa-adapters.mjs +10 -0
- package/scripts/lean/native/quick-edit.mjs +328 -0
- package/scripts/lean/native/remote-cc0-fetcher.mjs +403 -197
- package/scripts/lean/native/review.mjs +205 -571
- package/scripts/lean/native/schema-vocabulary.mjs +10 -0
- package/scripts/lean/native/schema.mjs +7 -5
- package/scripts/lean/native/scope.mjs +45 -0
- package/scripts/lean/native/service.mjs +378 -79
- package/scripts/lean/native/starters.mjs +563 -0
- package/scripts/lean/native/variant-adapters.mjs +8 -0
- package/scripts/lean/native/variants-core.mjs +186 -0
- package/scripts/lean/native/variants.mjs +63 -0
- package/scripts/lean/native/win-cues.mjs +96 -0
- package/skills/tora-playables/SKILL.md +1 -1
- package/scripts/lean/editor/review-intake.js +0 -837
- package/scripts/lean/model-client.mjs +0 -119
- package/scripts/lean/native/author-expansion-proofs.mjs +0 -240
- package/scripts/lean/native/author-games.mjs +0 -160
- package/scripts/lean/native/author-harvest.mjs +0 -74
- package/scripts/lean/native/author-primitive-proofs.mjs +0 -874
- package/scripts/lean/native/author-salvage.mjs +0 -71
- package/scripts/lean/native/chat-compose.mjs +0 -287
- package/scripts/lean/native/check-harvest-outcome-audio.mjs +0 -191
- package/scripts/lean/native/check-salvage.mjs +0 -197
- package/scripts/lean/native/compatibility.mjs +0 -34
- package/scripts/lean/native/concept.mjs +0 -633
- package/scripts/lean/native/draw-stroke.mjs +0 -26
- package/scripts/lean/native/erase-mask.mjs +0 -18
- package/scripts/lean/native/harvest-recipe.mjs +0 -21
- package/scripts/lean/native/instance-steering.mjs +0 -24
- package/scripts/lean/native/intake-creator-agent.mjs +0 -98
- package/scripts/lean/native/intake-creator-tools.mjs +0 -165
- package/scripts/lean/native/interaction-gestures.mjs +0 -45
- package/scripts/lean/native/match-board.mjs +0 -138
- package/scripts/lean/native/modules/index.mjs +0 -54
- package/scripts/lean/native/modules/tap-collect.mjs +0 -54
- package/scripts/lean/native/path-network.mjs +0 -132
- package/scripts/lean/native/physics-2d.mjs +0 -154
- package/scripts/lean/native/physics-3d.mjs +0 -259
- package/scripts/lean/native/prepare-audio-collections.mjs +0 -112
- package/scripts/lean/native/prepare-game-audio.mjs +0 -372
- package/scripts/lean/native/prepare-golf-3d-assets.py +0 -177
- package/scripts/lean/native/prepare-golf-assets.py +0 -211
- package/scripts/lean/native/prepare-harvest-audio.mjs +0 -83
- package/scripts/lean/native/prepare-harvest-images.mjs +0 -31
- package/scripts/lean/native/prepare-primitive-images.py +0 -25
- package/scripts/lean/native/prepare-space-salvage-images.mjs +0 -89
- package/scripts/lean/native/prepare-traffic-assets.py +0 -329
- package/scripts/lean/native/presentation.mjs +0 -335
- package/scripts/lean/native/review-agent-tools.mjs +0 -561
- package/scripts/lean/native/review-connection.mjs +0 -303
- package/scripts/lean/native/review-fields.mjs +0 -24
- package/scripts/lean/native/review-intake.mjs +0 -385
- package/scripts/lean/native/review-intents.mjs +0 -217
- package/scripts/lean/native/review-provider.mjs +0 -580
- package/scripts/lean/native/review-receipts.mjs +0 -76
- package/scripts/lean/native/review-resolver.mjs +0 -429
- package/scripts/lean/native/review-targets.mjs +0 -35
- package/scripts/lean/native/runtime.mjs +0 -1623
- package/scripts/lean/native/salvage-recipe.mjs +0 -20
- package/scripts/lean/native/stage-3d.mjs +0 -818
- package/scripts/lean/native/verify.mjs +0 -4
- package/scripts/lean/scene-document.mjs +0 -48
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Upgrading to Tora 0.3.0
|
|
2
|
+
|
|
3
|
+
Release 0.3.0 makes a clean automation-interface break. Native project schema `2.1.0`, saved projects, assets, revision history, variants, exports, and independent Rust artifact verification are preserved.
|
|
4
|
+
|
|
5
|
+
## Removed interfaces
|
|
6
|
+
|
|
7
|
+
The following MCP names no longer appear in discovery and return the standard unknown-tool error:
|
|
8
|
+
|
|
9
|
+
- `tora_compose`
|
|
10
|
+
- `tora_upload_asset`
|
|
11
|
+
- `tora_review_resolve`
|
|
12
|
+
- `tora_intake_read`
|
|
13
|
+
- `tora_intake_claim`
|
|
14
|
+
- `tora_intake_build`
|
|
15
|
+
|
|
16
|
+
Use `tora_upload_assets` with a one-item `items` array for single-asset upload. Use `tora_create` plus `tora_edit` for custom native projects, or `tora_starters` plus `tora_compose_starter` for the burger and racing starters.
|
|
17
|
+
|
|
18
|
+
Provider connection/model routes, browser intake lifecycle and asset routes, free-pack/from-chat composition, automatic translation, and legacy composition routes were removed without aliases. They return the normal unknown-route response.
|
|
19
|
+
|
|
20
|
+
The browser launcher no longer accepts creation chat or runs background builds. Translations are supplied by your external client through `tora_variants` or the variants HTTP endpoint.
|
|
21
|
+
|
|
22
|
+
## Review migration
|
|
23
|
+
|
|
24
|
+
Review now uses `tora-review-journal-2`. Notes require explicit native record scopes and per-note UUIDs. `tora_review_propose` accepts native `operations`, `proposalId`, `summary`, and `addressedNoteIds` covering every note; legacy field-value maps are not accepted. Tora verifies the actual diff and standalone-browser QA before offering a candidate. Acceptance remains explicit.
|
|
25
|
+
|
|
26
|
+
Old review journals are readable history only and cannot be resumed or promoted. In the browser, choose **Create new review from these notes**, select a new scope, and capture the current baseline.
|
|
27
|
+
|
|
28
|
+
## Existing local data
|
|
29
|
+
|
|
30
|
+
Tora does not delete or read obsolete credential files. If you no longer need them, manually remove these files from the project store (normally `.tora/native-projects/`):
|
|
31
|
+
|
|
32
|
+
- `.tora-connection.json`
|
|
33
|
+
- `.orcarouter.key`
|
|
34
|
+
|
|
35
|
+
Their contents are not printed, migrated, or included in diagnostics. Provider environment variables are no longer used; unset them in your own shell or process configuration when convenient.
|
|
36
|
+
|
|
37
|
+
Existing `.review-intakes` directories are left untouched. Original briefs, build metadata, and uploaded files remain there for manual recovery. Projects already created from an intake are ordinary native projects and do not need conversion.
|
|
38
|
+
|
|
39
|
+
Showcase demos now open preserved editable native fixtures rather than rerunning old authoring scripts. Existing materialized demos remain openable. Lean installations continue to hide showcases whose fixtures or assets are unavailable.
|
|
@@ -1,376 +1,25 @@
|
|
|
1
|
-
# Compact native
|
|
1
|
+
# Compact native CLI adapter
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
CLI prints one compact JSON response, or a rejection code on stderr and exits 1.
|
|
5
|
-
`TORA_PROJECT_STORE` selects the store; its default is `.tora/native-projects`.
|
|
6
|
-
No command calls a model. Existing native validation, history and compilation
|
|
7
|
-
remain authoritative.
|
|
3
|
+
`node scripts/lean/native/agent-cli.mjs` accepts one JSON request on stdin and prints one compact JSON response. `TORA_PROJECT_STORE` selects the store (default `.tora/native-projects`). The adapter shares `NativeAgentTools` with MCP; it makes no model calls.
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
through the normal composition entry point. Use a fresh project ID when repeating.
|
|
11
|
-
|
|
12
|
-
```sh
|
|
13
|
-
node scripts/lean/native/author-garden.mjs reports/garden-review my-garden-review
|
|
14
|
-
node scripts/lean/native/check-garden.mjs reports/garden-review
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
The v2 contract is described below. It requires explicit claim bindings and artwork,
|
|
18
|
-
then creates two puzzles, persistent repair choices, recovery and executable pacing.
|
|
19
|
-
|
|
20
|
-
Low-level requests follow.
|
|
5
|
+
Examples:
|
|
21
6
|
|
|
22
7
|
```json
|
|
23
8
|
{"command":"create","id":"my-game","name":"My game"}
|
|
24
|
-
{"command":"inspect","id":"my-game"}
|
|
25
9
|
{"command":"inspect","id":"my-game","tree":true}
|
|
26
|
-
{"command":"inspect","id":"my-game","
|
|
27
|
-
{"command":"inspect","id":"my-game","ids":["title"],"fields":["parameters.text"]}
|
|
10
|
+
{"command":"inspect","id":"my-game","includeReview":true}
|
|
28
11
|
{"command":"contracts","packs":["core"],"format":"compact"}
|
|
29
|
-
{"command":"contracts","names":["native.text.v1"]}
|
|
30
12
|
```
|
|
31
13
|
|
|
32
|
-
`
|
|
33
|
-
return `creativeStatus:"PROTOTYPE"` and unmet requirements. The response binds every
|
|
34
|
-
composition to `conceptHash`. Concept and project approval remain explicit.
|
|
35
|
-
|
|
36
|
-
Inspection returns `expected: {revisionId,contentHash}` for the edit you reviewed.
|
|
37
|
-
Use `tree:true` (with optional `sceneId`) for a deterministic compact scene outline
|
|
38
|
-
(bounded to 16 KiB) containing `base`, `assets`, `variables`, indented scene hierarchy
|
|
39
|
-
nodes, and compact `bindings`. Scoped inspection includes relevant ancestors, referenced
|
|
40
|
-
records and reverse references; parameter inspection includes the selected property
|
|
41
|
-
descriptors. Overview/search responses have an 8 KiB limit and scoped responses a 24 KiB
|
|
42
|
-
limit. An oversized response returns `E_AGENT_NARROW_SCOPE` instead of truncating. Use
|
|
43
|
-
`full:true` explicitly to retrieve the complete project document.
|
|
44
|
-
|
|
45
|
-
Submit an edit with `command:"edit"`, `id`, `expected`, either `operations` or a cached
|
|
46
|
-
`commitPreviewDigest` (never both), and `scope`, an array of intended changed record IDs.
|
|
47
|
-
Pass `scopeCreates:true` to auto-allow brand-new records in the transaction whenever every
|
|
48
|
-
pre-existing component, behavior, event, binding, or variable they reference is explicitly
|
|
49
|
-
listed in `scope` (existing records and `$project.base` still always require explicit
|
|
50
|
-
`scope`). Use the reserved scope ID `$project.base` for project settings changes
|
|
51
|
-
(`setStore` and `setStartScene`). Their changed ID is reported even when no scene
|
|
52
|
-
or component record changes. Tombstones are automatic deletion bookkeeping, not
|
|
53
|
-
a separate authorable scope. Preview and commit happen within that call. If validation finds any
|
|
54
|
-
changed records outside scope, the result is `status:"PREVIEW"` with
|
|
55
|
-
`outsideScope`, changed IDs and a `previewDigest`; no mutation occurs. Review those effects
|
|
56
|
-
and either resubmit with the intended `scope` plus `commitPreviewDigest` (committing the
|
|
57
|
-
cached preview without regenerating `operations`, still enforcing `scope` and revision
|
|
58
|
-
checks) or rebuild the operations. `previewOnly` requests inspection without committing.
|
|
59
|
-
A stale revision fails without rebasing. Successful edit responses fit within 4 KiB;
|
|
60
|
-
oversized responses fail before commit.
|
|
14
|
+
Edits require `id`, `expected`, `scope`, and either `operations` or `commitPreviewDigest`. `$project.base` covers project settings. `scopeCreates:true` permits only new records whose existing references are explicitly scoped. Out-of-scope changes return `PREVIEW` without mutation. Stale identities and digests fail closed.
|
|
61
15
|
|
|
62
16
|
Other commands:
|
|
63
17
|
|
|
64
|
-
- `history`:
|
|
65
|
-
- `render`:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- `
|
|
69
|
-
|
|
70
|
-
- `export` batch: `id`, optional `revisionId`, `targets:[...]` (1–8 unique targets), and
|
|
71
|
-
`outputDir`. Compiles targets in parallel, reuses verified QA receipts when valid, and
|
|
72
|
-
runs Creative QA serially to prevent 150 ms timing contention.
|
|
73
|
-
- `export` with `format:"project"`: `id` and `output` for the current editable bundle.
|
|
74
|
-
- `import`: `file` and optional `copy:true`; validates and imports an editable bundle.
|
|
75
|
-
Project collision handling and asset validation use the shared bundle adapter.
|
|
76
|
-
|
|
77
|
-
Contract requests accept registered component contracts, behavior names, or
|
|
78
|
-
`operations`, `events`, `actions`, and `limits`, plus optional `format:"compact"` (emitting
|
|
79
|
-
`tora-creation-capabilities-compact-1` with hoisted common contract properties and short
|
|
80
|
-
units on all unit-bearing fields). The registry is returned only when explicitly requested;
|
|
81
|
-
it is not attached to every mutation response. HTTP parity is available via
|
|
82
|
-
`GET /api/creation/capabilities?format=compact&packs=...`, `GET /api/projects/:id?tree=1`,
|
|
83
|
-
`GET /api/assets/catalog`, `POST /api/assets/fetch-cc0`, `POST /api/assets/prep`,
|
|
84
|
-
`POST /api/projects/:id/stage-cc0`, and `POST /api/projects/:id/assets` accepting
|
|
85
|
-
`{expected, assets:[...]}` for atomic batch uploads.
|
|
86
|
-
|
|
87
|
-
Standalone HTML remains a browser draft. Every network output starts as
|
|
88
|
-
`ASSEMBLED_UNVERIFIED`: Unity/AppLovin use MRAID, Meta uses FbPlayableAd, Google
|
|
89
|
-
uses ExitApi, ironSource uses DAPI, Mintegral uses its global lifecycle, and TikTok
|
|
90
|
-
uses its Playable SDK. Run `playable artifact check` on the exact HTML or ZIP;
|
|
91
|
-
`STATIC_PASS` is static qualification only. Neither compilation nor static inspection establishes
|
|
92
|
-
visual, physical-device, official ad-network, or campaign acceptance.
|
|
93
|
-
|
|
94
|
-
## Creative QA gate
|
|
95
|
-
|
|
96
|
-
`tora_qa` and CLI `{"command":"qa","id":"my-game"}` run static/acoustic preflight and
|
|
97
|
-
Playwright checks at 320×568, 390×844, 768×1024, and 844×390. They write a
|
|
98
|
-
`tora-creative-qa-1` report, labeled individual viewport PNGs, triage-only contact
|
|
99
|
-
sheets (`screenshots/sheet-<state>.png` and `screenshots/contact-sheet.png`), and
|
|
100
|
-
post-SLA 390×844 motion filmstrips (`screenshots/filmstrip-interaction.png` plus
|
|
101
|
-
`screenshots/filmstrip-end-card.png` when end-card is reached in `real-play` mode,
|
|
102
|
-
marked `triageOnly: true`; opt out with `motionFilmstrip: false`). Pass
|
|
103
|
-
`recordVideo: true` to record an opt-in WebM clip (`screenshots/gameplay.webm`).
|
|
104
|
-
Contact sheets and filmstrips speed up mid-build visual & animation triage, but
|
|
105
|
-
individual full-size viewport PNGs and real-device gameplay review remain mandatory
|
|
106
|
-
before final delivery. Checks cover WAV clipping/silence, catalog role and valence,
|
|
107
|
-
distinct win/loss bytes, mix hierarchy, unsupported pixel glyphs, stage/parent
|
|
108
|
-
clipping, text fit, 44 CSS-pixel touch targets, interactive overlap, SDK safe zones,
|
|
109
|
-
and a primary-input response within 150 ms.
|
|
110
|
-
|
|
111
|
-
Standalone and Unity HTML exports run the same gate. Passing QA receipts are cached
|
|
112
|
-
across MCP, HTTP, and intake services by artifact hash, QA/host-script checker version,
|
|
113
|
-
Playwright/Chromium version, target, and motion/video scenario (verifying referenced
|
|
114
|
-
screenshot, filmstrip, and video hashes on disk before returning a hit). A failed
|
|
115
|
-
video or filmstrip capture degrades to a warning so export remains eligible, but never
|
|
116
|
-
poisons the receipt cache for subsequent retries. Because the 150 ms interaction check is timing-sensitive, a
|
|
117
|
-
borderline passing result remains cached until the artifact, checker, Playwright/Chromium
|
|
118
|
-
version, or stored screenshot artifacts change. Blockers reject export with `E_CREATIVE_QA`
|
|
119
|
-
and the structured report; batch exports run QA for every target before writing any output
|
|
120
|
-
files so partial failure leaves no orphaned exports on disk. Successful manifests identify
|
|
121
|
-
the QA evidence. Review agents can call their `qa` tool on a preview digest, and candidates
|
|
122
|
-
with blockers are not staged. Editable project-bundle export remains available for
|
|
123
|
-
repair and is not represented as a playable-quality pass.
|
|
124
|
-
|
|
125
|
-
For a standalone artifact, run
|
|
126
|
-
`node scripts/lean/native/creative-qa.mjs path/to/index.html --output reports/my-game-qa`.
|
|
127
|
-
End-card and timeout capture require an explicit generic `--state-hook` global
|
|
128
|
-
function; unsupported states are reported as skipped or unavailable, never passed.
|
|
129
|
-
The integrated service currently audits opening and first-input states. Automated
|
|
130
|
-
QA does not replace full-loop playthrough, human visual/audio review, physical-device
|
|
131
|
-
testing, or official network acceptance.
|
|
132
|
-
|
|
133
|
-
## Storage and migration
|
|
134
|
-
|
|
135
|
-
Local editor and tools now default to `.tora/native-projects/`. Existing stores
|
|
136
|
-
remain untouched. Run `npm run migrate:native-store` to copy and validate the
|
|
137
|
-
old default `reports/native-final/projects` into the new default. Migration
|
|
138
|
-
refuses an existing destination, validates revisions/assets, retains the old
|
|
139
|
-
store, and transfers history pointers. Use `EDITOR_STORE` to reopen the old
|
|
140
|
-
store if needed. New compact tools are available for evaluation; promotion
|
|
141
|
-
as the preferred workflow awaits the benchmark gates. Legacy entrypoints
|
|
142
|
-
remain supported and have not been retired.
|
|
143
|
-
|
|
144
|
-
## Executable restoration concepts
|
|
145
|
-
|
|
146
|
-
`tora_compose` exposes the same composer through MCP after `tora_brief`. Discover
|
|
147
|
-
the current schema with `tora_capabilities` and `names:["creative-concept"]`.
|
|
148
|
-
CLI `contracts` accepts the same name. The MCP transport has a bounded 12 MiB message limit for raw base64 uploads;
|
|
149
|
-
large local files can instead use `tora_upload_asset` with a workspace `filePath`.
|
|
150
|
-
Auto optimization retains original masters and returns a delivery receipt.
|
|
151
|
-
|
|
152
|
-
`compose` also accepts `tora-creative-concept-2` with mechanic `match-restore` and
|
|
153
|
-
`experience.goal=2` for existing restoration projects. The historical illustrated
|
|
154
|
-
example preserves its saved artwork and explicit strategy plan.
|
|
155
|
-
|
|
156
|
-
New production modules require free third-party asset provenance and one visual
|
|
157
|
-
style family per playable. Source visuals from a coherent pack such as Kenney or
|
|
158
|
-
another appropriately licensed free library. Verify the source URL, author,
|
|
159
|
-
license identifier, source file, and downloaded bytes. Audio may use a separate
|
|
160
|
-
compatible sound pack. The module's asset policy checks these records against
|
|
161
|
-
repository source receipts and the supplied bytes. A free-form rights declaration
|
|
162
|
-
alone supplies no verified source evidence. Faithful file preparation preserves
|
|
163
|
-
the original asset and license records. Creating artwork or synthesized audio is
|
|
164
|
-
outside this workflow.
|
|
165
|
-
|
|
166
|
-
`restoration.binding` declares `{event:"validMatch",choice:"repairArea",persistent:true}`.
|
|
167
|
-
`restoration.areas` contains exactly two `{id,label,before,after}` records. Each art
|
|
168
|
-
record contains `{id,mime,data,rights}`, with base64 PNG/JPEG bytes and a rights
|
|
169
|
-
declaration. The before and after bytes must differ. `restoration.tiles` supplies
|
|
170
|
-
`sun`, `leaf`, and `drop` artwork. Optional `restoration.audio` supplies WAV records
|
|
171
|
-
for `ambient`, `impact`, `payoff`, `reject`, and optionally `complete`. Source media
|
|
172
|
-
passes the shared decode validation before project composition commits.
|
|
173
|
-
|
|
174
|
-
The required eight `requirements` records contain `source`, `claim`, and `effect`.
|
|
175
|
-
`claim` must equal the referenced strategy text exactly. Editing that strategy
|
|
176
|
-
without revisiting its requirement rejects with `E_CONCEPT_REQUIREMENT_STALE`.
|
|
177
|
-
The supported source and effect mappings are fixed for this module.
|
|
178
|
-
|
|
179
|
-
| Source | Observable effect |
|
|
180
|
-
| --- | --- |
|
|
181
|
-
| `product.gameplayTruth` | `match-rule` |
|
|
182
|
-
| `product.differentiator` | `world-transformation` |
|
|
183
|
-
| `audience.motivation` | `repair-choice` |
|
|
184
|
-
| `experience.fantasy` | `world-transformation` |
|
|
185
|
-
| `experience.interactionRationale` | `match-rule` |
|
|
186
|
-
| `hypothesis.statement` | `world-transformation` |
|
|
187
|
-
| `hypothesis.risk` | `recovery` |
|
|
188
|
-
| `experience.storeContinuity` | `continuity` |
|
|
189
|
-
|
|
190
|
-
Composition returns these requirements with concrete `records` references to the
|
|
191
|
-
matching rules, world objects, choices, recovery bindings, and CTA. This is an
|
|
192
|
-
author-supplied executable interpretation. Whether the supplied artwork and rules
|
|
193
|
-
faithfully express the prose remains part of creative review.
|
|
194
|
-
|
|
195
|
-
The module rejects wrong adjacent swaps, exposes the successful swap briefly,
|
|
196
|
-
then earns a choice of repair. Each repair swaps the selected area's artwork and
|
|
197
|
-
persists through the rest of the experience. A different second puzzle escalates
|
|
198
|
-
the interaction. Already repaired areas cannot earn another reward. Timed visual
|
|
199
|
-
hints help idle players. The interactive arc's first three durations bound the
|
|
200
|
-
journey to the CTA, preserving the current world when unfinished. The payoff
|
|
201
|
-
holds for its declared duration, with a deliberate Continue action available.
|
|
202
|
-
Replay restores both the world and puzzle rules.
|
|
203
|
-
The illustrated module reflows into two columns in landscape, keeping the garden
|
|
204
|
-
and puzzle at readable sizes. Rotating during play preserves repairs, puzzle
|
|
205
|
-
state, phase timing, and replay behavior.
|
|
206
|
-
|
|
207
|
-
Version 2 returns `creativeStatus:"REQUIRES_VISUAL_REVIEW"`. Existing version 1
|
|
208
|
-
concepts remain available with `creativeStatus:"PROTOTYPE"` and explicit
|
|
209
|
-
`unmetRequirements`. Neither status grants creative, device, network, or campaign
|
|
210
|
-
acceptance.
|
|
211
|
-
|
|
212
|
-
## Sourced harvest concepts
|
|
213
|
-
|
|
214
|
-
The production harvest module uses the version 2 concept format and the
|
|
215
|
-
harvest-restore mechanic. Its assets carry structured provenance containing
|
|
216
|
-
origin, sourceId, sourceFile, sourceHash, author, license, sourceUrl, and
|
|
217
|
-
styleFamily. Origin is third-party-free. The authoring source catalog is stored
|
|
218
|
-
at assets/free-assets/catalog.json and is maintained from reviewed third-party
|
|
219
|
-
downloads and their license files.
|
|
220
|
-
|
|
221
|
-
The asset policy binds each embedded asset to an exact catalog file hash and
|
|
222
|
-
checks the retained source and license files. All visual assets share one catalog
|
|
223
|
-
style family. Audio may use separate packs, with recorded source hashes and
|
|
224
|
-
ffmpeg or Web Audio OfflineAudioContext conversion arguments for WAV preparation. Attributed licenses
|
|
225
|
-
carry their required credit in the project asset rights. Unsupported source
|
|
226
|
-
records, replacement bytes, and mixed visual styles reject composition.
|
|
227
|
-
|
|
228
|
-
The current library includes the untouched Kenney Tiny Farm PNG tiles under CC0.
|
|
229
|
-
Scene layout assembles these sourced tiles as editable image objects. This
|
|
230
|
-
catalog establishes provenance for the listed files. Actual packaged composition,
|
|
231
|
-
readability, interaction, audio balance, and visual cohesion still require review.
|
|
232
|
-
|
|
233
|
-
The top-level `audioCollections` entries `casual-warm` and `arcade-pop` each resolve
|
|
234
|
-
seven distinct roles: ambient, tap, match, reject, reward, win, and loss. Collection
|
|
235
|
-
cue IDs point to files across explicitly named sources; they do not misrepresent a
|
|
236
|
-
mixed-source collection as a single sound pack. Source pages/archives, license text,
|
|
237
|
-
conversion receipts, and output SHA-256 values are retained under `assets/free-audio/`.
|
|
238
|
-
All cues have bounded PCM analysis and `auditionStatus:"analyzed"`; none is marked
|
|
239
|
-
human-auditioned. Regenerate the collection outputs with
|
|
240
|
-
`node scripts/lean/native/prepare-audio-collections.mjs`, then run the asset-policy tests.
|
|
241
|
-
|
|
242
|
-
## Review providers
|
|
243
|
-
|
|
244
|
-
OrcaRouter with DeepSeek Flash Free remains the default and preserves the existing
|
|
245
|
-
key setup. Set `TORA_REVIEW_PROVIDER` to `orca`, `openai`, `anthropic`, `gemini`, or
|
|
246
|
-
`openai-compatible`. Non-Orca providers require `TORA_REVIEW_MODEL` and their
|
|
247
|
-
respective `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, or
|
|
248
|
-
`TORA_REVIEW_API_KEY`. `TORA_REVIEW_ENDPOINT` overrides the HTTPS endpoint and is
|
|
249
|
-
required for OpenAI-compatible services; `TORA_REVIEW_PAID_MODEL` optionally selects
|
|
250
|
-
the explicitly paid route. Gemini credentials are sent in its API-key header, not
|
|
251
|
-
the URL. Provider and model choice do not bypass Tora's typed edit validation,
|
|
252
|
-
Creative QA, candidate comparison, or creator approval.
|
|
253
|
-
|
|
254
|
-
Screenshots stay out of provider requests by default. Set `TORA_REVIEW_VISION=1`
|
|
255
|
-
only for an explicitly selected vision-capable model; up to four bounded PNG/JPEG/
|
|
256
|
-
WebP images can then be attached. Without this opt-in, the request records how many
|
|
257
|
-
screenshots were omitted. Local capture and deterministic QA still run either way.
|
|
258
|
-
|
|
259
|
-
## DeepSeek feedback resolution
|
|
260
|
-
|
|
261
|
-
Write feedback and select **Request revision**. For several notes, use **Add
|
|
262
|
-
another note** between comments and submit them together. A plain note applies to
|
|
263
|
-
the playable. **Target a part** attaches feedback to a selected element and lets
|
|
264
|
-
the creator restrict the fields DeepSeek may change.
|
|
265
|
-
|
|
266
|
-
Tora saves the notes first. If the editor needs credentials, enter an OrcaRouter
|
|
267
|
-
API key in the local feedback panel and select **Save key and retry**. Tora
|
|
268
|
-
validates the key with the provider and continues the saved request. The local
|
|
269
|
-
store keeps the key in an owner-only file outside individual projects. An editor
|
|
270
|
-
started with `ORCAROUTER_API_KEY` can also use that key. A verified key entered
|
|
271
|
-
in the editor takes precedence.
|
|
272
|
-
|
|
273
|
-
DeepSeek can inspect the selected native project, follow event and asset
|
|
274
|
-
references, look up native contracts, and preview typed edits. A selected moment
|
|
275
|
-
gives the note context. Pinning an element limits that note to the selected fields.
|
|
276
|
-
Replacing shared artwork requires explicit permission. Captured frames and media
|
|
277
|
-
stay local. The model receives textual project records and local verification
|
|
278
|
-
results.
|
|
279
|
-
|
|
280
|
-
DeepSeek Flash is free by default. Selecting DeepSeek Pro opts that request into
|
|
281
|
-
provider billing. Each request can use up to eight model turns and two attempts
|
|
282
|
-
to repair a rejected result. After three discovery turns, DeepSeek drafts an edit
|
|
283
|
-
from the evidence it has already gathered and Tora runs the checks. A rate-limited
|
|
284
|
-
request resumes with its tool results.
|
|
285
|
-
If DeepSeek needs a decision, answer its question on the saved request.
|
|
286
|
-
|
|
287
|
-
Tora validates and packages the candidate and displays its actual changes for
|
|
288
|
-
comparison. Select **Use this version** to apply it. Discarding a candidate leaves
|
|
289
|
-
the project ready for another request. On Harvest candidates with verified
|
|
290
|
-
outcome audio, **Replay win** and **Replay loss** play the corresponding changes.
|
|
291
|
-
|
|
292
|
-
### Deterministic revision pilot
|
|
293
|
-
|
|
294
|
-
Start the local editor with `TORA_DETERMINISTIC_REVIEW=1` to enable local
|
|
295
|
-
typed edits. A pinned CTA text command that completely matches the literal
|
|
296
|
-
form `Change the selected CTA to "Play now"` uses the existing field adapter with
|
|
297
|
-
zero provider calls. Extra clauses, negation and other wording remain on the
|
|
298
|
-
interpretation path. For the sound case, target **Final payoff**, allow **Sound
|
|
299
|
-
played when the last harvest completes**, and select the explicit replacement cue.
|
|
300
|
-
The resulting typed intent moves the current win asset to the timeout binding,
|
|
301
|
-
imports distinct licensed victory bytes for winning, and runs both packaged
|
|
302
|
-
outcome checks before staging a candidate. Explicit sound edits are submitted one
|
|
303
|
-
at a time. Candidates still require comparison and explicit promotion.
|
|
304
|
-
|
|
305
|
-
With the relevant field selected, `Set the opening hint delay to 2 seconds` and
|
|
306
|
-
`Set the tap feedback duration to 0.3 seconds` change timing in Harvest and
|
|
307
|
-
Tap Collect respectively. At Harvest timeout, select **Caption alignment within
|
|
308
|
-
the panel** and enter `Center the existing timeout caption in the panel`. The
|
|
309
|
-
packaged landscape check measures the caption center and verifies that the
|
|
310
|
-
original wording appears once.
|
|
311
|
-
For shared crop art, pin the crop and authorize changing all its uses. An exact
|
|
312
|
-
command such as `Replace all uses with "replacement-asset"` uses the chosen
|
|
313
|
-
asset only if the shared-art adapter lists that ID as eligible.
|
|
314
|
-
|
|
315
|
-
Set `TORA_REVIEW_INTERPRETATION=1` to pilot a single DeepSeek interpretation
|
|
316
|
-
call for compatible copy, timing and outcome-audio notes. An unsupported
|
|
317
|
-
interpretation can use the general agent with the remaining turn budget. Both
|
|
318
|
-
routes use Free Flash by default. This flag stays off pending a successful live
|
|
319
|
-
sound paraphrase.
|
|
320
|
-
|
|
321
|
-
New Harvest concepts can opt into `harvest.rewardRecipe` with
|
|
322
|
-
`{"id":"harvest-reward-1","variant":"bloom"}`. Use `crisp` for the existing
|
|
323
|
-
quicker payoff, or `seeded` to choose reproducibly from both treatments using
|
|
324
|
-
the recorded board seed. Both keep the supplied art and licensed cue slots.
|
|
325
|
-
Composition returns the recipe, resolved variant and scenario list. Agent
|
|
326
|
-
composition records it against the originating revision in the project journal.
|
|
327
|
-
Both explicit treatments require creative review for default rollout.
|
|
328
|
-
|
|
329
|
-
The editor and `tora_review_resolve` MCP tool call the same `NativeReview`
|
|
330
|
-
candidate service. The flag is off by default; without it, existing model and
|
|
331
|
-
manual-agent routing is unchanged. Every saved request has a
|
|
332
|
-
`tora-review-receipt-1` with route, candidate identity, provider attempts and
|
|
333
|
-
reported token usage, tool response sizes, repairs, clarifications, verification
|
|
334
|
-
runs, phase timings, rate-limit wait and disposition. Receipts exclude prompt
|
|
335
|
-
text, credentials, media and reasoning. Usage is zero for zero provider calls and
|
|
336
|
-
remains unknown when a provider call does not report it.
|
|
337
|
-
|
|
338
|
-
[OrcaRouter model card](https://www.orcarouter.ai/models/deepseek/deepseek-v4-flash-free)
|
|
339
|
-
|
|
340
|
-
## Manual review through MCP
|
|
341
|
-
|
|
342
|
-
The local editor also supports a connected Tora agent. Copy the agent instruction
|
|
343
|
-
from the review workspace to work on a pending request through MCP. Both clients
|
|
344
|
-
must point to the same native project store. The local journal uses `flock` to
|
|
345
|
-
coordinate the editor and agent.
|
|
346
|
-
|
|
347
|
-
- Call `tora_review_claim` with `{id, requestId}`. It returns the numbered notes, baseline,
|
|
348
|
-
field IDs, their current values, and any captured frozen frames. Open
|
|
349
|
-
the baseline playable to judge motion.
|
|
350
|
-
- Call `tora_review_propose` with `{id, requestId, proposalId, changes, summary}`.
|
|
351
|
-
Use a UUID for `proposalId`. For a note list, put an entry for every scoped
|
|
352
|
-
note in `changes`, such as `{"1":{"instruction":"Match three crops"},"2":{"text":"Play now"}}`.
|
|
353
|
-
Whole-moment notes give the agent context. For a single note submitted
|
|
354
|
-
before note lists were introduced, use `{"text":"Play now"}`.
|
|
355
|
-
One unique proposal counts as one
|
|
356
|
-
of the two creative passes for that request, including a rejected proposal. Retry an
|
|
357
|
-
interrupted build with the same ID and payload. A shared crop request
|
|
358
|
-
requires explicit selection of every-use scope. Choose a replacement from
|
|
359
|
-
the returned image IDs.
|
|
360
|
-
- If the note needs another field or a different target, call
|
|
361
|
-
`tora_review_needs_scope` with `{id, requestId, reason}`. The creator can
|
|
362
|
-
then select the intended adjustment in the editor.
|
|
363
|
-
- The editor loads the candidate automatically and the creator can compare,
|
|
364
|
-
replay, apply or discard it. Applying checks the original baseline and
|
|
365
|
-
saves a new working revision. Approval and Unity or editable export use
|
|
366
|
-
their existing controls.
|
|
18
|
+
- `history`: save, undo, or redo.
|
|
19
|
+
- `render`: write an edit-mode HTML preview.
|
|
20
|
+
- `qa`: run deterministic Creative QA.
|
|
21
|
+
- `export`: write standalone or network artifacts, a target batch, a variant matrix, or `format:"project"` for the editable bundle.
|
|
22
|
+
- `variants`: list, diff, upsert, delete, or create preset overlays, including externally supplied translations.
|
|
23
|
+
- `import`: validate and import an editable bundle.
|
|
367
24
|
|
|
368
|
-
|
|
369
|
-
Supply retained PNG/JPEG sprites and compatible PCM WAV audio, a source game
|
|
370
|
-
brief, studio name, rights and store URL. Copy the agent instruction after
|
|
371
|
-
submitting. Call `tora_intake_claim` with the intake ID, then
|
|
372
|
-
`tora_intake_build` with that ID and a Harvest v2 concept. Fill the tile, farm
|
|
373
|
-
and audio references using the returned asset IDs and omit `harvest.assets`.
|
|
374
|
-
The local service reads the original bytes, validates provenance and measures
|
|
375
|
-
the exact Unity package. If publication was interrupted after preparation,
|
|
376
|
-
`tora_intake_build` with just the ID resumes publication.
|
|
25
|
+
Use the primary [authoring contract](TORA_CREATION_API.md) for operation, asset, review, QA, and export semantics. Engineering checks do not establish visual approval, physical-device behavior, official network acceptance, or campaign effectiveness.
|
package/docs/TORA_AGENT_SETUP.md
CHANGED
|
@@ -1,36 +1,20 @@
|
|
|
1
1
|
# Tora Agent & MCP Setup
|
|
2
2
|
|
|
3
|
-
Connect Tora
|
|
3
|
+
Connect Tora to your AI coding client over local MCP. The client supplies reasoning, model access, and credentials; Tora supplies deterministic authoring, asset optimization, Creative QA, and seven ad-network exporters. Tora does not accept or store provider keys.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install and connect
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
From your game workspace (Node `>= 22` only):
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx @tora-editor/tora init --client cursor # or claude-code | codex | gemini | all | print
|
|
13
|
-
npx @tora-editor/tora doctor # verify Node, prebuilt native binary, Chromium & workspace
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
`tora init` resolves or downloads the SHA-256-verified prebuilt `playable` binary, ensures Playwright Chromium is installed, and non-destructively configures your MCP client to run `npx -y @tora-editor/tora mcp --workspace <your-workspace>`. Use `--dry-run` to preview edits without modifying files.
|
|
17
|
-
|
|
18
|
-
### From a Source Checkout
|
|
19
|
-
|
|
20
|
-
From the Tora repository root, install dependencies and build the local Rust binary + editor bundle (pass `--prebuilt` to skip Rust):
|
|
7
|
+
Use Node.js 22 or newer in your game workspace:
|
|
21
8
|
|
|
22
9
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
mkdir my-playable && cd my-playable
|
|
11
|
+
npx @tora-editor/tora init --client codex
|
|
12
|
+
npx @tora-editor/tora doctor
|
|
25
13
|
```
|
|
26
14
|
|
|
27
|
-
|
|
15
|
+
Other supported setup choices include `claude-code`, `claude-desktop`, `gemini`, `all`, and `print`. Use `--dry-run` to preview configuration changes. Setup resolves the SHA-256-verified native binary, installs Playwright Chromium when needed, and preserves unrelated MCP configuration with a `.bak` backup.
|
|
28
16
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Use `tora init --client <client>` above, or add the single `tora mcp` command manually:
|
|
32
|
-
|
|
33
|
-
### Generic MCP (`mcpServers` — Cursor, Claude Desktop, Windsurf, Gemini CLI)
|
|
17
|
+
For generic `mcpServers` configuration:
|
|
34
18
|
|
|
35
19
|
```json
|
|
36
20
|
{
|
|
@@ -43,84 +27,29 @@ Use `tora init --client <client>` above, or add the single `tora mcp` command ma
|
|
|
43
27
|
}
|
|
44
28
|
```
|
|
45
29
|
|
|
46
|
-
From a source checkout,
|
|
47
|
-
|
|
48
|
-
- **Cursor:** Add to `.cursor/mcp.json` in your workspace or `~/.cursor/mcp.json` globally.
|
|
49
|
-
- **Gemini CLI:** Add the `mcpServers` block to `~/.gemini/settings.json`.
|
|
50
|
-
|
|
51
|
-
### Claude Code
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
claude mcp add tora -- npx -y @tora-editor/tora mcp --workspace "<path-to-workspace>"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### OpenAI Codex
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
codex mcp add tora -- npx -y @tora-editor/tora mcp --workspace "<path-to-workspace>"
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Optionally install the repository skill in Codex by copying or symlinking `skills/tora-playables` into `~/.codex/skills/`. Reopen your agent session after updating MCP settings.
|
|
64
|
-
|
|
65
|
-
### Brief & Project Store Resolution
|
|
66
|
-
|
|
67
|
-
- **Single active workspace:** Pass `--workspace <dir>` (or `TORA_WORKSPACE_ROOT`) to anchor `.tora/native-projects`, `.tora/editor-state`, `.tora/remote-asset-cache`, `.tora/prepared-assets`, and `filePath` uploads strictly inside that workspace. Both the project store and revision journal enforce symlink checks (`E_WORKSPACE_SYMLINK` / `E_NATIVE_STORE_SYMLINK`) and disallow paths outside `<workspace>/.tora/` or `<workspace>/reports/`.
|
|
68
|
-
- **Portable briefs:** `tora_brief` loads `PRODUCTION_MASTER.md`, the playable creative brief, UI/win-effect references, and authoring docs directly from the installed package. By default it uses `TORA_PLAYABLE_BRIEF` if set, otherwise `~/.codex/PLAYABLE_AI_MASTER.md` if present, and otherwise the bundled [`docs/PLAYABLE_BRIEF.md`](PLAYABLE_BRIEF.md).
|
|
69
|
-
- **Fail-closed protocol:** The adapter implements MCP `2025-11-25` over stdio and rejects mutations until `tora_brief` has succeeded in that session.
|
|
30
|
+
From a source checkout, run `npm install && npm run setup`, then use `node <path-to-tora>/bin/tora.mjs mcp --workspace <path-to-workspace>`.
|
|
70
31
|
|
|
71
|
-
|
|
32
|
+
The workspace anchors `.tora/native-projects`, `.tora/editor-state`, `.tora/remote-asset-cache`, `.tora/prepared-assets`, and workspace file uploads. Store and journal paths reject symlink traversal. `tora_brief` loads production and playable instructions from the installed package; `TORA_PLAYABLE_BRIEF` can select a different playable brief.
|
|
72
33
|
|
|
73
|
-
##
|
|
34
|
+
## Authoring workflow
|
|
74
35
|
|
|
75
|
-
|
|
36
|
+
1. Call `tora_brief` and save its digests for `alreadyRead` on later calls.
|
|
37
|
+
2. Call `tora_capabilities({summary:true})`, then request only required packs with `format:"compact"`.
|
|
38
|
+
3. Create an empty project with `tora_create`, or discover the burger/racing starters with `tora_starters` and instantiate one with `tora_compose_starter`.
|
|
39
|
+
4. Prepare assets with `tora_list_assets`, `tora_fetch_cc0_pack`, `tora_stage_cc0_assets`, `tora_prep_assets`, and one or more `tora_upload_assets` items.
|
|
40
|
+
5. Inspect with `tora_inspect({id,tree:true})`, then edit with exact expected identity and scope. Review `PREVIEW` effects before committing `commitPreviewDigest`.
|
|
41
|
+
6. Run `tora_qa` and inspect individual full-size screenshots and actual playback. Export the editable bundle and required network artifacts with `tora_export`.
|
|
76
42
|
|
|
77
|
-
|
|
78
|
-
|---|---|
|
|
79
|
-
| `tora_brief` | Load production instructions, playable brief, win/CTA guidance, and API docs. Pass `alreadyRead: [{ name, sha256 }]` from `digests` on re-reads to omit unchanged docs |
|
|
80
|
-
| `tora_capabilities` | Discover supported 2D/3D visual, behavior, event, action, and concept contracts (`summary: true` index, `packs` + `format: "compact"` for compact unit-bearing schemas) |
|
|
81
|
-
| `tora_create` | Create an empty editable native project |
|
|
82
|
-
| `tora_compose` | Compile a structured creative concept and prepared assets into an editable playable |
|
|
83
|
-
| `tora_inspect` | Read project state, compact scene outline (`tree: true`, optional `sceneId`), records, dependencies, and revision identity |
|
|
84
|
-
| `tora_edit` | Preview and atomically commit scoped operations against the expected revision (`scopeCreates: true` for reference-safe new records; `commitPreviewDigest` to commit cached previews without re-sending `operations`) |
|
|
85
|
-
| `tora_list_assets` | Search verified local & cached remote CC0 assets with dimensions and style families (`includeRemote: true` searches allowlisted Kenney/OpenGameArt packs) |
|
|
86
|
-
| `tora_fetch_cc0_pack` | Download, license-verify, optimize, and cache one allowlisted Kenney/OpenGameArt CC0 pack into `.tora/remote-asset-cache` (stable pack `styleFamily` across filtered fetches) |
|
|
87
|
-
| `tora_stage_cc0_assets` | Atomically stage up to 32 verified local/cached CC0 assets into a project with server-enforced provenance and single visual style family |
|
|
88
|
-
| `tora_prep_assets` | Faithfully prepare PNG/JPEG files mechanically (`crop`, `trim`, `resize`/`maxSide`, `sliceGrid` frames/strip) into `.tora/prepared-assets` with hash-bound provenance receipts |
|
|
89
|
-
| `tora_upload_asset` | Upload raw PNG/JPEG/WAV/MP3 up to 8 MiB with rights metadata and automatic non-destructive optimization, or register a Tora mesh. Automatically binds provenance receipts for `.tora/prepared-assets` files |
|
|
90
|
-
| `tora_upload_assets` | Batch upload and optimize up to 32 assets in one atomic revision (prefer workspace `filePath` to avoid the 12 MiB MCP frame limit; automatically binds `.tora/prepared-assets` provenance and checks `styleFamily`) |
|
|
91
|
-
| `tora_render` | Write an editable HTML scene preview artifact for visual inspection |
|
|
92
|
-
| `tora_qa` | Run static, acoustic, 4-viewport layout, primary-interaction, and post-SLA motion filmstrip QA (`screenshots/filmstrip-interaction.png` + real-play `filmstrip-end-card.png`; opt-in `recordVideo: true` writes `screenshots/gameplay.webm`) |
|
|
93
|
-
| `tora_export` | Write standalone HTML, any of seven ad-network HTML/ZIP artifacts, a multi-network batch (`targets: [...]`, `outputDir`), or a `.tora.json` project bundle. Google/Mintegral/TikTok write deterministic ZIPs |
|
|
94
|
-
| `tora_history` | Save, undo, or redo project revisions |
|
|
95
|
-
| `tora_review_*` / `tora_intake_*` | Claim and resolve visual review notes or studio intake briefs from the local editor |
|
|
43
|
+
The complete 20-tool contract and review protocol are in [`TORA_CREATION_API.md`](TORA_CREATION_API.md). The small stdin adapter is documented in [`NATIVE_AGENT_TOOLS.md`](NATIVE_AGENT_TOOLS.md).
|
|
96
44
|
|
|
97
|
-
|
|
45
|
+
## Browser launcher and review handoff
|
|
98
46
|
|
|
99
|
-
|
|
100
|
-
2. **Source, prep & batch assets:** Use `tora_list_assets` / `tora_fetch_cc0_pack` + `tora_stage_cc0_assets` for verified CC0 packs (single visual style family enforced), or run `tora_prep_assets` (`trim` / `crop` / `resize` / `sliceGrid`) followed by `tora_upload_assets` (automatically preserving hash-bound provenance and `styleFamily`).
|
|
101
|
-
3. **Inspect & edit leanly:** Use `tora_inspect({ id, tree: true })` before targeted `ids` reads; use `tora_edit` with `scopeCreates: true` (existing targets still require explicit `scope`) and `commitPreviewDigest` when committing a reviewed `PREVIEW`.
|
|
102
|
-
4. **Triage motion & layout, then inspect full-size:** Use `screenshots/contact-sheet.png` and `screenshots/filmstrip-interaction.png` (plus opt-in `recordVideo: true` → `screenshots/gameplay.webm`) to inspect layout, animation, and particle payoff mid-build, then inspect the individual full-size viewport PNGs and real playback before final delivery.
|
|
103
|
-
5. **Batch export:** `tora_export({ id, targets: [...], outputDir })` compiles targets in parallel, reuses verified QA receipts where unchanged (note: cached passes are shared across MCP/HTTP/intake keyed by artifact, checker, and Playwright/Chromium version, so a borderline 150 ms timing pass remains cached until the artifact, checker, browser version, or stored screenshots change), runs Creative QA serially for every target before writing any files, and then writes all artifacts atomically.
|
|
104
|
-
|
|
105
|
-
### Recommended First Prompt
|
|
106
|
-
|
|
107
|
-
> Create a 20-second cozy farm match playable in Tora using verified CC0 assets, responsive portrait and landscape layouts, rewarding feedback, and a clean Store CTA end card. Run Creative QA, inspect screenshots, and export both the editable bundle and Unity/AppLovin HTML.
|
|
108
|
-
|
|
109
|
-
## 4. Local Editor UI & HTTP Fallback
|
|
110
|
-
|
|
111
|
-
Start the local visual studio & review editor anytime:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
npm run dev:editor
|
|
115
|
-
```
|
|
47
|
+
Run `npx @tora-editor/tora editor` and open `http://127.0.0.1:8001/?view=new`. The launcher opens/imports projects, creates either starter, and lists available showcase demos. It has no chat, provider connection, model picker, or background build queue.
|
|
116
48
|
|
|
117
|
-
|
|
118
|
-
- Inspect and play built-in demos (*Tiny Harvest*, *Traffic Tycoon*, *Mini Golf 3D*).
|
|
119
|
-
- Drop in assets and create `$0` MCP handoff briefs, or optionally connect a verified BYOK API key (Google Gemini, OpenAI, or Anthropic Claude) for in-browser builds and visual revision notes.
|
|
120
|
-
- Export standalone drafts plus Unity Ads, AppLovin, Meta, Google Ads, ironSource / LevelPlay, Mintegral, and TikTok builds.
|
|
49
|
+
Within a project, visual review notes require explicit native record scopes. Copy the handoff containing project and request IDs to your external client. The client claims and proposes through MCP; Tora verifies the candidate and the creator explicitly accepts or discards it. Translations arrive through the ordinary variants interface.
|
|
121
50
|
|
|
122
|
-
|
|
51
|
+
Lean npm installs omit showcase fixtures and large asset packs and hide unavailable demos. Source checkouts and the hosted showcase preserve all four demos. Hosted editing exposes only capabilities available in that static environment.
|
|
123
52
|
|
|
124
|
-
##
|
|
53
|
+
## Verification boundary
|
|
125
54
|
|
|
126
|
-
Automated checks
|
|
55
|
+
Automated checks establish engineering behavior only. Inspect real exported screenshots and footage, and keep human visual approval, physical-device testing, and official network acceptance as separate gates.
|