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,67 @@
|
|
|
1
|
+
import { requiredScopesForToolName } from "../server/mcp-policy.js";
|
|
2
|
+
export function toolAccessForName(name) {
|
|
3
|
+
if (name.startsWith("blender_"))
|
|
4
|
+
return "write";
|
|
5
|
+
if (name.startsWith("godot_"))
|
|
6
|
+
return "write";
|
|
7
|
+
if (name.startsWith("serena_"))
|
|
8
|
+
return "write";
|
|
9
|
+
if (name === "start_process" || name === "stop_process" || name === "bash" || name === "run_shell")
|
|
10
|
+
return "process";
|
|
11
|
+
if (name.startsWith("dotnet_") && (name.includes("build") || name.includes("test") || name.includes("run") || name.includes("restore") || name.includes("format")))
|
|
12
|
+
return "process";
|
|
13
|
+
if (name === "start_dev_server")
|
|
14
|
+
return "web-write";
|
|
15
|
+
if (name === "capture_page_screenshot" || name === "test_responsive_page")
|
|
16
|
+
return "web-write";
|
|
17
|
+
if (name === "inspect_page")
|
|
18
|
+
return "web-read";
|
|
19
|
+
if (name === "agent_reach_doctor")
|
|
20
|
+
return "process";
|
|
21
|
+
if (name.startsWith("agent_reach_"))
|
|
22
|
+
return "read";
|
|
23
|
+
if (["write", "write_file", "edit", "edit_file", "split_sprite_sheet", "capture_window", "compare_images"].includes(name))
|
|
24
|
+
return "write";
|
|
25
|
+
if (name === "open_workspace" || name === "close_workspace")
|
|
26
|
+
return "write";
|
|
27
|
+
if (name === "start_blender" || name === "get_connection_status" || name === "get_process_logs" || name === "list_processes" || name === "inspect_dotnet_project")
|
|
28
|
+
return "read";
|
|
29
|
+
return "read";
|
|
30
|
+
}
|
|
31
|
+
export function integrationForTool(name) {
|
|
32
|
+
if (name.startsWith("blender_"))
|
|
33
|
+
return "blender";
|
|
34
|
+
if (name.startsWith("godot_"))
|
|
35
|
+
return "godot";
|
|
36
|
+
if (name.startsWith("serena_"))
|
|
37
|
+
return "serena";
|
|
38
|
+
if (name === "capture_page_screenshot" || name === "inspect_page" || name === "test_responsive_page")
|
|
39
|
+
return "playwright";
|
|
40
|
+
if (name.startsWith("agent_reach_"))
|
|
41
|
+
return "agent-reach";
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
export const TOOL_CAPABILITIES = new Map();
|
|
45
|
+
export function registerToolCapability(name) {
|
|
46
|
+
if (TOOL_CAPABILITIES.has(name))
|
|
47
|
+
return;
|
|
48
|
+
const caps = {
|
|
49
|
+
name,
|
|
50
|
+
access: toolAccessForName(name),
|
|
51
|
+
scopes: [], // populated dynamically
|
|
52
|
+
integration: integrationForTool(name),
|
|
53
|
+
requiresWorkspace: name !== "open_workspace",
|
|
54
|
+
};
|
|
55
|
+
TOOL_CAPABILITIES.set(name, caps);
|
|
56
|
+
}
|
|
57
|
+
export function updateToolScopes() {
|
|
58
|
+
for (const [name, caps] of TOOL_CAPABILITIES) {
|
|
59
|
+
caps.scopes = requiredScopesForName(name);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function requiredScopesForName(name) {
|
|
63
|
+
const scopes = requiredScopesForToolName(name);
|
|
64
|
+
return name === "open_workspace"
|
|
65
|
+
? Array.from(new Set([...scopes, "auvrynt:process"]))
|
|
66
|
+
: scopes;
|
|
67
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
const KIB = 1024;
|
|
2
|
+
const MIB = 1024 * KIB;
|
|
3
|
+
export const MAX_TOOL_RESULT_CONTENT_BYTES = 1 * MIB;
|
|
4
|
+
export const MAX_TOOL_RESULT_META_BYTES = 512 * KIB;
|
|
5
|
+
export const MAX_TOOL_RESULT_STRUCTURED_BYTES = 512 * KIB;
|
|
6
|
+
export const MAX_INLINE_BINARY_BYTES = 512 * KIB;
|
|
7
|
+
export const MAX_JSON_STRING_BYTES = 256 * KIB;
|
|
8
|
+
const TRUNCATION_NOTICE = "[Auvrynt truncated this tool result to keep the MCP connection stable. Request a narrower range, fewer items, or a smaller image.]";
|
|
9
|
+
export function inlineImageOrNotice(buffer, label, mimeType) {
|
|
10
|
+
if (buffer.length <= MAX_INLINE_BINARY_BYTES) {
|
|
11
|
+
return [{ type: "image", data: buffer.toString("base64"), mimeType }];
|
|
12
|
+
}
|
|
13
|
+
return [{
|
|
14
|
+
type: "text",
|
|
15
|
+
text: `${label} was saved or inspected, but its ${buffer.length}-byte image was not embedded because it exceeded the stable MCP inline-image limit.`,
|
|
16
|
+
}];
|
|
17
|
+
}
|
|
18
|
+
export function limitToolResultPayload(value) {
|
|
19
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
20
|
+
return value;
|
|
21
|
+
const result = value;
|
|
22
|
+
const contentBudget = { remaining: MAX_TOOL_RESULT_CONTENT_BYTES, truncated: false };
|
|
23
|
+
const metaBudget = { remaining: MAX_TOOL_RESULT_META_BYTES, truncated: false };
|
|
24
|
+
const structuredBudget = { remaining: MAX_TOOL_RESULT_STRUCTURED_BYTES, truncated: false };
|
|
25
|
+
const content = limitPrimaryContent(result.content, contentBudget);
|
|
26
|
+
const meta = compactJsonValue(result._meta, metaBudget, "_meta", 0, false);
|
|
27
|
+
const structuredContent = compactJsonValue(result.structuredContent, structuredBudget, "structuredContent", 0, true);
|
|
28
|
+
const truncated = contentBudget.truncated || metaBudget.truncated || structuredBudget.truncated;
|
|
29
|
+
if (!truncated)
|
|
30
|
+
return value;
|
|
31
|
+
const next = {
|
|
32
|
+
...result,
|
|
33
|
+
content,
|
|
34
|
+
_meta: meta,
|
|
35
|
+
structuredContent,
|
|
36
|
+
};
|
|
37
|
+
const contentItems = Array.isArray(next.content) ? [...next.content] : [];
|
|
38
|
+
if (!contentItems.some((item) => isTextNotice(item))) {
|
|
39
|
+
contentItems.push({ type: "text", text: TRUNCATION_NOTICE });
|
|
40
|
+
}
|
|
41
|
+
next.content = contentItems;
|
|
42
|
+
return next;
|
|
43
|
+
}
|
|
44
|
+
function limitPrimaryContent(value, budget) {
|
|
45
|
+
if (!Array.isArray(value))
|
|
46
|
+
return value;
|
|
47
|
+
const limited = [];
|
|
48
|
+
for (const item of value) {
|
|
49
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
50
|
+
limited.push(compactJsonValue(item, budget, "content", 0, false));
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const block = item;
|
|
54
|
+
if (block.type === "text" && typeof block.text === "string") {
|
|
55
|
+
limited.push({ ...block, text: consumeString(block.text, budget, MAX_JSON_STRING_BYTES) });
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if ((block.type === "image" || block.type === "audio") && typeof block.data === "string") {
|
|
59
|
+
const estimatedBinaryBytes = base64DecodedBytes(block.data);
|
|
60
|
+
const serializedBytes = Buffer.byteLength(block.data, "utf8");
|
|
61
|
+
if (estimatedBinaryBytes > MAX_INLINE_BINARY_BYTES || serializedBytes > budget.remaining) {
|
|
62
|
+
budget.truncated = true;
|
|
63
|
+
limited.push({
|
|
64
|
+
type: "text",
|
|
65
|
+
text: `[Inline ${String(block.type)} omitted: ${estimatedBinaryBytes} bytes exceeded the stable MCP payload limit.]`,
|
|
66
|
+
});
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
budget.remaining -= serializedBytes;
|
|
70
|
+
limited.push({ ...block });
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
limited.push(compactJsonValue(block, budget, "content", 0, false));
|
|
74
|
+
}
|
|
75
|
+
return limited;
|
|
76
|
+
}
|
|
77
|
+
function compactJsonValue(value, budget, key, depth, preserveShape) {
|
|
78
|
+
if (value === undefined || value === null || typeof value === "boolean" || typeof value === "number") {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
if (typeof value === "string") {
|
|
82
|
+
if ((key === "data" || key === "blob") && base64DecodedBytes(value) > MAX_INLINE_BINARY_BYTES) {
|
|
83
|
+
budget.truncated = true;
|
|
84
|
+
return `[omitted binary payload: ${base64DecodedBytes(value)} bytes]`;
|
|
85
|
+
}
|
|
86
|
+
return consumeString(value, budget, MAX_JSON_STRING_BYTES);
|
|
87
|
+
}
|
|
88
|
+
if (depth >= 12) {
|
|
89
|
+
budget.truncated = true;
|
|
90
|
+
return preserveShape
|
|
91
|
+
? schemaSafePlaceholder(value, depth)
|
|
92
|
+
: "[truncated: maximum nesting depth reached]";
|
|
93
|
+
}
|
|
94
|
+
if (Array.isArray(value)) {
|
|
95
|
+
const result = [];
|
|
96
|
+
for (let index = 0; index < value.length; index++) {
|
|
97
|
+
if (budget.remaining <= 0) {
|
|
98
|
+
budget.truncated = true;
|
|
99
|
+
if (!preserveShape)
|
|
100
|
+
result.push(`[truncated ${value.length - index} remaining items]`);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
result.push(compactJsonValue(value[index], budget, String(index), depth + 1, preserveShape));
|
|
104
|
+
}
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "object") {
|
|
108
|
+
const result = {};
|
|
109
|
+
for (const [childKey, childValue] of Object.entries(value)) {
|
|
110
|
+
if (budget.remaining <= 0) {
|
|
111
|
+
budget.truncated = true;
|
|
112
|
+
if (preserveShape) {
|
|
113
|
+
result[childKey] = schemaSafePlaceholder(childValue, depth + 1);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
result.__auvryntTruncated = true;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
budget.remaining -= Buffer.byteLength(childKey, "utf8") + 4;
|
|
120
|
+
result[childKey] = compactJsonValue(childValue, budget, childKey, depth + 1, preserveShape);
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
return String(value);
|
|
125
|
+
}
|
|
126
|
+
function schemaSafePlaceholder(value, depth) {
|
|
127
|
+
if (value === null || value === undefined || typeof value === "boolean" || typeof value === "number") {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
if (typeof value === "string")
|
|
131
|
+
return "[truncated]";
|
|
132
|
+
if (Array.isArray(value))
|
|
133
|
+
return [];
|
|
134
|
+
if (typeof value === "object") {
|
|
135
|
+
if (depth >= 16)
|
|
136
|
+
return {};
|
|
137
|
+
return Object.fromEntries(Object.entries(value).map(([key, child]) => [key, schemaSafePlaceholder(child, depth + 1)]));
|
|
138
|
+
}
|
|
139
|
+
return String(value);
|
|
140
|
+
}
|
|
141
|
+
function consumeString(value, budget, fieldLimit) {
|
|
142
|
+
const available = Math.max(0, Math.min(fieldLimit, budget.remaining));
|
|
143
|
+
const byteLength = Buffer.byteLength(value, "utf8");
|
|
144
|
+
if (byteLength <= available) {
|
|
145
|
+
budget.remaining -= byteLength;
|
|
146
|
+
return value;
|
|
147
|
+
}
|
|
148
|
+
budget.truncated = true;
|
|
149
|
+
if (available <= 0)
|
|
150
|
+
return "[truncated]";
|
|
151
|
+
const suffix = "\n… [truncated]";
|
|
152
|
+
const suffixBytes = Buffer.byteLength(suffix, "utf8");
|
|
153
|
+
const prefixBudget = Math.max(0, available - suffixBytes);
|
|
154
|
+
const prefix = truncateUtf8(value, prefixBudget);
|
|
155
|
+
budget.remaining = Math.max(0, budget.remaining - Buffer.byteLength(prefix, "utf8") - suffixBytes);
|
|
156
|
+
return `${prefix}${suffix}`;
|
|
157
|
+
}
|
|
158
|
+
function truncateUtf8(value, maxBytes) {
|
|
159
|
+
if (maxBytes <= 0)
|
|
160
|
+
return "";
|
|
161
|
+
let output = Buffer.from(value, "utf8").subarray(0, maxBytes).toString("utf8");
|
|
162
|
+
while (output.endsWith("�"))
|
|
163
|
+
output = output.slice(0, -1);
|
|
164
|
+
return output;
|
|
165
|
+
}
|
|
166
|
+
function base64DecodedBytes(data) {
|
|
167
|
+
const padding = data.endsWith("==") ? 2 : data.endsWith("=") ? 1 : 0;
|
|
168
|
+
return Math.max(0, Math.floor((data.length * 3) / 4) - padding);
|
|
169
|
+
}
|
|
170
|
+
function isTextNotice(value) {
|
|
171
|
+
if (!value || typeof value !== "object")
|
|
172
|
+
return false;
|
|
173
|
+
const block = value;
|
|
174
|
+
return block.type === "text" && block.text === TRUNCATION_NOTICE;
|
|
175
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { expandHomePath } from "../roots.js";
|
|
7
|
+
const executablesSchema = z.object({
|
|
8
|
+
serena: z.string().optional(),
|
|
9
|
+
godot: z.string().optional(),
|
|
10
|
+
godotCsharp: z.string().optional(),
|
|
11
|
+
blender: z.string().optional(),
|
|
12
|
+
aseprite: z.string().optional(),
|
|
13
|
+
asepriteSource: z.string().optional(),
|
|
14
|
+
}).catchall(z.string());
|
|
15
|
+
const integrationsSchema = z.object({
|
|
16
|
+
godotGdscript: z.boolean().optional(),
|
|
17
|
+
godotCsharp: z.boolean().optional(),
|
|
18
|
+
blender: z.boolean().optional(),
|
|
19
|
+
aseprite: z.boolean().optional(),
|
|
20
|
+
serena: z.boolean().optional(),
|
|
21
|
+
playwright: z.boolean().optional(),
|
|
22
|
+
context7: z.boolean().optional(),
|
|
23
|
+
obsidian: z.boolean().optional(),
|
|
24
|
+
roblox: z.boolean().optional(),
|
|
25
|
+
}).strict();
|
|
26
|
+
const positiveInteger = z.number().int().positive();
|
|
27
|
+
const obsidianSchema = z.object({
|
|
28
|
+
enabled: z.boolean().optional(),
|
|
29
|
+
vaultPath: z.string().min(1).max(1024).optional(),
|
|
30
|
+
});
|
|
31
|
+
const serenaSchema = z.object({
|
|
32
|
+
enabled: z.boolean().optional(),
|
|
33
|
+
executable: z.string().optional(),
|
|
34
|
+
backend: z.enum(["LSP", "JetBrains"]).optional(),
|
|
35
|
+
context: z.string().optional(),
|
|
36
|
+
startupTimeoutMs: positiveInteger.optional(),
|
|
37
|
+
requestTimeoutMs: positiveInteger.optional(),
|
|
38
|
+
idleTimeoutMinutes: positiveInteger.optional(),
|
|
39
|
+
maxInstances: positiveInteger.optional(),
|
|
40
|
+
}).strict();
|
|
41
|
+
const userConfigSchema = z.object({
|
|
42
|
+
host: z.string().optional(),
|
|
43
|
+
port: z.number().int().min(1).max(65535).optional(),
|
|
44
|
+
allowedRoots: z.array(z.string()).optional(),
|
|
45
|
+
publicBaseUrl: z.string().nullable().optional(),
|
|
46
|
+
allowedHosts: z.array(z.string()).optional(),
|
|
47
|
+
maxSessions: z.number().int().min(1).max(99999).optional(),
|
|
48
|
+
maxSessionsPerClient: z.number().int().min(1).max(99999).optional(),
|
|
49
|
+
sessionIdleTimeoutMs: z.number().int().min(60_000).max(7 * 24 * 60 * 60 * 1000).optional(),
|
|
50
|
+
stateDir: z.string().optional(),
|
|
51
|
+
worktreeRoot: z.string().optional(),
|
|
52
|
+
agentDir: z.string().optional(),
|
|
53
|
+
executables: executablesSchema.optional(),
|
|
54
|
+
integrations: integrationsSchema.optional(),
|
|
55
|
+
serena: serenaSchema.optional(),
|
|
56
|
+
obsidian: obsidianSchema.optional(),
|
|
57
|
+
tunnelProvider: z.enum(["cloudflare", "ngrok", "custom"]).optional(),
|
|
58
|
+
ngrokAuthtoken: z.string().optional(),
|
|
59
|
+
ngrokUrl: z.string().optional(),
|
|
60
|
+
toolToggles: z.record(z.string(), z.boolean()).optional(),
|
|
61
|
+
}).strict();
|
|
62
|
+
const authConfigSchema = z.object({
|
|
63
|
+
ownerToken: z.string().optional(),
|
|
64
|
+
cloudflareTunnelToken: z.string().min(16).max(2048).optional(),
|
|
65
|
+
ngrokAuthtokens: z.array(z.string().min(16).max(512)).max(20).optional(),
|
|
66
|
+
ngrokActiveAuthtokenIndex: z.number().int().min(0).optional(),
|
|
67
|
+
ngrokQuotaExhausted: z.record(z.string(), z.string()).optional(),
|
|
68
|
+
context7ApiKey: z.string().min(8).max(512).optional(),
|
|
69
|
+
}).strict();
|
|
70
|
+
export function auvryntConfigDir(env = process.env) {
|
|
71
|
+
return resolve(expandHomePath(env.AUVRYNT_CONFIG_DIR ?? join(homedir(), ".auvrynt")));
|
|
72
|
+
}
|
|
73
|
+
export function auvryntConfigPath(env = process.env) {
|
|
74
|
+
return join(auvryntConfigDir(env), "config.json");
|
|
75
|
+
}
|
|
76
|
+
export function auvryntAuthPath(env = process.env) {
|
|
77
|
+
return join(auvryntConfigDir(env), "auth.json");
|
|
78
|
+
}
|
|
79
|
+
export function loadAuvryntFiles(env = process.env) {
|
|
80
|
+
const dir = auvryntConfigDir(env);
|
|
81
|
+
const configPath = join(dir, "config.json");
|
|
82
|
+
const authPath = join(dir, "auth.json");
|
|
83
|
+
const configExists = existsSync(configPath);
|
|
84
|
+
const authExists = existsSync(authPath);
|
|
85
|
+
return {
|
|
86
|
+
dir,
|
|
87
|
+
configPath,
|
|
88
|
+
authPath,
|
|
89
|
+
configExists,
|
|
90
|
+
authExists,
|
|
91
|
+
config: configExists ? readJsonFile(configPath, userConfigSchema) : {},
|
|
92
|
+
auth: authExists ? readJsonFile(authPath, authConfigSchema) : {},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export function writeAuvryntConfig(config, env = process.env) {
|
|
96
|
+
const validated = userConfigSchema.parse(config);
|
|
97
|
+
const filePath = auvryntConfigPath(env);
|
|
98
|
+
ensurePrivateDirectory(auvryntConfigDir(env));
|
|
99
|
+
writeJsonFile(filePath, validated, 0o600);
|
|
100
|
+
return filePath;
|
|
101
|
+
}
|
|
102
|
+
export function writeAuvryntAuth(auth, env = process.env) {
|
|
103
|
+
const validated = authConfigSchema.parse(auth);
|
|
104
|
+
const filePath = auvryntAuthPath(env);
|
|
105
|
+
ensurePrivateDirectory(auvryntConfigDir(env));
|
|
106
|
+
writeJsonFile(filePath, validated, 0o600);
|
|
107
|
+
return filePath;
|
|
108
|
+
}
|
|
109
|
+
export function generateOwnerToken() {
|
|
110
|
+
return randomBytes(32).toString("base64url");
|
|
111
|
+
}
|
|
112
|
+
function readJsonFile(filePath, schema) {
|
|
113
|
+
try {
|
|
114
|
+
const parsed = JSON.parse(readFileSync(filePath, "utf8"));
|
|
115
|
+
const result = schema.safeParse(parsed);
|
|
116
|
+
if (!result.success) {
|
|
117
|
+
const details = result.error.issues
|
|
118
|
+
.map((issue) => `${issue.path.join(".") || "<root>"}: ${issue.message}`)
|
|
119
|
+
.join("; ");
|
|
120
|
+
throw new Error(`invalid configuration (${details})`);
|
|
121
|
+
}
|
|
122
|
+
return result.data;
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
126
|
+
throw new Error(`Unable to read ${filePath}: ${reason}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function ensurePrivateDirectory(directory) {
|
|
130
|
+
mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
131
|
+
try {
|
|
132
|
+
chmodSync(directory, 0o700);
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
// Windows and some network filesystems may not expose POSIX mode bits.
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function writeJsonFile(filePath, value, mode) {
|
|
139
|
+
ensurePrivateDirectory(dirname(filePath));
|
|
140
|
+
const tempPath = join(dirname(filePath), `.${basename(filePath)}.${process.pid}.${randomBytes(6).toString("hex")}.tmp`);
|
|
141
|
+
try {
|
|
142
|
+
writeFileSync(tempPath, JSON.stringify(value, null, 2) + "\n", { mode, flag: "wx" });
|
|
143
|
+
try {
|
|
144
|
+
chmodSync(tempPath, mode);
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
// Best effort on platforms without POSIX permissions.
|
|
148
|
+
}
|
|
149
|
+
renameSync(tempPath, filePath);
|
|
150
|
+
try {
|
|
151
|
+
chmodSync(filePath, mode);
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
// Best effort on platforms without POSIX permissions.
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
if (existsSync(tempPath)) {
|
|
159
|
+
try {
|
|
160
|
+
unlinkSync(tempPath);
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
// A failed cleanup must not hide the original write/rename error.
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -1,98 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { execFile } from "node:child_process";
|
|
3
|
-
import { promisify } from "node:util";
|
|
4
|
-
import { loadConfig } from "./config.js";
|
|
5
|
-
const execFileAsync = promisify(execFile);
|
|
6
|
-
const PROCESS_MARKERS = {
|
|
7
|
-
blender: ["blender.exe", "blender"],
|
|
8
|
-
godot: ["godot.exe", "godot4.exe", "godot"],
|
|
9
|
-
cloudflare_tunnel: ["cloudflared.exe", "cloudflared"],
|
|
10
|
-
serena: ["serena.exe", "serena"],
|
|
11
|
-
};
|
|
12
|
-
function probePort(host, port, timeoutMs = 350) {
|
|
13
|
-
return new Promise((resolve) => {
|
|
14
|
-
const socket = createConnection({ host, port });
|
|
15
|
-
const finish = (available) => {
|
|
16
|
-
socket.destroy();
|
|
17
|
-
resolve(available);
|
|
18
|
-
};
|
|
19
|
-
const timeout = setTimeout(() => finish(false), timeoutMs);
|
|
20
|
-
socket.once("connect", () => {
|
|
21
|
-
clearTimeout(timeout);
|
|
22
|
-
finish(true);
|
|
23
|
-
});
|
|
24
|
-
socket.once("error", () => {
|
|
25
|
-
clearTimeout(timeout);
|
|
26
|
-
finish(false);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
async function runningProcessNames() {
|
|
31
|
-
if (process.platform !== "win32")
|
|
32
|
-
return [];
|
|
33
|
-
try {
|
|
34
|
-
const { stdout } = await execFileAsync("tasklist.exe", ["/FO", "CSV", "/NH"], { timeout: 5_000 });
|
|
35
|
-
return stdout
|
|
36
|
-
.split(/\r?\n/)
|
|
37
|
-
.map((line) => line.match(/^"([^"]+)"/)?.[1]?.toLowerCase())
|
|
38
|
-
.filter((name) => Boolean(name));
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async function findExecutable(command) {
|
|
45
|
-
if (process.platform !== "win32")
|
|
46
|
-
return undefined;
|
|
47
|
-
try {
|
|
48
|
-
const { stdout } = await execFileAsync("where.exe", [command], { timeout: 5_000 });
|
|
49
|
-
return stdout.split(/\r?\n/).map((line) => line.trim()).find(Boolean);
|
|
50
|
-
}
|
|
51
|
-
catch {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function hasProcess(processes, markers) {
|
|
56
|
-
return processes.some((processName) => markers.some((marker) => processName === marker || processName.includes(marker)));
|
|
57
|
-
}
|
|
58
|
-
export async function discoverLocalIntegrations() {
|
|
59
|
-
let configExecs = {};
|
|
60
|
-
try {
|
|
61
|
-
const config = loadConfig();
|
|
62
|
-
configExecs = config.executables;
|
|
63
|
-
}
|
|
64
|
-
catch { }
|
|
65
|
-
const blenderMcpPort = Number(process.env.AUVRYNT_BLENDER_MCP_PORT ?? 9876);
|
|
66
|
-
const [processes, cloudflaredSys, serenaSys, godotSys, blenderSys, blenderLabMcp, auvryntBlenderBridge, auvryntGodotBridge] = await Promise.all([
|
|
67
|
-
runningProcessNames(),
|
|
68
|
-
findExecutable("cloudflared"),
|
|
69
|
-
findExecutable("serena"),
|
|
70
|
-
findExecutable("godot"),
|
|
71
|
-
findExecutable("blender"),
|
|
72
|
-
probePort("127.0.0.1", blenderMcpPort),
|
|
73
|
-
probePort("127.0.0.1", 49323),
|
|
74
|
-
probePort("127.0.0.1", 49322),
|
|
75
|
-
]);
|
|
76
|
-
const serena = configExecs.serena || serenaSys;
|
|
77
|
-
const godot = configExecs.godot || godotSys;
|
|
78
|
-
const godotCsharp = configExecs.godotCsharp;
|
|
79
|
-
const blender = configExecs.blender || blenderSys;
|
|
80
|
-
return {
|
|
81
|
-
processes,
|
|
82
|
-
executables: {
|
|
83
|
-
cloudflared: cloudflaredSys,
|
|
84
|
-
serena,
|
|
85
|
-
godot,
|
|
86
|
-
godotCsharp,
|
|
87
|
-
blender,
|
|
88
|
-
},
|
|
89
|
-
ports: {
|
|
90
|
-
blender_lab_mcp: blenderLabMcp,
|
|
91
|
-
auvrynt_blender_bridge: auvryntBlenderBridge,
|
|
92
|
-
auvrynt_godot_bridge: auvryntGodotBridge,
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
export function processDetected(discovery, integration) {
|
|
97
|
-
return hasProcess(discovery.processes, PROCESS_MARKERS[integration]);
|
|
98
|
-
}
|
|
1
|
+
export * from "./integrations/integration-discovery.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./infrastructure/integration-queue.js";
|