auvrynt 1.0.2 → 1.0.5
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/LICENSE +21 -21
- package/README.md +366 -233
- package/addons/auvrynt_bridge/auvrynt_bridge.gd +500 -0
- package/addons/auvrynt_bridge/plugin.cfg +7 -0
- package/bin/auvrynt-launcher.cjs +77 -0
- package/dist/artifact-registry.js +1 -0
- package/dist/aseprite-tools.js +1 -0
- package/dist/auth/connection-registry.js +145 -0
- package/dist/auth/connection-status.js +176 -0
- package/dist/auth/oauth-provider.js +617 -0
- package/dist/auth/room-registry.js +131 -0
- package/dist/auth/session-registry.js +531 -0
- package/dist/background-lifecycle.js +1 -0
- package/dist/blender-client.js +1 -109
- package/dist/blender-tools.js +1 -930
- package/dist/browser-stability.js +1 -0
- package/dist/cli/commands/help-command.js +10 -0
- package/dist/cli/commands/init-command.js +190 -0
- package/dist/cli/commands/integration-commands.js +88 -0
- package/dist/cli/commands/serve-command.js +83 -0
- package/dist/cli/commands/setup-command.js +81 -0
- package/dist/cli/commands/status-commands.js +166 -0
- package/dist/cli/commands/tunnel-command.js +127 -0
- package/dist/cli/commands/user-config-commands.js +105 -0
- package/dist/cli/dashboard-actions.js +516 -0
- package/dist/cli/dashboard-native-actions.js +282 -0
- package/dist/cli/foreground-server.js +270 -0
- package/dist/cli/instance-control.js +21 -0
- package/dist/cli/instance-lock.js +123 -0
- package/dist/cli/integration-bootstrap.js +206 -0
- package/dist/cli/lifecycle-manager.js +493 -0
- package/dist/cli/runtime-support.js +74 -0
- package/dist/cli/serena-detected-default.js +27 -0
- package/dist/cli/tunnel-health-monitor.js +182 -0
- package/dist/cli.js +82 -739
- package/dist/config.js +1 -243
- package/dist/connection-registry.js +1 -73
- package/dist/connection-status.js +1 -139
- package/dist/control-retry.js +1 -0
- package/dist/crash-recovery.js +1 -0
- package/dist/db/client.js +16 -3
- package/dist/db/schema.js +30 -0
- package/dist/dotnet-tools.js +1 -223
- package/dist/git-worktrees.js +1 -134
- package/dist/git.js +1 -41
- package/dist/godot-animation-tilemap.js +1 -82
- package/dist/godot-csharp-build.js +1 -93
- package/dist/godot-csharp-project.js +1 -157
- package/dist/godot-csharp-runner.js +1 -146
- package/dist/godot-csharp-semantic.js +1 -161
- package/dist/godot-csharp-validate.js +1 -71
- package/dist/godot-dotnet-env.js +1 -169
- package/dist/godot-editor-bridge.js +1 -140
- package/dist/godot-gdscript.js +1 -824
- package/dist/godot-project-settings.js +1 -223
- package/dist/godot-runtime-testing.js +1 -249
- package/dist/godot-tools.js +1 -183
- package/dist/http-rate-limit.js +1 -0
- package/dist/http-server-hardening.js +1 -0
- package/dist/image-tools.js +1 -157
- package/dist/infrastructure/command-reference.js +32 -0
- package/dist/infrastructure/config.js +424 -0
- package/dist/infrastructure/context7-auth.js +55 -0
- package/dist/infrastructure/http-rate-limit.js +42 -0
- package/dist/infrastructure/http-server-hardening.js +23 -0
- package/dist/infrastructure/integration-queue.js +46 -0
- package/dist/infrastructure/logger.js +129 -0
- package/dist/infrastructure/mcp-event-store.js +103 -0
- package/dist/infrastructure/ngrok-auth-pool.js +208 -0
- package/dist/infrastructure/request-context.js +14 -0
- package/dist/infrastructure/shutdown.js +37 -0
- package/dist/infrastructure/sse-heartbeat.js +47 -0
- package/dist/infrastructure/tool-capabilities.js +67 -0
- package/dist/infrastructure/tool-result-budget.js +175 -0
- package/dist/infrastructure/user-config.js +167 -0
- package/dist/integration-discovery.js +1 -98
- package/dist/integration-queue.js +1 -0
- package/dist/integrations/agent-reach/agent-reach-tools.js +196 -0
- package/dist/integrations/agent-reach/native-channels.js +468 -0
- package/dist/integrations/aseprite/aseprite-analysis-tools.js +368 -0
- package/dist/integrations/aseprite/aseprite-editing-tools.js +647 -0
- package/dist/integrations/aseprite/aseprite-live-tools.js +297 -0
- package/dist/integrations/aseprite/aseprite-safety-tools.js +594 -0
- package/dist/integrations/aseprite/aseprite-specialized-tools.js +289 -0
- package/dist/integrations/aseprite/aseprite-tools.js +837 -0
- package/dist/integrations/blender/blender-catalog-mesh.js +593 -0
- package/dist/integrations/blender/blender-catalog-object.js +906 -0
- package/dist/integrations/blender/blender-catalog-scene.js +266 -0
- package/dist/integrations/blender/blender-catalog-select.js +581 -0
- package/dist/integrations/blender/blender-catalog-stubs.js +7512 -0
- package/dist/integrations/blender/blender-catalog.js +165 -0
- package/dist/integrations/blender/blender-client.js +105 -0
- package/dist/integrations/blender/blender-tools.js +2243 -0
- package/dist/integrations/context7/context7-tools.js +106 -0
- package/dist/integrations/dotnet/dotnet-tools.js +195 -0
- package/dist/integrations/godot/godot-animation-tilemap.js +74 -0
- package/dist/integrations/godot/godot-csharp-build.js +91 -0
- package/dist/integrations/godot/godot-csharp-project.js +155 -0
- package/dist/integrations/godot/godot-csharp-runner.js +118 -0
- package/dist/integrations/godot/godot-csharp-semantic.js +146 -0
- package/dist/integrations/godot/godot-csharp-validate.js +71 -0
- package/dist/integrations/godot/godot-dotnet-env.js +134 -0
- package/dist/integrations/godot/godot-editor-bridge.js +328 -0
- package/dist/integrations/godot/godot-gdscript.js +536 -0
- package/dist/integrations/godot/godot-project-settings.js +178 -0
- package/dist/integrations/godot/godot-runtime-testing.js +263 -0
- package/dist/integrations/godot/godot-tools.js +193 -0
- package/dist/integrations/images/image-tools.js +414 -0
- package/dist/integrations/images/png-codec.js +251 -0
- package/dist/integrations/images/view-image.js +99 -0
- package/dist/integrations/images/window-capture.js +148 -0
- package/dist/integrations/integration-discovery.js +185 -0
- package/dist/integrations/obsidian/obsidian-tools.js +205 -0
- package/dist/integrations/playwright/browser-session.js +516 -0
- package/dist/integrations/playwright/browser-stability.js +36 -0
- package/dist/integrations/playwright/playwright-runtime.js +105 -0
- package/dist/integrations/playwright/web-tools.js +504 -0
- package/dist/integrations/roblox/roblox-helpers.js +381 -0
- package/dist/integrations/roblox/roblox-studio-client.js +112 -0
- package/dist/integrations/roblox/roblox-tools.js +106 -0
- package/dist/integrations/serena/serena-manager.js +464 -0
- package/dist/integrations/serena/serena-tools.js +411 -0
- package/dist/logger.js +1 -76
- package/dist/mcp-event-store.js +1 -0
- package/dist/oauth-provider.js +1 -377
- package/dist/pi-tools.js +1 -81
- package/dist/playwright-runtime.js +1 -0
- package/dist/process/background-lifecycle.js +189 -0
- package/dist/process/control-retry.js +42 -0
- package/dist/process/crash-recovery.js +23 -0
- package/dist/process/processes.js +456 -0
- package/dist/processes.js +1 -218
- package/dist/request-context.js +1 -0
- package/dist/review-checkpoints.js +1 -142
- package/dist/room-registry.js +1 -0
- package/dist/roots.js +1 -53
- package/dist/search-discovery.js +1 -271
- package/dist/serena-manager.js +1 -443
- package/dist/serena-tools.js +1 -411
- package/dist/server/dashboard-page-styles.js +331 -0
- package/dist/server/dashboard-page.js +1509 -0
- package/dist/server/dashboard-routes.js +46 -0
- package/dist/server/dashboard.js +240 -0
- package/dist/server/http-helpers.js +30 -0
- package/dist/server/integration-profile-update.js +37 -0
- package/dist/server/mcp-policy.js +169 -0
- package/dist/server/mcp-server-factory.js +127 -0
- package/dist/server/mcp-tool-registrar.js +182 -0
- package/dist/server/openai-session-hint.js +14 -0
- package/dist/server/tool-groups.js +29 -0
- package/dist/server/tool-logging.js +33 -0
- package/dist/server/tool-registration-shared.js +59 -0
- package/dist/server/tools/aseprite-advanced-tools-registration.js +547 -0
- package/dist/server/tools/aseprite-tools-registration.js +213 -0
- package/dist/server/tools/blender-tools-registration.js +690 -0
- package/dist/server/tools/core-file-tools-registration.js +459 -0
- package/dist/server/tools/dotnet-godot-window-tools-registration.js +120 -0
- package/dist/server/tools/godot-csharp-tools-registration.js +252 -0
- package/dist/server/tools/godot-gdscript-tools-registration.js +189 -0
- package/dist/server/tools/process-project-tools-registration.js +155 -0
- package/dist/server/tools/roblox-tools-registration.js +514 -0
- package/dist/server/tools/web-image-tools-registration.js +326 -0
- package/dist/server/tools/workspace-lifecycle-tools-registration.js +130 -0
- package/dist/server/ui-assets.js +97 -0
- package/dist/server/workspace-analytics.js +92 -0
- package/dist/server.js +453 -2713
- package/dist/session-registry.js +1 -0
- package/dist/shutdown.js +1 -0
- package/dist/skills.js +1 -45
- package/dist/sse-heartbeat.js +1 -0
- package/dist/tool-capabilities.js +1 -0
- package/dist/tool-result-budget.js +1 -0
- package/dist/tools/pi-tools.js +81 -0
- package/dist/tunnels/cloudflare-tunnel.js +217 -0
- package/dist/tunnels/cloudflared-service.js +174 -0
- package/dist/tunnels/ngrok-tunnel.js +220 -0
- package/dist/tunnels/tunnel-manager.js +186 -0
- package/dist/tunnels/tunnel-types.js +1 -0
- package/dist/tunnels/tunnel-utils.js +62 -0
- package/dist/ui/.vite/manifest.json +9 -2487
- package/dist/ui/assets/heavy-payload-D42A9ceL.js +1 -0
- package/dist/ui/assets/lightweight-diff-Cv4g9Hdr.js +13 -0
- package/dist/ui/assets/review-payload-DKIg1cKF.js +1 -0
- package/dist/ui/assets/workspace-app-CeK3NhmB.css +1 -0
- package/dist/ui/assets/{workspace-app-C5QsE314.js → workspace-app-CkUXnpl4.js} +6 -6
- package/dist/ui/brand-theme.js +23 -0
- package/dist/ui/workspace-app.html +15 -15
- package/dist/user-config.js +1 -57
- package/dist/view-image.js +1 -104
- package/dist/web-tools.js +1 -200
- package/dist/window-capture.js +1 -74
- package/dist/workspace/artifact-registry.js +69 -0
- package/dist/workspace/git-worktrees.js +141 -0
- package/dist/workspace/git.js +42 -0
- package/dist/workspace/review-checkpoints.js +142 -0
- package/dist/workspace/roots.js +56 -0
- package/dist/workspace/search-discovery.js +264 -0
- package/dist/workspace/skills.js +45 -0
- package/dist/workspace/workspace-store.js +219 -0
- package/dist/workspace/workspaces.js +314 -0
- package/dist/workspace-store.js +1 -125
- package/dist/workspaces.js +1 -226
- package/docs/CREATOR_STORE_FREE_ASSETS.md +162 -0
- package/docs/DEVELOPMENT_TOOLS.md +136 -93
- package/docs/assets/auvrynt-icon.png +0 -0
- package/docs/assets/auvrynt-icon.svg +20 -0
- package/docs/chatgpt-coding-workflow.md +143 -143
- package/docs/configuration.md +156 -124
- package/docs/diagnostics.md +79 -0
- package/docs/gotchas.md +244 -202
- package/docs/multi-agent-and-long-projects.md +91 -0
- package/docs/security.md +138 -100
- package/docs/setup.md +171 -131
- package/docs/source-layout.md +60 -0
- package/extensions/auvrynt_bridge/auvrynt_bridge.lua +594 -0
- package/extensions/auvrynt_bridge/live_analysis.lua +181 -0
- package/extensions/auvrynt_bridge/live_animation.lua +134 -0
- package/extensions/auvrynt_bridge/live_commands.lua +24 -0
- package/extensions/auvrynt_bridge/live_common.lua +130 -0
- package/extensions/auvrynt_bridge/live_document.lua +78 -0
- package/extensions/auvrynt_bridge/live_drawing.lua +125 -0
- package/extensions/auvrynt_bridge/live_effects.lua +91 -0
- package/extensions/auvrynt_bridge/live_palette_template.lua +167 -0
- package/extensions/auvrynt_bridge/live_selection.lua +110 -0
- package/extensions/auvrynt_bridge/live_structure.lua +129 -0
- package/extensions/auvrynt_bridge/package.json +17 -0
- package/guides/ASEPRITE_AGENT_GUIDE.md +133 -0
- package/guides/BLENDER_AGENT_GUIDE.md +472 -0
- package/guides/GODOT_AGENT_GUIDE.md +298 -0
- package/guides/PROJECT_ROUTER.md +165 -0
- package/guides/ROBLOX_AGENT_GUIDE.md +75 -0
- package/guides/SOFTWARE_AGENT_GUIDE.md +104 -0
- package/guides/WEB_AGENT_GUIDE.md +287 -0
- package/package.json +78 -70
- package/scripts/dev-server.mjs +121 -120
- package/scripts/live-tunnel-smoke.mjs +538 -0
- package/scripts/repo-hygiene.mjs +74 -0
- package/scripts/restart-after-crash.mjs +49 -0
- package/scripts/run-tests.mjs +166 -0
- package/dist/ui/assets/abap-CLvhMVsD.js +0 -1
- package/dist/ui/assets/actionscript-3--17pq3dv.js +0 -1
- package/dist/ui/assets/ada-C5qYipkI.js +0 -1
- package/dist/ui/assets/andromeeda-vGVdxbeo.js +0 -1
- package/dist/ui/assets/angular-html-BJqQFYI6.js +0 -1
- package/dist/ui/assets/angular-ts-CMJECO0Y.js +0 -1
- package/dist/ui/assets/apache-U0d_L8uA.js +0 -1
- package/dist/ui/assets/apex-CGTLDQj6.js +0 -1
- package/dist/ui/assets/apl-DWeXpBBr.js +0 -1
- package/dist/ui/assets/applescript-CCn79oCD.js +0 -1
- package/dist/ui/assets/ara-4CJ0cIlV.js +0 -1
- package/dist/ui/assets/asciidoc-DE70LPWp.js +0 -1
- package/dist/ui/assets/asm-Cmm7eHzH.js +0 -1
- package/dist/ui/assets/astro-CLbttLOq.js +0 -1
- package/dist/ui/assets/aurora-x-CDeNXAV0.js +0 -1
- package/dist/ui/assets/awk-BWXHIvNe.js +0 -1
- package/dist/ui/assets/ayu-dark-DluEY0Gj.js +0 -1
- package/dist/ui/assets/ayu-light-C3h-C4tm.js +0 -1
- package/dist/ui/assets/ayu-mirage-Bqwy1Gya.js +0 -1
- package/dist/ui/assets/ballerina-B7ZEbQpA.js +0 -1
- package/dist/ui/assets/bat-Bo4NYOV-.js +0 -1
- package/dist/ui/assets/beancount-D-usSTwE.js +0 -1
- package/dist/ui/assets/berry-DKpUyyne.js +0 -1
- package/dist/ui/assets/bibtex-Ci_nEsc7.js +0 -1
- package/dist/ui/assets/bicep-CUHmPFLl.js +0 -1
- package/dist/ui/assets/bird2-C2hNVINV.js +0 -1
- package/dist/ui/assets/blade-BOzY0P2V.js +0 -1
- package/dist/ui/assets/bsl-BkkzgIyY.js +0 -1
- package/dist/ui/assets/c-BG-8uJvh.js +0 -1
- package/dist/ui/assets/c3-CnJL0r0V.js +0 -1
- package/dist/ui/assets/cadence-CQ2zXKGN.js +0 -1
- package/dist/ui/assets/cairo-DLTphjLi.js +0 -1
- package/dist/ui/assets/catppuccin-frappe-3VR1Za6u.js +0 -1
- package/dist/ui/assets/catppuccin-latte-DwIHMF0Q.js +0 -1
- package/dist/ui/assets/catppuccin-macchiato-DYnBP6_5.js +0 -1
- package/dist/ui/assets/catppuccin-mocha-DYhrFGRu.js +0 -1
- package/dist/ui/assets/clarity-SemFz856.js +0 -1
- package/dist/ui/assets/clojure-DqKBuwfJ.js +0 -1
- package/dist/ui/assets/cmake-Bj61d0ZC.js +0 -1
- package/dist/ui/assets/cobol-I_17IuGe.js +0 -1
- package/dist/ui/assets/codeowners-C8r90Shi.js +0 -1
- package/dist/ui/assets/codeql-oeQT6MSM.js +0 -1
- package/dist/ui/assets/coffee-C0B8hmok.js +0 -1
- package/dist/ui/assets/common-lisp-Cv5bFMCO.js +0 -1
- package/dist/ui/assets/coq-BrsZFFmf.js +0 -1
- package/dist/ui/assets/cpp-DDJXt6Vs.js +0 -1
- package/dist/ui/assets/crystal-Bexqace6.js +0 -1
- package/dist/ui/assets/csharp-Ct8U2NOr.js +0 -1
- package/dist/ui/assets/css-DSQhw_9R.js +0 -1
- package/dist/ui/assets/csv-Dx-8-gkx.js +0 -1
- package/dist/ui/assets/cue-CE9AQfxI.js +0 -1
- package/dist/ui/assets/cypher-ClKdZ_lG.js +0 -1
- package/dist/ui/assets/d-qD-0Kul2.js +0 -1
- package/dist/ui/assets/dark-plus-Cs2F2srj.js +0 -1
- package/dist/ui/assets/dart-DkHntEIa.js +0 -1
- package/dist/ui/assets/dax-BkyTk9wS.js +0 -1
- package/dist/ui/assets/desktop-Dlh5hvp9.js +0 -1
- package/dist/ui/assets/diff-woXpYk--.js +0 -1
- package/dist/ui/assets/docker-IyjqRm3v.js +0 -1
- package/dist/ui/assets/dotenv-_5a1GRtc.js +0 -1
- package/dist/ui/assets/dracula-BHWKrbxM.js +0 -1
- package/dist/ui/assets/dracula-soft-5eyTD99u.js +0 -1
- package/dist/ui/assets/dream-maker-DW3nJb8Q.js +0 -1
- package/dist/ui/assets/edge-Z8YYkHOr.js +0 -1
- package/dist/ui/assets/elixir-CG9uKtAF.js +0 -1
- package/dist/ui/assets/elm-GfWG2IfT.js +0 -1
- package/dist/ui/assets/emacs-lisp-C9PiwqqW.js +0 -1
- package/dist/ui/assets/erb-xe89e73J.js +0 -1
- package/dist/ui/assets/erlang-Cphh6RMH.js +0 -1
- package/dist/ui/assets/everforest-dark-sB-x3p7T.js +0 -1
- package/dist/ui/assets/everforest-light-Df2xbC6M.js +0 -1
- package/dist/ui/assets/fennel-DQxkIbk2.js +0 -1
- package/dist/ui/assets/fish-BJitypiv.js +0 -1
- package/dist/ui/assets/fluent-C03EYrpw.js +0 -1
- package/dist/ui/assets/fortran-fixed-form-DEKoE2YW.js +0 -1
- package/dist/ui/assets/fortran-free-form-CYNrtFtB.js +0 -1
- package/dist/ui/assets/fsharp-D13ZGOAj.js +0 -1
- package/dist/ui/assets/gdresource-C0sCabJj.js +0 -1
- package/dist/ui/assets/gdscript-Cp2uCuqX.js +0 -1
- package/dist/ui/assets/gdshader-CBce3t8t.js +0 -1
- package/dist/ui/assets/genie-CV2tkWYe.js +0 -1
- package/dist/ui/assets/gherkin-DExj1W_8.js +0 -1
- package/dist/ui/assets/git-commit-BSykSTBG.js +0 -1
- package/dist/ui/assets/git-rebase-CoTL_uSE.js +0 -1
- package/dist/ui/assets/github-dark-C-LZuMrd.js +0 -1
- package/dist/ui/assets/github-dark-default-DXG-b-1a.js +0 -1
- package/dist/ui/assets/github-dark-dimmed-Bx1FflLF.js +0 -1
- package/dist/ui/assets/github-dark-high-contrast-B_tTalzw.js +0 -1
- package/dist/ui/assets/github-light-EUqPIrTm.js +0 -1
- package/dist/ui/assets/github-light-default-BXViO-2h.js +0 -1
- package/dist/ui/assets/github-light-high-contrast-B68TUdTA.js +0 -1
- package/dist/ui/assets/gleam-CSRkHgEL.js +0 -1
- package/dist/ui/assets/glimmer-js-DAn4UCSu.js +0 -1
- package/dist/ui/assets/glimmer-ts-Tjyi6Gh5.js +0 -1
- package/dist/ui/assets/glsl-CtTDZoqR.js +0 -1
- package/dist/ui/assets/gn-ilITqXS6.js +0 -1
- package/dist/ui/assets/gnuplot-7GGW24-e.js +0 -1
- package/dist/ui/assets/go-BJwz_mda.js +0 -1
- package/dist/ui/assets/graphql-D5gcC_Jk.js +0 -1
- package/dist/ui/assets/groovy-CacY0gHj.js +0 -1
- package/dist/ui/assets/gruvbox-dark-hard-C820rvS2.js +0 -1
- package/dist/ui/assets/gruvbox-dark-medium-BPjhmG05.js +0 -1
- package/dist/ui/assets/gruvbox-dark-soft-MrdJrrXF.js +0 -1
- package/dist/ui/assets/gruvbox-light-hard-BC_s9l72.js +0 -1
- package/dist/ui/assets/gruvbox-light-medium-BAWPOn9u.js +0 -1
- package/dist/ui/assets/gruvbox-light-soft-BSMLrYjP.js +0 -1
- package/dist/ui/assets/hack-BJXY27dt.js +0 -1
- package/dist/ui/assets/haml-BLfFoZf7.js +0 -1
- package/dist/ui/assets/handlebars-Dw6CWkvN.js +0 -1
- package/dist/ui/assets/haskell-D8IpX4py.js +0 -1
- package/dist/ui/assets/haxe-OTjmBuCE.js +0 -1
- package/dist/ui/assets/hcl-Dh228itO.js +0 -1
- package/dist/ui/assets/heavy-payload-Dcg0-F-S.js +0 -4
- package/dist/ui/assets/hjson-CxZEssPk.js +0 -1
- package/dist/ui/assets/hlsl-Cvrh5tZx.js +0 -1
- package/dist/ui/assets/horizon-CE9ld1lL.js +0 -1
- package/dist/ui/assets/horizon-bright-Br1oVSNq.js +0 -1
- package/dist/ui/assets/houston-CsvMBhTu.js +0 -1
- package/dist/ui/assets/html-CAcAWvoN.js +0 -1
- package/dist/ui/assets/html-derivative-8aSW2E_7.js +0 -1
- package/dist/ui/assets/http-B2YR_3V1.js +0 -1
- package/dist/ui/assets/hurl-BnDJ9Zhf.js +0 -1
- package/dist/ui/assets/hxml-B0Qn7Nwc.js +0 -1
- package/dist/ui/assets/hy-CZbG8q4J.js +0 -1
- package/dist/ui/assets/imba-DsUTQ-LC.js +0 -1
- package/dist/ui/assets/ini-B5eOa1yu.js +0 -1
- package/dist/ui/assets/java-Doxi4W8u.js +0 -1
- package/dist/ui/assets/javascript-BbRdEqti.js +0 -1
- package/dist/ui/assets/jinja-CS3Tpv_Q.js +0 -1
- package/dist/ui/assets/jison-BkPGYVHR.js +0 -1
- package/dist/ui/assets/json-BMt1m3m8.js +0 -1
- package/dist/ui/assets/json5-BR5RXkoi.js +0 -1
- package/dist/ui/assets/jsonc-CYpm1nAK.js +0 -1
- package/dist/ui/assets/jsonl-CmCQp5Yx.js +0 -1
- package/dist/ui/assets/jsonnet-CJTPZ8u_.js +0 -1
- package/dist/ui/assets/jssm-DXw9l8Rf.js +0 -1
- package/dist/ui/assets/jsx-CQKrJXXY.js +0 -1
- package/dist/ui/assets/julia-BuN7i2du.js +0 -1
- package/dist/ui/assets/just-BswEPFPu.js +0 -1
- package/dist/ui/assets/kanagawa-dragon-CXtmUGW6.js +0 -1
- package/dist/ui/assets/kanagawa-lotus-BN08jTvb.js +0 -1
- package/dist/ui/assets/kanagawa-wave-CTweb8Dz.js +0 -1
- package/dist/ui/assets/kdl-CsD5j6eV.js +0 -1
- package/dist/ui/assets/kotlin-DhhofPvG.js +0 -1
- package/dist/ui/assets/kusto-BUv0MjJC.js +0 -1
- package/dist/ui/assets/laserwave-C_8bwKvT.js +0 -1
- package/dist/ui/assets/latex-DU2VyFfA.js +0 -1
- package/dist/ui/assets/lean-CewbzKMR.js +0 -1
- package/dist/ui/assets/less-DVTAwKKz.js +0 -1
- package/dist/ui/assets/light-plus-DVQuIRkW.js +0 -1
- package/dist/ui/assets/liquid-Cmz1L3dq.js +0 -1
- package/dist/ui/assets/llvm-Cm23YOpf.js +0 -1
- package/dist/ui/assets/log-BNLmms1o.js +0 -1
- package/dist/ui/assets/logo-Cluzi2Zq.js +0 -1
- package/dist/ui/assets/lua-CfVXhkaJ.js +0 -1
- package/dist/ui/assets/luau-CNKltnaQ.js +0 -1
- package/dist/ui/assets/make-Dixweg8N.js +0 -1
- package/dist/ui/assets/markdown-BYOwaDjH.js +0 -1
- package/dist/ui/assets/marko-C5bfqGiA.js +0 -1
- package/dist/ui/assets/material-theme-Bm3Qr25_.js +0 -1
- package/dist/ui/assets/material-theme-darker-2IIEA8gg.js +0 -1
- package/dist/ui/assets/material-theme-lighter-uhdI0v04.js +0 -1
- package/dist/ui/assets/material-theme-ocean-CHQ94UKr.js +0 -1
- package/dist/ui/assets/material-theme-palenight-B5W6OYN7.js +0 -1
- package/dist/ui/assets/matlab-D7qyCx1q.js +0 -1
- package/dist/ui/assets/mdc-CVBXYfyq.js +0 -1
- package/dist/ui/assets/mdx-DQZ5AkYe.js +0 -1
- package/dist/ui/assets/mermaid-Bk4SNUv9.js +0 -1
- package/dist/ui/assets/min-dark-BSWPekZh.js +0 -1
- package/dist/ui/assets/min-light-DDpmG2fV.js +0 -1
- package/dist/ui/assets/mipsasm-BMqwQI7S.js +0 -1
- package/dist/ui/assets/mojo-BgCJLMeH.js +0 -1
- package/dist/ui/assets/monokai-CdkpiU2Y.js +0 -1
- package/dist/ui/assets/moonbit-CaWjb8XO.js +0 -1
- package/dist/ui/assets/move-B1IS1UjX.js +0 -1
- package/dist/ui/assets/narrat-_X_XdTYD.js +0 -1
- package/dist/ui/assets/nextflow-Bbiyy34d.js +0 -1
- package/dist/ui/assets/nextflow-groovy-Dc_ddanL.js +0 -1
- package/dist/ui/assets/nginx-CzJafxLa.js +0 -1
- package/dist/ui/assets/night-owl-DhmEMT88.js +0 -1
- package/dist/ui/assets/night-owl-light-eJ-hLW7d.js +0 -1
- package/dist/ui/assets/nim-DABKtHtM.js +0 -1
- package/dist/ui/assets/nix-IvuFDN5E.js +0 -1
- package/dist/ui/assets/nord-Cb4Vim4T.js +0 -1
- package/dist/ui/assets/nushell-DcLAeLz5.js +0 -1
- package/dist/ui/assets/objective-c-D1A_Heim.js +0 -1
- package/dist/ui/assets/objective-cpp-BsSzOQcm.js +0 -1
- package/dist/ui/assets/ocaml-O90oeIOV.js +0 -1
- package/dist/ui/assets/odin-B1RWQWA5.js +0 -1
- package/dist/ui/assets/one-dark-pro-CLwyXe_n.js +0 -1
- package/dist/ui/assets/one-light-D7Lr4KcI.js +0 -1
- package/dist/ui/assets/openscad-BUDT5pXO.js +0 -1
- package/dist/ui/assets/pascal-4ZHwLPI5.js +0 -1
- package/dist/ui/assets/perl-CBh7L3lZ.js +0 -1
- package/dist/ui/assets/php-DFbI9q5p.js +0 -1
- package/dist/ui/assets/pierre-dark-sU4Zdns8.js +0 -1
- package/dist/ui/assets/pierre-dark-soft-HXgun5vs.js +0 -1
- package/dist/ui/assets/pierre-light-DWBk51d8.js +0 -1
- package/dist/ui/assets/pierre-light-soft-CodEzPxf.js +0 -1
- package/dist/ui/assets/pkl-ot-7Btpt.js +0 -1
- package/dist/ui/assets/plastic-DQwYfKfQ.js +0 -1
- package/dist/ui/assets/plsql-DGHpHOYJ.js +0 -1
- package/dist/ui/assets/po-BiJDBrnU.js +0 -1
- package/dist/ui/assets/poimandres-DRFjx7u4.js +0 -1
- package/dist/ui/assets/polar-C7UOKdEL.js +0 -1
- package/dist/ui/assets/postcss-BXeXVLqQ.js +0 -1
- package/dist/ui/assets/powerquery-DNMTfnFr.js +0 -1
- package/dist/ui/assets/powershell-DshXNtvi.js +0 -1
- package/dist/ui/assets/prisma-BsRQq5mF.js +0 -1
- package/dist/ui/assets/prolog-iXnhIJG7.js +0 -1
- package/dist/ui/assets/proto-DB4EqR-F.js +0 -1
- package/dist/ui/assets/pug-C_PxC7gO.js +0 -1
- package/dist/ui/assets/puppet-CDv2pdJW.js +0 -1
- package/dist/ui/assets/purescript-9MfHhQsQ.js +0 -1
- package/dist/ui/assets/python-gzcpVVnB.js +0 -1
- package/dist/ui/assets/qml-DtngoFFK.js +0 -1
- package/dist/ui/assets/qmldir-DCQb3MpD.js +0 -1
- package/dist/ui/assets/qss-Fe1Jh2GI.js +0 -1
- package/dist/ui/assets/r-DohkcevW.js +0 -1
- package/dist/ui/assets/racket-DcIDlBhZ.js +0 -1
- package/dist/ui/assets/raku-B3gFvitq.js +0 -1
- package/dist/ui/assets/razor-C4t8J0_E.js +0 -1
- package/dist/ui/assets/red-CJ3rzSJv.js +0 -1
- package/dist/ui/assets/reg-CRGYupPL.js +0 -1
- package/dist/ui/assets/regexp-OGbTbjgY.js +0 -1
- package/dist/ui/assets/rel-BtDbiS_P.js +0 -1
- package/dist/ui/assets/review-payload-C5Qz60Kq.js +0 -1
- package/dist/ui/assets/riscv-Ckw8ddFX.js +0 -1
- package/dist/ui/assets/ron-VUp2lXgN.js +0 -1
- package/dist/ui/assets/rose-pine-BthvhNj6.js +0 -1
- package/dist/ui/assets/rose-pine-dawn-Dg85fqjY.js +0 -1
- package/dist/ui/assets/rose-pine-moon-hon4tzzS.js +0 -1
- package/dist/ui/assets/rosmsg-CAekHB0j.js +0 -1
- package/dist/ui/assets/rst-CfBbbcvC.js +0 -1
- package/dist/ui/assets/ruby-Bw0mpxHY.js +0 -1
- package/dist/ui/assets/rust-Cfkwpbl8.js +0 -1
- package/dist/ui/assets/sas-Cs3s9JOf.js +0 -1
- package/dist/ui/assets/sass-DXrisJhu.js +0 -1
- package/dist/ui/assets/scala-DKOlJaKm.js +0 -1
- package/dist/ui/assets/scheme-DQCgrYNe.js +0 -1
- package/dist/ui/assets/scss-sRxNJS54.js +0 -1
- package/dist/ui/assets/sdbl-bTVj8UrX.js +0 -1
- package/dist/ui/assets/shaderlab-TOUzSsQk.js +0 -1
- package/dist/ui/assets/shellscript-B0X6wh0R.js +0 -1
- package/dist/ui/assets/shellsession-D2FdOioR.js +0 -1
- package/dist/ui/assets/slack-dark-DnToyrRv.js +0 -1
- package/dist/ui/assets/slack-ochin-B2OO5cIa.js +0 -1
- package/dist/ui/assets/smalltalk-B16xEiuN.js +0 -1
- package/dist/ui/assets/snazzy-light-4G7pJPwS.js +0 -1
- package/dist/ui/assets/solarized-dark-DV17i1UV.js +0 -1
- package/dist/ui/assets/solarized-light-DSh2HLQt.js +0 -1
- package/dist/ui/assets/solidity-CKzVLygQ.js +0 -1
- package/dist/ui/assets/soy-s6g9OjJ1.js +0 -1
- package/dist/ui/assets/sparql-D_iOobhT.js +0 -1
- package/dist/ui/assets/splunk-BC2Px7Mm.js +0 -1
- package/dist/ui/assets/sql-DVTnh5V-.js +0 -1
- package/dist/ui/assets/ssh-config-BgfXC-Er.js +0 -1
- package/dist/ui/assets/stata-DFIDiXF9.js +0 -1
- package/dist/ui/assets/stylus-B6D30XZt.js +0 -1
- package/dist/ui/assets/surrealql-DVfrsLyg.js +0 -1
- package/dist/ui/assets/svelte-D5GsxESq.js +0 -1
- package/dist/ui/assets/swift-DonLKvLd.js +0 -1
- package/dist/ui/assets/synthwave-84-nFMaYfgc.js +0 -1
- package/dist/ui/assets/system-verilog-DJ5XKQeo.js +0 -1
- package/dist/ui/assets/systemd-BxMlprV5.js +0 -1
- package/dist/ui/assets/talonscript-CohzipZa.js +0 -1
- package/dist/ui/assets/tasl-DMoTqEGO.js +0 -1
- package/dist/ui/assets/tcl-CZd0xW_V.js +0 -1
- package/dist/ui/assets/templ-DI-Zyqzd.js +0 -1
- package/dist/ui/assets/terraform-DswuEJGm.js +0 -1
- package/dist/ui/assets/tex-WHHmlbJI.js +0 -1
- package/dist/ui/assets/tokyo-night-oM2G3aXe.js +0 -1
- package/dist/ui/assets/toml-CcmNWLt0.js +0 -1
- package/dist/ui/assets/ts-tags-Dwpo2RFJ.js +0 -1
- package/dist/ui/assets/tsv-sltzmVWM.js +0 -1
- package/dist/ui/assets/tsx-ph_idaAW.js +0 -1
- package/dist/ui/assets/turtle-ByJddavk.js +0 -1
- package/dist/ui/assets/twig-YO17jFjR.js +0 -1
- package/dist/ui/assets/typescript-CbAxjhkl.js +0 -1
- package/dist/ui/assets/typespec-B88KGewJ.js +0 -1
- package/dist/ui/assets/typst-DI99ib-x.js +0 -1
- package/dist/ui/assets/useFileDiffInstance-B2DLX3Vg.js +0 -244
- package/dist/ui/assets/v-DETTlOr0.js +0 -1
- package/dist/ui/assets/vala-zf12oZj6.js +0 -1
- package/dist/ui/assets/vb-Djn5o6TS.js +0 -1
- package/dist/ui/assets/verilog-CiiDBU1e.js +0 -1
- package/dist/ui/assets/vesper-D5bVUKB1.js +0 -1
- package/dist/ui/assets/vhdl-BroJfC0k.js +0 -1
- package/dist/ui/assets/viml-DvXPmvsu.js +0 -1
- package/dist/ui/assets/vitesse-black-fwtXNY1n.js +0 -1
- package/dist/ui/assets/vitesse-dark-BZCL-v6S.js +0 -1
- package/dist/ui/assets/vitesse-light-VbXTXTou.js +0 -1
- package/dist/ui/assets/vue-CraHL-Ps.js +0 -1
- package/dist/ui/assets/vue-html-e9tyZNtS.js +0 -1
- package/dist/ui/assets/vue-vine-CofmxaUb.js +0 -1
- package/dist/ui/assets/vyper-CgoNMtux.js +0 -1
- package/dist/ui/assets/wasm-BnjxR4X6.js +0 -1
- package/dist/ui/assets/wasm-ByWQv1Qj.js +0 -1
- package/dist/ui/assets/wenyan-C8pVoKbM.js +0 -1
- package/dist/ui/assets/wgsl-BsKzXJz4.js +0 -1
- package/dist/ui/assets/wikitext-ClFFjSW2.js +0 -1
- package/dist/ui/assets/wit-DdvCle-K.js +0 -1
- package/dist/ui/assets/wolfram-DLL8P-h_.js +0 -1
- package/dist/ui/assets/workspace-app-8--oTbCd.css +0 -1
- package/dist/ui/assets/xml-BWSdPZHm.js +0 -1
- package/dist/ui/assets/xsl-BtCt7Hx8.js +0 -1
- package/dist/ui/assets/yaml-BZiTw7cQ.js +0 -1
- package/dist/ui/assets/zenscript-BnlCZFoB.js +0 -1
- package/dist/ui/assets/zig-CMLA9XwU.js +0 -1
- package/docs/assets/auvrynt-logo-light.png +0 -0
- package/docs/assets/auvrynt-screenshot.png +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
2
|
+
import { join, relative } from "node:path";
|
|
3
|
+
export async function getProjectSettings(registry, input) {
|
|
4
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
5
|
+
const godotFile = join(registry.resolvePath(workspace, input.projectPath), "project.godot");
|
|
6
|
+
const content = await readFile(godotFile, "utf8");
|
|
7
|
+
const settings = {};
|
|
8
|
+
let currentSection = "";
|
|
9
|
+
for (const line of content.split(/\r?\n/)) {
|
|
10
|
+
const sectionMatch = line.match(/^\[(\w+)\]$/);
|
|
11
|
+
if (sectionMatch) {
|
|
12
|
+
currentSection = sectionMatch[1];
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
const keyValueMatch = line.match(/^(\S+)\s*=\s*(.+)$/);
|
|
16
|
+
if (keyValueMatch) {
|
|
17
|
+
const key = currentSection ? `${currentSection}/${keyValueMatch[1]}` : keyValueMatch[1];
|
|
18
|
+
settings[key] = keyValueMatch[2].trim();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return settings;
|
|
22
|
+
}
|
|
23
|
+
export async function setProjectSetting(registry, input) {
|
|
24
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
25
|
+
const godotFile = join(registry.resolvePath(workspace, input.projectPath), "project.godot");
|
|
26
|
+
let content = await readFile(godotFile, "utf8");
|
|
27
|
+
const newValue = JSON.stringify(input.value);
|
|
28
|
+
const [section, ...keyRest] = input.settingKey.split("/");
|
|
29
|
+
const key = keyRest.join("/");
|
|
30
|
+
const keyRegex = new RegExp(`^(${key}\\s*=\\s*)(.+)$`, "m");
|
|
31
|
+
const previousValue = keyRegex.exec(content)?.[2];
|
|
32
|
+
if (keyRegex.test(content)) {
|
|
33
|
+
content = content.replace(keyRegex, `$1${newValue}`);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const sectionRegex = new RegExp(`\\[${section}\\]`, "m");
|
|
37
|
+
content = sectionRegex.test(content)
|
|
38
|
+
? content.replace(sectionRegex, `[${section}]\n${key}=${newValue}`)
|
|
39
|
+
: `${content}\n[${section}]\n${key}=${newValue}\n`;
|
|
40
|
+
}
|
|
41
|
+
await writeFile(godotFile, content, "utf8");
|
|
42
|
+
return { previousValue, newValue };
|
|
43
|
+
}
|
|
44
|
+
export async function getInputMap(registry, input) {
|
|
45
|
+
const inputActions = {};
|
|
46
|
+
for (const [key, value] of Object.entries(await getProjectSettings(registry, input))) {
|
|
47
|
+
if (key.startsWith("input/"))
|
|
48
|
+
inputActions[key.replace("input/", "")] = [value];
|
|
49
|
+
}
|
|
50
|
+
return inputActions;
|
|
51
|
+
}
|
|
52
|
+
export async function getAutoloads(registry, input) {
|
|
53
|
+
const autoloads = {};
|
|
54
|
+
for (const [key, value] of Object.entries(await getProjectSettings(registry, input))) {
|
|
55
|
+
if (key.startsWith("autoload/"))
|
|
56
|
+
autoloads[key.replace("autoload/", "")] = value;
|
|
57
|
+
}
|
|
58
|
+
return autoloads;
|
|
59
|
+
}
|
|
60
|
+
export async function applyPixelArtImportPreset(registry, input) {
|
|
61
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
62
|
+
const changed = [];
|
|
63
|
+
const errors = [];
|
|
64
|
+
for (const texturePath of input.paths) {
|
|
65
|
+
try {
|
|
66
|
+
const importPath = registry.resolvePath(workspace, texturePath) + ".import";
|
|
67
|
+
let importContent;
|
|
68
|
+
try {
|
|
69
|
+
importContent = await readFile(importPath, "utf8");
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
importContent = `[remap]\n\nimporter="texture"\n`;
|
|
73
|
+
}
|
|
74
|
+
for (const [key, value] of [
|
|
75
|
+
["process/fix_alpha_border", "false"],
|
|
76
|
+
["process/premult_alpha", "false"],
|
|
77
|
+
["compress/mode", "0"],
|
|
78
|
+
["compress/high_quality", "false"],
|
|
79
|
+
["flags/repeat", "0"],
|
|
80
|
+
["flags/filter", "false"],
|
|
81
|
+
["flags/mipmaps", "false"],
|
|
82
|
+
["flags/anisotropic", "false"],
|
|
83
|
+
["flags/srgb", "2"],
|
|
84
|
+
]) {
|
|
85
|
+
const keyRegex = new RegExp(`^(${key}\\s*=\\s*)(.*)$`, "m");
|
|
86
|
+
if (keyRegex.test(importContent))
|
|
87
|
+
importContent = importContent.replace(keyRegex, `$1${value}`);
|
|
88
|
+
}
|
|
89
|
+
await writeFile(importPath, importContent, "utf8");
|
|
90
|
+
changed.push(texturePath);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
errors.push(`${texturePath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return { changed, errors };
|
|
97
|
+
}
|
|
98
|
+
export async function generateVscodeConfig(registry, input) {
|
|
99
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
100
|
+
const targetDir = registry.resolvePath(workspace, input.projectPath);
|
|
101
|
+
const vscodeDir = join(targetDir, ".vscode");
|
|
102
|
+
await mkdir(vscodeDir, { recursive: true });
|
|
103
|
+
const generated = [];
|
|
104
|
+
const skipped = [];
|
|
105
|
+
const godotExe = input.godotExecutable ?? "${env:GODOT_DOTNET_EXECUTABLE}";
|
|
106
|
+
const tasksPath = join(vscodeDir, "tasks.json");
|
|
107
|
+
let tasksContent = { version: "2.0.0", tasks: [] };
|
|
108
|
+
try {
|
|
109
|
+
tasksContent = JSON.parse(await readFile(tasksPath, "utf8"));
|
|
110
|
+
}
|
|
111
|
+
catch { }
|
|
112
|
+
const godotTasks = [
|
|
113
|
+
{ label: "Godot: Build C#", type: "shell", command: "dotnet build", args: ["${workspaceFolder}"], group: "build" },
|
|
114
|
+
{ label: "Godot: Restore NuGet", type: "shell", command: "dotnet restore", args: ["${workspaceFolder}"] },
|
|
115
|
+
{ label: "Godot: Run Project", type: "shell", command: godotExe, args: ["--path", "${workspaceFolder}", "-d"] },
|
|
116
|
+
{ label: "Godot: Headless Validate", type: "shell", command: godotExe, args: ["--headless", "--path", "${workspaceFolder}", "--editor", "--quit"] },
|
|
117
|
+
];
|
|
118
|
+
const existingLabels = new Set((tasksContent.tasks ?? []).map((task) => task.label));
|
|
119
|
+
for (const task of godotTasks) {
|
|
120
|
+
if (!existingLabels.has(task.label))
|
|
121
|
+
tasksContent.tasks.push(task);
|
|
122
|
+
}
|
|
123
|
+
await writeFile(tasksPath, JSON.stringify(tasksContent, null, 2), "utf8");
|
|
124
|
+
generated.push(relative(workspace.root, tasksPath).replace(/\\/g, "/"));
|
|
125
|
+
const launchPath = join(vscodeDir, "launch.json");
|
|
126
|
+
let launchContent = { version: "0.2.0", configurations: [] };
|
|
127
|
+
try {
|
|
128
|
+
launchContent = JSON.parse(await readFile(launchPath, "utf8"));
|
|
129
|
+
}
|
|
130
|
+
catch { }
|
|
131
|
+
const existingNames = new Set((launchContent.configurations ?? []).map((configuration) => configuration.name));
|
|
132
|
+
if (!existingNames.has("Godot C# Debug")) {
|
|
133
|
+
launchContent.configurations.push({
|
|
134
|
+
name: "Godot C# Debug",
|
|
135
|
+
type: "coreclr",
|
|
136
|
+
request: "attach",
|
|
137
|
+
processId: "${command:pickProcess}",
|
|
138
|
+
program: "${workspaceFolder}/bin/Debug/net8.0/${workspaceFolderBasename}.dll",
|
|
139
|
+
});
|
|
140
|
+
await writeFile(launchPath, JSON.stringify(launchContent, null, 2), "utf8");
|
|
141
|
+
generated.push(relative(workspace.root, launchPath).replace(/\\/g, "/"));
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
skipped.push(relative(workspace.root, launchPath).replace(/\\/g, "/"));
|
|
145
|
+
}
|
|
146
|
+
return { generated, skipped };
|
|
147
|
+
}
|
|
148
|
+
export async function listExportPresets(registry, input) {
|
|
149
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
150
|
+
const presetFile = join(registry.resolvePath(workspace, input.projectPath), "export_presets.cfg");
|
|
151
|
+
let content;
|
|
152
|
+
try {
|
|
153
|
+
content = await readFile(presetFile, "utf8");
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return [];
|
|
157
|
+
}
|
|
158
|
+
const presets = [];
|
|
159
|
+
let currentPreset = null;
|
|
160
|
+
for (const line of content.split(/\r?\n/)) {
|
|
161
|
+
if (line.startsWith("[preset.")) {
|
|
162
|
+
if (currentPreset)
|
|
163
|
+
presets.push(currentPreset);
|
|
164
|
+
currentPreset = { name: "", platform: "", mode: "release" };
|
|
165
|
+
}
|
|
166
|
+
else if (currentPreset) {
|
|
167
|
+
if (line.startsWith("name="))
|
|
168
|
+
currentPreset.name = line.replace(/^name=/, "").replace(/"/g, "").trim();
|
|
169
|
+
else if (line.startsWith("platform="))
|
|
170
|
+
currentPreset.platform = line.replace(/^platform=/, "").replace(/"/g, "").trim();
|
|
171
|
+
else if (line.startsWith("export_debug="))
|
|
172
|
+
currentPreset.mode = line.includes("true") ? "debug" : "release";
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (currentPreset)
|
|
176
|
+
presets.push(currentPreset);
|
|
177
|
+
return presets;
|
|
178
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { mkdir } from "node:fs/promises";
|
|
4
|
+
import { dirname, relative } from "node:path";
|
|
5
|
+
const execFileAsync = promisify(execFile);
|
|
6
|
+
export async function getRemoteSceneTree(input, bridgeClient) {
|
|
7
|
+
if (!bridgeClient.status)
|
|
8
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
9
|
+
return bridgeClient.sendRequest("remote.get_scene_tree", { maxDepth: input.maxDepth ?? 10 });
|
|
10
|
+
}
|
|
11
|
+
export async function getRuntimeProperty(input, bridgeClient) {
|
|
12
|
+
if (!bridgeClient.status)
|
|
13
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
14
|
+
return bridgeClient.sendRequest("remote.get_property", {
|
|
15
|
+
nodePath: input.nodePath,
|
|
16
|
+
property: input.property,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export async function getPerformanceMonitors(input, bridgeClient) {
|
|
20
|
+
if (!bridgeClient.status)
|
|
21
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
22
|
+
return bridgeClient.sendRequest("remote.get_performance_monitors", {});
|
|
23
|
+
}
|
|
24
|
+
export function parseCsharpExceptions(logLines) {
|
|
25
|
+
const exceptions = [];
|
|
26
|
+
let currentException = null;
|
|
27
|
+
const exceptionTypes = [
|
|
28
|
+
"NullReferenceException", "InvalidCastException", "ObjectDisposedException",
|
|
29
|
+
"InvalidOperationException", "ArgumentException", "ArgumentNullException",
|
|
30
|
+
"NotImplementedException", "IndexOutOfRangeException", "KeyNotFoundException",
|
|
31
|
+
"IOException", "FileNotFoundException",
|
|
32
|
+
];
|
|
33
|
+
for (const line of logLines) {
|
|
34
|
+
const trimmed = line.trim();
|
|
35
|
+
if (currentException && trimmed.startsWith("---> ")) {
|
|
36
|
+
const innerMatch = trimmed.slice(5).match(/(\w*Exception):\s*(.*)/);
|
|
37
|
+
if (innerMatch) {
|
|
38
|
+
currentException.innerExceptions.push({
|
|
39
|
+
exceptionType: innerMatch[1],
|
|
40
|
+
message: innerMatch[2],
|
|
41
|
+
innerExceptions: [],
|
|
42
|
+
stackFrames: [],
|
|
43
|
+
firstOccurrence: new Date().toISOString(),
|
|
44
|
+
repeatCount: 1,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const isException = exceptionTypes.some((type) => trimmed.includes(type)) || trimmed.includes("Exception:");
|
|
50
|
+
if (isException) {
|
|
51
|
+
if (currentException)
|
|
52
|
+
exceptions.push(currentException);
|
|
53
|
+
const typeMatch = trimmed.match(/(\w+Exception):\s*(.*)/);
|
|
54
|
+
currentException = {
|
|
55
|
+
exceptionType: typeMatch?.[1] ?? "Exception",
|
|
56
|
+
message: typeMatch?.[2] ?? trimmed,
|
|
57
|
+
innerExceptions: [],
|
|
58
|
+
stackFrames: [],
|
|
59
|
+
firstOccurrence: new Date().toISOString(),
|
|
60
|
+
repeatCount: 1,
|
|
61
|
+
};
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (currentException) {
|
|
65
|
+
const frameMatch = trimmed.match(/^at\s+(.*?)(?:\s+in\s+(.*?):line\s+(\d+))?$/);
|
|
66
|
+
if (frameMatch) {
|
|
67
|
+
currentException.stackFrames.push({
|
|
68
|
+
method: frameMatch[1],
|
|
69
|
+
path: frameMatch[2],
|
|
70
|
+
line: frameMatch[3] ? Number(frameMatch[3]) : undefined,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (currentException)
|
|
76
|
+
exceptions.push(currentException);
|
|
77
|
+
const collapsed = [];
|
|
78
|
+
for (const exception of exceptions) {
|
|
79
|
+
const previous = collapsed.find((entry) => entry.exceptionType === exception.exceptionType && entry.message === exception.message);
|
|
80
|
+
if (previous)
|
|
81
|
+
previous.repeatCount++;
|
|
82
|
+
else
|
|
83
|
+
collapsed.push(exception);
|
|
84
|
+
}
|
|
85
|
+
return collapsed;
|
|
86
|
+
}
|
|
87
|
+
export async function pressAction(input, bridgeClient) {
|
|
88
|
+
if (!bridgeClient.status)
|
|
89
|
+
throw new Error("Godot Editor Bridge is not connected for input simulation.");
|
|
90
|
+
await bridgeClient.sendRequest("input.press_action", {
|
|
91
|
+
action: input.action,
|
|
92
|
+
durationMs: Math.min(input.durationMs ?? 100, 2000),
|
|
93
|
+
});
|
|
94
|
+
return { sent: true };
|
|
95
|
+
}
|
|
96
|
+
export async function releaseAction(input, bridgeClient) {
|
|
97
|
+
if (!bridgeClient.status)
|
|
98
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
99
|
+
await bridgeClient.sendRequest("input.release_action", { action: input.action });
|
|
100
|
+
return { sent: true };
|
|
101
|
+
}
|
|
102
|
+
export async function mouseClick(input, bridgeClient) {
|
|
103
|
+
if (!bridgeClient.status)
|
|
104
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
105
|
+
await bridgeClient.sendRequest("input.mouse_click", {
|
|
106
|
+
x: input.x,
|
|
107
|
+
y: input.y,
|
|
108
|
+
button: input.button ?? 1,
|
|
109
|
+
});
|
|
110
|
+
return { sent: true };
|
|
111
|
+
}
|
|
112
|
+
export async function assertNodeExists(input, bridgeClient) {
|
|
113
|
+
if (!bridgeClient.status)
|
|
114
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
115
|
+
try {
|
|
116
|
+
await bridgeClient.sendRequest("remote.get_node", { nodePath: input.nodePath });
|
|
117
|
+
return { passed: true, message: `Node '${input.nodePath}' exists.` };
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return { passed: false, message: `Node '${input.nodePath}' does not exist.` };
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export async function assertProperty(input, bridgeClient) {
|
|
124
|
+
if (!bridgeClient.status)
|
|
125
|
+
throw new Error("Godot Editor Bridge is not connected.");
|
|
126
|
+
const { value } = await getRuntimeProperty({
|
|
127
|
+
workspaceId: input.workspaceId,
|
|
128
|
+
nodePath: input.nodePath,
|
|
129
|
+
property: input.property,
|
|
130
|
+
}, bridgeClient);
|
|
131
|
+
let passed;
|
|
132
|
+
switch (input.comparison) {
|
|
133
|
+
case "eq":
|
|
134
|
+
passed = JSON.stringify(value) === JSON.stringify(input.expected);
|
|
135
|
+
break;
|
|
136
|
+
case "neq":
|
|
137
|
+
passed = JSON.stringify(value) !== JSON.stringify(input.expected);
|
|
138
|
+
break;
|
|
139
|
+
case "gt":
|
|
140
|
+
passed = value > input.expected;
|
|
141
|
+
break;
|
|
142
|
+
case "lt":
|
|
143
|
+
passed = value < input.expected;
|
|
144
|
+
break;
|
|
145
|
+
case "approx":
|
|
146
|
+
passed = Math.abs(value - input.expected) < 0.001;
|
|
147
|
+
break;
|
|
148
|
+
case "contains":
|
|
149
|
+
passed = String(value).includes(String(input.expected));
|
|
150
|
+
break;
|
|
151
|
+
case "exists":
|
|
152
|
+
passed = value !== null && value !== undefined;
|
|
153
|
+
break;
|
|
154
|
+
default: passed = false;
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
passed,
|
|
158
|
+
actual: value,
|
|
159
|
+
expected: input.expected,
|
|
160
|
+
message: passed
|
|
161
|
+
? `Property '${input.property}' assertion passed.`
|
|
162
|
+
: `Expected '${input.property}' to be ${input.comparison} '${JSON.stringify(input.expected)}', got '${JSON.stringify(value)}'.`,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export async function runTestSequence(registry, processManager, input, bridgeClient) {
|
|
166
|
+
const maxSteps = 50;
|
|
167
|
+
const maxDurationMs = 30_000;
|
|
168
|
+
const maxScreenshots = 5;
|
|
169
|
+
if (input.steps.length > maxSteps)
|
|
170
|
+
throw new Error(`Test sequence too long (max ${maxSteps} steps).`);
|
|
171
|
+
const results = [];
|
|
172
|
+
let totalDuration = 0;
|
|
173
|
+
let screenshotCount = 0;
|
|
174
|
+
for (let index = 0; index < input.steps.length; index++) {
|
|
175
|
+
const step = input.steps[index];
|
|
176
|
+
switch (step.type) {
|
|
177
|
+
case "wait": {
|
|
178
|
+
const delay = Math.min(step.durationMs, 5000);
|
|
179
|
+
totalDuration += delay;
|
|
180
|
+
if (totalDuration > maxDurationMs) {
|
|
181
|
+
results.push({ step: index, type: step.type, passed: false, message: "Total duration limit exceeded." });
|
|
182
|
+
return { results };
|
|
183
|
+
}
|
|
184
|
+
await new Promise((resolveDelay) => setTimeout(resolveDelay, delay));
|
|
185
|
+
results.push({ step: index, type: step.type, passed: true, message: `Waited ${delay}ms.` });
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case "press_action": {
|
|
189
|
+
const result = await pressAction({
|
|
190
|
+
workspaceId: input.workspaceId,
|
|
191
|
+
processId: input.processId,
|
|
192
|
+
action: step.action,
|
|
193
|
+
durationMs: step.durationMs,
|
|
194
|
+
}, bridgeClient).catch((error) => ({ sent: false, error: error.message }));
|
|
195
|
+
results.push({ step: index, type: step.type, passed: result.sent ?? false, message: `Press action '${step.action}'` });
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
case "screenshot": {
|
|
199
|
+
if (screenshotCount >= maxScreenshots) {
|
|
200
|
+
results.push({ step: index, type: step.type, passed: false, message: "Screenshot limit exceeded." });
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
screenshotCount++;
|
|
204
|
+
results.push({ step: index, type: step.type, passed: true, message: `Screenshot step queued to ${step.outputPath}.` });
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
case "assert_node_exists": {
|
|
208
|
+
const result = await assertNodeExists({ workspaceId: input.workspaceId, nodePath: step.nodePath }, bridgeClient)
|
|
209
|
+
.catch(() => ({ passed: false, message: "Bridge error" }));
|
|
210
|
+
results.push({ step: index, type: step.type, passed: result.passed, message: result.message });
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
case "assert_property": {
|
|
214
|
+
const result = await assertProperty({
|
|
215
|
+
workspaceId: input.workspaceId,
|
|
216
|
+
nodePath: step.nodePath,
|
|
217
|
+
property: step.property,
|
|
218
|
+
comparison: step.comparison,
|
|
219
|
+
expected: step.expected,
|
|
220
|
+
}, bridgeClient).catch((error) => ({ passed: false, actual: null, expected: step.expected, message: error.message }));
|
|
221
|
+
results.push({ step: index, type: step.type, passed: result.passed, message: result.message });
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
case "assert_no_errors": {
|
|
225
|
+
const logs = processManager.getProcessLogs({ workspaceId: input.workspaceId, processId: input.processId, lines: 100 });
|
|
226
|
+
const hasErrors = logs.lines.some((line) => line.includes("ERROR:") || line.includes("Exception:"));
|
|
227
|
+
results.push({ step: index, type: step.type, passed: !hasErrors, message: hasErrors ? "Runtime errors detected." : "No runtime errors." });
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
default:
|
|
231
|
+
results.push({ step: index, type: step.type ?? "unknown", passed: false, message: "Unknown step type." });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return { results };
|
|
235
|
+
}
|
|
236
|
+
export async function exportGodotProject(registry, input) {
|
|
237
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
238
|
+
const projectDirectory = registry.resolvePath(workspace, input.projectPath);
|
|
239
|
+
const absoluteOutputPath = registry.resolveArtifactPath(workspace, input.outputPath, "godot");
|
|
240
|
+
await mkdir(dirname(absoluteOutputPath), { recursive: true });
|
|
241
|
+
const godotExecutable = process.env.GODOT_DOTNET_EXECUTABLE ?? process.env.GODOT_EXECUTABLE ?? "godot-mono";
|
|
242
|
+
const exportFlag = (input.mode ?? "debug") === "debug" ? "--export-debug" : "--export-release";
|
|
243
|
+
const start = Date.now();
|
|
244
|
+
try {
|
|
245
|
+
const { stdout, stderr } = await execFileAsync(godotExecutable, [
|
|
246
|
+
"--headless", "--path", projectDirectory, exportFlag, input.preset, absoluteOutputPath,
|
|
247
|
+
], { cwd: projectDirectory, windowsHide: true });
|
|
248
|
+
return {
|
|
249
|
+
success: true,
|
|
250
|
+
outputFiles: [relative(workspace.root, absoluteOutputPath).replace(/\\/g, "/")],
|
|
251
|
+
durationMs: Date.now() - start,
|
|
252
|
+
output: (stdout + "\n" + stderr).slice(0, 1000),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
return {
|
|
257
|
+
success: false,
|
|
258
|
+
outputFiles: [],
|
|
259
|
+
durationMs: Date.now() - start,
|
|
260
|
+
output: (error.stdout ?? "") + "\n" + (error.stderr ?? error.message),
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
2
|
+
import { cpSync, existsSync, mkdirSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
export function parseGodotProjectFile(content) {
|
|
7
|
+
let configVersion = 5;
|
|
8
|
+
let name = "Godot Project";
|
|
9
|
+
let mainScene = "";
|
|
10
|
+
let renderer = "Forward+";
|
|
11
|
+
const features = [];
|
|
12
|
+
const autoloads = {};
|
|
13
|
+
const inputActions = [];
|
|
14
|
+
const nameMatch = content.match(/config\/name="([^"]+)"/);
|
|
15
|
+
if (nameMatch)
|
|
16
|
+
name = nameMatch[1];
|
|
17
|
+
const sceneMatch = content.match(/run\/main_scene="([^"]+)"/);
|
|
18
|
+
if (sceneMatch)
|
|
19
|
+
mainScene = sceneMatch[1];
|
|
20
|
+
const versionMatch = content.match(/config_version=(\d+)/);
|
|
21
|
+
if (versionMatch)
|
|
22
|
+
configVersion = Number(versionMatch[1]);
|
|
23
|
+
const rendererMatch = content.match(/rendering\/renderer\/rendering_method="([^"]+)"/);
|
|
24
|
+
if (rendererMatch)
|
|
25
|
+
renderer = rendererMatch[1];
|
|
26
|
+
const featureMatch = content.match(/config\/features=PackedStringArray\((.*?)\)/);
|
|
27
|
+
if (featureMatch)
|
|
28
|
+
features.push(...featureMatch[1].split(",").map((feature) => feature.replace(/"/g, "").trim()));
|
|
29
|
+
const autoloadSection = content.match(/\[autoload\]([\s\S]*?)(?=\n\[|$)/);
|
|
30
|
+
if (autoloadSection) {
|
|
31
|
+
for (const line of autoloadSection[1].split("\n")) {
|
|
32
|
+
const keyValue = line.match(/^(\w+)="([^"]+)"/);
|
|
33
|
+
if (keyValue)
|
|
34
|
+
autoloads[keyValue[1]] = keyValue[2];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const inputSection = content.match(/\[input\]([\s\S]*?)(?=\n\[|$)/);
|
|
38
|
+
if (inputSection) {
|
|
39
|
+
for (const line of inputSection[1].split("\n")) {
|
|
40
|
+
const keyValue = line.match(/^(\w+)=\{/);
|
|
41
|
+
if (keyValue)
|
|
42
|
+
inputActions.push(keyValue[1]);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return { configVersion, name, mainScene, renderer, features, autoloads, inputActions };
|
|
46
|
+
}
|
|
47
|
+
export function parseGodotScene(content) {
|
|
48
|
+
const nodes = [];
|
|
49
|
+
const externalResources = [];
|
|
50
|
+
const signals = [];
|
|
51
|
+
let currentElement = null;
|
|
52
|
+
for (const line of content.split(/\r?\n/)) {
|
|
53
|
+
const trimmed = line.trim();
|
|
54
|
+
if (trimmed.startsWith("[ext_resource")) {
|
|
55
|
+
const idMatch = trimmed.match(/id="([^"]+)"/);
|
|
56
|
+
const typeMatch = trimmed.match(/type="([^"]+)"/);
|
|
57
|
+
const pathMatch = trimmed.match(/path="([^"]+)"/);
|
|
58
|
+
if (idMatch && typeMatch && pathMatch) {
|
|
59
|
+
externalResources.push({ id: idMatch[1], type: typeMatch[1], path: pathMatch[1] });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else if (trimmed.startsWith("[node")) {
|
|
63
|
+
const nameMatch = trimmed.match(/name="([^"]+)"/);
|
|
64
|
+
const typeMatch = trimmed.match(/type="([^"]+)"/);
|
|
65
|
+
const parentMatch = trimmed.match(/parent="([^"]+)"/);
|
|
66
|
+
if (nameMatch) {
|
|
67
|
+
const node = {
|
|
68
|
+
name: nameMatch[1],
|
|
69
|
+
type: typeMatch ? typeMatch[1] : "Node",
|
|
70
|
+
parent: parentMatch ? parentMatch[1] : undefined,
|
|
71
|
+
properties: {},
|
|
72
|
+
};
|
|
73
|
+
nodes.push(node);
|
|
74
|
+
currentElement = { type: "node", data: node };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (trimmed.startsWith("[connection")) {
|
|
78
|
+
const signalMatch = trimmed.match(/signal="([^"]+)"/);
|
|
79
|
+
const fromMatch = trimmed.match(/from="([^"]+)"/);
|
|
80
|
+
const toMatch = trimmed.match(/to="([^"]+)"/);
|
|
81
|
+
const methodMatch = trimmed.match(/method="([^"]+)"/);
|
|
82
|
+
if (signalMatch && fromMatch && toMatch && methodMatch) {
|
|
83
|
+
signals.push({ signal: signalMatch[1], from: fromMatch[1], to: toMatch[1], method: methodMatch[1] });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else if (currentElement?.type === "node" && trimmed.includes("=")) {
|
|
87
|
+
const equalsIndex = trimmed.indexOf("=");
|
|
88
|
+
currentElement.data.properties[trimmed.slice(0, equalsIndex).trim()] = trimmed.slice(equalsIndex + 1).trim();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return { rootNode: nodes.find((node) => !node.parent)?.name, nodes, externalResources, signals };
|
|
92
|
+
}
|
|
93
|
+
export async function detectGodotProject(registry, input) {
|
|
94
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
95
|
+
const targetDir = input.path ? registry.resolvePath(workspace, input.path) : workspace.root;
|
|
96
|
+
let content = "";
|
|
97
|
+
try {
|
|
98
|
+
content = await readFile(join(targetDir, "project.godot"), "utf8");
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return { projectPath: input.path ?? ".", godotProjectFound: false, hasCSharp: false };
|
|
102
|
+
}
|
|
103
|
+
let directoryFiles = [];
|
|
104
|
+
try {
|
|
105
|
+
directoryFiles = await readdir(targetDir);
|
|
106
|
+
}
|
|
107
|
+
catch { }
|
|
108
|
+
return {
|
|
109
|
+
projectPath: input.path ?? ".",
|
|
110
|
+
godotProjectFound: true,
|
|
111
|
+
...parseGodotProjectFile(content),
|
|
112
|
+
hasCSharp: directoryFiles.some((file) => file.endsWith(".csproj") || file.endsWith(".sln")),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export async function godotRun(registry, processManager, input) {
|
|
116
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
117
|
+
const projectDir = registry.resolvePath(workspace, input.projectPath);
|
|
118
|
+
const godotBin = process.env.GODOT_EXECUTABLE ?? "godot";
|
|
119
|
+
const args = ["--path", `"${projectDir}"`];
|
|
120
|
+
if (input.scenePath)
|
|
121
|
+
args.push(`"${registry.resolvePath(workspace, input.scenePath)}"`);
|
|
122
|
+
if (input.editor)
|
|
123
|
+
args.push("-e");
|
|
124
|
+
if (input.debug)
|
|
125
|
+
args.push("-d");
|
|
126
|
+
if (input.additionalArguments)
|
|
127
|
+
args.push(...input.additionalArguments);
|
|
128
|
+
const result = processManager.startProcess({
|
|
129
|
+
workspaceId: input.workspaceId,
|
|
130
|
+
command: `${godotBin} ${args.join(" ")}`,
|
|
131
|
+
workingDirectory: projectDir,
|
|
132
|
+
});
|
|
133
|
+
return { processId: result.processId, status: result.status, detectedUrls: result.detectedUrls };
|
|
134
|
+
}
|
|
135
|
+
export async function inspectGodotScene(registry, input) {
|
|
136
|
+
const workspace = registry.getWorkspace(input.workspaceId);
|
|
137
|
+
const absolutePath = registry.resolvePath(workspace, input.scenePath);
|
|
138
|
+
if (input.scenePath.endsWith(".scn"))
|
|
139
|
+
throw new Error("Binary .scn scenes are not supported. Use text .tscn format.");
|
|
140
|
+
const parsed = parseGodotScene(await readFile(absolutePath, "utf8"));
|
|
141
|
+
return {
|
|
142
|
+
scenePath: input.scenePath,
|
|
143
|
+
rootNode: parsed.rootNode,
|
|
144
|
+
nodeCount: parsed.nodes.length,
|
|
145
|
+
nodeTypes: Array.from(new Set(parsed.nodes.map((node) => node.type))),
|
|
146
|
+
nodes: parsed.nodes,
|
|
147
|
+
externalResources: parsed.externalResources,
|
|
148
|
+
signals: parsed.signals,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function globalGodotPluginTarget() {
|
|
152
|
+
if (process.platform === "win32") {
|
|
153
|
+
const appData = process.env.APPDATA || join(homedir(), "AppData", "Roaming");
|
|
154
|
+
return join(appData, "Godot", "editor_plugins", "auvrynt_bridge");
|
|
155
|
+
}
|
|
156
|
+
if (process.platform === "darwin") {
|
|
157
|
+
return join(homedir(), "Library", "Application Support", "Godot", "editor_plugins", "auvrynt_bridge");
|
|
158
|
+
}
|
|
159
|
+
return join(homedir(), ".config", "godot", "editor_plugins", "auvrynt_bridge");
|
|
160
|
+
}
|
|
161
|
+
function globalGodotPluginSource() {
|
|
162
|
+
const candidateSourceDirs = [];
|
|
163
|
+
try {
|
|
164
|
+
const currentFile = fileURLToPath(import.meta.url);
|
|
165
|
+
candidateSourceDirs.push(join(dirname(currentFile), "..", "..", "..", "addons", "auvrynt_bridge"));
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
// Fall through to the development checkout candidate.
|
|
169
|
+
}
|
|
170
|
+
candidateSourceDirs.push(join(process.cwd(), "addons", "auvrynt_bridge"));
|
|
171
|
+
return candidateSourceDirs.find((candidate) => existsSync(join(candidate, "plugin.cfg")) && existsSync(join(candidate, "auvrynt_bridge.gd")));
|
|
172
|
+
}
|
|
173
|
+
export function getGlobalGodotPluginStatus() {
|
|
174
|
+
const targetPath = globalGodotPluginTarget();
|
|
175
|
+
return {
|
|
176
|
+
targetPath,
|
|
177
|
+
installed: existsSync(join(targetPath, "plugin.cfg")) && existsSync(join(targetPath, "auvrynt_bridge.gd")),
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export function ensureGlobalGodotPlugin() {
|
|
181
|
+
const targetPath = globalGodotPluginTarget();
|
|
182
|
+
const sourceDir = globalGodotPluginSource();
|
|
183
|
+
if (!sourceDir)
|
|
184
|
+
return { installed: false, targetPath };
|
|
185
|
+
try {
|
|
186
|
+
mkdirSync(targetPath, { recursive: true });
|
|
187
|
+
cpSync(sourceDir, targetPath, { recursive: true, force: true });
|
|
188
|
+
return getGlobalGodotPluginStatus();
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
return { installed: false, targetPath };
|
|
192
|
+
}
|
|
193
|
+
}
|