@tora-editor/tora 0.1.0 → 0.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.
Files changed (73) hide show
  1. package/README.md +108 -58
  2. package/assets/free-audio/arcade-pop/audio/loss.wav +0 -0
  3. package/assets/free-audio/arcade-pop/audio/reward.wav +0 -0
  4. package/assets/free-audio/arcade-pop/audio/win.wav +0 -0
  5. package/assets/free-audio/arcade-pop/source/INFO.txt +11 -11
  6. package/assets/kenney-food-starter/License.txt +28 -0
  7. package/assets/kenney-food-starter/burger.glb +0 -0
  8. package/assets/kenney-food-starter/frying-pan.glb +0 -0
  9. package/assets/kenney-food-starter/plan.json +61 -0
  10. package/assets/kenney-food-starter/plate.glb +0 -0
  11. package/assets/kenney-food-starter/pot.glb +0 -0
  12. package/assets/kenney-harvest/audio/victory.wav +0 -0
  13. package/assets/kenney-harvest/source/music-jingles/OGG/jingles_NES/jingles_NES03.ogg +0 -0
  14. package/assets/kenney-harvest/source/music-jingles/OGG/jingles_PIZZA/jingles_PIZZA03.ogg +0 -0
  15. package/assets/kenney-harvest/source/music-jingles/license.txt +14 -0
  16. package/bin/tora.mjs +77 -9
  17. package/crates/packer/trusted/native-3d-meta.json +3 -2
  18. package/crates/packer/trusted/native-3d.js +181 -181
  19. package/crates/packer/trusted/native-meta.json +2 -2
  20. package/crates/packer/trusted/native.js +5 -5
  21. package/crates/packer/trusted/release-manifest.json +17 -17
  22. package/crates/packer/trusted/review-runtime-meta.json +3 -2
  23. package/crates/packer/trusted/review-runtime.js +182 -182
  24. package/docs/TORA_AGENT_SETUP.md +24 -13
  25. package/docs/TORA_CREATION_API.md +29 -12
  26. package/docs/reference/CORE_AUTHORING.md +2 -1
  27. package/docs/reference/PLAYABLE_STARTERS.md +20 -0
  28. package/docs/reference/packs/3d.md +9 -3
  29. package/network-rules/mintegral-appgrowth-single-html.json +10 -10
  30. package/package.json +6 -6
  31. package/packages/creative-project/project-v21.schema.json +264 -8
  32. package/scripts/lean/editor/review-editor.css +10 -0
  33. package/scripts/lean/editor/review-editor.js +117 -1
  34. package/scripts/lean/native/agent-tools.mjs +7 -7
  35. package/scripts/lean/native/api.mjs +16 -5
  36. package/scripts/lean/native/asset-catalog.mjs +7 -6
  37. package/scripts/lean/native/asset-lineage.mjs +54 -0
  38. package/scripts/lean/native/asset-prep.mjs +173 -40
  39. package/scripts/lean/native/assets.mjs +107 -11
  40. package/scripts/lean/native/author-expansion-proofs.mjs +2 -99
  41. package/scripts/lean/native/author-fps.mjs +545 -0
  42. package/scripts/lean/native/author-primitive-proofs.mjs +5 -4
  43. package/scripts/lean/native/build-cache.mjs +2 -2
  44. package/scripts/lean/native/cc0-inputs.mjs +24 -0
  45. package/scripts/lean/native/cc0-staging.mjs +28 -8
  46. package/scripts/lean/native/check-harvest-outcome-audio.mjs +7 -8
  47. package/scripts/lean/native/check-salvage.mjs +8 -5
  48. package/scripts/lean/native/compiler.mjs +9 -3
  49. package/scripts/lean/native/contracts.mjs +11 -8
  50. package/scripts/lean/native/creative-qa.mjs +305 -122
  51. package/scripts/lean/native/demos.mjs +47 -3
  52. package/scripts/lean/native/document.mjs +36 -10
  53. package/scripts/lean/native/export-budget.mjs +75 -0
  54. package/scripts/lean/native/glb-loader.mjs +468 -0
  55. package/scripts/lean/native/intake-creator-tools.mjs +83 -30
  56. package/scripts/lean/native/local-bundle.mjs +5 -3
  57. package/scripts/lean/native/mcp-server.mjs +33 -46
  58. package/scripts/lean/native/media-validate.mjs +124 -0
  59. package/scripts/lean/native/native-bin.mjs +3 -3
  60. package/scripts/lean/native/outcome-playthrough.mjs +97 -0
  61. package/scripts/lean/native/prepare-fps-assets.mjs +330 -0
  62. package/scripts/lean/native/project-bundle.mjs +3 -3
  63. package/scripts/lean/native/remote-cc0-fetcher.mjs +403 -197
  64. package/scripts/lean/native/review-agent-tools.mjs +2 -2
  65. package/scripts/lean/native/review.mjs +3 -0
  66. package/scripts/lean/native/runtime.mjs +242 -56
  67. package/scripts/lean/native/schema.mjs +7 -5
  68. package/scripts/lean/native/service.mjs +159 -32
  69. package/scripts/lean/native/stage-3d.mjs +343 -40
  70. package/scripts/lean/native/starters.mjs +436 -0
  71. package/scripts/lean/native/verify.mjs +1 -1
  72. package/scripts/lean/native/win-cues.mjs +96 -0
  73. package/skills/tora-playables/SKILL.md +1 -1
package/README.md CHANGED
@@ -1,109 +1,163 @@
1
1
  # Tora — Local MCP-First Playable Ad Framework
2
2
  [![M8ven Score](https://m8ven.ai/badge/mcp/moosama76-tora-engine-cd3fcm?v=86d74ba3d885cd01144d1e74220cd1d2)](https://m8ven.ai/mcp/moosama76-tora-engine-cd3fcm?s=readme)
3
3
 
4
- **Build editable, responsive 2D & 3D HTML5 playable ads directly from Claude Code, Cursor, OpenAI Codex, or Gemini CLI at $0 extra API cost.** Tora is open source, with deterministic authoring, automatic non-destructive asset optimization, 4-viewport Creative QA, real-assets-only provenance, and seven free ad-network exporters.
4
+ **Build editable, responsive 2D & 3D HTML5 playable ads directly from Claude Code, Cursor, OpenAI Codex, or Gemini CLI at $0 extra API cost.**
5
+
6
+ - **Fast Local Setup:** Install with `npx` using Node.js `>= 22`. Native binaries and headless Chromium set up automatically.
7
+ - **Works With Your Existing AI Agent:** Connects locally over MCP — no cloud credit burn, no vendor lock-in, and your assets never leave your machine.
8
+ - **Real Assets & Auto-Optimization:** Drop studio PNG/JPEG/WAV/MP3 files up to 8 MB or GLB/glTF/OBJ models up to 32 MiB, with delivery assets optimized to `<= 700 KB` and masters retained. Fetch CC0 2D, 3D, and audio assets with license receipts when the provider serves a verified download on an allowed origin. Search spans Kenney, Quaternius, and OpenGameArt. Quaternius packs hosted on external drives require manual workspace import.
9
+ - **Editable 2D & 3D Scene Graph:** Revision-checked, undoable scene documents instead of fragile throwaway HTML rewrites.
10
+ - **Built-In Creative QA:** Automated 4-viewport mobile layout, audio unlock/level checks, 8-frame interaction motion filmstrips, and optional WebM capture.
11
+ - **7 Free Ad-Network Exporters:** Unity Ads, AppLovin, Meta, Google Ads, ironSource / LevelPlay, Mintegral, and TikTok — all open source.
5
12
 
6
13
  ---
7
14
 
8
- ## Why Tora?
15
+ ## Quickstart
9
16
 
10
- - **MCP-First ($0 Extra API Cost):** Connect Tora's local stdio MCP server to the AI coding subscription your dev team already pays for. No cloud credit burn, no vendor lock-in, and your game assets never leave your machine.
11
- - **Automatic Asset Optimization:** Drop raw PNG, JPEG, WAV, or MP3 uploads up to 8 MiB. Tora retains every original master, records optimization receipts, and produces verified delivery assets up to 700 KB without changing the Creative Project 2.1 schema.
12
- - **Seven Free Exporters:** Ship Unity Ads, AppLovin, Meta, Google Ads, ironSource / Unity LevelPlay, Mintegral, and TikTok builds with no paid network packs.
13
- - **Editable Native Scene Graph (2D + 3D):** Playables compile from a strict, validated `tora-native` project document with scenes, transforms, sprites, UI, 2D/3D physics, path networks, audio, events, and bindings — every edit is atomic, revision-checked, and undoable.
14
- - **Deterministic Creative QA:** Built-in Playwright checks cover four phone viewports, audio unlock/level/clipping metrics, text/UI overflow, primary gameplay interaction, and final package size.
15
- - **Real Assets Only:** Use studio uploads or verified commercial-use CC0 packs with full license and SHA-256 provenance receipts. Originals remain available for lossless re-optimization.
16
- - **Optional Local Studio UI & BYOK Beta:** Launch the visual browser editor to play demos, leave pinned visual review notes, run `$0` MCP handoffs, or connect a verified Gemini, OpenAI, Anthropic, OpenAI-compatible, or local model provider.
17
+ ### 1. Install Node.js (`>= 22`)
17
18
 
18
- ---
19
+ Check if you already have Node.js 22+ installed (`node -v`). If not, install it for your OS (or download the LTS installer from [nodejs.org](https://nodejs.org/)):
19
20
 
20
- ## Quickstart
21
+ **macOS (Homebrew)**
22
+ ```bash
23
+ brew install node@22
24
+ ```
21
25
 
22
- ### Option A — Zero-Rust CLI Setup (Recommended for Users)
26
+ **Windows (PowerShell)**
27
+ ```powershell
28
+ winget install OpenJS.NodeJS.LTS
29
+ ```
23
30
 
24
- **Prerequisites:** Node.js `>= 22`. Prebuilt native binaries (`playable`) ship automatically via platform packages or SHA-256-verified GitHub Release downloads — no Rust toolchain required.
31
+ **Linux (Ubuntu / Debian)**
32
+ ```bash
33
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
34
+ sudo apt-get install -y nodejs
35
+ ```
36
+
37
+ *(Restart your terminal after installing Node.js so `node` and `npx` are on your `PATH`.)*
38
+
39
+ ### 2. Create a folder and connect your AI client
40
+
41
+ Create a folder for your playable (works on macOS, Linux, Windows PowerShell, and CMD):
25
42
 
26
43
  ```bash
27
- npx @tora-editor/tora init --client cursor # or claude-code | codex | gemini | all | print
28
- npx @tora-editor/tora doctor # check Node, native binary, Chromium & workspace paths
29
- npx @tora-editor/tora editor # optional local visual studio on http://127.0.0.1:8001
44
+ mkdir my-playable
45
+ cd my-playable
30
46
  ```
31
47
 
32
- ### Option B — Contributor Source Checkout
48
+ Run **one** setup command for the AI client you use:
33
49
 
34
- **Prerequisites:** Node.js `>= 22`, Rust (`rustc` + `cargo`, optional with `--prebuilt`). WAV-to-MP3 optimization automatically uses local GStreamer or FFmpeg when available; otherwise Tora uses its deterministic PCM WAV fallback.
50
+ | AI Client | Command | What it configures |
51
+ |---|---|---|
52
+ | **Perch** | `npx @tora-editor/tora init --client perch` | `.perch/mcp.json` |
53
+ | **Cursor** | `npx @tora-editor/tora init --client cursor` | `.cursor/mcp.json` |
54
+ | **Claude Code** | `npx @tora-editor/tora init --client claude-code` | `claude mcp add` (or `.mcp.json`) |
55
+ | **OpenAI Codex** | `npx @tora-editor/tora init --client codex` | `codex mcp add` |
56
+ | **Gemini CLI** | `npx @tora-editor/tora init --client gemini` | `~/.gemini/settings.json` |
57
+
58
+ > Add `--dry-run` to preview config changes without writing files, or `--client print` to print the MCP JSON block manually.
59
+
60
+ `tora init` automatically downloads/verifies the native binary, installs Playwright Chromium if missing, and merges `tora` into your MCP config without overwriting other servers (saving a `.bak` backup).
61
+
62
+ For Perch, setup also checks that the local Tora tools return their brief and capabilities. Once that check passes, reopen Perch in `my-playable` and say **“Create a cooking playable ad with Tora.”** The cooking starter can save a browser draft, an editable project, and a playthrough recording together. Open the HTML to play it and hear the result.
63
+
64
+ Verify your setup, then **restart your AI coding client**:
35
65
 
36
66
  ```bash
37
- npm install
38
- npm run setup # or: npm run setup -- --prebuilt (skip Rust build)
67
+ npx @tora-editor/tora doctor
39
68
  ```
40
69
 
41
- Setup builds the bounded Rust media & artifact binary (`playable`) plus legacy decoders, ensures Playwright Chromium is ready, compiles the editor, checks trusted runtime & host bundles, and prints an MCP configuration with your local paths.
70
+ ### 3. Build by prompting your AI agent
71
+
72
+ Open `my-playable` in your AI client and describe the playable you want:
42
73
 
43
- See [`docs/TORA_AGENT_SETUP.md`](docs/TORA_AGENT_SETUP.md) for per-client commands, or start the local visual studio:
74
+ > *"Build a 2D portrait playable ad where the player taps matching crates to fill a delivery truck before time runs out, using verified CC0 Kenney sprites and audio. Run Creative QA and show me the contact sheet and motion filmstrip."*
75
+
76
+ Or start a 3D concept:
77
+
78
+ > *"Build a portrait 3D treasure hunt using a verified CC0 chest from OpenGameArt, with bounded mesh optimization, a reward for each discovery, and a Store CTA. Inspect the rendered WebGL output before export."*
79
+
80
+ Your agent can upload studio files from your workspace (`tora_upload_assets`), search/fetch/prepare verified CC0 2D/3D/audio packs (`tora_list_assets`, `tora_fetch_cc0_pack`, `tora_prep_assets`, `tora_stage_cc0_assets`), bind GLB models and animation clips (`native.mesh3d.v1`, `animate-3d`), edit scenes atomically (`tora_edit`), run 4-viewport + motion QA (`tora_qa`), and export with optional target-budget fitting (`tora_export`).
81
+
82
+ ### 4. Playtest & leave visual review notes (optional)
83
+
84
+ Launch the local browser Studio UI anytime:
44
85
 
45
86
  ```bash
46
- npm run dev:editor
87
+ npx @tora-editor/tora editor
47
88
  ```
48
89
 
49
- Open `http://127.0.0.1:8001/?view=new` to inspect demos, upload studio assets, and review playable revisions. Uploads default to `optimize:"auto"`; MCP also supports `lossless`, `none`, `preserveResolution`, verified CC0 discovery/staging (`tora_list_assets`, `tora_fetch_cc0_pack`, `tora_stage_cc0_assets`), and faithful mechanical sprite preparation (`tora_prep_assets`).
90
+ Open `http://127.0.0.1:8001/?view=new` to create projects, test your builds at phone aspect ratios, upload assets visually, pin review notes for your MCP agent, or try BYOK providers (Gemini, OpenAI, Anthropic, OpenRouter, local Ollama/vLLM). The lean npm installation omits showcase asset packs; use the hosted showcase or a source checkout for demos.
91
+
92
+ ---
93
+
94
+ ## Ad-Network Exports (7 Free Targets)
95
+
96
+ | Target | Package & Limit | Host Bridge | Automated Check Scope |
97
+ |---|---|---|---|
98
+ | **Standalone HTML5 Draft** | Single HTML | Browser | Static + 4-viewport Creative QA |
99
+ | **Unity Ads** | Single HTML, `< 5 MB` | MRAID 3.0 | Static rules + mock-host lifecycle QA |
100
+ | **AppLovin** | Single HTML, `<= 5 MB` | MRAID 2.0 | Static rules + mock-host lifecycle QA |
101
+ | **Meta** | Single HTML, `<= 2 MB` | `FbPlayableAd` | Static rules + mock-host lifecycle QA |
102
+ | **Google Ads** | ZIP (`index.html`), `<= 5 MB` | `ExitApi` | Static rules + mock-host lifecycle QA |
103
+ | **ironSource / LevelPlay** | Single HTML, `<= 5 MB` | DAPI | Static rules + mock-host lifecycle QA |
104
+ | **Mintegral** | ZIP (`<id>/<id>.html`), `<= 5 MB` | Mintegral globals | Static rules + mock-host lifecycle QA |
105
+ | **TikTok** | ZIP (`index.html` + `config.json`), `<= 5 MB` | Playable SDK | Static rules + mock-host lifecycle QA |
106
+
107
+ Unity and AppLovin require a real store URL in the project. Validate any exported artifact from the CLI:
108
+
109
+ ```bash
110
+ npx @tora-editor/tora check index.html --network unity-ads-ua-playable --confirm-reviewed YYYY-MM-DD
111
+ npx @tora-editor/tora check tiktok.zip --network tiktok-ads-playable --confirm-reviewed YYYY-MM-DD
112
+ ```
113
+
114
+ > **Honest QA Boundary:** Local `STATIC_PASS` and mock-host QA verify engineering compliance — not human creative approval, physical-device behavior, official ad-network acceptance, or campaign performance. Always inspect real screenshots/filmstrips, test on physical iOS/Android devices, and run each network's official preview tool before launching paid campaigns.
50
115
 
51
116
  ---
52
117
 
53
118
  ## Built-In Showcase Demos
54
119
 
120
+ Play all four demos in the hosted showcase or from a source checkout with `npm run dev:editor`:
121
+
55
122
  | Demo | Engine Mode | Core Loop |
56
123
  |---|---|---|
57
124
  | **Tiny Harvest** | 2D Native + Match-3 | Cozy farm crop-matching with particle rewards, SFX/music, and Store CTA end card |
58
125
  | **Traffic Tycoon** | 2D Native + Path Economy | Tap-to-dispatch intersection management with path networks and escalating feedback |
59
126
  | **Mini Golf 3D** | 3D Native (`Stage3D` + `Physics3D`) | Drag-to-aim miniature golf with camera follow, bounces, capture zone, and celebration |
127
+ | **Sky Blaster 3D** | 3D Native WebGL2 FPS | Aim, lock on, and clear flying security bots across floating sky islands |
60
128
 
61
- ```bash
62
- npm run build:pages-editor # Static hosted editor demo bundle (dist/pages-editor)
63
- npm run build:website # Complete static site: landing page, demos, live editor & manifest (dist/website)
64
- ```
129
+ The `npx @tora-editor/tora editor` package stays lean by omitting these demo asset packs. Its Demos UI is hidden unless a demo is already materialized; no broken demo buttons are shown.
65
130
 
66
131
  ---
67
132
 
68
- ## Ad-Network Export Matrix (Honest Status)
133
+ ## Contributor Setup (From Source)
69
134
 
70
- | Target | Package and limit | Host bridge | Verification scope |
71
- |---|---|---|---|
72
- | **Standalone HTML5 Draft** | Single HTML | Browser | Automated static + 4-viewport Creative QA |
73
- | **Unity Ads** | Single HTML, `< 5,000,000` B | MRAID 3.0 | Static rules + mock-host lifecycle QA |
74
- | **AppLovin** | Single HTML, `<= 5,000,000` B | MRAID 2.0 | Static rules + mock-host lifecycle QA |
75
- | **Meta** | Single HTML, `<= 2,000,000` B | `FbPlayableAd` | Static rules + mock-host lifecycle QA |
76
- | **Google Ads** | ZIP with root `index.html`, `<= 5,000,000` B | `ExitApi` | Static rules + mock-host lifecycle QA |
77
- | **ironSource / LevelPlay** | Single HTML, `<= 5,000,000` B | DAPI | Static rules + mock-host lifecycle QA |
78
- | **Mintegral** | ZIP with `<id>/<id>.html`, `<= 5,000,000` B | Mintegral globals | Static rules + mock-host lifecycle QA |
79
- | **TikTok** | ZIP with `index.html` + `config.json`, `<= 5,000,000` B | Playable SDK | Static rules + mock-host lifecycle QA |
80
-
81
- Unity and AppLovin require a real store URL in the project. Other profiles leave destination configuration to the network dashboard where supported, but still reject unresolved placeholders.
82
-
83
- > **Honest QA Boundary:** `STATIC_PASS` means the exact artifact passed local static and mock-host checks. It does not establish human creative approval, physical-device behavior, official network acceptance, or campaign effectiveness. Always inspect real screenshots/video, test physical iOS/Android devices, and run each official preview tool before launching paid campaigns.
84
-
85
- Check an exported artifact with:
135
+ Only needed if you are contributing to Tora itself. Requires Node.js `>= 22` and Rust (or pass `--prebuilt` to skip compiling Rust).
86
136
 
87
137
  ```bash
88
- cargo run -p playable-cli -- artifact check index.html --network unity-ads-ua-playable --confirm-reviewed YYYY-MM-DD
89
- cargo run -p playable-cli -- artifact check tiktok.zip --network tiktok-ads-playable --confirm-reviewed YYYY-MM-DD
138
+ git clone https://github.com/moosama76/tora-engine.git
139
+ cd tora-engine
140
+ npm install
141
+ npm run setup
90
142
  ```
91
143
 
92
- ---
93
-
94
- ## Key Commands
144
+ Common repo commands:
95
145
 
96
146
  ```bash
97
- npm run setup # Toolchain, Rust builds, browser check, MCP snippet
98
147
  npm run dev:editor # Local visual editor on http://127.0.0.1:8001
99
- npm run mcp:tora # Local MCP stdio server
148
+ npm run mcp:tora # Local MCP stdio server from checkout
100
149
  npm run verify # Full schema, packer, typecheck, lint, Rust, JS/browser gate
101
150
  npm run test:mcp # MCP server + editor integration tests
151
+ npm run build:website # Static showcase site + bundled live editor (dist/website)
102
152
  ```
103
153
 
154
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
155
+
156
+ ---
157
+
104
158
  ## Documentation
105
159
 
106
- - [`docs/TORA_AGENT_SETUP.md`](docs/TORA_AGENT_SETUP.md) — MCP setup and tool reference
160
+ - [`docs/TORA_AGENT_SETUP.md`](docs/TORA_AGENT_SETUP.md) — Detailed MCP client setup & full 23-tool reference
107
161
  - [`docs/PLAYABLE_BRIEF.md`](docs/PLAYABLE_BRIEF.md) — Creative, audio, and game-feel quality brief
108
162
  - [`docs/TORA_CREATION_API.md`](docs/TORA_CREATION_API.md) — HTTP and document authoring contract
109
163
  - [`docs/NATIVE_AGENT_TOOLS.md`](docs/NATIVE_AGENT_TOOLS.md) — Compact deterministic agent CLI
@@ -112,13 +166,9 @@ npm run test:mcp # MCP server + editor integration tests
112
166
 
113
167
  ## Sponsor Tora
114
168
 
115
- Tora and all seven ad-network exporters remain 100% open source. Monthly sponsorships and one-time donations on [GitHub Sponsors](https://github.com/sponsors/moosama76) fund ongoing maintenance, ad-network SDK updates, and creative tooling.
169
+ Tora and all seven ad-network exporters remain 100% open source. Monthly sponsorships and one-time donations on [GitHub Sponsors](https://github.com/sponsors/moosama76) fund maintenance, ad-network SDK updates, and creative tooling.
116
170
 
117
171
  - **Community Backer ($25/mo):** README Backers credit, sponsor badge, feature/template voting.
118
172
  - **Studio Sponsor ($250/mo):** Company logo in `README.md` & site credits, priority GitHub issue triage, early feedback access, quarterly roadmap input.
119
173
  - **Enterprise Patron ($3,500/mo):** Headline partner placement, priority ad-network SDK & rule-pack updates + dedicated exporter parity, private Slack/Discord channel, monthly sync & 6 hrs/mo MCP/CI support, fast-track bug fixes.
120
174
  - **Custom / One-Time Donation:** Back a specific feature or send any custom amount on [GitHub Sponsors](https://github.com/sponsors/moosama76).
121
-
122
- ### Contributing
123
-
124
- See [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -1,11 +1,11 @@
1
- 7 looping vocalless versions of my 2021 album "Babe, You Look Poggers Tonight!)
2
- These tracks are released under the CC0 creative commons license, and you can use these tracks for anything (even commercial)
3
- Don't re-upload these tracks or re-sell them as is.
4
- You don't have to credit me, but it would make me happy if you did!
5
- If you like the music, consider buying the full album on BandCamp or stream it on Spotify
6
- https://3xblast.bandcamp.com/album/babe-you-look-poggers-tonight
7
- https://open.spotify.com/album/0CANeaunaskrZWSS6bvKVq?si=fe-NDvY_QIOIkf4Nir8d7A
8
-
9
-
10
- Cheers!
11
- 3xBlast
1
+ 7 looping vocalless versions of my 2021 album "Babe, You Look Poggers Tonight!)
2
+ These tracks are released under the CC0 creative commons license, and you can use these tracks for anything (even commercial)
3
+ Don't re-upload these tracks or re-sell them as is.
4
+ You don't have to credit me, but it would make me happy if you did!
5
+ If you like the music, consider buying the full album on BandCamp or stream it on Spotify
6
+ https://3xblast.bandcamp.com/album/babe-you-look-poggers-tonight
7
+ https://open.spotify.com/album/0CANeaunaskrZWSS6bvKVq?si=fe-NDvY_QIOIkf4Nir8d7A
8
+
9
+
10
+ Cheers!
11
+ 3xBlast
@@ -0,0 +1,28 @@
1
+
2
+
3
+ Food Kit (2.0)
4
+
5
+ Created/distributed by Kenney (www.kenney.nl)
6
+ Creation date: 26-06-2024 01:23
7
+
8
+ ------------------------------
9
+
10
+ License: (Creative Commons Zero, CC0)
11
+ http://creativecommons.org/publicdomain/zero/1.0/
12
+
13
+ You can use this content for personal, educational, and commercial purposes.
14
+
15
+ Support by crediting 'Kenney' or 'www.kenney.nl' (this is not a requirement)
16
+
17
+ ------------------------------
18
+
19
+ • Website : www.kenney.nl
20
+ • Donate : www.kenney.nl/donate
21
+
22
+ • Patreon : patreon.com/kenney
23
+
24
+ Follow on social media for updates:
25
+
26
+ • Twitter: twitter.com/KenneyNL
27
+ • Instagram: instagram.com/kenney_nl
28
+ • Mastodon: mastodon.gamedev.place/@kenney
@@ -0,0 +1,61 @@
1
+ {
2
+ "format": "tora-native-asset-plan-1",
3
+ "source": {
4
+ "id": "kenney-food-kit",
5
+ "author": "Kenney",
6
+ "sourceUrl": "https://kenney.nl/assets/food-kit",
7
+ "license": "CC0-1.0",
8
+ "licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
9
+ "licenseFile": "assets/kenney-food-starter/License.txt",
10
+ "licenseSha256": "sha256:32a081c2035dd4db47d850c83244da048165f0e53d71c076b76c1afc0590bc7f",
11
+ "archiveSha256": "sha256:cdad90853682499b94c9fda2f87678b24bfd8f3264e0ed323f6b6a27fd7c6f6f",
12
+ "attributionRequired": false
13
+ },
14
+ "visualDirection": "Miniature warm kitchen with low-poly food, softly lit props, and a high-contrast order ticket.",
15
+ "files": [
16
+ {
17
+ "id": "burger",
18
+ "file": "assets/kenney-food-starter/burger.glb",
19
+ "sha256": "sha256:5c0f1275e27046eb49b2a39310603115520e54464fae9281f061486fe1ec315b",
20
+ "processing": {
21
+ "kind": "embedded-texture-glb",
22
+ "sourceFile": "Models/GLB format/burger.glb",
23
+ "sourceSha256": "sha256:b982f15d980ef49f3aa295fda03b1926b0b9a29d3d000d139e111d734474c99b",
24
+ "embeddedDependency": "Textures/colormap.png"
25
+ }
26
+ },
27
+ {
28
+ "id": "plate",
29
+ "file": "assets/kenney-food-starter/plate.glb",
30
+ "sha256": "sha256:d3c644c508c143f149b83fa0ff9fd55582e345844efbd325e9bca359c48659c6",
31
+ "processing": {
32
+ "kind": "embedded-texture-glb",
33
+ "sourceFile": "Models/GLB format/plate.glb",
34
+ "sourceSha256": "sha256:4c1de567b854264b2a9407ec221d33dfd13c7fc18563ea1f33cb8abe3a3d11be",
35
+ "embeddedDependency": "Textures/colormap.png"
36
+ }
37
+ },
38
+ {
39
+ "id": "frying-pan",
40
+ "file": "assets/kenney-food-starter/frying-pan.glb",
41
+ "sha256": "sha256:3e61d48b623c00631d0947f441ed69cd6ab7d733bf41cb3c39480a52194efa8b",
42
+ "processing": {
43
+ "kind": "embedded-texture-glb",
44
+ "sourceFile": "Models/GLB format/frying-pan.glb",
45
+ "sourceSha256": "sha256:66cd36e3361d47f068cd1fc06df422b550058adde2017f306ed93dad7c3d2b9f",
46
+ "embeddedDependency": "Textures/colormap.png"
47
+ }
48
+ },
49
+ {
50
+ "id": "pot",
51
+ "file": "assets/kenney-food-starter/pot.glb",
52
+ "sha256": "sha256:2603dcea3b8b4c6ed2536923f25b182ad052e92f8e8cbe8d1c3b4ef13fbdcb55",
53
+ "processing": {
54
+ "kind": "embedded-texture-glb",
55
+ "sourceFile": "Models/GLB format/pot.glb",
56
+ "sourceSha256": "sha256:ba84c5ebd769849b7cb0365adf1f6044680e024ba29e0bc1bec93d54100f72b3",
57
+ "embeddedDependency": "Textures/colormap.png"
58
+ }
59
+ }
60
+ ]
61
+ }
@@ -0,0 +1,14 @@
1
+
2
+ ###############################################################################
3
+
4
+ Short jingles by Kenney Vleugels (www.kenney.nl)
5
+
6
+ ------------------------------
7
+
8
+ License (CC0)
9
+ http://creativecommons.org/publicdomain/zero/1.0/
10
+
11
+ You may use these graphics in personal and commercial projects.
12
+ Credit (Kenney or www.kenney.nl) would be nice but is not mandatory.
13
+
14
+ ###############################################################################
package/bin/tora.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /** Unified Tora CLI: init, mcp, editor, doctor, check. */
3
- import {spawnSync} from 'node:child_process';
3
+ import {execFile,spawnSync} from 'node:child_process';
4
4
  import {copyFileSync,existsSync,realpathSync} from 'node:fs';
5
5
  import {access,constants as fsConstants,mkdir,readFile,rename,rm,writeFile} from 'node:fs/promises';
6
6
  import {homedir} from 'node:os';
@@ -14,7 +14,7 @@ import {assertStorePath} from '../scripts/lean/native/store-path.mjs';
14
14
  const HELP=`Usage: tora <command> [options]
15
15
 
16
16
  Commands:
17
- tora init [--client claude-code|cursor|codex|gemini|all|print] [--global]
17
+ tora init [--client claude-code|cursor|codex|gemini|perch|all|print] [--global]
18
18
  [--workspace <dir>] [--install-browsers|--skip-browsers] [--no-download] [--dry-run]
19
19
  tora mcp [--workspace <dir>] [--store <dir>]
20
20
  tora editor [--port 8001] [--workspace <dir>] [--store <dir>]
@@ -80,7 +80,7 @@ export function buildMcpClientEntry({workspaceRoot,localBin=IS_SOURCE_CHECKOUT}=
80
80
  };
81
81
  }
82
82
 
83
- export async function mergeJsonMcpConfig(filePath,serverName,entry,{dryRun=false}={}){
83
+ export async function mergeJsonMcpConfig(filePath,serverName,entry,{dryRun=false,serverKey='mcpServers'}={}){
84
84
  let existing={};
85
85
  const existed=existsSync(filePath);
86
86
  if(existed){
@@ -90,10 +90,14 @@ export async function mergeJsonMcpConfig(filePath,serverName,entry,{dryRun=false
90
90
  throw Error(`Config file is not a JSON object: ${filePath}`);
91
91
  }
92
92
  }
93
+ const servers=existing[serverKey];
94
+ if(serverKey==='servers'&&servers!==undefined&&(!servers||typeof servers!=='object'||Array.isArray(servers))){
95
+ throw Error(`Config field "${serverKey}" is not a JSON object: ${filePath}`);
96
+ }
93
97
  const next={
94
98
  ...existing,
95
- mcpServers:{
96
- ...(existing.mcpServers&&typeof existing.mcpServers==='object'&&!Array.isArray(existing.mcpServers)?existing.mcpServers:{}),
99
+ [serverKey]:{
100
+ ...(servers&&typeof servers==='object'&&!Array.isArray(servers)?servers:{}),
97
101
  [serverName]:entry,
98
102
  },
99
103
  };
@@ -113,6 +117,53 @@ export async function mergeJsonMcpConfig(filePath,serverName,entry,{dryRun=false
113
117
  return {path:filePath,existed,dryRun,config:next};
114
118
  }
115
119
 
120
+ async function verifyPerchMcp(entry,workspace){
121
+ const request=(id,method,params={})=>({jsonrpc:'2.0',id,method,params});
122
+ const messages=[
123
+ request(1,'initialize',{protocolVersion:'2025-11-25',capabilities:{},clientInfo:{name:'tora-init',version:'1'}}),
124
+ {jsonrpc:'2.0',method:'notifications/initialized'},
125
+ request(2,'tools/call',{name:'tora_brief'}),
126
+ request(3,'tools/call',{name:'tora_capabilities',arguments:{summary:true}}),
127
+ ];
128
+ const output=await new Promise((resolveOutput,reject)=>{
129
+ const child=execFile(entry.command,entry.args,{
130
+ cwd:workspace,encoding:'utf8',timeout:20_000,maxBuffer:12*1024*1024,windowsHide:true,
131
+ },(error,stdout)=>{
132
+ if(error)reject(Error(`Could not start the Tora server for Perch (${error.code??'startup failed'}). Run \`npx @tora-editor/tora doctor\` in this folder.`));
133
+ else resolveOutput(stdout);
134
+ });
135
+ child.stdin.on('error',()=>{});
136
+ child.stdin.end(messages.map(message=>JSON.stringify(message)).join('\n')+'\n');
137
+ });
138
+ try{
139
+ const responses=new Map(output.trim().split('\n').map(line=>{
140
+ const response=JSON.parse(line);
141
+ return [response.id,response.result];
142
+ }));
143
+ const brief=responses.get(2),capabilities=responses.get(3);
144
+ if(responses.get(1)?.serverInfo?.name==='tora'&&!brief?.isError&&!capabilities?.isError){
145
+ const documents=JSON.parse(brief.content[0].text).documents;
146
+ const packs=JSON.parse(capabilities.content[0].text).packs;
147
+ if(documents.some(doc=>doc.name==='authoring')&&packs.some(pack=>pack.id==='core'))return;
148
+ }
149
+ }catch{
150
+ // Report only the failing handshake. Brief contents may be private.
151
+ }
152
+ throw Error('The Tora server did not return its brief and capabilities. Check the installation and any TORA_PLAYABLE_BRIEF setting, then rerun init.');
153
+ }
154
+
155
+ async function writePerchProjectRule(configPath){
156
+ const rulesDir=resolve(dirname(configPath),'rules');
157
+ await mkdir(rulesDir,{recursive:true});
158
+ const path=resolve(rulesDir,'tora.md');
159
+ const content=`# Authoring with Tora
160
+
161
+ When asked to create a playable with Tora, call \`tora_brief\` and \`tora_starters\` first. For a cooking brief, call \`tora_compose_starter\` with \`starter: "stack-and-serve"\` and \`deliver: true\`. This gives you the browser ad, editable source, and a QA report and recording in one call. For custom mechanics or edits, discover the matching contracts with \`tora_capabilities\` and use the supported Tora tools. Inspect the packaged playthrough with an available preview tool. If this model or client cannot view stills or footage, give the creator the resulting file paths and report the QA and the missing creative review. After QA passes, share the draft and editable project before optional refinements. If the Tora tools are missing, ask the user to run \`npx @tora-editor/tora init --client perch\` in this folder and reopen Perch here. The installed tools provide the authoring contracts and assets, so a source checkout is unnecessary.
162
+ `;
163
+ try{await writeFile(path,content,{encoding:'utf8',flag:'wx'});}
164
+ catch(error){if(error.code!=='EEXIST')throw error;}
165
+ }
166
+
116
167
  async function runDoctor(flags){
117
168
  const ws=resolveWorkspaceRoot(flags.workspace);
118
169
  const nodeMajor=Number(process.versions.node.split('.')[0]);
@@ -142,6 +193,8 @@ async function runDoctor(flags){
142
193
  cursorGlobal:existsSync(resolve(homedir(),'.cursor/mcp.json')),
143
194
  geminiGlobal:existsSync(resolve(homedir(),'.gemini/settings.json')),
144
195
  claudeProject:existsSync(resolve(ws,'.mcp.json')),
196
+ perchProject:existsSync(resolve(ws,'.perch/mcp.json')),
197
+ perchGlobal:existsSync(resolve(homedir(),'.perch/mcp.json')),
145
198
  };
146
199
  const ok=nodeOk&&Boolean(nativeInfo)&&!nativeError&&storeSafe&&journalSafe;
147
200
  const report={
@@ -176,8 +229,8 @@ async function runInit(flags){
176
229
  const ws=resolveWorkspaceRoot(flags.workspace);
177
230
  const dryRun=Boolean(flags['dry-run']);
178
231
  const client=String(flags.client??'print').toLowerCase();
179
- const validClients=new Set(['claude-code','cursor','codex','gemini','all','print']);
180
- if(!validClients.has(client))throw Error(`Unsupported --client "${client}". Choose claude-code, cursor, codex, gemini, all, or print.`);
232
+ const validClients=new Set(['claude-code','cursor','codex','gemini','perch','all','print']);
233
+ if(!validClients.has(client))throw Error(`Unsupported --client "${client}". Choose claude-code, cursor, codex, gemini, perch, all, or print.`);
181
234
 
182
235
  const nodeMajor=Number(process.versions.node.split('.')[0]);
183
236
  if(!Number.isInteger(nodeMajor)||nodeMajor<22)throw Error(`Node >= 22 is required (found ${process.versions.node})`);
@@ -210,7 +263,10 @@ async function runInit(flags){
210
263
  }
211
264
 
212
265
  const entry=buildMcpClientEntry({workspaceRoot:ws,localBin:Boolean(flags['local-bin']||IS_SOURCE_CHECKOUT)});
213
- const targets=client==='all'?['cursor','gemini','claude-code','codex']:client==='print'?[]:[client];
266
+ const targets=client==='all'?['cursor','gemini','claude-code','codex','perch']:client==='print'?[]:[client];
267
+ // Perch starts the verified installation directly, including on systems where npx is a shell shim.
268
+ const perchEntry={type:'stdio',...buildMcpClientEntry({workspaceRoot:ws,localBin:true})};
269
+ if(targets.includes('perch')&&!dryRun)await verifyPerchMcp(perchEntry,ws);
214
270
  const results=[];
215
271
 
216
272
  for(const target of targets){
@@ -218,6 +274,11 @@ async function runInit(flags){
218
274
  const cfgPath=flags.global?resolve(homedir(),'.cursor/mcp.json'):resolve(ws,'.cursor/mcp.json');
219
275
  const merged=await mergeJsonMcpConfig(cfgPath,'tora',entry,{dryRun});
220
276
  results.push({client:'cursor',action:dryRun?'dry-run':'written',path:merged.path});
277
+ }else if(target==='perch'){
278
+ const cfgPath=resolve(flags.global?homedir():ws,'.perch/mcp.json');
279
+ const merged=await mergeJsonMcpConfig(cfgPath,'tora',perchEntry,{dryRun,serverKey:'servers'});
280
+ if(!dryRun&&!flags.global)await writePerchProjectRule(cfgPath);
281
+ results.push({client:'perch',action:dryRun?'dry-run':'written',path:merged.path});
221
282
  }else if(target==='gemini'){
222
283
  const cfgPath=resolve(homedir(),'.gemini/settings.json');
223
284
  const merged=await mergeJsonMcpConfig(cfgPath,'tora',entry,{dryRun});
@@ -240,14 +301,21 @@ async function runInit(flags){
240
301
  }
241
302
  }
242
303
 
243
- if(client==='print'||dryRun){
304
+ if(client==='print'||(dryRun&&client!=='perch')){
244
305
  globalThis.console.log('\nMCP server entry:');
245
306
  globalThis.console.log(JSON.stringify({mcpServers:{tora:entry}},null,2));
246
307
  }
308
+ if(dryRun&&targets.includes('perch')){
309
+ globalThis.console.log('\nPerch server entry:');
310
+ globalThis.console.log(JSON.stringify({servers:{tora:perchEntry}},null,2));
311
+ }
247
312
  for(const r of results){
248
313
  if(r.command)globalThis.console.log(`[${r.client}] Run: ${r.command}`);
249
314
  else globalThis.console.log(`[${r.client}] ${r.action}${r.path?`: ${r.path}`:''}`);
250
315
  }
316
+ if(!dryRun&&targets.includes('perch')){
317
+ globalThis.console.log('Verified Tora brief and capabilities. Reopen Perch in this folder, then describe the playable you want.');
318
+ }
251
319
  return 0;
252
320
  }
253
321
 
@@ -37,6 +37,7 @@
37
37
  "scripts/lean/native/physics-3d.mjs",
38
38
  "node_modules/three/build/three.core.js",
39
39
  "node_modules/three/build/three.module.js",
40
+ "scripts/lean/native/glb-loader.mjs",
40
41
  "scripts/lean/native/stage-3d.mjs",
41
42
  "scripts/lean/native/path-network.mjs",
42
43
  "scripts/lean/native/pixel-text.mjs",
@@ -51,7 +52,7 @@
51
52
  "packages/adapters/src/tiktok.ts",
52
53
  "scripts/lean/native/runtime.mjs"
53
54
  ],
54
- "javascriptBytes": 820204,
55
- "sha256": "sha256:e19ec29cd83816ae4d32dbef8daf9dbcd551b24325f10ddd4c8a14099c661166",
55
+ "javascriptBytes": 868655,
56
+ "sha256": "sha256:06c9deb40cb60d6c5cd4dc7758d04f8d015af0185450ba28c46d80207c022aa5",
56
57
  "externalImports": []
57
58
  }