summer-engine 3.8.0 → 4.2.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/.claude-plugin/marketplace.json +2 -13
- package/.claude-plugin/plugin.json +24 -22
- package/.codex-plugin/plugin.json +18 -22
- package/.cursor-plugin/plugin.json +8 -14
- package/.factory-plugin/plugin.json +6 -13
- package/AGENTS.md +19 -12
- package/CHANGELOG.md +133 -0
- package/GEMINI.md +3 -3
- package/README.md +118 -37
- package/assets/icon.png +0 -0
- package/commands/start.md +71 -0
- package/commands/summer.md +3 -2
- package/dist/cli/banner.js +3 -0
- package/dist/cli/commands/config.js +3 -2
- package/dist/cli/commands/create.js +12 -3
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +30 -13
- package/dist/cli/commands/login.d.ts +27 -0
- package/dist/cli/commands/login.js +58 -12
- package/dist/cli/commands/memory.js +6 -2
- package/dist/cli/commands/ops.d.ts +64 -0
- package/dist/cli/commands/ops.js +329 -0
- package/dist/cli/commands/setup.d.ts +4 -0
- package/dist/cli/commands/setup.js +254 -26
- package/dist/cli/commands/skills.js +28 -11
- package/dist/cli/commands/status.d.ts +26 -0
- package/dist/cli/commands/status.js +36 -21
- package/dist/cli/index.js +7 -0
- package/dist/core/agent-host.d.ts +65 -0
- package/dist/core/agent-host.js +193 -0
- package/dist/core/capabilities/agent-playbook.d.ts +3 -0
- package/dist/core/capabilities/agent-playbook.js +54 -2
- package/dist/core/capabilities/apps.d.ts +33 -10
- package/dist/core/capabilities/apps.js +25 -12
- package/dist/core/capabilities/audit/args.d.ts +6 -6
- package/dist/core/capabilities/doctor.d.ts +3 -0
- package/dist/core/capabilities/doctor.js +20 -15
- package/dist/core/capabilities/fabricate-mesh.d.ts +4 -4
- package/dist/core/capabilities/game-task-plan.d.ts +12 -6
- package/dist/core/capabilities/game-task-plan.js +80 -5
- package/dist/core/capabilities/hdri-import.d.ts +2 -2
- package/dist/core/capabilities/motion-generation.d.ts +2 -2
- package/dist/core/capabilities/motion-generation.js +2 -2
- package/dist/core/capabilities/navigation/open.d.ts +6 -2
- package/dist/core/capabilities/navigation/open.js +3 -0
- package/dist/core/capabilities/placement.d.ts +23 -23
- package/dist/core/capabilities/publish-build.js +2 -0
- package/dist/core/capabilities/runtime-control.d.ts +42 -42
- package/dist/core/capabilities/scene-script-target.d.ts +17 -0
- package/dist/core/capabilities/scene-script-target.js +70 -0
- package/dist/core/capabilities/seeing/args.d.ts +16 -16
- package/dist/core/capabilities/sfx-choices.d.ts +4 -0
- package/dist/core/capabilities/sfx-choices.js +13 -6
- package/dist/core/capabilities/tool-dispatch.d.ts +12 -3
- package/dist/core/capabilities/tool-dispatch.js +81 -46
- package/dist/core/capabilities/ui-control.d.ts +2 -2
- package/dist/core/capabilities/world-snapshot.d.ts +4 -4
- package/dist/core/embeddings.d.ts +2 -0
- package/dist/core/embeddings.js +1 -1
- package/dist/core/error-codes.d.ts +62 -0
- package/dist/core/error-codes.js +97 -0
- package/dist/core/format.d.ts +2 -0
- package/dist/core/format.js +2 -1
- package/dist/core/hosted-mcp.d.ts +22 -0
- package/dist/core/hosted-mcp.js +56 -1
- package/dist/core/library-read.js +5 -0
- package/dist/core/library-search.d.ts +2 -2
- package/dist/core/library-search.js +2 -1
- package/dist/core/oauth.js +4 -0
- package/dist/core/ops/areas.d.ts +11 -0
- package/dist/core/ops/areas.js +24 -0
- package/dist/core/ops/catalog.d.ts +45 -0
- package/dist/core/ops/catalog.js +157 -0
- package/dist/core/ops/cloud.d.ts +64 -0
- package/dist/core/ops/cloud.js +198 -0
- package/dist/core/ops/contract.d.ts +120 -0
- package/dist/core/ops/contract.js +134 -0
- package/dist/core/ops/engine-answer.d.ts +25 -0
- package/dist/core/ops/engine-answer.js +117 -0
- package/dist/core/ops/engine.d.ts +55 -0
- package/dist/core/ops/engine.js +649 -0
- package/dist/core/ops/public-catalog.d.ts +48 -0
- package/dist/core/ops/public-catalog.js +56 -0
- package/dist/core/ops/save-files.d.ts +78 -0
- package/dist/core/ops/save-files.js +419 -0
- package/dist/core/ops/search.d.ts +8 -0
- package/dist/core/ops/search.js +187 -0
- package/dist/core/skills-registry.d.ts +16 -1
- package/dist/core/skills-registry.js +35 -2
- package/dist/core/telemetry.d.ts +32 -0
- package/dist/core/telemetry.js +38 -10
- package/dist/core/tool-profiles.d.ts +25 -0
- package/dist/core/tool-profiles.js +41 -0
- package/dist/installer/agent-config.d.ts +17 -4
- package/dist/installer/agent-config.js +27 -6
- package/dist/installer/agent-table.d.ts +12 -0
- package/dist/installer/agent-table.js +33 -9
- package/dist/installer/cli-permissions.d.ts +65 -0
- package/dist/installer/cli-permissions.js +182 -0
- package/dist/installer/setup.d.ts +4 -0
- package/dist/installer/setup.js +12 -4
- package/dist/installer/skills-refresh.d.ts +29 -0
- package/dist/installer/skills-refresh.js +261 -0
- package/dist/installer/version-check.d.ts +51 -11
- package/dist/installer/version-check.js +147 -37
- package/dist/mcp/command.js +7 -0
- package/dist/mcp/hosted-mount.d.ts +27 -2
- package/dist/mcp/hosted-mount.js +53 -23
- package/dist/mcp/legacy-toolset.d.ts +27 -0
- package/dist/mcp/legacy-toolset.js +43 -0
- package/dist/mcp/ops-surface.d.ts +59 -0
- package/dist/mcp/ops-surface.js +453 -0
- package/dist/mcp/server.d.ts +45 -11
- package/dist/mcp/server.js +263 -89
- package/dist/mcp/tool-results.d.ts +26 -0
- package/dist/mcp/tool-results.js +81 -0
- package/dist/mcp/tool-surface.d.ts +65 -0
- package/dist/mcp/tool-surface.js +317 -0
- package/dist/mcp/tools/app-tools.js +9 -2
- package/dist/mcp/tools/asset-tools.js +55 -53
- package/dist/mcp/tools/audit-tools.js +21 -21
- package/dist/mcp/tools/debug-tools.js +6 -6
- package/dist/mcp/tools/fabricate-tools.js +6 -6
- package/dist/mcp/tools/generate-tools.js +76 -70
- package/dist/mcp/tools/project-tools.d.ts +9 -4
- package/dist/mcp/tools/project-tools.js +16 -10
- package/dist/mcp/tools/scene-tools.js +12 -23
- package/dist/mcp/tools/script-tools.js +9 -5
- package/dist/mcp/tools/with-engine.d.ts +6 -0
- package/dist/mcp/tools/with-engine.js +19 -0
- package/dist/project-memory/agent-instructions.d.ts +47 -0
- package/dist/project-memory/agent-instructions.js +226 -0
- package/gemini-extension.json +6 -13
- package/hooks/pre-commit-doctor.sh +5 -4
- package/hooks/session-start.sh +24 -28
- package/integrations/README.md +1 -1
- package/integrations/claude/README.md +6 -0
- package/integrations/claude/manifest-target.json +4 -0
- package/integrations/claude-desktop/README.md +1 -1
- package/integrations/copilot-jetbrains/README.md +1 -1
- package/integrations/gemini/README.md +11 -0
- package/integrations/junie/README.md +1 -1
- package/integrations/lm-studio/README.md +1 -1
- package/integrations/trae/README.md +1 -1
- package/integrations/visual-studio/README.md +1 -1
- package/integrations/windsurf/README.md +1 -1
- package/library/references/mcp-tools-reference/mcp-tools-reference.md +79 -51
- package/library/references/mcp-tools-reference/resource.yaml +1 -1
- package/library/references/product-map/resource.yaml +2 -2
- package/library/skills/3d-lighting/SKILL.md +69 -28
- package/library/skills/3d-lighting/resource.yaml +1 -1
- package/library/skills/README.md +121 -118
- package/library/skills/adaptive-music/SKILL.md +40 -23
- package/library/skills/adaptive-music/resource.yaml +1 -1
- package/library/skills/agent-playtesting/SKILL.md +23 -1
- package/library/skills/agent-playtesting/resource.yaml +1 -1
- package/library/skills/ai-characters-in-games/SKILL.md +16 -1
- package/library/skills/ai-characters-in-games/resource.yaml +1 -1
- package/library/skills/ambient-bed/SKILL.md +38 -13
- package/library/skills/ambient-bed/resource.yaml +1 -1
- package/library/skills/animated-loop/SKILL.md +60 -32
- package/library/skills/animated-loop/resource.yaml +1 -1
- package/library/skills/animation-tree/SKILL.md +27 -1
- package/library/skills/animation-tree/resource.yaml +1 -1
- package/library/skills/art-direction/SKILL.md +17 -3
- package/library/skills/art-direction/resource.yaml +1 -1
- package/library/skills/asset-strategy/SKILL.md +51 -4
- package/library/skills/asset-strategy/resource.yaml +2 -1
- package/library/skills/audio-direction/SKILL.md +26 -10
- package/library/skills/audio-direction/resource.yaml +1 -1
- package/library/skills/auto-fire-targeting/SKILL.md +15 -1
- package/library/skills/auto-fire-targeting/resource.yaml +1 -1
- package/library/skills/bounded-engine-runs/SKILL.md +1 -1
- package/library/skills/bounded-engine-runs/resource.yaml +1 -1
- package/library/skills/brainstorm-game/SKILL.md +14 -1
- package/library/skills/brainstorm-game/resource.yaml +1 -1
- package/library/skills/brainstorming/SKILL.md +1 -1
- package/library/skills/brainstorming/resource.yaml +1 -1
- package/library/skills/browse-templates/SKILL.md +11 -1
- package/library/skills/browse-templates/resource.yaml +1 -1
- package/library/skills/camera-rigs/SKILL.md +22 -2
- package/library/skills/camera-rigs/resource.yaml +1 -1
- package/library/skills/celeste-momentum-platforming/resource.yaml +1 -0
- package/library/skills/character-animation-wiring/SKILL.md +28 -4
- package/library/skills/character-animation-wiring/resource.yaml +1 -1
- package/library/skills/character-model/SKILL.md +83 -47
- package/library/skills/character-model/resource.yaml +1 -1
- package/library/skills/character-movement/SKILL.md +27 -3
- package/library/skills/character-movement/resource.yaml +1 -1
- package/library/skills/character-portrait/SKILL.md +39 -19
- package/library/skills/character-portrait/resource.yaml +1 -1
- package/library/skills/cinematic-cutscene/SKILL.md +79 -46
- package/library/skills/cinematic-cutscene/resource.yaml +1 -1
- package/library/skills/combat-basics/SKILL.md +20 -1
- package/library/skills/combat-basics/resource.yaml +1 -1
- package/library/skills/compatibility-renderer-traps/SKILL.md +12 -1
- package/library/skills/compatibility-renderer-traps/resource.yaml +1 -1
- package/library/skills/concept-art/SKILL.md +29 -12
- package/library/skills/concept-art/resource.yaml +1 -1
- package/library/skills/concept-to-level/SKILL.md +258 -0
- package/library/skills/concept-to-level/references/technical-rules.md +150 -0
- package/library/skills/concept-to-level/resource.yaml +44 -0
- package/library/skills/create-asset-sheet/SKILL.md +37 -13
- package/library/skills/create-asset-sheet/resource.yaml +1 -1
- package/library/skills/debug/SKILL.md +34 -2
- package/library/skills/debug/resource.yaml +1 -1
- package/library/skills/debugging-game-feel/SKILL.md +13 -1
- package/library/skills/debugging-game-feel/resource.yaml +1 -1
- package/library/skills/design-level/SKILL.md +40 -35
- package/library/skills/design-level/resource.yaml +1 -1
- package/library/skills/design-mechanic/SKILL.md +18 -1
- package/library/skills/design-mechanic/resource.yaml +1 -1
- package/library/skills/design-npc/SKILL.md +43 -24
- package/library/skills/design-npc/resource.yaml +1 -1
- package/library/skills/diagnosing-perf-regressions/SKILL.md +13 -1
- package/library/skills/diagnosing-perf-regressions/resource.yaml +1 -1
- package/library/skills/driving-the-editor-ui/SKILL.md +24 -1
- package/library/skills/driving-the-editor-ui/resource.yaml +1 -1
- package/library/skills/environment-kit/SKILL.md +43 -16
- package/library/skills/environment-kit/resource.yaml +1 -1
- package/library/skills/export-and-ship/SKILL.md +29 -6
- package/library/skills/export-and-ship/resource.yaml +1 -1
- package/library/skills/fabricating-assets/SKILL.md +30 -7
- package/library/skills/fabricating-assets/resource.yaml +3 -3
- package/library/skills/facial-and-lipsync/SKILL.md +36 -15
- package/library/skills/facial-and-lipsync/resource.yaml +1 -1
- package/library/skills/fps-controller/SKILL.md +50 -41
- package/library/skills/fps-controller/resource.yaml +1 -1
- package/library/skills/game-feel/SKILL.md +34 -8
- package/library/skills/game-feel/resource.yaml +1 -1
- package/library/skills/gameskill/SKILL.md +15 -4
- package/library/skills/gameskill/resource.yaml +1 -1
- package/library/skills/gdscript-patterns/SKILL.md +16 -1
- package/library/skills/gdscript-patterns/resource.yaml +1 -1
- package/library/skills/generate-motion/SKILL.md +51 -21
- package/library/skills/generate-motion/resource.yaml +1 -1
- package/library/skills/godogen-visual-proof-game-generation/SKILL.md +18 -1
- package/library/skills/godogen-visual-proof-game-generation/resource.yaml +1 -0
- package/library/skills/grow-analytics/SKILL.md +13 -3
- package/library/skills/grow-analytics/resource.yaml +1 -1
- package/library/skills/headless-scripting/SKILL.md +14 -1
- package/library/skills/headless-scripting/resource.yaml +1 -1
- package/library/skills/in-game-purchases/SKILL.md +12 -1
- package/library/skills/in-game-purchases/resource.yaml +1 -1
- package/library/skills/instantiate-asset-pack/SKILL.md +19 -2
- package/library/skills/instantiate-asset-pack/resource.yaml +1 -1
- package/library/skills/lumera-single-image-scene-reconstruction/resource.yaml +1 -0
- package/library/skills/make-game/SKILL.md +33 -4
- package/library/skills/make-game/references/2d-platformer.md +1 -1
- package/library/skills/make-game/references/3d-fps.md +1 -1
- package/library/skills/make-game/references/3d-horror.md +1 -1
- package/library/skills/make-game/references/3d-third-person.md +2 -2
- package/library/skills/make-game/resource.yaml +1 -1
- package/library/skills/multiplayer/SKILL.md +13 -1
- package/library/skills/multiplayer/resource.yaml +1 -1
- package/library/skills/multiplayer-movement/SKILL.md +19 -1
- package/library/skills/multiplayer-movement/resource.yaml +1 -1
- package/library/skills/multiplayer-project/SKILL.md +18 -1
- package/library/skills/multiplayer-project/resource.yaml +1 -1
- package/library/skills/multiplayer-publish/SKILL.md +25 -7
- package/library/skills/multiplayer-publish/resource.yaml +3 -3
- package/library/skills/multiplayer-state/SKILL.md +17 -1
- package/library/skills/multiplayer-state/resource.yaml +1 -1
- package/library/skills/multiplayer-testing/SKILL.md +16 -1
- package/library/skills/multiplayer-testing/resource.yaml +1 -1
- package/library/skills/music-track/SKILL.md +38 -13
- package/library/skills/music-track/resource.yaml +1 -1
- package/library/skills/navigate-summer/SKILL.md +26 -9
- package/library/skills/navigate-summer/resource.yaml +1 -1
- package/library/skills/new-project/SKILL.md +12 -1
- package/library/skills/new-project/resource.yaml +1 -1
- package/library/skills/organic-model/SKILL.md +48 -18
- package/library/skills/organic-model/resource.yaml +1 -1
- package/library/skills/pixel-art/SKILL.md +42 -23
- package/library/skills/pixel-art/resource.yaml +1 -1
- package/library/skills/play/SKILL.md +19 -1
- package/library/skills/play/resource.yaml +1 -1
- package/library/skills/playtesting-a-feature/SKILL.md +24 -1
- package/library/skills/playtesting-a-feature/resource.yaml +1 -1
- package/library/skills/procedural-animation/SKILL.md +38 -16
- package/library/skills/procedural-animation/resource.yaml +1 -1
- package/library/skills/prop-model/SKILL.md +48 -19
- package/library/skills/prop-model/resource.yaml +1 -1
- package/library/skills/psx-retro-rendering/resource.yaml +1 -0
- package/library/skills/publish-your-game/SKILL.md +43 -6
- package/library/skills/publish-your-game/resource.yaml +3 -3
- package/library/skills/realtime-wet-surfaces/resource.yaml +1 -0
- package/library/skills/release-readiness/SKILL.md +13 -1
- package/library/skills/release-readiness/resource.yaml +1 -1
- package/library/skills/remote-deploy/SKILL.md +15 -1
- package/library/skills/remote-deploy/resource.yaml +1 -1
- package/library/skills/retarget/SKILL.md +43 -20
- package/library/skills/retarget/resource.yaml +1 -1
- package/library/skills/running-in-the-cloud/SKILL.md +11 -1
- package/library/skills/running-in-the-cloud/resource.yaml +1 -1
- package/library/skills/save-load/SKILL.md +16 -1
- package/library/skills/save-load/resource.yaml +1 -1
- package/library/skills/scene-composition/SKILL.md +18 -1
- package/library/skills/scene-composition/resource.yaml +1 -1
- package/library/skills/scene-hierarchy-design/SKILL.md +26 -2
- package/library/skills/scene-hierarchy-design/resource.yaml +1 -1
- package/library/skills/scene-scripting/SKILL.md +96 -636
- package/library/skills/scene-scripting/references/ctx-api.md +184 -0
- package/library/skills/scene-scripting/references/recipes-2d-ui.md +193 -0
- package/library/skills/scene-scripting/references/recipes-3d.md +280 -0
- package/library/skills/scene-scripting/resource.yaml +4 -4
- package/library/skills/scene-to-level/SKILL.md +24 -2
- package/library/skills/scene-to-level/resource.yaml +1 -1
- package/library/skills/skill-create/resource.yaml +1 -0
- package/library/skills/skill-improve/resource.yaml +1 -0
- package/library/skills/skill-test/SKILL.md +12 -2
- package/library/skills/skill-test/resource.yaml +1 -0
- package/library/skills/skintokens-auto-rigging/resource.yaml +1 -0
- package/library/skills/skybox-panorama/SKILL.md +47 -21
- package/library/skills/skybox-panorama/resource.yaml +1 -1
- package/library/skills/sound-effect/SKILL.md +52 -20
- package/library/skills/sound-effect/resource.yaml +1 -1
- package/library/skills/spatial-placement/SKILL.md +44 -9
- package/library/skills/spatial-placement/resource.yaml +1 -1
- package/library/skills/sprite-sheet/SKILL.md +55 -27
- package/library/skills/sprite-sheet/resource.yaml +1 -1
- package/library/skills/store-art/SKILL.md +14 -3
- package/library/skills/store-art/resource.yaml +2 -2
- package/library/skills/store-listing/SKILL.md +13 -3
- package/library/skills/store-listing/resource.yaml +2 -2
- package/library/skills/summer-analytics/SKILL.md +22 -5
- package/library/skills/summer-analytics/resource.yaml +2 -2
- package/library/skills/summer-apps/SKILL.md +77 -32
- package/library/skills/summer-apps/manifest.md +1 -1
- package/library/skills/summer-apps/minimal-app.md +7 -7
- package/library/skills/summer-apps/resource.yaml +1 -1
- package/library/skills/summer-apps/sdk-reference.md +5 -5
- package/library/skills/summer-apps-design/SKILL.md +1 -1
- package/library/skills/summer-apps-design/resource.yaml +1 -1
- package/library/skills/summer-assets/SKILL.md +86 -0
- package/library/skills/summer-assets/resource.yaml +34 -0
- package/library/skills/summer-cli/SKILL.md +133 -0
- package/library/skills/summer-cli/resource.yaml +31 -0
- package/library/skills/summer-friends/SKILL.md +14 -0
- package/library/skills/summer-leaderboards/SKILL.md +16 -0
- package/library/skills/summer-match-results/SKILL.md +17 -0
- package/library/skills/summer-matchmaking/SKILL.md +17 -0
- package/library/skills/summer-parties/SKILL.md +14 -0
- package/library/skills/summer-player-data/SKILL.md +14 -0
- package/library/skills/summer-store/SKILL.md +16 -1
- package/library/skills/summer-world-chat/SKILL.md +14 -0
- package/library/skills/summer-world-saves/SKILL.md +14 -0
- package/library/skills/text-to-motion/SKILL.md +45 -23
- package/library/skills/text-to-motion/prompts-and-controls.md +5 -5
- package/library/skills/text-to-motion/resource.yaml +1 -1
- package/library/skills/text-to-motion/rigging-for-text-motion.md +2 -2
- package/library/skills/tileable-texture/SKILL.md +37 -15
- package/library/skills/tileable-texture/resource.yaml +1 -1
- package/library/skills/trailer-shot/SKILL.md +46 -24
- package/library/skills/trailer-shot/resource.yaml +1 -1
- package/library/skills/tune-performance/SKILL.md +32 -6
- package/library/skills/tune-performance/resource.yaml +1 -1
- package/library/skills/ui-basics/SKILL.md +55 -36
- package/library/skills/ui-basics/resource.yaml +1 -1
- package/library/skills/ui-graphics/SKILL.md +64 -38
- package/library/skills/ui-graphics/resource.yaml +1 -1
- package/library/skills/use-widget-asset/SKILL.md +15 -1
- package/library/skills/use-widget-asset/resource.yaml +1 -1
- package/library/skills/using-summer/SKILL.md +32 -5
- package/library/skills/using-summer/resource.yaml +3 -2
- package/library/skills/vehicle-model/SKILL.md +92 -57
- package/library/skills/vehicle-model/resource.yaml +1 -1
- package/library/skills/verification-before-completion/SKILL.md +1 -1
- package/library/skills/verification-before-completion/resource.yaml +1 -1
- package/library/skills/verifying-scenes/SKILL.md +31 -2
- package/library/skills/verifying-scenes/resource.yaml +1 -1
- package/library/skills/vfx-dissolve/SKILL.md +21 -2
- package/library/skills/vfx-dissolve/resource.yaml +1 -1
- package/library/skills/vfx-fire/SKILL.md +41 -41
- package/library/skills/vfx-fire/resource.yaml +1 -1
- package/library/skills/vfx-hit-spark/SKILL.md +24 -1
- package/library/skills/vfx-hit-spark/resource.yaml +1 -1
- package/library/skills/vfx-lightning/SKILL.md +30 -16
- package/library/skills/vfx-lightning/resource.yaml +1 -1
- package/library/skills/vfx-magic-glow/SKILL.md +46 -32
- package/library/skills/vfx-magic-glow/resource.yaml +1 -1
- package/library/skills/vfx-muzzle-flash/SKILL.md +43 -35
- package/library/skills/vfx-muzzle-flash/resource.yaml +1 -1
- package/library/skills/vfx-smoke/SKILL.md +39 -31
- package/library/skills/vfx-smoke/resource.yaml +1 -1
- package/library/skills/vfx-water-ripple/SKILL.md +35 -31
- package/library/skills/vfx-water-ripple/resource.yaml +1 -1
- package/library/skills/voice-line/SKILL.md +87 -40
- package/library/skills/voice-line/resource.yaml +1 -1
- package/library/skills/web-and-touch-input/SKILL.md +20 -1
- package/library/skills/web-and-touch-input/resource.yaml +1 -1
- package/library/skills/web-compatibility-look/SKILL.md +21 -1
- package/library/skills/web-compatibility-look/resource.yaml +1 -1
- package/library/skills/world-building-3d/SKILL.md +29 -1
- package/library/skills/world-building-3d/resource.yaml +1 -1
- package/library/skills/writing-skills/resource.yaml +1 -0
- package/library/tools/add-node/GUIDE.md +14 -0
- package/library/tools/align-distribute-3d/GUIDE.md +7 -0
- package/library/tools/app-call/resource.yaml +1 -1
- package/library/tools/app-guide/resource.yaml +2 -2
- package/library/tools/app-page/resource.yaml +1 -1
- package/library/tools/app-screenshot/resource.yaml +19 -1
- package/library/tools/app-tools/resource.yaml +1 -1
- package/library/tools/attach-to-surface/GUIDE.md +15 -0
- package/library/tools/batch/GUIDE.md +27 -0
- package/library/tools/camera-bookmark/GUIDE.md +12 -0
- package/library/tools/capture-gameplay/GUIDE.md +3 -0
- package/library/tools/capture-gameplay/resource.yaml +3 -3
- package/library/tools/check-job/resource.yaml +1 -1
- package/library/tools/clear-console/GUIDE.md +3 -0
- package/library/tools/connect-ports/GUIDE.md +9 -0
- package/library/tools/connect-signal/GUIDE.md +14 -0
- package/library/tools/create-debug-report/GUIDE.md +10 -0
- package/library/tools/create-scene/GUIDE.md +10 -0
- package/library/tools/debug-views/GUIDE.md +7 -0
- package/library/tools/enable-plugin/GUIDE.md +3 -0
- package/library/tools/export-game/GUIDE.md +3 -0
- package/library/tools/export-game/resource.yaml +3 -3
- package/library/tools/export-templates/GUIDE.md +3 -0
- package/library/tools/fabricate-3d/GUIDE.md +19 -0
- package/library/tools/frame-nodes/GUIDE.md +9 -0
- package/library/tools/frame-shot/GUIDE.md +9 -0
- package/library/tools/game-control/GUIDE.md +9 -0
- package/library/tools/game-input/GUIDE.md +9 -0
- package/library/tools/game-probe/GUIDE.md +9 -0
- package/library/tools/generate-3d/resource.yaml +3 -3
- package/library/tools/generate-motion/resource.yaml +2 -2
- package/library/tools/get-console/GUIDE.md +9 -0
- package/library/tools/get-console/resource.yaml +5 -0
- package/library/tools/get-debugger-errors/GUIDE.md +7 -0
- package/library/tools/get-debugger-errors/resource.yaml +5 -0
- package/library/tools/get-debugger-warnings/GUIDE.md +7 -0
- package/library/tools/get-debugger-warnings/resource.yaml +5 -0
- package/library/tools/get-diagnostics/GUIDE.md +13 -0
- package/library/tools/get-project-context/GUIDE.md +25 -0
- package/library/tools/get-runtime-tree/GUIDE.md +7 -0
- package/library/tools/get-runtime-tree/resource.yaml +5 -0
- package/library/tools/get-scene-tree/GUIDE.md +11 -0
- package/library/tools/get-scene-tree/resource.yaml +5 -0
- package/library/tools/get-script-errors/GUIDE.md +5 -0
- package/library/tools/grep/GUIDE.md +11 -0
- package/library/tools/import-asset/GUIDE.md +8 -0
- package/library/tools/import-asset-by-id/GUIDE.md +12 -0
- package/library/tools/import-from-url/GUIDE.md +10 -0
- package/library/tools/import-from-url-batch/GUIDE.md +3 -0
- package/library/tools/import-hdri/GUIDE.md +16 -0
- package/library/tools/input-map-bind/GUIDE.md +11 -0
- package/library/tools/inspect-asset/GUIDE.md +14 -0
- package/library/tools/inspect-asset/resource.yaml +5 -0
- package/library/tools/inspect-node/GUIDE.md +11 -0
- package/library/tools/inspect-node/resource.yaml +5 -0
- package/library/tools/inspect-resource/GUIDE.md +7 -0
- package/library/tools/inspect-resource/resource.yaml +5 -0
- package/library/tools/inspect-runtime-node/GUIDE.md +7 -0
- package/library/tools/inspect-runtime-node/resource.yaml +5 -0
- package/library/tools/instantiate-scene/GUIDE.md +12 -0
- package/library/tools/is-running/GUIDE.md +3 -0
- package/library/tools/measure/GUIDE.md +8 -0
- package/library/tools/navigation-probe/GUIDE.md +9 -0
- package/library/tools/open/resource.yaml +2 -2
- package/library/tools/open-main-scene/GUIDE.md +6 -0
- package/library/tools/open-scene/GUIDE.md +8 -0
- package/library/tools/place-adjacent/GUIDE.md +7 -0
- package/library/tools/play/GUIDE.md +13 -0
- package/library/tools/project-setting/GUIDE.md +9 -0
- package/library/tools/publish-build/resource.yaml +6 -6
- package/library/tools/raycast/GUIDE.md +7 -0
- package/library/tools/read-file/GUIDE.md +10 -0
- package/library/tools/read-library/resource.yaml +5 -0
- package/library/tools/recent-events/GUIDE.md +7 -0
- package/library/tools/remove-node/GUIDE.md +3 -0
- package/library/tools/repeat-along/GUIDE.md +5 -0
- package/library/tools/replace-node/GUIDE.md +9 -0
- package/library/tools/replace-text/GUIDE.md +5 -0
- package/library/tools/run-editor-script/GUIDE.md +16 -0
- package/library/tools/run-script/GUIDE.md +30 -0
- package/library/tools/run-script/resource.yaml +6 -3
- package/library/tools/runtime-animate/GUIDE.md +7 -0
- package/library/tools/runtime-call/GUIDE.md +7 -0
- package/library/tools/runtime-set/GUIDE.md +9 -0
- package/library/tools/runtime-spawn/GUIDE.md +9 -0
- package/library/tools/save-scene/GUIDE.md +3 -0
- package/library/tools/scene-audit/GUIDE.md +29 -0
- package/library/tools/screenshot/GUIDE.md +17 -0
- package/library/tools/select-node/GUIDE.md +3 -0
- package/library/tools/set-prop/GUIDE.md +23 -0
- package/library/tools/set-resource-property/GUIDE.md +8 -0
- package/library/tools/shot-sheet/GUIDE.md +7 -0
- package/library/tools/snap-to-surface/GUIDE.md +17 -0
- package/library/tools/snapshot-diff/GUIDE.md +7 -0
- package/library/tools/starcast/GUIDE.md +12 -0
- package/library/tools/stop/GUIDE.md +3 -0
- package/library/tools/test-placement/GUIDE.md +7 -0
- package/library/tools/ui-actions/GUIDE.md +12 -0
- package/library/tools/ui-activate/GUIDE.md +11 -0
- package/library/tools/ui-screenshot/GUIDE.md +9 -0
- package/library/tools/ui-tree/GUIDE.md +10 -0
- package/library/tools/wait-for-event/GUIDE.md +11 -0
- package/library/tools/world-snapshot/GUIDE.md +9 -0
- package/library/tools/write-file/GUIDE.md +5 -0
- package/library/tools/zoom/GUIDE.md +5 -0
- package/package.json +8 -5
- package/registry/generated/counts.json +2 -2
- package/registry/generated/gemini-extension.json +6 -13
- package/registry/generated/index.json +482 -349
- package/registry/generated/marketplace.claude.json +2 -13
- package/registry/generated/plugin.claude-directory.json +168 -0
- package/registry/generated/plugin.claude.json +24 -22
- package/registry/generated/plugin.codex.json +18 -22
- package/registry/generated/plugin.cursor.json +8 -14
- package/registry/generated/plugin.factory.json +6 -13
- package/registry/generated/server.json +43 -0
- package/registry/generated/skills-index.md +121 -118
- package/registry/generated/skills-registry.json +167 -115
- package/registry/operations/fixtures/invalid-deprecated-without-replacement.json +60 -0
- package/registry/operations/fixtures/invalid-name.json +60 -0
- package/registry/operations/fixtures/invalid-publish-without-owner.json +82 -0
- package/registry/operations/fixtures/invalid-spend-without-estimate.json +42 -0
- package/registry/operations/fixtures/invalid-unknown-field.json +61 -0
- package/registry/operations/fixtures/valid-player-facing.json +82 -0
- package/registry/operations/fixtures/valid-read.json +60 -0
- package/registry/operations/fixtures/valid-spend.json +43 -0
- package/registry/operations/legacy-names.json +1241 -0
- package/registry/operations/public-catalog.json +33160 -0
- package/registry/schemas/operation.schema.json +318 -0
- package/registry/schemas/skill.schema.json +4 -0
- package/CLAUDE.md +0 -7
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which agent app runs Summer (Claude Code, Codex, Cursor, ...) and which tool
|
|
3
|
+
* made a request, sent as headers on every request to Summer's servers
|
|
4
|
+
* (summerengine.com and the hosted Summer Engine MCP), so usage can be
|
|
5
|
+
* counted per agent app and per tool.
|
|
6
|
+
*
|
|
7
|
+
* The server reads X-Summer-Agent-Host / X-Summer-Agent-Host-Source
|
|
8
|
+
* (publicsummerengine src/lib/mcp/agent-host.ts) into the attribution of the
|
|
9
|
+
* usage rows a request causes, and X-Summer-MCP-Tool on generation errors.
|
|
10
|
+
* X-Summer-Agent-Host-Name / -Version carry the MCP handshake's clientInfo
|
|
11
|
+
* as the app sent it.
|
|
12
|
+
*
|
|
13
|
+
* Host resolution: SUMMER_AGENT_HOST (explicit override), then the MCP
|
|
14
|
+
* initialize handshake's clientInfo.name, then the environment an agent sets
|
|
15
|
+
* for the commands it runs (the CLI surface), else "unknown".
|
|
16
|
+
*
|
|
17
|
+
* SUMMER_NO_TELEMETRY=1 / DO_NOT_TRACK=1 drop the host and tool headers; the
|
|
18
|
+
* product headers (X-Summer-Client, -Version, -Surface) stay, like a
|
|
19
|
+
* user agent.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AGENT_HOST_HEADER = "X-Summer-Agent-Host";
|
|
22
|
+
export declare const AGENT_HOST_SOURCE_HEADER = "X-Summer-Agent-Host-Source";
|
|
23
|
+
export declare const AGENT_HOST_NAME_HEADER = "X-Summer-Agent-Host-Name";
|
|
24
|
+
export declare const AGENT_HOST_VERSION_HEADER = "X-Summer-Agent-Host-Version";
|
|
25
|
+
export declare const MCP_TOOL_HEADER = "X-Summer-MCP-Tool";
|
|
26
|
+
export declare const AGENT_HOST_OVERRIDE_ENV = "SUMMER_AGENT_HOST";
|
|
27
|
+
export type AgentHostSource = "override" | "mcp-client" | "env" | "none";
|
|
28
|
+
export type ClientSurface = "mcp" | "cli";
|
|
29
|
+
export interface AgentHost {
|
|
30
|
+
id: string;
|
|
31
|
+
source: AgentHostSource;
|
|
32
|
+
}
|
|
33
|
+
export interface McpClientInfo {
|
|
34
|
+
name?: string;
|
|
35
|
+
version?: string;
|
|
36
|
+
}
|
|
37
|
+
type Env = Record<string, string | undefined>;
|
|
38
|
+
/** The opt-out switches, the same two the library feedback mailbox honors. */
|
|
39
|
+
export declare function isTelemetryDisabled(env?: Env): boolean;
|
|
40
|
+
/** Lowercase `[a-z0-9-]`, at most 40 characters: the server's host id shape. */
|
|
41
|
+
export declare function sanitizeHostId(raw: string): string;
|
|
42
|
+
/** A known host id, or "other.<name>" for a client Summer does not know yet. */
|
|
43
|
+
export declare function hostFromClientName(name: string | undefined | null): string | null;
|
|
44
|
+
/** AI_AGENT ("<name>_<version>_<mode>") first, then the per-host variables. */
|
|
45
|
+
export declare function hostFromEnv(env: Env): string | null;
|
|
46
|
+
export declare function registerMcpClientSource(source: (() => McpClientInfo | undefined) | null): void;
|
|
47
|
+
export declare function currentMcpClient(): McpClientInfo | undefined;
|
|
48
|
+
export declare function resolveAgentHost(env?: Env, client?: McpClientInfo | undefined): AgentHost;
|
|
49
|
+
interface ToolContext {
|
|
50
|
+
tool: string;
|
|
51
|
+
surface: ClientSurface;
|
|
52
|
+
}
|
|
53
|
+
/** Run one tool call so every Summer request it makes names the tool and surface. */
|
|
54
|
+
export declare function runWithToolContext<T>(tool: string, surface: ClientSurface, fn: () => T): T;
|
|
55
|
+
/** The tool call running now, if any (a tool that runs inside another one sees the outer call). */
|
|
56
|
+
export declare function currentToolContext(): ToolContext | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Headers for a request to Summer's servers. `tool` names the tool when no
|
|
59
|
+
* tool call is running (the endpoint's own tool); a running call's tool wins.
|
|
60
|
+
*/
|
|
61
|
+
export declare function summerRequestHeaders(options?: {
|
|
62
|
+
tool?: string;
|
|
63
|
+
surface?: ClientSurface;
|
|
64
|
+
}, env?: Env): Record<string, string>;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { TOOLKIT_VERSION } from "./version.js";
|
|
3
|
+
/**
|
|
4
|
+
* Which agent app runs Summer (Claude Code, Codex, Cursor, ...) and which tool
|
|
5
|
+
* made a request, sent as headers on every request to Summer's servers
|
|
6
|
+
* (summerengine.com and the hosted Summer Engine MCP), so usage can be
|
|
7
|
+
* counted per agent app and per tool.
|
|
8
|
+
*
|
|
9
|
+
* The server reads X-Summer-Agent-Host / X-Summer-Agent-Host-Source
|
|
10
|
+
* (publicsummerengine src/lib/mcp/agent-host.ts) into the attribution of the
|
|
11
|
+
* usage rows a request causes, and X-Summer-MCP-Tool on generation errors.
|
|
12
|
+
* X-Summer-Agent-Host-Name / -Version carry the MCP handshake's clientInfo
|
|
13
|
+
* as the app sent it.
|
|
14
|
+
*
|
|
15
|
+
* Host resolution: SUMMER_AGENT_HOST (explicit override), then the MCP
|
|
16
|
+
* initialize handshake's clientInfo.name, then the environment an agent sets
|
|
17
|
+
* for the commands it runs (the CLI surface), else "unknown".
|
|
18
|
+
*
|
|
19
|
+
* SUMMER_NO_TELEMETRY=1 / DO_NOT_TRACK=1 drop the host and tool headers; the
|
|
20
|
+
* product headers (X-Summer-Client, -Version, -Surface) stay, like a
|
|
21
|
+
* user agent.
|
|
22
|
+
*/
|
|
23
|
+
export const AGENT_HOST_HEADER = "X-Summer-Agent-Host";
|
|
24
|
+
export const AGENT_HOST_SOURCE_HEADER = "X-Summer-Agent-Host-Source";
|
|
25
|
+
export const AGENT_HOST_NAME_HEADER = "X-Summer-Agent-Host-Name";
|
|
26
|
+
export const AGENT_HOST_VERSION_HEADER = "X-Summer-Agent-Host-Version";
|
|
27
|
+
export const MCP_TOOL_HEADER = "X-Summer-MCP-Tool";
|
|
28
|
+
export const AGENT_HOST_OVERRIDE_ENV = "SUMMER_AGENT_HOST";
|
|
29
|
+
/** The opt-out switches, the same two the library feedback mailbox honors. */
|
|
30
|
+
export function isTelemetryDisabled(env = process.env) {
|
|
31
|
+
return env.SUMMER_NO_TELEMETRY === "1" || env.DO_NOT_TRACK === "1";
|
|
32
|
+
}
|
|
33
|
+
const set = (env, key) => {
|
|
34
|
+
const value = env[key];
|
|
35
|
+
return value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Variables hosts set for the commands they run, most specific first (the
|
|
39
|
+
* convention @vercel/detect-agent reads). CURSOR_TRACE_ID is last: Cursor sets
|
|
40
|
+
* it in every integrated terminal, so Claude Code or Codex inside Cursor wins.
|
|
41
|
+
*/
|
|
42
|
+
const ENV_SIGNALS = [
|
|
43
|
+
{ id: "claude-code", test: (e) => set(e, "CLAUDECODE") || set(e, "CLAUDE_CODE") || set(e, "CLAUDE_CODE_ENTRYPOINT") },
|
|
44
|
+
{ id: "codex", test: (e) => set(e, "CODEX_SANDBOX") || set(e, "CODEX_CI") || set(e, "CODEX_THREAD_ID") },
|
|
45
|
+
{ id: "gemini-cli", test: (e) => set(e, "GEMINI_CLI") },
|
|
46
|
+
{ id: "antigravity", test: (e) => set(e, "ANTIGRAVITY_AGENT") },
|
|
47
|
+
{ id: "augment", test: (e) => set(e, "AUGMENT_AGENT") },
|
|
48
|
+
{ id: "opencode", test: (e) => set(e, "OPENCODE_CLIENT") },
|
|
49
|
+
{ id: "github-copilot", test: (e) => set(e, "COPILOT_MODEL") || set(e, "COPILOT_ALLOW_ALL") || set(e, "COPILOT_GITHUB_TOKEN") },
|
|
50
|
+
{ id: "cursor", test: (e) => set(e, "CURSOR_AGENT") || e.CURSOR_EXTENSION_HOST_ROLE === "agent-exec" },
|
|
51
|
+
{ id: "replit", test: (e) => set(e, "REPL_ID") },
|
|
52
|
+
{ id: "cursor", test: (e) => set(e, "CURSOR_TRACE_ID") },
|
|
53
|
+
];
|
|
54
|
+
/**
|
|
55
|
+
* clientInfo.name patterns (lowercased), most specific first. Names are what
|
|
56
|
+
* each app sends in `initialize`, matched loosely so a renamed build lands.
|
|
57
|
+
*/
|
|
58
|
+
const MCP_CLIENT_PATTERNS = [
|
|
59
|
+
{ id: "claude-code", pattern: /claude[-_ ]?code/ },
|
|
60
|
+
{ id: "claude-desktop", pattern: /^claude(-ai)?$|claude[-_ ]desktop/ },
|
|
61
|
+
{ id: "codex", pattern: /codex/ },
|
|
62
|
+
{ id: "cursor", pattern: /cursor/ },
|
|
63
|
+
{ id: "windsurf", pattern: /windsurf|codeium|cascade|devin/ },
|
|
64
|
+
{ id: "gemini-cli", pattern: /gemini/ },
|
|
65
|
+
{ id: "antigravity", pattern: /antigravity/ },
|
|
66
|
+
{ id: "openclaw", pattern: /openclaw|clawdbot|moltbot/ },
|
|
67
|
+
{ id: "hermes", pattern: /hermes/ },
|
|
68
|
+
{ id: "grok", pattern: /grok/ },
|
|
69
|
+
{ id: "chatgpt", pattern: /chatgpt|openai/ },
|
|
70
|
+
{ id: "roo-code", pattern: /roo[-_ ]?(code|cline)/ },
|
|
71
|
+
{ id: "kilo-code", pattern: /kilo/ },
|
|
72
|
+
{ id: "cline", pattern: /cline/ },
|
|
73
|
+
{ id: "github-copilot", pattern: /copilot/ },
|
|
74
|
+
{ id: "vscode", pattern: /visual studio code|vscode/ },
|
|
75
|
+
{ id: "visual-studio", pattern: /visual studio/ },
|
|
76
|
+
{ id: "zed", pattern: /\bzed\b/ },
|
|
77
|
+
{ id: "opencode", pattern: /opencode/ },
|
|
78
|
+
{ id: "goose", pattern: /goose/ },
|
|
79
|
+
{ id: "amp", pattern: /\bamp\b/ },
|
|
80
|
+
{ id: "kiro", pattern: /kiro/ },
|
|
81
|
+
{ id: "trae", pattern: /trae/ },
|
|
82
|
+
{ id: "qwen-code", pattern: /qwen/ },
|
|
83
|
+
{ id: "kimi-code", pattern: /kimi/ },
|
|
84
|
+
{ id: "crush", pattern: /crush/ },
|
|
85
|
+
{ id: "factory", pattern: /factory|droid/ },
|
|
86
|
+
{ id: "junie", pattern: /junie|jetbrains/ },
|
|
87
|
+
{ id: "warp", pattern: /warp/ },
|
|
88
|
+
{ id: "rovo-dev", pattern: /rovo/ },
|
|
89
|
+
{ id: "qoder", pattern: /qoder/ },
|
|
90
|
+
{ id: "mistral-vibe", pattern: /mistral|vibe/ },
|
|
91
|
+
{ id: "lm-studio", pattern: /lm[-_ ]?studio/ },
|
|
92
|
+
{ id: "continue", pattern: /continue/ },
|
|
93
|
+
{ id: "augment", pattern: /augment/ },
|
|
94
|
+
{ id: "replit", pattern: /replit/ },
|
|
95
|
+
];
|
|
96
|
+
/** Lowercase `[a-z0-9-]`, at most 40 characters: the server's host id shape. */
|
|
97
|
+
export function sanitizeHostId(raw) {
|
|
98
|
+
return raw
|
|
99
|
+
.trim()
|
|
100
|
+
.toLowerCase()
|
|
101
|
+
.replace(/[^a-z0-9-]+/g, "-")
|
|
102
|
+
.replace(/^-+|-+$/g, "")
|
|
103
|
+
.slice(0, 40);
|
|
104
|
+
}
|
|
105
|
+
function matchClientPattern(name) {
|
|
106
|
+
const lower = name.toLowerCase();
|
|
107
|
+
return MCP_CLIENT_PATTERNS.find(({ pattern }) => pattern.test(lower))?.id ?? null;
|
|
108
|
+
}
|
|
109
|
+
/** A known host id, or "other.<name>" for a client Summer does not know yet. */
|
|
110
|
+
export function hostFromClientName(name) {
|
|
111
|
+
if (!name)
|
|
112
|
+
return null;
|
|
113
|
+
const known = matchClientPattern(name);
|
|
114
|
+
if (known)
|
|
115
|
+
return known;
|
|
116
|
+
const fallback = sanitizeHostId(name);
|
|
117
|
+
return fallback ? `other.${fallback}` : null;
|
|
118
|
+
}
|
|
119
|
+
/** AI_AGENT ("<name>_<version>_<mode>") first, then the per-host variables. */
|
|
120
|
+
export function hostFromEnv(env) {
|
|
121
|
+
if (env.AI_AGENT) {
|
|
122
|
+
const declared = hostFromClientName(env.AI_AGENT.split("_")[0]);
|
|
123
|
+
if (declared)
|
|
124
|
+
return declared;
|
|
125
|
+
}
|
|
126
|
+
return ENV_SIGNALS.find(({ test }) => test(env))?.id ?? null;
|
|
127
|
+
}
|
|
128
|
+
// The MCP server registers a getter; it is read at request time, after the
|
|
129
|
+
// initialize handshake has given the client's name and version.
|
|
130
|
+
let mcpClientSource = null;
|
|
131
|
+
export function registerMcpClientSource(source) {
|
|
132
|
+
mcpClientSource = source;
|
|
133
|
+
}
|
|
134
|
+
export function currentMcpClient() {
|
|
135
|
+
try {
|
|
136
|
+
return mcpClientSource?.() ?? undefined;
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
export function resolveAgentHost(env = process.env, client = currentMcpClient()) {
|
|
143
|
+
const override = env[AGENT_HOST_OVERRIDE_ENV] ? sanitizeHostId(env[AGENT_HOST_OVERRIDE_ENV]) : "";
|
|
144
|
+
if (override)
|
|
145
|
+
return { id: override, source: "override" };
|
|
146
|
+
const fromClient = hostFromClientName(client?.name);
|
|
147
|
+
if (fromClient)
|
|
148
|
+
return { id: fromClient, source: "mcp-client" };
|
|
149
|
+
const fromEnv = hostFromEnv(env);
|
|
150
|
+
if (fromEnv)
|
|
151
|
+
return { id: fromEnv, source: "env" };
|
|
152
|
+
return { id: "unknown", source: "none" };
|
|
153
|
+
}
|
|
154
|
+
const toolContext = new AsyncLocalStorage();
|
|
155
|
+
/** Run one tool call so every Summer request it makes names the tool and surface. */
|
|
156
|
+
export function runWithToolContext(tool, surface, fn) {
|
|
157
|
+
return toolContext.run({ tool, surface }, fn);
|
|
158
|
+
}
|
|
159
|
+
/** The tool call running now, if any (a tool that runs inside another one sees the outer call). */
|
|
160
|
+
export function currentToolContext() {
|
|
161
|
+
return toolContext.getStore();
|
|
162
|
+
}
|
|
163
|
+
/** Printable ASCII only, so a header value never breaks a request. */
|
|
164
|
+
const headerValue = (value, max) => value.replace(/[^\x20-\x7e]/g, "").trim().slice(0, max);
|
|
165
|
+
/**
|
|
166
|
+
* Headers for a request to Summer's servers. `tool` names the tool when no
|
|
167
|
+
* tool call is running (the endpoint's own tool); a running call's tool wins.
|
|
168
|
+
*/
|
|
169
|
+
export function summerRequestHeaders(options = {}, env = process.env) {
|
|
170
|
+
const context = toolContext.getStore();
|
|
171
|
+
const surface = context?.surface ?? options.surface ?? (mcpClientSource ? "mcp" : "cli");
|
|
172
|
+
const headers = {
|
|
173
|
+
"X-Summer-Client": "summer-cli",
|
|
174
|
+
"X-Summer-Client-Version": TOOLKIT_VERSION,
|
|
175
|
+
"X-Summer-Client-Surface": surface,
|
|
176
|
+
};
|
|
177
|
+
if (isTelemetryDisabled(env))
|
|
178
|
+
return headers;
|
|
179
|
+
const client = surface === "mcp" ? currentMcpClient() : undefined;
|
|
180
|
+
const host = resolveAgentHost(env, client);
|
|
181
|
+
headers[AGENT_HOST_HEADER] = host.id;
|
|
182
|
+
headers[AGENT_HOST_SOURCE_HEADER] = host.source;
|
|
183
|
+
const name = client?.name ? headerValue(client.name, 64) : "";
|
|
184
|
+
const version = client?.version ? headerValue(client.version, 32) : "";
|
|
185
|
+
if (name)
|
|
186
|
+
headers[AGENT_HOST_NAME_HEADER] = name;
|
|
187
|
+
if (version)
|
|
188
|
+
headers[AGENT_HOST_VERSION_HEADER] = version;
|
|
189
|
+
const tool = context?.tool ?? options.tool;
|
|
190
|
+
if (tool)
|
|
191
|
+
headers[MCP_TOOL_HEADER] = tool;
|
|
192
|
+
return headers;
|
|
193
|
+
}
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
export interface AgentPlaybookOptions {
|
|
16
16
|
/** The MCP layer's cached "Summer update available" notice, if any. */
|
|
17
17
|
summerUpdateNotice?: string | null;
|
|
18
|
+
/** False for a session without engine tools (the assets profile): the
|
|
19
|
+
* playbook then covers finding, generating and handing over files. */
|
|
20
|
+
engine?: boolean;
|
|
18
21
|
}
|
|
19
22
|
export declare function buildAgentPlaybook(options?: AgentPlaybookOptions): Record<string, unknown>;
|
|
20
23
|
export declare function renderAgentPlaybook(options?: AgentPlaybookOptions): string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export function buildAgentPlaybook(options = {}) {
|
|
2
|
+
if (options.engine === false)
|
|
3
|
+
return buildAssetsPlaybook(options);
|
|
2
4
|
return {
|
|
3
5
|
summerUpdateNotice: options.summerUpdateNotice ?? null,
|
|
4
6
|
// ------------------------------------------------------------------
|
|
@@ -204,7 +206,7 @@ export function buildAgentPlaybook(options = {}) {
|
|
|
204
206
|
"summer_get_project_context",
|
|
205
207
|
"Choose the exact res:// scenePath. OpenScene is a user-visible tab action, not a mutation prerequisite.",
|
|
206
208
|
"summer_world_snapshot (keep the snapshot_id) — or summer_get_scene_tree with scenePath for the hierarchy view.",
|
|
207
|
-
"
|
|
209
|
+
"3 or more scene edits: one summer_run_script with scenePath (snapshot, script, diff, screenshot). A single tweak: summer_set_prop / summer_set_resource_property with scenePath.",
|
|
208
210
|
"Mutation tools append one final SaveScene; use summer_save_scene only for a standalone save/save-as.",
|
|
209
211
|
"summer_snapshot_diff from_id:<the id> + summer_screenshot — then summer_get_diagnostics.",
|
|
210
212
|
],
|
|
@@ -226,7 +228,7 @@ export function buildAgentPlaybook(options = {}) {
|
|
|
226
228
|
],
|
|
227
229
|
// Scene scripting: when one GDScript beats a chain of CRUD ops.
|
|
228
230
|
scripting: [
|
|
229
|
-
"Single property tweak -> summer_set_prop. Composition or ANY computed placement (3+ related ops, scatter/grids/rings, procedural meshes, bulk edits) -> summer_run_script: one GDScript `func run(ctx):` executed in the LIVE editor against
|
|
231
|
+
"Single property tweak -> summer_set_prop. Composition or ANY computed placement (3+ related ops, scatter/grids/rings, procedural meshes, bulk edits) -> summer_run_script: one GDScript `func run(ctx):` executed in the LIVE editor against its scenePath (opened first when needed), with ctx.get_scene_root() / ctx.report(key, value) / print capture.",
|
|
230
232
|
"OWNERSHIP in scripts: call ctx.set_owner_recursive(node) AFTER add_child on every created subtree (manual form: node.owner = root on the node AND each descendant), or the nodes silently vanish on save. The ctx creation helpers (ctx.add_node, ctx.add_mesh, ctx.instance_scene, ...) set the owner for you — prefer them.",
|
|
231
233
|
"Cold batch/project-wide jobs (re-save every scene, resource sweeps, long bakes) -> summer_run_editor_script: a fresh HEADLESS child editor against the ON-DISK project. Unsaved live edits are invisible to it; it has no renderer, so it can never screenshot.",
|
|
232
234
|
"Property/method/signal lookup -> summer_api_docs (offline class reference, stamped with the engine technical base it was generated from). Verify names before scripting instead of guessing; entries list declared members only, so walk `inherits` for inherited ones.",
|
|
@@ -259,6 +261,56 @@ export function buildAgentPlaybook(options = {}) {
|
|
|
259
261
|
],
|
|
260
262
|
};
|
|
261
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* The playbook for the assets profile: the same habits (search the library
|
|
266
|
+
* first, reuse before generating, confirm spend, never describe an image you
|
|
267
|
+
* did not receive) without any engine tool, ending at a file the person can
|
|
268
|
+
* use in any engine or web app.
|
|
269
|
+
*/
|
|
270
|
+
function buildAssetsPlaybook(options) {
|
|
271
|
+
return {
|
|
272
|
+
summerUpdateNotice: options.summerUpdateNotice ?? null,
|
|
273
|
+
profile: "assets",
|
|
274
|
+
scope: [
|
|
275
|
+
"This session has generation, the Summer asset library, account and library search, and no Summer Engine tools: no project context, scenes, play, screenshots or imports. You deliver files, not scenes.",
|
|
276
|
+
"Load the summer-assets skill (summer_read_library skill/summer-assets) for the whole loop.",
|
|
277
|
+
"If the person wants a game built in Summer Engine, say that needs the full setup: npx -y summer-engine@latest setup <agent> --yes, then open the project in Summer Engine.",
|
|
278
|
+
],
|
|
279
|
+
step0_askFirst: [
|
|
280
|
+
"Ask once, in one message, what the asset is for: the engine or app, the file format, the size or scale, the style, how many.",
|
|
281
|
+
"Then summer_search_library for the asset's skill and summer_read_library it before you generate.",
|
|
282
|
+
"Asset skills are written for Summer Engine too. Follow each one until the asset exists, then read its 'Without Summer Engine' section: skip every step that imports into a project (summer_import_asset_by_id, summer_import_from_url) or adds nodes to a scene (summer_add_node, summer_set_prop). Those tools are not in this session.",
|
|
283
|
+
],
|
|
284
|
+
contentRouting: {
|
|
285
|
+
priorityOrder: ["1_reuseMyAssets", "2_assetLibrary", "3_generation"],
|
|
286
|
+
"1_reuseMyAssets": "summer_list_my_assets: the person's own uploads and earlier generations. Never generate an asset they already have.",
|
|
287
|
+
"2_assetLibrary": "summer_search_assets (source: library | my_assets | all), then summer_get_asset for the hit.",
|
|
288
|
+
"3_generation": "summer_generate_image / summer_generate_3d / summer_generate_audio / summer_generate_sfx_choices / summer_generate_video / summer_generate_motion, then summer_check_job until the state is terminal (never continue on a pending job), then summer_get_asset with the asset id the job returned (never search by name right after a generation). The summer_tool_* generators load after summer login; when they are missing, summer_store_tools says why.",
|
|
289
|
+
},
|
|
290
|
+
handOff: [
|
|
291
|
+
"summer_generate_image saves the file itself when you pass out (a folder or a file path in the person's project).",
|
|
292
|
+
"For every other asset, summer_get_asset_download_url (role primary, or thumbnail for a preview) returns a link: download it with your own shell into the folder the person named, and keep a clear file name.",
|
|
293
|
+
"Formats: GLB for 3D models, PNG, JPG or WebP for images, MP3 or WAV for audio, MP4 for video. Generated models are not at real-world size: give the person the target size.",
|
|
294
|
+
"Tell the person the path, the format and anything their engine must set (looping, texture filtering, scale).",
|
|
295
|
+
],
|
|
296
|
+
costRules: [
|
|
297
|
+
"Generation uses the person's Summer credits: say what you will make and how many versions, and wait for a yes. Search and download are free.",
|
|
298
|
+
"Never run a paid generation again for the same item: download the asset you already have.",
|
|
299
|
+
],
|
|
300
|
+
honestyRules: [
|
|
301
|
+
"Never describe an image you did not receive. Look at the preview (the localPath of a generated image, or the thumbnail) before you say it looks right; for audio, the person listens.",
|
|
302
|
+
"A failed or pending job is a result: report its state and error as returned, do not claim the asset exists.",
|
|
303
|
+
],
|
|
304
|
+
doneMeans: [
|
|
305
|
+
"The job finished without an error.",
|
|
306
|
+
"You saw the preview, or the person heard the sound.",
|
|
307
|
+
"The file is where the person asked, and you told them the path and format.",
|
|
308
|
+
],
|
|
309
|
+
libraryFeedback: [
|
|
310
|
+
"At a natural checkpoint, call summer_library_feedback once with every skill you loaded: 'worked' only after the asset was checked as above, 'worked_with_fixes' with the deviation, 'wrong'/'outdated'/'incomplete' when the entry misled you.",
|
|
311
|
+
],
|
|
312
|
+
};
|
|
313
|
+
}
|
|
262
314
|
export function renderAgentPlaybook(options = {}) {
|
|
263
315
|
return JSON.stringify(buildAgentPlaybook(options), null, 2);
|
|
264
316
|
}
|
|
@@ -18,9 +18,9 @@ export declare const APP_DOCK_SLOTS: readonly ["left", "right", "bottom"];
|
|
|
18
18
|
export declare const appGuideArgsSchema: z.ZodObject<{
|
|
19
19
|
section: z.ZodDefault<z.ZodEnum<["all", "overview", "manifest", "sdk", "kit", "layout", "design", "examples", "types"]>>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
section: "all" | "
|
|
21
|
+
section: "all" | "examples" | "kit" | "layout" | "manifest" | "overview" | "sdk" | "design" | "types";
|
|
22
22
|
}, {
|
|
23
|
-
section?: "all" | "
|
|
23
|
+
section?: "all" | "examples" | "kit" | "layout" | "manifest" | "overview" | "sdk" | "design" | "types" | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export declare const appListArgsSchema: z.ZodObject<{
|
|
26
26
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
@@ -80,8 +80,8 @@ export declare const appPublishArgsSchema: z.ZodObject<{
|
|
|
80
80
|
path: string;
|
|
81
81
|
content: string;
|
|
82
82
|
}[] | undefined;
|
|
83
|
-
idempotencyKey?: string | undefined;
|
|
84
83
|
dir?: string | undefined;
|
|
84
|
+
idempotencyKey?: string | undefined;
|
|
85
85
|
layout?: Record<string, unknown> | undefined;
|
|
86
86
|
}, {
|
|
87
87
|
manifest: Record<string, unknown>;
|
|
@@ -92,8 +92,8 @@ export declare const appPublishArgsSchema: z.ZodObject<{
|
|
|
92
92
|
content: string;
|
|
93
93
|
encoding?: "utf8" | "base64" | undefined;
|
|
94
94
|
}[] | undefined;
|
|
95
|
-
idempotencyKey?: string | undefined;
|
|
96
95
|
dir?: string | undefined;
|
|
96
|
+
idempotencyKey?: string | undefined;
|
|
97
97
|
layout?: Record<string, unknown> | undefined;
|
|
98
98
|
}>;
|
|
99
99
|
export declare const appGetArgsSchema: z.ZodObject<{
|
|
@@ -109,15 +109,15 @@ export declare const appEventsArgsSchema: z.ZodObject<{
|
|
|
109
109
|
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
110
110
|
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["agent", "error", "feedback", "tool"]>, "many">>;
|
|
111
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
timeoutSeconds: number;
|
|
113
112
|
after: number;
|
|
113
|
+
timeoutSeconds: number;
|
|
114
114
|
appId: string;
|
|
115
115
|
kinds?: ("error" | "agent" | "tool" | "feedback")[] | undefined;
|
|
116
116
|
}, {
|
|
117
117
|
appId: string;
|
|
118
118
|
kinds?: ("error" | "agent" | "tool" | "feedback")[] | undefined;
|
|
119
|
-
timeoutSeconds?: number | undefined;
|
|
120
119
|
after?: number | undefined;
|
|
120
|
+
timeoutSeconds?: number | undefined;
|
|
121
121
|
}>;
|
|
122
122
|
export declare const appPageArgsSchema: z.ZodObject<{
|
|
123
123
|
appId: z.ZodString;
|
|
@@ -155,14 +155,14 @@ export declare const appUpdateArgsSchema: z.ZodObject<{
|
|
|
155
155
|
folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
appId: string;
|
|
158
|
-
status?: "scratch" | "kept" | "archived" | undefined;
|
|
159
158
|
name?: string | undefined;
|
|
159
|
+
status?: "kept" | "scratch" | "archived" | undefined;
|
|
160
160
|
folder?: string | null | undefined;
|
|
161
161
|
purpose?: string | undefined;
|
|
162
162
|
}, {
|
|
163
163
|
appId: string;
|
|
164
|
-
status?: "scratch" | "kept" | "archived" | undefined;
|
|
165
164
|
name?: string | undefined;
|
|
165
|
+
status?: "kept" | "scratch" | "archived" | undefined;
|
|
166
166
|
folder?: string | null | undefined;
|
|
167
167
|
purpose?: string | undefined;
|
|
168
168
|
}>;
|
|
@@ -174,6 +174,19 @@ export declare const appScreenshotArgsSchema: z.ZodObject<{
|
|
|
174
174
|
theme: z.ZodDefault<z.ZodEnum<["light", "dark"]>>;
|
|
175
175
|
fullPage: z.ZodDefault<z.ZodBoolean>;
|
|
176
176
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
177
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
178
|
+
click: z.ZodOptional<z.ZodString>;
|
|
179
|
+
press: z.ZodOptional<z.ZodString>;
|
|
180
|
+
wait: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
wait?: number | undefined;
|
|
183
|
+
press?: string | undefined;
|
|
184
|
+
click?: string | undefined;
|
|
185
|
+
}, {
|
|
186
|
+
wait?: number | undefined;
|
|
187
|
+
press?: string | undefined;
|
|
188
|
+
click?: string | undefined;
|
|
189
|
+
}>, "many">>;
|
|
177
190
|
out: z.ZodOptional<z.ZodString>;
|
|
178
191
|
}, "strip", z.ZodTypeAny, {
|
|
179
192
|
width: number;
|
|
@@ -184,6 +197,11 @@ export declare const appScreenshotArgsSchema: z.ZodObject<{
|
|
|
184
197
|
version?: number | undefined;
|
|
185
198
|
params?: Record<string, string> | undefined;
|
|
186
199
|
out?: string | undefined;
|
|
200
|
+
steps?: {
|
|
201
|
+
wait?: number | undefined;
|
|
202
|
+
press?: string | undefined;
|
|
203
|
+
click?: string | undefined;
|
|
204
|
+
}[] | undefined;
|
|
187
205
|
}, {
|
|
188
206
|
appId: string;
|
|
189
207
|
version?: number | undefined;
|
|
@@ -192,6 +210,11 @@ export declare const appScreenshotArgsSchema: z.ZodObject<{
|
|
|
192
210
|
params?: Record<string, string> | undefined;
|
|
193
211
|
out?: string | undefined;
|
|
194
212
|
theme?: "light" | "dark" | undefined;
|
|
213
|
+
steps?: {
|
|
214
|
+
wait?: number | undefined;
|
|
215
|
+
press?: string | undefined;
|
|
216
|
+
click?: string | undefined;
|
|
217
|
+
}[] | undefined;
|
|
195
218
|
fullPage?: boolean | undefined;
|
|
196
219
|
}>;
|
|
197
220
|
export declare const appDataArgsSchema: z.ZodObject<{
|
|
@@ -205,16 +228,16 @@ export declare const appDataArgsSchema: z.ZodObject<{
|
|
|
205
228
|
limit: number;
|
|
206
229
|
appId: string;
|
|
207
230
|
ops?: Record<string, unknown>[] | undefined;
|
|
208
|
-
after?: string | undefined;
|
|
209
231
|
as?: "seed" | "agent" | undefined;
|
|
210
232
|
collection?: string | undefined;
|
|
233
|
+
after?: string | undefined;
|
|
211
234
|
}, {
|
|
212
235
|
appId: string;
|
|
213
236
|
ops?: Record<string, unknown>[] | undefined;
|
|
214
237
|
limit?: number | undefined;
|
|
215
|
-
after?: string | undefined;
|
|
216
238
|
as?: "seed" | "agent" | undefined;
|
|
217
239
|
collection?: string | undefined;
|
|
240
|
+
after?: string | undefined;
|
|
218
241
|
}>;
|
|
219
242
|
export declare const appToolsArgsSchema: z.ZodObject<{
|
|
220
243
|
appId: z.ZodString;
|
|
@@ -3,7 +3,8 @@ import path from "node:path";
|
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { getAuthToken } from "../auth.js";
|
|
5
5
|
import { resolveGatewayUrl } from "../config.js";
|
|
6
|
-
import {
|
|
6
|
+
import { summerRequestHeaders } from "../agent-host.js";
|
|
7
|
+
import { codedFailure, describeNetworkError, networkDetails, NOT_SIGNED_IN, SIGN_IN_AGAIN_RECOVERY } from "../error-codes.js";
|
|
7
8
|
/**
|
|
8
9
|
* Summer Apps (summer_app_*): tools a game team uses inside Summer Studio,
|
|
9
10
|
* built by agents. Every cloud tool here calls the Summer web API under
|
|
@@ -30,8 +31,8 @@ const jsonObject = z.record(z.unknown());
|
|
|
30
31
|
export const appGuideArgsSchema = z.object({
|
|
31
32
|
section: z
|
|
32
33
|
.enum(APP_GUIDE_SECTIONS)
|
|
33
|
-
.default("
|
|
34
|
-
.describe("
|
|
34
|
+
.default("overview")
|
|
35
|
+
.describe("Start with overview (the default), then read what the app needs: examples (a working app to copy), sdk, manifest, kit, design, layout, types (exact SDK TypeScript types). all returns every section but types (about 100 KB)"),
|
|
35
36
|
});
|
|
36
37
|
export const appListArgsSchema = z.object({
|
|
37
38
|
workspaceId: z.string().uuid().optional().describe("Only this workspace (team). Default: every workspace the person is in"),
|
|
@@ -96,6 +97,11 @@ export const appScreenshotArgsSchema = z.object({
|
|
|
96
97
|
theme: z.enum(["light", "dark"]).default("light"),
|
|
97
98
|
fullPage: z.boolean().default(false).describe("Capture the whole scroll height (up to 4000 px)"),
|
|
98
99
|
params: z.record(z.string().max(500)).optional().describe("Launch params, as in /studio/apps/<id>?key=value"),
|
|
100
|
+
steps: z
|
|
101
|
+
.array(z.object({ click: z.string().max(300).optional(), press: z.string().max(40).optional(), wait: z.number().int().min(0).max(3000).optional() }))
|
|
102
|
+
.max(5)
|
|
103
|
+
.optional()
|
|
104
|
+
.describe('Before the capture, in order: click a CSS selector in the app (">>>" reaches inside kit components), press a declared action id, or wait ms. Use it to see a dialog or a second state'),
|
|
99
105
|
out: z.string().min(1).optional().describe("Also save the PNG to this local path"),
|
|
100
106
|
});
|
|
101
107
|
export const appDataArgsSchema = z.object({
|
|
@@ -136,7 +142,7 @@ export function appsGateway(surface, tool) {
|
|
|
136
142
|
return {
|
|
137
143
|
ok: false,
|
|
138
144
|
status: 401,
|
|
139
|
-
data: { error: { code: "
|
|
145
|
+
data: { error: { code: "not_signed_in", message: NOT_SIGNED_IN } },
|
|
140
146
|
};
|
|
141
147
|
const gateway = await resolveGatewayUrl();
|
|
142
148
|
const suffix = query?.toString() ? `?${query.toString()}` : "";
|
|
@@ -145,12 +151,9 @@ export function appsGateway(surface, tool) {
|
|
|
145
151
|
response = await fetch(`${gateway}${endpoint}${suffix}`, {
|
|
146
152
|
method,
|
|
147
153
|
headers: {
|
|
154
|
+
...summerRequestHeaders({ tool, surface }),
|
|
148
155
|
Authorization: `Bearer ${token}`,
|
|
149
|
-
"X-Summer-Client": "summer-cli",
|
|
150
|
-
"X-Summer-Client-Version": TOOLKIT_VERSION,
|
|
151
|
-
"X-Summer-Client-Surface": surface,
|
|
152
156
|
"X-Summer-MCP-Endpoint": endpoint,
|
|
153
|
-
"X-Summer-MCP-Tool": tool,
|
|
154
157
|
...(body !== undefined ? { "Content-Type": "application/json" } : {}),
|
|
155
158
|
},
|
|
156
159
|
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
@@ -158,7 +161,7 @@ export function appsGateway(surface, tool) {
|
|
|
158
161
|
});
|
|
159
162
|
}
|
|
160
163
|
catch (error) {
|
|
161
|
-
return { ok: false, status: 0, data: { error: { code: "unavailable", message: `Request failed: ${error
|
|
164
|
+
return { ok: false, status: 0, data: { error: { code: "unavailable", message: `Request failed: ${describeNetworkError(error)}`, ...networkDetails(error) } } };
|
|
162
165
|
}
|
|
163
166
|
const text = await response.text().catch(() => "");
|
|
164
167
|
let data = {};
|
|
@@ -171,21 +174,31 @@ export function appsGateway(surface, tool) {
|
|
|
171
174
|
return { ok: response.ok, status: response.status, data };
|
|
172
175
|
};
|
|
173
176
|
}
|
|
174
|
-
/** The server's `{error: {code, message}}` as one flat result an agent can act on.
|
|
177
|
+
/** The server's `{error: {code, message}}` as one flat result an agent can act on.
|
|
178
|
+
* Not signed in, no credits and network failures carry the shared codes
|
|
179
|
+
* (core/error-codes.ts); the server's own codes pass through. */
|
|
175
180
|
function failure(reply) {
|
|
176
181
|
const error = reply.data.error;
|
|
177
182
|
const record = error && typeof error === "object" ? error : {};
|
|
178
183
|
const code = typeof record.code === "string" ? record.code : reply.status === 404 ? "not_found" : "unavailable";
|
|
179
184
|
const message = typeof record.message === "string" ? record.message : typeof reply.data.message === "string" ? reply.data.message : `Request failed (${reply.status})`;
|
|
185
|
+
const { error: _error, message: _message, ...rest } = reply.data;
|
|
186
|
+
const extra = { status: reply.status, ...rest, ...(record.details ? { details: record.details } : {}) };
|
|
187
|
+
if (code === "not_signed_in")
|
|
188
|
+
return codedFailure("not_signed_in", message, extra);
|
|
189
|
+
if (code === "unauthorized" || reply.status === 401)
|
|
190
|
+
return codedFailure("not_signed_in", message, extra, SIGN_IN_AGAIN_RECOVERY);
|
|
191
|
+
if (reply.status === 402)
|
|
192
|
+
return codedFailure("no_credits", message, extra);
|
|
193
|
+
if (reply.status === 0)
|
|
194
|
+
return codedFailure("unavailable", message, extra);
|
|
180
195
|
const hints = {
|
|
181
|
-
unauthorized: "Run: npx -y summer-engine@latest login",
|
|
182
196
|
not_found: "Summer Apps is not available for this account yet, or the app id is wrong: summer_app_list shows the person's apps.",
|
|
183
197
|
app_not_open: "Use summer_app_data, or ask the person to open the app in Summer Studio.",
|
|
184
198
|
invalid: "Fix what the message names and try again (summer_app_guide has the rules).",
|
|
185
199
|
too_large: "Limits: 10 MB per app, 300 files, 5 MB per file.",
|
|
186
200
|
rate_limited: "Wait a minute and try again.",
|
|
187
201
|
};
|
|
188
|
-
const { error: _error, message: _message, ...rest } = reply.data;
|
|
189
202
|
return { ok: false, code, error: message, status: reply.status, ...(hints[code] ? { hint: hints[code] } : {}), ...rest, ...(record.details ? { details: record.details } : {}) };
|
|
190
203
|
}
|
|
191
204
|
const done = (reply) => (reply.ok ? { ok: true, ...reply.data } : failure(reply));
|
|
@@ -71,10 +71,10 @@ export declare const sceneAuditArgsSchema: z.ZodObject<{
|
|
|
71
71
|
limit?: number | undefined;
|
|
72
72
|
root?: string | undefined;
|
|
73
73
|
scenePath?: string | undefined;
|
|
74
|
-
render?: "none" | "sheet" | undefined;
|
|
75
|
-
checks?: ("resource" | "through_hole" | "floor_gap" | "floating" | "sunken" | "interpenetration" | "exposed_edge" | "open_fixture_end" | "orientation" | "uv_stretch" | "duplicate" | "z_fight" | "depth_step" | "lights" | "transform")[] | undefined;
|
|
76
|
-
min_severity?: "error" | "warn" | "look" | undefined;
|
|
77
74
|
offset?: number | undefined;
|
|
75
|
+
min_severity?: "error" | "warn" | "look" | undefined;
|
|
76
|
+
render?: "none" | "sheet" | undefined;
|
|
77
|
+
checks?: ("resource" | "transform" | "through_hole" | "floor_gap" | "floating" | "sunken" | "interpenetration" | "exposed_edge" | "open_fixture_end" | "orientation" | "uv_stretch" | "duplicate" | "z_fight" | "depth_step" | "lights")[] | undefined;
|
|
78
78
|
budget_ms?: number | undefined;
|
|
79
79
|
show_accepted?: boolean | undefined;
|
|
80
80
|
}, {
|
|
@@ -85,10 +85,10 @@ export declare const sceneAuditArgsSchema: z.ZodObject<{
|
|
|
85
85
|
limit?: number | undefined;
|
|
86
86
|
root?: string | undefined;
|
|
87
87
|
scenePath?: string | undefined;
|
|
88
|
-
render?: "none" | "sheet" | undefined;
|
|
89
|
-
checks?: ("resource" | "through_hole" | "floor_gap" | "floating" | "sunken" | "interpenetration" | "exposed_edge" | "open_fixture_end" | "orientation" | "uv_stretch" | "duplicate" | "z_fight" | "depth_step" | "lights" | "transform")[] | undefined;
|
|
90
|
-
min_severity?: "error" | "warn" | "look" | undefined;
|
|
91
88
|
offset?: number | undefined;
|
|
89
|
+
min_severity?: "error" | "warn" | "look" | undefined;
|
|
90
|
+
render?: "none" | "sheet" | undefined;
|
|
91
|
+
checks?: ("resource" | "transform" | "through_hole" | "floor_gap" | "floating" | "sunken" | "interpenetration" | "exposed_edge" | "open_fixture_end" | "orientation" | "uv_stretch" | "duplicate" | "z_fight" | "depth_step" | "lights")[] | undefined;
|
|
92
92
|
budget_ms?: number | undefined;
|
|
93
93
|
show_accepted?: boolean | undefined;
|
|
94
94
|
}>;
|
|
@@ -22,6 +22,9 @@ interface DoctorOptions {
|
|
|
22
22
|
quiet?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export declare function runDoctor(options?: DoctorOptions): Promise<DoctorResult>;
|
|
25
|
+
/** The oldest Node major the package supports: `engines.node` in package.json. */
|
|
26
|
+
export declare const MIN_NODE_MAJOR = 20;
|
|
27
|
+
export declare function checkNodeVersion(nodeVersion?: string): DoctorCheck;
|
|
25
28
|
export declare function checkLogin(): Promise<DoctorCheck>;
|
|
26
29
|
/**
|
|
27
30
|
* Store access: with a store sign-in ("summer login --store"), ask the store
|