@playdrop/playdrop-cli 0.16.12 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +1 -2
- package/dist/apiClient.js +1 -16
- package/dist/appUrls.js +4 -0
- package/dist/apps/build.d.ts +12 -4
- package/dist/apps/build.js +55 -22
- package/dist/apps/index.d.ts +2 -1
- package/dist/apps/index.js +4 -1
- package/dist/apps/loadCheck.d.ts +5 -1
- package/dist/apps/loadCheck.js +52 -18
- package/dist/apps/serverBuild.d.ts +17 -0
- package/dist/apps/serverBuild.js +155 -0
- package/dist/apps/staticHtml.d.ts +1 -0
- package/dist/apps/staticHtml.js +19 -10
- package/dist/apps/upload.d.ts +12 -2
- package/dist/apps/upload.js +127 -46
- package/dist/catalogue.d.ts +23 -1
- package/dist/catalogue.js +126 -100
- package/dist/commandContext.d.ts +6 -3
- package/dist/commandContext.js +108 -18
- package/dist/commands/build.js +0 -7
- package/dist/commands/captureListing.d.ts +3 -0
- package/dist/commands/captureListing.js +48 -4
- package/dist/commands/chat.d.ts +4 -7
- package/dist/commands/chat.js +165 -77
- package/dist/commands/check.js +34 -1
- package/dist/commands/create.js +30 -263
- package/dist/commands/dev.js +37 -3
- package/dist/commands/devBrowser.js +2 -2
- package/dist/commands/devGameServer.d.ts +16 -0
- package/dist/commands/devGameServer.js +237 -0
- package/dist/commands/devRuntimeAssets.d.ts +1 -0
- package/dist/commands/devRuntimeAssets.js +2 -0
- package/dist/commands/devServer.d.ts +3 -0
- package/dist/commands/devServer.js +111 -5
- package/dist/commands/generation.d.ts +33 -4
- package/dist/commands/generation.js +304 -115
- package/dist/commands/login.js +23 -7
- package/dist/commands/review.d.ts +1 -1
- package/dist/commands/review.js +68 -95
- package/dist/commands/source.d.ts +19 -0
- package/dist/commands/source.js +142 -0
- package/dist/commands/tweaks.js +5 -11
- package/dist/commands/upload-content.d.ts +1 -1
- package/dist/commands/upload-content.js +16 -12
- package/dist/commands/upload.d.ts +17 -1
- package/dist/commands/upload.js +47 -10
- package/dist/commands/worker/archive-staging.d.ts +1 -0
- package/dist/commands/worker/archive-staging.js +13 -2
- package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
- package/dist/commands/worker/e2e-fixtures.js +466 -0
- package/dist/commands/worker/game-server-infra.d.ts +80 -0
- package/dist/commands/worker/game-server-infra.js +595 -0
- package/dist/commands/worker/game-source-git.d.ts +126 -0
- package/dist/commands/worker/game-source-git.js +780 -0
- package/dist/commands/worker/generation.d.ts +94 -0
- package/dist/commands/worker/generation.js +1458 -0
- package/dist/commands/worker/provider-telemetry.js +1 -1
- package/dist/commands/worker/runtime.d.ts +8 -10
- package/dist/commands/worker/runtime.js +53 -48
- package/dist/commands/worker.d.ts +79 -19
- package/dist/commands/worker.js +1796 -419
- package/dist/config.d.ts +2 -0
- package/dist/config.js +16 -3
- package/dist/environment.d.ts +0 -1
- package/dist/environment.js +0 -8
- package/dist/index.js +92 -22
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +15 -2
- package/node_modules/@playdrop/api-client/dist/client.d.ts +143 -39
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +33 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +152 -21
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.js +477 -100
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
- package/node_modules/@playdrop/api-client/dist/index.d.ts +81 -30
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +217 -56
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
- package/node_modules/@playdrop/api-client/package.json +7 -0
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
- package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/config/package.json +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
- package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@playdrop/game-source-git/package.json +28 -0
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
- package/node_modules/@playdrop/types/dist/api.d.ts +730 -166
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +65 -18
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
- package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.js +26 -26
- package/node_modules/@playdrop/types/dist/chat.d.ts +273 -31
- package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.js +38 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
- package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/index.js +7 -1
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
- package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
- package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
- package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
- package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +111 -0
- package/node_modules/@playdrop/types/package.json +14 -0
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/node_modules/@playdrop/vox-three/package.json +8 -4
- package/package.json +9 -11
- package/dist/assets/model-artifacts.d.ts +0 -8
- package/dist/assets/model-artifacts.js +0 -382
- package/dist/assets/model-worker.d.ts +0 -22
- package/dist/assets/model-worker.js +0 -123
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
- package/node_modules/@playdrop/ai-client/package.json +0 -22
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
- package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
- package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/package.json +0 -19
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/package.json +0 -28
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeGameSourceLock = normalizeGameSourceLock;
|
|
4
|
+
exports.parseGameSourceLock = parseGameSourceLock;
|
|
5
|
+
exports.serializeGameSourceLock = serializeGameSourceLock;
|
|
6
|
+
exports.createGameSourceLock = createGameSourceLock;
|
|
7
|
+
exports.verifyLockedFile = verifyLockedFile;
|
|
8
|
+
const paths_js_1 = require("./paths.js");
|
|
9
|
+
function validateLockEntry(filePath, value) {
|
|
10
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
11
|
+
throw new Error(`invalid_game_source_lock_entry:${filePath}`);
|
|
12
|
+
}
|
|
13
|
+
const entry = value;
|
|
14
|
+
const contentSha = (0, paths_js_1.assertSha256)(String(entry["sha256"] ?? ""));
|
|
15
|
+
const bytes = Number(entry["bytes"]);
|
|
16
|
+
if (!Number.isSafeInteger(bytes) || bytes < 0) {
|
|
17
|
+
throw new Error(`invalid_game_source_lock_bytes:${filePath}`);
|
|
18
|
+
}
|
|
19
|
+
if (entry["store"] !== paths_js_1.GAME_SOURCE_STORE) {
|
|
20
|
+
throw new Error(`invalid_game_source_lock_store:${filePath}`);
|
|
21
|
+
}
|
|
22
|
+
const expectedKey = (0, paths_js_1.buildImmutableFileKey)(contentSha);
|
|
23
|
+
if (entry["key"] !== expectedKey) {
|
|
24
|
+
throw new Error(`invalid_game_source_lock_key:${filePath}`);
|
|
25
|
+
}
|
|
26
|
+
return { sha256: contentSha, bytes, store: paths_js_1.GAME_SOURCE_STORE, key: expectedKey };
|
|
27
|
+
}
|
|
28
|
+
function normalizeGameSourceLock(input) {
|
|
29
|
+
if (input.version !== 1 || !input.files || typeof input.files !== "object" || Array.isArray(input.files)) {
|
|
30
|
+
throw new Error("invalid_game_source_lock");
|
|
31
|
+
}
|
|
32
|
+
const files = {};
|
|
33
|
+
for (const [rawPath, rawEntry] of Object.entries(input.files).sort(([left], [right]) => left.localeCompare(right))) {
|
|
34
|
+
const filePath = (0, paths_js_1.normalizeSourcePath)(rawPath);
|
|
35
|
+
if (filePath !== rawPath)
|
|
36
|
+
throw new Error(`noncanonical_game_source_lock_path:${rawPath}`);
|
|
37
|
+
files[filePath] = validateLockEntry(filePath, rawEntry);
|
|
38
|
+
}
|
|
39
|
+
return { version: 1, files };
|
|
40
|
+
}
|
|
41
|
+
function parseGameSourceLock(content) {
|
|
42
|
+
let parsed;
|
|
43
|
+
try {
|
|
44
|
+
parsed = JSON.parse(Buffer.isBuffer(content) ? content.toString("utf8") : content);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
throw new Error("invalid_game_source_lock_json");
|
|
48
|
+
}
|
|
49
|
+
return normalizeGameSourceLock(parsed);
|
|
50
|
+
}
|
|
51
|
+
function serializeGameSourceLock(input) {
|
|
52
|
+
return Buffer.from(`${JSON.stringify(normalizeGameSourceLock(input), null, 2)}\n`, "utf8");
|
|
53
|
+
}
|
|
54
|
+
function createGameSourceLock(materialFiles) {
|
|
55
|
+
const files = {};
|
|
56
|
+
for (const [rawPath, content] of [...materialFiles.entries()].sort(([left], [right]) => left.localeCompare(right))) {
|
|
57
|
+
const filePath = (0, paths_js_1.normalizeSourcePath)(rawPath);
|
|
58
|
+
const contentSha = (0, paths_js_1.sha256)(content);
|
|
59
|
+
files[filePath] = {
|
|
60
|
+
sha256: contentSha,
|
|
61
|
+
bytes: content.length,
|
|
62
|
+
store: paths_js_1.GAME_SOURCE_STORE,
|
|
63
|
+
key: (0, paths_js_1.buildImmutableFileKey)(contentSha),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return { version: 1, files };
|
|
67
|
+
}
|
|
68
|
+
function verifyLockedFile(filePath, content, entry) {
|
|
69
|
+
if (content.length !== entry.bytes || (0, paths_js_1.sha256)(content) !== entry.sha256) {
|
|
70
|
+
throw new Error(`game_source_material_hash_mismatch:${(0, paths_js_1.normalizeSourcePath)(filePath)}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GameSourceLockV1 } from "./lock.js";
|
|
2
|
+
export interface MaterializeLockOptions {
|
|
3
|
+
rootDir: string;
|
|
4
|
+
blobCacheDir: string;
|
|
5
|
+
lock: GameSourceLockV1;
|
|
6
|
+
download: (key: string) => Promise<Buffer>;
|
|
7
|
+
cloneFile?: (source: string, destination: string) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function materializeGameSourceLock(options: MaterializeLockOptions): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=materialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../src/materialize.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAMlD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAYD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmC9F"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.materializeGameSourceLock = materializeGameSourceLock;
|
|
40
|
+
const node_child_process_1 = require("node:child_process");
|
|
41
|
+
const node_crypto_1 = require("node:crypto");
|
|
42
|
+
const promises_1 = require("node:fs/promises");
|
|
43
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
44
|
+
const node_util_1 = require("node:util");
|
|
45
|
+
const lock_js_1 = require("./lock.js");
|
|
46
|
+
const paths_js_1 = require("./paths.js");
|
|
47
|
+
const execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
48
|
+
async function defaultCloneFile(source, destination) {
|
|
49
|
+
if (process.platform !== "darwin")
|
|
50
|
+
throw new Error("game_source_clone_platform_unsupported");
|
|
51
|
+
const [sourceStat, destinationDirectoryStat] = await Promise.all([
|
|
52
|
+
(0, promises_1.stat)(source),
|
|
53
|
+
(0, promises_1.stat)(node_path_1.default.dirname(destination)),
|
|
54
|
+
]);
|
|
55
|
+
if (sourceStat.dev !== destinationDirectoryStat.dev)
|
|
56
|
+
throw new Error("game_source_clone_cross_device");
|
|
57
|
+
await execFileAsync("/bin/cp", ["-c", source, destination]);
|
|
58
|
+
}
|
|
59
|
+
async function materializeGameSourceLock(options) {
|
|
60
|
+
for (const [filePath, entry] of Object.entries(options.lock.files)) {
|
|
61
|
+
const normalized = (0, paths_js_1.normalizeSourcePath)(filePath);
|
|
62
|
+
const cachePath = node_path_1.default.join(options.blobCacheDir, entry.sha256.slice(0, 2), entry.sha256);
|
|
63
|
+
await (0, promises_1.mkdir)(node_path_1.default.dirname(cachePath), { recursive: true });
|
|
64
|
+
let cached = null;
|
|
65
|
+
try {
|
|
66
|
+
const metadata = await (0, promises_1.stat)(cachePath);
|
|
67
|
+
if (metadata.size === entry.bytes) {
|
|
68
|
+
const { readFile } = await Promise.resolve().then(() => __importStar(require("node:fs/promises")));
|
|
69
|
+
cached = await readFile(cachePath);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
if (error.code !== "ENOENT")
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
if (!cached || (0, paths_js_1.sha256)(cached) !== entry.sha256) {
|
|
77
|
+
const downloaded = await options.download(entry.key);
|
|
78
|
+
(0, lock_js_1.verifyLockedFile)(normalized, downloaded, entry);
|
|
79
|
+
const temporaryPath = `${cachePath}.${process.pid}.${(0, node_crypto_1.randomUUID)()}.tmp`;
|
|
80
|
+
await (0, promises_1.writeFile)(temporaryPath, downloaded, { flag: "wx" });
|
|
81
|
+
try {
|
|
82
|
+
await (0, promises_1.rename)(temporaryPath, cachePath);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (error.code !== "EEXIST")
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
await (0, promises_1.rm)(temporaryPath, { force: true });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const destination = node_path_1.default.join(options.rootDir, normalized);
|
|
93
|
+
await (0, promises_1.mkdir)(node_path_1.default.dirname(destination), { recursive: true });
|
|
94
|
+
await (0, promises_1.rm)(destination, { force: true });
|
|
95
|
+
await (options.cloneFile ?? defaultCloneFile)(cachePath, destination);
|
|
96
|
+
const { readFile } = await Promise.resolve().then(() => __importStar(require("node:fs/promises")));
|
|
97
|
+
(0, lock_js_1.verifyLockedFile)(normalized, await readFile(destination), entry);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const GAME_SOURCE_REPO_PREFIX = "game-source/repos";
|
|
2
|
+
export declare const GAME_SOURCE_FILE_PREFIX = "game-source/files/sha256";
|
|
3
|
+
export declare const AGENT_TASK_TRANSCRIPT_PREFIX = "agent-task-transcripts";
|
|
4
|
+
export declare const GAME_SOURCE_LOCK_PATH = ".playdrop/files.lock";
|
|
5
|
+
export declare const GAME_SOURCE_STORE = "game-source";
|
|
6
|
+
export declare const MAX_GIT_SOURCE_FILE_BYTES: number;
|
|
7
|
+
export declare function gameSourceBinaryIgnoreRules(): string[];
|
|
8
|
+
export declare function assertSha1(value: string, label?: string): string;
|
|
9
|
+
export declare function assertSha256(value: string, label?: string): string;
|
|
10
|
+
export declare function sha256(content: Buffer): string;
|
|
11
|
+
export declare function normalizeSourcePath(input: string): string;
|
|
12
|
+
export declare function isTranscriptPath(input: string): boolean;
|
|
13
|
+
export declare function isSourceExcludedGeneratedPath(input: string): boolean;
|
|
14
|
+
export declare function isMediaOrBinaryPath(input: string): boolean;
|
|
15
|
+
export declare function bufferLooksBinary(content: Buffer): boolean;
|
|
16
|
+
export declare function classifyGameSourceFile(inputPath: string, content: Buffer): "git" | "material" | "transcript" | "excluded";
|
|
17
|
+
export declare function buildGameSourceRepoKeys(appId: number): {
|
|
18
|
+
current: string;
|
|
19
|
+
previous: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function buildGameSourceCandidateBundleKey(appId: number, taskId: number, bundleSha256: string): string;
|
|
22
|
+
export declare function buildImmutableFileKey(contentSha256: string): string;
|
|
23
|
+
export declare function buildTranscriptObjectKey(taskId: number, attempt: number): string;
|
|
24
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/paths.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAC3D,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AACrE,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAC5D,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,yBAAyB,QAAmB,CAAC;AA2D1D,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAItD;AA6BD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAQ,GAAG,MAAM,CAK/D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAW,GAAG,MAAM,CAKpE;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWzD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGvD;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CASpE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAG1D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAO1D;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,KAAK,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAMhD;AAOD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAI5F;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAK7G;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAIhF"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MAX_GIT_SOURCE_FILE_BYTES = exports.GAME_SOURCE_STORE = exports.GAME_SOURCE_LOCK_PATH = exports.AGENT_TASK_TRANSCRIPT_PREFIX = exports.GAME_SOURCE_FILE_PREFIX = exports.GAME_SOURCE_REPO_PREFIX = void 0;
|
|
7
|
+
exports.gameSourceBinaryIgnoreRules = gameSourceBinaryIgnoreRules;
|
|
8
|
+
exports.assertSha1 = assertSha1;
|
|
9
|
+
exports.assertSha256 = assertSha256;
|
|
10
|
+
exports.sha256 = sha256;
|
|
11
|
+
exports.normalizeSourcePath = normalizeSourcePath;
|
|
12
|
+
exports.isTranscriptPath = isTranscriptPath;
|
|
13
|
+
exports.isSourceExcludedGeneratedPath = isSourceExcludedGeneratedPath;
|
|
14
|
+
exports.isMediaOrBinaryPath = isMediaOrBinaryPath;
|
|
15
|
+
exports.bufferLooksBinary = bufferLooksBinary;
|
|
16
|
+
exports.classifyGameSourceFile = classifyGameSourceFile;
|
|
17
|
+
exports.buildGameSourceRepoKeys = buildGameSourceRepoKeys;
|
|
18
|
+
exports.buildGameSourceCandidateBundleKey = buildGameSourceCandidateBundleKey;
|
|
19
|
+
exports.buildImmutableFileKey = buildImmutableFileKey;
|
|
20
|
+
exports.buildTranscriptObjectKey = buildTranscriptObjectKey;
|
|
21
|
+
const node_crypto_1 = require("node:crypto");
|
|
22
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
23
|
+
exports.GAME_SOURCE_REPO_PREFIX = "game-source/repos";
|
|
24
|
+
exports.GAME_SOURCE_FILE_PREFIX = "game-source/files/sha256";
|
|
25
|
+
exports.AGENT_TASK_TRANSCRIPT_PREFIX = "agent-task-transcripts";
|
|
26
|
+
exports.GAME_SOURCE_LOCK_PATH = ".playdrop/files.lock";
|
|
27
|
+
exports.GAME_SOURCE_STORE = "game-source";
|
|
28
|
+
exports.MAX_GIT_SOURCE_FILE_BYTES = 10 * 1024 * 1024;
|
|
29
|
+
const SHA1_PATTERN = /^[0-9a-f]{40}$/;
|
|
30
|
+
const SHA256_PATTERN = /^[0-9a-f]{64}$/;
|
|
31
|
+
const MEDIA_OR_BINARY_EXTENSIONS = new Set([
|
|
32
|
+
".3ds",
|
|
33
|
+
".7z",
|
|
34
|
+
".aac",
|
|
35
|
+
".aiff",
|
|
36
|
+
".avi",
|
|
37
|
+
".bin",
|
|
38
|
+
".blend",
|
|
39
|
+
".bmp",
|
|
40
|
+
".br",
|
|
41
|
+
".bz2",
|
|
42
|
+
".dae",
|
|
43
|
+
".dmg",
|
|
44
|
+
".eot",
|
|
45
|
+
".fbx",
|
|
46
|
+
".flac",
|
|
47
|
+
".gif",
|
|
48
|
+
".glb",
|
|
49
|
+
".gz",
|
|
50
|
+
".ico",
|
|
51
|
+
".jpeg",
|
|
52
|
+
".jpg",
|
|
53
|
+
".ktx",
|
|
54
|
+
".ktx2",
|
|
55
|
+
".m4a",
|
|
56
|
+
".m4v",
|
|
57
|
+
".mid",
|
|
58
|
+
".mkv",
|
|
59
|
+
".mov",
|
|
60
|
+
".mp3",
|
|
61
|
+
".mp4",
|
|
62
|
+
".obj",
|
|
63
|
+
".ogg",
|
|
64
|
+
".otf",
|
|
65
|
+
".pdf",
|
|
66
|
+
".png",
|
|
67
|
+
".psd",
|
|
68
|
+
".rar",
|
|
69
|
+
".stl",
|
|
70
|
+
".tar",
|
|
71
|
+
".tga",
|
|
72
|
+
".tgz",
|
|
73
|
+
".tif",
|
|
74
|
+
".tiff",
|
|
75
|
+
".ttf",
|
|
76
|
+
".usdz",
|
|
77
|
+
".wav",
|
|
78
|
+
".webm",
|
|
79
|
+
".webp",
|
|
80
|
+
".woff",
|
|
81
|
+
".woff2",
|
|
82
|
+
".zip",
|
|
83
|
+
]);
|
|
84
|
+
function gameSourceBinaryIgnoreRules() {
|
|
85
|
+
return [...MEDIA_OR_BINARY_EXTENSIONS]
|
|
86
|
+
.sort((left, right) => left.localeCompare(right))
|
|
87
|
+
.map((extension) => `*${extension}`);
|
|
88
|
+
}
|
|
89
|
+
const SOURCE_EXCLUDED_ROOTS = new Set([
|
|
90
|
+
".git",
|
|
91
|
+
".next",
|
|
92
|
+
".playdrop-task-events",
|
|
93
|
+
".scratch",
|
|
94
|
+
"build",
|
|
95
|
+
"coverage",
|
|
96
|
+
"dist",
|
|
97
|
+
"evidence",
|
|
98
|
+
"node_modules",
|
|
99
|
+
"output",
|
|
100
|
+
"remix-source",
|
|
101
|
+
"tmp",
|
|
102
|
+
]);
|
|
103
|
+
const SOURCE_EXCLUDED_FILES = new Set([
|
|
104
|
+
".DS_Store",
|
|
105
|
+
".playdrop.json",
|
|
106
|
+
"AGENTS.md",
|
|
107
|
+
"CLAUDE.md",
|
|
108
|
+
"PLAYDROP_TASK.md",
|
|
109
|
+
"next-steps.json",
|
|
110
|
+
"player-feedback.md",
|
|
111
|
+
"platform-feedback.md",
|
|
112
|
+
"source.zip",
|
|
113
|
+
]);
|
|
114
|
+
function assertSha1(value, label = "sha") {
|
|
115
|
+
if (!SHA1_PATTERN.test(value)) {
|
|
116
|
+
throw new Error(`invalid_${label}`);
|
|
117
|
+
}
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
120
|
+
function assertSha256(value, label = "sha256") {
|
|
121
|
+
if (!SHA256_PATTERN.test(value)) {
|
|
122
|
+
throw new Error(`invalid_${label}`);
|
|
123
|
+
}
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
function sha256(content) {
|
|
127
|
+
return (0, node_crypto_1.createHash)("sha256").update(content).digest("hex");
|
|
128
|
+
}
|
|
129
|
+
function normalizeSourcePath(input) {
|
|
130
|
+
const normalized = input.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
131
|
+
if (normalized.length === 0 ||
|
|
132
|
+
normalized.startsWith("/") ||
|
|
133
|
+
normalized.includes("\0") ||
|
|
134
|
+
normalized.split("/").some((segment) => segment.length === 0 || segment === "." || segment === "..")) {
|
|
135
|
+
throw new Error(`invalid_game_source_path:${input}`);
|
|
136
|
+
}
|
|
137
|
+
return normalized;
|
|
138
|
+
}
|
|
139
|
+
function isTranscriptPath(input) {
|
|
140
|
+
const normalized = normalizeSourcePath(input);
|
|
141
|
+
return normalized === "transcripts" || normalized.startsWith("transcripts/");
|
|
142
|
+
}
|
|
143
|
+
function isSourceExcludedGeneratedPath(input) {
|
|
144
|
+
const normalized = normalizeSourcePath(input);
|
|
145
|
+
const segments = normalized.split("/");
|
|
146
|
+
if ((segments[0] ?? "").startsWith(".art-"))
|
|
147
|
+
return true;
|
|
148
|
+
if (segments[0] === ".playdrop" && normalized !== exports.GAME_SOURCE_LOCK_PATH)
|
|
149
|
+
return true;
|
|
150
|
+
if (SOURCE_EXCLUDED_ROOTS.has(segments[0] ?? ""))
|
|
151
|
+
return true;
|
|
152
|
+
if (SOURCE_EXCLUDED_FILES.has(normalized))
|
|
153
|
+
return true;
|
|
154
|
+
if (normalized === "bin/playdrop")
|
|
155
|
+
return true;
|
|
156
|
+
return normalized.endsWith(".log");
|
|
157
|
+
}
|
|
158
|
+
function isMediaOrBinaryPath(input) {
|
|
159
|
+
const normalized = normalizeSourcePath(input);
|
|
160
|
+
return MEDIA_OR_BINARY_EXTENSIONS.has(node_path_1.default.posix.extname(normalized).toLowerCase());
|
|
161
|
+
}
|
|
162
|
+
function bufferLooksBinary(content) {
|
|
163
|
+
const sampleLength = Math.min(content.length, 8 * 1024);
|
|
164
|
+
if (sampleLength === 0)
|
|
165
|
+
return false;
|
|
166
|
+
for (let index = 0; index < sampleLength; index += 1) {
|
|
167
|
+
if (content[index] === 0)
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
function classifyGameSourceFile(inputPath, content) {
|
|
173
|
+
const normalized = normalizeSourcePath(inputPath);
|
|
174
|
+
if (isTranscriptPath(normalized))
|
|
175
|
+
return "transcript";
|
|
176
|
+
if (isSourceExcludedGeneratedPath(normalized))
|
|
177
|
+
return "excluded";
|
|
178
|
+
if (isMediaOrBinaryPath(normalized) || bufferLooksBinary(content))
|
|
179
|
+
return "material";
|
|
180
|
+
return "git";
|
|
181
|
+
}
|
|
182
|
+
function requirePositiveInteger(value, label) {
|
|
183
|
+
if (!Number.isSafeInteger(value) || value <= 0)
|
|
184
|
+
throw new Error(`invalid_${label}`);
|
|
185
|
+
return value;
|
|
186
|
+
}
|
|
187
|
+
function buildGameSourceRepoKeys(appId) {
|
|
188
|
+
const resolvedAppId = requirePositiveInteger(appId, "app_id");
|
|
189
|
+
const base = `${exports.GAME_SOURCE_REPO_PREFIX}/${resolvedAppId}`;
|
|
190
|
+
return { current: `${base}/current.bundle`, previous: `${base}/previous.bundle` };
|
|
191
|
+
}
|
|
192
|
+
function buildGameSourceCandidateBundleKey(appId, taskId, bundleSha256) {
|
|
193
|
+
const resolvedAppId = requirePositiveInteger(appId, "app_id");
|
|
194
|
+
const resolvedTaskId = requirePositiveInteger(taskId, "task_id");
|
|
195
|
+
const resolvedSha256 = assertSha256(bundleSha256);
|
|
196
|
+
return `${exports.GAME_SOURCE_REPO_PREFIX}/${resolvedAppId}/candidates/task-${resolvedTaskId}/${resolvedSha256}.bundle`;
|
|
197
|
+
}
|
|
198
|
+
function buildImmutableFileKey(contentSha256) {
|
|
199
|
+
const resolvedSha = assertSha256(contentSha256);
|
|
200
|
+
return `${exports.GAME_SOURCE_FILE_PREFIX}/${resolvedSha.slice(0, 2)}/${resolvedSha}`;
|
|
201
|
+
}
|
|
202
|
+
function buildTranscriptObjectKey(taskId, attempt) {
|
|
203
|
+
const resolvedTaskId = requirePositiveInteger(taskId, "task_id");
|
|
204
|
+
if (!Number.isSafeInteger(attempt) || attempt < 0)
|
|
205
|
+
throw new Error("invalid_attempt");
|
|
206
|
+
return `${exports.AGENT_TASK_TRANSCRIPT_PREFIX}/${resolvedTaskId}/attempt-${attempt}.jsonl`;
|
|
207
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type GitRunner } from "./git.js";
|
|
2
|
+
export interface SourceVersionSnapshot {
|
|
3
|
+
id: number;
|
|
4
|
+
version: {
|
|
5
|
+
major: number;
|
|
6
|
+
minor: number;
|
|
7
|
+
patch: number;
|
|
8
|
+
};
|
|
9
|
+
sourceZip: Buffer;
|
|
10
|
+
taskId?: number | null;
|
|
11
|
+
taskSummary?: string | null;
|
|
12
|
+
createdAt?: Date | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ImportedSourceVersion {
|
|
15
|
+
id: number;
|
|
16
|
+
version: {
|
|
17
|
+
major: number;
|
|
18
|
+
minor: number;
|
|
19
|
+
patch: number;
|
|
20
|
+
};
|
|
21
|
+
commitSha: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AuthoritativeListingSync {
|
|
24
|
+
version: string;
|
|
25
|
+
displayName: string | null;
|
|
26
|
+
subtitle: string | null;
|
|
27
|
+
description: string | null;
|
|
28
|
+
iconPath: string | null;
|
|
29
|
+
heroPortraitPath: string | null;
|
|
30
|
+
heroLandscapePath: string | null;
|
|
31
|
+
socialLandscapePath: string | null;
|
|
32
|
+
screenshotsPortrait: readonly string[];
|
|
33
|
+
screenshotsLandscape: readonly string[];
|
|
34
|
+
videosPortrait: readonly string[];
|
|
35
|
+
videosLandscape: readonly string[];
|
|
36
|
+
files: ReadonlyMap<string, Buffer>;
|
|
37
|
+
updatedAt?: Date | null;
|
|
38
|
+
}
|
|
39
|
+
export declare function syncAuthoritativeListing(input: {
|
|
40
|
+
repoPath: string;
|
|
41
|
+
listing: AuthoritativeListingSync;
|
|
42
|
+
putImmutableFile: (key: string, content: Buffer, sha256: string) => Promise<void>;
|
|
43
|
+
runner?: GitRunner;
|
|
44
|
+
}): Promise<string>;
|
|
45
|
+
export declare function initializeGameSourceRepository(input: {
|
|
46
|
+
repoPath: string;
|
|
47
|
+
versions: readonly SourceVersionSnapshot[];
|
|
48
|
+
putImmutableFile: (key: string, content: Buffer, sha256: string) => Promise<void>;
|
|
49
|
+
runner?: GitRunner;
|
|
50
|
+
}): Promise<{
|
|
51
|
+
headSha: string;
|
|
52
|
+
versions: ImportedSourceVersion[];
|
|
53
|
+
}>;
|
|
54
|
+
export declare function fastForwardTaskBranch(input: {
|
|
55
|
+
repoPath: string;
|
|
56
|
+
branchRef: string;
|
|
57
|
+
expectedHeadSha: string;
|
|
58
|
+
runner?: GitRunner;
|
|
59
|
+
}): Promise<string>;
|
|
60
|
+
export declare function importAdditionalSourceVersions(input: {
|
|
61
|
+
repoPath: string;
|
|
62
|
+
versions: readonly SourceVersionSnapshot[];
|
|
63
|
+
putImmutableFile: (key: string, content: Buffer, sha256: string) => Promise<void>;
|
|
64
|
+
runner?: GitRunner;
|
|
65
|
+
}): Promise<ImportedSourceVersion[]>;
|
|
66
|
+
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/repository.ts"],"names":[],"mappings":"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"}
|