@playdrop/playdrop-cli 0.16.2 → 0.16.11
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/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- 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 +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- 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/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/agents.js
CHANGED
|
@@ -15,13 +15,13 @@ const output_1 = require("../output");
|
|
|
15
15
|
const shellProbe_1 = require("../shellProbe");
|
|
16
16
|
const versionCompare_1 = require("../versionCompare");
|
|
17
17
|
const AGENTS = [
|
|
18
|
-
{ id:
|
|
19
|
-
{ id:
|
|
20
|
-
{ id:
|
|
18
|
+
{ id: "codex", name: "Codex", cliCommand: "codex", appNames: ["Codex", "OpenAI Codex", "ChatGPT"] },
|
|
19
|
+
{ id: "claude", name: "Claude", cliCommand: "claude", appNames: ["Claude"] },
|
|
20
|
+
{ id: "cursor", name: "Cursor", cliCommand: "cursor", appNames: ["Cursor"] },
|
|
21
21
|
];
|
|
22
|
-
const PUBLIC_PLUGIN_MANIFEST_URL =
|
|
23
|
-
const PLAYDROP_PLUGIN_MARKETPLACE =
|
|
24
|
-
const PLAYDROP_PLUGIN_SPEC =
|
|
22
|
+
const PUBLIC_PLUGIN_MANIFEST_URL = "https://raw.githubusercontent.com/playdrop-ai/playdrop-plugin/main/plugin.json";
|
|
23
|
+
const PLAYDROP_PLUGIN_MARKETPLACE = "playdrop-ai/playdrop-plugin";
|
|
24
|
+
const PLAYDROP_PLUGIN_SPEC = "playdrop@playdrop";
|
|
25
25
|
async function showAgentsStatus(options = {}) {
|
|
26
26
|
const status = await getAgentsStatus(options);
|
|
27
27
|
if (options.json) {
|
|
@@ -36,7 +36,7 @@ async function getAgentsStatus(options = {}) {
|
|
|
36
36
|
const homeDir = options.homeDir ?? node_os_1.default.homedir();
|
|
37
37
|
const runShell = options.runShell ?? runLoginShell;
|
|
38
38
|
const appExists = options.appExists ?? node_fs_1.existsSync;
|
|
39
|
-
const latestPluginVersion = options.latestPluginVersion ?? await fetchLatestPublicPluginVersion();
|
|
39
|
+
const latestPluginVersion = options.latestPluginVersion ?? (await fetchLatestPublicPluginVersion());
|
|
40
40
|
const agents = [];
|
|
41
41
|
for (const agent of AGENTS) {
|
|
42
42
|
const cli = await detectCli(agent.cliCommand, runShell);
|
|
@@ -56,10 +56,10 @@ async function getAgentsStatus(options = {}) {
|
|
|
56
56
|
return { agents };
|
|
57
57
|
}
|
|
58
58
|
async function installPlugin(agentID, options = {}) {
|
|
59
|
-
await runPluginAction(
|
|
59
|
+
await runPluginAction("install-plugin", agentID, options);
|
|
60
60
|
}
|
|
61
61
|
async function updatePlugin(agentID, options = {}) {
|
|
62
|
-
await runPluginAction(
|
|
62
|
+
await runPluginAction("update-plugin", agentID, options);
|
|
63
63
|
}
|
|
64
64
|
async function runPluginAction(action, rawAgentID, options) {
|
|
65
65
|
const agentID = normalizeAgentID(rawAgentID);
|
|
@@ -69,11 +69,11 @@ async function runPluginAction(action, rawAgentID, options) {
|
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
const runCommand = options.runCommand ?? runCommandSync;
|
|
72
|
-
if (agentID ===
|
|
72
|
+
if (agentID === "codex") {
|
|
73
73
|
runCodexPluginAction(action, runCommand);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
if (agentID ===
|
|
76
|
+
if (agentID === "claude") {
|
|
77
77
|
runClaudePluginAction(action, runCommand);
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
@@ -81,16 +81,16 @@ async function runPluginAction(action, rawAgentID, options) {
|
|
|
81
81
|
process.exitCode = 1;
|
|
82
82
|
}
|
|
83
83
|
function normalizeAgentID(value) {
|
|
84
|
-
return value ===
|
|
84
|
+
return value === "codex" || value === "claude" || value === "cursor" ? value : null;
|
|
85
85
|
}
|
|
86
86
|
async function detectCli(command, runShell) {
|
|
87
87
|
const pathProbe = await runShell((0, shellProbe_1.buildCommandPathProbe)(command));
|
|
88
88
|
if (pathProbe.exitCode !== 0 || pathProbe.output.trim().length === 0) {
|
|
89
89
|
return { installed: false };
|
|
90
90
|
}
|
|
91
|
-
const path = pathProbe.output.split(
|
|
91
|
+
const path = pathProbe.output.split("\n")[0]?.trim();
|
|
92
92
|
const versionProbe = await runShell(`${command} --version`);
|
|
93
|
-
const version = versionProbe.output.split(
|
|
93
|
+
const version = versionProbe.output.split("\n")[0]?.trim() || undefined;
|
|
94
94
|
if (versionProbe.exitCode !== 0 && !/\d+\.\d+\.\d+/.test(versionProbe.output)) {
|
|
95
95
|
return { installed: false, path };
|
|
96
96
|
}
|
|
@@ -101,7 +101,7 @@ async function detectCli(command, runShell) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
function detectApp(appNames, homeDir, appExists) {
|
|
104
|
-
for (const root of [
|
|
104
|
+
for (const root of ["/Applications", (0, node_path_1.join)(homeDir, "Applications")]) {
|
|
105
105
|
for (const appName of appNames) {
|
|
106
106
|
const candidate = (0, node_path_1.join)(root, `${appName}.app`);
|
|
107
107
|
if (appExists(candidate)) {
|
|
@@ -112,83 +112,83 @@ function detectApp(appNames, homeDir, appExists) {
|
|
|
112
112
|
return { installed: false };
|
|
113
113
|
}
|
|
114
114
|
async function detectPlugin(agentID, cli, runShell, latestVersion) {
|
|
115
|
-
if (agentID ===
|
|
115
|
+
if (agentID === "cursor") {
|
|
116
116
|
return {
|
|
117
117
|
installed: false,
|
|
118
|
-
status:
|
|
118
|
+
status: "manual-verification-required",
|
|
119
119
|
latestVersion,
|
|
120
120
|
updateAvailable: false,
|
|
121
121
|
installableFromCli: false,
|
|
122
|
-
message:
|
|
122
|
+
message: "Cursor CLI cannot verify plugin installation. Open Cursor and use /add-plugin or the Cursor Marketplace.",
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
if (!cli.installed) {
|
|
126
126
|
return {
|
|
127
127
|
installed: false,
|
|
128
|
-
status:
|
|
128
|
+
status: "unknown",
|
|
129
129
|
latestVersion,
|
|
130
130
|
updateAvailable: false,
|
|
131
131
|
installableFromCli: true,
|
|
132
|
-
message: `${agentID ===
|
|
132
|
+
message: `${agentID === "codex" ? "Codex" : "Claude"} CLI is missing, so installed plugins cannot be checked.`,
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
const list = await runShell(`${agentID} plugin list --json 2>&1`);
|
|
136
136
|
if (list.exitCode !== 0) {
|
|
137
137
|
return {
|
|
138
138
|
installed: false,
|
|
139
|
-
status: agentID ===
|
|
139
|
+
status: agentID === "codex" ? "manual-verification-required" : "unknown",
|
|
140
140
|
latestVersion,
|
|
141
141
|
updateAvailable: false,
|
|
142
142
|
installableFromCli: true,
|
|
143
|
-
message: agentID ===
|
|
144
|
-
?
|
|
145
|
-
:
|
|
143
|
+
message: agentID === "codex"
|
|
144
|
+
? "Codex CLI cannot verify installed plugins. Open Codex and run /plugins to install, enable, or verify PlayDrop."
|
|
145
|
+
: "Could not read Claude installed plugins through claude plugin list --json.",
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
const plugin = selectPlayDropPlugin(parseInstalledPlugins(list.output));
|
|
149
149
|
if (!plugin) {
|
|
150
150
|
return {
|
|
151
151
|
installed: false,
|
|
152
|
-
status:
|
|
152
|
+
status: "missing",
|
|
153
153
|
latestVersion,
|
|
154
154
|
updateAvailable: false,
|
|
155
155
|
installableFromCli: true,
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
const version = typeof plugin.version ===
|
|
159
|
-
const enabled = typeof plugin.enabled ===
|
|
158
|
+
const version = typeof plugin.version === "string" && plugin.version.trim() ? plugin.version.trim() : undefined;
|
|
159
|
+
const enabled = typeof plugin.enabled === "boolean" ? plugin.enabled : undefined;
|
|
160
160
|
return {
|
|
161
161
|
installed: true,
|
|
162
|
-
status: enabled === false ?
|
|
162
|
+
status: enabled === false ? "activation-required" : "installed",
|
|
163
163
|
id: normalizePluginID(plugin),
|
|
164
|
-
path: typeof plugin.installPath ===
|
|
164
|
+
path: typeof plugin.installPath === "string" ? plugin.installPath : plugin.path,
|
|
165
165
|
version,
|
|
166
166
|
latestVersion,
|
|
167
167
|
updateAvailable: (0, versionCompare_1.firstVersionIsNewer)(latestVersion, version),
|
|
168
168
|
enabled,
|
|
169
|
-
scope: typeof plugin.scope ===
|
|
169
|
+
scope: typeof plugin.scope === "string" ? plugin.scope : undefined,
|
|
170
170
|
installableFromCli: true,
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
async function fetchLatestPublicPluginVersion() {
|
|
174
174
|
try {
|
|
175
|
-
const response = await fetch(PUBLIC_PLUGIN_MANIFEST_URL, { headers: { Accept:
|
|
175
|
+
const response = await fetch(PUBLIC_PLUGIN_MANIFEST_URL, { headers: { Accept: "application/json" } });
|
|
176
176
|
if (!response.ok) {
|
|
177
177
|
return undefined;
|
|
178
178
|
}
|
|
179
|
-
const parsed = await response.json();
|
|
180
|
-
return typeof parsed.version ===
|
|
179
|
+
const parsed = (await response.json());
|
|
180
|
+
return typeof parsed.version === "string" && parsed.version.trim().length > 0 ? parsed.version.trim() : undefined;
|
|
181
181
|
}
|
|
182
182
|
catch {
|
|
183
183
|
return undefined;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
async function detectAccount(agentID, runShell, homeDir) {
|
|
187
|
-
if (agentID ===
|
|
187
|
+
if (agentID === "codex") {
|
|
188
188
|
return readCodexAuthAccount(homeDir);
|
|
189
189
|
}
|
|
190
|
-
if (agentID ===
|
|
191
|
-
const result = await runShell(
|
|
190
|
+
if (agentID === "claude") {
|
|
191
|
+
const result = await runShell("claude auth status 2>&1");
|
|
192
192
|
if (result.exitCode !== 0 || !result.output.trim()) {
|
|
193
193
|
return { signedIn: null };
|
|
194
194
|
}
|
|
@@ -198,36 +198,36 @@ async function detectAccount(agentID, runShell, homeDir) {
|
|
|
198
198
|
return { signedIn: false };
|
|
199
199
|
}
|
|
200
200
|
return {
|
|
201
|
-
identity: parsed.email || parsed.authMethod ||
|
|
201
|
+
identity: parsed.email || parsed.authMethod || "Signed in",
|
|
202
202
|
subscription: parsed.subscriptionType,
|
|
203
203
|
signedIn: true,
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
catch {
|
|
207
|
-
return { identity: result.output.split(
|
|
207
|
+
return { identity: result.output.split("\n")[0]?.trim(), signedIn: null };
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
return { signedIn: null };
|
|
211
211
|
}
|
|
212
212
|
function readCodexAuthAccount(homeDir) {
|
|
213
213
|
try {
|
|
214
|
-
const parsed = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(homeDir,
|
|
214
|
+
const parsed = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(homeDir, ".codex", "auth.json"), "utf8"));
|
|
215
215
|
const tokens = parsed.tokens;
|
|
216
|
-
if (tokens && typeof tokens.id_token ===
|
|
216
|
+
if (tokens && typeof tokens.id_token === "string") {
|
|
217
217
|
const payload = decodeJWTPayload(tokens.id_token);
|
|
218
|
-
const email = typeof payload?.email ===
|
|
219
|
-
const plan = payload?.[
|
|
218
|
+
const email = typeof payload?.email === "string" ? payload.email : undefined;
|
|
219
|
+
const plan = payload?.["https://api.openai.com/auth"]?.chatgpt_plan_type;
|
|
220
220
|
if (email) {
|
|
221
221
|
return {
|
|
222
222
|
identity: email,
|
|
223
|
-
subscription: typeof plan ===
|
|
223
|
+
subscription: typeof plan === "string" && plan ? plan : undefined,
|
|
224
224
|
signedIn: true,
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
if (typeof parsed.auth_mode ===
|
|
228
|
+
if (typeof parsed.auth_mode === "string") {
|
|
229
229
|
return {
|
|
230
|
-
identity: parsed.auth_mode ===
|
|
230
|
+
identity: parsed.auth_mode === "apikey" ? "API key" : parsed.auth_mode,
|
|
231
231
|
signedIn: true,
|
|
232
232
|
};
|
|
233
233
|
}
|
|
@@ -238,50 +238,52 @@ function readCodexAuthAccount(homeDir) {
|
|
|
238
238
|
return { signedIn: false };
|
|
239
239
|
}
|
|
240
240
|
function decodeJWTPayload(token) {
|
|
241
|
-
const parts = token.split(
|
|
241
|
+
const parts = token.split(".");
|
|
242
242
|
const payload = parts[1];
|
|
243
243
|
if (!payload) {
|
|
244
244
|
return null;
|
|
245
245
|
}
|
|
246
|
-
const padded = payload.replace(/-/g,
|
|
246
|
+
const padded = payload.replace(/-/g, "+").replace(/_/g, "/") + "=".repeat((4 - (payload.length % 4)) % 4);
|
|
247
247
|
try {
|
|
248
|
-
return JSON.parse(Buffer.from(padded,
|
|
248
|
+
return JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
|
|
249
249
|
}
|
|
250
250
|
catch {
|
|
251
251
|
return null;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
function buildNextAction(agentID, plugin) {
|
|
255
|
-
if (plugin.status ===
|
|
255
|
+
if (plugin.status === "manual-verification-required") {
|
|
256
256
|
return null;
|
|
257
257
|
}
|
|
258
|
-
if (plugin.status ===
|
|
258
|
+
if (plugin.status === "unknown") {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
261
261
|
if (!plugin.installed) {
|
|
262
|
-
return { command: `playdrop agents install-plugin ${agentID}`, reason:
|
|
262
|
+
return { command: `playdrop agents install-plugin ${agentID}`, reason: "PlayDrop plugin is not installed." };
|
|
263
263
|
}
|
|
264
|
-
if (plugin.status ===
|
|
265
|
-
const command = agentID ===
|
|
266
|
-
|
|
264
|
+
if (plugin.status === "activation-required" || plugin.enabled === false) {
|
|
265
|
+
const command = agentID === "claude" && plugin.id
|
|
266
|
+
? `claude plugin enable ${plugin.id}`
|
|
267
|
+
: `playdrop agents install-plugin ${agentID}`;
|
|
268
|
+
return { command, reason: "PlayDrop plugin is installed but disabled." };
|
|
267
269
|
}
|
|
268
270
|
if (plugin.updateAvailable) {
|
|
269
|
-
return { command: `playdrop agents update-plugin ${agentID}`, reason:
|
|
271
|
+
return { command: `playdrop agents update-plugin ${agentID}`, reason: "PlayDrop plugin update is available." };
|
|
270
272
|
}
|
|
271
273
|
return null;
|
|
272
274
|
}
|
|
273
275
|
function printAgentsStatus(status) {
|
|
274
276
|
for (const agent of status.agents) {
|
|
275
277
|
console.log(agent.name);
|
|
276
|
-
console.log(` CLI: ${agent.cli.installed ? agent.cli.version ?? agent.cli.path ??
|
|
277
|
-
console.log(` App: ${agent.app.installed ? agent.app.path ??
|
|
278
|
+
console.log(` CLI: ${agent.cli.installed ? (agent.cli.version ?? agent.cli.path ?? "installed") : "missing"}`);
|
|
279
|
+
console.log(` App: ${agent.app.installed ? (agent.app.path ?? "installed") : "missing"}`);
|
|
278
280
|
const account = agent.account?.identity
|
|
279
281
|
? agent.account.subscription
|
|
280
282
|
? `${agent.account.identity} (${agent.account.subscription})`
|
|
281
283
|
: agent.account.identity
|
|
282
284
|
: agent.account?.signedIn === false
|
|
283
|
-
?
|
|
284
|
-
:
|
|
285
|
+
? "not signed in"
|
|
286
|
+
: "unknown";
|
|
285
287
|
console.log(` Account: ${account}`);
|
|
286
288
|
console.log(` PlayDrop plugin: ${formatPluginForAgentsStatus(agent.plugin)}`);
|
|
287
289
|
if (agent.nextAction) {
|
|
@@ -290,115 +292,115 @@ function printAgentsStatus(status) {
|
|
|
290
292
|
}
|
|
291
293
|
}
|
|
292
294
|
function runCodexPluginAction(action, runCommand) {
|
|
293
|
-
if (!ensureAgentCliUsable(
|
|
295
|
+
if (!ensureAgentCliUsable("codex", runCommand)) {
|
|
294
296
|
return;
|
|
295
297
|
}
|
|
296
|
-
const marketplaceCommand = action ===
|
|
297
|
-
? [
|
|
298
|
-
: [
|
|
299
|
-
const marketplace = runCommand(
|
|
298
|
+
const marketplaceCommand = action === "install-plugin"
|
|
299
|
+
? ["plugin", "marketplace", "add", PLAYDROP_PLUGIN_MARKETPLACE]
|
|
300
|
+
: ["plugin", "marketplace", "upgrade", "playdrop"];
|
|
301
|
+
const marketplace = runCommand("codex", marketplaceCommand);
|
|
300
302
|
if (marketplace.status !== 0) {
|
|
301
303
|
console.error(`Codex PlayDrop plugin ${action} failed.`);
|
|
302
304
|
process.exitCode = 1;
|
|
303
305
|
return;
|
|
304
306
|
}
|
|
305
|
-
const help = runCommand(
|
|
307
|
+
const help = runCommand("codex", ["plugin", "--help"]);
|
|
306
308
|
const helpText = commandOutput(help);
|
|
307
|
-
if (commandHelpIncludes(helpText,
|
|
308
|
-
const add = runCommand(
|
|
309
|
+
if (commandHelpIncludes(helpText, "add")) {
|
|
310
|
+
const add = runCommand("codex", ["plugin", "add", PLAYDROP_PLUGIN_SPEC]);
|
|
309
311
|
if (add.status !== 0) {
|
|
310
|
-
console.error(`Codex PlayDrop plugin ${action ===
|
|
312
|
+
console.error(`Codex PlayDrop plugin ${action === "install-plugin" ? "install" : "update"} failed.`);
|
|
311
313
|
process.exitCode = 1;
|
|
312
314
|
return;
|
|
313
315
|
}
|
|
314
|
-
if (commandHelpIncludes(helpText,
|
|
315
|
-
console.error(`Codex PlayDrop plugin ${action ===
|
|
316
|
+
if (commandHelpIncludes(helpText, "list") && !readInstalledPlayDropPlugin("codex", runCommand)) {
|
|
317
|
+
console.error(`Codex PlayDrop plugin ${action === "install-plugin" ? "install" : "update"} could not be verified from codex plugin list --json.`);
|
|
316
318
|
process.exitCode = 1;
|
|
317
319
|
return;
|
|
318
320
|
}
|
|
319
|
-
console.log(`${action ===
|
|
321
|
+
console.log(`${action === "install-plugin" ? "Installed" : "Updated"} the PlayDrop plugin for Codex.`);
|
|
320
322
|
return;
|
|
321
323
|
}
|
|
322
|
-
if (action ===
|
|
323
|
-
const install = runCommand(
|
|
324
|
+
if (action === "install-plugin" && commandHelpIncludes(helpText, "install")) {
|
|
325
|
+
const install = runCommand("codex", ["plugin", "install", PLAYDROP_PLUGIN_SPEC]);
|
|
324
326
|
if (install.status !== 0) {
|
|
325
|
-
console.error(
|
|
327
|
+
console.error("Codex PlayDrop plugin install failed.");
|
|
326
328
|
process.exitCode = 1;
|
|
327
329
|
return;
|
|
328
330
|
}
|
|
329
|
-
if (commandHelpIncludes(helpText,
|
|
330
|
-
console.error(
|
|
331
|
+
if (commandHelpIncludes(helpText, "list") && !readInstalledPlayDropPlugin("codex", runCommand)) {
|
|
332
|
+
console.error("Codex PlayDrop plugin install could not be verified from codex plugin list --json.");
|
|
331
333
|
process.exitCode = 1;
|
|
332
334
|
return;
|
|
333
335
|
}
|
|
334
|
-
console.log(
|
|
336
|
+
console.log("Installed the PlayDrop plugin for Codex.");
|
|
335
337
|
return;
|
|
336
338
|
}
|
|
337
|
-
if (action ===
|
|
338
|
-
const update = runCommand(
|
|
339
|
+
if (action === "update-plugin" && commandHelpIncludes(helpText, "update")) {
|
|
340
|
+
const update = runCommand("codex", ["plugin", "update", PLAYDROP_PLUGIN_SPEC]);
|
|
339
341
|
if (update.status !== 0) {
|
|
340
|
-
console.error(
|
|
342
|
+
console.error("Codex PlayDrop plugin update failed.");
|
|
341
343
|
process.exitCode = 1;
|
|
342
344
|
return;
|
|
343
345
|
}
|
|
344
|
-
console.log(
|
|
346
|
+
console.log("Updated the PlayDrop plugin for Codex.");
|
|
345
347
|
return;
|
|
346
348
|
}
|
|
347
|
-
console.log(
|
|
348
|
-
console.log(
|
|
349
|
+
console.log("Codex PlayDrop plugin marketplace is configured.");
|
|
350
|
+
console.log("Open Codex and run /plugins, then install or enable PlayDrop.");
|
|
349
351
|
}
|
|
350
352
|
function runClaudePluginAction(action, runCommand) {
|
|
351
|
-
if (!ensureAgentCliUsable(
|
|
353
|
+
if (!ensureAgentCliUsable("claude", runCommand)) {
|
|
352
354
|
return;
|
|
353
355
|
}
|
|
354
|
-
if (action ===
|
|
355
|
-
const marketplace = runCommand(
|
|
356
|
+
if (action === "install-plugin") {
|
|
357
|
+
const marketplace = runCommand("claude", ["plugin", "marketplace", "add", PLAYDROP_PLUGIN_MARKETPLACE]);
|
|
356
358
|
if (marketplace.status !== 0) {
|
|
357
|
-
console.error(
|
|
359
|
+
console.error("Claude PlayDrop marketplace install failed.");
|
|
358
360
|
process.exitCode = 1;
|
|
359
361
|
return;
|
|
360
362
|
}
|
|
361
|
-
const install = runCommand(
|
|
363
|
+
const install = runCommand("claude", ["plugin", "install", PLAYDROP_PLUGIN_SPEC]);
|
|
362
364
|
if (install.status !== 0) {
|
|
363
|
-
console.error(
|
|
365
|
+
console.error("Claude PlayDrop plugin install failed.");
|
|
364
366
|
process.exitCode = 1;
|
|
365
367
|
return;
|
|
366
368
|
}
|
|
367
|
-
if (!readInstalledPlayDropPlugin(
|
|
368
|
-
console.error(
|
|
369
|
+
if (!readInstalledPlayDropPlugin("claude", runCommand)) {
|
|
370
|
+
console.error("Claude PlayDrop plugin install could not be verified from claude plugin list --json.");
|
|
369
371
|
process.exitCode = 1;
|
|
370
372
|
return;
|
|
371
373
|
}
|
|
372
|
-
console.log(
|
|
373
|
-
console.log(
|
|
374
|
+
console.log("Installed the PlayDrop plugin for Claude.");
|
|
375
|
+
console.log("Run /reload-plugins in Claude Code or restart Claude Code to apply it.");
|
|
374
376
|
return;
|
|
375
377
|
}
|
|
376
|
-
const installed = readInstalledPlayDropPlugin(
|
|
378
|
+
const installed = readInstalledPlayDropPlugin("claude", runCommand);
|
|
377
379
|
if (!installed) {
|
|
378
|
-
console.error(
|
|
380
|
+
console.error("PlayDrop plugin is not installed for Claude.");
|
|
379
381
|
console.error('Run "playdrop agents install-plugin claude" first.');
|
|
380
382
|
process.exitCode = 1;
|
|
381
383
|
return;
|
|
382
384
|
}
|
|
383
|
-
const updateTarget = normalizePluginID(installed) ??
|
|
384
|
-
const update = runCommand(
|
|
385
|
+
const updateTarget = normalizePluginID(installed) ?? "playdrop";
|
|
386
|
+
const update = runCommand("claude", ["plugin", "update", updateTarget]);
|
|
385
387
|
if (update.status !== 0) {
|
|
386
|
-
console.error(
|
|
388
|
+
console.error("Claude PlayDrop plugin update failed.");
|
|
387
389
|
process.exitCode = 1;
|
|
388
390
|
return;
|
|
389
391
|
}
|
|
390
|
-
console.log(
|
|
391
|
-
console.log(
|
|
392
|
+
console.log("Updated the PlayDrop plugin for Claude.");
|
|
393
|
+
console.log("Run /reload-plugins in Claude Code or restart Claude Code to apply it.");
|
|
392
394
|
}
|
|
393
395
|
function ensureAgentCliUsable(command, runCommand) {
|
|
394
|
-
const result = runCommand(command, [
|
|
396
|
+
const result = runCommand(command, ["--version"]);
|
|
395
397
|
const output = commandOutput(result).trim();
|
|
396
398
|
if (result.status === 0 || /\d+\.\d+\.\d+/.test(output)) {
|
|
397
399
|
return true;
|
|
398
400
|
}
|
|
399
|
-
const label = command ===
|
|
401
|
+
const label = command === "codex" ? "Codex" : "Claude";
|
|
400
402
|
console.error(`${label} CLI is missing or not runnable.`);
|
|
401
|
-
console.error(`${command} --version failed with code ${result.status ??
|
|
403
|
+
console.error(`${command} --version failed with code ${result.status ?? "unknown"}.`);
|
|
402
404
|
if (output) {
|
|
403
405
|
console.error(`Output: ${output}`);
|
|
404
406
|
}
|
|
@@ -406,11 +408,11 @@ function ensureAgentCliUsable(command, runCommand) {
|
|
|
406
408
|
return false;
|
|
407
409
|
}
|
|
408
410
|
function readInstalledPlayDropPlugin(command, runCommand) {
|
|
409
|
-
const list = runCommand(command, [
|
|
411
|
+
const list = runCommand(command, ["plugin", "list", "--json"]);
|
|
410
412
|
if (list.status !== 0) {
|
|
411
413
|
return null;
|
|
412
414
|
}
|
|
413
|
-
return selectPlayDropPlugin(parseInstalledPlugins(list.stdout ??
|
|
415
|
+
return selectPlayDropPlugin(parseInstalledPlugins(list.stdout ?? ""));
|
|
414
416
|
}
|
|
415
417
|
function parseInstalledPlugins(output) {
|
|
416
418
|
try {
|
|
@@ -419,7 +421,7 @@ function parseInstalledPlugins(output) {
|
|
|
419
421
|
return parsed.filter(isInstalledPluginRecord);
|
|
420
422
|
}
|
|
421
423
|
if (isRecord(parsed)) {
|
|
422
|
-
for (const key of [
|
|
424
|
+
for (const key of ["plugins", "installed", "items"]) {
|
|
423
425
|
const value = parsed[key];
|
|
424
426
|
if (Array.isArray(value)) {
|
|
425
427
|
return value.filter(isInstalledPluginRecord);
|
|
@@ -443,10 +445,10 @@ function isInstalledPluginRecord(value) {
|
|
|
443
445
|
return isRecord(value);
|
|
444
446
|
}
|
|
445
447
|
function normalizePluginID(plugin) {
|
|
446
|
-
if (typeof plugin.id ===
|
|
448
|
+
if (typeof plugin.id === "string" && plugin.id.trim()) {
|
|
447
449
|
return plugin.id.trim();
|
|
448
450
|
}
|
|
449
|
-
if (typeof plugin.name ===
|
|
451
|
+
if (typeof plugin.name === "string" && plugin.name.trim()) {
|
|
450
452
|
return plugin.name.trim();
|
|
451
453
|
}
|
|
452
454
|
return undefined;
|
|
@@ -455,14 +457,14 @@ function isPlayDropPluginID(id) {
|
|
|
455
457
|
if (!id) {
|
|
456
458
|
return false;
|
|
457
459
|
}
|
|
458
|
-
return id ===
|
|
460
|
+
return id === "playdrop" || id.startsWith("playdrop@");
|
|
459
461
|
}
|
|
460
462
|
function pluginPriority(plugin) {
|
|
461
463
|
const id = normalizePluginID(plugin);
|
|
462
464
|
if (id === PLAYDROP_PLUGIN_SPEC) {
|
|
463
465
|
return 3;
|
|
464
466
|
}
|
|
465
|
-
if (id ===
|
|
467
|
+
if (id === "playdrop") {
|
|
466
468
|
return 2;
|
|
467
469
|
}
|
|
468
470
|
return isPlayDropPluginID(id) ? 1 : 0;
|
|
@@ -471,42 +473,44 @@ function commandHelpIncludes(helpText, command) {
|
|
|
471
473
|
return new RegExp(`(^|\\n)\\s*${command}(\\s|$)`).test(helpText);
|
|
472
474
|
}
|
|
473
475
|
function commandOutput(result) {
|
|
474
|
-
return [result.stdout, result.stderr].filter(Boolean).join(
|
|
476
|
+
return [result.stdout, result.stderr].filter(Boolean).join("\n");
|
|
475
477
|
}
|
|
476
478
|
function printCursorManualInstall() {
|
|
477
|
-
console.error(
|
|
478
|
-
console.error(
|
|
479
|
-
console.error(
|
|
479
|
+
console.error("Cursor does not expose plugin installation through its CLI.");
|
|
480
|
+
console.error("Open Cursor and use /add-plugin or the Cursor Marketplace to install PlayDrop.");
|
|
481
|
+
console.error("Plugin source: https://github.com/playdrop-ai/playdrop-plugin");
|
|
480
482
|
}
|
|
481
483
|
function formatPluginForAgentsStatus(plugin) {
|
|
482
|
-
if (plugin.status ===
|
|
483
|
-
return plugin.latestVersion
|
|
484
|
+
if (plugin.status === "manual-verification-required") {
|
|
485
|
+
return plugin.latestVersion
|
|
486
|
+
? `manual verification required, latest: ${plugin.latestVersion}`
|
|
487
|
+
: "manual verification required";
|
|
484
488
|
}
|
|
485
|
-
if (plugin.status ===
|
|
486
|
-
return plugin.message ? `unknown (${plugin.message})` :
|
|
489
|
+
if (plugin.status === "unknown") {
|
|
490
|
+
return plugin.message ? `unknown (${plugin.message})` : "unknown";
|
|
487
491
|
}
|
|
488
492
|
if (!plugin.installed) {
|
|
489
|
-
return plugin.latestVersion ? `missing, latest: ${plugin.latestVersion}` :
|
|
493
|
+
return plugin.latestVersion ? `missing, latest: ${plugin.latestVersion}` : "missing";
|
|
490
494
|
}
|
|
491
|
-
const installedVersion = plugin.version ??
|
|
492
|
-
const enabled = plugin.status ===
|
|
495
|
+
const installedVersion = plugin.version ?? "installed";
|
|
496
|
+
const enabled = plugin.status === "activation-required" || plugin.enabled === false ? ", activation required" : "";
|
|
493
497
|
if (plugin.updateAvailable) {
|
|
494
|
-
return `${installedVersion}${enabled}, update available: ${plugin.latestVersion ??
|
|
498
|
+
return `${installedVersion}${enabled}, update available: ${plugin.latestVersion ?? "unknown"}`;
|
|
495
499
|
}
|
|
496
500
|
return `${installedVersion}${enabled}, up to date`;
|
|
497
501
|
}
|
|
498
502
|
function isRecord(value) {
|
|
499
|
-
return typeof value ===
|
|
503
|
+
return typeof value === "object" && value !== null;
|
|
500
504
|
}
|
|
501
505
|
async function runLoginShell(command) {
|
|
502
506
|
return (0, shellProbe_1.runShell)(command);
|
|
503
507
|
}
|
|
504
508
|
function runCommandSync(command, args) {
|
|
505
|
-
const result = (0, node_child_process_1.spawnSync)(command, args, { encoding:
|
|
506
|
-
const spawnError = result.error instanceof Error ? result.error.message :
|
|
509
|
+
const result = (0, node_child_process_1.spawnSync)(command, args, { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
|
|
510
|
+
const spawnError = result.error instanceof Error ? result.error.message : "";
|
|
507
511
|
return {
|
|
508
512
|
status: result.status,
|
|
509
|
-
stdout: result.stdout ??
|
|
510
|
-
stderr: [result.stderr ??
|
|
513
|
+
stdout: result.stdout ?? "",
|
|
514
|
+
stderr: [result.stderr ?? "", spawnError].filter(Boolean).join("\n"),
|
|
511
515
|
};
|
|
512
516
|
}
|