summer-engine 3.1.0 → 3.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 -2
- package/.claude-plugin/plugin.json +27 -5
- package/.codex-plugin/plugin.json +28 -6
- package/.cursor-plugin/plugin.json +27 -5
- package/.factory-plugin/plugin.json +27 -5
- package/.opencode/plugins/summer.js +1 -1
- package/CHANGELOG.md +102 -0
- package/README.md +18 -3
- package/assets/audit/scene_audit.gd +4136 -0
- package/assets/seeing/seeing_probe.gd +1873 -0
- package/dist/cli/commands/skills.js +20 -2
- package/dist/core/api-client.d.ts +9 -1
- package/dist/core/api-client.js +21 -4
- package/dist/core/capabilities/agent-playbook.js +46 -0
- package/dist/core/capabilities/audit/accept.d.ts +55 -0
- package/dist/core/capabilities/audit/accept.js +147 -0
- package/dist/core/capabilities/audit/args.d.ts +95 -0
- package/dist/core/capabilities/audit/args.js +89 -0
- package/dist/core/capabilities/audit/audit.d.ts +56 -0
- package/dist/core/capabilities/audit/audit.js +287 -0
- package/dist/core/capabilities/audit/frame.d.ts +14 -0
- package/dist/core/capabilities/audit/frame.js +35 -0
- package/dist/core/capabilities/audit/gaps.d.ts +96 -0
- package/dist/core/capabilities/audit/gaps.js +257 -0
- package/dist/core/capabilities/audit/judge.d.ts +162 -0
- package/dist/core/capabilities/audit/judge.js +1134 -0
- package/dist/core/capabilities/audit/math.d.ts +110 -0
- package/dist/core/capabilities/audit/math.js +263 -0
- package/dist/core/capabilities/audit/summary.d.ts +74 -0
- package/dist/core/capabilities/audit/summary.js +212 -0
- package/dist/core/capabilities/board.d.ts +31 -0
- package/dist/core/capabilities/board.js +43 -0
- package/dist/core/capabilities/camera-view.d.ts +4 -2
- package/dist/core/capabilities/camera-view.js +6 -3
- package/dist/core/capabilities/connect-signal.d.ts +85 -0
- package/dist/core/capabilities/connect-signal.js +285 -0
- package/dist/core/capabilities/engine-fallbacks.d.ts +5 -0
- package/dist/core/capabilities/engine-fallbacks.js +5 -0
- package/dist/core/capabilities/engine-ops.d.ts +5 -1
- package/dist/core/capabilities/engine-ops.js +0 -3
- package/dist/core/capabilities/engine-receipt.d.ts +12 -0
- package/dist/core/capabilities/engine-receipt.js +26 -0
- package/dist/core/capabilities/file-read.d.ts +64 -0
- package/dist/core/capabilities/file-read.js +325 -0
- package/dist/core/capabilities/game-task-plan.js +4 -2
- package/dist/core/capabilities/grep.d.ts +60 -0
- package/dist/core/capabilities/grep.js +190 -0
- package/dist/core/capabilities/inspect-node.d.ts +56 -0
- package/dist/core/capabilities/inspect-node.js +225 -0
- package/dist/core/capabilities/inspect-resource.d.ts +61 -0
- package/dist/core/capabilities/inspect-resource.js +376 -0
- package/dist/core/capabilities/math3d.d.ts +28 -0
- package/dist/core/capabilities/math3d.js +88 -0
- package/dist/core/capabilities/motion-generation.d.ts +62 -0
- package/dist/core/capabilities/motion-generation.js +138 -0
- package/dist/core/capabilities/placement-batch.d.ts +102 -0
- package/dist/core/capabilities/placement-batch.js +483 -0
- package/dist/core/capabilities/placement-math.d.ts +70 -0
- package/dist/core/capabilities/placement-math.js +209 -0
- package/dist/core/capabilities/placement-script.d.ts +42 -0
- package/dist/core/capabilities/placement-script.js +1096 -0
- package/dist/core/capabilities/placement.d.ts +485 -0
- package/dist/core/capabilities/placement.js +1731 -0
- package/dist/core/capabilities/project-context.d.ts +33 -2
- package/dist/core/capabilities/project-context.js +87 -4
- package/dist/core/capabilities/replace-node.d.ts +91 -0
- package/dist/core/capabilities/replace-node.js +423 -0
- package/dist/core/capabilities/runtime-control.d.ts +18 -2
- package/dist/core/capabilities/runtime-control.js +67 -2
- package/dist/core/capabilities/scene-batch.d.ts +63 -0
- package/dist/core/capabilities/scene-batch.js +394 -0
- package/dist/core/capabilities/scene-readback.d.ts +36 -0
- package/dist/core/capabilities/scene-readback.js +54 -0
- package/dist/core/capabilities/seeing/args.d.ts +348 -0
- package/dist/core/capabilities/seeing/args.js +178 -0
- package/dist/core/capabilities/seeing/candidates.d.ts +127 -0
- package/dist/core/capabilities/seeing/candidates.js +282 -0
- package/dist/core/capabilities/seeing/math.d.ts +134 -0
- package/dist/core/capabilities/seeing/math.js +269 -0
- package/dist/core/capabilities/seeing/probe.d.ts +62 -0
- package/dist/core/capabilities/seeing/probe.js +188 -0
- package/dist/core/capabilities/seeing/scoring.d.ts +235 -0
- package/dist/core/capabilities/seeing/scoring.js +639 -0
- package/dist/core/capabilities/seeing/seeing.d.ts +233 -0
- package/dist/core/capabilities/seeing/seeing.js +1341 -0
- package/dist/core/capabilities/seeing/shot-store.d.ts +52 -0
- package/dist/core/capabilities/seeing/shot-store.js +204 -0
- package/dist/core/capabilities/surface-snap-mesh.d.ts +88 -0
- package/dist/core/capabilities/surface-snap-mesh.js +425 -0
- package/dist/core/capabilities/surface-snap.d.ts +77 -0
- package/dist/core/capabilities/surface-snap.js +461 -0
- package/dist/core/capabilities/tool-dispatch.js +231 -72
- package/dist/core/capabilities/tscn.d.ts +85 -0
- package/dist/core/capabilities/tscn.js +391 -0
- package/dist/core/capabilities/world-snapshot.d.ts +58 -0
- package/dist/core/capabilities/world-snapshot.js +150 -0
- package/dist/core/capability-skew.d.ts +5 -5
- package/dist/core/capability-skew.js +14 -6
- package/dist/core/headless/worker-engine-client.d.ts +1 -1
- package/dist/core/headless/worker-engine-client.js +2 -2
- package/dist/core/library-read.d.ts +37 -5
- package/dist/core/library-read.js +264 -33
- package/dist/core/library-search.d.ts +2 -2
- package/dist/installer/agent-config.js +5 -3
- package/dist/installer/agent-table.d.ts +16 -0
- package/dist/installer/agent-table.js +52 -17
- package/dist/mcp/server.js +9 -3
- package/dist/mcp/tools/asset-tools.js +21 -3
- package/dist/mcp/tools/audit-tools.d.ts +23 -0
- package/dist/mcp/tools/audit-tools.js +60 -0
- package/dist/mcp/tools/debug-tools.js +3 -1
- package/dist/mcp/tools/file-tools.js +17 -4
- package/dist/mcp/tools/generate-tools.js +74 -66
- package/dist/mcp/tools/library-tools.js +2 -0
- package/dist/mcp/tools/perception-tools.js +6 -19
- package/dist/mcp/tools/placement-tools.d.ts +24 -0
- package/dist/mcp/tools/placement-tools.js +91 -0
- package/dist/mcp/tools/project-tools.js +18 -15
- package/dist/mcp/tools/scene-tools.js +71 -83
- package/dist/mcp/tools/seeing-tools.d.ts +24 -0
- package/dist/mcp/tools/seeing-tools.js +64 -0
- package/dist/mcp/tools/spatial-tools.js +17 -9
- package/dist/mcp/tools/visual-tools.js +59 -7
- package/gemini-extension.json +26 -4
- package/integrations/amp/README.md +1 -1
- package/integrations/crush/README.md +1 -1
- package/integrations/grok-build/README.md +1 -1
- package/integrations/hermes/README.md +1 -1
- package/integrations/kimi-code/README.md +1 -1
- package/integrations/mistral-vibe/README.md +1 -1
- package/integrations/opencode/README.md +1 -1
- package/integrations/rovo-dev/README.md +1 -1
- package/integrations/vscode-copilot/README.md +1 -1
- package/integrations/warp/README.md +1 -1
- package/integrations/windsurf/README.md +1 -1
- package/library/references/mcp-tools-reference/mcp-tools-reference.md +59 -15
- package/library/references/mcp-tools-reference/resource.yaml +1 -1
- package/library/references/summer-folder/resource.yaml +1 -1
- package/library/references/summer-folder/summer-folder.md +1 -1
- package/library/skills/3d-lighting/SKILL.md +1 -1
- package/library/skills/README.md +36 -14
- package/library/skills/adaptive-music/SKILL.md +1 -1
- package/library/skills/agent-playtesting/SKILL.md +1 -1
- package/library/skills/ai-characters-in-games/SKILL.md +220 -0
- package/library/skills/ai-characters-in-games/resource.yaml +30 -0
- package/library/skills/ambient-bed/SKILL.md +1 -1
- package/library/skills/animated-loop/SKILL.md +1 -1
- package/library/skills/animation-tree/SKILL.md +1 -1
- package/library/skills/art-direction/SKILL.md +1 -1
- package/library/skills/asset-strategy/SKILL.md +2 -1
- package/library/skills/asset-strategy/resource.yaml +2 -1
- package/library/skills/audio-direction/SKILL.md +1 -1
- package/library/skills/auto-fire-targeting/SKILL.md +1 -1
- package/library/skills/brainstorm-game/SKILL.md +1 -1
- package/library/skills/brainstorming/SKILL.md +1 -1
- package/library/skills/browse-templates/SKILL.md +3 -3
- package/library/skills/browse-templates/resource.yaml +1 -1
- package/library/skills/camera-rigs/SKILL.md +128 -0
- package/library/skills/camera-rigs/resource.yaml +29 -0
- package/library/skills/celeste-momentum-platforming/SKILL.md +1 -1
- package/library/skills/character-animation-wiring/SKILL.md +1 -1
- package/library/skills/character-model/SKILL.md +1 -1
- package/library/skills/character-movement/SKILL.md +326 -0
- package/library/skills/character-movement/references/default-third-person-controller.gd +201 -0
- package/library/skills/character-movement/references/default-third-person-verification-probe.gd +154 -0
- package/library/skills/character-movement/references/movement-3d.md +136 -0
- package/library/skills/character-movement/references/platformer-feel.md +83 -0
- package/library/skills/character-movement/resource.yaml +40 -0
- package/library/skills/character-portrait/SKILL.md +1 -1
- package/library/skills/cinematic-cutscene/SKILL.md +1 -1
- package/library/skills/combat-basics/SKILL.md +159 -0
- package/library/skills/combat-basics/references/projectiles-and-aoe.md +100 -0
- package/library/skills/combat-basics/resource.yaml +34 -0
- package/library/skills/concept-art/SKILL.md +1 -1
- package/library/skills/create-asset-sheet/SKILL.md +1 -1
- package/library/skills/debug/SKILL.md +1 -1
- package/library/skills/debugging-game-feel/SKILL.md +1 -1
- package/library/skills/design-level/SKILL.md +1 -1
- package/library/skills/design-mechanic/SKILL.md +1 -1
- package/library/skills/design-npc/SKILL.md +1 -1
- package/library/skills/diagnosing-perf-regressions/SKILL.md +1 -1
- package/library/skills/dispatching-parallel-agents/SKILL.md +1 -1
- package/library/skills/driving-the-editor-ui/SKILL.md +1 -1
- package/library/skills/environment-kit/SKILL.md +1 -1
- package/library/skills/export-and-ship/SKILL.md +1 -1
- package/library/skills/fabricating-assets/SKILL.md +1 -1
- package/library/skills/facial-and-lipsync/SKILL.md +1 -1
- package/library/skills/fps-controller/SKILL.md +9 -7
- package/library/skills/fps-controller/resource.yaml +4 -1
- package/library/skills/game-feel/SKILL.md +1 -1
- package/library/skills/gameskill/SKILL.md +1 -1
- package/library/skills/gdscript-patterns/SKILL.md +1 -1
- package/library/skills/generate-motion/SKILL.md +9 -9
- package/library/skills/generate-motion/resource.yaml +2 -1
- package/library/skills/godogen-visual-proof-game-generation/SKILL.md +1 -1
- package/library/skills/headless-scripting/SKILL.md +1 -1
- package/library/skills/in-game-purchases/SKILL.md +254 -0
- package/library/skills/in-game-purchases/resource.yaml +29 -0
- package/library/skills/instantiate-asset-pack/SKILL.md +1 -1
- package/library/skills/investigating-bugs/SKILL.md +1 -1
- package/library/skills/lumera-single-image-scene-reconstruction/SKILL.md +1 -1
- package/library/skills/make-game/SKILL.md +25 -3
- package/library/skills/make-game/references/2d-platformer-polish.md +93 -0
- package/library/skills/make-game/references/2d-platformer.md +117 -0
- package/library/skills/make-game/references/2d-rpg-content.md +234 -0
- package/library/skills/make-game/references/2d-rpg.md +241 -0
- package/library/skills/make-game/references/2d-survivors-progression.md +201 -0
- package/library/skills/make-game/references/2d-survivors.md +237 -0
- package/library/skills/make-game/references/3d-fps-systems.md +216 -0
- package/library/skills/make-game/references/3d-fps.md +177 -0
- package/library/skills/make-game/references/3d-horror-systems.md +186 -0
- package/library/skills/make-game/references/3d-horror.md +201 -0
- package/library/skills/make-game/references/3d-third-person-systems.md +220 -0
- package/library/skills/make-game/references/3d-third-person.md +215 -0
- package/library/skills/make-game/resource.yaml +6 -1
- package/library/skills/multiplayer/SKILL.md +150 -0
- package/library/skills/multiplayer/resource.yaml +33 -0
- package/library/skills/multiplayer-movement/SKILL.md +510 -0
- package/library/skills/multiplayer-movement/files.md +501 -0
- package/library/skills/multiplayer-movement/resource.yaml +30 -0
- package/library/skills/multiplayer-project/SKILL.md +521 -0
- package/library/skills/multiplayer-project/files.md +448 -0
- package/library/skills/multiplayer-project/resource.yaml +36 -0
- package/library/skills/multiplayer-publish/SKILL.md +229 -0
- package/library/skills/multiplayer-publish/export-errors.md +89 -0
- package/library/skills/multiplayer-publish/resource.yaml +28 -0
- package/library/skills/multiplayer-state/SKILL.md +438 -0
- package/library/skills/multiplayer-state/files.md +592 -0
- package/library/skills/multiplayer-state/resource.yaml +35 -0
- package/library/skills/multiplayer-testing/SKILL.md +236 -0
- package/library/skills/multiplayer-testing/resource.yaml +39 -0
- package/library/skills/music-track/SKILL.md +1 -1
- package/library/skills/navigate-summer/SKILL.md +1 -1
- package/library/skills/new-project/SKILL.md +1 -1
- package/library/skills/organic-model/SKILL.md +1 -1
- package/library/skills/pixel-art/SKILL.md +1 -1
- package/library/skills/play/SKILL.md +1 -1
- package/library/skills/playtesting-a-feature/SKILL.md +1 -1
- package/library/skills/procedural-animation/SKILL.md +2 -2
- package/library/skills/procedural-animation/resource.yaml +1 -1
- package/library/skills/prop-model/SKILL.md +1 -1
- package/library/skills/psx-retro-rendering/SKILL.md +1 -1
- package/library/skills/realtime-wet-surfaces/SKILL.md +2 -2
- package/library/skills/remote-deploy/SKILL.md +1 -1
- package/library/skills/retarget/SKILL.md +1 -1
- package/library/skills/running-in-the-cloud/SKILL.md +1 -1
- package/library/skills/save-load/SKILL.md +156 -0
- package/library/skills/save-load/resource.yaml +27 -0
- package/library/skills/scene-composition/SKILL.md +1 -1
- package/library/skills/scene-hierarchy-design/SKILL.md +1 -1
- package/library/skills/scene-scripting/SKILL.md +1 -1
- package/library/skills/scene-to-level/SKILL.md +1 -1
- package/library/skills/skill-create/SKILL.md +1 -1
- package/library/skills/skill-improve/SKILL.md +1 -1
- package/library/skills/skill-test/SKILL.md +1 -1
- package/library/skills/skintokens-auto-rigging/SKILL.md +1 -1
- package/library/skills/skybox-panorama/SKILL.md +1 -1
- package/library/skills/sound-effect/SKILL.md +1 -1
- package/library/skills/spatial-placement/SKILL.md +134 -3
- package/library/skills/spatial-placement/references/kit-placement-tools.md +364 -0
- package/library/skills/spatial-placement/resource.yaml +16 -2
- package/library/skills/sprite-sheet/SKILL.md +1 -1
- package/library/skills/summer-analytics/SKILL.md +147 -0
- package/library/skills/summer-analytics/resource.yaml +28 -0
- package/library/skills/summer-friends/SKILL.md +226 -0
- package/library/skills/summer-friends/resource.yaml +28 -0
- package/library/skills/summer-leaderboards/SKILL.md +231 -0
- package/library/skills/summer-leaderboards/resource.yaml +30 -0
- package/library/skills/summer-match-results/SKILL.md +286 -0
- package/library/skills/summer-match-results/resource.yaml +32 -0
- package/library/skills/summer-matchmaking/SKILL.md +301 -0
- package/library/skills/summer-matchmaking/resource.yaml +32 -0
- package/library/skills/summer-parties/SKILL.md +253 -0
- package/library/skills/summer-parties/resource.yaml +30 -0
- package/library/skills/summer-player-data/SKILL.md +322 -0
- package/library/skills/summer-player-data/resource.yaml +30 -0
- package/library/skills/summer-store/SKILL.md +271 -0
- package/library/skills/summer-store/resource.yaml +29 -0
- package/library/skills/summer-world-chat/SKILL.md +195 -0
- package/library/skills/summer-world-chat/resource.yaml +30 -0
- package/library/skills/summer-world-saves/SKILL.md +284 -0
- package/library/skills/summer-world-saves/resource.yaml +29 -0
- package/library/skills/text-to-motion/SKILL.md +99 -0
- package/library/skills/text-to-motion/prompts-and-controls.md +34 -0
- package/library/skills/text-to-motion/resource.yaml +41 -0
- package/library/skills/text-to-motion/rigging-for-text-motion.md +54 -0
- package/library/skills/tileable-texture/SKILL.md +1 -1
- package/library/skills/trailer-shot/SKILL.md +1 -1
- package/library/skills/tune-performance/SKILL.md +1 -1
- package/library/skills/ui-basics/SKILL.md +10 -1
- package/library/skills/ui-graphics/SKILL.md +1 -1
- package/library/skills/use-widget-asset/SKILL.md +1 -1
- package/library/skills/using-summer/SKILL.md +2 -2
- package/library/skills/using-summer/resource.yaml +2 -2
- package/library/skills/vehicle-model/SKILL.md +1 -1
- package/library/skills/verification-before-completion/SKILL.md +1 -1
- package/library/skills/verifying-scenes/SKILL.md +76 -2
- package/library/skills/verifying-scenes/resource.yaml +13 -2
- package/library/skills/vfx-dissolve/SKILL.md +1 -1
- package/library/skills/vfx-fire/SKILL.md +1 -1
- package/library/skills/vfx-hit-spark/SKILL.md +1 -1
- package/library/skills/vfx-lightning/SKILL.md +1 -1
- package/library/skills/vfx-magic-glow/SKILL.md +1 -1
- package/library/skills/vfx-muzzle-flash/SKILL.md +1 -1
- package/library/skills/vfx-smoke/SKILL.md +1 -1
- package/library/skills/vfx-water-ripple/SKILL.md +1 -1
- package/library/skills/voice-line/SKILL.md +1 -1
- package/library/skills/web-and-touch-input/SKILL.md +38 -0
- package/library/skills/web-and-touch-input/resource.yaml +28 -0
- package/library/skills/web-compatibility-look/SKILL.md +62 -0
- package/library/skills/web-compatibility-look/resource.yaml +30 -0
- package/library/skills/world-building-3d/SKILL.md +8 -1
- package/library/skills/world-building-3d/references/spatial-tools.md +1 -1
- package/library/skills/world-building-3d/resource.yaml +2 -1
- package/library/skills/writing-plans/SKILL.md +1 -1
- package/library/skills/writing-skills/SKILL.md +1 -1
- package/library/templates/3d-lan-multiplayer-starter/resource.yaml +2 -2
- package/library/tools/attach-to-surface/resource.yaml +142 -0
- package/library/tools/batch/resource.yaml +9 -3
- package/library/tools/connect-ports/resource.yaml +120 -0
- package/library/tools/connect-signal/resource.yaml +3 -2
- package/library/tools/debug-views/resource.yaml +94 -0
- package/library/tools/frame-nodes/resource.yaml +104 -0
- package/library/tools/frame-shot/resource.yaml +134 -0
- package/library/tools/generate-motion/resource.yaml +44 -9
- package/library/tools/get-board/resource.yaml +50 -0
- package/library/tools/get-project-context/resource.yaml +13 -2
- package/library/tools/grep/resource.yaml +77 -0
- package/library/tools/inspect-asset/resource.yaml +71 -0
- package/library/tools/inspect-node/resource.yaml +9 -2
- package/library/tools/inspect-resource/resource.yaml +16 -5
- package/library/tools/instantiate-scene/resource.yaml +27 -2
- package/library/tools/measure/resource.yaml +96 -0
- package/library/tools/place-adjacent/resource.yaml +113 -0
- package/library/tools/play/resource.yaml +15 -2
- package/library/tools/raycast/resource.yaml +101 -0
- package/library/tools/read-file/resource.yaml +36 -2
- package/library/tools/read-library/resource.yaml +2 -2
- package/library/tools/repeat-along/resource.yaml +129 -0
- package/library/tools/replace-node/resource.yaml +11 -5
- package/library/tools/scene-audit/resource.yaml +144 -0
- package/library/tools/screenshot/resource.yaml +13 -2
- package/library/tools/search-assets/resource.yaml +18 -0
- package/library/tools/shot-sheet/resource.yaml +110 -0
- package/library/tools/snap-to-surface/resource.yaml +4 -1
- package/library/tools/world-snapshot/resource.yaml +24 -3
- package/library/tools/zoom/resource.yaml +105 -0
- package/package.json +1 -1
- package/registry/generated/aliases.json +17 -3
- package/registry/generated/counts.json +3 -3
- package/registry/generated/gemini-extension.json +26 -4
- package/registry/generated/index.json +2154 -469
- package/registry/generated/marketplace.claude.json +2 -2
- package/registry/generated/plugin.claude.json +27 -5
- package/registry/generated/plugin.codex.json +28 -6
- package/registry/generated/plugin.cursor.json +27 -5
- package/registry/generated/plugin.factory.json +27 -5
- package/registry/generated/skills-index.md +36 -14
- package/registry/generated/skills-registry.json +421 -124
- package/registry/generated/templates-registry.json +2 -2
- package/library/skills/host-authoritative-state/SKILL.md +0 -332
- package/library/skills/host-authoritative-state/resource.yaml +0 -28
- package/library/skills/peer-to-peer-multiplayer/SKILL.md +0 -373
- package/library/skills/peer-to-peer-multiplayer/resource.yaml +0 -28
- package/library/skills/setup-multiplayer/SKILL.md +0 -336
- package/library/skills/setup-multiplayer/resource.yaml +0 -28
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
* is client-side and every trim is declared (settingsTruncated, totalSettings,
|
|
16
16
|
* settingsPrefixesIncluded, settingsPrefixesExcluded) — nothing is hidden,
|
|
17
17
|
* only deferred behind settingsPrefixes.
|
|
18
|
+
*
|
|
19
|
+
* Compact default (the full capability lists plus a 200-node scene tree make
|
|
20
|
+
* a first call too large for a host to hand to the agent): the payload carries the
|
|
21
|
+
* project, the scene path with a one-line scene summary, a scalar health
|
|
22
|
+
* summary with capability COUNTS, projectMemory and every warning. The scene
|
|
23
|
+
* tree, the capability lists and the project settings come back only with
|
|
24
|
+
* include:['scene_tree' | 'capabilities' | 'settings']; `omitted` says how to
|
|
25
|
+
* ask for each one that was left out.
|
|
18
26
|
*/
|
|
19
27
|
import { z } from "zod";
|
|
20
28
|
import { type ProjectMemorySummary } from "../../project-memory/project-memory.js";
|
|
@@ -37,17 +45,24 @@ export declare const DEFAULT_PROJECT_CONTEXT_SETTINGS_PREFIXES: readonly string[
|
|
|
37
45
|
*/
|
|
38
46
|
export declare const DEFAULT_PROJECT_CONTEXT_SETTINGS_EXCLUDED: readonly string[];
|
|
39
47
|
export declare const MAX_SETTINGS_PREFIXES = 32;
|
|
48
|
+
/** Heavy blocks the default (compact) payload leaves out; `include` opts in. */
|
|
49
|
+
export declare const PROJECT_CONTEXT_INCLUDES: readonly ["scene_tree", "capabilities", "settings"];
|
|
50
|
+
export type ProjectContextInclude = (typeof PROJECT_CONTEXT_INCLUDES)[number];
|
|
40
51
|
export declare const projectContextInputShape: {
|
|
52
|
+
include: z.ZodOptional<z.ZodArray<z.ZodEnum<["scene_tree", "capabilities", "settings"]>, "many">>;
|
|
41
53
|
settingsPrefix: z.ZodOptional<z.ZodString>;
|
|
42
54
|
settingsPrefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
43
55
|
};
|
|
44
56
|
export declare const projectContextInputSchema: z.ZodObject<{
|
|
57
|
+
include: z.ZodOptional<z.ZodArray<z.ZodEnum<["scene_tree", "capabilities", "settings"]>, "many">>;
|
|
45
58
|
settingsPrefix: z.ZodOptional<z.ZodString>;
|
|
46
59
|
settingsPrefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
47
60
|
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
include?: ("capabilities" | "scene_tree" | "settings")[] | undefined;
|
|
48
62
|
settingsPrefix?: string | undefined;
|
|
49
63
|
settingsPrefixes?: string[] | undefined;
|
|
50
64
|
}, {
|
|
65
|
+
include?: ("capabilities" | "scene_tree" | "settings")[] | undefined;
|
|
51
66
|
settingsPrefix?: string | undefined;
|
|
52
67
|
settingsPrefixes?: string[] | undefined;
|
|
53
68
|
}>;
|
|
@@ -69,10 +84,18 @@ export interface ProjectContextExtras {
|
|
|
69
84
|
onCapabilitySkew?: (warning: string) => void;
|
|
70
85
|
}
|
|
71
86
|
export interface ProjectContextPayload extends JsonRecord {
|
|
87
|
+
/** Compact by default (scalar fields + a capabilities summary); the full
|
|
88
|
+
* /api/health payload with include:['capabilities']. */
|
|
72
89
|
health: unknown;
|
|
73
90
|
capabilitySkewWarning?: string;
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
/** Project settings: only with include:['settings'] or a settings prefix. */
|
|
92
|
+
project?: unknown;
|
|
93
|
+
/** The open scene's tree: only with include:['scene_tree']. */
|
|
94
|
+
scene?: unknown;
|
|
95
|
+
/** Always: path, root node and node count of the open scene. */
|
|
96
|
+
sceneSummary: JsonRecord;
|
|
97
|
+
included: ProjectContextInclude[];
|
|
98
|
+
omitted: Partial<Record<ProjectContextInclude, string>>;
|
|
76
99
|
projectName: string | null;
|
|
77
100
|
projectPath: string | null;
|
|
78
101
|
currentScene: string | null;
|
|
@@ -111,4 +134,12 @@ export declare function resolveProjectPath(projectState: unknown, health: unknow
|
|
|
111
134
|
export declare function resolveProjectName(projectState: unknown, health: unknown): string | null;
|
|
112
135
|
export declare function resolveMainScene(projectState: unknown): string | null;
|
|
113
136
|
export declare function resolveCurrentScene(projectState: unknown, sceneState: unknown, health: unknown): string | null;
|
|
137
|
+
/** Which heavy blocks the payload carries: `include`, plus 'settings' when a
|
|
138
|
+
* settings prefix was named (asking for a group is asking for settings). */
|
|
139
|
+
export declare function resolveIncludes(args: ProjectContextArgs): Set<ProjectContextInclude>;
|
|
140
|
+
/** /api/health without its capability lists: every scalar field, plus counts
|
|
141
|
+
* of what the engine advertises. */
|
|
142
|
+
export declare function compactHealth(health: unknown): unknown;
|
|
143
|
+
/** Path, root node and size of the open scene, from the scene-state read. */
|
|
144
|
+
export declare function summarizeScene(sceneState: unknown, currentScene: string | null): JsonRecord;
|
|
114
145
|
export declare function buildProjectContext(client: ProjectContextClient, args?: ProjectContextArgs, extras?: ProjectContextExtras): Promise<ProjectContextPayload>;
|
|
@@ -15,10 +15,18 @@
|
|
|
15
15
|
* is client-side and every trim is declared (settingsTruncated, totalSettings,
|
|
16
16
|
* settingsPrefixesIncluded, settingsPrefixesExcluded) — nothing is hidden,
|
|
17
17
|
* only deferred behind settingsPrefixes.
|
|
18
|
+
*
|
|
19
|
+
* Compact default (the full capability lists plus a 200-node scene tree make
|
|
20
|
+
* a first call too large for a host to hand to the agent): the payload carries the
|
|
21
|
+
* project, the scene path with a one-line scene summary, a scalar health
|
|
22
|
+
* summary with capability COUNTS, projectMemory and every warning. The scene
|
|
23
|
+
* tree, the capability lists and the project settings come back only with
|
|
24
|
+
* include:['scene_tree' | 'capabilities' | 'settings']; `omitted` says how to
|
|
25
|
+
* ask for each one that was left out.
|
|
18
26
|
*/
|
|
19
27
|
import { z } from "zod";
|
|
20
28
|
import { EngineRebindError } from "../api-client.js";
|
|
21
|
-
import { buildCapabilitySkewWarning } from "../capability-skew.js";
|
|
29
|
+
import { buildCapabilitySkewWarning, parseEngineCapabilities } from "../capability-skew.js";
|
|
22
30
|
import { isTrajectoryEvalMode } from "../trajectory.js";
|
|
23
31
|
import { getProjectMemorySummary, } from "../../project-memory/project-memory.js";
|
|
24
32
|
import { asRecord, stringFrom } from "../util/json.js";
|
|
@@ -48,8 +56,15 @@ export const DEFAULT_PROJECT_CONTEXT_SETTINGS_PREFIXES = [
|
|
|
48
56
|
*/
|
|
49
57
|
export const DEFAULT_PROJECT_CONTEXT_SETTINGS_EXCLUDED = ["input/ui_"];
|
|
50
58
|
export const MAX_SETTINGS_PREFIXES = 32;
|
|
59
|
+
/** Heavy blocks the default (compact) payload leaves out; `include` opts in. */
|
|
60
|
+
export const PROJECT_CONTEXT_INCLUDES = ["scene_tree", "capabilities", "settings"];
|
|
51
61
|
// Mirrors library/tools/get-project-context/resource.yaml input_schema (parity-tested).
|
|
52
62
|
export const projectContextInputShape = {
|
|
63
|
+
include: z
|
|
64
|
+
.array(z.enum(PROJECT_CONTEXT_INCLUDES))
|
|
65
|
+
.max(PROJECT_CONTEXT_INCLUDES.length)
|
|
66
|
+
.optional()
|
|
67
|
+
.describe("Heavy blocks to add to the compact default: 'scene_tree' (the open scene's node tree, up to 200 nodes), 'capabilities' (the engine's full op/capability lists), 'settings' (project settings, curated groups). settingsPrefix/settingsPrefixes imply 'settings'."),
|
|
53
68
|
settingsPrefix: z
|
|
54
69
|
.string()
|
|
55
70
|
.optional()
|
|
@@ -183,9 +198,68 @@ export function resolveCurrentScene(projectState, sceneState, health) {
|
|
|
183
198
|
pickString(asRecord(health), ["scene", "scenePath", "scene_path"]) ??
|
|
184
199
|
null);
|
|
185
200
|
}
|
|
201
|
+
// ── Compact blocks ─────────────────────────────────────────────────────────
|
|
202
|
+
/** Which heavy blocks the payload carries: `include`, plus 'settings' when a
|
|
203
|
+
* settings prefix was named (asking for a group is asking for settings). */
|
|
204
|
+
export function resolveIncludes(args) {
|
|
205
|
+
const included = new Set(args.include ?? []);
|
|
206
|
+
if (resolveSettingsSelection(args).explicit)
|
|
207
|
+
included.add("settings");
|
|
208
|
+
return included;
|
|
209
|
+
}
|
|
210
|
+
/** /api/health without its capability lists: every scalar field, plus counts
|
|
211
|
+
* of what the engine advertises. */
|
|
212
|
+
export function compactHealth(health) {
|
|
213
|
+
const root = asRecord(health);
|
|
214
|
+
if (!root)
|
|
215
|
+
return health;
|
|
216
|
+
const out = {};
|
|
217
|
+
for (const [key, value] of Object.entries(root)) {
|
|
218
|
+
if (value === null || ["string", "number", "boolean"].includes(typeof value))
|
|
219
|
+
out[key] = value;
|
|
220
|
+
}
|
|
221
|
+
if ("capabilities" in root) {
|
|
222
|
+
const caps = parseEngineCapabilities(root.capabilities);
|
|
223
|
+
out.capabilities = caps
|
|
224
|
+
? {
|
|
225
|
+
...(caps.protocolVersion !== undefined ? { protocolVersion: caps.protocolVersion } : {}),
|
|
226
|
+
...(caps.opKinds ? { opKinds: caps.opKinds.length } : {}),
|
|
227
|
+
...(caps.singleOnlyOps ? { singleOnlyOps: caps.singleOnlyOps.length } : {}),
|
|
228
|
+
events: !!caps.events,
|
|
229
|
+
runtimeControl: !!caps.runtimeControl,
|
|
230
|
+
...(caps.navigation ? { navigationTargets: caps.navigation.targets.length } : {}),
|
|
231
|
+
...(caps.launchPostures ? { launchPostures: caps.launchPostures } : {}),
|
|
232
|
+
summary: "counts only; include:['capabilities'] returns the lists",
|
|
233
|
+
}
|
|
234
|
+
: { summary: "the engine advertised no readable capabilities" };
|
|
235
|
+
}
|
|
236
|
+
return out;
|
|
237
|
+
}
|
|
238
|
+
/** Path, root node and size of the open scene, from the scene-state read. */
|
|
239
|
+
export function summarizeScene(sceneState, currentScene) {
|
|
240
|
+
const root = asRecord(sceneState);
|
|
241
|
+
if (!root || root.ok === false) {
|
|
242
|
+
return { scenePath: currentScene, ...(root?.error ? { error: String(root.error) } : {}) };
|
|
243
|
+
}
|
|
244
|
+
const data = asRecord(root.data);
|
|
245
|
+
const children = Array.isArray(data?.children) ? data.children.length : undefined;
|
|
246
|
+
return {
|
|
247
|
+
scenePath: currentScene,
|
|
248
|
+
...(typeof data?.name === "string" ? { rootName: data.name } : {}),
|
|
249
|
+
...(typeof data?.class === "string" ? { rootClass: data.class } : {}),
|
|
250
|
+
...(typeof data?.total_nodes === "number" ? { totalNodes: data.total_nodes } : {}),
|
|
251
|
+
...(children !== undefined ? { topLevelChildren: children } : {}),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
const OMITTED_HINTS = {
|
|
255
|
+
scene_tree: "include:['scene_tree'] for the open scene's tree (up to 200 nodes); for one subtree use summer_world_snapshot path_prefix or summer_get_scene_tree",
|
|
256
|
+
capabilities: "include:['capabilities'] for the engine's full op and capability lists",
|
|
257
|
+
settings: "include:['settings'] (curated groups) or settingsPrefixes:['audio/', ...] for project settings",
|
|
258
|
+
};
|
|
186
259
|
// ── The builder ────────────────────────────────────────────────────────────
|
|
187
260
|
export async function buildProjectContext(client, args = {}, extras = {}) {
|
|
188
261
|
const selection = resolveSettingsSelection(args);
|
|
262
|
+
const included = resolveIncludes(args);
|
|
189
263
|
const [health, fullProjectState, sceneState] = await Promise.all([
|
|
190
264
|
client.health(),
|
|
191
265
|
// ?prefix= rides along for forward-compatibility (a single prefix is all
|
|
@@ -224,11 +298,20 @@ export async function buildProjectContext(client, args = {}, extras = {}) {
|
|
|
224
298
|
const capabilitySkewWarning = buildCapabilitySkewWarning(health);
|
|
225
299
|
if (capabilitySkewWarning)
|
|
226
300
|
extras.onCapabilitySkew?.(capabilitySkewWarning);
|
|
301
|
+
const includedList = PROJECT_CONTEXT_INCLUDES.filter((block) => included.has(block));
|
|
302
|
+
const omitted = {};
|
|
303
|
+
for (const block of PROJECT_CONTEXT_INCLUDES) {
|
|
304
|
+
if (!included.has(block))
|
|
305
|
+
omitted[block] = OMITTED_HINTS[block];
|
|
306
|
+
}
|
|
227
307
|
return {
|
|
228
|
-
health,
|
|
308
|
+
health: included.has("capabilities") ? health : compactHealth(health),
|
|
229
309
|
...(capabilitySkewWarning ? { capabilitySkewWarning } : {}),
|
|
230
|
-
project,
|
|
231
|
-
scene: sceneState,
|
|
310
|
+
...(included.has("settings") ? { project } : {}),
|
|
311
|
+
...(included.has("scene_tree") ? { scene: sceneState } : {}),
|
|
312
|
+
sceneSummary: summarizeScene(sceneState, currentScene),
|
|
313
|
+
included: includedList,
|
|
314
|
+
omitted,
|
|
232
315
|
projectName,
|
|
233
316
|
projectPath,
|
|
234
317
|
currentScene,
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* replace-node — ONE implementation of `summer_replace_node` for both faces
|
|
3
|
+
* (src/mcp/tools/scene-tools.ts and tool-dispatch.ts), built from ops whose
|
|
4
|
+
* results persist, and verified against the SAVED scene file.
|
|
5
|
+
*
|
|
6
|
+
* Why not the engine's ReplaceNode op for scenes: SceneOps::replace_node
|
|
7
|
+
* (engine modules/1summer_engine/editor/ops/scene_ops.cpp, scene branch and
|
|
8
|
+
* the async _finish_replace_node) instantiates the new PackedScene and hands
|
|
9
|
+
* it to SceneTreeDock::replace_node — the editor's "Change Type" path — which
|
|
10
|
+
* ends in Node::replace_by (scene/main/node.cpp). replace_by finishes with
|
|
11
|
+
* `p_node->set_scene_file_path(get_scene_file_path())`: the new instance is
|
|
12
|
+
* stamped with the OLD node's scene path. The editor draws the new subtree,
|
|
13
|
+
* the receipt says ok, and SaveScene packs the node as
|
|
14
|
+
* `instance=ExtResource(<old scene>)` with a fresh unique_id — the change is
|
|
15
|
+
* gone on reload. A plain
|
|
16
|
+
* node replaced by a scene loses the other way (scene_file_path cleared, the
|
|
17
|
+
* instance's children owned by the instance root and dropped on save), and a
|
|
18
|
+
* type change of an instanced node stays an instance of the old scene.
|
|
19
|
+
*
|
|
20
|
+
* So the scene branch (and a type change of an instanced node) runs as:
|
|
21
|
+
* 0. SaveScene, so the file on disk is exactly the editor state;
|
|
22
|
+
* 1. read + parse the saved .tscn (which children the scene added under the
|
|
23
|
+
* node, which properties it overrides, its sibling index);
|
|
24
|
+
* 2. InstantiateScene / AddNode at the same parent under a temporary name;
|
|
25
|
+
* 3. SetProp every copyable property override (transform, visibility, ...);
|
|
26
|
+
* 4. ReparentNode each scene-added child onto the new node (local
|
|
27
|
+
* transforms kept), then re-parent each deeper scene-added descendant in
|
|
28
|
+
* place — the engine's ReparentNode re-owns only the node it moves, and
|
|
29
|
+
* remove_child clears the owner of everything below it;
|
|
30
|
+
* 5. MoveNode to the old sibling index, RemoveNode the old node, SetProp
|
|
31
|
+
* name back to the original name;
|
|
32
|
+
* 6. SaveScene, read the file back and check it: the node at the path
|
|
33
|
+
* instances the new scene (or has the new type), the parent and every
|
|
34
|
+
* scene-added descendant are there. persisted:false is reported as a
|
|
35
|
+
* failure, never as success.
|
|
36
|
+
* A type change of a plain node keeps the engine's ReplaceNode (it persists:
|
|
37
|
+
* replace_by copies an empty scene path) and gets the same read-back check.
|
|
38
|
+
*/
|
|
39
|
+
import { z } from "zod";
|
|
40
|
+
import { type CapabilityAdvertisingClient } from "../capability-skew.js";
|
|
41
|
+
import { type JsonRecord } from "../util/json.js";
|
|
42
|
+
import { type ParsedTscn, type TscnProp } from "./tscn.js";
|
|
43
|
+
export declare const replaceNodeInputShape: {
|
|
44
|
+
scenePath: z.ZodString;
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
type: z.ZodOptional<z.ZodString>;
|
|
47
|
+
scene: z.ZodOptional<z.ZodString>;
|
|
48
|
+
};
|
|
49
|
+
export declare const replaceNodeInputSchema: z.ZodObject<{
|
|
50
|
+
scenePath: z.ZodString;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
type: z.ZodOptional<z.ZodString>;
|
|
53
|
+
scene: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, "strict", z.ZodTypeAny, {
|
|
55
|
+
path: string;
|
|
56
|
+
scenePath: string;
|
|
57
|
+
type?: string | undefined;
|
|
58
|
+
scene?: string | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
path: string;
|
|
61
|
+
scenePath: string;
|
|
62
|
+
type?: string | undefined;
|
|
63
|
+
scene?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type ReplaceNodeArgs = z.infer<typeof replaceNodeInputSchema>;
|
|
66
|
+
/** The engine reads the replacement needs — a structural subset of
|
|
67
|
+
* EngineApiClient so tests can hand in a fake engine. */
|
|
68
|
+
export interface ReplaceNodeClient extends CapabilityAdvertisingClient {
|
|
69
|
+
executeIdentityBoundOps(ops: Record<string, unknown>[], options?: Record<string, unknown>, timeoutMs?: number): Promise<unknown>;
|
|
70
|
+
readProjectFile(path: string, maxBytes?: number): Promise<unknown>;
|
|
71
|
+
getSceneState(scenePath?: string, options?: {
|
|
72
|
+
depth?: number;
|
|
73
|
+
limit?: number;
|
|
74
|
+
root?: string;
|
|
75
|
+
}): Promise<unknown>;
|
|
76
|
+
}
|
|
77
|
+
/** A property override as a SetProp value, or why it cannot be copied. */
|
|
78
|
+
export declare function propSetValue(prop: TscnProp, parsed: ParsedTscn): {
|
|
79
|
+
value: string | number | boolean;
|
|
80
|
+
} | {
|
|
81
|
+
reason: string;
|
|
82
|
+
};
|
|
83
|
+
/** summer_batch guard (both faces): a raw ReplaceNode with `scene` is the op
|
|
84
|
+
* that saves the OLD scene reference. Refuse it before anything is sent and
|
|
85
|
+
* point at the tool that persists. Null when the ops are fine. */
|
|
86
|
+
export declare function rawSceneReplaceRefusal(ops: ReadonlyArray<Record<string, unknown>>): string | null;
|
|
87
|
+
/**
|
|
88
|
+
* Replace the node at `path` in `scenePath` with `scene` (or a node of
|
|
89
|
+
* `type`) and prove the saved file holds the result.
|
|
90
|
+
*/
|
|
91
|
+
export declare function replaceNodePersisted(client: ReplaceNodeClient, args: ReplaceNodeArgs): Promise<JsonRecord>;
|