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
package/dist/cli.js
CHANGED
|
@@ -1,779 +1,122 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { discoverLocalIntegrations, processDetected } from "./integration-discovery.js";
|
|
16
|
-
import { readConnectedClients } from "./connection-registry.js";
|
|
17
|
-
const require = createRequire(import.meta.url);
|
|
18
|
-
const SUPPORTED_NODE_RANGE = ">=20.12 <27";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { parseStartRequest } from "./background-lifecycle.js";
|
|
4
|
+
import { runServeCommand } from "./cli/commands/serve-command.js";
|
|
5
|
+
import { runTunnelCommand } from "./cli/commands/tunnel-command.js";
|
|
6
|
+
import { printHelp } from "./cli/commands/help-command.js";
|
|
7
|
+
import { runConfigCommand, runConnectedCommand, runTokenCommand, runUninstallCommand, } from "./cli/commands/user-config-commands.js";
|
|
8
|
+
import { assertSupportedNode, runDoctorCommand, runStatusCommand, } from "./cli/commands/status-commands.js";
|
|
9
|
+
import { runDisableCommand, runEnableCommand, } from "./cli/commands/integration-commands.js";
|
|
10
|
+
import { runSetupCommand } from "./cli/commands/setup-command.js";
|
|
11
|
+
import { ensureConfigured, runInitCommand } from "./cli/commands/init-command.js";
|
|
12
|
+
import { createLifecycleManager } from "./cli/lifecycle-manager.js";
|
|
13
|
+
import { selfHealStartIntegrations } from "./cli/integration-bootstrap.js";
|
|
14
|
+
const lifecycle = createLifecycleManager(selfHealStartIntegrations);
|
|
19
15
|
async function main(argv) {
|
|
20
16
|
assertSupportedNode();
|
|
21
17
|
const [rawCommand, ...args] = argv;
|
|
22
18
|
const command = normalizeCommand(rawCommand);
|
|
23
19
|
switch (command) {
|
|
24
20
|
case "serve":
|
|
25
|
-
|
|
26
|
-
// `start` is intentionally directory-scoped: the launch directory is
|
|
27
|
-
// the only project root available to the web agent for this session.
|
|
28
|
-
const launchRoot = resolve(process.cwd());
|
|
29
|
-
process.env.AUVRYNT_ALLOWED_ROOTS = launchRoot;
|
|
30
|
-
process.env.AUVRYNT_WORKTREE_ROOT = launchRoot;
|
|
31
|
-
}
|
|
32
|
-
await ensureConfigured({ directoryScoped: rawCommand === "start" });
|
|
33
|
-
const localConfig = loadConfig();
|
|
34
|
-
const instanceLock = await acquireInstanceLock(localConfig.stateDir);
|
|
35
|
-
let tunnel;
|
|
36
|
-
let stopTunnel;
|
|
37
|
-
try {
|
|
38
|
-
if (rawCommand === "start") {
|
|
39
|
-
process.env.AUVRYNT_START_MODE = "true";
|
|
40
|
-
process.env.AUVRYNT_SERENA_ENABLED = "true";
|
|
41
|
-
process.env.AUVRYNT_SERENA_EXECUTABLE = await ensureSerenaExecutable();
|
|
42
|
-
tunnel = await startCloudflareTunnel(localConfig.port);
|
|
43
|
-
process.env.AUVRYNT_PUBLIC_BASE_URL = tunnel.url;
|
|
44
|
-
stopTunnel = () => {
|
|
45
|
-
if (tunnel && !tunnel.process.killed)
|
|
46
|
-
tunnel.process.kill();
|
|
47
|
-
};
|
|
48
|
-
process.once("SIGINT", stopTunnel);
|
|
49
|
-
process.once("SIGTERM", stopTunnel);
|
|
50
|
-
}
|
|
51
|
-
await serve();
|
|
52
|
-
}
|
|
53
|
-
finally {
|
|
54
|
-
if (stopTunnel) {
|
|
55
|
-
process.removeListener("SIGINT", stopTunnel);
|
|
56
|
-
process.removeListener("SIGTERM", stopTunnel);
|
|
57
|
-
stopTunnel();
|
|
58
|
-
}
|
|
59
|
-
await instanceLock.release();
|
|
60
|
-
}
|
|
21
|
+
await runServeCommand(rawCommand, args, lifecycle);
|
|
61
22
|
return;
|
|
62
23
|
case "init":
|
|
63
|
-
await
|
|
24
|
+
await runInitCommand({ force: args.includes("--force") });
|
|
64
25
|
return;
|
|
65
26
|
case "doctor":
|
|
66
|
-
await
|
|
27
|
+
await runDoctorCommand();
|
|
67
28
|
return;
|
|
68
29
|
case "status":
|
|
69
|
-
await
|
|
30
|
+
await runStatusCommand({
|
|
31
|
+
readActiveInstance: lifecycle.readActiveInstance,
|
|
32
|
+
});
|
|
70
33
|
return;
|
|
71
34
|
case "connected":
|
|
72
|
-
|
|
35
|
+
runConnectedCommand();
|
|
36
|
+
return;
|
|
37
|
+
case "token":
|
|
38
|
+
runTokenCommand(args);
|
|
73
39
|
return;
|
|
74
40
|
case "uninstall":
|
|
75
|
-
await
|
|
41
|
+
await runUninstallCommand(args.includes("--yes") || args.includes("-y"));
|
|
76
42
|
return;
|
|
77
43
|
case "config":
|
|
78
44
|
runConfigCommand(args);
|
|
79
45
|
return;
|
|
80
46
|
case "setup":
|
|
81
|
-
await
|
|
47
|
+
await runSetupCommand(args);
|
|
82
48
|
return;
|
|
83
|
-
case "
|
|
84
|
-
|
|
49
|
+
case "enable":
|
|
50
|
+
await runEnableCommand();
|
|
85
51
|
return;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return "help";
|
|
99
|
-
throw new Error(`Unknown command: ${command}`);
|
|
100
|
-
}
|
|
101
|
-
async function ensureConfigured(options = {}) {
|
|
102
|
-
const files = loadAuvryntFiles();
|
|
103
|
-
if (files.configExists && files.authExists)
|
|
104
|
-
return;
|
|
105
|
-
if (process.env.AUVRYNT_OAUTH_OWNER_TOKEN)
|
|
106
|
-
return;
|
|
107
|
-
if (options.directoryScoped) {
|
|
108
|
-
const launchRoot = resolve(process.cwd());
|
|
109
|
-
if (!files.configExists) {
|
|
110
|
-
writeAuvryntConfig({
|
|
111
|
-
host: files.config.host ?? "127.0.0.1",
|
|
112
|
-
port: files.config.port ?? 49321,
|
|
113
|
-
allowedRoots: [launchRoot],
|
|
114
|
-
publicBaseUrl: files.config.publicBaseUrl ?? `http://127.0.0.1:${files.config.port ?? 49321}`,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
if (!files.authExists) {
|
|
118
|
-
writeAuvryntAuth({ ownerToken: generateOwnerToken() });
|
|
119
|
-
}
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
if (!input.isTTY || !output.isTTY) {
|
|
123
|
-
throw new Error([
|
|
124
|
-
"Auvrynt is not configured and this terminal is non-interactive.",
|
|
125
|
-
"",
|
|
126
|
-
"Run:",
|
|
127
|
-
" auvrynt init",
|
|
128
|
-
"",
|
|
129
|
-
"Or provide AUVRYNT_OAUTH_OWNER_TOKEN and AUVRYNT_ALLOWED_ROOTS.",
|
|
130
|
-
].join("\n"));
|
|
131
|
-
}
|
|
132
|
-
await runInit({ force: false });
|
|
133
|
-
}
|
|
134
|
-
async function runInit({ force }) {
|
|
135
|
-
const files = loadAuvryntFiles();
|
|
136
|
-
if (!force && files.configExists && files.authExists) {
|
|
137
|
-
prompts.log.info(`Auvrynt is already configured at ${files.dir}`);
|
|
138
|
-
prompts.log.info("Run `auvrynt init --force` to update it.");
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
try {
|
|
142
|
-
prompts.intro("Auvrynt setup");
|
|
143
|
-
const defaultRoots = files.config.allowedRoots?.join(", ") || process.cwd();
|
|
144
|
-
const rootsAnswer = await textPrompt({
|
|
145
|
-
message: `Where are your projects located? Press Enter to use ${defaultRoots}`,
|
|
146
|
-
placeholder: defaultRoots,
|
|
147
|
-
defaultValue: defaultRoots,
|
|
148
|
-
validate: (value) => value?.trim() ? undefined : "Enter at least one project root.",
|
|
149
|
-
});
|
|
150
|
-
const allowedRoots = rootsAnswer
|
|
151
|
-
.split(",")
|
|
152
|
-
.map((root) => resolve(expandHomePath(root.trim())))
|
|
153
|
-
.filter(Boolean);
|
|
154
|
-
const defaultPort = String(files.config.port ?? 49321);
|
|
155
|
-
const portAnswer = await textPrompt({
|
|
156
|
-
message: `Which local port should Auvrynt use? Press Enter to use ${defaultPort}`,
|
|
157
|
-
placeholder: defaultPort,
|
|
158
|
-
defaultValue: defaultPort,
|
|
159
|
-
validate: validatePort,
|
|
160
|
-
});
|
|
161
|
-
const port = Number(portAnswer);
|
|
162
|
-
prompts.note([
|
|
163
|
-
"Auvrynt needs a public base URL so ChatGPT or Claude can reach this MCP server.",
|
|
164
|
-
"Create a tunnel or reverse proxy with Cloudflare Tunnel, ngrok, Pinggy, Tailscale Funnel, or your own HTTPS proxy.",
|
|
165
|
-
"Paste the public origin here, without /mcp.",
|
|
166
|
-
"",
|
|
167
|
-
"Example: https://your-tunnel-host.example.com",
|
|
168
|
-
].join("\n"), "Public URL required");
|
|
169
|
-
const publicBaseUrl = normalizePublicBaseUrl(await textPrompt({
|
|
170
|
-
message: files.config.publicBaseUrl
|
|
171
|
-
? `What is the public base URL? Press Enter to keep ${files.config.publicBaseUrl}`
|
|
172
|
-
: "What is the public base URL?",
|
|
173
|
-
placeholder: files.config.publicBaseUrl ?? "https://your-tunnel-host.example.com",
|
|
174
|
-
defaultValue: files.config.publicBaseUrl ?? "",
|
|
175
|
-
validate: validateRequiredPublicBaseUrl,
|
|
176
|
-
}));
|
|
177
|
-
const config = {
|
|
178
|
-
host: files.config.host ?? "127.0.0.1",
|
|
179
|
-
port,
|
|
180
|
-
allowedRoots,
|
|
181
|
-
publicBaseUrl,
|
|
182
|
-
};
|
|
183
|
-
const auth = {
|
|
184
|
-
ownerToken: files.auth.ownerToken ?? generateOwnerToken(),
|
|
185
|
-
};
|
|
186
|
-
const configPath = writeAuvryntConfig(config);
|
|
187
|
-
const authPath = writeAuvryntAuth(auth);
|
|
188
|
-
const lines = [
|
|
189
|
-
`Config: ${configPath}`,
|
|
190
|
-
`Auth: ${authPath}`,
|
|
191
|
-
`Local MCP URL: http://${config.host}:${config.port}/mcp`,
|
|
192
|
-
...(publicBaseUrl ? [`Public MCP URL: ${publicBaseUrl}/mcp`] : []),
|
|
193
|
-
];
|
|
194
|
-
prompts.note(lines.join("\n"), "Auvrynt configured");
|
|
195
|
-
prompts.note([
|
|
196
|
-
`Owner password: ${auth.ownerToken}`,
|
|
197
|
-
"Use this when ChatGPT or Claude asks you to approve Auvrynt access.",
|
|
198
|
-
`Stored at: ${authPath}`,
|
|
199
|
-
].join("\n"), "Owner password");
|
|
200
|
-
prompts.outro("Run `auvrynt start` to start the MCP server.");
|
|
201
|
-
}
|
|
202
|
-
catch (error) {
|
|
203
|
-
if (error instanceof SetupCancelledError) {
|
|
204
|
-
prompts.cancel("Setup cancelled");
|
|
52
|
+
case "disable":
|
|
53
|
+
await runDisableCommand();
|
|
54
|
+
return;
|
|
55
|
+
case "add":
|
|
56
|
+
await lifecycle.addProfiles(args);
|
|
57
|
+
return;
|
|
58
|
+
case "change": {
|
|
59
|
+
if (args.length > 0)
|
|
60
|
+
throw new Error("Usage: auvrynt change");
|
|
61
|
+
const launchRoot = setDirectoryScopedRoot();
|
|
62
|
+
await ensureConfigured({ directoryScoped: true });
|
|
63
|
+
await lifecycle.changeWorkspace(launchRoot);
|
|
205
64
|
return;
|
|
206
65
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"better-sqlite3 could not load for this Node runtime.",
|
|
215
|
-
sqliteStatus,
|
|
216
|
-
"",
|
|
217
|
-
"Try reinstalling or rebuilding dependencies under the active Node version:",
|
|
218
|
-
" npm rebuild better-sqlite3",
|
|
219
|
-
].join("\n"));
|
|
220
|
-
}
|
|
221
|
-
const { createServer } = await import("./server.js");
|
|
222
|
-
const config = loadConfig();
|
|
223
|
-
const { app } = createServer(config);
|
|
224
|
-
const startMode = process.env.AUVRYNT_START_MODE === "true";
|
|
225
|
-
const files = loadAuvryntFiles();
|
|
226
|
-
const ownerToken = files.auth.ownerToken || "not_configured";
|
|
227
|
-
const publicMcpUrl = config.publicBaseUrl
|
|
228
|
-
? `${config.publicBaseUrl.replace(/\/$/, "")}/mcp`
|
|
229
|
-
: `http://${config.host}:${config.port}/mcp`;
|
|
230
|
-
await new Promise((resolveServer, rejectServer) => {
|
|
231
|
-
const httpServer = app.listen(config.port, config.host, () => {
|
|
232
|
-
if (startMode) {
|
|
233
|
-
console.clear();
|
|
234
|
-
console.log("");
|
|
235
|
-
console.log(" \x1b[36m\x1b[1mAuvrynt: Webkit Arsenal is ready\x1b[0m");
|
|
236
|
-
console.log("");
|
|
237
|
-
console.log(" \x1b[90mClaude Web connector URL:\x1b[0m");
|
|
238
|
-
console.log(" \x1b[36m" + publicMcpUrl + "\x1b[0m");
|
|
239
|
-
console.log("");
|
|
240
|
-
console.log(" \x1b[90mAuthorization page:\x1b[0m");
|
|
241
|
-
console.log(" \x1b[36m" + config.publicBaseUrl.replace(/\/$/, "") + "/authorize\x1b[0m");
|
|
242
|
-
console.log("");
|
|
243
|
-
console.log(" \x1b[90mOwner token:\x1b[0m");
|
|
244
|
-
console.log(" \x1b[33m" + ownerToken + "\x1b[0m");
|
|
245
|
-
console.log("");
|
|
246
|
-
console.log(" \x1b[90mNote:\x1b[0m");
|
|
247
|
-
console.log(" Web-agent workspace: " + config.allowedRoots.join(", "));
|
|
248
|
-
console.log(" The Cloudflare URL is temporary.");
|
|
249
|
-
console.log(" Recreate or edit the web agent connector after restart.");
|
|
250
|
-
console.log("");
|
|
251
|
-
const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
252
|
-
let frameIndex = 0;
|
|
253
|
-
let mcpEventsCount = 0;
|
|
254
|
-
let lastEvent = "Started successfully";
|
|
255
|
-
global.auvryntLogEmitter = (level, event) => {
|
|
256
|
-
mcpEventsCount++;
|
|
257
|
-
lastEvent = `${event} (${level})`;
|
|
258
|
-
};
|
|
259
|
-
const interval = setInterval(() => {
|
|
260
|
-
const frame = frames[frameIndex];
|
|
261
|
-
frameIndex = (frameIndex + 1) % frames.length;
|
|
262
|
-
process.stdout.write(`\r\x1b[K \x1b[32m${frame}\x1b[0m Logs active... (${mcpEventsCount} requests handled | Last: ${lastEvent})`);
|
|
263
|
-
}, 100);
|
|
264
|
-
global.auvryntStartInterval = interval;
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
console.log(`auvrynt listening on http://${config.host}:${config.port}/mcp`);
|
|
268
|
-
console.log(`public base url: ${config.publicBaseUrl}`);
|
|
269
|
-
console.log(`allowed roots: ${config.allowedRoots.join(", ")}`);
|
|
270
|
-
console.log(`allowed hosts: ${config.allowedHosts.join(", ")}`);
|
|
271
|
-
if (config.allowedHosts.includes("*")) {
|
|
272
|
-
console.warn("warning: Host header allowlist is disabled because AUVRYNT_ALLOWED_HOSTS=*");
|
|
273
|
-
}
|
|
274
|
-
console.log("auth: Owner password approval required");
|
|
275
|
-
console.log(`logging: ${config.logging.level} ${config.logging.format}`);
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
const removeSignalHandlers = () => {
|
|
279
|
-
process.removeListener("SIGINT", shutdown);
|
|
280
|
-
process.removeListener("SIGTERM", shutdown);
|
|
281
|
-
};
|
|
282
|
-
const shutdown = () => {
|
|
283
|
-
if (global.auvryntStartInterval) {
|
|
284
|
-
clearInterval(global.auvryntStartInterval);
|
|
285
|
-
delete global.auvryntStartInterval;
|
|
286
|
-
}
|
|
287
|
-
httpServer.close(() => {
|
|
288
|
-
removeSignalHandlers();
|
|
289
|
-
resolveServer();
|
|
290
|
-
});
|
|
291
|
-
};
|
|
292
|
-
httpServer.once("error", (error) => {
|
|
293
|
-
removeSignalHandlers();
|
|
294
|
-
rejectServer(error);
|
|
295
|
-
});
|
|
296
|
-
process.once("SIGINT", shutdown);
|
|
297
|
-
process.once("SIGTERM", shutdown);
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
async function runDoctor() {
|
|
301
|
-
const files = loadAuvryntFiles();
|
|
302
|
-
console.log(`Config dir: ${files.dir}`);
|
|
303
|
-
console.log(`Config file: ${files.configExists ? files.configPath : "missing"}`);
|
|
304
|
-
console.log(`Auth file: ${files.authExists ? files.authPath : "missing"}`);
|
|
305
|
-
console.log(`Node: ${process.version} (${nodeVersionStatus()})`);
|
|
306
|
-
console.log(`Node ABI: ${process.versions.modules}`);
|
|
307
|
-
console.log(`Platform: ${process.platform} ${process.arch}`);
|
|
308
|
-
console.log(`Git: ${checkGitAvailable()}`);
|
|
309
|
-
console.log(`Bash shell: ${checkBashShell()}`);
|
|
310
|
-
console.log(`SQLite native dependency: ${checkSqliteNative()}`);
|
|
311
|
-
try {
|
|
312
|
-
const config = loadConfig();
|
|
313
|
-
console.log(`Local MCP URL: http://${config.host}:${config.port}/mcp`);
|
|
314
|
-
console.log(`Public MCP URL: ${new URL("/mcp", config.publicBaseUrl).toString()}`);
|
|
315
|
-
console.log(`Allowed roots: ${config.allowedRoots.join(", ")}`);
|
|
316
|
-
console.log(`Allowed hosts: ${config.allowedHosts.join(", ")}`);
|
|
317
|
-
}
|
|
318
|
-
catch (error) {
|
|
319
|
-
console.log(`Config status: ${error instanceof Error ? error.message : String(error)}`);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
async function acquireInstanceLock(stateDir) {
|
|
323
|
-
const lockPath = join(stateDir, "server.lock");
|
|
324
|
-
await mkdir(stateDir, { recursive: true });
|
|
325
|
-
for (let attempt = 0; attempt < 2; attempt++) {
|
|
326
|
-
try {
|
|
327
|
-
const handle = await open(lockPath, "wx");
|
|
328
|
-
await handle.writeFile(JSON.stringify({ pid: process.pid, startedAt: new Date().toISOString() }));
|
|
329
|
-
return { release: () => releaseInstanceLock(handle, lockPath) };
|
|
330
|
-
}
|
|
331
|
-
catch (error) {
|
|
332
|
-
if (error.code !== "EEXIST")
|
|
333
|
-
throw error;
|
|
334
|
-
let ownerPid;
|
|
335
|
-
try {
|
|
336
|
-
const lock = JSON.parse(await readFile(lockPath, "utf8"));
|
|
337
|
-
ownerPid = lock.pid;
|
|
338
|
-
}
|
|
339
|
-
catch {
|
|
340
|
-
// A partially written lock is treated as stale and retried once.
|
|
341
|
-
}
|
|
342
|
-
if (ownerPid && isProcessRunning(ownerPid)) {
|
|
343
|
-
throw new Error(`Auvrynt is already running (PID ${ownerPid}). Stop that instance before starting another.`);
|
|
344
|
-
}
|
|
345
|
-
await unlink(lockPath).catch((unlinkError) => {
|
|
346
|
-
if (unlinkError.code !== "ENOENT")
|
|
347
|
-
throw unlinkError;
|
|
66
|
+
case "stop":
|
|
67
|
+
await lifecycle.stop();
|
|
68
|
+
return;
|
|
69
|
+
case "tunnel":
|
|
70
|
+
await runTunnelCommand({
|
|
71
|
+
readActiveInstance: lifecycle.readActiveInstance,
|
|
72
|
+
restart: lifecycle.restart,
|
|
348
73
|
});
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
throw new Error("Could not acquire the Auvrynt server lock.");
|
|
352
|
-
}
|
|
353
|
-
function isProcessRunning(pid) {
|
|
354
|
-
try {
|
|
355
|
-
process.kill(pid, 0);
|
|
356
|
-
return true;
|
|
357
|
-
}
|
|
358
|
-
catch {
|
|
359
|
-
return false;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
async function releaseInstanceLock(handle, lockPath) {
|
|
363
|
-
await handle.close().catch(() => undefined);
|
|
364
|
-
await unlink(lockPath).catch(() => undefined);
|
|
365
|
-
}
|
|
366
|
-
async function startCloudflareTunnel(port) {
|
|
367
|
-
const executable = await resolveCloudflaredExecutable();
|
|
368
|
-
const child = spawn(executable, ["tunnel", "--no-autoupdate", "--url", `http://127.0.0.1:${port}`], {
|
|
369
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
370
|
-
windowsHide: true,
|
|
371
|
-
});
|
|
372
|
-
const tunnelUrl = await new Promise((resolveUrl, reject) => {
|
|
373
|
-
let output = "";
|
|
374
|
-
const timeout = setTimeout(() => {
|
|
375
|
-
child.kill();
|
|
376
|
-
reject(new Error("Cloudflare tunnel did not provide a public URL within 30 seconds."));
|
|
377
|
-
}, 30_000);
|
|
378
|
-
const onOutput = (chunk) => {
|
|
379
|
-
output += chunk.toString();
|
|
380
|
-
const match = output.match(/https:\/\/[a-zA-Z0-9-]+\.trycloudflare\.com/);
|
|
381
|
-
if (match) {
|
|
382
|
-
clearTimeout(timeout);
|
|
383
|
-
resolveUrl(match[0]);
|
|
384
|
-
}
|
|
385
|
-
};
|
|
386
|
-
child.stdout?.on("data", onOutput);
|
|
387
|
-
child.stderr?.on("data", onOutput);
|
|
388
|
-
child.once("error", (error) => {
|
|
389
|
-
clearTimeout(timeout);
|
|
390
|
-
reject(new Error(`Cloudflare tunnel failed to start: ${error.message}`));
|
|
391
|
-
});
|
|
392
|
-
child.once("exit", (code) => {
|
|
393
|
-
if (code !== null) {
|
|
394
|
-
clearTimeout(timeout);
|
|
395
|
-
reject(new Error(`Cloudflare tunnel exited before connecting (code ${code}).`));
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
return { process: child, url: tunnelUrl };
|
|
400
|
-
}
|
|
401
|
-
async function resolveCloudflaredExecutable() {
|
|
402
|
-
try {
|
|
403
|
-
return execFileSync(process.platform === "win32" ? "where.exe" : "which", ["cloudflared"], { encoding: "utf8" }).split(/\r?\n/)[0]?.trim() || "cloudflared";
|
|
404
|
-
}
|
|
405
|
-
catch {
|
|
406
|
-
if (process.platform === "win32") {
|
|
407
|
-
return installWindowsCloudflared();
|
|
408
|
-
}
|
|
409
|
-
throw new Error("cloudflared is required for `auvrynt start`. Install it from https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/.");
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
function findCommand(command) {
|
|
413
|
-
try {
|
|
414
|
-
return execFileSync(process.platform === "win32" ? "where.exe" : "which", [command], { encoding: "utf8" }).split(/\r?\n/)[0]?.trim() || undefined;
|
|
415
|
-
}
|
|
416
|
-
catch {
|
|
417
|
-
return undefined;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
async function ensureSerenaExecutable() {
|
|
421
|
-
const existing = findCommand("serena");
|
|
422
|
-
if (existing)
|
|
423
|
-
return existing;
|
|
424
|
-
const projectRoot = resolve(process.cwd());
|
|
425
|
-
const localCandidates = [
|
|
426
|
-
join(projectRoot, "serena"),
|
|
427
|
-
join(dirname(projectRoot), "serena"),
|
|
428
|
-
join(homedir(), "Desktop", "Projectsss", "serena"),
|
|
429
|
-
];
|
|
430
|
-
const localSource = localCandidates.find((candidate) => existsSync(join(candidate, "pyproject.toml")));
|
|
431
|
-
const uv = await ensureUvExecutable();
|
|
432
|
-
console.log(localSource
|
|
433
|
-
? `Serena is not installed; installing the local checkout from ${localSource}...`
|
|
434
|
-
: "Serena is not installed; installing the official Serena package...");
|
|
435
|
-
const installArgs = localSource
|
|
436
|
-
? ["tool", "install", "--force", "--editable", localSource]
|
|
437
|
-
: ["tool", "install", "--force", "serena-agent"];
|
|
438
|
-
execFileSync(uv, installArgs, { stdio: "inherit" });
|
|
439
|
-
const installed = findCommand("serena") ?? findInstalledExecutable("serena");
|
|
440
|
-
if (!installed) {
|
|
441
|
-
throw new Error("Serena installed but its executable is not available. Restart PowerShell and run `where.exe serena`.");
|
|
442
|
-
}
|
|
443
|
-
return installed;
|
|
444
|
-
}
|
|
445
|
-
async function ensureUvExecutable() {
|
|
446
|
-
const existing = findCommand("uv");
|
|
447
|
-
if (existing)
|
|
448
|
-
return existing;
|
|
449
|
-
const python = findCommand("py") ?? findCommand("python");
|
|
450
|
-
if (!python) {
|
|
451
|
-
throw new Error("Serena requires uv, and Python was not found to install it automatically.");
|
|
452
|
-
}
|
|
453
|
-
console.log("uv is not installed; installing it for Serena...");
|
|
454
|
-
execFileSync(python, ["-m", "pip", "install", "--user", "uv"], { stdio: "inherit" });
|
|
455
|
-
const installed = findCommand("uv") ?? findInstalledExecutable("uv");
|
|
456
|
-
if (!installed) {
|
|
457
|
-
throw new Error("uv was installed but its executable is not available. Restart PowerShell and run `uv --version`.");
|
|
458
|
-
}
|
|
459
|
-
return installed;
|
|
460
|
-
}
|
|
461
|
-
function findInstalledExecutable(name) {
|
|
462
|
-
const executable = process.platform === "win32" ? `${name}.exe` : name;
|
|
463
|
-
const candidates = [
|
|
464
|
-
join(homedir(), ".local", "bin", executable),
|
|
465
|
-
join(process.env.LOCALAPPDATA ?? "", "uv", "bin", executable),
|
|
466
|
-
join(process.env.APPDATA ?? "", "uv", "bin", executable),
|
|
467
|
-
join(process.env.APPDATA ?? "", "Python", "Python313", "Scripts", executable),
|
|
468
|
-
join(process.env.APPDATA ?? "", "Python", "Python312", "Scripts", executable),
|
|
469
|
-
];
|
|
470
|
-
return candidates.find((candidate) => candidate && existsSync(candidate));
|
|
471
|
-
}
|
|
472
|
-
async function installWindowsCloudflared() {
|
|
473
|
-
const targetDir = join(homedir(), ".auvrynt", "bin");
|
|
474
|
-
const executable = join(targetDir, "cloudflared.exe");
|
|
475
|
-
const artifact = process.arch === "arm64"
|
|
476
|
-
? "cloudflared-windows-arm64.exe"
|
|
477
|
-
: process.arch === "ia32"
|
|
478
|
-
? "cloudflared-windows-386.exe"
|
|
479
|
-
: "cloudflared-windows-amd64.exe";
|
|
480
|
-
const downloadUrl = `https://github.com/cloudflare/cloudflared/releases/latest/download/${artifact}`;
|
|
481
|
-
console.log("cloudflared is not installed; downloading the official Windows binary...");
|
|
482
|
-
const response = await fetch(downloadUrl, { signal: AbortSignal.timeout(120_000) });
|
|
483
|
-
if (!response.ok) {
|
|
484
|
-
throw new Error(`Could not download cloudflared (HTTP ${response.status}). Install it from https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/.`);
|
|
485
|
-
}
|
|
486
|
-
await mkdir(targetDir, { recursive: true });
|
|
487
|
-
await writeFile(executable, Buffer.from(await response.arrayBuffer()), { mode: 0o755 });
|
|
488
|
-
return executable;
|
|
489
|
-
}
|
|
490
|
-
async function runStatus() {
|
|
491
|
-
const files = loadAuvryntFiles();
|
|
492
|
-
const host = files.config.host ?? "127.0.0.1";
|
|
493
|
-
const port = files.config.port ?? 49321;
|
|
494
|
-
const healthUrl = `http://${host}:${port}/healthz`;
|
|
495
|
-
try {
|
|
496
|
-
const response = await fetch(healthUrl, { signal: AbortSignal.timeout(1500) });
|
|
497
|
-
const body = await response.json().catch(() => ({}));
|
|
498
|
-
console.log(`Local MCP: ${response.ok && body.ok ? "connected" : "error"}`);
|
|
499
|
-
console.log(`Health URL: ${healthUrl}`);
|
|
500
|
-
}
|
|
501
|
-
catch (error) {
|
|
502
|
-
console.log("Local MCP: disconnected");
|
|
503
|
-
console.log(`Health URL: ${healthUrl}`);
|
|
504
|
-
console.log(`Detail: ${error instanceof Error ? error.message : String(error)}`);
|
|
505
|
-
}
|
|
506
|
-
const local = await discoverLocalIntegrations();
|
|
507
|
-
console.log(`Blender MCP (9876): ${local.ports.blender_lab_mcp ? "connected" : processDetected(local, "blender") ? "running, MCP unavailable" : "not detected"}${local.executables.blender ? ` (${local.executables.blender})` : ""}`);
|
|
508
|
-
console.log(`Godot: ${local.ports.auvrynt_godot_bridge ? "Auvrynt bridge connected" : processDetected(local, "godot") ? "running, bridge unavailable" : "not detected"}${local.executables.godot ? ` (${local.executables.godot})` : ""}`);
|
|
509
|
-
if (local.executables.godotCsharp)
|
|
510
|
-
console.log(`Godot C#: configured (${local.executables.godotCsharp})`);
|
|
511
|
-
console.log(`Cloudflare Tunnel: ${processDetected(local, "cloudflare_tunnel") ? "running" : local.executables.cloudflared ? "installed, not running" : "not installed"}`);
|
|
512
|
-
console.log(`Serena: ${processDetected(local, "serena") ? "running" : local.executables.serena ? `installed (${local.executables.serena})` : "not installed"}`);
|
|
513
|
-
}
|
|
514
|
-
function stateDirForFiles(files) {
|
|
515
|
-
return resolve(expandHomePath(files.config.stateDir ?? join(homedir(), ".local", "share", "auvrynt")));
|
|
516
|
-
}
|
|
517
|
-
function runConnected() {
|
|
518
|
-
const clients = readConnectedClients(stateDirForFiles(loadAuvryntFiles()));
|
|
519
|
-
console.log("Connected web agents:");
|
|
520
|
-
if (clients.length === 0) {
|
|
521
|
-
console.log(" none recorded yet");
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
for (const client of clients) {
|
|
525
|
-
console.log(` ${client.provider} — ${client.requestCount} request(s), last seen ${client.lastSeen}`);
|
|
526
|
-
if (client.userAgent)
|
|
527
|
-
console.log(` user-agent: ${client.userAgent}`);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
async function runUninstall(skipConfirmation) {
|
|
531
|
-
const files = loadAuvryntFiles();
|
|
532
|
-
if (!skipConfirmation) {
|
|
533
|
-
if (!input.isTTY || !output.isTTY) {
|
|
534
|
-
throw new Error("Uninstall is destructive in a non-interactive terminal. Re-run with `auvrynt uninstall --yes`.");
|
|
535
|
-
}
|
|
536
|
-
const answer = await prompts.confirm({ message: `Remove Auvrynt configuration from ${files.dir}?`, initialValue: false });
|
|
537
|
-
if (prompts.isCancel(answer) || !answer) {
|
|
538
|
-
console.log("Uninstall cancelled.");
|
|
539
74
|
return;
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
else {
|
|
547
|
-
console.log("Auvrynt configuration was already absent.");
|
|
548
|
-
}
|
|
549
|
-
console.log("The npm CLI package remains installed. Remove it with: npm uninstall -g auvrynt");
|
|
550
|
-
console.log("Custom state/worktree directories were preserved.");
|
|
551
|
-
}
|
|
552
|
-
function runConfigCommand(args) {
|
|
553
|
-
const [subcommand, key, ...rest] = args;
|
|
554
|
-
const files = loadAuvryntFiles();
|
|
555
|
-
if (!subcommand || subcommand === "get") {
|
|
556
|
-
console.log(JSON.stringify(files.config, null, 2));
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
if (subcommand !== "set") {
|
|
560
|
-
throw new Error(`Unknown config command: ${subcommand}`);
|
|
561
|
-
}
|
|
562
|
-
if (key !== "publicBaseUrl") {
|
|
563
|
-
throw new Error("Only `auvrynt config set publicBaseUrl <url|null>` is supported right now.");
|
|
564
|
-
}
|
|
565
|
-
const value = rest.join(" ").trim();
|
|
566
|
-
if (!value) {
|
|
567
|
-
throw new Error("Missing publicBaseUrl value.");
|
|
568
|
-
}
|
|
569
|
-
writeAuvryntConfig({
|
|
570
|
-
...files.config,
|
|
571
|
-
publicBaseUrl: normalizeOptionalPublicBaseUrl(value),
|
|
572
|
-
});
|
|
573
|
-
console.log(`Updated ${files.configPath}`);
|
|
574
|
-
}
|
|
575
|
-
function printHelp() {
|
|
576
|
-
console.log([
|
|
577
|
-
"Auvrynt",
|
|
578
|
-
"",
|
|
579
|
-
"Usage:",
|
|
580
|
-
" auvrynt Run first-time setup if needed, then start the server",
|
|
581
|
-
" auvrynt start Start a Cloudflare tunnel scoped to the current directory",
|
|
582
|
-
" auvrynt serve Start the server with verbose console logs",
|
|
583
|
-
" auvrynt init Create or update ~/.auvrynt/config.json and auth.json",
|
|
584
|
-
" auvrynt setup Configure tool integrations (Serena, Godot, Blender...)",
|
|
585
|
-
" auvrynt doctor Show config, runtime, and native dependency status",
|
|
586
|
-
" auvrynt status Show local MCP and integration connection status",
|
|
587
|
-
" auvrynt connected Show recently connected MCP/web-agent providers",
|
|
588
|
-
" auvrynt uninstall Remove Auvrynt configuration after confirmation",
|
|
589
|
-
" auvrynt uninstall -y Remove Auvrynt configuration without confirmation",
|
|
590
|
-
" auvrynt config get Print persisted config",
|
|
591
|
-
" auvrynt config set publicBaseUrl <url|null>",
|
|
592
|
-
"",
|
|
593
|
-
"For temporary tunnels:",
|
|
594
|
-
" AUVRYNT_PUBLIC_BASE_URL=https://example.trycloudflare.com auvrynt start",
|
|
595
|
-
].join("\n"));
|
|
596
|
-
}
|
|
597
|
-
// ─── auvrynt setup ────────────────────────────────────────────────────────────
|
|
598
|
-
const SETUP_TOOL_LABELS = {
|
|
599
|
-
serena: "Serena - semantic code search / code intelligence",
|
|
600
|
-
godot: "Godot - GDScript game engine",
|
|
601
|
-
godotCsharp: "Godot C# - .NET / Mono Godot build",
|
|
602
|
-
blender: "Blender - 3D modelling and rendering",
|
|
603
|
-
};
|
|
604
|
-
const SETUP_TOOL_KEYS = ["serena", "godot", "godotCsharp", "blender"];
|
|
605
|
-
async function runSetup() {
|
|
606
|
-
prompts.intro(" Auvrynt Setup - configure local tool integrations ");
|
|
607
|
-
const files = loadAuvryntFiles();
|
|
608
|
-
const existingExecs = files.config.executables ?? {};
|
|
609
|
-
// 1. Pick which tools to configure
|
|
610
|
-
const picked = await prompts.multiselect({
|
|
611
|
-
message: "Select tools to configure (arrows navigate, space select, enter confirm)",
|
|
612
|
-
options: SETUP_TOOL_KEYS.map((key) => ({
|
|
613
|
-
value: key,
|
|
614
|
-
label: SETUP_TOOL_LABELS[key],
|
|
615
|
-
hint: existingExecs[key] ? `currently: ${existingExecs[key]}` : undefined,
|
|
616
|
-
})),
|
|
617
|
-
required: false,
|
|
618
|
-
});
|
|
619
|
-
if (prompts.isCancel(picked)) {
|
|
620
|
-
prompts.cancel("Setup cancelled.");
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
const selection = picked;
|
|
624
|
-
if (selection.length === 0) {
|
|
625
|
-
prompts.outro("Nothing selected - no changes made.");
|
|
626
|
-
return;
|
|
627
|
-
}
|
|
628
|
-
// 2. Prompt for executable path for each selected tool
|
|
629
|
-
const updated = { ...existingExecs };
|
|
630
|
-
for (const key of selection) {
|
|
631
|
-
const label = SETUP_TOOL_LABELS[key].split(" - ")[0].trim();
|
|
632
|
-
let placeholder;
|
|
633
|
-
switch (key) {
|
|
634
|
-
case "serena":
|
|
635
|
-
placeholder = "e.g. C:\\tools\\serena.exe or just serena if on PATH";
|
|
636
|
-
break;
|
|
637
|
-
case "godot":
|
|
638
|
-
placeholder = "e.g. C:\\Program Files\\Godot\\Godot.exe";
|
|
639
|
-
break;
|
|
640
|
-
case "godotCsharp":
|
|
641
|
-
placeholder = "e.g. C:\\Program Files\\Godot_v4-mono\\Godot.exe (.NET build)";
|
|
642
|
-
break;
|
|
643
|
-
case "blender":
|
|
644
|
-
placeholder = "e.g. C:\\Program Files\\Blender Foundation\\Blender 4.3\\blender.exe";
|
|
645
|
-
break;
|
|
646
|
-
default:
|
|
647
|
-
placeholder = "";
|
|
648
|
-
}
|
|
649
|
-
const answer = await prompts.text({
|
|
650
|
-
message: ` executable path`,
|
|
651
|
-
placeholder,
|
|
652
|
-
initialValue: existingExecs[key] ?? "",
|
|
653
|
-
validate: (val) => {
|
|
654
|
-
if (!(val ?? "").trim())
|
|
655
|
-
return "Path cannot be empty.";
|
|
656
|
-
return undefined;
|
|
657
|
-
},
|
|
658
|
-
});
|
|
659
|
-
if (prompts.isCancel(answer)) {
|
|
660
|
-
prompts.cancel("Setup cancelled.");
|
|
75
|
+
case "restart": {
|
|
76
|
+
const hard = args[0]?.toLowerCase() === "hard";
|
|
77
|
+
const restartRequest = parseStartRequest(hard ? args.slice(1) : args);
|
|
78
|
+
const launchRoot = setDirectoryScopedRoot();
|
|
79
|
+
await ensureConfigured({ directoryScoped: true });
|
|
80
|
+
await lifecycle.restart(restartRequest, launchRoot, hard);
|
|
661
81
|
return;
|
|
662
82
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
writeAuvryntConfig({
|
|
667
|
-
...files.config,
|
|
668
|
-
executables: {
|
|
669
|
-
serena: updated.serena,
|
|
670
|
-
godot: updated.godot,
|
|
671
|
-
godotCsharp: updated.godotCsharp,
|
|
672
|
-
blender: updated.blender,
|
|
673
|
-
},
|
|
674
|
-
});
|
|
675
|
-
// 4. Show summary
|
|
676
|
-
prompts.note(selection
|
|
677
|
-
.map((key) => ` -> `)
|
|
678
|
-
.join("\n"), "Saved to ~/.auvrynt/config.json");
|
|
679
|
-
prompts.outro("Setup complete. Run `auvrynt status` to verify.");
|
|
680
|
-
}
|
|
681
|
-
function normalizeOptionalPublicBaseUrl(value) {
|
|
682
|
-
const trimmed = value.trim();
|
|
683
|
-
if (!trimmed || trimmed === "null" || trimmed === "none")
|
|
684
|
-
return null;
|
|
685
|
-
return normalizePublicBaseUrl(trimmed);
|
|
686
|
-
}
|
|
687
|
-
function normalizePublicBaseUrl(value) {
|
|
688
|
-
const trimmed = value.trim();
|
|
689
|
-
const parsed = new URL(trimmed);
|
|
690
|
-
parsed.hash = "";
|
|
691
|
-
parsed.search = "";
|
|
692
|
-
parsed.pathname = parsed.pathname.replace(/\/+$/, "");
|
|
693
|
-
return parsed.toString().replace(/\/$/, "");
|
|
694
|
-
}
|
|
695
|
-
async function textPrompt(options) {
|
|
696
|
-
const result = await prompts.text({
|
|
697
|
-
...options,
|
|
698
|
-
validate: (value) => options.validate?.(value?.trim() ? value : options.defaultValue),
|
|
699
|
-
});
|
|
700
|
-
if (prompts.isCancel(result))
|
|
701
|
-
throw new SetupCancelledError();
|
|
702
|
-
const value = String(result).trim();
|
|
703
|
-
return value || options.defaultValue;
|
|
704
|
-
}
|
|
705
|
-
function validatePort(value) {
|
|
706
|
-
const port = Number(value);
|
|
707
|
-
return Number.isInteger(port) && port >= 1 && port <= 65535
|
|
708
|
-
? undefined
|
|
709
|
-
: "Enter a port between 1 and 65535.";
|
|
710
|
-
}
|
|
711
|
-
function validateRequiredPublicBaseUrl(value) {
|
|
712
|
-
const trimmed = value?.trim() ?? "";
|
|
713
|
-
if (!trimmed)
|
|
714
|
-
return "Enter the public URL from your tunnel or reverse proxy.";
|
|
715
|
-
if (trimmed.endsWith("/mcp"))
|
|
716
|
-
return "Enter the base URL only, without /mcp.";
|
|
717
|
-
return validatePublicBaseUrl(trimmed);
|
|
718
|
-
}
|
|
719
|
-
function validatePublicBaseUrl(value) {
|
|
720
|
-
try {
|
|
721
|
-
const parsed = new URL(value);
|
|
722
|
-
return parsed.protocol === "http:" || parsed.protocol === "https:"
|
|
723
|
-
? undefined
|
|
724
|
-
: "Use an http or https URL.";
|
|
725
|
-
}
|
|
726
|
-
catch {
|
|
727
|
-
return "Enter a valid URL, for example https://your-tunnel-host.example.com.";
|
|
83
|
+
case "help":
|
|
84
|
+
printHelp();
|
|
85
|
+
return;
|
|
728
86
|
}
|
|
729
87
|
}
|
|
730
|
-
function
|
|
731
|
-
if (
|
|
732
|
-
return;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
`Current Node: ${process.version}`,
|
|
736
|
-
"",
|
|
737
|
-
"Install Node 22 LTS or use a version manager such as nvm, fnm, or mise.",
|
|
738
|
-
].join("\n"));
|
|
739
|
-
}
|
|
740
|
-
function nodeVersionStatus() {
|
|
741
|
-
return satisfies(process.versions.node, SUPPORTED_NODE_RANGE)
|
|
742
|
-
? `supported ${SUPPORTED_NODE_RANGE}`
|
|
743
|
-
: `unsupported, requires ${SUPPORTED_NODE_RANGE}`;
|
|
744
|
-
}
|
|
745
|
-
class SetupCancelledError extends Error {
|
|
746
|
-
}
|
|
747
|
-
function checkSqliteNative() {
|
|
748
|
-
try {
|
|
749
|
-
const Database = require("better-sqlite3");
|
|
750
|
-
const db = new Database(":memory:");
|
|
751
|
-
db.close();
|
|
752
|
-
return "ok";
|
|
88
|
+
function normalizeCommand(command) {
|
|
89
|
+
if (!command || command === "serve" || command === "start")
|
|
90
|
+
return "serve";
|
|
91
|
+
if (command === "init" || command === "doctor" || command === "config") {
|
|
92
|
+
return command;
|
|
753
93
|
}
|
|
754
|
-
|
|
755
|
-
|
|
94
|
+
if (command === "status"
|
|
95
|
+
|| command === "connected"
|
|
96
|
+
|| command === "token"
|
|
97
|
+
|| command === "uninstall") {
|
|
98
|
+
return command;
|
|
756
99
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
100
|
+
if (command === "setup"
|
|
101
|
+
|| command === "enable"
|
|
102
|
+
|| command === "disable"
|
|
103
|
+
|| command === "add"
|
|
104
|
+
|| command === "change"
|
|
105
|
+
|| command === "stop"
|
|
106
|
+
|| command === "restart"
|
|
107
|
+
|| command === "tunnel") {
|
|
108
|
+
return command;
|
|
762
109
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
return `unavailable (${message})`;
|
|
110
|
+
if (command === "help" || command === "--help" || command === "-h") {
|
|
111
|
+
return "help";
|
|
766
112
|
}
|
|
113
|
+
throw new Error(`Unknown command: ${command}`);
|
|
767
114
|
}
|
|
768
|
-
function
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
catch (error) {
|
|
774
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
775
|
-
return `unavailable (${message})`;
|
|
776
|
-
}
|
|
115
|
+
function setDirectoryScopedRoot() {
|
|
116
|
+
const launchRoot = resolve(process.cwd());
|
|
117
|
+
process.env.AUVRYNT_ALLOWED_ROOTS = launchRoot;
|
|
118
|
+
process.env.AUVRYNT_WORKTREE_ROOT = launchRoot;
|
|
119
|
+
return launchRoot;
|
|
777
120
|
}
|
|
778
121
|
main(process.argv.slice(2)).catch((error) => {
|
|
779
122
|
console.error(error instanceof Error ? error.message : String(error));
|