@nodetool-ai/agents 0.8.1 → 0.8.2

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 (361) hide show
  1. package/dist/.nodetool-build-stamp +1 -1
  2. package/dist/analysis/audio-dsp.d.ts +3 -2
  3. package/dist/analysis/audio-dsp.d.ts.map +1 -1
  4. package/dist/analysis/audio-dsp.js +11 -8
  5. package/dist/analysis/audio-dsp.js.map +1 -1
  6. package/dist/analysis/media-decode.d.ts +13 -0
  7. package/dist/analysis/media-decode.d.ts.map +1 -1
  8. package/dist/analysis/media-decode.js +33 -6
  9. package/dist/analysis/media-decode.js.map +1 -1
  10. package/dist/author-graph.d.ts +2 -3
  11. package/dist/author-graph.d.ts.map +1 -1
  12. package/dist/author-graph.js +3 -5
  13. package/dist/author-graph.js.map +1 -1
  14. package/dist/browser-gate.d.ts +2 -2
  15. package/dist/browser-gate.js +2 -2
  16. package/dist/capabilities/GamePublishRequest.d.ts +14 -0
  17. package/dist/capabilities/GamePublishRequest.d.ts.map +1 -0
  18. package/dist/capabilities/GamePublishRequest.js +2 -0
  19. package/dist/capabilities/GamePublishRequest.js.map +1 -0
  20. package/dist/capabilities/adapters.d.ts +4 -13
  21. package/dist/capabilities/adapters.d.ts.map +1 -1
  22. package/dist/capabilities/adapters.js +9 -14
  23. package/dist/capabilities/adapters.js.map +1 -1
  24. package/dist/capabilities/agent-activity.d.ts +27 -0
  25. package/dist/capabilities/agent-activity.d.ts.map +1 -0
  26. package/dist/capabilities/agent-activity.js +103 -0
  27. package/dist/capabilities/agent-activity.js.map +1 -0
  28. package/dist/capabilities/agentic-storyboard-finish.d.ts +67 -0
  29. package/dist/capabilities/agentic-storyboard-finish.d.ts.map +1 -0
  30. package/dist/capabilities/agentic-storyboard-finish.js +1321 -0
  31. package/dist/capabilities/agentic-storyboard-finish.js.map +1 -0
  32. package/dist/capabilities/agents.d.ts +5 -2
  33. package/dist/capabilities/agents.d.ts.map +1 -1
  34. package/dist/capabilities/agents.js +14 -4
  35. package/dist/capabilities/agents.js.map +1 -1
  36. package/dist/capabilities/agents.specs.d.ts +3 -0
  37. package/dist/capabilities/agents.specs.d.ts.map +1 -1
  38. package/dist/capabilities/agents.specs.js +71 -1
  39. package/dist/capabilities/agents.specs.js.map +1 -1
  40. package/dist/capabilities/analysis.d.ts.map +1 -1
  41. package/dist/capabilities/analysis.js +33 -22
  42. package/dist/capabilities/analysis.js.map +1 -1
  43. package/dist/capabilities/analysis.specs.js +2 -2
  44. package/dist/capabilities/analysis.specs.js.map +1 -1
  45. package/dist/capabilities/apps.d.ts.map +1 -1
  46. package/dist/capabilities/apps.js +5 -3
  47. package/dist/capabilities/apps.js.map +1 -1
  48. package/dist/capabilities/args.d.ts +2 -5
  49. package/dist/capabilities/args.d.ts.map +1 -1
  50. package/dist/capabilities/args.js +2 -5
  51. package/dist/capabilities/args.js.map +1 -1
  52. package/dist/capabilities/browser.d.ts +1 -1
  53. package/dist/capabilities/browser.js +1 -1
  54. package/dist/capabilities/browser.specs.d.ts +1 -1
  55. package/dist/capabilities/browser.specs.js +1 -1
  56. package/dist/capabilities/code.d.ts +5 -0
  57. package/dist/capabilities/code.d.ts.map +1 -1
  58. package/dist/capabilities/code.js +128 -89
  59. package/dist/capabilities/code.js.map +1 -1
  60. package/dist/capabilities/errors.d.ts +19 -0
  61. package/dist/capabilities/errors.d.ts.map +1 -0
  62. package/dist/capabilities/errors.js +109 -0
  63. package/dist/capabilities/errors.js.map +1 -0
  64. package/dist/capabilities/errors.specs.d.ts +11 -0
  65. package/dist/capabilities/errors.specs.d.ts.map +1 -0
  66. package/dist/capabilities/errors.specs.js +100 -0
  67. package/dist/capabilities/errors.specs.js.map +1 -0
  68. package/dist/capabilities/example-timelines.d.ts.map +1 -1
  69. package/dist/capabilities/example-timelines.js +52 -10
  70. package/dist/capabilities/example-timelines.js.map +1 -1
  71. package/dist/capabilities/example-timelines.specs.d.ts +1 -0
  72. package/dist/capabilities/example-timelines.specs.d.ts.map +1 -1
  73. package/dist/capabilities/example-timelines.specs.js +21 -3
  74. package/dist/capabilities/example-timelines.specs.js.map +1 -1
  75. package/dist/capabilities/finish-storyboard.d.ts +5 -0
  76. package/dist/capabilities/finish-storyboard.d.ts.map +1 -0
  77. package/dist/capabilities/finish-storyboard.js +278 -0
  78. package/dist/capabilities/finish-storyboard.js.map +1 -0
  79. package/dist/capabilities/game-asset-source.js +1 -1
  80. package/dist/capabilities/game-asset-source.js.map +1 -1
  81. package/dist/capabilities/game.d.ts +14 -2
  82. package/dist/capabilities/game.d.ts.map +1 -1
  83. package/dist/capabilities/game.js +209 -39
  84. package/dist/capabilities/game.js.map +1 -1
  85. package/dist/capabilities/game.specs.d.ts +2 -0
  86. package/dist/capabilities/game.specs.d.ts.map +1 -1
  87. package/dist/capabilities/game.specs.js +25 -11
  88. package/dist/capabilities/game.specs.js.map +1 -1
  89. package/dist/capabilities/game3d.d.ts +17 -0
  90. package/dist/capabilities/game3d.d.ts.map +1 -0
  91. package/dist/capabilities/game3d.js +433 -0
  92. package/dist/capabilities/game3d.js.map +1 -0
  93. package/dist/capabilities/gate-from-context.d.ts +1 -1
  94. package/dist/capabilities/gate-from-context.js +1 -1
  95. package/dist/capabilities/generations.d.ts +2 -0
  96. package/dist/capabilities/generations.d.ts.map +1 -1
  97. package/dist/capabilities/generations.js +7 -2
  98. package/dist/capabilities/generations.js.map +1 -1
  99. package/dist/capabilities/index.d.ts +2 -2
  100. package/dist/capabilities/index.d.ts.map +1 -1
  101. package/dist/capabilities/index.js +2 -2
  102. package/dist/capabilities/index.js.map +1 -1
  103. package/dist/capabilities/invoke.d.ts +14 -25
  104. package/dist/capabilities/invoke.d.ts.map +1 -1
  105. package/dist/capabilities/invoke.js +72 -35
  106. package/dist/capabilities/invoke.js.map +1 -1
  107. package/dist/capabilities/jobs.d.ts.map +1 -1
  108. package/dist/capabilities/jobs.js +47 -3
  109. package/dist/capabilities/jobs.js.map +1 -1
  110. package/dist/capabilities/jobs.specs.d.ts.map +1 -1
  111. package/dist/capabilities/jobs.specs.js +3 -1
  112. package/dist/capabilities/jobs.specs.js.map +1 -1
  113. package/dist/capabilities/js-scripts.d.ts +19 -1
  114. package/dist/capabilities/js-scripts.d.ts.map +1 -1
  115. package/dist/capabilities/js-scripts.js +109 -2
  116. package/dist/capabilities/js-scripts.js.map +1 -1
  117. package/dist/capabilities/js-scripts.specs.d.ts +2 -0
  118. package/dist/capabilities/js-scripts.specs.d.ts.map +1 -1
  119. package/dist/capabilities/js-scripts.specs.js +50 -0
  120. package/dist/capabilities/js-scripts.specs.js.map +1 -1
  121. package/dist/capabilities/lazy-tool.d.ts +23 -24
  122. package/dist/capabilities/lazy-tool.d.ts.map +1 -1
  123. package/dist/capabilities/lazy-tool.js +29 -35
  124. package/dist/capabilities/lazy-tool.js.map +1 -1
  125. package/dist/capabilities/legacy-tools.d.ts +15 -0
  126. package/dist/capabilities/legacy-tools.d.ts.map +1 -0
  127. package/dist/capabilities/legacy-tools.js +98 -0
  128. package/dist/capabilities/legacy-tools.js.map +1 -0
  129. package/dist/capabilities/media.d.ts +0 -9
  130. package/dist/capabilities/media.d.ts.map +1 -1
  131. package/dist/capabilities/media.js +301 -260
  132. package/dist/capabilities/media.js.map +1 -1
  133. package/dist/capabilities/models.d.ts +2 -2
  134. package/dist/capabilities/models.d.ts.map +1 -1
  135. package/dist/capabilities/models.js +5 -3
  136. package/dist/capabilities/models.js.map +1 -1
  137. package/dist/capabilities/registry.d.ts +2 -0
  138. package/dist/capabilities/registry.d.ts.map +1 -1
  139. package/dist/capabilities/registry.js +28 -0
  140. package/dist/capabilities/registry.js.map +1 -1
  141. package/dist/capabilities/run-agent.d.ts +19 -0
  142. package/dist/capabilities/run-agent.d.ts.map +1 -0
  143. package/dist/capabilities/run-agent.js +183 -0
  144. package/dist/capabilities/run-agent.js.map +1 -0
  145. package/dist/capabilities/runs.d.ts +9 -0
  146. package/dist/capabilities/runs.d.ts.map +1 -0
  147. package/dist/capabilities/runs.js +46 -0
  148. package/dist/capabilities/runs.js.map +1 -0
  149. package/dist/capabilities/runs.specs.d.ts +39 -0
  150. package/dist/capabilities/runs.specs.d.ts.map +1 -0
  151. package/dist/capabilities/runs.specs.js +52 -0
  152. package/dist/capabilities/runs.specs.js.map +1 -0
  153. package/dist/capabilities/scripts.d.ts.map +1 -1
  154. package/dist/capabilities/scripts.js +11 -5
  155. package/dist/capabilities/scripts.js.map +1 -1
  156. package/dist/capabilities/sketches.d.ts.map +1 -1
  157. package/dist/capabilities/sketches.js +4 -2
  158. package/dist/capabilities/sketches.js.map +1 -1
  159. package/dist/capabilities/skills.d.ts.map +1 -1
  160. package/dist/capabilities/skills.js +22 -2
  161. package/dist/capabilities/skills.js.map +1 -1
  162. package/dist/capabilities/storyboard-layout-check.d.ts +33 -0
  163. package/dist/capabilities/storyboard-layout-check.d.ts.map +1 -0
  164. package/dist/capabilities/storyboard-layout-check.js +229 -0
  165. package/dist/capabilities/storyboard-layout-check.js.map +1 -0
  166. package/dist/capabilities/storyboard-measured-sources.d.ts +10 -0
  167. package/dist/capabilities/storyboard-measured-sources.d.ts.map +1 -0
  168. package/dist/capabilities/storyboard-measured-sources.js +67 -0
  169. package/dist/capabilities/storyboard-measured-sources.js.map +1 -0
  170. package/dist/capabilities/storyboard-review-times.d.ts +4 -0
  171. package/dist/capabilities/storyboard-review-times.d.ts.map +1 -0
  172. package/dist/capabilities/storyboard-review-times.js +39 -0
  173. package/dist/capabilities/storyboard-review-times.js.map +1 -0
  174. package/dist/capabilities/storyboards.d.ts +2 -18
  175. package/dist/capabilities/storyboards.d.ts.map +1 -1
  176. package/dist/capabilities/storyboards.js +315 -94
  177. package/dist/capabilities/storyboards.js.map +1 -1
  178. package/dist/capabilities/storyboards.specs.d.ts +3 -0
  179. package/dist/capabilities/storyboards.specs.d.ts.map +1 -1
  180. package/dist/capabilities/storyboards.specs.js +42 -3
  181. package/dist/capabilities/storyboards.specs.js.map +1 -1
  182. package/dist/capabilities/timeline-bridge.d.ts +359 -0
  183. package/dist/capabilities/timeline-bridge.d.ts.map +1 -0
  184. package/dist/capabilities/timeline-bridge.js +1016 -0
  185. package/dist/capabilities/timeline-bridge.js.map +1 -0
  186. package/dist/capabilities/timeline-clip-frames.d.ts +17 -0
  187. package/dist/capabilities/timeline-clip-frames.d.ts.map +1 -0
  188. package/dist/capabilities/timeline-clip-frames.js +84 -0
  189. package/dist/capabilities/timeline-clip-frames.js.map +1 -0
  190. package/dist/capabilities/timeline-media-edit.d.ts +8 -0
  191. package/dist/capabilities/timeline-media-edit.d.ts.map +1 -0
  192. package/dist/capabilities/timeline-media-edit.js +94 -0
  193. package/dist/capabilities/timeline-media-edit.js.map +1 -0
  194. package/dist/capabilities/timeline-native-media.d.ts.map +1 -1
  195. package/dist/capabilities/timeline-native-media.js +40 -0
  196. package/dist/capabilities/timeline-native-media.js.map +1 -1
  197. package/dist/capabilities/timelines.d.ts +64 -4
  198. package/dist/capabilities/timelines.d.ts.map +1 -1
  199. package/dist/capabilities/timelines.js +566 -67
  200. package/dist/capabilities/timelines.js.map +1 -1
  201. package/dist/capabilities/timelines.specs.d.ts +8 -0
  202. package/dist/capabilities/timelines.specs.d.ts.map +1 -1
  203. package/dist/capabilities/timelines.specs.js +173 -8
  204. package/dist/capabilities/timelines.specs.js.map +1 -1
  205. package/dist/capabilities/types.d.ts +3 -1
  206. package/dist/capabilities/types.d.ts.map +1 -1
  207. package/dist/capabilities/types.js.map +1 -1
  208. package/dist/capabilities/ui.d.ts.map +1 -1
  209. package/dist/capabilities/ui.js +24 -2
  210. package/dist/capabilities/ui.js.map +1 -1
  211. package/dist/capabilities/workflows.d.ts.map +1 -1
  212. package/dist/capabilities/workflows.js +53 -26
  213. package/dist/capabilities/workflows.js.map +1 -1
  214. package/dist/capabilities/workflows.specs.d.ts.map +1 -1
  215. package/dist/capabilities/workflows.specs.js +7 -1
  216. package/dist/capabilities/workflows.specs.js.map +1 -1
  217. package/dist/codeact/action-diagnostics.d.ts.map +1 -1
  218. package/dist/codeact/action-diagnostics.js +51 -1
  219. package/dist/codeact/action-diagnostics.js.map +1 -1
  220. package/dist/codeact/codeact-executor.d.ts.map +1 -1
  221. package/dist/codeact/codeact-executor.js +16 -8
  222. package/dist/codeact/codeact-executor.js.map +1 -1
  223. package/dist/codeact/compact-ids.d.ts.map +1 -1
  224. package/dist/codeact/compact-ids.js +5 -1
  225. package/dist/codeact/compact-ids.js.map +1 -1
  226. package/dist/codeact/graph-model.d.ts +1 -1
  227. package/dist/codeact/graph-model.d.ts.map +1 -1
  228. package/dist/codeact/graph-model.js +2 -3
  229. package/dist/codeact/graph-model.js.map +1 -1
  230. package/dist/codeact/nodetool-api.d.ts +1 -1
  231. package/dist/codeact/nodetool-api.d.ts.map +1 -1
  232. package/dist/codeact/nodetool-api.js +202 -284
  233. package/dist/codeact/nodetool-api.js.map +1 -1
  234. package/dist/codeact/tool-api.d.ts +6 -3
  235. package/dist/codeact/tool-api.d.ts.map +1 -1
  236. package/dist/codeact/tool-api.js +22 -15
  237. package/dist/codeact/tool-api.js.map +1 -1
  238. package/dist/evals/codeact-api-cases.d.ts.map +1 -1
  239. package/dist/evals/codeact-api-cases.js +2 -0
  240. package/dist/evals/codeact-api-cases.js.map +1 -1
  241. package/dist/evals/codeact-api-runs.d.ts +3 -0
  242. package/dist/evals/codeact-api-runs.d.ts.map +1 -0
  243. package/dist/evals/codeact-api-runs.js +33 -0
  244. package/dist/evals/codeact-api-runs.js.map +1 -0
  245. package/dist/evals/surfaces/sketch.d.ts +2 -0
  246. package/dist/evals/surfaces/sketch.d.ts.map +1 -1
  247. package/dist/evals/surfaces/sketch.js +11 -3
  248. package/dist/evals/surfaces/sketch.js.map +1 -1
  249. package/dist/evals/surfaces/timeline.d.ts +4 -357
  250. package/dist/evals/surfaces/timeline.d.ts.map +1 -1
  251. package/dist/evals/surfaces/timeline.js +9 -2621
  252. package/dist/evals/surfaces/timeline.js.map +1 -1
  253. package/dist/evals/tool-loop-bridge.d.ts +4 -0
  254. package/dist/evals/tool-loop-bridge.d.ts.map +1 -1
  255. package/dist/evals/tool-loop-bridge.js.map +1 -1
  256. package/dist/evals/tool-loop-eval.d.ts +2 -0
  257. package/dist/evals/tool-loop-eval.d.ts.map +1 -1
  258. package/dist/evals/tool-loop-eval.js +6 -1
  259. package/dist/evals/tool-loop-eval.js.map +1 -1
  260. package/dist/evals/tool-loop-permission.d.ts +1 -15
  261. package/dist/evals/tool-loop-permission.d.ts.map +1 -1
  262. package/dist/evals/tool-loop-permission.js +23 -41
  263. package/dist/evals/tool-loop-permission.js.map +1 -1
  264. package/dist/game-authoring.d.ts +4737 -0
  265. package/dist/game-authoring.d.ts.map +1 -0
  266. package/dist/game-authoring.js +146 -0
  267. package/dist/game-authoring.js.map +1 -0
  268. package/dist/game-code-bake.d.ts +26 -0
  269. package/dist/game-code-bake.d.ts.map +1 -0
  270. package/dist/game-code-bake.js +98 -0
  271. package/dist/game-code-bake.js.map +1 -0
  272. package/dist/game-examples.d.ts +872 -16
  273. package/dist/game-examples.d.ts.map +1 -1
  274. package/dist/game-examples.js +5 -4
  275. package/dist/game-examples.js.map +1 -1
  276. package/dist/index.d.ts +15 -4
  277. package/dist/index.d.ts.map +1 -1
  278. package/dist/index.js +13 -3
  279. package/dist/index.js.map +1 -1
  280. package/dist/js-sandbox-worker/engine.d.ts +4 -0
  281. package/dist/js-sandbox-worker/engine.d.ts.map +1 -0
  282. package/dist/js-sandbox-worker/engine.js +45 -0
  283. package/dist/js-sandbox-worker/engine.js.map +1 -0
  284. package/dist/js-sandbox-worker/host.js +1 -1
  285. package/dist/js-sandbox-worker/host.js.map +1 -1
  286. package/dist/js-sandbox-worker/interpreter.d.ts +1 -1
  287. package/dist/js-sandbox-worker/interpreter.d.ts.map +1 -1
  288. package/dist/js-sandbox-worker/interpreter.js +94 -2
  289. package/dist/js-sandbox-worker/interpreter.js.map +1 -1
  290. package/dist/js-sandbox-worker/worker-entry.d.ts.map +1 -1
  291. package/dist/js-sandbox-worker/worker-entry.js +3 -2
  292. package/dist/js-sandbox-worker/worker-entry.js.map +1 -1
  293. package/dist/js-sandbox.d.ts +2 -0
  294. package/dist/js-sandbox.d.ts.map +1 -1
  295. package/dist/js-sandbox.js +56 -11
  296. package/dist/js-sandbox.js.map +1 -1
  297. package/dist/js-script-app-runner.d.ts +2 -0
  298. package/dist/js-script-app-runner.d.ts.map +1 -1
  299. package/dist/js-script-app-runner.js +8 -3
  300. package/dist/js-script-app-runner.js.map +1 -1
  301. package/dist/js-script-sandbox.d.ts +12 -18
  302. package/dist/js-script-sandbox.d.ts.map +1 -1
  303. package/dist/js-script-sandbox.js +3 -49
  304. package/dist/js-script-sandbox.js.map +1 -1
  305. package/dist/prompts/product-knowledge.d.ts +1 -1
  306. package/dist/prompts/product-knowledge.d.ts.map +1 -1
  307. package/dist/prompts/product-knowledge.js +82 -41
  308. package/dist/prompts/product-knowledge.js.map +1 -1
  309. package/dist/sandbox-pack-resolution.d.ts +21 -0
  310. package/dist/sandbox-pack-resolution.d.ts.map +1 -0
  311. package/dist/sandbox-pack-resolution.js +42 -0
  312. package/dist/sandbox-pack-resolution.js.map +1 -0
  313. package/dist/sandbox-toolbelt.d.ts +3 -1
  314. package/dist/sandbox-toolbelt.d.ts.map +1 -1
  315. package/dist/sandbox-toolbelt.js +8 -2
  316. package/dist/sandbox-toolbelt.js.map +1 -1
  317. package/dist/skill-prompt.d.ts +11 -1
  318. package/dist/skill-prompt.d.ts.map +1 -1
  319. package/dist/skill-prompt.js +17 -6
  320. package/dist/skill-prompt.js.map +1 -1
  321. package/dist/system-skills.d.ts +7 -1
  322. package/dist/system-skills.d.ts.map +1 -1
  323. package/dist/system-skills.js +2 -2
  324. package/dist/system-skills.js.map +1 -1
  325. package/dist/timeline-capture.d.ts +21 -0
  326. package/dist/timeline-capture.d.ts.map +1 -0
  327. package/dist/timeline-capture.js +564 -0
  328. package/dist/timeline-capture.js.map +1 -0
  329. package/dist/timeline-code-bake.d.ts +75 -0
  330. package/dist/timeline-code-bake.d.ts.map +1 -0
  331. package/dist/timeline-code-bake.js +327 -0
  332. package/dist/timeline-code-bake.js.map +1 -0
  333. package/dist/timeline-preview/frames.d.ts +26 -0
  334. package/dist/timeline-preview/frames.d.ts.map +1 -1
  335. package/dist/timeline-preview/frames.js +155 -70
  336. package/dist/timeline-preview/frames.js.map +1 -1
  337. package/dist/tools/base-tool.d.ts +1 -0
  338. package/dist/tools/base-tool.d.ts.map +1 -1
  339. package/dist/tools/base-tool.js +1 -1
  340. package/dist/tools/base-tool.js.map +1 -1
  341. package/dist/tools/builtin-tools.d.ts.map +1 -1
  342. package/dist/tools/builtin-tools.js +13 -0
  343. package/dist/tools/builtin-tools.js.map +1 -1
  344. package/dist/tools/external-capability-tools.d.ts +1 -1
  345. package/dist/tools/external-capability-tools.js +1 -1
  346. package/dist/tools/mcp-tool-support.d.ts +10 -9
  347. package/dist/tools/mcp-tool-support.d.ts.map +1 -1
  348. package/dist/tools/mcp-tool-support.js +14 -13
  349. package/dist/tools/mcp-tool-support.js.map +1 -1
  350. package/dist/tools/mcp-tools.d.ts +6 -4
  351. package/dist/tools/mcp-tools.d.ts.map +1 -1
  352. package/dist/tools/mcp-tools.js +65 -62
  353. package/dist/tools/mcp-tools.js.map +1 -1
  354. package/dist/tools/tool-permissions.d.ts +1 -1
  355. package/dist/tools/tool-permissions.js +1 -1
  356. package/package.json +24 -22
  357. package/dist/capabilities/gate-tools.d.ts +0 -18
  358. package/dist/capabilities/gate-tools.d.ts.map +0 -1
  359. package/dist/capabilities/gate-tools.js +0 -66
  360. package/dist/capabilities/gate-tools.js.map +0 -1
  361. package/dist/tsconfig.tests.tmp.tsbuildinfo +0 -1
@@ -1,15 +1,20 @@
1
1
  import { createHash, randomUUID } from "node:crypto";
2
2
  import { mkdtemp, readFile, readdir, rm } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
- import { getManagedWorkspaceDir, managedWorkspaceKey, workspaceStorageKind } from "@nodetool-ai/config";
4
+ import { createLogger, getManagedWorkspaceDir, managedWorkspaceKey, workspaceStorageKind } from "@nodetool-ai/config";
5
5
  import { AmbiguousGameIdError, Asset, Game, Prediction, Project, Workspace } from "@nodetool-ai/models";
6
- import { gameAssetBinding, gameDocument, gameInputFrame, shortResourceId } from "@nodetool-ai/protocol";
7
- import { autoplayNativeGame, MAX_GAME_ROUTE_TICKS, createScriptedGameSession, createTopDownRoomGame, validateGame, gameDocumentOp, GameOpError } from "@nodetool-ai/game-runtime";
6
+ import { anyGameAssetBinding as gameAssetBinding, gameAssetBinding as legacyAssetBinding, gameAssetBinding3D, anyGameDocument as gameDocument, gameInputFrame, shortResourceId } from "@nodetool-ai/protocol";
7
+ import { autoplayNativeGame, MAX_GAME_ROUTE_TICKS, createScriptedGameSession, createTopDownRoomGame, createNative3DGame, decodePreparedGameCollider3D, validateAnyGame, trackGameAuthoringEdits, anyGameDocumentOp as gameDocumentOp, GameOpError } from "@nodetool-ai/game-runtime";
8
8
  import { workspaceFromRow } from "@nodetool-ai/execution/service";
9
9
  import { assetKeyCandidates, assetObjectKey } from "@nodetool-ai/storage";
10
+ import { gameOutline3D, inputFrames3D, playtestGame3D, captureFrames3D, colliderBinding3D, stageModelGameAsset3D } from "./game3d.js";
10
11
  import { gameSpecs } from "./game.specs.js";
11
12
  import { persistOutput } from "../tools/asset-persist.js";
12
13
  import { getExampleGameBundle, installExampleGameAssets, listExampleGames } from "../game-examples.js";
14
+ import { previewGameAuthoring, applyGameAuthoring } from "../game-authoring.js";
15
+ import { gameDocumentDigest } from "../game-code-bake.js";
16
+ import { previewGameAuthoringSpec, applyGameAuthoringSpec } from "./game.specs.js";
17
+ const log = createLogger("capabilities.game");
13
18
  const MAX_PLAYTEST_TICKS = MAX_GAME_ROUTE_TICKS;
14
19
  const MAX_CAPTURE_FRAMES = 8;
15
20
  const MAX_BUILD_ASSETS = 128;
@@ -24,7 +29,9 @@ const MEDIA_EXTENSIONS = {
24
29
  "audio/ogg": "ogg",
25
30
  "audio/mpeg": "mp3",
26
31
  "font/ttf": "ttf",
27
- "font/otf": "otf"
32
+ "font/otf": "otf",
33
+ "model/gltf-binary": "glb",
34
+ "application/json": "json"
28
35
  };
29
36
  function userId(run) {
30
37
  return run.context.userId ?? null;
@@ -102,6 +109,9 @@ async function readSource(workspace, game, source, revision) {
102
109
  return draft?.document ?? null;
103
110
  }
104
111
  function outline(document) {
112
+ if (document.schemaVersion === 3) {
113
+ return gameOutline3D(document);
114
+ }
105
115
  return {
106
116
  settings: {
107
117
  schemaVersion: document.schemaVersion,
@@ -308,8 +318,8 @@ function validateSource(source, gameId, revision) {
308
318
  const parsed = gameDocument.safeParse(source);
309
319
  if (!parsed.success)
310
320
  return { error: parsed.error.message };
311
- const result = validateGame({ ...parsed.data, id: gameId, revision });
312
- return result.document ?? { error: result.errors.join("; ") };
321
+ const result = validateAnyGame({ ...parsed.data, id: gameId, revision });
322
+ return result.valid ? result.document : { error: result.diagnostics.map((issue) => `${issue.code} ${issue.path.join(".")}: ${issue.message}`).join("; ") };
313
323
  }
314
324
  function summary(game) {
315
325
  return {
@@ -319,25 +329,52 @@ function summary(game) {
319
329
  workspace_id: game.workspace_id
320
330
  };
321
331
  }
322
- async function publish(user, game, baseRevision, source, message) {
332
+ async function publish(user, game, request) {
333
+ const baseRevision = request.base_revision;
323
334
  if (game.current_revision !== baseRevision)
324
335
  return { error: "Game was modified concurrently", current_revision: game.current_revision };
325
336
  const revision = randomUUID().replace(/-/g, "");
326
- const document = validateSource(source, game.id, revision);
327
- if ("error" in document)
328
- return document;
329
337
  const workspace = await workspaceOf(user, game);
330
338
  if (!workspace)
331
339
  return { error: "Game workspace is unavailable" };
332
340
  const draft = await Game.readDraft(user, game.id, workspace);
333
341
  if (!draft)
334
342
  return { error: "Game draft not found" };
343
+ const draftToken = request.document ? request.base_updated_at : draft.game.draft_updated_at;
344
+ if (draftToken !== draft.game.draft_updated_at) {
345
+ return { error: "Game draft was modified concurrently" };
346
+ }
347
+ let document = validateSource(request.document ?? draft.document, game.id, revision);
348
+ if ("error" in document)
349
+ return document;
350
+ if ((document.schemaVersion === 3) !== (draft.document.schemaVersion === 3)) {
351
+ return { error: "A game cannot change dimension" };
352
+ }
353
+ if (gameDocumentDigest(document.authoring) !== gameDocumentDigest(draft.document.authoring)) {
354
+ return { error: "Retained authoring metadata must be updated through construction preview and apply" };
355
+ }
356
+ document = trackGameAuthoringEdits(draft.document, document);
357
+ const checked = validateAnyGame(document);
358
+ if (!checked.valid) {
359
+ return { error: "Game publication rejected", diagnostics: checked.diagnostics };
360
+ }
335
361
  await workspace.write(revisionPath(game, revision), JSON.stringify(document), "application/json");
336
- const updated = await Game.publish(user, game.id, baseRevision, revision, draft.game.draft_updated_at, workspace, message);
337
- if (!updated)
362
+ const updated = await Game.publish(user, game.id, baseRevision, revision, draftToken, workspace, request.message);
363
+ if (!updated) {
364
+ try {
365
+ await workspace.delete(revisionPath(game, revision));
366
+ }
367
+ catch (error) {
368
+ log.error("Losing game publication revision cleanup failed", { gameId: game.id, revision, error: String(error) });
369
+ }
338
370
  return { error: "Game was modified concurrently" };
339
- await workspace.write(`${game.source_root}/drafts/${encodeURIComponent(updated.draft_updated_at)}.json`, JSON.stringify(document), "application/json");
340
- await workspace.write(`${game.source_root}/draft.json`, JSON.stringify(document), "application/json");
371
+ }
372
+ try {
373
+ await Game.pruneRevisionFiles(user, game.id, workspace);
374
+ }
375
+ catch (error) {
376
+ log.error("Game publication revision cleanup failed", { gameId: game.id, error: String(error) });
377
+ }
341
378
  return { game: summary(updated), document };
342
379
  }
343
380
  const create = {
@@ -349,14 +386,26 @@ const create = {
349
386
  if (!user || typeof projectId !== "string" || typeof name !== "string" || !name.trim()) {
350
387
  return { error: "project_id and name are required in a user session" };
351
388
  }
352
- const created = await createNativeGame(user, projectId, name.trim());
389
+ const dimension = args["dimension"];
390
+ if (dimension !== undefined && dimension !== "2d" && dimension !== "3d") {
391
+ return { error: "dimension must be 2d or 3d" };
392
+ }
393
+ if (args["template"] !== undefined && args["template"] !== "exploration" && args["template"] !== "topdown") {
394
+ return { error: "Unknown native game template" };
395
+ }
396
+ if (args["template"] !== undefined && args["template"] !== (dimension === "3d" ? "exploration" : "topdown")) {
397
+ return { error: "Template does not match the requested dimension" };
398
+ }
399
+ const created = await createNativeGame(user, projectId, name.trim(), undefined, dimension ?? "2d");
353
400
  return "error" in created
354
401
  ? created
355
402
  : { game: summary(created.game), document: created.document };
356
403
  }
357
404
  };
358
- /** Shared by explicit game creation and the guided asset workflow builder. */
359
- export async function createNativeGame(user, projectId, name, source) {
405
+ export async function createNativeGame(user, projectId, name, source, dimension = "2d") {
406
+ if (source?.authoring) {
407
+ return { error: "Attach retained construction through preview and apply after creating the game" };
408
+ }
360
409
  const project = await Project.findOwned(user, projectId);
361
410
  if (!project)
362
411
  return { error: "Project not found" };
@@ -366,9 +415,12 @@ export async function createNativeGame(user, projectId, name, source) {
366
415
  return { error: "Project workspace is unavailable" };
367
416
  const id = randomUUID().replace(/-/g, "");
368
417
  const revision = randomUUID().replace(/-/g, "");
369
- const document = validateSource(source ?? { ...createTopDownRoomGame(id), schemaVersion: 2 }, id, revision);
418
+ const document = validateSource(source ?? (dimension === "3d" ? createNative3DGame(id) : { ...createTopDownRoomGame(id), schemaVersion: 2 }), id, revision);
370
419
  if ("error" in document)
371
420
  return document;
421
+ if (source && ((document.schemaVersion === 3) !== (dimension === "3d"))) {
422
+ return { error: "Supplied document does not match the requested dimension" };
423
+ }
372
424
  const game = new Game({
373
425
  id,
374
426
  user_id: user,
@@ -395,13 +447,18 @@ const get = {
395
447
  const id = args["game_id"];
396
448
  if (!user || typeof id !== "string")
397
449
  return { error: "game_id is required in a user session" };
398
- const game = await ownedGame(user, id);
450
+ let game = await ownedGame(user, id);
399
451
  if (!game)
400
452
  return { error: "Game not found" };
401
453
  const workspace = await workspaceOf(user, game);
402
454
  if (!workspace)
403
455
  return { error: "Game workspace is unavailable" };
404
- const document = await readSource(workspace, game, args["source"], args["revision"]);
456
+ const readsDraft = (args["source"] === undefined || args["source"] === "draft") && args["revision"] === undefined;
457
+ const draft = readsDraft ? await Game.readDraft(user, game.id, workspace) : null;
458
+ const document = readsDraft ? draft?.document : await readSource(workspace, game, args["source"], args["revision"]);
459
+ if (draft) {
460
+ game = draft.game;
461
+ }
405
462
  if (!document)
406
463
  return { error: "Game source not found" };
407
464
  const view = args["view"] ?? "outline";
@@ -430,11 +487,19 @@ const save = {
430
487
  const game = await ownedGame(user, id);
431
488
  if (!game)
432
489
  return { error: "Game not found" };
433
- const workspace = await workspaceOf(user, game);
434
- if (!workspace)
435
- return { error: "Game workspace is unavailable" };
436
- const document = args["document"] ?? await readSource(workspace, game, "draft", undefined);
437
- return document ? publish(user, game, base, document, typeof args["message"] === "string" ? args["message"] : undefined) : { error: "Game draft not found" };
490
+ const request = { game_id: id, base_revision: base, message: typeof args["message"] === "string" ? args["message"] : undefined };
491
+ if (args["document"] !== undefined) {
492
+ const token = args["base_updated_at"];
493
+ if (typeof token !== "string" || !token) {
494
+ return { error: "base_updated_at is required with an explicit document" };
495
+ }
496
+ const parsed = gameDocument.safeParse(args["document"]);
497
+ if (!parsed.success) {
498
+ return { error: parsed.error.message };
499
+ }
500
+ return publish(user, game, { ...request, document: parsed.data, base_updated_at: token });
501
+ }
502
+ return publish(user, game, request);
438
503
  }
439
504
  };
440
505
  const edit = {
@@ -510,11 +575,13 @@ const install = {
510
575
  return { error: "Candidate workspace is unavailable" };
511
576
  candidateWorkspace = resolved;
512
577
  }
513
- const formats = parsed.data.mediaKind === "audio"
514
- ? [["wav", "audio/wav"], ["mp3", "audio/mpeg"], ["ogg", "audio/ogg"]]
515
- : parsed.data.mediaKind === "font"
516
- ? [[parsed.data.fontFormat, `font/${parsed.data.fontFormat}`]]
517
- : [["png", "image/png"], ["jpg", "image/jpeg"], ["webp", "image/webp"]];
578
+ const formats = parsed.data.mediaKind === "model" ? [["glb", "model/gltf-binary"]]
579
+ : parsed.data.mediaKind === "collider" ? [["json", "application/json"]]
580
+ : parsed.data.mediaKind === "audio"
581
+ ? [["wav", "audio/wav"], ["mp3", "audio/mpeg"], ["ogg", "audio/ogg"]]
582
+ : parsed.data.mediaKind === "font"
583
+ ? [[parsed.data.fontFormat, `font/${parsed.data.fontFormat}`]]
584
+ : [["png", "image/png"], ["jpg", "image/jpeg"], ["webp", "image/webp"]];
518
585
  let candidate = null;
519
586
  for (const [extension, contentType] of formats) {
520
587
  if (!extension)
@@ -536,6 +603,45 @@ const install = {
536
603
  if (!draft)
537
604
  return { error: "Game draft is missing" };
538
605
  const expectedUpdatedAt = typeof args["base_updated_at"] === "string" ? args["base_updated_at"] : draft.game.draft_updated_at;
606
+ let binding = parsed.data;
607
+ try {
608
+ if (binding.mediaKind === "model") {
609
+ const { prepareGameModelBinding3D } = await import("@nodetool-ai/game-renderer/preparation3d");
610
+ const prepared = await prepareGameModelBinding3D(bytes, { assetId: binding.assetId, expectedDigest: binding.digest, signal: run.context.signal });
611
+ if (!prepared.ok) {
612
+ return { error: "Model preparation failed", diagnostics: prepared.diagnostics };
613
+ }
614
+ const sourceAsset = binding.sourceAssetId ? await Asset.find(user, binding.sourceAssetId) : null;
615
+ if (binding.sourceAssetId && !sourceAsset) {
616
+ return { error: "Model source asset is not owned" };
617
+ }
618
+ const canonical = { ...prepared.binding, required: binding.required };
619
+ if (binding.provenance) {
620
+ canonical.provenance = binding.provenance;
621
+ }
622
+ if (binding.importSettings) {
623
+ canonical.importSettings = binding.importSettings;
624
+ }
625
+ if (binding.sourceDigest) {
626
+ canonical.sourceDigest = binding.sourceDigest;
627
+ }
628
+ if (sourceAsset) {
629
+ canonical.sourceAssetId = sourceAsset.id;
630
+ }
631
+ binding = canonical;
632
+ }
633
+ else if (binding.mediaKind === "collider") {
634
+ binding = colliderBinding3D(bytes, binding);
635
+ await decodePreparedGameCollider3D(bytes, gameAssetBinding3D.options[1].parse(binding));
636
+ }
637
+ }
638
+ catch (error) {
639
+ return { error: error instanceof Error ? error.message : String(error) };
640
+ }
641
+ const targetBinding = draft.document.schemaVersion === 3 ? gameAssetBinding3D.safeParse(binding) : legacyAssetBinding.safeParse(binding);
642
+ if (!targetBinding.success) {
643
+ return { error: "Asset binding does not match the game dimension" };
644
+ }
539
645
  const storage = run.context.assetStorage;
540
646
  if (!storage)
541
647
  return { error: "Asset storage is unavailable" };
@@ -558,7 +664,8 @@ const install = {
558
664
  uri = await storage.store(key, bytes, contentType);
559
665
  let result;
560
666
  try {
561
- const updated = await Game.updateDraft(user, game.id, expectedUpdatedAt, [{ op: "bind_asset", slot, binding: { ...parsed.data, assetId: installed.id } }], workspace, { actor: "agent", threadId: run.context.threadId ?? undefined, messageId: run.context.get?.("chat_message_id") ?? undefined });
667
+ const op = gameDocumentOp.parse({ op: "bind_asset", slot, binding: { ...targetBinding.data, assetId: installed.id } });
668
+ const updated = await Game.updateDraft(user, game.id, expectedUpdatedAt, [op], workspace, { actor: "agent", threadId: run.context.threadId ?? undefined, messageId: run.context.get?.("chat_message_id") ?? undefined });
562
669
  result = updated ? { game: summary(updated.game), draft_updated_at: updated.game.draft_updated_at, document: updated.document } : { error: "Game draft was modified concurrently" };
563
670
  }
564
671
  catch (error) {
@@ -597,6 +704,15 @@ const playtest = {
597
704
  const document = await readSource(workspace, game, args["source"], args["revision"]);
598
705
  if (!document)
599
706
  return { error: "Game source not found" };
707
+ if (document.schemaVersion === 3) {
708
+ try {
709
+ return await playtestGame3D(run, user, document, args);
710
+ }
711
+ catch (error) {
712
+ run.context.signal?.throwIfAborted();
713
+ return { error: error instanceof Error ? error.message : String(error), code: "game3d_preparation_failed" };
714
+ }
715
+ }
600
716
  const captures = captureTicks(args["capture_ticks"], []);
601
717
  if ("error" in captures)
602
718
  return captures;
@@ -732,6 +848,20 @@ const capture = {
732
848
  const ticks = captureTicks(args["ticks"], [0]);
733
849
  if ("error" in ticks)
734
850
  return ticks;
851
+ if (document.schemaVersion === 3) {
852
+ const inputs = inputFrames3D(args["inputs"], Math.max(0, ...ticks));
853
+ if ("error" in inputs) {
854
+ return inputs;
855
+ }
856
+ const seed = typeof args["seed"] === "number" && Number.isSafeInteger(args["seed"]) ? args["seed"] : 1;
857
+ try {
858
+ return await captureFrames3D(run, user, document, ticks, inputs, seed, args);
859
+ }
860
+ catch (error) {
861
+ run.context.signal?.throwIfAborted();
862
+ return { error: error instanceof Error ? error.message : String(error), code: "game3d_capture_failed" };
863
+ }
864
+ }
735
865
  const inputs = inputFrames(args["inputs"], Math.max(0, ...ticks));
736
866
  if ("error" in inputs)
737
867
  return inputs;
@@ -754,7 +884,7 @@ const generateAsset = {
754
884
  const kind = args["kind"];
755
885
  const prompt = args["prompt"];
756
886
  const inputFile = args["input_file"];
757
- if (!user || typeof id !== "string" || typeof slot !== "string" || !slot || !["image", "audio", "music", "sfx", "font"].includes(String(kind))) {
887
+ if (!user || typeof id !== "string" || typeof slot !== "string" || !slot || !["image", "audio", "music", "sfx", "font", "model", "collider"].includes(String(kind))) {
758
888
  return { error: "game_id, slot, and kind are required" };
759
889
  }
760
890
  if (inputFile !== undefined && (typeof inputFile !== "string" || !inputFile.trim())) {
@@ -772,6 +902,21 @@ const generateAsset = {
772
902
  if (!draft) {
773
903
  return { error: "Game draft not found" };
774
904
  }
905
+ if (kind === "model" || kind === "collider") {
906
+ if (draft.document.schemaVersion !== 3) {
907
+ return { error: "Model and collider assets require a 3D game" };
908
+ }
909
+ try {
910
+ return await stageModelGameAsset3D(run, game, workspace, draft.document, args);
911
+ }
912
+ catch (error) {
913
+ run.context.signal?.throwIfAborted();
914
+ return { error: error instanceof Error ? error.message : String(error) };
915
+ }
916
+ }
917
+ if (draft.document.schemaVersion === 3 && kind === "image") {
918
+ return { error: "3D games use model assets with embedded textures" };
919
+ }
775
920
  const reference = typeof args["reference_slot"] === "string" ? draft.document.assets[args["reference_slot"]] : undefined;
776
921
  if (args["reference_slot"] !== undefined && !reference) {
777
922
  return { error: "reference_slot is not bound" };
@@ -791,7 +936,7 @@ const generateAsset = {
791
936
  let provider = args["provider"];
792
937
  let model = args["model"];
793
938
  let generated = {};
794
- let sourceBytes = null;
939
+ let sourceBytes;
795
940
  const makeLut = settings?.success && settings.data.lut !== undefined;
796
941
  if (makeLut && (inputFile !== undefined || reference || args["generation_id"] !== undefined)) {
797
942
  return { error: "LUT preparation creates a color cube directly and cannot use input_file, reference_slot or generation_id" };
@@ -908,7 +1053,7 @@ const generateAsset = {
908
1053
  let height = 1;
909
1054
  const previous = draft.document.assets[slot];
910
1055
  const binding = {
911
- width, height, pivot: previous?.pivot ?? { x: 0.5, y: 0.5 }, sampling: previous?.sampling ?? "nearest"
1056
+ width, height, pivot: previous && "pivot" in previous ? previous.pivot : { x: 0.5, y: 0.5 }, sampling: previous && "sampling" in previous ? previous.sampling : "nearest"
912
1057
  };
913
1058
  let frames;
914
1059
  let tiles;
@@ -982,6 +1127,18 @@ const generateAsset = {
982
1127
  binding.provenance = typeof inputFile === "string" ? `import:${inputFile}`
983
1128
  : makeLut ? "generated:color-cube" : kind === "sfx" ? `node:${args["node_type"]}` : `${provider}:${model}:${generated.generation_id ?? ""}`;
984
1129
  }
1130
+ if (draft.document.schemaVersion === 3) {
1131
+ delete binding.width;
1132
+ delete binding.height;
1133
+ delete binding.pivot;
1134
+ delete binding.sampling;
1135
+ const parsedBinding = gameAssetBinding3D.safeParse(binding);
1136
+ if (!parsedBinding.success) {
1137
+ return { error: "Invalid 3D asset binding", diagnostics: parsedBinding.error.issues };
1138
+ }
1139
+ return { game_id: shortResourceId(game.id), slot, binding: parsedBinding.data, candidate_workspace_id: game.workspace_id,
1140
+ draft_updated_at: draft.game.draft_updated_at, installed: false, next: "Call install_native_game_asset with this binding to install the candidate." };
1141
+ }
985
1142
  const installed = await install.impl(run, { game_id: game.id, slot, binding, base_updated_at: draft.game.draft_updated_at });
986
1143
  if (typeof installed !== "object" || installed === null) {
987
1144
  return { generation_id: generated.generation_id, result: installed };
@@ -1083,8 +1240,14 @@ const buildGame = {
1083
1240
  const scratch = await workspace.scratchDir();
1084
1241
  const staging = await mkdtemp(join(scratch, ".native-game-build-"));
1085
1242
  try {
1086
- const { buildStandaloneGame } = await import("@nodetool-ai/game-renderer/build");
1087
- await buildStandaloneGame({ document, outputDir: join(staging, "player"), resolveAsset });
1243
+ if (document.schemaVersion === 3) {
1244
+ const { buildStandaloneGame3D } = await import("@nodetool-ai/game-renderer/build3d");
1245
+ await buildStandaloneGame3D({ document, outputDir: join(staging, "player"), resolveAsset, signal: run.context.signal });
1246
+ }
1247
+ else {
1248
+ const { buildStandaloneGame } = await import("@nodetool-ai/game-renderer/build");
1249
+ await buildStandaloneGame({ document, outputDir: join(staging, "player"), resolveAsset });
1250
+ }
1088
1251
  const files = [];
1089
1252
  const pending = [""];
1090
1253
  let totalBytes = 0;
@@ -1120,7 +1283,9 @@ const buildGame = {
1120
1283
  : file.path.endsWith(".mp3") ? "audio/mpeg"
1121
1284
  : file.path.endsWith(".ttf") ? "font/ttf"
1122
1285
  : file.path.endsWith(".otf") ? "font/otf"
1123
- : "application/octet-stream";
1286
+ : file.path.endsWith(".glb") ? "model/gltf-binary"
1287
+ : file.path.endsWith(".wasm") ? "application/wasm"
1288
+ : "application/octet-stream";
1124
1289
  await workspace.write(`${buildPath}/${file.path}`, file.bytes, contentType);
1125
1290
  }
1126
1291
  const index = files.find((file) => file.path === "index.html");
@@ -1193,7 +1358,7 @@ const installExample = {
1193
1358
  return { error: "Example game not found" };
1194
1359
  const installed = await installExampleGameAssets(user, projectId, {}, slug, storage);
1195
1360
  try {
1196
- const created = await createNativeGame(user, projectId, typeof name === "string" ? name.trim() : installed.bundle.name, installed.document);
1361
+ const created = await createNativeGame(user, projectId, typeof name === "string" ? name.trim() : installed.bundle.name, installed.document, installed.document.schemaVersion === 3 ? "3d" : "2d");
1197
1362
  if ("error" in created) {
1198
1363
  await installed.rollback();
1199
1364
  return created;
@@ -1222,6 +1387,9 @@ const autoplay = {
1222
1387
  const document = await readSource(workspace, game, args["source"], args["revision"]);
1223
1388
  if (!document)
1224
1389
  return { error: "Game source not found" };
1390
+ if (document.schemaVersion === 3) {
1391
+ return { status: "unsupported", dimension: "3d", code: "autoplay_3d_unsupported", message: "Use playtest_native_game with a recorded 3D route" };
1392
+ }
1225
1393
  const targetPrefix = args["target_prefix"];
1226
1394
  const playerId = args["player_id"];
1227
1395
  const win = args["win"];
@@ -1257,6 +1425,8 @@ const autoplay = {
1257
1425
  };
1258
1426
  export const module = {
1259
1427
  module: "game",
1260
- exports: [create, get, save, install, playtest, buildGame, edit, capture, generateAsset, listExamples, getExample, installExample, autoplay]
1428
+ exports: [create, get, save, install, playtest, buildGame, edit, capture, generateAsset, listExamples, getExample, installExample, autoplay,
1429
+ { spec: previewGameAuthoringSpec, impl: previewGameAuthoring },
1430
+ { spec: applyGameAuthoringSpec, impl: applyGameAuthoring }]
1261
1431
  };
1262
1432
  //# sourceMappingURL=game.js.map