@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4
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/dist/build-info.json +44 -44
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1721 -367
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +1 -1
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +1 -1
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -2
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +1 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +6 -6
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +23 -23
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -1,716 +0,0 @@
|
|
|
1
|
-
import { EDITOR_AGENT_CONTEXT_SCHEMA_VERSION, } from '@fps-games/editor-protocol';
|
|
2
|
-
export function createLocalEditorProjectEntryAgentContext(input) {
|
|
3
|
-
const path = normalizeProjectEntryPath(input.path);
|
|
4
|
-
if (!path)
|
|
5
|
-
return null;
|
|
6
|
-
const segments = path.split('/');
|
|
7
|
-
const name = input.name?.trim() || segments[segments.length - 1] || path;
|
|
8
|
-
const extension = input.entryKind === 'file'
|
|
9
|
-
? input.extension?.trim().toLowerCase() || undefined
|
|
10
|
-
: undefined;
|
|
11
|
-
const entry = {
|
|
12
|
-
path,
|
|
13
|
-
name,
|
|
14
|
-
entryKind: input.entryKind,
|
|
15
|
-
...(extension ? { extension } : {}),
|
|
16
|
-
...(input.assetId?.trim() ? { assetId: input.assetId.trim() } : {}),
|
|
17
|
-
...(input.assetKind?.trim() ? { assetKind: input.assetKind.trim() } : {}),
|
|
18
|
-
};
|
|
19
|
-
const kind = input.entryKind === 'directory' ? 'project-directory' : 'project-file';
|
|
20
|
-
const base = {
|
|
21
|
-
schemaVersion: EDITOR_AGENT_CONTEXT_SCHEMA_VERSION,
|
|
22
|
-
id: createAgentContextId(kind, [path], input.createdAt),
|
|
23
|
-
label: name,
|
|
24
|
-
summary: [
|
|
25
|
-
input.entryKind === 'directory' ? `Project Directory: ${name}` : `Project File: ${name}`,
|
|
26
|
-
`path: ${path}`,
|
|
27
|
-
...(extension ? [`type: ${extension}`] : []),
|
|
28
|
-
...(entry.assetId ? [`assetId: ${entry.assetId}`] : []),
|
|
29
|
-
].join('\n'),
|
|
30
|
-
createdAt: input.createdAt ?? Date.now(),
|
|
31
|
-
source: createAgentSource('project-files', input.source),
|
|
32
|
-
};
|
|
33
|
-
return input.entryKind === 'directory'
|
|
34
|
-
? { ...base, kind: 'project-directory', entry: { ...entry, entryKind: 'directory' } }
|
|
35
|
-
: { ...base, kind: 'project-file', entry: { ...entry, entryKind: 'file' } };
|
|
36
|
-
}
|
|
37
|
-
export function createLocalEditorSceneObjectAgentContext(input) {
|
|
38
|
-
const objectId = normalizeId(input.objectId);
|
|
39
|
-
if (!objectId)
|
|
40
|
-
return null;
|
|
41
|
-
const hierarchyById = createHierarchyMap(input.hierarchyItems);
|
|
42
|
-
const object = createAgentSceneObject(objectId, hierarchyById, input.projectionNode);
|
|
43
|
-
const label = object.label ?? object.name ?? object.id;
|
|
44
|
-
return {
|
|
45
|
-
schemaVersion: EDITOR_AGENT_CONTEXT_SCHEMA_VERSION,
|
|
46
|
-
id: createAgentContextId('scene-object', [objectId], input.createdAt),
|
|
47
|
-
kind: 'scene-object',
|
|
48
|
-
label,
|
|
49
|
-
summary: summarizeSceneObject(object),
|
|
50
|
-
createdAt: input.createdAt ?? Date.now(),
|
|
51
|
-
source: createAgentSource('hierarchy', input.source),
|
|
52
|
-
object,
|
|
53
|
-
...pickAgentSemantics(input.semantics),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export function createLocalEditorSceneObjectSetAgentContext(input) {
|
|
57
|
-
const objectIds = normalizeIds(input.objectIds);
|
|
58
|
-
if (objectIds.length === 0)
|
|
59
|
-
return null;
|
|
60
|
-
const hierarchyById = createHierarchyMap(input.hierarchyItems);
|
|
61
|
-
const objects = objectIds.map(id => createAgentSceneObject(id, hierarchyById, input.projectionNodes?.[id]));
|
|
62
|
-
return {
|
|
63
|
-
schemaVersion: EDITOR_AGENT_CONTEXT_SCHEMA_VERSION,
|
|
64
|
-
id: createAgentContextId('scene-object-set', objectIds, input.createdAt),
|
|
65
|
-
kind: 'scene-object-set',
|
|
66
|
-
label: `${objects.length} selected objects`,
|
|
67
|
-
summary: summarizeSceneObjectSet(objects),
|
|
68
|
-
createdAt: input.createdAt ?? Date.now(),
|
|
69
|
-
source: createAgentSource('selection', input.source),
|
|
70
|
-
objectIds,
|
|
71
|
-
objects,
|
|
72
|
-
...pickAgentSemantics(input.semantics),
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export function createLocalEditorRegionBindingAgentContext(input) {
|
|
76
|
-
const objectIds = normalizeIds(input.objectIds);
|
|
77
|
-
if (objectIds.length === 0)
|
|
78
|
-
return null;
|
|
79
|
-
const hierarchyById = createHierarchyMap(input.hierarchyItems);
|
|
80
|
-
const objects = objectIds.map(id => createAgentSceneObject(id, hierarchyById, input.projectionNodes?.[id]));
|
|
81
|
-
const bounds = mergeAgentBounds(objects.map(object => object.bounds).filter((value) => !!value));
|
|
82
|
-
const label = input.regionLabel?.trim() || `${objects.length} objects region`;
|
|
83
|
-
return {
|
|
84
|
-
schemaVersion: EDITOR_AGENT_CONTEXT_SCHEMA_VERSION,
|
|
85
|
-
id: createAgentContextId('region-binding', objectIds, input.createdAt),
|
|
86
|
-
kind: 'region-binding',
|
|
87
|
-
label,
|
|
88
|
-
summary: summarizeRegionBinding(label, objects),
|
|
89
|
-
createdAt: input.createdAt ?? Date.now(),
|
|
90
|
-
source: createAgentSource('region-binding', input.source),
|
|
91
|
-
region: {
|
|
92
|
-
id: `region:${objectIds.join('+')}`,
|
|
93
|
-
label,
|
|
94
|
-
...(bounds ? { bounds } : {}),
|
|
95
|
-
objectIds,
|
|
96
|
-
},
|
|
97
|
-
relationship: {
|
|
98
|
-
type: input.relationshipType?.trim() || 'selection-region',
|
|
99
|
-
description: input.relationshipDescription?.trim()
|
|
100
|
-
|| 'The selected scene objects are being described to the Agent as a region relationship.',
|
|
101
|
-
},
|
|
102
|
-
...pickAgentSemantics(input.semantics),
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
export function createLocalEditorSpatialMarkerAgentContext(input) {
|
|
106
|
-
const markerId = normalizeId(input.marker.id);
|
|
107
|
-
if (!markerId || input.marker.spatial.status !== 'resolved')
|
|
108
|
-
return null;
|
|
109
|
-
const label = input.marker.label || markerId;
|
|
110
|
-
const markerLabels = createMarkerLabelMap(input.graph?.markers ?? [input.marker]);
|
|
111
|
-
const objectLabels = createObjectLabelMap(input.hierarchyItems);
|
|
112
|
-
const relationTypes = input.relationTypes ?? [];
|
|
113
|
-
const graph = input.graph ?? {
|
|
114
|
-
schemaVersion: 1,
|
|
115
|
-
markers: [input.marker],
|
|
116
|
-
relations: input.directRelations ? [...input.directRelations] : [],
|
|
117
|
-
};
|
|
118
|
-
const relationNeighborhood = createSpatialRelationNeighborhood(markerId, label, graph, input.directRelations ?? [], input.relatedMarkerIds ?? [], input.relatedObjectIds ?? [], relationTypes, markerLabels, objectLabels);
|
|
119
|
-
const context = {
|
|
120
|
-
schemaVersion: EDITOR_AGENT_CONTEXT_SCHEMA_VERSION,
|
|
121
|
-
id: createAgentContextId('spatial-marker', [markerId], input.createdAt),
|
|
122
|
-
kind: 'spatial-marker',
|
|
123
|
-
label,
|
|
124
|
-
summary: summarizeSpatialMarker(input.marker, input.directRelations ?? [], relationTypes, markerLabels, objectLabels, relationNeighborhood),
|
|
125
|
-
createdAt: input.createdAt ?? Date.now(),
|
|
126
|
-
source: createAgentSource('marker', input.source),
|
|
127
|
-
marker: cloneResolvedSpatialMarker(input.marker),
|
|
128
|
-
directRelations: input.directRelations?.map(cloneSpatialRelation) ?? [],
|
|
129
|
-
...(input.relatedMarkerIds?.length ? { relatedMarkerIds: [...input.relatedMarkerIds] } : {}),
|
|
130
|
-
...(input.relatedObjectIds?.length ? { relatedObjectIds: [...input.relatedObjectIds] } : {}),
|
|
131
|
-
...(input.markerTypes?.length ? { markerTypes: input.markerTypes.map(cloneMarkerTypeDefinition) } : {}),
|
|
132
|
-
...(input.relationTypes?.length ? { relationTypes: input.relationTypes.map(cloneRelationTypeDefinition) } : {}),
|
|
133
|
-
relationNeighborhood,
|
|
134
|
-
...pickAgentSemantics(input.semantics),
|
|
135
|
-
};
|
|
136
|
-
return context;
|
|
137
|
-
}
|
|
138
|
-
export function createLocalEditorSpatialRelationGraphAgentContext(input) {
|
|
139
|
-
if (input.graph.markers.length === 0)
|
|
140
|
-
return null;
|
|
141
|
-
if (input.graph.markers.some(marker => marker.spatial.status !== 'resolved'))
|
|
142
|
-
return null;
|
|
143
|
-
const markerIds = input.graph.markers.map(marker => marker.id);
|
|
144
|
-
const objectLabels = createObjectLabelMap(input.hierarchyItems);
|
|
145
|
-
const markerLabels = createMarkerLabelMap(input.graph.markers);
|
|
146
|
-
const relationTypes = input.relationTypes ?? [];
|
|
147
|
-
const graphIssues = createSpatialGraphIssues(input.graph, markerLabels, objectLabels);
|
|
148
|
-
const focusSummaries = createSpatialGraphFocusSummaries(input.graph, input.focusMarkerIds ?? [], input.focusObjectIds ?? [], relationTypes, markerLabels, objectLabels);
|
|
149
|
-
const context = {
|
|
150
|
-
schemaVersion: EDITOR_AGENT_CONTEXT_SCHEMA_VERSION,
|
|
151
|
-
id: createAgentContextId('spatial-relation-graph', markerIds, input.createdAt),
|
|
152
|
-
kind: 'spatial-relation-graph',
|
|
153
|
-
label: `${input.graph.markers.length} spatial markers`,
|
|
154
|
-
summary: summarizeSpatialRelationGraph(input.graph, relationTypes, objectLabels, focusSummaries, graphIssues),
|
|
155
|
-
createdAt: input.createdAt ?? Date.now(),
|
|
156
|
-
source: createAgentSource('marker-graph', input.source),
|
|
157
|
-
graph: cloneResolvedSpatialMarkerGraph(input.graph),
|
|
158
|
-
...(input.focusMarkerIds?.length ? { focusMarkerIds: [...input.focusMarkerIds] } : {}),
|
|
159
|
-
...(input.focusObjectIds?.length ? { focusObjectIds: [...input.focusObjectIds] } : {}),
|
|
160
|
-
...(input.markerTypes?.length ? { markerTypes: input.markerTypes.map(cloneMarkerTypeDefinition) } : {}),
|
|
161
|
-
...(input.relationTypes?.length ? { relationTypes: input.relationTypes.map(cloneRelationTypeDefinition) } : {}),
|
|
162
|
-
...(graphIssues.length ? { graphIssues } : {}),
|
|
163
|
-
...(focusSummaries.length ? { focusSummaries } : {}),
|
|
164
|
-
...pickAgentSemantics(input.semantics),
|
|
165
|
-
};
|
|
166
|
-
return context;
|
|
167
|
-
}
|
|
168
|
-
function createAgentSceneObject(objectId, hierarchyById, projectionNode) {
|
|
169
|
-
const hierarchyItem = hierarchyById.get(objectId) ?? null;
|
|
170
|
-
const projection = readRecord(projectionNode);
|
|
171
|
-
const name = readString(projection?.name) || hierarchyItem?.label || objectId;
|
|
172
|
-
const object = {
|
|
173
|
-
id: objectId,
|
|
174
|
-
name,
|
|
175
|
-
label: hierarchyItem?.label ?? name,
|
|
176
|
-
hierarchyPath: createHierarchyPath(objectId, hierarchyById),
|
|
177
|
-
};
|
|
178
|
-
const objectKind = readObjectKind(hierarchyItem, projection);
|
|
179
|
-
if (objectKind)
|
|
180
|
-
object.objectKind = objectKind;
|
|
181
|
-
const transform = readAgentTransform(projection?.transform);
|
|
182
|
-
if (transform)
|
|
183
|
-
object.transform = transform;
|
|
184
|
-
const bounds = readAgentBounds(projection);
|
|
185
|
-
if (bounds)
|
|
186
|
-
object.bounds = bounds;
|
|
187
|
-
const assetRefs = readAssetRefs(projection?.asset);
|
|
188
|
-
if (assetRefs.length > 0)
|
|
189
|
-
object.assetRefs = assetRefs;
|
|
190
|
-
return object;
|
|
191
|
-
}
|
|
192
|
-
function createAgentContextId(kind, ids, createdAt = Date.now()) {
|
|
193
|
-
return `${kind}:${ids.join('+')}:${createdAt}`;
|
|
194
|
-
}
|
|
195
|
-
function createAgentSource(surface, source) {
|
|
196
|
-
return {
|
|
197
|
-
editor: 'fps-game-editor',
|
|
198
|
-
surface,
|
|
199
|
-
...(source?.projectId ? { projectId: source.projectId } : {}),
|
|
200
|
-
...(source?.projectName ? { projectName: source.projectName } : {}),
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
function createHierarchyMap(items) {
|
|
204
|
-
return new Map((items ?? []).map(item => [item.id, item]));
|
|
205
|
-
}
|
|
206
|
-
function createObjectLabelMap(items) {
|
|
207
|
-
return new Map((items ?? [])
|
|
208
|
-
.filter(item => item.role === undefined || item.role === 'object')
|
|
209
|
-
.map(item => [item.id, item.label || item.id]));
|
|
210
|
-
}
|
|
211
|
-
function createMarkerLabelMap(markers) {
|
|
212
|
-
return new Map(markers.map(marker => [marker.id, marker.label || marker.id]));
|
|
213
|
-
}
|
|
214
|
-
function createHierarchyPath(objectId, byId) {
|
|
215
|
-
const path = [];
|
|
216
|
-
const seen = new Set();
|
|
217
|
-
let cursor = byId.get(objectId) ?? null;
|
|
218
|
-
while (cursor && !seen.has(cursor.id)) {
|
|
219
|
-
seen.add(cursor.id);
|
|
220
|
-
path.unshift(cursor.label || cursor.id);
|
|
221
|
-
cursor = cursor.parentId ? byId.get(cursor.parentId) ?? null : null;
|
|
222
|
-
}
|
|
223
|
-
return path.length > 0 ? path.join(' / ') : undefined;
|
|
224
|
-
}
|
|
225
|
-
function readObjectKind(hierarchyItem, projection) {
|
|
226
|
-
const runtimeKind = readString(projection?.runtimeKind);
|
|
227
|
-
if (runtimeKind)
|
|
228
|
-
return runtimeKind;
|
|
229
|
-
const helperKind = readString(projection?.helperKind);
|
|
230
|
-
if (helperKind)
|
|
231
|
-
return helperKind;
|
|
232
|
-
const primitive = readRecord(projection?.primitive);
|
|
233
|
-
const primitiveShape = readString(primitive?.shape);
|
|
234
|
-
if (primitiveShape)
|
|
235
|
-
return `primitive:${primitiveShape}`;
|
|
236
|
-
const asset = readRecord(projection?.asset);
|
|
237
|
-
if (asset)
|
|
238
|
-
return 'asset';
|
|
239
|
-
return hierarchyItem?.role;
|
|
240
|
-
}
|
|
241
|
-
function readAgentTransform(value) {
|
|
242
|
-
const record = readRecord(value);
|
|
243
|
-
if (!record)
|
|
244
|
-
return undefined;
|
|
245
|
-
const position = readVec3(record.position);
|
|
246
|
-
const rotation = readVec3(record.rotation);
|
|
247
|
-
const scale = readVec3(record.scale);
|
|
248
|
-
if (!position && !rotation && !scale)
|
|
249
|
-
return undefined;
|
|
250
|
-
return {
|
|
251
|
-
...(position ? { position } : {}),
|
|
252
|
-
...(rotation ? { rotation } : {}),
|
|
253
|
-
...(scale ? { scale } : {}),
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
function readAgentBounds(value) {
|
|
257
|
-
const record = readRecord(value);
|
|
258
|
-
if (!record)
|
|
259
|
-
return undefined;
|
|
260
|
-
const boundsRecord = readRecord(record.bounds) ?? record;
|
|
261
|
-
const min = readVec3(boundsRecord.min);
|
|
262
|
-
const max = readVec3(boundsRecord.max);
|
|
263
|
-
const size = readVec3(boundsRecord.size);
|
|
264
|
-
const center = readVec3(boundsRecord.center);
|
|
265
|
-
if (!min && !max && !size && !center)
|
|
266
|
-
return undefined;
|
|
267
|
-
return {
|
|
268
|
-
...(min ? { min } : {}),
|
|
269
|
-
...(max ? { max } : {}),
|
|
270
|
-
...(size ? { size } : {}),
|
|
271
|
-
...(center ? { center } : {}),
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
function mergeAgentBounds(boundsList) {
|
|
275
|
-
const minMaxBounds = boundsList
|
|
276
|
-
.map(bounds => bounds.min && bounds.max ? { min: bounds.min, max: bounds.max } : null)
|
|
277
|
-
.filter((bounds) => !!bounds);
|
|
278
|
-
if (minMaxBounds.length === 0)
|
|
279
|
-
return undefined;
|
|
280
|
-
const min = {
|
|
281
|
-
x: Math.min(...minMaxBounds.map(bounds => bounds.min.x)),
|
|
282
|
-
y: Math.min(...minMaxBounds.map(bounds => bounds.min.y)),
|
|
283
|
-
z: Math.min(...minMaxBounds.map(bounds => bounds.min.z)),
|
|
284
|
-
};
|
|
285
|
-
const max = {
|
|
286
|
-
x: Math.max(...minMaxBounds.map(bounds => bounds.max.x)),
|
|
287
|
-
y: Math.max(...minMaxBounds.map(bounds => bounds.max.y)),
|
|
288
|
-
z: Math.max(...minMaxBounds.map(bounds => bounds.max.z)),
|
|
289
|
-
};
|
|
290
|
-
return {
|
|
291
|
-
min,
|
|
292
|
-
max,
|
|
293
|
-
size: {
|
|
294
|
-
x: max.x - min.x,
|
|
295
|
-
y: max.y - min.y,
|
|
296
|
-
z: max.z - min.z,
|
|
297
|
-
},
|
|
298
|
-
center: {
|
|
299
|
-
x: (min.x + max.x) / 2,
|
|
300
|
-
y: (min.y + max.y) / 2,
|
|
301
|
-
z: (min.z + max.z) / 2,
|
|
302
|
-
},
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
function readAssetRefs(value) {
|
|
306
|
-
const asset = readRecord(value);
|
|
307
|
-
if (!asset)
|
|
308
|
-
return [];
|
|
309
|
-
return [readString(asset.id), readString(asset.sourceId)].filter((ref) => !!ref);
|
|
310
|
-
}
|
|
311
|
-
function readVec3(value) {
|
|
312
|
-
const record = readRecord(value);
|
|
313
|
-
if (!record)
|
|
314
|
-
return undefined;
|
|
315
|
-
const x = readFiniteNumber(record.x);
|
|
316
|
-
const y = readFiniteNumber(record.y);
|
|
317
|
-
const z = readFiniteNumber(record.z);
|
|
318
|
-
return x == null || y == null || z == null ? undefined : { x, y, z };
|
|
319
|
-
}
|
|
320
|
-
function readRecord(value) {
|
|
321
|
-
return value && typeof value === 'object' ? value : null;
|
|
322
|
-
}
|
|
323
|
-
function readString(value) {
|
|
324
|
-
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
325
|
-
}
|
|
326
|
-
function readFiniteNumber(value) {
|
|
327
|
-
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
328
|
-
}
|
|
329
|
-
function normalizeId(value) {
|
|
330
|
-
const id = value.trim();
|
|
331
|
-
return id || null;
|
|
332
|
-
}
|
|
333
|
-
function normalizeProjectEntryPath(value) {
|
|
334
|
-
const rawPath = value.trim().replace(/\\/g, '/');
|
|
335
|
-
if (rawPath === '/' || rawPath === '.')
|
|
336
|
-
return '.';
|
|
337
|
-
const path = rawPath.replace(/^\/+/, '');
|
|
338
|
-
if (!path || /^[A-Za-z]:\//.test(path))
|
|
339
|
-
return null;
|
|
340
|
-
const segments = path.split('/');
|
|
341
|
-
return segments.some(segment => !segment || segment === '.' || segment === '..')
|
|
342
|
-
? null
|
|
343
|
-
: segments.join('/');
|
|
344
|
-
}
|
|
345
|
-
function normalizeIds(values) {
|
|
346
|
-
return [...new Set(values.map(value => value.trim()).filter(Boolean))];
|
|
347
|
-
}
|
|
348
|
-
function pickAgentSemantics(value) {
|
|
349
|
-
if (!value)
|
|
350
|
-
return {};
|
|
351
|
-
return {
|
|
352
|
-
...(value.domainKind ? { domainKind: value.domainKind } : {}),
|
|
353
|
-
...(value.domainRole ? { domainRole: value.domainRole } : {}),
|
|
354
|
-
...(value.functionLabel ? { functionLabel: value.functionLabel } : {}),
|
|
355
|
-
...(value.functionDescription ? { functionDescription: value.functionDescription } : {}),
|
|
356
|
-
...(value.domainHints ? { domainHints: value.domainHints } : {}),
|
|
357
|
-
...(value.bindingCandidates ? { bindingCandidates: value.bindingCandidates } : {}),
|
|
358
|
-
...(value.sourceRefs ? { sourceRefs: value.sourceRefs } : {}),
|
|
359
|
-
...(value.relationshipHints ? { relationshipHints: value.relationshipHints } : {}),
|
|
360
|
-
...(value.metadata ? { metadata: value.metadata } : {}),
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
function summarizeSceneObject(object) {
|
|
364
|
-
return [
|
|
365
|
-
`Scene Object: ${object.label ?? object.name ?? object.id}`,
|
|
366
|
-
`id: ${object.id}`,
|
|
367
|
-
...(object.hierarchyPath ? [`path: ${object.hierarchyPath}`] : []),
|
|
368
|
-
...(object.objectKind ? [`kind: ${object.objectKind}`] : []),
|
|
369
|
-
].join('\n');
|
|
370
|
-
}
|
|
371
|
-
function summarizeSceneObjectSet(objects) {
|
|
372
|
-
return [
|
|
373
|
-
`Scene Object Set: ${objects.length} objects`,
|
|
374
|
-
...objects.map(object => `- ${object.label ?? object.name ?? object.id} (${object.id})`),
|
|
375
|
-
].join('\n');
|
|
376
|
-
}
|
|
377
|
-
function summarizeRegionBinding(label, objects) {
|
|
378
|
-
return [
|
|
379
|
-
`Region Binding: ${label}`,
|
|
380
|
-
`objects: ${objects.length}`,
|
|
381
|
-
...objects.map(object => `- ${object.label ?? object.name ?? object.id} (${object.id})`),
|
|
382
|
-
].join('\n');
|
|
383
|
-
}
|
|
384
|
-
function summarizeSpatialMarker(marker, relations, relationTypes, markerLabels, objectLabels, neighborhood) {
|
|
385
|
-
const relationLabels = new Map(relationTypes.map(definition => [definition.type, definition.label]));
|
|
386
|
-
return [
|
|
387
|
-
`Spatial Marker: ${marker.label || marker.id}`,
|
|
388
|
-
`id: ${marker.id}`,
|
|
389
|
-
`type: ${marker.markerType}`,
|
|
390
|
-
`kind: ${marker.kind}`,
|
|
391
|
-
`spatial: ${summarizeSpatialFacts(marker)}`,
|
|
392
|
-
...(relations.length > 0
|
|
393
|
-
? [`relations: ${relations.map(relation => summarizeSpatialRelation(relation, relationLabels, markerLabels, objectLabels)).join('; ')}`]
|
|
394
|
-
: []),
|
|
395
|
-
...(neighborhood?.localSummaries?.length
|
|
396
|
-
? [`local summary: ${neighborhood.localSummaries.map(summary => summary.summary).join('; ')}`]
|
|
397
|
-
: []),
|
|
398
|
-
...(neighborhood?.twoHopSummaries?.length
|
|
399
|
-
? [`two-hop context: ${neighborhood.twoHopSummaries.map(summary => summary.summary).join('; ')}`]
|
|
400
|
-
: []),
|
|
401
|
-
...(neighborhood?.graphIssues?.length
|
|
402
|
-
? [`warnings: ${neighborhood.graphIssues.map(issue => issue.message).join('; ')}`]
|
|
403
|
-
: []),
|
|
404
|
-
].join('\n');
|
|
405
|
-
}
|
|
406
|
-
function summarizeSpatialRelationGraph(graph, relationTypes, objectLabels, focusSummaries = [], graphIssues = []) {
|
|
407
|
-
const relationLabels = new Map(relationTypes.map(definition => [definition.type, definition.label]));
|
|
408
|
-
const markerLabels = createMarkerLabelMap(graph.markers);
|
|
409
|
-
return [
|
|
410
|
-
`Spatial Relation Graph: ${graph.markers.length} markers, ${graph.relations.length} relations`,
|
|
411
|
-
...graph.markers.map(marker => `- ${marker.label || marker.id} (${marker.id}): ${summarizeSpatialFacts(marker)}`),
|
|
412
|
-
...(graph.relations.length > 0
|
|
413
|
-
? [`Relations: ${graph.relations.map(relation => summarizeSpatialRelation(relation, relationLabels, markerLabels, objectLabels)).join('; ')}`]
|
|
414
|
-
: []),
|
|
415
|
-
...(focusSummaries.length > 0
|
|
416
|
-
? [`Focus summaries: ${focusSummaries.map(summary => summary.summary).join('; ')}`]
|
|
417
|
-
: []),
|
|
418
|
-
...(graphIssues.length > 0
|
|
419
|
-
? [`Graph warnings: ${graphIssues.map(issue => issue.message).join('; ')}`]
|
|
420
|
-
: []),
|
|
421
|
-
].join('\n');
|
|
422
|
-
}
|
|
423
|
-
function createSpatialRelationNeighborhood(markerId, markerLabel, graph, directRelations, relatedMarkerIds, relatedObjectIds, relationTypes, markerLabels, objectLabels) {
|
|
424
|
-
const issues = createSpatialGraphIssues(graph, markerLabels, objectLabels)
|
|
425
|
-
.filter(issue => issue.markerId === markerId || graph.relations.some(relation => (relation.id === issue.relationId && relationTouchesMarker(relation, markerId))));
|
|
426
|
-
return {
|
|
427
|
-
markerId,
|
|
428
|
-
markerLabel,
|
|
429
|
-
oneHopRelations: directRelations.map(cloneSpatialRelation),
|
|
430
|
-
...(relatedMarkerIds.length ? { relatedMarkerIds: [...relatedMarkerIds] } : {}),
|
|
431
|
-
...(relatedObjectIds.length ? { relatedObjectIds: [...relatedObjectIds] } : {}),
|
|
432
|
-
localSummaries: createMarkerLocalRelationSummaries(markerId, markerLabel, directRelations, relationTypes, markerLabels, objectLabels),
|
|
433
|
-
twoHopSummaries: createTwoHopRelationSummaries(markerId, graph, directRelations, relationTypes, markerLabels, objectLabels),
|
|
434
|
-
...(issues.length ? { graphIssues: issues } : {}),
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
function createSpatialGraphFocusSummaries(graph, focusMarkerIds, focusObjectIds, relationTypes, markerLabels, objectLabels) {
|
|
438
|
-
const summaries = [];
|
|
439
|
-
const focusMarkers = focusMarkerIds.length > 0
|
|
440
|
-
? focusMarkerIds
|
|
441
|
-
: graph.markers.slice(0, 3).map(marker => marker.id);
|
|
442
|
-
for (const markerId of focusMarkers) {
|
|
443
|
-
const marker = graph.markers.find(candidate => candidate.id === markerId) ?? null;
|
|
444
|
-
if (!marker)
|
|
445
|
-
continue;
|
|
446
|
-
const directRelations = graph.relations.filter(relation => relationTouchesMarker(relation, markerId));
|
|
447
|
-
summaries.push(...createMarkerLocalRelationSummaries(markerId, marker.label || marker.id, directRelations, relationTypes, markerLabels, objectLabels));
|
|
448
|
-
}
|
|
449
|
-
if (focusObjectIds.length > 0) {
|
|
450
|
-
const relationLabels = new Map(relationTypes.map(definition => [definition.type, definition.label]));
|
|
451
|
-
for (const objectId of focusObjectIds) {
|
|
452
|
-
const relations = graph.relations.filter(relation => relationTouchesObject(relation, objectId));
|
|
453
|
-
if (relations.length === 0)
|
|
454
|
-
continue;
|
|
455
|
-
summaries.push({
|
|
456
|
-
summary: `${formatEndpointHumanLabel({ kind: 'scene-object', id: objectId }, markerLabels, objectLabels)} has ${relations.length} direct marker relations: ${relations.map(relation => summarizeSpatialRelation(relation, relationLabels, markerLabels, objectLabels)).join('; ')}`,
|
|
457
|
-
count: relations.length,
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
return summaries;
|
|
462
|
-
}
|
|
463
|
-
function createMarkerLocalRelationSummaries(markerId, markerLabel, relations, relationTypes, markerLabels, objectLabels) {
|
|
464
|
-
const relationTypeLabels = new Map(relationTypes.map(definition => [definition.type, definition.label]));
|
|
465
|
-
const groups = new Map();
|
|
466
|
-
for (const relation of relations) {
|
|
467
|
-
const related = relation.from.kind === 'marker' && relation.from.id === markerId ? relation.to : relation.from;
|
|
468
|
-
const label = relation.label || relationTypeLabels.get(relation.type) || relation.type;
|
|
469
|
-
const group = groups.get(relation.type) ?? { type: relation.type, label, count: 0, endpoints: [] };
|
|
470
|
-
group.count += 1;
|
|
471
|
-
group.endpoints.push(createEndpointSummary(related, markerLabels, objectLabels));
|
|
472
|
-
groups.set(relation.type, group);
|
|
473
|
-
}
|
|
474
|
-
return [...groups.values()].map(group => ({
|
|
475
|
-
relationType: group.type,
|
|
476
|
-
relationLabel: group.label,
|
|
477
|
-
count: group.count,
|
|
478
|
-
summary: `${markerLabel} ${formatRelationCountPhrase(group.label, group.type, group.count)}: ${group.endpoints.slice(0, 6).map(formatEndpointSummary).join(', ')}${group.endpoints.length > 6 ? `, +${group.endpoints.length - 6} more` : ''}`,
|
|
479
|
-
}));
|
|
480
|
-
}
|
|
481
|
-
function createTwoHopRelationSummaries(markerId, graph, directRelations, relationTypes, markerLabels, objectLabels) {
|
|
482
|
-
const directRelationIds = new Set(directRelations.map(relation => relation.id));
|
|
483
|
-
const neighborMarkerIds = new Set();
|
|
484
|
-
for (const relation of directRelations) {
|
|
485
|
-
for (const endpoint of [relation.from, relation.to]) {
|
|
486
|
-
if (endpoint.kind === 'marker' && endpoint.id !== markerId)
|
|
487
|
-
neighborMarkerIds.add(endpoint.id);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
const relationLabels = new Map(relationTypes.map(definition => [definition.type, definition.label]));
|
|
491
|
-
const summaries = [];
|
|
492
|
-
for (const neighborId of neighborMarkerIds) {
|
|
493
|
-
const secondHop = graph.relations.filter(relation => relationTouchesMarker(relation, neighborId) && !directRelationIds.has(relation.id));
|
|
494
|
-
if (secondHop.length === 0)
|
|
495
|
-
continue;
|
|
496
|
-
const neighborLabel = markerLabels.get(neighborId) ?? neighborId;
|
|
497
|
-
summaries.push({
|
|
498
|
-
from: { kind: 'marker', id: neighborId, label: markerLabels.get(neighborId) },
|
|
499
|
-
count: secondHop.length,
|
|
500
|
-
summary: `${neighborLabel} has ${secondHop.length} additional relations: ${secondHop.slice(0, 5).map(relation => summarizeSpatialRelation(relation, relationLabels, markerLabels, objectLabels)).join('; ')}${secondHop.length > 5 ? `; +${secondHop.length - 5} more` : ''}`,
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
return summaries;
|
|
504
|
-
}
|
|
505
|
-
function createSpatialGraphIssues(graph, markerLabels, objectLabels) {
|
|
506
|
-
const markerIds = new Set(graph.markers.map(marker => marker.id));
|
|
507
|
-
const issues = [];
|
|
508
|
-
for (const marker of graph.markers) {
|
|
509
|
-
if (marker.spatial.status !== 'resolved') {
|
|
510
|
-
issues.push({
|
|
511
|
-
code: 'marker-spatial-unresolved',
|
|
512
|
-
severity: 'warning',
|
|
513
|
-
markerId: marker.id,
|
|
514
|
-
message: `${marker.label || marker.id} has unresolved spatial facts${marker.spatial.unresolvedReason ? `: ${marker.spatial.unresolvedReason}` : ''}.`,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
for (const target of collectMarkerSpatialTargets(marker)) {
|
|
518
|
-
if (target.kind === 'scene-object' && !objectLabels.has(target.id)) {
|
|
519
|
-
issues.push({
|
|
520
|
-
code: 'marker-missing-object-target',
|
|
521
|
-
severity: 'warning',
|
|
522
|
-
markerId: marker.id,
|
|
523
|
-
endpoint: createEndpointSummary({ kind: target.kind, id: target.id, label: target.label }, markerLabels, objectLabels),
|
|
524
|
-
message: `${marker.label || marker.id} references missing target scene object ${target.id}.`,
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
for (const relation of graph.relations) {
|
|
530
|
-
for (const [side, endpoint] of [['from', relation.from], ['to', relation.to]]) {
|
|
531
|
-
if (endpoint.kind === 'marker' && !markerIds.has(endpoint.id)) {
|
|
532
|
-
issues.push({
|
|
533
|
-
code: 'relation-missing-marker-endpoint',
|
|
534
|
-
severity: 'warning',
|
|
535
|
-
relationId: relation.id,
|
|
536
|
-
endpoint: createEndpointSummary(endpoint, markerLabels, objectLabels),
|
|
537
|
-
message: `Relation ${relation.id} ${side} endpoint references missing marker ${endpoint.id}.`,
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
if (endpoint.kind === 'scene-object' && !objectLabels.has(endpoint.id)) {
|
|
541
|
-
issues.push({
|
|
542
|
-
code: 'relation-missing-object-endpoint',
|
|
543
|
-
severity: 'warning',
|
|
544
|
-
relationId: relation.id,
|
|
545
|
-
endpoint: createEndpointSummary(endpoint, markerLabels, objectLabels),
|
|
546
|
-
message: `Relation ${relation.id} ${side} endpoint references missing scene object ${endpoint.id}.`,
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
return issues;
|
|
552
|
-
}
|
|
553
|
-
function collectMarkerSpatialTargets(marker) {
|
|
554
|
-
const targets = [];
|
|
555
|
-
const pushTarget = (target) => {
|
|
556
|
-
if (!target || targets.some(candidate => candidate.kind === target.kind && candidate.id === target.id))
|
|
557
|
-
return;
|
|
558
|
-
targets.push({
|
|
559
|
-
kind: target.kind,
|
|
560
|
-
id: target.id,
|
|
561
|
-
...(target.label ? { label: target.label } : {}),
|
|
562
|
-
});
|
|
563
|
-
};
|
|
564
|
-
pushTarget(marker.target);
|
|
565
|
-
pushTarget(marker.spatial.target);
|
|
566
|
-
if (marker.geometry.kind === 'point' || marker.geometry.kind === 'object-bounds')
|
|
567
|
-
pushTarget(marker.geometry.target);
|
|
568
|
-
return targets;
|
|
569
|
-
}
|
|
570
|
-
function relationTouchesMarker(relation, markerId) {
|
|
571
|
-
return (relation.from.kind === 'marker' && relation.from.id === markerId)
|
|
572
|
-
|| (relation.to.kind === 'marker' && relation.to.id === markerId);
|
|
573
|
-
}
|
|
574
|
-
function relationTouchesObject(relation, objectId) {
|
|
575
|
-
return (relation.from.kind === 'scene-object' && relation.from.id === objectId)
|
|
576
|
-
|| (relation.to.kind === 'scene-object' && relation.to.id === objectId);
|
|
577
|
-
}
|
|
578
|
-
function createEndpointSummary(endpoint, markerLabels, objectLabels) {
|
|
579
|
-
const label = endpoint.label
|
|
580
|
-
|| (endpoint.kind === 'marker'
|
|
581
|
-
? markerLabels.get(endpoint.id)
|
|
582
|
-
: endpoint.kind === 'scene-object'
|
|
583
|
-
? objectLabels.get(endpoint.id)
|
|
584
|
-
: undefined);
|
|
585
|
-
return {
|
|
586
|
-
kind: endpoint.kind,
|
|
587
|
-
id: endpoint.id,
|
|
588
|
-
...(label ? { label } : {}),
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
function formatEndpointSummary(endpoint) {
|
|
592
|
-
return endpoint.label && endpoint.label !== endpoint.id
|
|
593
|
-
? `${endpoint.kind}:${endpoint.id} "${endpoint.label}"`
|
|
594
|
-
: `${endpoint.kind}:${endpoint.id}`;
|
|
595
|
-
}
|
|
596
|
-
function formatEndpointHumanLabel(endpoint, markerLabels, objectLabels) {
|
|
597
|
-
const summary = createEndpointSummary(endpoint, markerLabels, objectLabels);
|
|
598
|
-
return summary.label || summary.id;
|
|
599
|
-
}
|
|
600
|
-
function formatRelationCountPhrase(label, type, count) {
|
|
601
|
-
return `${label || type} ${count}`;
|
|
602
|
-
}
|
|
603
|
-
function summarizeSpatialFacts(marker) {
|
|
604
|
-
const spatial = marker.spatial;
|
|
605
|
-
if (spatial.status !== 'resolved')
|
|
606
|
-
return `unresolved${spatial.unresolvedReason ? `: ${spatial.unresolvedReason}` : ''}`;
|
|
607
|
-
const parts = [
|
|
608
|
-
spatial.origin ? `origin ${formatVec3(spatial.origin)}` : null,
|
|
609
|
-
spatial.localFrame?.forward ? `forward ${formatVec3(spatial.localFrame.forward)}` : null,
|
|
610
|
-
spatial.dimensions ? `dimensions ${formatVec3(spatial.dimensions)}` : null,
|
|
611
|
-
spatial.bounds ? `bounds center ${formatVec3(spatial.bounds.center)} size ${formatVec3(spatial.bounds.size)}` : null,
|
|
612
|
-
spatial.target ? `target ${summarizeSpatialRelationEndpoint({
|
|
613
|
-
kind: spatial.target.kind,
|
|
614
|
-
id: spatial.target.id,
|
|
615
|
-
...(spatial.target.label ? { label: spatial.target.label } : {}),
|
|
616
|
-
}, new Map(), new Map())}` : null,
|
|
617
|
-
].filter((value) => !!value);
|
|
618
|
-
return parts.join(', ') || 'resolved';
|
|
619
|
-
}
|
|
620
|
-
function summarizeSpatialRelation(relation, relationLabels, markerLabels, objectLabels) {
|
|
621
|
-
const arrow = relation.directed === false ? '--' : '->';
|
|
622
|
-
return [
|
|
623
|
-
summarizeSpatialRelationEndpoint(relation.from, markerLabels, objectLabels),
|
|
624
|
-
summarizeSpatialRelationType(relation, relationLabels),
|
|
625
|
-
arrow,
|
|
626
|
-
summarizeSpatialRelationEndpoint(relation.to, markerLabels, objectLabels),
|
|
627
|
-
].join(' ');
|
|
628
|
-
}
|
|
629
|
-
function summarizeSpatialRelationEndpoint(endpoint, markerLabels, objectLabels) {
|
|
630
|
-
const label = endpoint.label
|
|
631
|
-
|| (endpoint.kind === 'marker'
|
|
632
|
-
? markerLabels.get(endpoint.id)
|
|
633
|
-
: endpoint.kind === 'scene-object'
|
|
634
|
-
? objectLabels.get(endpoint.id)
|
|
635
|
-
: undefined);
|
|
636
|
-
return label && label !== endpoint.id
|
|
637
|
-
? `${endpoint.kind}:${endpoint.id} "${label}"`
|
|
638
|
-
: `${endpoint.kind}:${endpoint.id}`;
|
|
639
|
-
}
|
|
640
|
-
function summarizeSpatialRelationType(relation, relationLabels) {
|
|
641
|
-
const label = relation.label || relationLabels.get(relation.type);
|
|
642
|
-
return label && label !== relation.type ? `${label} [${relation.type}]` : relation.type;
|
|
643
|
-
}
|
|
644
|
-
function formatVec3(value) {
|
|
645
|
-
return `(${value.x}, ${value.y}, ${value.z})`;
|
|
646
|
-
}
|
|
647
|
-
function cloneResolvedSpatialMarkerGraph(graph) {
|
|
648
|
-
return {
|
|
649
|
-
...graph,
|
|
650
|
-
markers: graph.markers.map(cloneResolvedSpatialMarker),
|
|
651
|
-
relations: graph.relations.map(cloneSpatialRelation),
|
|
652
|
-
metadata: graph.metadata ? { ...graph.metadata } : undefined,
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
function cloneResolvedSpatialMarker(marker) {
|
|
656
|
-
return {
|
|
657
|
-
...marker,
|
|
658
|
-
geometry: cloneJsonObject(marker.geometry),
|
|
659
|
-
target: marker.target ? { ...marker.target, metadata: marker.target.metadata ? { ...marker.target.metadata } : undefined } : undefined,
|
|
660
|
-
semanticFrame: marker.semanticFrame ? { ...marker.semanticFrame } : undefined,
|
|
661
|
-
tags: marker.tags ? [...marker.tags] : undefined,
|
|
662
|
-
metadata: marker.metadata ? { ...marker.metadata } : undefined,
|
|
663
|
-
spatial: {
|
|
664
|
-
...marker.spatial,
|
|
665
|
-
origin: marker.spatial.origin ? { ...marker.spatial.origin } : undefined,
|
|
666
|
-
bounds: marker.spatial.bounds
|
|
667
|
-
? {
|
|
668
|
-
min: { ...marker.spatial.bounds.min },
|
|
669
|
-
max: { ...marker.spatial.bounds.max },
|
|
670
|
-
center: { ...marker.spatial.bounds.center },
|
|
671
|
-
size: { ...marker.spatial.bounds.size },
|
|
672
|
-
}
|
|
673
|
-
: undefined,
|
|
674
|
-
dimensions: marker.spatial.dimensions ? { ...marker.spatial.dimensions } : undefined,
|
|
675
|
-
corners: marker.spatial.corners?.map(corner => ({ ...corner })),
|
|
676
|
-
localFrame: marker.spatial.localFrame ? { ...marker.spatial.localFrame } : undefined,
|
|
677
|
-
target: marker.spatial.target
|
|
678
|
-
? {
|
|
679
|
-
...marker.spatial.target,
|
|
680
|
-
metadata: marker.spatial.target.metadata ? { ...marker.spatial.target.metadata } : undefined,
|
|
681
|
-
}
|
|
682
|
-
: undefined,
|
|
683
|
-
metadata: marker.spatial.metadata ? { ...marker.spatial.metadata } : undefined,
|
|
684
|
-
},
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
function cloneSpatialRelation(relation) {
|
|
688
|
-
return {
|
|
689
|
-
...relation,
|
|
690
|
-
from: { ...relation.from },
|
|
691
|
-
to: { ...relation.to },
|
|
692
|
-
tags: relation.tags ? [...relation.tags] : undefined,
|
|
693
|
-
metadata: relation.metadata ? { ...relation.metadata } : undefined,
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
function cloneMarkerTypeDefinition(definition) {
|
|
697
|
-
return {
|
|
698
|
-
...definition,
|
|
699
|
-
defaultTags: definition.defaultTags ? [...definition.defaultTags] : undefined,
|
|
700
|
-
metadata: definition.metadata ? { ...definition.metadata } : undefined,
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
function cloneRelationTypeDefinition(definition) {
|
|
704
|
-
return {
|
|
705
|
-
...definition,
|
|
706
|
-
allowedFromKinds: definition.allowedFromKinds ? [...definition.allowedFromKinds] : undefined,
|
|
707
|
-
allowedToKinds: definition.allowedToKinds ? [...definition.allowedToKinds] : undefined,
|
|
708
|
-
metadata: definition.metadata ? { ...definition.metadata } : undefined,
|
|
709
|
-
};
|
|
710
|
-
}
|
|
711
|
-
function cloneJsonObject(value) {
|
|
712
|
-
if (!value || typeof value !== 'object')
|
|
713
|
-
return value;
|
|
714
|
-
return JSON.parse(JSON.stringify(value));
|
|
715
|
-
}
|
|
716
|
-
//# sourceMappingURL=local-editor-agent-context.js.map
|