@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
package/index.ts ADDED
@@ -0,0 +1,96 @@
1
+ // owner: jyoung-q
2
+ /**
3
+ * Programmatic API for @ai-app/poe-tiles-cli.
4
+ *
5
+ * Types are derived from the OpenAPI spec via codegen (see src/api.generated.ts).
6
+ *
7
+ * Usage:
8
+ * import { SlopPoeClient } from "@ai-app/poe-tiles-cli";
9
+ * const client = new SlopPoeClient({ apiKey: "..." });
10
+ * const result = await client.listTiles();
11
+ */
12
+
13
+ export type {
14
+ CliWebSocket,
15
+ ExternalDispatchTarget,
16
+ FailedMutationInfo,
17
+ JSONValue,
18
+ PublishVisibility,
19
+ SlopPoeClientOptions,
20
+ StoreAccessOptions,
21
+ StoreAccessResult,
22
+ StoreActionSchemaInfo,
23
+ StoreJsonSchema,
24
+ StoreMutateOptions,
25
+ StoreMutateResult,
26
+ StoreMutatorSchemaInfo,
27
+ StoreSchemaInfo,
28
+ StoreSchemaOptions,
29
+ StoreSchemaResult,
30
+ StoreTableSchemaInfo,
31
+ WebSocketFactory,
32
+ } from "./src/client.js";
33
+ export { SlopPoeClient } from "./src/client.js";
34
+ export { publishOutcomeJson } from "./src/commands/tiles-publish-helpers.js";
35
+ export { assertSuccess, CliError } from "./src/errors.js";
36
+ export type {
37
+ PoeTileConfig,
38
+ ReadPoeTileConfigResult,
39
+ } from "./src/poe-tile-config.js";
40
+ export {
41
+ LONG_DESCRIPTION_MAX_BYTES,
42
+ POE_TILE_CONFIG_FILENAME,
43
+ POE_TILE_CONFIG_SCHEMA_URL,
44
+ readPoeTileConfig,
45
+ SHORT_DESCRIPTION_MAX_LENGTH,
46
+ } from "./src/poe-tile-config.js";
47
+ export type {
48
+ PublishPhase,
49
+ PublishPhaseObserver,
50
+ } from "./src/publish-phases.js";
51
+ export type {
52
+ PublishAppFromConfigParams,
53
+ PublishAppOverrides,
54
+ } from "./src/publish-tile-from-config.js";
55
+ export { publishTileFromConfig } from "./src/publish-tile-from-config.js";
56
+ export {
57
+ type ClientCredential,
58
+ resolveClientCredential,
59
+ } from "./src/resolve-client-credential.js";
60
+ export type {
61
+ SimulationCreated,
62
+ SimulationDebugDocument,
63
+ SimulationList,
64
+ SimulationListItem,
65
+ SimulationSnapshot,
66
+ SimulationStore,
67
+ } from "./src/simulation-types.js";
68
+ export {
69
+ DEFAULT_SOURCE_BUNDLE_IGNORES,
70
+ isDefaultSourceBundleIgnored,
71
+ type SourceBundleVisibility,
72
+ } from "./src/source-bundle.js";
73
+ export type {
74
+ StoreFileUploadOptions,
75
+ StoreFileUploadResult,
76
+ } from "./src/store-file-upload.js";
77
+ export type {
78
+ ApiResult,
79
+ ConnectedAccount,
80
+ ConnectedAccountsResponse,
81
+ LoginResponse,
82
+ LogoutResponse,
83
+ Model,
84
+ ModelsResponse,
85
+ PoeUserInfo,
86
+ PointsHistoryEntry,
87
+ PointsHistoryResponse,
88
+ PublishResult,
89
+ SessionResponse,
90
+ TileGetResponse,
91
+ TileInfo,
92
+ TilesListResponse,
93
+ TileWithBundleUrl,
94
+ UnlinkAccountResponse,
95
+ UsageResponse,
96
+ } from "./src/types.js";
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
- "name": "@joiner-platform/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@joiner-platform/cli",
3
+ "version": "0.1.1",
4
+ "gitHead": "f7651ff7ec72861f5d0b0ee26229630e715891c5",
5
+ "description": "The Joiner CLI: create, test, and publish Joiner tiles, with agent skills for coding agents.",
6
+ "keywords": [
7
+ "joiner",
8
+ "cli",
9
+ "agent-skills",
10
+ "claude-code",
11
+ "codex"
12
+ ],
13
+ "license": "UNLICENSED",
14
+ "homepage": "https://joiner-docs.pages.dev",
15
+ "type": "module",
16
+ "bin": {
17
+ "joiner": "cli.ts",
18
+ "poe-tiles": "cli.ts"
19
+ },
20
+ "files": [
21
+ "cli.ts",
22
+ "index.ts",
23
+ "src/**/*.ts",
24
+ "src/**/*.tsx",
25
+ "src/**/*.js",
26
+ "!src/**/*.test.ts",
27
+ "!src/**/*.test.tsx",
28
+ "!src/**/*.test.slow.ts",
29
+ "!src/commands/init/test-utils.ts",
30
+ "!src/latest-manifest.ts",
31
+ "bundled-resources/**",
32
+ "skills/**",
33
+ "README.md"
34
+ ],
35
+ "engines": {
36
+ "bun": ">=1.4.2"
37
+ },
38
+ "dependencies": {
39
+ "commander": "^12.1.0",
40
+ "fflate": "^0.8.2",
41
+ "ink": "^6.6.0",
42
+ "ink-text-input": "^6.0.0",
43
+ "react": "^19"
44
+ },
45
+ "peerDependencies": {},
46
+ "publishConfig": {
47
+ "access": "public"
48
+ }
49
+ }
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: audio-generation
3
+ description: Generate and integrate music, atmospheric soundtracks, background audio, and every sound effect for a tile with the generate_music and generate_sound_effect tools in Creator. Use whenever a tile plays any sound effect or audio cue (taps, clicks, pickups, hits, scores, failures, wins, UI feedback, ambient beds), and when the creator asks for music. Generate sound effects instead of synthesizing them with Web Audio oscillators or other browser audio APIs. Covers saved assets, user-initiated playback, mute controls, looping, low-latency effect playback, and reuse on later edits.
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Music and sound effects for a tile
8
+
9
+ Music needs the `generate_music` tool and sound effects need the `generate_sound_effect` tool. If the one you need is unavailable, explain that this kind of generation is unavailable in this session; for effects, synthesize the cue with Web Audio instead. Never ask for provider keys, install a provider SDK, or call a provider directly. Generation happens during creation; players only play the saved asset.
10
+
11
+ **SDK and CLI names.** The SDK package is `joiner-sdk` and the CLI command is `joiner`. Tiles and installs from before the rename use `poe-tiles-sdk` and `poe-tiles`. The old names still work, so an existing tile needs no change. In a tile whose `package.json` has the `poe-tiles-sdk` key, write `poe-tiles-sdk/...` where these docs show `joiner-sdk/...`, and never add the second key. If the shell has no `joiner` command, run `poe-tiles install-joiner`, or use `poe-tiles` in its place. If `remix` of a published tile warns about an unresolved workspace dependency, run `poe-tiles upgrade`, delete the folder that remix made (or pass `--dir` with a new name), then remix again.
12
+
13
+ ## Generate once
14
+
15
+ 1. Find the tile directory and inspect its existing audio assets and playback code. Reuse a suitable saved track on subsequent edits. Regenerate only when requested, the asset is missing or broken, or the requested soundtrack has materially changed.
16
+ 2. Describe mood, instruments, tempo, and intended use. Prefer a short 15–30 second instrumental for background music. For a loop, request a steady arrangement with a matching beginning and end; generation does not guarantee a seamless join.
17
+ 3. Call `generate_music` once, in sequence:
18
+
19
+ ```json
20
+ {
21
+ "prompt": "Short atmospheric game soundtrack: warm ambient pads, sparse soft piano, calm exploration, steady texture with a matching beginning and end for looping, no vocals",
22
+ "duration": 20,
23
+ "instrumental": true,
24
+ "outputPath": "my-game/assets/soundtrack.mp3"
25
+ }
26
+ ```
27
+
28
+ `outputPath` is relative to the workspace, including the tile directory. For a root tile use `assets/soundtrack.mp3`; for a conversion candidate use its staging directory. The tool replaces that file, so use a new filename when preserving an existing soundtrack as a fallback. It accepts 3–120 whole seconds, a prompt of at most 2,000 characters, and MP3 output. `instrumental` defaults to true; false permits vocals.
29
+
30
+ Every call costs money and counts toward both the creator's daily model request quota and the separate limit of 100 music and sound effect requests per UTC day. Do not regenerate just to improve a small detail. After a failure, follow the tool's guidance and tell the creator. A timeout or cancellation may already have been billed: never automatically retry. Keep existing audio when generation fails.
31
+
32
+ ## Sound effects
33
+
34
+ Generate every sound effect the tile plays with `generate_sound_effect`, including simple taps, clicks, blips, and UI feedback, as well as coins, doors, footsteps, glass, explosions, animals, and ambient beds such as rain. Do not synthesize cues with oscillators, noise buffers, or other browser audio APIs: generated cues sound finished, and synthesized cues sound like placeholders. Synthesize a cue with Web Audio only when the tool is unavailable, fails, or the daily limit is reached, and tell the creator.
35
+
36
+ 1. Inspect existing `assets/sfx-*.mp3` files first and reuse them on subsequent edits. Regenerate only when requested, the asset is missing or broken, or the cue has materially changed.
37
+ 2. Make one call per distinct cue, in sequence. Generate only the cues the game plays; most games need 3–8. Name each file for its cue, such as `assets/sfx-coin.mp3` or `assets/sfx-crash.mp3`. Distinct outcomes need distinct sounds; do not reuse one file at another pitch for a score and a failure.
38
+ 3. Describe one sound: its source, material, texture, and character. Choose a tone and pitch range that suit the game's mood and the creator's request, and state them in the prompt. Keep one-shot cues short, 0.5–2 seconds; omit `durationSeconds` to let the model choose. Set `loop` only for an ambient bed.
39
+
40
+ ```json
41
+ {
42
+ "prompt": "Coin pickup for a cozy farming game: a small copper coin dropping into a cloth pouch, mid pitch, short, no reverb tail",
43
+ "durationSeconds": 1,
44
+ "outputPath": "my-game/assets/sfx-coin.mp3"
45
+ }
46
+ ```
47
+
48
+ It accepts a prompt of at most 450 characters, 0.5–30 seconds, and MP3 output. The same cost, quota, and no-retry rules as music apply.
49
+
50
+ Treat shipped audio as public. Keep private details and credentials out of prompts, filenames and assets.
51
+
52
+ ## Load the saved asset
53
+
54
+ Tiles run in a sandboxed frame from a `blob:` URL; a bare relative media URL does not load there. The platform's CSP allows `data:` audio sources and `fetch(dataUrl)`, but the recipes below decode a long track once into a `blob:` URL so every player does not hold it as a base64 string.
55
+
56
+ **Prototype:** use Bash to write a data-only script beside each saved file, so the audio bytes never pass through model context. Give each file its own global, such as `SOUNDTRACK_URL` or `SFX_COIN_URL`:
57
+
58
+ ```bash
59
+ cd <tileDir> && {
60
+ printf 'globalThis.SOUNDTRACK_URL = "data:audio/mpeg;base64,'
61
+ base64 < assets/soundtrack.mp3 | tr -d '\n'
62
+ printf '";\n'
63
+ } > assets/soundtrack.js
64
+ ```
65
+
66
+ Load `<script src="assets/soundtrack.js"></script>` before the main module. The host inlines this data-only script, like generated image data. Pass `globalThis.SOUNDTRACK_URL` to `createMusicUrl` below, or a sound effect's global to `loadEffect`. Keep the original MP3 for future edits and conversion.
67
+
68
+ **Integrated Vite tile:** copy each MP3 into the Vite public directory (`tile/public/` in a scaffolded tile), for example `tile/public/audio/soundtrack.mp3`, so it ships in the bundle. Load it with `const { url } = await Poe.bundle.loadAsset("/audio/soundtrack.mp3")` and use `url` as the audio source. `Poe.bundle` needs SDK 67, so set `poeTile({ minSdkVersion: 67 })` in `vite.config.ts`. Players do not need to update their app (see the Minimum SDK Version section of the tile-creator `vite-plugin.md` reference). Do not import audio with `?url`, which encodes the whole file as base64 into the tile's code. Preserve the MP3 when converting a prototype; replace the prototype's data script with `loadAsset`.
69
+
70
+ **Prototype music:** create the URL once per mounted player, then use it as the audio source:
71
+
72
+ ```js
73
+ function createMusicUrl(dataUrl) {
74
+ const encoded = dataUrl.slice(dataUrl.indexOf(",") + 1);
75
+ const bytes = Uint8Array.from(atob(encoded), (char) => char.charCodeAt(0));
76
+ return URL.createObjectURL(new Blob([bytes], { type: "audio/mpeg" }));
77
+ }
78
+ ```
79
+
80
+ Keep this URL for the player's lifetime. On disposal, pause the player, remove its `src`, call `load()` to release the media, and call `URL.revokeObjectURL(musicUrl)`. Never revoke it while playback or looping still needs it, and never revoke a `url` from `Poe.bundle.loadAsset`, which the host owns.
81
+
82
+ Play sound effects through Web Audio rather than an audio element, so cues start at once and can overlap. Decode each file once into an `AudioBuffer` on one shared `AudioContext`. Create or resume that context from a real user gesture, and resume it again before scheduling on a reused context: WebKit parks a context in the non-standard `"interrupted"` state after an alarm or call, so checking only for `"suspended"` leaves the tile silent.
83
+
84
+ **Prototype:** a prototype has no SDK import, so use this local helper:
85
+
86
+ ```js
87
+ function resumeContext(context) {
88
+ if (context.state !== "suspended" && context.state !== "interrupted") return;
89
+ context.resume().catch(() => {});
90
+ }
91
+ ```
92
+
93
+ **Integrated tile:** call `resumeAudioContext(context)` from `joiner-sdk/v1/client.js` instead.
94
+
95
+ Decode and play effects with these helpers. A prototype passes its effect's data URL; an integrated tile passes the `url` from `Poe.bundle.loadAsset`:
96
+
97
+ ```js
98
+ async function loadEffect(context, url) {
99
+ if (!url.startsWith("data:")) {
100
+ return context.decodeAudioData(await (await fetch(url)).arrayBuffer());
101
+ }
102
+ const encoded = url.slice(url.indexOf(",") + 1);
103
+ const bytes = Uint8Array.from(atob(encoded), (char) => char.charCodeAt(0));
104
+ return context.decodeAudioData(bytes.buffer);
105
+ }
106
+
107
+ function playEffect(context, buffer, output, { loop = false } = {}) {
108
+ const source = context.createBufferSource();
109
+ source.buffer = buffer;
110
+ source.loop = loop;
111
+ source.playbackRate.value = loop ? 1 : 0.95 + Math.random() * 0.1;
112
+ source.connect(output);
113
+ source.start();
114
+ return source;
115
+ }
116
+ ```
117
+
118
+ Route every effect through one gain node that the mute toggle controls. Vary the playback rate slightly on repeats, as above, so a run does not sound mechanical.
119
+
120
+ ## Playback
121
+
122
+ - Create one music player per mounted tile. Start it only from a user action such as Play or Enable music. Call `audio.play()` in that event handler, catch rejection, and leave a visible retry control. Never autoplay on mount or after an async generation completes.
123
+ - Provide a visible, keyboard-accessible mute toggle with a clear current state. It silences music and effects together. Keep that preference local to the player, preserve it across game restarts, and never unmute as a side effect of an edit or game state update.
124
+ - Use a restrained background volume. Loop only background tracks and ambient beds; play stingers, victory cues, and one-shot effects once. Avoid stacking players when a game restarts.
125
+ - Pause on exit or when hidden; dispose the player and event listeners on unmount. Resume only if the player previously opted in and remains unmuted; handle browser playback rejection.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: finish-prototype
3
+ description: Finish the prototyping phase of a Creator tile and build the full version on Joiner, with the saved progress, shared state, and multiplayer features the tile needs. Use when the creator presses Finish prototyping or types /finish-prototype. Keeps the tile unlisted.
4
+ allowed-tools: Bash, Glob, Grep, Read, Edit, Write
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Finish prototyping
9
+
10
+ The creator is done prototyping, or chose to skip the prototype. Finish the prototyping phase and build the full version on Joiner, with the saved progress, shared state, and multiplayer features this tile needs. Finish any pending work. Text after the command is part of the request; honor it.
11
+
12
+ This command authorizes the full version only. It does not authorize listing or publishing: keep the tile unlisted. The creator decides whether to publish after trying the new preview.
13
+
14
+ ## How
15
+
16
+ Follow the **Integrate with Joiner** section of [prototype](../prototype/SKILL.md), reading that skill first if it is not already in context. It owns every step: `begin_conversion` first, staging, porting, and `promote_conversion`. Nothing here replaces or shortens it.
17
+
18
+ - **No prototype exists yet.** The creator typed the command before the first preview, or the workspace holds no tile. Still call `begin_conversion`; it reports `source: empty`, and you build the full version from the creator's request as that section says.
19
+ - **The tile already has platform integration.** A `.poe-tile.json` with no `.poe-prototype` beside it, and no conversion in progress. Say in one sentence that this tile is already the full version, then continue with any request text under `tile-creator`. Do not call `begin_conversion`.
20
+ - **Not a Creator session.** Without the `begin_conversion` tool, say that this command does not apply here and follow `tile-creator` for the request as it stands.
21
+
22
+ Describe this step to the creator as finishing the prototyping phase and building the full version. Do not call it integrating with the Joiner platform.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: help-me-build
3
+ description: "Interview the creator about what they want to build until you both reach a single shared understanding, before any code is written. Use when the creator types /help-me-build, or asks to be grilled or interviewed about an idea. Maps the idea as a design tree, asks each round of open decisions with a recommended answer, looks facts up itself, and waits for the creator to confirm before building anything."
4
+ allowed-tools: Glob, Grep, Read, Agent, AskUserQuestion
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Help me build
9
+
10
+ The creator's idea is the text after this skill block or command. If there is none, the first round asks what they want to build.
11
+
12
+ Grill the creator about their ideas.
13
+
14
+ Interview the creator until you get a shared understanding with questions. Map this as a design tree: every decision branches into the decisions that hang off it.
15
+
16
+ Work the tree in rounds. Invoking this skill asks for an interview, so it deliberately runs several rounds of questions, even where your other instructions say to ask once rather than in a back-and-forth. The frontier is every decision whose prerequisites are already settled: the questions you can ask now without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the creator's answers before the next round. When your question tool holds fewer questions than the frontier, a round is as much of the frontier as the tool holds; see **Asking a round**.
17
+
18
+ Each round the creator answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a later round, not this one.
19
+
20
+ Finding facts is your job, never the creator's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the creator for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The decisions are the creator's: put each to them and wait.
21
+
22
+ The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the creator confirms you have reached a shared understanding.
23
+
24
+ ## Asking a round
25
+
26
+ - **Four questions or fewer:** ask them all in one call to your structured question tool (`ask_user` in a Creator session, `AskUserQuestion` in Claude Code). Number each question in its question text (`1. …`) and put any context there too, because some hosts do not show a header. Give each question two to four options with your recommended answer first, its label ending in ` (Recommended)` and its description giving the one-line reason. For an open decision such as a name, offer your best candidates; the creator can always type their own answer.
27
+ - **More than four questions:** the question tool holds four at a time, so ask the four that unblock the most of the tree in one call, the most upstream decisions first. Carry the rest of the frontier to the next round and list them under **Up next** in your reply, so the creator sees what is coming. Keep using the tool for every round; do not switch to a text list because the frontier is large, and do not split one round across several tool calls.
28
+ - **No question tool:** write the whole frontier as a numbered list in your reply, each question followed by **Recommended:** your answer and a one-line reason, tell the creator they can answer by number, and end your turn to wait.
29
+ - **Nobody to answer** (a background, scheduled, or otherwise automated run): do not interview. Say that this skill needs the creator to answer its questions, and stop without building anything.
30
+
31
+ Open every round's reply with a short **Settled so far** summary of the tree: the decisions made, the assumptions still awaiting confirmation, any lookup still running, and the questions **Up next**. It keeps the tree intact when earlier turns are summarized or compacted away.
32
+
33
+ ## Reading the answers
34
+
35
+ - An answer can settle more than was asked, open a branch you had not seen, or overturn an earlier decision. Update the tree, and re-open every decision downstream of anything that changed.
36
+ - **A skipped question is not settled.** This holds even when the host tells you to decide unanswered questions yourself, as Creator's answer prompt does. Carry your recommended answer forward as an assumption, list it under **Settled so far** as an assumption, and have the creator confirm or change it before the interview ends.
37
+ - A question the creator hands back ("you decide", "whatever you think") is settled by your recommendation, and you record it that way.
38
+
39
+ ## Looking facts up
40
+
41
+ - **With a sub-agent tool** (such as `Agent`): dispatch read-only lookups, in parallel when there are several, and post the rest of the round without waiting for them.
42
+ - **Without one** (Creator sessions have none): do the read-only lookups yourself with `ls`, `rg` or `grep`, `find`, and file reads. Do a quick lookup before you post the round. For a longer one, ask the rest of the frontier now, move the questions that need its result to the next round, and do the lookup at the start of your next turn. Look up only what the current frontier needs.
43
+ - Lookups only read. Never write files, install packages, scaffold, run generators, or start a build while interviewing. If the environment refuses a read, do not work around it: work from what you know, or note the fact as still open.
44
+ - Report what you found as a fact in the round ("The workspace already has a tile named …"), never as a question.
45
+
46
+ ## What the tree covers
47
+
48
+ The decisions are about the tile the creator wants: who it is for and how many people use it at once, what they do in it and why they come back, its rules and how a round ends, what each person sees that others do not, how much the interaction between people depends on split-second timing, and how it looks and feels. When the idea depends on fast real-time play between people (a shooter, a race, a fighting game), say as a fact in the round that other players' moves arrive with visible delay on tiles, and ask whether to keep that design or switch to one that holds up, such as turns, asynchronous score chases, or co-op where timing does not decide the outcome. Follow the creator's idea wherever it branches; that list is where a first round usually starts, not a checklist. A Creator build starts as a single-device prototype, so still cover decisions about several people or hidden information, and record them for the full version.
49
+
50
+ Never ask whether or when to publish or list the tile, or who can discover it. That is not part of this design, and a Creator session handles it separately.
51
+
52
+ ## Finishing
53
+
54
+ When the frontier is empty, present the whole design tree as a summary: every decision and its answer, grouped by branch, with each assumption marked. Ask the creator to confirm that this is the shared understanding, or to change anything that is off.
55
+
56
+ Until they confirm, do not write code, scaffold, create project or marker files, or publish anything. Once they confirm, the build goes through the session's normal workflow. If the confirmation already asks you to build, start; otherwise say you are ready and that they can say "build it" whenever they want. If your instructions name a workflow skill you have not loaded yet, read it before you write anything.
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: image-generation
3
+ description: Generate game art, sprites, backgrounds, and the listing icon for a Joiner tile with the generate_image tool of a Creator session. Use when a tile's look depends on drawn art that code cannot make well, when the request names a specific animal, character, or object to show, or when the creator asks for images. Covers prompts, style consistency, formats, file locations, loading the image in a prototype or an integrated tile, when and how to make the icon, costs, and errors.
4
+ allowed-tools: Bash, Glob, Grep, Read, Edit, Write
5
+ user-invocable: false
6
+ ---
7
+
8
+ # Image generation
9
+
10
+ This skill needs the `generate_image` tool of a Joiner Creator session.
11
+ If you do not have that tool, say that image generation is not available here, and stop. Do not use another image source instead. The one exception is the **Icon** section: it still runs without the tool, and its own steps say what to do.
12
+
13
+ ## When to generate
14
+
15
+ Generate distinctive art that the tile's look depends on: characters, pieces, cards, backgrounds, and the icon. Keep UI chrome, simple shapes, and text in code (CSS, canvas, or SVG).
16
+
17
+ In a prototype (the tile being worked on has a `.poe-prototype` marker), generate only when the creator asks for images or art, or when the request names a specific animal, character, or object the player must recognize (a dog, a knight, a teapot). Code-drawn shapes rarely read as such a subject, so generate it and check the preview as **How to ask** says. Draw everything else, including UI and simple shapes, with canvas, CSS, and inline SVG as the prototype skill says.
18
+
19
+ ## How to ask
20
+
21
+ - **One asset per call.** Compose scenes in code. Do not ask for sprite sheets, grids, or text in an image; the model places all three badly.
22
+ - **One style.** Write a style line once (for example `flat vector, thick dark outline, warm palette, soft top-left light`) and reuse it word for word in every prompt for the tile. After the creator accepts the first asset, pass it in `referenceImages` for the rest.
23
+ - **Sprites** use `background: "transparent"` with a `.webp` output. A transparent 1024×1024 `.png` is about 750 KB.
24
+ - **Quality.** `low` for drafts, `medium` by default, `high` only for one hero asset. Sizes are `1024x1024` (default), `1536x1024`, and `1024x1536`.
25
+ - The tool returns a small preview. Look at it before you use the file. If the subject is wrong, fix the prompt once.
26
+
27
+ ## Where the file goes
28
+
29
+ `<tileDir>` is the directory that holds the tile's `.poe-tile.json`: `.` for a tile at the workspace root, or for example `chess` for `/workspace/chess/`.
30
+
31
+ - `outputPath` is relative to `/workspace`. Pass `<tileDir>/assets/<name>.webp`.
32
+ - Code and the manifest name the file relative to `<tileDir>`, for example `./assets/hero.webp`.
33
+ - Never write to the workspace root's `assets/` for a nested tile. Files there are outside the tile and do not ship.
34
+ - The extension is required and sets the format: `.webp`, `.png`, `.jpg`, or `.jpeg`. Use `.webp` unless you need another format.
35
+ - The tool replaces a file that already exists at `outputPath`.
36
+
37
+ Treat every generated file as public. Players can read a shipped asset, whatever the source visibility is.
38
+
39
+ ## Loading the image
40
+
41
+ A tile runs in a sandboxed frame from a `blob:` URL, so a relative path such as `<img src="assets/hero.webp">` does not load.
42
+
43
+ **In a prototype**, embed the images as `data:` URLs. Generate a data script with Bash, so the base64 text never passes through your own edits:
44
+
45
+ ```bash
46
+ cd <tileDir> && {
47
+ echo 'globalThis.IMAGES = {'
48
+ for f in assets/*.webp assets/*.png assets/*.jpg assets/*.jpeg; do
49
+ [ -e "$f" ] || continue
50
+ type="${f##*.}"; [ "$type" = jpg ] && type=jpeg
51
+ name="$(basename "${f%.*}")"
52
+ printf ' "%s": "data:image/%s;base64,%s",\n' "$name" "$type" "$(base64 < "$f" | tr -d '\n')"
53
+ done
54
+ echo '};'
55
+ } > assets/images.js
56
+ ```
57
+
58
+ Add `<script src="assets/images.js"></script>` before the module script in `index.html`, and use `IMAGES.hero` as an image `src`. The host inlines that script. It holds data only, so it is the one exception to the prototype's single-script rule. Run the command again after each new image.
59
+
60
+ **In an integrated tile** (a Vite project), import each file with `?url`. The scaffold's tsconfig lists `vite/client` in `compilerOptions.types`, which types the import; if a tile's tsconfig lacks it, add it there instead of suppressing the error:
61
+
62
+ ```typescript
63
+ import heroUrl from "../../assets/hero.webp?url";
64
+ ```
65
+
66
+ Adjust the relative path from the importing file to `<tileDir>/assets/`. Set `build.assetsInlineLimit` to `10 * 1024 * 1024` in `vite.config.ts` if the project does not set it already, so the image is inlined into the bundle. Do not use `Poe.bundle.loadAsset` for these files: `<tileDir>/assets/` is outside the Vite root, so they are not in the runtime bundle.
67
+
68
+ **When a prototype becomes an integrated tile**, copy its image files from `assets/` into the new tile's `assets/`, load them with `?url` imports, and do not carry `assets/images.js` over.
69
+
70
+ ## Limits
71
+
72
+ - The runtime bundle is at most 52,428,800 bytes. A `medium` 1024×1024 webp is about 64 KB.
73
+ - `profilePicture` is at most 524,288 bytes.
74
+ - The prompt is at most 32,768 UTF-8 bytes.
75
+
76
+ ## References
77
+
78
+ Pass as a reference only an image this tool generated, or an image the creator explicitly asked you to use as a reference in this request. A workspace image may be something the creator uploaded, and a reference sends it to the image provider.
79
+
80
+ - At most 4 references. Any reference makes the call an edit.
81
+ - Each is a png, webp, or jpeg of at most 2,097,152 bytes on disk.
82
+ - All references together are at most 8,388,608 bytes once base64 encoded, which is about 6,291,456 bytes on disk.
83
+ - Downscale or drop references to fit.
84
+
85
+ ## Cost, limits, and errors
86
+
87
+ - Each call costs money. A creator has 10,000 image requests per UTC day across all sessions, and failed and refused requests count.
88
+ - Do not regenerate to fish for a slightly better result.
89
+ - When you need several images, send their calls together, at most 10 calls in one response. 2 calls run at a time and up to 8 wait in a queue. A call over that fails with `busy`, so send more than 10 images in groups, each group after the last one finishes. A call also fails with `busy` when it waits more than 21 minutes; send it again after the first calls finish. Send a call alone only when a later call needs its result, such as the first asset that the others use in `referenceImages`.
90
+ - Every error names a code and says whether to retry. Follow it, and never retry more than once. A call that failed with `busy` was not sent, so sending it again is not a retry.
91
+ - After `safety_blocked`, the provider's safety system refused the prompt or a reference image. Do not send that prompt or those references again, and do not reword the prompt to ask for the same content. Tell the creator. Make at most one more call, and only for different image content.
92
+ - After `image_cap_reached`, do not call the tool again today. Draw with code, and tell the creator.
93
+ - After `spend_cap_reached`, do not call the tool again before the reset that the error names. Draw with code, and tell the creator.
94
+
95
+ ## Icon
96
+
97
+ A tile with platform integration gets its icon before the creator can reach public listing, so the preview they open already shows it. Run this section at each of these points:
98
+
99
+ - **Before you end any turn that invites public listing**, such as the handover of a tile with platform integration. When you integrate a prototype, run it in staging before `promote_conversion`, with `<tileDir>` the staging directory (for example `.staging/chess`).
100
+ - **In `publish`**, before `request_listing`.
101
+
102
+ It keeps an adequate icon, so after the first run it usually generates nothing. A prototype gets no icon from this section: skip it when `<tileDir>` itself holds a `.poe-prototype` marker. A staging candidate during integration holds none, so it gets one. Decide from the workspace only, never from memory of earlier turns, so compaction or a new session cannot change the answer. This section never blocks a turn or a listing.
103
+
104
+ `profilePicture` resolves against `<tileDir>`, so inspect `<tileDir>/<profilePicture>` with `file <path>`. `file` prints the format for PNG, JPEG, and WebP. It prints the dimensions only for PNG, JPEG, and lossy (VP8) WebP; it prints no dimensions for lossless (VP8L) or extended (VP8X: alpha, metadata, or animation) WebP. "Valid" means PNG, JPEG, or WebP, at most 524,288 bytes, and readable.
105
+
106
+ | `profilePicture` is | Action | If generation fails or stays over 524,288 bytes |
107
+ | --- | --- | --- |
108
+ | an `https://` URL | Keep it. Do not generate. | — |
109
+ | a valid local image, shorter side ≥ 256 px | Keep it. Do not generate. | — |
110
+ | a valid local image whose dimensions `file` does not print (e.g. an alpha WebP) | Keep it. Do not generate. | — |
111
+ | a valid local image, shorter side < 256 px (e.g. the 64×64 scaffold placeholder) | Generate. | Keep the old value. It is valid, so listing still succeeds. |
112
+ | absent, or an empty string | Generate. | Leave it absent. Remove an empty-string key, which the CLI rejects. |
113
+ | a local path that is missing, unreadable, not a PNG, JPEG, or WebP, or over 524,288 bytes | Generate. | **Remove the key.** Listing would fail on it, and listing must not block. |
114
+
115
+ When the table says generate, use the recipe below. Never generate into the file that `profilePicture` names: a small valid icon there is the fallback, and the tool replaces its output path. Every `outputPath` is `/workspace`-relative, so it carries the `<tileDir>/` prefix.
116
+
117
+ 1. Generate into `<tileDir>/assets/icon-candidate.webp`.
118
+ 2. If the candidate is over 524,288 bytes, regenerate it once at `low` quality and check again.
119
+ 3. If the candidate is within the limit, `mv` it to `<tileDir>/assets/icon.webp` and set `profilePicture` to `./assets/icon.webp`.
120
+ 4. Otherwise, and on any tool error or when the `generate_image` tool is absent, delete `<tileDir>/assets/icon-candidate.webp` if it exists, so an oversized file does not ship. Take the failure column's action, and say so in one sentence. Never change the old icon file's bytes.
121
+
122
+ ### Recipe
123
+
124
+ - 1024×1024, `.webp`, `medium` quality, `background: "opaque"`. An alpha icon breaks the full-bleed rule, and this section cannot measure an alpha WebP later.
125
+ - The art fills the square: no rounded corners, no border, no transparent margin, no text. Do not ask for an "app icon"; the model then draws rounded-rectangle chrome itself.
126
+ - A bold silhouette that reads at 48 px.
127
+ - Colors and subject come from the tile's own code and the conversation.
128
+ - **No reference images.** A workspace image may be something the creator uploaded, and the icon must not send it to the image provider.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: one-shot
3
+ description: Build directly on the Joiner platform when the creator explicitly types /one-shot to skip the default prototype-first workflow. If a prototype already exists, integrate it through the prototype workflow instead of replacing it.
4
+ allowed-tools: Bash, Glob, Grep, Read, Edit, Write
5
+ user-invocable: true
6
+ ---
7
+
8
+ # One-shot
9
+
10
+ The creator explicitly chose to build with platform integration from the start. Workflow selection is complete. Locate existing work as part of implementation, then start building; do not add a workflow-selection step to the plan or announce a chosen path. Progress updates should describe what you are building.
11
+
12
+ If a `.poe-prototype` marker already exists, or platform integration is already in progress, preserve that work. Read `prototype` and follow its **Integrate with Joiner** section, including `begin_conversion` and `promote_conversion`. This command authorizes integration, not deleting the prototype or bypassing its checkpoint and promotion process.
13
+
14
+ If a `.poe-tile.json` manifest exists without a prototype marker, continue in that existing tile. Follow `tile-creator` and `synced-store` to implement the requested changes in place; do not scaffold a replacement project.
15
+
16
+ Only scaffold when the workspace is empty. Follow `tile-creator` and `synced-store` to implement the requested tile with saved progress, shared state, and multiplayer where appropriate. If other project files exist without a manifest or marker, read and preserve them as you implement the request.
17
+
18
+ Do not create a `.poe-prototype` marker or spend a turn building a separate prototype. The host's preview and public-listing rules still apply.
19
+
20
+ If the creator has supplied no tile request yet, ask what they want to build and keep the direct workflow for their answer. If the conversation shows a `/help-me-build` interview the creator has not confirmed yet, continue the interview and keep the direct workflow for the design they confirm.
21
+
22
+ To build directly on Joiner but defer `tile-creator`'s definition of done until the tile is ready to publish, the creator types `/platform-prototype` instead; that skill carries the deferral rules.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: platform-prototype
3
+ description: Build a small real Joiner platform preview with saved progress, multiplayer and social integration. Use when the creator explicitly types /platform-prototype. Defer optional polish until readiness; preserve and integrate an existing prototype through its conversion workflow.
4
+ allowed-tools: Bash, Glob, Grep, Read, Edit, Write
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Platform prototype
9
+
10
+ Build the requested interaction with real platform integration, then finish. During fast iteration, this first-preview contract replaces the broad implementation and prerequisite-reading requirements of `tile-creator` and `synced-store`. Their full workflow applies at readiness. The host's publishing rules always apply.
11
+
12
+ ## Starting work
13
+
14
+ Workflow selection is complete. Inspect the workspace and preserve existing work. If a `.poe-prototype` marker exists or conversion is in progress, read `prototype` and follow its **Integrate with Joiner** section, including `begin_conversion` and `promote_conversion`. Never replace the prototype or bypass promotion; fast iteration applies from the turn after the integrated tile has published once.
15
+
16
+ With an existing `.poe-tile.json`, edit in place; do not scaffold a replacement project. Preserve other project files. Only scaffold when the workspace is empty. Do not create a `.poe-prototype` marker. If no tile was requested, ask what to build. If the conversation shows a `/help-me-build` interview the creator has not confirmed yet, continue the interview and use this workflow for the design they confirm.
17
+
18
+ Read the [scaffolding reference's Step 1](../tile-creator/references/scaffolding-a-new-app.md#step-1-scaffold) only when creating a project. Use the host's handle instructions, explicit template and project directory; preserve the scaffold's SDK pin, configuration and checks.
19
+
20
+ ## Implementation references
21
+
22
+ Read the [platform integration reference](../tile-creator/references/platform-integration.md) once before implementation. It combines the multiplayer API recipe's sections 1–5, schema/bindings and native results, with exact call shapes. These are exact API examples, not additional feature requests. Resolve paths relative to this installed skill's directory in the Skills catalog.
23
+
24
+ Use documented signatures directly. Inspect the pinned SDK only for an uncovered capability, blocking ambiguity or concrete type/runtime discrepancy; scope the lookup to that symbol. Other references remain available when needed, including migrations for changes to persisted schemas and private/server-only storage for secrets. Do not activate a reference's broad prerequisite reading during fast iteration.
25
+
26
+ After resolving blocking gaps, batch writes to distinct files whose contents are already determined in the same tool-call response. A successful write acknowledgment alone need not trigger another model response. Keep dependent work sequential, split for new information or errors.
27
+
28
+ ## First-preview contract
29
+
30
+ Implement the complete requested rules, legal actions, waiting/turn/outcome states and usable continuation.
31
+
32
+ For a game, teach the next move with a short hint at the point of action, and add a `?` button in the top-right corner that opens a "How to play" panel: the goal, each control named by its gesture, and how a round scores or ends. Never open the panel automatically or require it before the first move.
33
+
34
+ Apply the seat, turn, score and round requirements to tiles that have those concepts. Do not add them to tiles that do not. Games with completed rounds must retain native results and their leaderboard backing. Preserve these behaviors:
35
+
36
+ - Persist gameplay, seats, phase, turns, outcomes and round identity in synced-store. Validate the authenticated actor, membership, role, phase, expected round and action legality in the committing mutator. Reject stale/replayed actions without duplicate effects. Generate IDs/times at the caller; keep secrets private. Use the migration reference before changing persisted shapes.
37
+ - Create Poe/store once, show loading immediately, await `waitForBootstrap()` and render through live subscriptions. Never reset progress on mount/reload. Keep temporary presentation state in memory; browser storage APIs are unavailable inside the tile iframe.
38
+ - Initialize seats deterministically in membership hooks shared by client and backend. Use active `$users` and names/avatars from `$userInfo`, with readable fallbacks and profile links. Preserve offline seats/progress. Explicit removal must safely repair or visibly pause play, with an authorized recovery path. Provide the host member picker for empty seats, including room members who have not opened the tile.
39
+ - Every meaningful accepted shared action bumps the actor through `notifyActivity` with `recency: "bump"` and a useful preview; preferences and no-ops do not. Set the next player's platform turn and clear turns on finished/paused paths. Preserve SDK unread defaults and avoid duplicate attention.
40
+ - Emit completion activity, context-rich end pushes to relevant other participants, and the appropriate containing-chat announcement once per accepted terminal transition. Include push recipients in activity fan-out; an actor-only call cannot push an opponent.
41
+ - Keep native `Poe.room.tileEnd` and its minimal leaderboard backing. Show the decisive in-game result first, open results once for the current finished round, and cancel/dismiss obsolete results when another player restarts. Only `playAgain` requests an authorized expected-round restart. Every client follows the shared round; closing results does not restart or automatically reopen them. Retain retry after an opening failure.
42
+ - Keep keyboard/touch accessibility, mobile/desktop fit, legible light/dark themes, safe areas, scrolling, native gesture handling and visible errors. Choose the tile's visual identity; no shared visual shell is required. Prefer existing Tailwind utilities where configured, otherwise use the scaffold's CSS.
43
+
44
+ Defer unrequested extra modes, computer opponents, sound/haptics systems, decorative animations, character polish, walkthroughs beyond those hints and that panel, and lifetime/season/streak/achievement systems until readiness. Implement anything explicitly requested or intrinsic to the interaction. These first-preview deferrals apply only to this workflow.
45
+
46
+ ## Fast iteration
47
+
48
+ Finish metadata: follow [Step 5.5's text metadata](../tile-creator/references/scaffolding-a-new-app.md#step-55-fill-in-app-metadata), set truthful player range and instancing, update README and write `.poe-tile-change-summary` beside the manifest as the host requires. Preserve the handle and SDK pin. Defer listing media until readiness.
49
+
50
+ A turn whose build fails publishes no preview; fix build errors before finishing.
51
+
52
+ After the summary, finish for automatic unlisted publication. Invite changes or the readiness pass; do not ask permission for the automatic preview. Do not offer public listing before the readiness pass.
53
+
54
+ ## Readiness pass
55
+
56
+ When the creator says ready, accepts the tile as finished or requests public listing, read full `tile-creator` and `synced-store` and complete their deferred feature requirements. This authorizes the readiness pass, not the listing itself.
57
+
58
+ Finish listing fields/assets, including the profile picture. In a Creator session, where the `generate_image` tool is present, make it with the `image-generation` skill's **Icon** section.
59
+
60
+ Fixes may span turns, each ending in a summary and preview. Follow the host's accepted-title, rename and `request_listing` rules. After readiness the full workflow applies unless `/platform-prototype` is selected again. Across compaction/restarts, continue deferrals only while the creator has not requested readiness.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: platform-subagent
3
+ description: Build a single-device prototype while a second agent integrates it with the Joiner platform in the background. Use when the creator explicitly types /platform-subagent. Follows the normal prototype workflow; asking to integrate hands the staged tile over through begin_conversion.
4
+ allowed-tools: Bash, Glob, Grep, Read, Edit, Write
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Prototype with a background integration agent
9
+
10
+ The creator chose the prototype workflow with a background integration agent. Follow [prototype](../prototype/SKILL.md) as inlined, reading it first if it is not already in context. Nothing about how you build or edit the prototype changes.
11
+
12
+ A second agent stages the integrated tile under `/workspace/.staging`. Never read, edit or mention that directory's contents; it is not yours until `begin_conversion` hands it to you.
13
+
14
+ When the creator asks to integrate with Joiner, call `begin_conversion` as the prototype skill says. Its result tells you what was staged; read the notes it names before anything else, and continue from there. When the result says the candidate is ready, do what the result says and promote it without re-reading references. Do not scaffold over a candidate that exists; scaffold only if the result says the candidate is unusable or you find it so.
15
+
16
+ If no platform notice about a background agent appears after your first preview, this is an ordinary prototype session, and nothing here applies.