@joiner-platform/cli 0.0.0-stage → 0.1.1

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 (303) hide show
  1. package/README.md +30 -2
  2. package/bundled-resources/poe-tile-templates/base/CLAUDE.md +72 -0
  3. package/bundled-resources/poe-tile-templates/base/README.md +7 -0
  4. package/bundled-resources/poe-tile-templates/base/_bunfig.toml +8 -0
  5. package/bundled-resources/poe-tile-templates/base/_gitignore +18 -0
  6. package/bundled-resources/poe-tile-templates/base/client.ts +12 -0
  7. package/bundled-resources/poe-tile-templates/base/package.json +36 -0
  8. package/bundled-resources/poe-tile-templates/base/playwright.config.ts +38 -0
  9. package/bundled-resources/poe-tile-templates/base/scripts/check-source.ts +148 -0
  10. package/bundled-resources/poe-tile-templates/base/scripts/dev.ts +19 -0
  11. package/bundled-resources/poe-tile-templates/base/scripts/doctor.sh +29 -0
  12. package/bundled-resources/poe-tile-templates/base/scripts/visual-check.ts +64 -0
  13. package/bundled-resources/poe-tile-templates/base/synced-store/backend-config.ts +9 -0
  14. package/bundled-resources/poe-tile-templates/base/synced-store/client-config.ts +8 -0
  15. package/bundled-resources/poe-tile-templates/base/synced-store/data/items.ts +16 -0
  16. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/index.ts +10 -0
  17. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/remove-todo.ts +5 -0
  18. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/set-todo.ts +20 -0
  19. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/types.ts +5 -0
  20. package/bundled-resources/poe-tile-templates/base/synced-store/mutators.test.ts +138 -0
  21. package/bundled-resources/poe-tile-templates/base/synced-store/schema.ts +40 -0
  22. package/bundled-resources/poe-tile-templates/base/tests/e2e.test.playwright.ts +92 -0
  23. package/bundled-resources/poe-tile-templates/base/tests/mobile-viewport.test.playwright.ts +111 -0
  24. package/bundled-resources/poe-tile-templates/base/tests/render-check.test.playwright.ts +128 -0
  25. package/bundled-resources/poe-tile-templates/base/tests/screenshot.test.playwright.ts +86 -0
  26. package/bundled-resources/poe-tile-templates/base/tests/setup-dom.ts +70 -0
  27. package/bundled-resources/poe-tile-templates/base/tile/src/backend.ts +3 -0
  28. package/bundled-resources/poe-tile-templates/base/tile/styles.css +47 -0
  29. package/bundled-resources/poe-tile-templates/base/tsconfig.json +13 -0
  30. package/bundled-resources/poe-tile-templates/coverage.config.json +6 -0
  31. package/bundled-resources/poe-tile-templates/index.ts +27 -0
  32. package/bundled-resources/poe-tile-templates/package.json +31 -0
  33. package/bundled-resources/poe-tile-templates/phaserjs/package.partial.json +6 -0
  34. package/bundled-resources/poe-tile-templates/phaserjs/tile/index.html +14 -0
  35. package/bundled-resources/poe-tile-templates/phaserjs/tile/src/entry.ts +35 -0
  36. package/bundled-resources/poe-tile-templates/phaserjs/ui/App.test.happydom.tsx +98 -0
  37. package/bundled-resources/poe-tile-templates/phaserjs/ui/App.ts +180 -0
  38. package/bundled-resources/poe-tile-templates/phaserjs/ui/phaser-scene.ts +174 -0
  39. package/bundled-resources/poe-tile-templates/phaserjs/vite.config.ts +28 -0
  40. package/bundled-resources/poe-tile-templates/preact/package.partial.json +9 -0
  41. package/bundled-resources/poe-tile-templates/preact/postcss.config.js +5 -0
  42. package/bundled-resources/poe-tile-templates/preact/tile/index.html +14 -0
  43. package/bundled-resources/poe-tile-templates/preact/tile/src/entry.tsx +36 -0
  44. package/bundled-resources/poe-tile-templates/preact/tile/styles.css +51 -0
  45. package/bundled-resources/poe-tile-templates/preact/tsconfig.json +15 -0
  46. package/bundled-resources/poe-tile-templates/preact/ui/App.test.happydom.tsx +69 -0
  47. package/bundled-resources/poe-tile-templates/preact/ui/App.tsx +116 -0
  48. package/bundled-resources/poe-tile-templates/preact/vite.config.ts +18 -0
  49. package/bundled-resources/poe-tile-templates/react/package.partial.json +12 -0
  50. package/bundled-resources/poe-tile-templates/react/postcss.config.js +5 -0
  51. package/bundled-resources/poe-tile-templates/react/tile/index.html +14 -0
  52. package/bundled-resources/poe-tile-templates/react/tile/src/entry.tsx +38 -0
  53. package/bundled-resources/poe-tile-templates/react/tile/styles.css +51 -0
  54. package/bundled-resources/poe-tile-templates/react/tsconfig.json +14 -0
  55. package/bundled-resources/poe-tile-templates/react/ui/App.test.happydom.tsx +71 -0
  56. package/bundled-resources/poe-tile-templates/react/ui/App.tsx +110 -0
  57. package/bundled-resources/poe-tile-templates/react/vite.config.ts +21 -0
  58. package/bundled-resources/poe-tile-templates/scripts/cleanup.ts +10 -0
  59. package/bundled-resources/poe-tile-templates/scripts/generate.ts +57 -0
  60. package/bundled-resources/poe-tile-templates/scripts/install-diagnostics.ts +52 -0
  61. package/bundled-resources/poe-tile-templates/scripts/paths.ts +7 -0
  62. package/bundled-resources/poe-tile-templates/scripts/sdk-dependency-key.ts +288 -0
  63. package/bundled-resources/poe-tile-templates/scripts/verify-all-sdks.ts +132 -0
  64. package/bundled-resources/poe-tile-templates/scripts/verify-local-sdk-command.ts +30 -0
  65. package/bundled-resources/poe-tile-templates/scripts/verify-local-sdk-tarball.ts +397 -0
  66. package/bundled-resources/poe-tile-templates/solidjs/_bunfig.toml +14 -0
  67. package/bundled-resources/poe-tile-templates/solidjs/package.partial.json +13 -0
  68. package/bundled-resources/poe-tile-templates/solidjs/postcss.config.js +5 -0
  69. package/bundled-resources/poe-tile-templates/solidjs/tests/solid-plugin.ts +49 -0
  70. package/bundled-resources/poe-tile-templates/solidjs/tile/index.html +14 -0
  71. package/bundled-resources/poe-tile-templates/solidjs/tile/src/entry.tsx +36 -0
  72. package/bundled-resources/poe-tile-templates/solidjs/tile/styles.css +51 -0
  73. package/bundled-resources/poe-tile-templates/solidjs/tsconfig.json +15 -0
  74. package/bundled-resources/poe-tile-templates/solidjs/ui/App.test.happydom.tsx +70 -0
  75. package/bundled-resources/poe-tile-templates/solidjs/ui/App.tsx +129 -0
  76. package/bundled-resources/poe-tile-templates/solidjs/vite.config.ts +18 -0
  77. package/bundled-resources/poe-tile-templates/tests/check-source.test.ts +131 -0
  78. package/bundled-resources/poe-tile-templates/tests/dev-script.test.slow.ts +166 -0
  79. package/bundled-resources/poe-tile-templates/tests/fixtures/customized-manager.ts +67 -0
  80. package/bundled-resources/poe-tile-templates/tests/fixtures/extended-mutators.ts.txt +106 -0
  81. package/bundled-resources/poe-tile-templates/tests/fixtures/multiplayer-verification.test.playwright.ts.txt +103 -0
  82. package/bundled-resources/poe-tile-templates/tests/fixtures/replace-starter-schema.ts +67 -0
  83. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/phaserjs.tsx.txt +85 -0
  84. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/preact.tsx.txt +69 -0
  85. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/react.tsx.txt +73 -0
  86. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/seating.ts.txt +54 -0
  87. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/solidjs.tsx.txt +70 -0
  88. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/vanilla-js.tsx.txt +85 -0
  89. package/bundled-resources/poe-tile-templates/tests/generated-templates.test.ts +278 -0
  90. package/bundled-resources/poe-tile-templates/tests/happy-dom-version.test.ts +27 -0
  91. package/bundled-resources/poe-tile-templates/tests/install-diagnostics.test.ts +99 -0
  92. package/bundled-resources/poe-tile-templates/tests/native-gesture-defaults.test.ts +23 -0
  93. package/bundled-resources/poe-tile-templates/tests/playwright-version.test.ts +84 -0
  94. package/bundled-resources/poe-tile-templates/tests/render-check-scaffold.test.ts +56 -0
  95. package/bundled-resources/poe-tile-templates/tests/sdk-dependency-key.test.ts +129 -0
  96. package/bundled-resources/poe-tile-templates/tests/visual-check.test.ts +90 -0
  97. package/bundled-resources/poe-tile-templates/vanilla-js/package.partial.json +3 -0
  98. package/bundled-resources/poe-tile-templates/vanilla-js/tile/index.html +14 -0
  99. package/bundled-resources/poe-tile-templates/vanilla-js/tile/src/entry.ts +35 -0
  100. package/bundled-resources/poe-tile-templates/vanilla-js/ui/App.test.happydom.tsx +96 -0
  101. package/bundled-resources/poe-tile-templates/vanilla-js/ui/App.ts +113 -0
  102. package/bundled-resources/poe-tile-templates/vanilla-js/vite.config.ts +17 -0
  103. package/cli.ts +134 -0
  104. package/index.ts +96 -0
  105. package/package.json +48 -5
  106. package/skills/audio-generation/.generated-by-poe-templated-docs +0 -0
  107. package/skills/audio-generation/SKILL.md +125 -0
  108. package/skills/finish-prototype/.generated-by-poe-templated-docs +0 -0
  109. package/skills/finish-prototype/SKILL.md +22 -0
  110. package/skills/help-me-build/.generated-by-poe-templated-docs +0 -0
  111. package/skills/help-me-build/SKILL.md +56 -0
  112. package/skills/image-generation/.generated-by-poe-templated-docs +0 -0
  113. package/skills/image-generation/SKILL.md +128 -0
  114. package/skills/one-shot/.generated-by-poe-templated-docs +0 -0
  115. package/skills/one-shot/SKILL.md +22 -0
  116. package/skills/platform-prototype/.generated-by-poe-templated-docs +0 -0
  117. package/skills/platform-prototype/SKILL.md +60 -0
  118. package/skills/platform-subagent/.generated-by-poe-templated-docs +0 -0
  119. package/skills/platform-subagent/SKILL.md +16 -0
  120. package/skills/poe-tiles-cli/.generated-by-poe-templated-docs +0 -0
  121. package/skills/poe-tiles-cli/SKILL.md +609 -0
  122. package/skills/poe-tiles-cli/references/device-motion.md +40 -0
  123. package/skills/poe-tiles-cli/references/player-updates.md +41 -0
  124. package/skills/prototype/.generated-by-poe-templated-docs +0 -0
  125. package/skills/prototype/SKILL.md +149 -0
  126. package/skills/publish/.generated-by-poe-templated-docs +0 -0
  127. package/skills/publish/SKILL.md +73 -0
  128. package/skills/synced-store/.generated-by-poe-templated-docs +0 -0
  129. package/skills/synced-store/SKILL.md +583 -0
  130. package/skills/synced-store/references/actions.md +85 -0
  131. package/skills/synced-store/references/api-patterns.md +245 -0
  132. package/skills/synced-store/references/architecture-scaling-and-performance.md +280 -0
  133. package/skills/synced-store/references/client-api-reference.md +263 -0
  134. package/skills/synced-store/references/data-visibility.md +95 -0
  135. package/skills/synced-store/references/external-stores.md +162 -0
  136. package/skills/synced-store/references/file-uploads.md +216 -0
  137. package/skills/synced-store/references/getting-user-info-of-members.md +228 -0
  138. package/skills/synced-store/references/limitations.md +72 -0
  139. package/skills/synced-store/references/live-data-limit-hook.md +131 -0
  140. package/skills/synced-store/references/mutator-rules.md +169 -0
  141. package/skills/synced-store/references/platform.md +49 -0
  142. package/skills/synced-store/references/schema-and-bindings.md +85 -0
  143. package/skills/synced-store/references/schema-libraries.md +57 -0
  144. package/skills/synced-store/references/schema-migrations.md +119 -0
  145. package/skills/synced-store/references/searchable-tables.md +27 -0
  146. package/skills/synced-store/references/server-forking.md +115 -0
  147. package/skills/synced-store/references/singleton-tables.md +61 -0
  148. package/skills/synced-store/references/sort-keys.md +253 -0
  149. package/skills/synced-store/references/ui-patterns.md +95 -0
  150. package/skills/tile-creator/.generated-by-poe-templated-docs +0 -0
  151. package/skills/tile-creator/SKILL.md +197 -0
  152. package/skills/tile-creator/references/assets.md +124 -0
  153. package/skills/tile-creator/references/backend-api.md +354 -0
  154. package/skills/tile-creator/references/cli-limitations.md +64 -0
  155. package/skills/tile-creator/references/cli.md +604 -0
  156. package/skills/tile-creator/references/client-api.md +2407 -0
  157. package/skills/tile-creator/references/composing-apps.md +166 -0
  158. package/skills/tile-creator/references/e2e-tests.md +55 -0
  159. package/skills/tile-creator/references/game-ux-best-practices.md +57 -0
  160. package/skills/tile-creator/references/migrating-pre-rename-tiles.md +79 -0
  161. package/skills/tile-creator/references/multiplayer-api-recipe.md +205 -0
  162. package/skills/tile-creator/references/native-results.md +100 -0
  163. package/skills/tile-creator/references/platform-integration.md +201 -0
  164. package/skills/tile-creator/references/power-report.md +199 -0
  165. package/skills/tile-creator/references/publish-rollout.md +166 -0
  166. package/skills/tile-creator/references/publishing.md +33 -0
  167. package/skills/tile-creator/references/push-notification-guidelines.md +58 -0
  168. package/skills/tile-creator/references/render-check.md +266 -0
  169. package/skills/tile-creator/references/running-the-client-api-on-a-server-owned-by-the-user.md +95 -0
  170. package/skills/tile-creator/references/safe-area-insets.md +79 -0
  171. package/skills/tile-creator/references/sandbox-limitations.md +32 -0
  172. package/skills/tile-creator/references/scaffolded-tile-folder-structure.md +48 -0
  173. package/skills/tile-creator/references/scaffolding-a-new-app.md +202 -0
  174. package/skills/tile-creator/references/simulations.md +125 -0
  175. package/skills/tile-creator/references/synced-store-client-reference.md +92 -0
  176. package/skills/tile-creator/references/troubleshooting.md +22 -0
  177. package/skills/tile-creator/references/turn-based-mutator.md +43 -0
  178. package/skills/tile-creator/references/user-erasure.md +14 -0
  179. package/skills/tile-creator/references/vite-plugin.md +166 -0
  180. package/skills/tile-creator/references/workspace-retention.md +72 -0
  181. package/src/admin-conversions-client.ts +28 -0
  182. package/src/admin-reviews-client.ts +36 -0
  183. package/src/api.generated.ts +1527 -0
  184. package/src/auth-token.ts +198 -0
  185. package/src/bounded-read.ts +35 -0
  186. package/src/bun-version.ts +33 -0
  187. package/src/checkout-base.ts +207 -0
  188. package/src/cli-bun-version.ts +16 -0
  189. package/src/cli-env.ts +28 -0
  190. package/src/cli-name.ts +23 -0
  191. package/src/client.ts +2474 -0
  192. package/src/collect-files.ts +226 -0
  193. package/src/commands/accounts.ts +55 -0
  194. package/src/commands/admin-abandon-conversion.ts +60 -0
  195. package/src/commands/admin-reviews.ts +66 -0
  196. package/src/commands/admin.ts +219 -0
  197. package/src/commands/auth.ts +89 -0
  198. package/src/commands/checkout-prototype.ts +67 -0
  199. package/src/commands/creator-source-capability.ts +11 -0
  200. package/src/commands/doctor-bun.ts +145 -0
  201. package/src/commands/doctor-command.ts +64 -0
  202. package/src/commands/doctor-package-json.ts +47 -0
  203. package/src/commands/doctor-sdk-pin.ts +156 -0
  204. package/src/commands/doctor-store-keys-lexer.ts +213 -0
  205. package/src/commands/doctor-store-keys-scan.ts +262 -0
  206. package/src/commands/doctor-store-keys.ts +196 -0
  207. package/src/commands/doctor.ts +371 -0
  208. package/src/commands/init/blank-scaffold-templates.ts +397 -0
  209. package/src/commands/init/index.ts +170 -0
  210. package/src/commands/init/internal-toolchain.ts +49 -0
  211. package/src/commands/init/manager-test-template.ts +107 -0
  212. package/src/commands/init/multiplayer-test-template.ts +217 -0
  213. package/src/commands/init/name-input.tsx +167 -0
  214. package/src/commands/init/no-store-scaffold-templates.ts +281 -0
  215. package/src/commands/init/no-store-scaffold.ts +134 -0
  216. package/src/commands/init/package-json-scripts.ts +72 -0
  217. package/src/commands/init/scaffold.ts +960 -0
  218. package/src/commands/init/sdk-tarball-url.generated.ts +4 -0
  219. package/src/commands/init/sdk-tarball-url.ts +31 -0
  220. package/src/commands/init/template-picker.tsx +147 -0
  221. package/src/commands/inspect-child-entry.ts +107 -0
  222. package/src/commands/inspect-contract.ts +87 -0
  223. package/src/commands/inspect-freshness.ts +217 -0
  224. package/src/commands/inspect-lock.ts +201 -0
  225. package/src/commands/inspect-options.ts +360 -0
  226. package/src/commands/inspect-orchestrate.ts +375 -0
  227. package/src/commands/inspect-process.ts +172 -0
  228. package/src/commands/inspect-ready.ts +65 -0
  229. package/src/commands/inspect-report.ts +235 -0
  230. package/src/commands/inspect-run-state.ts +296 -0
  231. package/src/commands/inspect-run.ts +157 -0
  232. package/src/commands/inspect-watchdog.ts +74 -0
  233. package/src/commands/install-joiner.ts +208 -0
  234. package/src/commands/login.ts +308 -0
  235. package/src/commands/models.ts +40 -0
  236. package/src/commands/parse-options.ts +36 -0
  237. package/src/commands/remix-package-json.ts +64 -0
  238. package/src/commands/remix.ts +379 -0
  239. package/src/commands/sdk-url.ts +141 -0
  240. package/src/commands/simulations.ts +133 -0
  241. package/src/commands/skills.ts +108 -0
  242. package/src/commands/store-files.ts +92 -0
  243. package/src/commands/stores.ts +703 -0
  244. package/src/commands/tiles-channel-commands.ts +115 -0
  245. package/src/commands/tiles-checkout.ts +351 -0
  246. package/src/commands/tiles-gallery-command.ts +95 -0
  247. package/src/commands/tiles-get-helpers.ts +27 -0
  248. package/src/commands/tiles-inspect.ts +276 -0
  249. package/src/commands/tiles-power-command.ts +308 -0
  250. package/src/commands/tiles-power-format.ts +396 -0
  251. package/src/commands/tiles-power-versions.ts +299 -0
  252. package/src/commands/tiles-publish-helpers.ts +145 -0
  253. package/src/commands/tiles-upload-command.ts +277 -0
  254. package/src/commands/tiles-version-commands.ts +201 -0
  255. package/src/commands/tiles-visibility-command.ts +103 -0
  256. package/src/commands/tiles.ts +257 -0
  257. package/src/commands/upgrade.ts +307 -0
  258. package/src/commit-in-progress.ts +42 -0
  259. package/src/creator-source-context.ts +97 -0
  260. package/src/creator-source-publish.ts +52 -0
  261. package/src/deferred-assets.ts +125 -0
  262. package/src/distribution.ts +28 -0
  263. package/src/errors.ts +61 -0
  264. package/src/install-command.ts +43 -0
  265. package/src/output.ts +62 -0
  266. package/src/poe-tile-config-files.ts +100 -0
  267. package/src/poe-tile-config-players.ts +168 -0
  268. package/src/poe-tile-config-remix.ts +166 -0
  269. package/src/poe-tile-config.ts +831 -0
  270. package/src/power-report-client.ts +55 -0
  271. package/src/prototype-startup.ts +21 -0
  272. package/src/publish-change-summary.ts +55 -0
  273. package/src/publish-overrides-validation.ts +49 -0
  274. package/src/publish-pack.ts +167 -0
  275. package/src/publish-phases.ts +57 -0
  276. package/src/publish-retry.ts +51 -0
  277. package/src/publish-tile-from-config.ts +434 -0
  278. package/src/recorder-stream.ts +169 -0
  279. package/src/remix-provenance.ts +156 -0
  280. package/src/resolve-client-credential.ts +71 -0
  281. package/src/resolve-media-uploads.ts +147 -0
  282. package/src/sdk-dependency.ts +54 -0
  283. package/src/sdk-skills.ts +85 -0
  284. package/src/should-skip-client-setup.ts +20 -0
  285. package/src/simulation-snapshot.ts +123 -0
  286. package/src/simulation-types.ts +74 -0
  287. package/src/simulations-client.ts +112 -0
  288. package/src/source-bundle.ts +466 -0
  289. package/src/staged-publish-cleanup.ts +44 -0
  290. package/src/staged-publish-deferred.ts +160 -0
  291. package/src/staged-publish.ts +401 -0
  292. package/src/store-file-upload.ts +268 -0
  293. package/src/store-request.ts +168 -0
  294. package/src/tar-canonical.ts +41 -0
  295. package/src/tar-extensions.ts +159 -0
  296. package/src/tar-extract.ts +193 -0
  297. package/src/tar-parse.ts +224 -0
  298. package/src/tar.ts +231 -0
  299. package/src/template-check-scripts.ts +18 -0
  300. package/src/tile-gallery-client.ts +82 -0
  301. package/src/types.ts +258 -0
  302. package/src/upload-concurrency.ts +54 -0
  303. package/src/whole-tile.ts +52 -0
@@ -0,0 +1,166 @@
1
+ # Publish rollout: going live and when players get the update
2
+
3
+ **Whether an upload goes live immediately is the live channel's follow-latest
4
+ preference, ON by default.** Every `joiner tiles upload` records a new
5
+ version in your tile's version history. While **live** follows the latest
6
+ version (the default), the same upload also points live at the new version, so
7
+ players start getting it right away. Pin live to a version when you want a
8
+ deliberate upload-then-promote workflow: uploads then only record the version,
9
+ and `live` moves only when you explicitly promote (or `deploy`).
10
+
11
+ ```
12
+ joiner tiles upload # records a version; live follows it while the preference is on
13
+ joiner tiles auto-advance <tile> off # pin live: uploads stop going live until you promote
14
+ joiner tiles deploy # upload AND make THAT build live even while live is pinned
15
+ joiner tiles promote <tile> <version> # point live at a version (promote or roll back)
16
+ joiner tiles channels <tile> # see which version each channel serves
17
+ joiner tiles versions <tile> # version history, with channel markers
18
+ ```
19
+
20
+ (`tiles publish` is the upload command's old name and still works as an alias.)
21
+
22
+ You can also name and annotate the version you're uploading —
23
+ `--version-name "Beta 2"` and `--version-notes "What changed"` label the new
24
+ version in the tile page's history (notes default to your `--change-summary`),
25
+ and `joiner tiles edit-version` edits them later.
26
+
27
+ The tile's page in the app mirrors all of this in its **Tile Versions** tab:
28
+
29
+ - The **Release Channels** card lists `live` plus your custom channels. Each
30
+ row shows what it currently serves — `Pinned to version: "…"` or
31
+ `Follows latest version ("…")` — with an **Open channel** button and a
32
+ `⋯` menu holding **Change version** (a picker whose leading
33
+ **Follow latest version** option is the same preference as
34
+ `tiles auto-advance`; picking a version pins the channel there) plus
35
+ **Rename** and **Delete** for custom channels. **Add channel** creates a
36
+ custom channel at the current live version.
37
+ - The **Version History** card lists every published version with channel
38
+ badges, an **Open preview** button (see below), and a `⋯` menu holding
39
+ **Edit** (rename the version, edit its notes) and the directional live move
40
+ (**Make this version live** / **Roll back live to this version**). An
41
+ explicit live move pins live — its follow-latest preference turns off, so a
42
+ later upload can't silently undo your promote or rollback.
43
+ - **Publishing from the app (in-app Edit/Remix)** follows the same
44
+ follow-latest preference as CLI uploads.
45
+
46
+ ## Going live while live is pinned
47
+
48
+ With live pinned (follow-latest off), going live is a separate, deliberate
49
+ step:
50
+
51
+ - **`joiner tiles upload`** records the new version and leaves `live` where
52
+ it was. Nothing your players run changes.
53
+ - **`joiner tiles deploy`** does the same upload and then points `live` at
54
+ the new version in one step — an explicit promote that overrides the pin for
55
+ this upload only.
56
+ - **Promote later** once you've tested the build:
57
+ `joiner tiles promote <tile> <version>`, or **Make this version live**
58
+ from the version row's `⋯` menu on the tile's page. Rolling `live` back to
59
+ an earlier version works the same way.
60
+
61
+ <a id="test-on-staging-in-the-app"></a>
62
+
63
+ ## Previewing an exact version (one tap, nothing created)
64
+
65
+ Every version in the **Version History** card has an **Open preview** button.
66
+ It opens that exact build's tile info — play it, invite a tester into the room
67
+ it launches, or run a multiplayer simulation — completely isolated from the
68
+ players on `live`, and pinned permanently to that one version. No channel is
69
+ created and nothing is written anywhere until you actually launch a room from
70
+ it: the preview identity derives from the version itself.
71
+
72
+ 1. `joiner tiles upload` your new build (it lands in Version History).
73
+ 2. Open the tile's page, its **Tile Versions** tab, and tap the new version's
74
+ **Open preview**, then **Play Now**. This drops you into a fresh room
75
+ running exactly that version — a real, playable room, not a mock.
76
+ 3. Play it, and **invite a friend** into that room to test the multiplayer
77
+ parts together. Nobody on `live` sees this room, and nothing you do in it
78
+ touches the live players' games.
79
+ 4. When it's ready, **promote to live** (the version row's `⋯` menu or
80
+ `joiner tiles promote`).
81
+
82
+ A preview room is addressed by its own version-scoped identity, so its rooms,
83
+ leaderboards, and saved data never mix into the live tile's — testing a build
84
+ can't corrupt or pollute what your players see.
85
+
86
+ ## Custom channels: a named, movable pointer
87
+
88
+ Reach for a **custom channel** (e.g. `beta`) when you want a named pointer you
89
+ manage deliberately — share one test surface with friends, hold it on an older
90
+ build, or have it follow every upload. Custom channels are not discoverable
91
+ on the platform; only people you point at them run them. Manage them from the
92
+ Release Channels card, or from the CLI:
93
+
94
+ ```bash
95
+ joiner tiles set-channel <tile> beta 5 # create/point a custom "beta" channel at version 5 (manual)
96
+ joiner tiles set-channel <tile> beta 6 --auto-advance # make "beta" follow the newest upload
97
+ joiner tiles delete-channel <tile> beta # remove a custom channel
98
+ ```
99
+
100
+ - A channel row's **Open channel** opens that channel's build the same
101
+ isolated way as a version preview — play it, invite testers, or run a
102
+ simulation — except the rooms follow the channel: repointing the channel
103
+ moves them to the new build.
104
+ - `live` is the only reserved channel name. `set-channel` refuses it; live moves through the
105
+ promote paths (`tiles promote`, `tiles deploy`, follow-latest, or the
106
+ version row's live move), which carry the schema-downgrade guard below.
107
+ - `staging` is an ordinary custom channel name. The automatically maintained
108
+ staging channel was retired; creators can create, repoint, and delete their own.
109
+ - A brand-new custom channel starts manual (pinned); `--auto-advance` — or the
110
+ picker's **Follow latest version** — opts it into following each upload.
111
+ - Renaming a channel is display-only: rooms address the channel by its
112
+ permanent name, so they keep working across renames.
113
+
114
+ ## Pinning a room to a version (creator-only)
115
+
116
+ A preview or channel room is isolated by design — but sometimes you want to
117
+ run a specific build in a **real room**, with its real players and saved data
118
+ (compare an old build against the current one, or hold one room back while the
119
+ fleet moves on). If you are the tile's creator **and a member of that room**,
120
+ open the room's settings sheet (tap the room title) and use **Pin to tile
121
+ version**:
122
+
123
+ - Picking a **version** pins the room to that exact build — code only; the room
124
+ keeps its identity, members, data, leaderboards, and analytics. Everyone in
125
+ the room gets the pinned build (your view reloads immediately; others pick it
126
+ up within seconds or on their next open), and a version badge appears in the
127
+ room header so nobody mistakes it for the live build.
128
+ - A pinned room does **not** change when you upload; it stays on that version
129
+ until you change it.
130
+ - Picking **Latest** unpins the room, returning it to the normal fleet
131
+ behavior.
132
+ - Only you (the creator) see the control, and only in rooms you are in. A pin
133
+ that would roll the room's data schema backwards is refused with
134
+ `SCHEMA_DOWNGRADE_BLOCKED` — like the promote guard below, a room migrated
135
+ forward can't run a build from before a schema bump.
136
+ - Rooms pin **versions only** — a pin can't make a room follow a channel it
137
+ doesn't already encode (a room that silently changed builds whenever a
138
+ channel advanced would be too easy to forget about). For channel-following
139
+ test sessions, use a custom channel's isolated rooms above.
140
+ - **Scoped rooms are pinnable too**: inside a channel test room or a version
141
+ preview room, the same control pins that one room to an exact version,
142
+ overriding its channel or baked-in version. Unpinning returns it to the
143
+ room's default — the channel's current version, or the preview's version —
144
+ rather than to `live`.
145
+
146
+ Use a preview or channel room when you don't want players affected; use a pin
147
+ when affecting that room is the point.
148
+
149
+ ## Rolling back across a schema change (coming once schema versions are declared)
150
+
151
+ This is the **intended** behavior once an upload declares its synced-store schema
152
+ version — it is not a guarantee you can rely on yet, because uploads don't
153
+ emit their schema version today.
154
+
155
+ The idea: if a version changed the shape of saved data (you bumped
156
+ `TILE_SCHEMA_VERSION`), you can promote *forward* to it, but you won't be able to
157
+ later roll `live` *back* to a version with an older schema — those saved
158
+ games/rooms have already migrated forward, and synced-store migrations are
159
+ one-way. Once schema versions are emitted, such a promote is refused with a
160
+ `SCHEMA_DOWNGRADE_BLOCKED` error rather than silently stranding player data, and
161
+ you roll forward to a fixed version instead. Until schema versions are emitted,
162
+ this downgrade guard is inert, so don't rely on it to protect player data yet.
163
+
164
+ ## Once a version IS live, when do players get it?
165
+
166
+ Read [player update behavior](../../poe-tiles-cli/references/player-updates.md) for device caching, reloads, schema changes, and creator-device behavior. The upload and promotion rules above decide which version is live; the shared reference explains when players receive it.
@@ -0,0 +1,33 @@
1
+ # Publishing a tile
2
+
3
+ **Read this only when your host has not already told you how publishing works.**
4
+ The mechanics below are the ones a creator gets when they drive the CLI
5
+ themselves. A host that uploads on your behalf states its own rules in its
6
+ system prompt, and those rules win over every line in this file — including
7
+ which command you run, and whether you run one at all.
8
+
9
+ Everything else in the `tile-creator` skill is portable: it describes how to
10
+ build a good tile, and it is the same wherever you build one. Publishing is
11
+ host-specific, so it is documented here rather than in `SKILL.md`.
12
+
13
+ See [Bundle publishing limits](cli-limitations.md) for compressed and
14
+ decompressed client/runtime limits, the separate source-archive limits, and
15
+ the per-account upload rate limits.
16
+
17
+ For external harnesses and creator agents, [Simulations from the CLI](simulations.md)
18
+ walks through uploading a version, creating a simulation, and saving its debug
19
+ state with `joiner simulations debug`.
20
+
21
+ ## What upload and publish mean
22
+
23
+ - **What "publish" means to the creator, and what it does NOT mean.** To them, publishing is making the tile PUBLIC — putting it where other people can find and play it, or moving those people onto a newer build. Uploading a build is not publishing; it produces a **preview**, reachable only by its link. Say "preview", "update the preview", or "new version" for that, and reserve "publish", "publish it", and "make it public" for the two things that actually change what the public gets: listing the tile, and moving the live version. **The CLI upload command is `joiner tiles upload`, and it does NOT make anything public** — it uploads a build, nothing more. (`tiles publish` is that command's old name and still works as an alias; the old name is exactly the trap, so never let it teach you the wrong meaning. `tiles deploy` uploads AND moves the live version — that one does change what players run.) Never report an upload as having published anything, and never tell a creator their tile is "already published" because a build exists: to them that sentence means it is public, and it is not.
24
+ - Uploading a build puts a PREVIEW of the tile on Joiner. **Upload a preview as soon as the tile is worth trying — do not ask first.** Work locally until it is implemented, tested, and visually checked, then upload it and hand the creator the launch link. There is no question to ask, because there is no longer a decision to make: a preview is always UNLISTED — reachable by its launch link, absent from public discovery — so it exposes nothing, and asking only delays the creator getting something they can open and play with. **Never offer a visibility choice when you upload.** An option labelled "publish publicly" promises something an upload cannot do; making it public is a separate command, never a question you ask, and only ever run on their request — see the next point. This is also why a tile that ALREADY HAS A PREVIEW needs no such question when you edit or update it, and why you must never offer to change a listed tile's visibility unprompted: asking a creator who opened a public tile whether to make it unlisted presents that as a routine choice, and it is not one.
25
+ - **Never ask about listing publicly. Say it in one sentence and let them come back to you.** Being discoverable in Explore, search, and profiles is a separate decision from having a preview, and it is not one anybody can make well from a description of a tile they have not opened yet — so it is not a question to put to the creator at any point, and never a multiple-choice one. The expected next step after a preview is that they click the link, play, and tell you what they want; a question in the way of that link asks them to decide something they have no basis for yet, and stalls the loop the preview exists to start. So when you hand over a preview, close with one plain sentence naming both things they might want next — changes, or listing it publicly. For example: *"Here is your tile. Try it out and let me know if you want any changes, or if you want to make it public for anyone to discover and play."* Everything up to that point stays unlisted on its own, with no action needed from you.
26
+ - **When they DO ask to list it, that is the moment the tile gets its real name.** The user names their tile; you only name previews. An unlisted tile carries the agent-chosen placeholder `displayName` (see the "Before the FIRST upload, fill in the listing-page fields yourself" rule in `SKILL.md`), and a tile must never enter public discovery under one — so listing is a two-step reply rather than one command. Propose a title they can accept or replace, set `.poe-tile.json → displayName` to the one they land on **and `handle` to a slug of that same name** (lowercase, digits and single hyphens — `Texas Hold'em` → `texas-holdem`), upload a build carrying the new name, then run `joiner tiles visibility <tileHandleOrId> public`. **Do not pin the live version yourself, and do not touch channels.** The platform pins it after this turn's upload lands, so that the build you just made is the one players get; pinning here would freeze them on the build from before the creator asked you to publish. Proposing a name here is not the question the rule above forbids: they have already played the tile and already decided to list it, so the name is the only thing left to settle, and it is offered as a suggestion rather than a gate. If they volunteer a name at any point, use it and drop the placeholder. **Set the handle only on this first naming.** A scaffolded tile's handle carries a random suffix nobody has seen, so replacing it costs nothing; once a tile is listed its handle is in links people have shared, and renaming it breaks them silently. If the slug is already taken by another of their tiles the rename is refused — say so, and use the closest free variant rather than leaving the placeholder.
27
+ - **Read a tile's visibility, never remember it.** `joiner tiles get <tileHandleOrId>` reports it — as `Visibility`, or the `visibility` field under `--json` — for a tile you own. Whether a tile is listed decides whether your changes reach real players, and it is changed from the platform UI as well as by `joiner tiles visibility`, so a value you were told when the session started, or inferred from what you did earlier in it, can already be wrong. Query it at the moment you need it — before promoting, and before telling the creator who can see their tile. A response with no `visibility` field means you are not the owner — it does not mean unlisted.
28
+ - **Once a tile is listed, keep your edits off the people playing it.** Pinning the live version is what does that: uploads still happen on every change and still give the creator something to open, but they record a TEST VERSION instead of moving what players run. The platform pins it for you, on the first upload that lands while the tile is listed — which is the listing turn itself, and any later turn if that pin ever failed. You do not run `auto-advance` at all: doing it yourself always pins the build from BEFORE your upload, which is how a listed tile ends up with players on the previous version. Every turn after the pin records a test version — an unpinned listed tile ships every half-built turn to real players. The `test` channel the preview link addresses is not yours to create either — the platform creates it on the tile's FIRST upload, long before any of this, and re-creates it on the next upload if that ever fails; it follows the newest version from then on. That is why the link you hand over is the same link from the first preview to the last, and why `set-channel` is not a command you run: pointing an existing channel at the version you have in hand aims it at the build from before your upload, which is the pinning mistake in another costume. A pinned `live` alone would leave that link on the build players already have, because a bare tile URL resolves through `live`. Say in one sentence that you have done it, and on each later change say that players are still on the live version, so they never have to remember which mode they are in. **Pushing to players is theirs to ask for**: when they do, run `joiner tiles promote <tileHandleOrId> <version>`, and leave live pinned afterwards rather than restoring follow-latest, so the next edit is safe by default too. Never promote because the work looks finished. **The listing follows the live version too.** The cover, gallery, name and descriptions players see are the ones the live version was uploaded with; a test version's listing reaches them only when that version goes live. So if you change the gallery after promoting, run `joiner tiles set-gallery <tileHandleOrId>` from the directory of `.poe-tile.json`: it puts that file's `screenshots` on the live version without an upload.
29
+ - Any time the user can try out a new state, upload it again, including while iterating: `bun run publish-to-poe-tiles -- --change-summary "<concise user-facing summary>"` from the app's directory. **Uploading never sets visibility.** A tile is unlisted when its first build goes up, and stays wherever it is on every upload after that — there is no `--visibility` flag, and a `.poe-tile.json` visibility key is not applied by uploading, so an upload can never move a tile in or out of discovery. **To list a tile publicly (or take it back out), run `joiner tiles visibility <tileHandleOrId> <public|unlisted>`** — only on an explicit request, and never as a step in ordinary iteration. Unlisting removes a live tile from discovery and the user does not necessarily see it happen. Describe the meaningful changes in one short sentence; the Creator chat receipt includes it with the tile name and launch link. Report `appUrl` as a clickable markdown link.
30
+ - **Say what changed, in one line, every turn that changes the tile.** Write it to `.poe-tile-change-summary` beside `.poe-tile.json` — plain text, one sentence, no markdown. The upload at the end of the turn reads that file and records it as the version's summary, then deletes it, so write a fresh one each turn. The creator reads these back in Version History when deciding what to publish to players, so write what a person would want to see there — *"Made the tap target smaller and fixed the score not resetting"*, not *"updated App.tsx"* and not *"various improvements"*. Skip the file on a turn that changed nothing; the version then records that it was an automatic preview, which is true. Do not describe work you did not finish, and do not use it to talk to the creator — it is a changelog entry, not a reply.
31
+ - **Know when players actually receive a published update, and say it accurately.** A newly published version is live immediately, but players are not all switched over at once: someone who has opened the tile on that phone before gets the previous version for one more open (the new one downloads in the background), and someone with the tile open on screen gets no automatic prompt — they must tap Settings > **Reload tile** once their session notices the new version, or leave and reopen. A tile never swaps versions out from under a player mid-play. Read [publish-rollout.md](publish-rollout.md) before telling the user "everyone has it now", and before debugging a report that a published change "didn't take effect".
32
+ - **When an upload prints a `Multiplayer simulation` link, hand it to the user as a clickable markdown link and say what it does.** The platform adds that row whenever the tile's declared `players` range makes it worth testing with more than one person, and clicking it opens a multiplayer simulation directly: several dev-user phones side by side in one page, all already in the tile, driven by the user — no need to recruit real players to see whether the multiplayer half actually works. Say it in one short sentence, mentioning the phone count — e.g. *"Test with 4 players → multiplayer simulation — four dev users side by side in this tile"*, with "multiplayer simulation" linking to the printed URL. Use the URL exactly as the CLI gave it; never hand-assemble or edit one. The same link is posted into the Creator chat automatically, so this is a convenience, not the only path — but a user reading the terminal should not have to go looking for it. When the row is ABSENT on a tile you believe is multiplayer, that is a signal `.poe-tile.json → players` is wrong or missing: fix the declaration and upload again rather than inventing a link.
33
+ - `bun run publish-to-poe-tiles` runs `bun run build && poe-tiles tiles upload`. Despite the script's name, that command only uploads a build — it takes no visibility input at all, there is no flag and no manifest key, so it can never move a tile in or out of discovery; `joiner tiles visibility` is the only thing that does. The CLI reads the listing metadata (including `players`, `profilePicture`, and `screenshots`), `runtimeBundle.dir`, and `sourceBundle` from `.poe-tile.json` in the current directory. The upload records that listing on its own version; players see it when that version is live. Override any field with the corresponding flag (`--handle`, `--dir`, etc.) for one-off uploads; explicit flags always win over config.
@@ -0,0 +1,58 @@
1
+ # Push notification guidelines
2
+
3
+ A push takes attention from outside the tile. Send one when this person would
4
+ want their phone to ring: it is their turn, someone acted on them (invited,
5
+ mentioned, challenged, beat their record), or something they asked to hear
6
+ about happened. For anything else, update the preview or the unread count
7
+ instead. People who get noise mute the room or turn off the app's
8
+ notifications for good.
9
+
10
+ ## What the platform already does
11
+
12
+ - **Some pushes are automatic.** `setTurn` pushes the new turn-holder,
13
+ `notifyUsersAddedToTile` pushes the people you add, and
14
+ `setLeaderboardScore` pushes the other active members on a new high score
15
+ unless you pass `{ notifyOnHighScore: false }`. Do not add a
16
+ `notifyActivity({ push })` for the same event. To use your own copy or
17
+ audience, turn the automatic push off first.
18
+ - **`notifyActivity` does not push the sender for their own action.** It
19
+ removes the sender's push, and so do `notifyUsersAddedToTile` and the
20
+ `setLeaderboardScore` high-score notify. Do not write your own filter for
21
+ these calls.
22
+ - **`setTurn` pushes each person it marks, the caller too.** Any mutator whose
23
+ next turn-holder can be the person who acted must pass `push: false` when
24
+ that turn-holder is `ctx.userId`. Examples: a start, reset, rematch or seat
25
+ claim where the opener moves first, and a pass, skip, timeout or forfeit
26
+ that gives the turn back.
27
+ - **One `push` value applies to every user in a `setTurn` call.** To mark a
28
+ set that includes the caller (a simultaneous turn), mark the others first
29
+ with a push, then mark the caller with
30
+ `setTurn(ctx, { userIds: [ctx.userId], replace: false, push: false })`.
31
+ - **The app hides a push from a person who is using it.** It shows an in-app
32
+ banner instead, unless the person already looks at this tile. A muted room
33
+ gets neither. Do not check presence yourself.
34
+ - **A mutation can run more than once.** Send the push from the mutation that
35
+ commits the event, and only when the state changed, so a replay does not
36
+ push again.
37
+
38
+ ## Rules
39
+
40
+ 1. **One push per event per person.**
41
+ 2. **Send to the smallest audience that cares**: the next player, the invited
42
+ or mentioned person, the person whose record fell. Push to every member only
43
+ when each one would act on it or would be sorry to miss it. In a large room,
44
+ a push for each member's result is noise; use `unread: "increment"` without
45
+ `push` for it.
46
+ 3. **Never throttle, batch, delay, or merge the turn push.** A player whose
47
+ turn it is gets a push every time, in every match.
48
+ 4. **No timers that push again and again.** A nudge is one action by a waiting
49
+ player, with a cooldown that the server enforces, and it stops when the turn
50
+ changes. Never push again only because the earlier push was not opened.
51
+ 5. **No generic "come back and play" pushes.**
52
+ 6. **Say what happened and why it matters to this person.** "Jacob took your
53
+ bishop" is better than "It's your turn."
54
+
55
+ ## Before you finish
56
+
57
+ Tell the creator each push the tile can send, who gets it, and about how many
58
+ one busy person can get in a day across all their rooms.
@@ -0,0 +1,266 @@
1
+ # Render check
2
+
3
+ `bun run render-check` finds the battery-hungry rendering patterns the
4
+ production power report measures, from inside the sandbox, before the tile
5
+ has a single player. It builds the tile, runs
6
+ `tests/render-check.test.playwright.ts` under the `mobile-viewport` Playwright
7
+ project (iPhone 13 on Chromium), walks the screens listed in that file, and
8
+ reduces what it counted to findings in the same vocabulary the production
9
+ report uses. Counts of code decisions (draw calls per render, animation
10
+ starts, running animations) are read as ratios over animation-frame ticks and
11
+ judged down to 45 ticks a second. Renders per second and compositor frames
12
+ per tick move with the hold's tick rate, so they are judged only when the hold
13
+ ran at 58 ticks a second or better. A slow sandbox changes how long the check
14
+ takes and which readings it withholds, never what a judged reading says.
15
+
16
+ The check is separate from `verify` and never runs on prototype turns.
17
+
18
+ ## When to run it
19
+
20
+ - Before presenting a tile with a canvas render loop or decorative animation
21
+ as finished.
22
+ - When the creator mentions battery, heat, or a warm phone.
23
+ - When the production power report, once it is available to you, says
24
+ `watch` or `hot`: run the check to confirm the pattern locally, fix it, and
25
+ run the check again instead of waiting a week for new sessions.
26
+
27
+ Tell the creator what each tool is for: the check finds patterns, the
28
+ production power report measures outcomes.
29
+
30
+ ## Completing the check
31
+
32
+ - Run ordinary `bun run render-check`, with `RENDER_CHECK_REPORT_ONLY` unset,
33
+ and preserve its actual exit status. If saving output, redirect to a log
34
+ and capture the status before reading the log; a pipeline through `grep`
35
+ or `tail` can report that command's success instead of the check's failure.
36
+ - Inspect `.visual-checks/render-check.json` as well as the command result.
37
+ The scaffold's findings assertion alone can pass with lost or unreached
38
+ screens. In the tile's test, also assert that every declared screen is
39
+ `measured`. Require valid covered probes on every screen and valid
40
+ reduced-motion probes on idle screens; reduced-motion is not run on play
41
+ screens. A skipped, `inconclusive`, or `unobservable` run is unverified.
42
+ Inspect every `partial` cause and withheld reading and resolve missing
43
+ coverage needed to judge this tile before claiming completion.
44
+ - Fix findings and rerun; assess notices, hints, and borderline readings
45
+ rather than weakening thresholds or dropping screens to silence them.
46
+ Repeat after the final change to rendering, timers, visibility/pause/resume
47
+ behavior, or the screen test, including changes made while fixing another
48
+ check. A later `verify` pass does not refresh the render-check report.
49
+ - Cite the final report and command exit status when reporting verification,
50
+ including any remaining limitation. Only claim the source actually tested;
51
+ if a later relevant edit has not been rechecked, say it is unverified.
52
+
53
+ ## Writing the screens
54
+
55
+ The scaffold ships one screen:
56
+
57
+ ```ts
58
+ const screens: RenderCheckScreen[] = [
59
+ { name: "opening screen", kind: "unknown", reach: async () => {} },
60
+ ];
61
+ ```
62
+
63
+ Replace it with the tile's real screens, in the order a player meets them.
64
+ Each screen has:
65
+
66
+ - `name`: unique; printed in the table and in every finding.
67
+ - `kind`: `idle` for a menu, game-over card, pause or how-to overlay, where
68
+ nothing should move; `play` for active play; `unknown` for a screen you
69
+ have not classified, which is measured and probed but judged only by the
70
+ screen-agnostic rules. A game that starts playing at once keeps its
71
+ opening screen `unknown` so continuous rendering there is reported, not
72
+ failed. A screen the player leaves open and comes back to (a farm, a
73
+ lobby, a collection, a board between moves) is `idle`: nothing needs to
74
+ move there between inputs, and continuous ambient motion on such a screen
75
+ is the pattern the production power report flags. Calling it `unknown`
76
+ hides the idle findings; the check still reports `page_busy_no_canvas`
77
+ and `many_running_animations` there. Reach a persistent screen in the
78
+ fullest state a player can own (every pet, crop, decoration and effect),
79
+ because the count of running animations grows with what is on screen.
80
+ - `reach(ctx)`: drive the tile's real UI to the screen. It runs after the
81
+ previous screen's probes, on the same page, so it starts from whatever
82
+ state the previous screen left (a game-over card after a `play` screen
83
+ whose game ended; the menu after a restart). Never reload. A `reach` that
84
+ throws or outruns its bound marks the screen `not_reached` and ends the
85
+ walk, so every later screen is `not_reached` too.
86
+ - `exercise(ctx)` (optional): runs during the main hold of a `play` screen
87
+ that needs input to keep rendering. Tap, drag, or hold keys until
88
+ `ctx.signal` fires, then stop within two seconds. An `exercise` that
89
+ rejects (including `ctx.signal.throwIfAborted()`) or does not settle within
90
+ those two seconds marks the screen `exercise_failed`: its row stays, no
91
+ finding comes from it, and its probes are skipped.
92
+ - `assert(ctx)` (optional): resolve `true` while the tile is still on this
93
+ screen. It runs after the hold and again after the probes, because an
94
+ input-driven game can end while the tile is covered. A `false`, a
95
+ rejection, or a timeout marks the screen `screen_lost`; its row stays, no
96
+ finding comes from it, and the next `reach` starts from where the tile is.
97
+
98
+ `ctx` carries `frame` (the tile's Playwright frame), `page`, `server` (the
99
+ running `TestServer`, for admitting a second user or seeding state the way
100
+ the e2e tests do), and `signal`.
101
+
102
+ Up to eight screens. The test's timeout grows with the count.
103
+
104
+ **Assert the state you measured.** Supply an `assert` for each real screen.
105
+ For input-driven play, check during `exercise` that play remains active and
106
+ that the inputs produce the intended effect (such as a score increase or
107
+ movement). For timed rounds, reach a genuine gameplay phase with enough time
108
+ left for the hold, and assert the actual end screen separately. Do not accept
109
+ a pause or game-over screen as active play, add a nominal `play` screen solely
110
+ to wait out a timer, or change the game's rules or duration to make it pass.
111
+ If a phase cannot be measured honestly, report that coverage limitation.
112
+
113
+ The assertion runs after the main hold and again after the probes. If
114
+ covering intentionally leaves the game paused until Resume, distinguish
115
+ those two calls: `ctx` has no phase field, so keep a per-screen flag reset in
116
+ `reach` and advance it only after the main-hold assertion succeeds. The first
117
+ call must confirm active play and the second the specific expected pause
118
+ with the round unfinished. Do not use one permissive list of playing, paused,
119
+ and ended states for both. Measure that pause as an `idle` screen, then
120
+ explicitly resume through the UI before the next play measurement. If the
121
+ tile resumes automatically, assert that behavior instead. The report's
122
+ `covered.resumed` only says a frame was drawn after uncover; a redrawn pause
123
+ card can satisfy it without gameplay resuming.
124
+
125
+ ## What a hold measures
126
+
127
+ Every screen gets a main hold, a covered probe, and, on `idle` screens, a
128
+ reduced-motion probe. Each discards a 60-tick settle window (about a second
129
+ at 60 Hz) before counting, so a full-rate burst right after a transition is
130
+ not judged: a
131
+ compliant tile legitimately renders at full rate for about a second after
132
+ input or a phase change, a game-over card slides in, and a paused overlay
133
+ may animate because the tile was just covered.
134
+
135
+ The covered probe sets `hostCovered` on the session page's `<poe-tile>`
136
+ element, the same path the host's results sheet uses, and watches what the
137
+ tile does while covered on every screen, play included. The reduced-motion
138
+ probe turns `prefers-reduced-motion: reduce` on and watches decorative
139
+ animation on idle screens only.
140
+
141
+ ## Findings, borderline, and notices
142
+
143
+ A **finding** fails the run. A **notice** is advisory. A **borderline**
144
+ reading is a rate-derived number inside a 15% band around its threshold,
145
+ where a change in the machine's frame rate could move it across; it never
146
+ fails the run and reads as "close enough to look at". The table below
147
+ states each code's nominal threshold: a rate-derived code fires at 15%
148
+ above it and is borderline from 15% below it, so `idle_screen_renders` at
149
+ 20 fires from 23 renders a second and reads borderline from 17. Exact counts
150
+ (a shadowed fill on every render, one running animation under cover) have
151
+ no band: a value of exactly 1 against a threshold of 1 is a finding.
152
+
153
+ | Code | Severity | Fires when | What to inspect and the fix |
154
+ |---|---|---|---|
155
+ | `idle_screen_renders` | finding | an `idle` screen renders 20 or more times a second | The loop keeps drawing on a screen where nothing moves. Call `shouldRenderFrame(now, { idle: true })` there and draw one ambient frame every ~250 ms. |
156
+ | `idle_screen_page_busy` | finding | an `idle` screen produces compositor frames on half the ticks or more | Something other than the canvas changes every tick: a per-tick DOM write, an infinite CSS animation, a shimmer. Write DOM values only when they change; stop decorative animation between bursts. |
157
+ | `page_busier_than_canvas` | finding | on a `play` screen with an active canvas, the page produces 0.3 more frames per tick than the canvas renders | The canvas is capped or gated but the page is not: a HUD written every simulation tick, a CSS pulse. The compositor runs at panel rate whatever the canvas does. Write the HUD only on change; stop per-tick animations during play. |
158
+ | `page_busy_no_canvas` | notice | an `unknown` screen with no laid-out canvas produces compositor frames on half the ticks or more | Running CSS or Web Animations never pause, so the phone composites every layer at the panel rate for the whole session. If nothing on the screen needs continuous motion, classify it `idle` (the same reading is then `idle_screen_page_busy`, a finding) and pause ambient loops between bursts. |
159
+ | `shadowed_fills` | finding on `play`, notice elsewhere | a fill with `shadowBlur` or `shadowOffsetX/Y` set and a visible `shadowColor` on every render | Draw the shadow as a second offset fill of the same path. |
160
+ | `full_canvas_composite` | finding on `play`, notice elsewhere | a `fillRect`, `drawImage`, or single-`rect()` `fill` under a `globalCompositeOperation` other than `source-over` covers the whole canvas on every render | Bake the grain, vignette, or tint into a background layer rendered once into an offscreen canvas and drawn with one `drawImage`. |
161
+ | `uncapped_pixel_ratio` | finding | the largest canvas's buffer-to-CSS ratio, on the screen where it is largest, is above 1.6 on a phone-shaped frame, the budget stamped no `dpr` override, no engine evidence, and some screen renders 12 or more times a second | The buffer is sized from raw `devicePixelRatio`. Size it from the render budget's resolved `pixelRatio`, and re-apply on resize. |
162
+ | `animations_run_covered` | finding | while the host reports the tile covered: 12 or more renders a second, any animation start, or any running animation, finite or not | Subscribe to the foreground signal and pause the loop, timers, and decorative animation under cover. A 30-second entrance still running under cover counts. |
163
+ | `buffer_below_budget` | notice | buffer ratio below 1.4 on a phone-shaped frame, no `dpr` override, no engine evidence | A buffer sized to its CSS box: cheap, but text and edges smear on phones. Size it from the resolved `pixelRatio`. |
164
+ | `buffer_ratio_static` | notice | buffer ratio above 1.6 (same gates as `uncapped_pixel_ratio`) on a tile where no screen renders 12 or more times a second | A canvas that rarely renders is cheap whatever its size; the ratio is a configuration mismatch, not a cost. Size it from the resolved `pixelRatio` when you touch the code. |
165
+ | `no_resume_after_cover` | notice | the tile drew in the last 60 ticks of the hold, drew nothing under cover, and drew nothing in the 60 ticks after uncover (about a second each at 60 Hz) | A tile that renders only on input correctly schedules nothing after uncover. If the tile should resume on its own, assert that in the screen's `assert`. |
166
+ | `animations_ignore_reduced_motion` | notice | with reduced motion on, an `idle` screen starts an animation or keeps an infinite one running | Honor `prefers-reduced-motion` for decorative animation, including changes while mounted. |
167
+ | `per_render_gradient` | notice | a gradient or pattern is created on every render | Create it once, or when its inputs change, and reuse it. |
168
+ | `per_render_text_measure` | notice | `measureText` runs on every render | Measure once per text change and cache the width. |
169
+ | `many_running_animations` | finding, notice on `play` | 20 or more animations running at the end of a hold | Every running animation makes the phone composite a frame per refresh, and the count grows with what the player owns. Animate a few visible items with quiet intervals between bursts, under one shared scheduler; turn a particle layer (rain, snow, petals, sparkles) into a burst or one animated image. |
170
+ | `unbudgeted_render_loop` | notice | 30 or more renders a second with no render budget created and no engine evidence | Wire `createRenderBudget()` into the loop; see the render-budget section of the client API reference. |
171
+ | `duplicate_frame_callbacks` | finding | 0.1 or more extra deliveries of the same `requestAnimationFrame` callback per tick, averaged over the hold (any screen, judged down to the floor rate) | A loop was restarted from inside its own callback, for example three.js `setAnimationLoop(null)` then `setAnimationLoop(fn)` during a frame, or one callback is scheduled twice. The second call sees zero elapsed time and resets time-based animation. Stop the old loop outside the frame callback, or dedupe the schedule. Withheld when the platform shim did not report it. |
172
+
173
+ Every finding prints the screen, the value, the threshold, and a fixed
174
+ sentence. The thresholds live in the SDK's `RENDER_CHECK_THRESHOLDS`.
175
+
176
+ **Hints** come from a scan of the tile's source and never fail the run. They
177
+ tell you where to look when a runtime finding fires:
178
+
179
+ | Hint | What it saw |
180
+ |---|---|
181
+ | `hint_shadow_per_fill` | an assignment to `shadowBlur` or `shadowOffsetX/Y`, with file and line |
182
+ | `hint_composite_pass` | an assignment to `globalCompositeOperation` other than `source-over` |
183
+ | `hint_infinite_css_animation` | `animation` or `animation-iteration-count` with `infinite` |
184
+ | `hint_blend_mode` | `mix-blend-mode` other than `normal`, in CSS, a `style.mixBlendMode` assignment or style object, or `setProperty`: a blended layer over moving content is re-blended on every frame |
185
+ | `hint_filter_effect` | `filter` or `backdrop-filter` with `blur()` or `drop-shadow()`, in CSS, a `style.filter` / `style.backdropFilter` assignment or style object (with or without a `webkit` prefix), or `setProperty`: a filter on or above an animated element is re-rendered on every frame |
186
+ | `hint_no_render_budget` | `requestAnimationFrame` and `getContext(` somewhere, no budget created or resolved anywhere |
187
+ | `hint_no_foreground_subscription` | a loop or interval somewhere, no foreground subscription anywhere |
188
+ | `hint_no_reduced_motion` | `@keyframes` or `.animate(` somewhere, no `prefers-reduced-motion` anywhere |
189
+
190
+ The three whole-scan hints are withheld when the scan hit its caps, so an
191
+ incomplete scan never asserts that something is missing.
192
+
193
+ ## What the check cannot see
194
+
195
+ - The GPU cost of a blur, a filter, or a shader on a given phone.
196
+ - Which of many running animations costs most on a phone, or how much a
197
+ DOM screen costs at all: headless Chromium's CPU time stays low while a
198
+ phone composites the same layers at the panel rate, so compare builds by
199
+ frames per tick and running animations, never by sandbox CPU.
200
+ - Whether a 30 fps cap pays on a given device.
201
+ - Thermal escalation.
202
+ - A gesture scheduled less often than a probe window (180 ticks, about three
203
+ seconds at 60 Hz): it can escape both probes. Test such a scheduler's
204
+ pause path in the tile's own unit tests.
205
+ - A render gate whose threshold sits just above a multiple of the 60 Hz
206
+ frame interval (17 ms, 34 ms, 51 ms, and so on, within about half a
207
+ millisecond per frame the gate spans): its reading can differ between
208
+ machines even inside the accepted band. A reading that moves between runs
209
+ is usually this.
210
+ - Draw calls inside a worker. A canvas handed to a worker with
211
+ `transferControlToOffscreen` reads `unobservable` rather than guessing; a
212
+ worker's frames presented on the main thread through
213
+ `transferFromImageBitmap` count as renders, but the shadows, composites, and
214
+ gradients drawn to produce them are invisible. An `OffscreenCanvas` drawn on
215
+ the main thread (a sprite cache, a scratch canvas) is counted like any other
216
+ canvas.
217
+
218
+ ## States that are not findings
219
+
220
+ - `inconclusive`: the sandbox could not hold the check's tick-rate floor on
221
+ a static reference tile, that reference tile could not open or stopped
222
+ answering, or no screen was measured. The test skips with the reason.
223
+ Rerun when the machine is less loaded; never read silence as a pass.
224
+ - A tile frame that stops answering mid-screen (detached, navigated, crashed)
225
+ marks that screen `inconclusive` with the message under Notes and ends the
226
+ walk; the earlier rows stand.
227
+ - `unobservable`: the tile moved its canvas off the main thread
228
+ (`transferControlToOffscreen`). The test skips with the reason; the hints
229
+ still print. A tile page that cannot open, a tile frame that never
230
+ appears, or a frame that does not answer at open also reads
231
+ `unobservable`, and the test fails on those, because a tile that never
232
+ mounts proves nothing.
233
+ - A rate-derived reading withheld because the hold ran below 58 ticks a
234
+ second (named under Notes in the report). Count-based codes are still
235
+ judged down to 45 ticks a second.
236
+ - `borderline`, as above.
237
+ - `partial`: some screen was not measured, its page-frame column could not be
238
+ read (when CDP tracing is unavailable this is every screen, with the
239
+ environmental reason under Notes), a probe it was due did not run or ran
240
+ below the floor, the resume read after cover did not complete, or the
241
+ source scan hit its caps or could not read the tile directory; the status
242
+ line names each cause.
243
+
244
+ The report is printed to the Playwright log, attached to the run, and
245
+ written to `.visual-checks/render-check.json` in the tile directory, even
246
+ when the run is cut short. Cite it when you report the check. That folder is
247
+ temporary (in Creator it does not survive the container sleeping), so read the
248
+ report in the turn that ran the check.
249
+
250
+ ## Adding the check to an older workspace
251
+
252
+ 1. Upgrade the workspace's SDK pin to a release that exports
253
+ `joiner-sdk/v1/test-utils/render-check.js`, then `bun install`.
254
+ 2. Copy `tests/render-check.test.playwright.ts` from a fresh scaffold
255
+ (`joiner tiles init` into a temporary directory) into `tests/`, then
256
+ change the scaffold name it carries (the `typeId` passed to
257
+ `registerTile` and the `tileTypeId` in `sessionUrl`) to this tile's type
258
+ id as the other tests spell it. If the tile's `package.json` has the
259
+ old SDK key (see the SDK and CLI names note in `tile-creator`), change the
260
+ copied file's `joiner-sdk/...` imports to that key.
261
+ 3. Add the file to the `mobile-viewport` project's `testMatch` in
262
+ `playwright.config.ts` and to the desktop project's `testIgnore`.
263
+ 4. Add the script to `package.json`:
264
+ `"render-check": "bun run build && bunx playwright install chromium && RENDER_CHECK=1 bunx playwright test tests/render-check.test.playwright.ts"`.
265
+ 5. If the workspace has no `scripts/visual-check.ts`, copy that too; the
266
+ test writes its JSON through it.
@@ -0,0 +1,95 @@
1
+ # Running the Client API on a server owned by the user
2
+
3
+ Normally the `joiner-sdk` client is initialized inside a web browser. To initialize it inside a Node.js or Bun process, use the `NodeEnvironment` helper — for example, to build agents (like OpenClaw) that interact with a Joiner tile instance on a user's behalf.
4
+
5
+ ```typescript
6
+ import { NodeEnvironment } from "joiner-sdk/v1/node.js";
7
+ import { createPoe } from "joiner-sdk/v1/client.js";
8
+
9
+ const env = new NodeEnvironment({
10
+ apiUrl: "https://joiner.com",
11
+ headers: { Cookie: "session_token=..." },
12
+ websocketUrl:
13
+ "wss://joiner.com/api/v1/user-router?clientId=c1&userId=u1",
14
+ storeConfig: {
15
+ clientId: "c1",
16
+ instanceId: "i1",
17
+ optimisticUserId: "u1",
18
+ storeTypeId: "my-app",
19
+ },
20
+ });
21
+
22
+ const poe = createPoe({ environment: env });
23
+ const store = poe.setupStore(myClientConfig);
24
+ await store.waitForServerData();
25
+ ```
26
+
27
+ For in-browser apps, use [`PostMessageEnvironment`](./client-api.md#initialization) instead.
28
+
29
+ ## How it works
30
+
31
+ `NodeEnvironment` wires the same kernel that powers canvas-frame apps, but against real HTTP + WebSocket transports instead of `postMessage`:
32
+
33
+ ```
34
+ HTTP API ← PoeClientApiBackend (models, bot SSE streaming)
35
+ ↓
36
+ HostKernelRpcHandlers ← in-memory RPC ← createPoe()
37
+ ↓
38
+ WebSocket → UserRouterClient → ClientSyncCoordinator
39
+ ↓
40
+ ClientSession ← in-memory store transport ← SyncedStoreClient
41
+ ```
42
+
43
+ There is no iframe and no `postMessage` — the RPC transport is an in-memory pipe between `createPoe()` and the node-side handlers. Bot requests go over HTTP. Synced-store sync goes over WebSocket to the user-router.
44
+
45
+ ## Options
46
+
47
+ ```typescript
48
+ interface NodeEnvironmentOptions {
49
+ /** Base URL for the Joiner API (e.g. "https://joiner.com"). */
50
+ apiUrl: string;
51
+
52
+ /**
53
+ * Headers sent with every HTTP request (API + bot SSE streaming).
54
+ * Use for authentication: { Cookie: "session=..." }.
55
+ */
56
+ headers?: Record<string, string>;
57
+
58
+ /** WebSocket URL for user-router. Default: process.env.POE_WEBSOCKET_URL */
59
+ websocketUrl?: string;
60
+
61
+ /** Store configuration. Default: JSON.parse(process.env.POE_STORE_CONFIG) */
62
+ storeConfig?: StoreEnvironmentConfig;
63
+ }
64
+ ```
65
+
66
+ `websocketUrl` and `storeConfig` can be supplied via environment variables (`POE_WEBSOCKET_URL` and `POE_STORE_CONFIG`) to keep invocation scripts terse. If both the option and the env var are missing, the constructor throws.
67
+
68
+ ## Authentication
69
+
70
+ `NodeEnvironment` does not mint sessions — pass an existing session cookie (or any other credentials the server accepts) via `headers`. Typical flow:
71
+
72
+ 1. Call `POST /api/v1/auth/login` with a Poe API key to obtain a `session_token` cookie.
73
+ 2. Pass `{ Cookie: "session_token=..." }` as `headers` when constructing `NodeEnvironment`.
74
+
75
+ ## Limitations
76
+
77
+ Some parts of the `Poe` surface only make sense inside a browser and will throw if called from a `NodeEnvironment`:
78
+
79
+ - **Assets** — `Poe.bundle.loadAsset()` and related asset APIs require blob URLs and a DOM cache.
80
+ - **Sub-apps** — the `<poe-tile>` custom element needs a host frame to mount child iframes (it drives the internal `tiles.openChild` host RPC). There is no callable `poe.tiles.openChild()` — `poe.tiles` exposes only the catalog methods (`list`, `get`, `search`, `preload`, `publish`); nesting sub-apps is unsupported outside a browser regardless.
81
+ - **`createStoreTransport()`** — can only be called once. `poe.setupStore()` consumes it; calling it a second time throws.
82
+
83
+ KV storage for synced-store is **in-memory** — Node agents are ephemeral, so there is no IndexedDB. Restarting the process re-bootstraps from the server.
84
+
85
+ ## Cleanup
86
+
87
+ Always call `env.dispose()` when you are done. It closes the WebSocket, disposes the sync coordinator, and tears down the RPC client. Skipping it will leave the process hanging on open handles.
88
+
89
+ ```typescript
90
+ try {
91
+ // ...use poe...
92
+ } finally {
93
+ env.dispose();
94
+ }
95
+ ```