vamp-mcp 0.2.0 → 0.2.3

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.
Files changed (133) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +142 -107
  3. package/THIRD_PARTY_NOTICES.md +32 -27
  4. package/bin/vamp-mcp.mjs +37 -37
  5. package/notices/mcp-virtualbox-LICENSE +21 -21
  6. package/notices/mcp-virtualbox-PROVENANCE.json +37 -37
  7. package/package.json +51 -17
  8. package/runtime/backends/common/Test-Environment.ps1 +7 -6
  9. package/runtime/backends/common/guest-install.json +58 -0
  10. package/runtime/backends/common/guest_install.py +57 -0
  11. package/runtime/backends/common/host-support.cjs +16 -0
  12. package/runtime/backends/common/packer.cjs +16 -0
  13. package/runtime/backends/hyperv/scripts/Manage-Desktop.ps1 +40 -67
  14. package/runtime/backends/hyperv/scripts/Send-InstallerBoot.ps1 +25 -0
  15. package/runtime/backends/kvm/debian-preseed.cfg +35 -35
  16. package/runtime/backends/library/registry.py +77 -77
  17. package/runtime/backends/library/replay.py +154 -154
  18. package/runtime/backends/packer/answer_media.py +16 -0
  19. package/runtime/backends/packer/deploy-hyperv.ps1 +10 -0
  20. package/runtime/backends/packer/drivers.py +49 -0
  21. package/runtime/backends/packer/hyperv-network.ps1 +10 -0
  22. package/runtime/backends/packer/images.py +75 -0
  23. package/runtime/backends/packer/osinfo.py +113 -0
  24. package/runtime/backends/packer/policy.json +15 -0
  25. package/runtime/backends/packer/runner.py +224 -0
  26. package/runtime/backends/packer/templates.py +118 -0
  27. package/runtime/backends/packer/toolchain.py +80 -0
  28. package/runtime/backends/remote_ssh/server.mjs +310 -93
  29. package/runtime/backends/virtualbox/desktop.cjs +37 -0
  30. package/runtime/backends/virtualbox/display.py +101 -101
  31. package/runtime/backends/virtualbox/history.py +139 -139
  32. package/runtime/backends/virtualbox/mouse_click.py +15 -15
  33. package/runtime/backends/virtualbox/mouse_move.py +18 -18
  34. package/runtime/backends/virtualbox/profiles.json +46 -46
  35. package/runtime/backends/virtualbox/provision.py +238 -197
  36. package/runtime/backends/virtualbox/recording_listener.py +29 -29
  37. package/runtime/backends/virtualbox/recordings.py +39 -39
  38. package/runtime/backends/virtualbox/requirements.txt +7 -7
  39. package/runtime/backends/virtualbox/rpas/debian_first_boot/manifest.json +1 -1
  40. package/runtime/backends/virtualbox/rpas/debian_first_boot/run.robot +13 -13
  41. package/runtime/backends/virtualbox/rpas/debian_first_boot/workflow.py +75 -75
  42. package/runtime/backends/virtualbox/rpas/observe/manifest.json +7 -7
  43. package/runtime/backends/virtualbox/rpas/observe/run.robot +13 -13
  44. package/runtime/backends/virtualbox/rpas/observe/workflow.py +14 -14
  45. package/runtime/backends/virtualbox/server.mjs +288 -237
  46. package/runtime/backends/virtualbox/setup_windows_sdk.py +58 -58
  47. package/runtime/backends/virtualbox/shares.py +68 -68
  48. package/runtime/backends/virtualbox/snapshots.py +53 -53
  49. package/runtime/backends/virtualbox/transfers.py +89 -89
  50. package/runtime/backends/virtualbox/vnc.py +61 -61
  51. package/runtime/guest_keys.py +13 -13
  52. package/runtime/guest_setup/http/debian-preseed.cfg +39 -0
  53. package/runtime/guest_setup/http/postdeb.sh +50 -3
  54. package/runtime/guest_setup/http/postwin.ps1 +53 -28
  55. package/runtime/guest_setup/http/setup-all.ps1 +25 -25
  56. package/runtime/guest_setup/http/setup-win.cmd +7 -7
  57. package/runtime/guest_setup/http/setup.ps1 +44 -29
  58. package/runtime/guest_setup/kvm/setup-windows.ps1 +52 -52
  59. package/runtime/guest_setup/recorder/README.txt +12 -12
  60. package/runtime/guest_setup/recorder/RECORDER-LICENSE +674 -674
  61. package/runtime/guest_setup/recorder/RECORDING-GUIDE.txt +31 -31
  62. package/runtime/guest_setup/recorder/apply-display.py +41 -41
  63. package/runtime/guest_setup/recorder/configure-debian-mirrors.py +62 -62
  64. package/runtime/guest_setup/recorder/configure-gdm.py +23 -0
  65. package/runtime/guest_setup/recorder/configure-session.ps1 +14 -0
  66. package/runtime/guest_setup/recorder/gnome-display.py +60 -60
  67. package/runtime/guest_setup/recorder/install-display-startup.py +66 -39
  68. package/runtime/guest_setup/recorder/install-hypervisor-drivers.ps1 +34 -0
  69. package/runtime/guest_setup/recorder/install-resolution-shortcut.ps1 +36 -0
  70. package/runtime/guest_setup/recorder/postwin.cmd +10 -10
  71. package/runtime/guest_setup/recorder/prepare-recording.py +30 -30
  72. package/runtime/guest_setup/recorder/requirements-recorder.txt +2 -2
  73. package/runtime/guest_setup/recorder/session-policy.py +22 -0
  74. package/runtime/guest_setup/recorder/setup-user.py +53 -53
  75. package/runtime/guest_setup/recorder/setup-win.cmd +4 -60
  76. package/runtime/guest_setup/recorder/setup.ps1 +108 -81
  77. package/runtime/guest_setup/recorder/setup.sh +1 -0
  78. package/runtime/guest_setup/recorder/vamp-recorder.py +148 -148
  79. package/runtime/guest_setup/recorder/verify-recorder.py +4 -4
  80. package/runtime/guest_setup/recorder/windows-display.py +76 -76
  81. package/runtime/guest_setup/requirements.txt +2 -2
  82. package/runtime/guest_setup/setup-all.ps1 +35 -35
  83. package/runtime/guest_setup/vault/Install-VCRuntime.ps1 +26 -26
  84. package/runtime/guest_setup/vault/setup-guest-vault.ps1 +148 -148
  85. package/runtime/recording_converter.py +230 -230
  86. package/runtime/requirements-mcp.txt +11 -11
  87. package/runtime/rpas/README.md +161 -161
  88. package/runtime/rpas/captcha_handoff/manifest.json +27 -27
  89. package/runtime/rpas/captcha_handoff/run.robot +16 -16
  90. package/runtime/rpas/captcha_handoff/workflow.py +11 -11
  91. package/runtime/rpas/common.resource +26 -26
  92. package/runtime/rpas/debian_update/manifest.json +27 -27
  93. package/runtime/rpas/debian_update/run.robot +17 -17
  94. package/runtime/rpas/debian_update/workflow.py +13 -13
  95. package/runtime/rpas/desktop_control/manifest.json +26 -26
  96. package/runtime/rpas/desktop_control/run.robot +27 -27
  97. package/runtime/rpas/desktop_control/workflow.py +51 -51
  98. package/runtime/rpas/firefox_launch/manifest.json +27 -27
  99. package/runtime/rpas/firefox_launch/run.robot +15 -15
  100. package/runtime/rpas/firefox_launch/workflow.py +25 -25
  101. package/runtime/rpas/firefox_naver/manifest.json +27 -27
  102. package/runtime/rpas/firefox_naver/run.robot +21 -21
  103. package/runtime/rpas/firefox_naver/workflow.py +28 -28
  104. package/runtime/rpas/kvm_validation/README.md +11 -11
  105. package/runtime/rpas/kvm_validation/manifest.json +28 -28
  106. package/runtime/rpas/kvm_validation/run.robot +30 -30
  107. package/runtime/rpas/kvm_validation/workflow.py +91 -91
  108. package/runtime/rpas/manifest.schema.json +105 -105
  109. package/runtime/rpas/naver_login/login.robot +25 -25
  110. package/runtime/rpas/naver_login/manifest.json +33 -33
  111. package/runtime/rpas/naver_login/run.robot +20 -20
  112. package/runtime/rpas/naver_login/workflow.py +32 -32
  113. package/runtime/rpas/windows_naver_recorded/README.md +24 -24
  114. package/runtime/rpas/windows_naver_recorded/conversion.json +25 -25
  115. package/runtime/rpas/windows_naver_recorded/manifest.json +28 -28
  116. package/runtime/rpas/windows_naver_recorded/run.robot +37 -37
  117. package/runtime/rpas/windows_naver_recorded/workflow.py +32 -32
  118. package/runtime/scripts/build_recorder_media.py +39 -39
  119. package/runtime/scripts/macos/setup-host.sh +0 -0
  120. package/runtime/scripts/script_server.py +571 -517
  121. package/runtime/skills/vamp-rpa-ui-checks/SKILL.md +26 -0
  122. package/runtime/skills/vamp-rpa-ui-checks/agents/openai.yaml +4 -0
  123. package/runtime/skills/vamp-rpa-ui-checks/references/display.md +12 -0
  124. package/runtime/skills/vamp-rpa-ui-checks/references/user-guide.md +49 -0
  125. package/runtime/skills/vamp-ui-cleanup/SKILL.md +15 -0
  126. package/runtime/skills/vamp-ui-cleanup/agents/openai.yaml +4 -0
  127. package/runtime/skills/vamp-ui-validation/SKILL.md +27 -0
  128. package/runtime/skills/vamp-ui-validation/agents/openai.yaml +4 -0
  129. package/runtime/third_party/mcp-virtualbox/scripts/mouse_click.py +65 -65
  130. package/runtime/third_party/pyautogui-recorder/LICENSE +674 -674
  131. package/runtime/third_party/pyautogui-recorder/PROVENANCE.json +16 -16
  132. package/runtime/third_party/pyautogui-recorder/PyAutoGuiRecorder.py +169 -169
  133. package/runtime/third_party/pyautogui-recorder/README.md +53 -53
@@ -1,148 +1,148 @@
1
- <#
2
- .SYNOPSIS
3
- Installs KeePassXC (with Passkey / Browser Integration), VeraCrypt CLI,
4
- and configures automatic Removable-USB mounting for the secondary VHD.
5
- .DESCRIPTION
6
- Runs in the guest Windows desktop session after VM provisioning.
7
- 1. Installs KeePassXC (winget or direct download).
8
- 2. Registers KeePassXC-Browser native messaging host for Chrome/Edge (Passkey support).
9
- 3. Installs VeraCrypt CLI (winget or silent installer).
10
- 4. Creates Start-MountVault.cmd helper using VeraCrypt '/m rm' flag to expose NPKI as a removable USB drive.
11
- #>
12
-
13
- $ErrorActionPreference = 'Stop'
14
-
15
- Write-Output "=== VAMP Vault Guest Setup: KeePassXC, VeraCrypt & Passkey ==="
16
-
17
- # The standalone winget path needs the same prerequisite as offline setup.
18
- # Stop before KeePassXC if the runtime cannot be installed and verified.
19
- $vcRuntime = & (Join-Path $PSScriptRoot 'Install-VCRuntime.ps1')
20
-
21
- # 1. Install KeePassXC
22
- $keepass = Get-Command keepassxc.exe -ErrorAction SilentlyContinue
23
- if (-not $keepass -and (Test-Path 'C:\Program Files\KeePassXC\keepassxc.exe')) { $keepass = @{Source='C:\Program Files\KeePassXC\keepassxc.exe'} }
24
- if (-not $keepass) {
25
- Write-Output "[1/4] Installing KeePassXC via winget..."
26
- try {
27
- winget install --exact --id KeePassXCTeam.KeePassXC --scope machine --accept-package-agreements --accept-source-agreements --silent
28
- if ($LASTEXITCODE -notin @(0, 3010)) { throw "KeePassXC winget exit code: $LASTEXITCODE" }
29
- } catch {
30
- throw "KeePassXC installation failed: $_"
31
- }
32
- } else {
33
- Write-Output "[1/4] KeePassXC already installed: $($keepass.Source)"
34
- }
35
-
36
- # Locate KeePassXC installation
37
- $proxyPath = "C:\Program Files\KeePassXC\keepassxc-proxy.exe"
38
- if (-not (Test-Path -LiteralPath $proxyPath)) { throw "KeePassXC proxy was not installed: $proxyPath" }
39
-
40
- # 2. Register KeePassXC-Browser Native Messaging Host for Passkey support
41
- Write-Output "[2/4] Registering KeePassXC-Browser native messaging for Chrome/Edge Passkeys..."
42
- $nmHostDir = Join-Path $env:LOCALAPPDATA 'KeePassXC\NativeMessagingHosts'
43
- New-Item -ItemType Directory -Force -Path $nmHostDir | Out-Null
44
-
45
- $manifestPath = Join-Path $nmHostDir 'org.keepassxc.keepassxc_browser.json'
46
- $manifestContent = @{
47
- name = "org.keepassxc.keepassxc_browser"
48
- description = "KeePassXC integration with web browsers (Passkeys)"
49
- path = $proxyPath
50
- type = "stdio"
51
- allowed_origins = @(
52
- "chrome-extension://oboonakemofpalcgghocfoadofidjkkk/" # KeePassXC-Browser official extension ID
53
- )
54
- } | ConvertTo-Json -Depth 4
55
-
56
- Set-Content -LiteralPath $manifestPath -Value $manifestContent -Encoding utf8
57
-
58
- # Register in Windows Registry for Chrome and Edge
59
- $regPaths = @(
60
- "HKCU:\Software\Google\Chrome\NativeMessagingHosts\org.keepassxc.keepassxc_browser",
61
- "HKCU:\Software\Microsoft\Edge\NativeMessagingHosts\org.keepassxc.keepassxc_browser"
62
- )
63
- foreach ($regPath in $regPaths) {
64
- if (-not (Test-Path $regPath)) {
65
- New-Item -Path $regPath -Force | Out-Null
66
- }
67
- Set-ItemProperty -Path $regPath -Name "(default)" -Value $manifestPath
68
- }
69
- Write-Output "Native messaging registered at: $manifestPath"
70
-
71
- # 3. Install VeraCrypt CLI
72
- $veracrypt = Get-Command VeraCrypt.exe -ErrorAction SilentlyContinue
73
- if (-not $veracrypt -and (Test-Path 'C:\Program Files\VeraCrypt\VeraCrypt.exe')) { $veracrypt = @{Source='C:\Program Files\VeraCrypt\VeraCrypt.exe'} }
74
- if (-not $veracrypt) {
75
- Write-Output "[3/4] Installing VeraCrypt via winget..."
76
- try {
77
- winget install --exact --id IDRIX.VeraCrypt --scope machine --accept-package-agreements --accept-source-agreements --silent
78
- if ($LASTEXITCODE -notin @(0, 3010)) { throw "VeraCrypt winget exit code: $LASTEXITCODE" }
79
- } catch {
80
- throw "VeraCrypt installation failed: $_"
81
- }
82
- } else {
83
- Write-Output "[3/4] VeraCrypt already installed: $($veracrypt.Source)"
84
- }
85
-
86
- # 4. Create Removable-USB Auto-Mount Helper Script
87
- Write-Output "[4/4] Creating VHD Removable-USB (/m rm) Mount Helper..."
88
- $desktop = [Environment]::GetFolderPath('Desktop')
89
- $toolsDir = Join-Path $desktop 'VAMP-Vault'
90
- New-Item -ItemType Directory -Force -Path $toolsDir | Out-Null
91
-
92
- $mountScript = @'
93
- @echo off
94
- setlocal enabledelayedexpansion
95
- echo ========================================================
96
- echo VAMP Vault: Mounting Secondary VHD as Removable USB
97
- echo ========================================================
98
-
99
- :: 1. Search for vault.hc on all attached drives (e.g. D:\, E:\ from secondary VHD)
100
- set "HC_PATH="
101
- for %%D in (D E F G H I) do (
102
- if exist "%%D:\vault.hc" (
103
- set "HC_PATH=%%D:\vault.hc"
104
- goto :FOUND
105
- )
106
- )
107
-
108
- :FOUND
109
- if "%HC_PATH%"=="" (
110
- echo [ERROR] vault.hc not found on any secondary drive!
111
- echo Please make sure the secondary vault.vhd is attached to the VM.
112
- pause
113
- exit /b 1
114
- )
115
-
116
- echo Found vault container: %HC_PATH%
117
- rem VeraCrypt asks for the password in its guest GUI; never use /p.
118
-
119
- :: 2. Mount with /m rm (Mount volume as removable media)
120
- :: Requests VeraCrypt removable media mode; application compatibility needs separate verification.
121
- set "VC_EXE=C:\Program Files\VeraCrypt\VeraCrypt.exe"
122
- if not exist "%VC_EXE%" (
123
- echo [ERROR] VeraCrypt not found at %VC_EXE%!
124
- pause
125
- exit /b 1
126
- )
127
-
128
- echo Mounting %HC_PATH% as Removable USB drive...
129
- "%VC_EXE%" /v "%HC_PATH%" /m rm /a
130
-
131
- if %ERRORLEVEL% equ 0 (
132
- echo [SUCCESS] Vault mounted successfully as Removable Media!
133
- echo Check the guest drive before proceeding with authentication.
134
- ) else (
135
- echo [ERROR] Failed to mount vault (code %ERRORLEVEL%).
136
- )
137
- pause
138
- '@
139
-
140
- Set-Content -LiteralPath (Join-Path $toolsDir 'Mount-Vault-USB.cmd') -Value $mountScript -Encoding ascii
141
-
142
- $vcPath = 'C:\Program Files\VeraCrypt\VeraCrypt.exe'
143
- if (-not (Test-Path -LiteralPath $vcPath)) { throw "VeraCrypt was not installed: $vcPath" }
144
- $result = @{ status = 'configured'; keepassxc_proxy = $proxyPath; veracrypt = $vcPath; native_messaging_registered = $true; browser_extension_installed = $false; passkey_login_verified = $false }
145
- $result | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $toolsDir 'setup-result.json') -Encoding utf8
146
- Write-Output "=== VAMP Vault Guest Setup Configured (passkey login not verified) ==="
147
- Write-Output "KeePassXC native messaging host: registered for Chrome & Edge"
148
- Write-Output "Removable Mount helper: $toolsDir\Mount-Vault-USB.cmd"
1
+ <#
2
+ .SYNOPSIS
3
+ Installs KeePassXC (with Passkey / Browser Integration), VeraCrypt CLI,
4
+ and configures automatic Removable-USB mounting for the secondary VHD.
5
+ .DESCRIPTION
6
+ Runs in the guest Windows desktop session after VM provisioning.
7
+ 1. Installs KeePassXC (winget or direct download).
8
+ 2. Registers KeePassXC-Browser native messaging host for Chrome/Edge (Passkey support).
9
+ 3. Installs VeraCrypt CLI (winget or silent installer).
10
+ 4. Creates Start-MountVault.cmd helper using VeraCrypt '/m rm' flag to expose NPKI as a removable USB drive.
11
+ #>
12
+
13
+ $ErrorActionPreference = 'Stop'
14
+
15
+ Write-Output "=== VAMP Vault Guest Setup: KeePassXC, VeraCrypt & Passkey ==="
16
+
17
+ # The standalone winget path needs the same prerequisite as offline setup.
18
+ # Stop before KeePassXC if the runtime cannot be installed and verified.
19
+ $vcRuntime = & (Join-Path $PSScriptRoot 'Install-VCRuntime.ps1')
20
+
21
+ # 1. Install KeePassXC
22
+ $keepass = Get-Command keepassxc.exe -ErrorAction SilentlyContinue
23
+ if (-not $keepass -and (Test-Path 'C:\Program Files\KeePassXC\keepassxc.exe')) { $keepass = @{Source='C:\Program Files\KeePassXC\keepassxc.exe'} }
24
+ if (-not $keepass) {
25
+ Write-Output "[1/4] Installing KeePassXC via winget..."
26
+ try {
27
+ winget install --exact --id KeePassXCTeam.KeePassXC --scope machine --accept-package-agreements --accept-source-agreements --silent
28
+ if ($LASTEXITCODE -notin @(0, 3010)) { throw "KeePassXC winget exit code: $LASTEXITCODE" }
29
+ } catch {
30
+ throw "KeePassXC installation failed: $_"
31
+ }
32
+ } else {
33
+ Write-Output "[1/4] KeePassXC already installed: $($keepass.Source)"
34
+ }
35
+
36
+ # Locate KeePassXC installation
37
+ $proxyPath = "C:\Program Files\KeePassXC\keepassxc-proxy.exe"
38
+ if (-not (Test-Path -LiteralPath $proxyPath)) { throw "KeePassXC proxy was not installed: $proxyPath" }
39
+
40
+ # 2. Register KeePassXC-Browser Native Messaging Host for Passkey support
41
+ Write-Output "[2/4] Registering KeePassXC-Browser native messaging for Chrome/Edge Passkeys..."
42
+ $nmHostDir = Join-Path $env:LOCALAPPDATA 'KeePassXC\NativeMessagingHosts'
43
+ New-Item -ItemType Directory -Force -Path $nmHostDir | Out-Null
44
+
45
+ $manifestPath = Join-Path $nmHostDir 'org.keepassxc.keepassxc_browser.json'
46
+ $manifestContent = @{
47
+ name = "org.keepassxc.keepassxc_browser"
48
+ description = "KeePassXC integration with web browsers (Passkeys)"
49
+ path = $proxyPath
50
+ type = "stdio"
51
+ allowed_origins = @(
52
+ "chrome-extension://oboonakemofpalcgghocfoadofidjkkk/" # KeePassXC-Browser official extension ID
53
+ )
54
+ } | ConvertTo-Json -Depth 4
55
+
56
+ Set-Content -LiteralPath $manifestPath -Value $manifestContent -Encoding utf8
57
+
58
+ # Register in Windows Registry for Chrome and Edge
59
+ $regPaths = @(
60
+ "HKCU:\Software\Google\Chrome\NativeMessagingHosts\org.keepassxc.keepassxc_browser",
61
+ "HKCU:\Software\Microsoft\Edge\NativeMessagingHosts\org.keepassxc.keepassxc_browser"
62
+ )
63
+ foreach ($regPath in $regPaths) {
64
+ if (-not (Test-Path $regPath)) {
65
+ New-Item -Path $regPath -Force | Out-Null
66
+ }
67
+ Set-ItemProperty -Path $regPath -Name "(default)" -Value $manifestPath
68
+ }
69
+ Write-Output "Native messaging registered at: $manifestPath"
70
+
71
+ # 3. Install VeraCrypt CLI
72
+ $veracrypt = Get-Command VeraCrypt.exe -ErrorAction SilentlyContinue
73
+ if (-not $veracrypt -and (Test-Path 'C:\Program Files\VeraCrypt\VeraCrypt.exe')) { $veracrypt = @{Source='C:\Program Files\VeraCrypt\VeraCrypt.exe'} }
74
+ if (-not $veracrypt) {
75
+ Write-Output "[3/4] Installing VeraCrypt via winget..."
76
+ try {
77
+ winget install --exact --id IDRIX.VeraCrypt --scope machine --accept-package-agreements --accept-source-agreements --silent
78
+ if ($LASTEXITCODE -notin @(0, 3010)) { throw "VeraCrypt winget exit code: $LASTEXITCODE" }
79
+ } catch {
80
+ throw "VeraCrypt installation failed: $_"
81
+ }
82
+ } else {
83
+ Write-Output "[3/4] VeraCrypt already installed: $($veracrypt.Source)"
84
+ }
85
+
86
+ # 4. Create Removable-USB Auto-Mount Helper Script
87
+ Write-Output "[4/4] Creating VHD Removable-USB (/m rm) Mount Helper..."
88
+ $desktop = [Environment]::GetFolderPath('Desktop')
89
+ $toolsDir = Join-Path $desktop 'VAMP-Vault'
90
+ New-Item -ItemType Directory -Force -Path $toolsDir | Out-Null
91
+
92
+ $mountScript = @'
93
+ @echo off
94
+ setlocal enabledelayedexpansion
95
+ echo ========================================================
96
+ echo VAMP Vault: Mounting Secondary VHD as Removable USB
97
+ echo ========================================================
98
+
99
+ :: 1. Search for vault.hc on all attached drives (e.g. D:\, E:\ from secondary VHD)
100
+ set "HC_PATH="
101
+ for %%D in (D E F G H I) do (
102
+ if exist "%%D:\vault.hc" (
103
+ set "HC_PATH=%%D:\vault.hc"
104
+ goto :FOUND
105
+ )
106
+ )
107
+
108
+ :FOUND
109
+ if "%HC_PATH%"=="" (
110
+ echo [ERROR] vault.hc not found on any secondary drive!
111
+ echo Please make sure the secondary vault.vhd is attached to the VM.
112
+ pause
113
+ exit /b 1
114
+ )
115
+
116
+ echo Found vault container: %HC_PATH%
117
+ rem VeraCrypt asks for the password in its guest GUI; never use /p.
118
+
119
+ :: 2. Mount with /m rm (Mount volume as removable media)
120
+ :: Requests VeraCrypt removable media mode; application compatibility needs separate verification.
121
+ set "VC_EXE=C:\Program Files\VeraCrypt\VeraCrypt.exe"
122
+ if not exist "%VC_EXE%" (
123
+ echo [ERROR] VeraCrypt not found at %VC_EXE%!
124
+ pause
125
+ exit /b 1
126
+ )
127
+
128
+ echo Mounting %HC_PATH% as Removable USB drive...
129
+ "%VC_EXE%" /v "%HC_PATH%" /m rm /a
130
+
131
+ if %ERRORLEVEL% equ 0 (
132
+ echo [SUCCESS] Vault mounted successfully as Removable Media!
133
+ echo Check the guest drive before proceeding with authentication.
134
+ ) else (
135
+ echo [ERROR] Failed to mount vault (code %ERRORLEVEL%).
136
+ )
137
+ pause
138
+ '@
139
+
140
+ Set-Content -LiteralPath (Join-Path $toolsDir 'Mount-Vault-USB.cmd') -Value $mountScript -Encoding ascii
141
+
142
+ $vcPath = 'C:\Program Files\VeraCrypt\VeraCrypt.exe'
143
+ if (-not (Test-Path -LiteralPath $vcPath)) { throw "VeraCrypt was not installed: $vcPath" }
144
+ $result = @{ status = 'configured'; keepassxc_proxy = $proxyPath; veracrypt = $vcPath; native_messaging_registered = $true; browser_extension_installed = $false; passkey_login_verified = $false }
145
+ $result | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $toolsDir 'setup-result.json') -Encoding utf8
146
+ Write-Output "=== VAMP Vault Guest Setup Configured (passkey login not verified) ==="
147
+ Write-Output "KeePassXC native messaging host: registered for Chrome & Edge"
148
+ Write-Output "Removable Mount helper: $toolsDir\Mount-Vault-USB.cmd"